/* Interaction surfaces for the separate controls comparison. */
body.controls-overlay-open { position: fixed; inset-inline: 0; top: var(--controls-scroll-offset, 0); width: 100%; overflow: hidden; }
.controls-picker-source { display: none !important; }
.controls-picker-trigger { appearance: none; display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; min-height: 48px; border: 1px solid #dcd4e8; border-radius: 12px; padding: 11px 14px; background: #fff; color: #30273e; text-align: left; font: inherit; font-size: 16px; cursor: pointer; }
.controls-picker-trigger.is-placeholder { color: #766d85; }
.controls-picker-trigger:disabled { color: #968f9e; background: #f5f2f8; cursor: default; }
.controls-picker-trigger[aria-invalid="true"] { border-color: #c84757; box-shadow: 0 0 0 2px #c8475710; }
.controls-picker-chevron { flex: none; color: #78658e; font-size: 20px; line-height: 1; }
.class-number-row .controls-grade-trigger { flex: 0 0 82px; width: 82px; min-width: 0; justify-content: space-around; padding-inline: 9px; }
.controls-sheet-layer { position: fixed; z-index: 2000; inset-inline: 0; top: var(--controls-viewport-top, 0px); height: var(--controls-viewport-height, 100dvh); display: flex; align-items: flex-end; justify-content: center; background: rgb(38 28 54 / 35%); overscroll-behavior: contain; }
.controls-sheet { box-sizing: border-box; display: flex; flex-direction: column; width: min(100%, 480px); max-height: calc(var(--controls-viewport-height, 100dvh) - 20px); background: #fff; border-radius: 24px 24px 0 0; box-shadow: 0 -12px 55px rgb(39 25 68 / 14%); outline: none; overflow: hidden; }
.controls-sheet-handle { width: 34px; height: 4px; border-radius: 4px; background: #ded7e7; margin: 10px auto 0; flex: none; }
.controls-sheet-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 19px 22px 17px; flex: none; }
.controls-sheet-heading h2 { margin: 0; color: #30273e; font-size: 20px; font-weight: 650; line-height: 1.4; }
.controls-sheet-heading p { margin: 7px 0 0; color: #70657f; font-size: 14px; line-height: 1.65; }
.controls-close { display: grid; place-items: center; flex: 0 0 36px; width: 36px; height: 36px; margin-top: -5px; margin-right: -8px; border: 0; border-radius: 50%; color: #70627f; background: #f5f2f8; font-size: 26px; line-height: 1; cursor: pointer; }
.controls-sheet-content { padding: 0 22px 18px; overflow-y: auto; min-height: 0; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
.controls-sheet-actions { display: flex; flex: none; gap: 12px; padding: 15px 22px max(20px, env(safe-area-inset-bottom)); border-top: 1px solid #efeaf4; background: #fff; }
.controls-sheet-actions > .button { flex: 1; min-height: 48px; border-radius: 12px; font-size: 16px; line-height: 1.4; }
.controls-sheet-actions > .primary { background: #8060c4; color: #fff; box-shadow: none; text-shadow: none; border: 1px solid #8060c4; }
.controls-sheet-actions > .ghost { background: #f4f0f9; color: #61487f; border-color: transparent; }
.controls-sheet .field label { display: block; margin-bottom: 9px; color: #463852; font-size: 15px; font-weight: 600; }
.controls-sheet .field input { box-sizing: border-box; width: 100%; min-width: 0; min-height: 48px; padding: 11px 12px; border: 1px solid #dcd4e8; border-radius: 12px; background: #fff; color: #30273e; font: inherit; font-size: 16px; }
.controls-field-help { margin: 9px 0 0; color: #786d85; font-size: 13px; line-height: 1.65; overflow-wrap: anywhere; }
.controls-options { display: grid; gap: 5px; }
.controls-option { display: flex; align-items: center; justify-content: space-between; gap: 14px; min-height: 48px; padding: 12px 14px; border: 0; border-radius: 10px; background: transparent; color: #44384f; text-align: left; font: inherit; font-size: 16px; cursor: pointer; }
.controls-option[aria-checked="true"] { background: #f1ebfa; color: #6845a2; font-weight: 600; }
.controls-option-mark { opacity: 0; }
.controls-option[aria-checked="true"] .controls-option-mark { opacity: 1; }
.controls-option:disabled { opacity: .45; cursor: default; }
.controls-datetime { display: grid; grid-template-columns: 1.3fr 1fr; gap: 13px; }
.controls-picker-error { margin: 8px 0 0; color: #bc3d4d; font-size: 13px; }
.controls-clear { min-height: 44px; margin-top: 10px; padding: 0; border: 0; color: #6e5192; background: transparent; font: inherit; font-size: 14px; cursor: pointer; }
.controls-image-preview { padding: 10px; background: #f1edf6; border: 1px solid #e7dfef; border-radius: 12px; }
.controls-image-preview img { display: block; width: 100%; height: auto; }
.controls-preview .controls-sheet-content { padding-top: 0; }
.controls-preview .controls-sheet-actions > .ghost { flex: .6; }
#modalLayer.modal-layer { z-index: 1800; top: var(--controls-viewport-top, 0px); bottom: auto; height: var(--controls-viewport-height, 100dvh); box-sizing: border-box; padding: 16px 10px max(16px, env(safe-area-inset-bottom)); align-items: center; overscroll-behavior: contain; }
#modalLayer .modal { box-sizing: border-box; width: min(100%, 480px); max-height: 100%; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; scroll-padding-top: 92px; scroll-padding-bottom: 94px; outline: none; }
#modalLayer .modal-head { position: sticky; top: -22px; z-index: 2; background: #fff; padding-top: 10px; padding-bottom: 12px; }
#modalLayer form > .action-row { position: sticky; bottom: -22px; z-index: 3; margin-inline: -2px; padding: 14px 2px max(16px, env(safe-area-inset-bottom)); border-top: 1px solid #efeaf4; background: #fff; }
#modalLayer .controls-settings-modal { border-radius: 20px; }
#modalLayer .field { scroll-margin-block: 100px; }
.controls-sheet button:focus-visible, .controls-picker-trigger:focus-visible, #modalLayer button:focus-visible { outline: 3px solid #9878cc; outline-offset: 3px; }
.controls-sheet button:active:not(:disabled), .controls-picker-trigger:active:not(:disabled) { filter: brightness(.96); }
@media (min-width: 560px) {
  .controls-sheet-layer { align-items: center; padding: 20px; box-sizing: border-box; }
  .controls-sheet { border-radius: 22px; max-height: calc(var(--controls-viewport-height, 100dvh) - 40px); }
  .controls-sheet-handle { display: none; }
  .controls-sheet-heading { padding-top: 24px; }
}
@media (max-width: 360px) {
  .controls-sheet-heading, .controls-sheet-content, .controls-sheet-actions { padding-inline: 16px; }
  .controls-datetime { grid-template-columns: 1fr; }
}
