/* One compact control set for the six calculator input panels, including embedded forms. */
:is(#birth-panel,.calc-input) {
  --control:24px;
  --input-line:#dac9a7;
  --input-ink:#3a3331;
  --input-muted:#675e5b;
  --input-paper:#fbf8f4;
  --input-active:#f3efe8;
  --input-action:#564f4d;
  box-sizing:border-box;padding:12px;border-radius:12px;color:var(--input-ink);
  font:400 16px/24px Inter,ui-sans-serif,system-ui,sans-serif;
}
.sciences-page .form-panel > .science-input.calc-input {
  border:1px solid transparent;
  background:linear-gradient(#fdfdfb,#fdfdfb) padding-box,var(--gold-frame) border-box;
}
:is(#birth-panel,.calc-input) .form-toolbar {
  display:flex;flex-wrap:wrap;align-items:center;gap:8px;padding:0;margin:0 0 8px;
}
:is(#birth-panel,.calc-input) .form-toolbar .button {flex:1;}
:is(#birth-panel,.calc-input) :is(.birth-form,.input-fields) {
  display:grid;align-content:start;gap:8px;margin:16px 0 0;
}
@media(min-width:1180px) {
  #birth-panel .birth-form {display:flex;flex-direction:column;}
}
:is(#birth-panel,.calc-input) :is(.fields,.row2,.pgrid,.form-actions) {display:grid;gap:8px;}
:is(#birth-panel,.calc-input) .form-actions {grid-template-columns:minmax(0,1fr);}
:is(#birth-panel,.calc-input) .field {
  display:grid;align-content:start;min-width:0;grid-template-rows:auto auto;grid-row:auto;
  margin:0;gap:3px;color:var(--input-muted);font:400 12px/16px Inter,sans-serif;
}
:is(#birth-panel,.calc-input) :is(.field label,.vs-group legend) {
  margin:0;padding:0;color:var(--input-muted);font:400 12px/16px Inter,sans-serif;
  text-transform:none;letter-spacing:normal;
}
:is(#birth-panel,.calc-input) :is(.field,.vs-room) :is(input:not([type=radio]),select) {
  box-sizing:border-box;width:100%;max-width:100%;min-width:0;height:24px;min-height:24px;
  margin:0;padding:2px 8px;border:1px solid var(--input-line);border-radius:6px;
  background:white;color:var(--input-ink);box-shadow:none;
  font:400 12px/16px Inter,sans-serif;font-variant-numeric:tabular-nums;
}
:is(#birth-panel,.calc-input) .field select {appearance:auto;text-overflow:ellipsis;}
:is(#birth-panel,.calc-input) .field input::placeholder {opacity:1;color:var(--input-muted);}
:is(#birth-panel,.calc-input) :is(.field,.vs-room) :is(input,select):focus {border-color:#ba833b;box-shadow:none;}
:is(#birth-panel,.calc-input) .field [aria-invalid=true] {border-color:#8a3a2a;}
:is(#birth-panel,.calc-input) :is(.button,.vs-add-row,.hand-choice), 
:is(#birth-panel,.calc-input) .field input[type=file]::file-selector-button {
  box-sizing:border-box;display:inline-flex;align-items:center;justify-content:center;
  min-height:24px;margin:0;padding:2px 8px;border:1px solid var(--input-line);border-radius:999px;
  color:var(--input-ink);background:var(--input-paper);box-shadow:none;
  font:italic 500 12px/16px Literata,Georgia,serif;letter-spacing:normal;
  text-transform:none;transform:none;cursor:pointer;
}
:is(#birth-panel,.calc-input) .form-actions .button {width:100%;}
:is(#birth-panel,.calc-input) .button.primary {background:var(--input-action);border-color:var(--input-action);color:var(--input-paper);}
:is(#birth-panel,.calc-input) :is(.button,.vs-add-row):enabled:hover {background:var(--input-active);border-color:#bba682;}
:is(#birth-panel,.calc-input) .button.primary:is(:hover,:focus-visible) {color:var(--input-action);background:var(--input-active);border-color:rgb(86 79 77 / .35);}
:is(#birth-panel,.calc-input) :is(.icon-button,.vs-room button) {
  display:grid;place-items:center;flex:none;box-sizing:border-box;width:24px;height:24px;min-height:24px;
  border:1px solid var(--input-line);border-radius:6px;padding:0;
  background:var(--input-paper);color:var(--input-ink);cursor:pointer;
}
:is(#birth-panel,.calc-input) .icon-button:hover {background:var(--input-active);}
:is(#birth-panel,.calc-input) .form-toolbar .icon-button {font:italic 500 16px/24px Literata,Georgia,serif;}
:is(#birth-panel,.calc-input) .icon-button svg {width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round;}
:is(#birth-panel,.calc-input) :is(.advanced,.adv,.vs-tips,.vs-more) {margin:0;padding:0;border:0;border-block:1px solid var(--input-line);border-radius:0;background:none;}
:is(#birth-panel,.calc-input) :is(.advanced,.adv,.vs-tips,.vs-more)>summary {
  display:list-item;min-height:24px;margin:0;padding:6px 0;cursor:pointer;list-style:revert;letter-spacing:normal;text-transform:none;
  color:var(--input-muted);font:400 12px/16px Inter,sans-serif;
}
:is(#birth-panel,.calc-input) summary::marker {color:#765529;}
:is(#birth-panel,.calc-input) .field input[type=file] {padding:0 6px 0 0;}
:is(#birth-panel,.calc-input) .field input[type=file]::file-selector-button {appearance:none;-webkit-appearance:none;min-height:0;height:22px;border:0;border-right:1px solid var(--input-line);border-radius:0;margin-right:6px;background:var(--input-paper);color:var(--input-ink);font:italic 500 12px/16px Literata,Georgia,serif;cursor:pointer;}
.calc-input .form-actions,.calc-input .vs-group {min-width:0;}
.calc-input .vs-room {grid-template-columns:minmax(0,1.45fr) minmax(0,1fr) 24px;}
.sciences-page .calc-input .row2 {grid-template-columns:minmax(0,1fr);}
.calc-input #palmHandTabs .fp-tools {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:2px;margin:0;}
.calc-input #palmHandTabs .hand-choice {height:24px;border-radius:6px;font:400 12px/16px Inter,sans-serif;background:white;}
.calc-input #palmHandTabs .hand-choice:is(:hover,[aria-pressed=true]) {background:var(--input-active);border-color:#c5ae84;}
.sciences-page #fpPerson .advanced>summary::before {content:none;}
.sciences-page .calc-input :focus-visible {outline:2px solid #765529;outline-offset:3px;}
.sciences-page .calc-input .hint:empty {display:none;}
@media(min-width:1180px){.system-form .form-actions,#petals-input .form-actions {margin-top:14px;}}
:root[data-input-flex] .science-input.calc-input .form-actions {margin-top:14px;}
:root[data-input-flex] .science-input.calc-input .input-fields {margin-top:24px;}
.sciences-page .calc-input :is(.input-help,.input-storage,#fpManual,.input-group) {min-width:0;margin:0;padding:0;border:0;background:none;box-shadow:none;}
.sciences-page .calc-input .input-storage,.sciences-page .calc-input #fpManual[open] {display:grid;gap:8px;}
.sciences-page .calc-input :is(.hint,.checks,.steps,.fp-need,.pg-sum) {font:400 12px/16px Inter,sans-serif;letter-spacing:normal;}
.sciences-page .calc-input .steps {padding-inline-start:20px;}
.sciences-page .calc-input .pg-sum {margin-inline-start:4px;}
.sciences-page .calc-input .fp-need {color:#8a3a2a;background:none;border:none;padding:0;}
.sciences-page .calc-input .advanced[open] > :last-child:not(summary) {margin-bottom:8px;}
.sciences-page .calc-input :is(.adv, .fp-manual) > summary {font:400 12px/16px Inter,sans-serif;color:var(--input-muted);}
.sciences-page .calc-input .row2 > .field,.sciences-page .calc-input .pgrid > .field {grid-row:auto;grid-template-rows:auto auto;margin:0;gap:3px;}
.sciences-page .calc-input .checks {display:flex;flex-wrap:wrap;gap:4px 8px;}
.sciences-page .calc-input .checks label {display:inline-flex;align-items:center;gap:4px;max-width:100%;white-space:normal;overflow-wrap:anywhere;}
.sciences-page .calc-input .checks input[type=checkbox] {accent-color:var(--input-action);}
.calc-input .option-fields {display:grid;gap:8px;padding-block:8px;}
.sciences-page #fpPerson .fp-need {padding:0;margin:0;}
.sciences-page #fpPerson .hint {margin:3px 0 0;}
.sciences-page #fpPerson .pgrid > .pg-sex {grid-column:1;grid-row:3;}
.sciences-page #fpPerson .pgrid > .pg-place {grid-column:2;grid-row:3;}
.sciences-page #fpPerson .fp-manual > summary {padding:6px 0;margin:0;}
#form-palmistry .calc-input .row2:has(#pType) {grid-template-columns:repeat(2,minmax(0,1fr));}
#form-palmistry .calc-input .row2:has(#pType) .field {grid-row:span 2;grid-template-rows:subgrid;row-gap:3px;}
.sciences-page .calc-input .checks label:has(>input[type=checkbox]) {
  min-height:24px;padding:2px 8px;border:1px solid var(--input-line);border-radius:6px;
  font:400 12px/16px Inter,sans-serif;background:white;color:var(--input-ink);
}
.sciences-page .calc-input .checks label:has(>input[type=checkbox]):hover,
.sciences-page .calc-input .checks label:has(>input[type=checkbox]:checked) {
  background:var(--input-active);border-color:#c5ae84;
}
.sciences-page .calc-input .checks label:has(>input:checked)::before {content:none;}
:root:not(.kbd-nav) .sciences-page .calc-input :is(input,select,button,summary):focus {outline:none;box-shadow:none;}
:root:not(.kbd-nav) .sciences-page .calc-input .field :is(input,select):focus {border-color:var(--input-line);}
/* Телефон и сенсорный экран: текст полей не меньше 16 px, иначе iPhone приближает страницу при вводе (DESIGN.md 4.3, 13) */
@media (max-width:767px), (any-pointer:coarse) {
  :is(#birth-panel,.calc-input) :is(.field,.vs-room) :is(input:not([type=radio]):not([type=checkbox]):not([type=range]):not([type=file]),select) {height:32px;min-height:32px;font-size:16px;}
}
