
@font-face { font-family: 'Noto Sans'; font-style: normal; font-weight: 100 900; font-stretch: 100%; font-display: swap; src: url('/assets/fonts/NotoSans-cyrillic-ext.woff2') format('woff2'); unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F; }
@font-face { font-family: 'Noto Sans'; font-style: normal; font-weight: 100 900; font-stretch: 100%; font-display: swap; src: url('/assets/fonts/NotoSans-cyrillic.woff2') format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Noto Sans'; font-style: normal; font-weight: 100 900; font-stretch: 100%; font-display: swap; src: url('/assets/fonts/NotoSans-greek-ext.woff2') format('woff2'); unicode-range: U+1F00-1FFF; }
@font-face { font-family: 'Noto Sans'; font-style: normal; font-weight: 100 900; font-stretch: 100%; font-display: swap; src: url('/assets/fonts/NotoSans-greek.woff2') format('woff2'); unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF; }
@font-face { font-family: 'Noto Sans'; font-style: normal; font-weight: 100 900; font-stretch: 100%; font-display: swap; src: url('/assets/fonts/NotoSans-latin-ext.woff2') format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Noto Sans'; font-style: normal; font-weight: 100 900; font-stretch: 100%; font-display: swap; src: url('/assets/fonts/NotoSans-latin.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Noto Naskh Arabic'; font-style: normal; font-weight: 400 700; font-display: swap; src: url('/assets/fonts/NotoNaskhArabic-arabic.woff2') format('woff2'); unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC; }

:root {
  color-scheme: only light;
  --backdrop: #7EA6BE linear-gradient(135deg, #E2EAEF 0%, #D6E0E8 15%, #C4D4E0 35%, #AEC4D6 55%, #96B4CA 75%, #7EA6BE 100%) center / cover no-repeat;
  --ground: #E4EBF0;
  --ground-deep: #D7E1E8;
  --sheet: #FFFFFF;
  --ink: #1E2429;
  --ink-2: #3E4952;
  --muted: #5A6570;
  --line: #DCE2E7;
  --control: #808D98;
  --accent: #FDAE4D;
  --accent-ink: #1E2429;
  --accent-deep: #A4560A;
  --accent-wash: #FFF4E6;
  --focus: #2F6690;
  --danger: #B42318;
  --danger-wash: #FDECEA;
  --scrim: rgba(22, 28, 33, 0.48);

  --font: "Noto Sans", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-ar: "Noto Sans", "Noto Naskh Arabic", system-ui, -apple-system, "Segoe UI", Tahoma, sans-serif;

  --r-s: 8px;
  --r-m: 12px;
  --r-l: 20px;
  --shadow-sheet: 0 1px 2px rgba(30, 36, 41, 0.05), 0 8px 28px rgba(30, 36, 41, 0.07);
  --shadow-pop: 0 12px 40px rgba(30, 36, 41, 0.22);

  --t-in: 160ms;
  --t-mark-clear: 140ms;
  --ease-out: cubic-bezier(0.2, 0.7, 0.2, 1);
  --ease-std: cubic-bezier(0.3, 0, 0.2, 1);

  --bar-h: 64px;
  --gutter: 32px;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--backdrop);
  background-image: none;
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
:root[dir="rtl"] body { font-family: var(--font-ar); }
body::before { content: ""; position: fixed; right: 0; bottom: 0; left: 0; height: 100vh; z-index: -1; background: var(--backdrop); }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
img { max-width: 100%; }
[hidden] { display: none !important; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.tnum { font-variant-numeric: tabular-nums; }

:focus { outline: 3px solid var(--focus); outline-offset: 2px; }
:focus:not(:focus-visible) { outline: none; }

.btn {
  -webkit-appearance: none; appearance: none;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 56px; padding: 0 24px;
  border-radius: var(--r-m);
  border: 1.5px solid var(--control);
  background: var(--sheet);
  color: var(--ink);
  font-weight: 600; font-size: 17px; line-height: 1.2;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  transition: background-color 140ms var(--ease-std), border-color 140ms var(--ease-std), color 140ms var(--ease-std);
}
.btn svg { width: 20px; height: 20px; flex: none; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn-block { width: 100%; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: 0.38; cursor: default; }
html.non-touch .btn:not([disabled]):hover { border-color: var(--ink); }
html.non-touch .btn-primary:not([disabled]):hover { background: #FFBA62; border-color: #FFBA62; }

.link {
  color: var(--ink-2); font-size: 14px; font-weight: 500;
  text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 3px;
  min-height: 44px; display: inline-flex; align-items: center; padding: 0 6px;
  background: none; border: 0;
}
html.non-touch .link:hover { color: var(--ink); text-decoration-color: var(--ink); }

kbd {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 22px; height: 22px; padding: 0 6px;
  border-radius: 6px; border: 1px solid var(--line); border-bottom-width: 2px;
  background: var(--sheet); color: var(--muted);
  font-family: var(--font); font-size: 12px; font-weight: 600; line-height: 1;
}
html:not(.non-touch) kbd { display: none; }

.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field label { font-size: 14px; font-weight: 600; color: var(--ink-2); }
.field .req { color: var(--accent-deep); }
.input, .select {
  -webkit-appearance: none; appearance: none;
  width: 100%; min-height: 52px; padding: 0 16px;
  border-radius: var(--r-m); border: 1.5px solid var(--control); background: var(--sheet);
  font-size: 17px;
  transition: border-color 140ms var(--ease-std), box-shadow 140ms var(--ease-std);
}
.select {
  padding-inline-end: 44px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%233E4952' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center;
}
[dir="rtl"] .select { background-position: left 14px center; }
.input:focus, .select:focus { border-color: var(--focus); box-shadow: 0 0 0 3px rgba(47, 102, 144, 0.18); }
.input[readonly] { background: var(--ground); border-color: var(--line); font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; }
.field.has-error .input, .field.has-error .select { border-color: var(--danger); }
.field .err { color: var(--danger); font-size: 14px; font-weight: 500; }
.check {
  display: flex; align-items: flex-start; gap: 12px; min-height: 44px; padding: 10px 0;
  font-size: 15px; line-height: 1.45; cursor: pointer;
}
.check input {
  -webkit-appearance: none; appearance: none; flex: none;
  width: 24px; height: 24px; margin: 0; border-radius: 6px;
  border: 1.5px solid var(--control); background: var(--sheet);
  display: grid; place-content: center;
}
.check input::before {
  content: ""; width: 14px; height: 14px;
  clip-path: polygon(14% 52%, 0 66%, 38% 100%, 100% 22%, 86% 8%, 37% 70%);
  background: var(--accent-ink); transform: scale(0); transition: transform 120ms var(--ease-out);
}
.check input:checked { background: var(--accent); border-color: var(--accent); }
.check input:checked::before { transform: scale(1); }

.app {
  display: flex; flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
}
.bar {
  flex: none;
  height: calc(var(--bar-h) + env(safe-area-inset-top, 0px));
  padding: env(safe-area-inset-top, 0px) max(var(--gutter), env(safe-area-inset-right, 0px)) 0 max(var(--gutter), env(safe-area-inset-left, 0px));
  display: flex; align-items: center; gap: 20px;
  background: var(--sheet);
  border-bottom: 1px solid var(--line);
  position: relative; z-index: 5;
}
.brand { display: flex; align-items: center; flex: none; min-height: 44px; min-width: 44px; text-decoration: none; }
.brand .wordmark { height: 30px; width: auto; display: block; }
.brand .mark { height: 28px; width: auto; display: none; }
.bar-title {
  flex: 1 1 auto; min-width: 0;
  font-size: 15px; font-weight: 600; color: var(--ink-2);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.bar-actions { display: flex; align-items: center; gap: 6px; flex: none; }
.bar-btn {
  -webkit-appearance: none; appearance: none;
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 44px; min-width: 44px; padding: 0 14px;
  border: 0; border-radius: var(--r-m); background: transparent;
  color: var(--ink-2); font-size: 15px; font-weight: 600;
  -webkit-tap-highlight-color: transparent; touch-action: manipulation;
}
.bar-btn svg { width: 20px; height: 20px; flex: none; }
html.non-touch .bar-btn:hover { background: var(--ground); color: var(--ink); }

.foot {
  flex: none;
  padding: 14px var(--gutter) calc(14px + env(safe-area-inset-bottom, 0px));
  display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 18px;
  font-size: 13px; color: var(--ink);
}
@media (max-width: 767px) { :root { --backdrop: #7EA6BE; } }

.page {
  flex: 1 0 auto;
  width: 100%;
  padding: 40px max(var(--gutter), env(safe-area-inset-right, 0px)) 48px max(var(--gutter), env(safe-area-inset-left, 0px));
  display: flex; flex-direction: column; align-items: center;
}
.panel {
  width: 100%; max-width: 760px;
  background: var(--sheet);
  border-radius: var(--r-l);
  box-shadow: var(--shadow-sheet);
  padding: 40px 48px;
}
.panel-head { margin-bottom: 28px; }
.h1 { font-size: 30px; line-height: 1.2; font-weight: 650; letter-spacing: -0.01em; margin: 0; text-wrap: balance; }
.sub { margin: 8px 0 0; color: var(--muted); font-size: 15px; }

.scrim {
  position: fixed; top: 0; right: 0; bottom: 0; left: 0; inset: 0; z-index: 50;
  background: var(--scrim);
  display: flex; align-items: flex-start; justify-content: center;
  padding: 24px;
  overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch;
  opacity: 0; visibility: hidden;
  transition: opacity 180ms var(--ease-std), visibility 0s linear 180ms;
}
.scrim.open { opacity: 1; visibility: visible; transition: opacity 180ms var(--ease-std), visibility 0s; }
.dialog {
  width: 100%; max-width: 560px; margin: auto; flex: none;
  display: flex; flex-direction: column;
  background: var(--sheet); border-radius: var(--r-l); box-shadow: var(--shadow-pop);
  transform: translateY(8px); transition: transform 220ms var(--ease-out);
}
.scrim.open .dialog { transform: none; }
.dialog-head { display: flex; align-items: center; gap: 12px; padding: 20px 20px 8px 28px; }
.dialog-head h2 { margin: 0; flex: 1; font-size: 20px; font-weight: 650; }
.dialog-body { padding: 8px 28px 8px; }
.dialog-foot { padding: 16px 28px 24px; display: flex; gap: 12px; justify-content: flex-end; flex-wrap: wrap; }
.icon-btn {
  -webkit-appearance: none; appearance: none;
  width: 44px; height: 44px; flex: none; border: 0; border-radius: var(--r-m);
  background: transparent; color: var(--ink-2); display: grid; place-content: center;
}
.icon-btn svg { width: 22px; height: 22px; }
html.non-touch .icon-btn:hover { background: var(--ground); color: var(--ink); }

.toasts {
  position: fixed; z-index: 45; left: 50%; transform: translateX(-50%);
  top: calc(var(--bar-h) + env(safe-area-inset-top, 0px) + 14px);
  width: min(560px, calc(100% - 32px));
  display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none;
}
.toast {
  pointer-events: auto;
  display: flex; align-items: flex-start; gap: 12px;
  padding: 12px 16px; border-radius: var(--r-m);
  background: var(--ink); color: #fff; box-shadow: var(--shadow-pop);
  font-size: 15px; line-height: 1.45; font-weight: 500;
  opacity: 0; transform: translateY(-6px);
  transition: opacity 200ms var(--ease-std), transform 200ms var(--ease-out);
}
.toast.show { opacity: 1; transform: none; }
.toast { outline: 2px solid transparent; outline-offset: -2px; }
.toast svg { width: 20px; height: 20px; flex: none; margin-top: 1px; color: var(--accent); }
.toast.is-alert { background: var(--danger); }
.toast.is-alert svg { color: #fff; }

@media (max-width: 1023px) { :root { --gutter: 24px; } }
@media (max-width: 599px) {
  :root { --bar-h: 56px; --gutter: 16px; }
  .brand .wordmark { display: none; }
  .brand .mark { display: block; }
  .bar { gap: 12px; }
  .bar-btn { padding: 0 10px; }
  .bar-btn .lbl { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .page { padding-top: 20px; padding-bottom: 32px; }
  .panel { padding: 28px 20px; border-radius: var(--r-m); }
  .h1 { font-size: 25px; }
  .scrim { padding: 0; padding-top: 8vh; }
  .dialog { max-width: none; margin: auto 0 0; border-radius: var(--r-l) var(--r-l) 0 0; transform: translateY(24px); }
  .dialog-head { padding: 14px 12px 4px 20px; }
  .dialog-body { padding: 4px 20px 8px; }
  .dialog-foot { padding: 12px 20px calc(16px + env(safe-area-inset-bottom, 0px)); }
  .dialog-foot .btn { flex: 1 1 140px; }
  .foot { font-size: 12px; }
}
@media (max-height: 499px) and (orientation: landscape) {
  :root { --bar-h: 48px; }
}
[dir="rtl"] .select[dir="ltr"] { background-position: right 14px center; }
@media (max-height: 520px) {
  .toasts { top: auto; bottom: calc(64px + env(safe-area-inset-bottom, 0px)); }
}
@media (prefers-reduced-motion: reduce) {
  :root { --t-in: 100ms; }
  .dialog, .toast { transition-property: opacity; transform: none !important; }
  .check input::before { transition: none; }
}

.panel { --panel-px: 48px; --panel-pt: 40px; --panel-pb: 40px; padding: var(--panel-pt) var(--panel-px) var(--panel-pb); }
.panel.narrow { max-width: 520px; }
.panel.reading { max-width: 760px; }
.panel.wide { max-width: 1000px; }
@media (max-width: 599px) { .panel { --panel-px: 20px; --panel-pt: 28px; --panel-pb: 28px; } }
.page { justify-content: flex-start; }

.who { display: flex; flex-wrap: wrap; gap: 2px 20px; margin: 0 0 10px; font-size: 14px; line-height: 1.5; color: var(--muted); }
.who b { font-weight: 600; color: var(--ink-2); }
.who .tnum { font-variant-numeric: tabular-nums; }

.actions-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.actions-row .grow { flex: 1 1 auto; }
@media (max-width: 599px) {
  .actions-row .btn { flex: 1 1 140px; }
  .actions-row .grow { display: none; }
}

.actionbar {
  position: -webkit-sticky; position: sticky; bottom: 0; z-index: 3;
  margin: 28px calc(-1 * var(--panel-px)) calc(-1 * var(--panel-pb));
  padding: 16px var(--panel-px) calc(16px + env(safe-area-inset-bottom, 0px));
  background: var(--sheet);
  border-radius: 0 0 var(--r-l) var(--r-l);
  box-shadow: 0 -16px 16px -12px rgba(30, 36, 41, 0.10);
}
@media (max-width: 599px) { .actionbar { border-radius: 0 0 var(--r-m) var(--r-m); } }
@media (max-height: 500px) { .actionbar { position: static; } }

.spin { width: 18px; height: 18px; border-radius: 50%; border: 2.5px solid currentColor; border-right-color: transparent; animation: spin 0.8s linear infinite; flex: none; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spin { animation-duration: 2.4s; } }

.status-icon { width: 56px; height: 56px; border-radius: 50%; background: var(--ground); color: var(--ink); display: grid; place-content: center; flex: none; }
.status-icon svg { width: 28px; height: 28px; }


@media (forced-colors: active) {
  .check input:checked { border-color: Highlight; }
  .check input:checked::before { background: CanvasText; forced-color-adjust: none; }
  #screen-tests .tx-radio:checked { border-color: Highlight; }
  #screen-tests .tx-radio:checked::before { background: CanvasText; forced-color-adjust: none; }
  #screen-tests .tx-item.is-on { border-color: Highlight; }
}


body[data-screen="test"] .app {
  height: 100svh;
  min-height: 0;
  overflow: hidden;
}
body[data-screen="test"].tp-overflow .app { height: auto; min-height: 100svh; overflow: visible; overflow-x: clip; overflow-y: visible; }
@supports not (height: 100svh) {
  body[data-screen="test"] > form, body[data-screen="test"] .app { height: 100%; }
  body[data-screen="test"].tp-overflow .app { min-height: 100%; }
}
body[data-screen="test"] .foot { display: none; }
html.on-test { overflow-y: scroll; overscroll-behavior-y: none; }
html.on-test body { overscroll-behavior-y: none; }
body[data-screen="test"] .toasts {
  top: auto; bottom: env(safe-area-inset-bottom, 0px); height: var(--msg-h, 56px); transform: none;
  left: var(--msg-l, 16px); right: var(--msg-r, 16px); width: auto;
  flex-direction: column-reverse; align-items: center; gap: 0;
}
body[data-screen="test"] .toasts.across { left: var(--msg-l2, 16px); right: var(--msg-r2, 16px); }
body[data-screen="test"] .toasts.above { left: var(--msg-l2, 16px); right: var(--msg-r2, 16px); bottom: var(--msg-up, 0px); flex-direction: column; justify-content: flex-end; }
body[data-screen="test"] .toasts.above .toast { margin-block: 0; }
body[data-screen="test"] .toast { margin-block: auto; max-width: 100%; padding: 4px 12px; gap: 10px; font-size: 14px; line-height: 1.25; }
body[data-screen="test"] .toast svg { width: 18px; height: 18px; margin-top: 0; }

#screen-test { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; }
#screen-test[hidden] { display: none; }
.tp {
  --stage-bg: var(--backdrop);
  --unit-w: 960px;
  --pad-x: 48px;
  --pad-y: 40px;
  --q-size: 24px;
  --q-lead: 1.45;
  --key-h: 72px;
  --key-w: 92px;
  --key-gap: 12px;
  --yn-w: 220px;
  --ans-gap: 36px;
  --q-gap: 20px;
  --pic-gap: calc(var(--q-gap) + 8px);
  --li-h: 56px;
  --li-gap: 8px;
  --edge-room: 34px;
  --bar-h2: 64px;
  --nav-w: 64px;
  flex: 1 1 auto; min-height: 0;
  display: flex; flex-direction: column;
  -webkit-user-select: none; user-select: none;
  -webkit-touch-callout: none;
}
.tp input { -webkit-user-select: text; user-select: text; }

.tp-progress { position: relative; flex: none; height: 4px; background: var(--ground-deep); overflow: hidden; }
.tp-progress-fill { position: absolute; top: 0; bottom: 0; left: 0; inset-block: 0; inset-inline-start: 0; width: 0; background: var(--accent); transition: width 240ms var(--ease-std); }
.tp-progress-busy {
  position: absolute; top: 0; right: 0; bottom: 0; left: 0; inset: 0; opacity: 0;
  background: linear-gradient(90deg, transparent 0, rgba(255, 255, 255, 0) 30%, rgba(255, 255, 255, 0.85) 50%, rgba(255, 255, 255, 0) 70%, transparent 100%);
  background-size: 40% 100%; background-repeat: no-repeat;
  transition: opacity 200ms var(--ease-std);
}
.tp.is-slow .tp-progress-busy { opacity: 1; animation: tpBusy 1.1s linear infinite; }
@keyframes tpBusy { from { background-position: -40% 0; } to { background-position: 140% 0; } }

.tp-stage {
  position: relative;
  flex: 1 1 auto; min-height: 0;
  display: flex; flex-direction: column; align-items: center;
  padding: 24px var(--gutter);
}
.tp-stage::before { content: ""; flex: 1 1 0; }
.tp-stage::after { content: ""; flex: 0 0 var(--below, 0px); }
body.tp-overflow .tp-stage::before { flex: 0 0 0; }

.tp-sheet {
  flex: none;
  width: 100%; max-width: var(--unit-w); min-width: 0;
  display: flex; flex-direction: column;
  padding: var(--pad-y) var(--pad-x);
  background: var(--sheet);
  border-radius: var(--r-l);
  box-shadow: var(--shadow-sheet);
  position: relative;
}
.tp.tp-full .tp-sheet { flex: 1000 1 auto; min-height: 0; max-height: var(--ans-line, none); }
body.tp-overflow .tp-sheet, body.tp-overflow .tp.run-pic .tp-sheet, body.tp-overflow .tp.tp-full .tp-sheet { flex: none; max-height: none; }
body[data-screen="test"].tp-overflow .bar { position: -webkit-sticky; position: sticky; top: 0; z-index: 6; }
body.tp-overflow .tp-progress { position: -webkit-sticky; position: sticky; top: calc(var(--bar-h) + env(safe-area-inset-top, 0px)); z-index: 6; }
body.tp-overflow .tp-answers {
  position: -webkit-sticky; position: sticky; bottom: var(--stick, 0px); z-index: 2;
  margin-inline: calc(-1 * var(--pad-x)); padding-inline: var(--pad-x); box-sizing: content-box;
  margin-top: 0; padding-top: var(--ans-gap);
  background: var(--sheet);
}
body.tp-overflow:not(.tp-unpin):not(.tp-flow) .tp-body { padding-bottom: var(--edge-room); }
body.tp-overflow .tp-answers::before { content: ""; position: absolute; left: 0; right: 0; inset-inline: 0; bottom: 100%; height: 34px; z-index: -1; background: linear-gradient(to top, var(--sheet) 0, var(--sheet) 16px, rgba(255, 255, 255, 0) 100%); pointer-events: none; }
body.tp-overflow .tp-answers::after {
  content: ""; position: absolute; left: 0; right: 0; inset-inline: 0; top: 100%; height: var(--foot, 0px); z-index: -1;
  background: var(--sheet); border-radius: 0 0 var(--r-l) var(--r-l);
  box-shadow: var(--shadow-sheet); clip-path: inset(0 -40px -40px -40px);
}
body.tp-overflow .tp-bar { position: -webkit-sticky; position: sticky; bottom: 0; }
body.tp-overflow .tp-bar::before { content: ""; position: absolute; left: 0; right: 0; inset-inline: 0; bottom: 100%; height: var(--under, 0px); background: var(--stage-bg); background-size: 100% 100vh; background-position: left 0 bottom calc(-1 * var(--bar-h2) - env(safe-area-inset-bottom, 0px)); }
body[data-screen="test"].tp-overflow.tp-unpin .bar, body.tp-overflow.tp-unpin .tp-progress, body.tp-overflow.tp-unpin .tp-answers { position: relative; top: auto; bottom: auto; }
body.tp-unpin .tp-answers::before, body.tp-unpin .tp-answers::after, body.tp-unpin .tp-bar::before, body.tp-unpin .tp-more { display: none !important; }
body.tp-overflow.tp-flow .tp-answers { position: relative; bottom: auto; margin-inline: 0; padding-inline: 0; margin-top: var(--ans-gap); padding-top: 0; background: none; }
body.tp-overflow.tp-flow .tp.beside .tp-answers, body.tp-overflow.tp-flow .tp.reading .tp-answers { margin-top: 0; }
body.tp-flow .tp-answers::before, body.tp-flow .tp-answers::after, body.tp-flow .tp-bar::before { display: none !important; }
body.tp-overflow:not(.tp-unpin) .tp:not([data-shape="list"]):not([data-shape="two"]):not([data-shape="tiles"]) .tp-answers button, body.tp-overflow:not(.tp-unpin) .tp:not([data-shape="list"]):not([data-shape="two"]):not([data-shape="tiles"]) .tp-answers input, body.tp-overflow:not(.tp-unpin) .tp:not([data-shape="list"]):not([data-shape="two"]):not([data-shape="tiles"]) .tp-answers, body.tp-overflow .tp-bar button { scroll-margin-bottom: calc(-1 * var(--spb, 0px)); }
body.tp-overflow .bar button { scroll-margin-top: calc(-1 * var(--spt, 0px)); }
.tp-more { display: none; }
body.tp-overflow .tp.more-below .tp-more {
  display: flex; align-items: center; justify-content: center;
  position: absolute; bottom: calc(100% + 2px); right: var(--pad-x); z-index: 3;
  width: 36px; height: 36px; border-radius: 50%; cursor: pointer;
  background: var(--sheet); color: var(--ink-2); border: 1.5px solid var(--control); box-shadow: var(--shadow-pop);
}
.tp-more svg { width: 20px; height: 20px; }
.tp-cue { display: none; }
body.tp-overflow .tp.cue-on .tp-cue {
  display: flex; align-items: center; justify-content: center;
  position: absolute; right: 0; inset-inline-end: 0; top: 50%; margin-top: -16px;
  width: 32px; height: 32px; box-sizing: border-box; border-radius: 50%; cursor: pointer;
  background: var(--sheet); color: var(--ink-2); border: 1.5px solid var(--control);
  -webkit-tap-highlight-color: transparent; touch-action: manipulation;
}
.tp-cue svg { width: 20px; height: 20px; }
html.non-touch body.tp-overflow .tp.cue-on .tp-cue:hover { border-color: var(--ink); color: var(--ink); }
body.tp-overflow .tp.cue-on .tp-bar.cue-clock .tp-clock { visibility: hidden; }
.tp-answers:focus, #question_text:focus { outline: none; }

.tp-body { display: flex; flex-direction: column; gap: var(--q-gap); min-height: 0; }
.tp.run-pic .tp-body { gap: var(--pic-gap); }
.tp.tp-full .tp-body { flex: 1 1 auto; }
.tp-q { flex: none; min-height: var(--slot-h, 0px); }
.tp.run-pic:not(.tp-full) .tp-q { display: flex; flex-direction: column; justify-content: flex-end; }
.tp-text {
  font-size: var(--q-size); line-height: var(--q-lead); color: var(--ink); font-weight: 450;
  max-width: 40em;
  overflow-wrap: break-word; word-break: normal; hyphens: manual;
}
.tp-text p { margin: 0; white-space: pre-wrap; }
.tp-text p + p { margin-top: 0.5em; }
.tp[data-kind="start"] .tp-text { color: var(--ink-2); }
.tp-text .tp-start-title { font-size: 1.35em; line-height: 1.25; font-weight: 650; color: var(--ink); margin-bottom: 0.4em; text-wrap: balance; }
.tp-read { display: none; flex: none; min-width: 0; }
.tp.run-read .tp-read { display: block; }
.tp-passage {
  --pass-size: 20px;
  margin: 0; padding: 0.8em 1em; max-width: 34em; box-sizing: border-box;
  border-inline-start: 3px solid var(--control); border-radius: 4px; background: #F5F8FA;
  font-size: var(--pass-size); line-height: 1.5; font-weight: 400; color: var(--ink);
  white-space: pre-wrap; overflow-wrap: break-word; word-break: normal; hyphens: manual;
}
.tp-twin .tp-passage { position: absolute; left: 0; right: 0; inset-inline: 0; top: 0; }
.tp.reading .tp-sheet { max-width: var(--side-w); display: grid; grid-template-columns: var(--side-pw) minmax(0, 1fr); column-gap: var(--side-cg); row-gap: var(--side-rg); align-items: start; align-content: start; }
.tp.reading .tp-body { display: contents; }
.tp.reading .tp-q { grid-column: 1 / -1; }
.tp.reading .tp-read { grid-column: 1; }
.tp.reading .tp-answers { grid-column: 2; margin-top: 0; }
.tp.reading .tp-passage { max-width: none; }

.tp-opts { list-style: none; margin: 0.6em 0 0; padding: 0; display: flex; flex-direction: column; gap: 0.35em; }
.tp-opts li { display: flex; align-items: baseline; gap: 0.6em; }
.tp-opts .optn {
  flex: none; display: inline-flex; align-items: center; justify-content: center;
  min-width: 1.6em; height: 1.6em; padding: 0 0.3em;
  border-radius: 0.4em; border: 1.5px solid var(--control);
  font-size: 0.72em; font-weight: 650; line-height: 1; color: var(--ink);
  transform: translateY(-0.12em);
  font-variant-numeric: tabular-nums;
}

.tp-twin { position: absolute; visibility: hidden; pointer-events: none; left: var(--pad-x); right: var(--pad-x); inset-inline: var(--pad-x); top: 0; height: 0; overflow: hidden; }
.tp-twin .tp-text { position: absolute; left: 0; right: 0; inset-inline: 0; top: 0; }
.tp-twin-keys > .ans { display: flex; align-items: center; justify-content: center; gap: var(--key-gap); }

.tp-pic { display: none; flex: none; min-height: 0; flex-direction: column; align-items: center; justify-content: flex-end; position: relative; }
.tp.run-pic .tp-pic { display: flex; }
.tp.tp-full .tp-pic { flex: 1 1 auto; }
.tp-frame { position: relative; width: var(--pic-w, 0px); height: var(--pic-h, 0px); flex: none; }
.tp:not(.has-pic) .tp-frame { visibility: hidden; }
.tp-frame img { display: block; width: 100%; height: 100%; object-fit: contain; border-radius: 6px; opacity: 0; -webkit-user-drag: none; user-drag: none; }
.tp-frame img.loaded { opacity: 1; }

.crop { display: block; position: relative; flex: none; overflow: hidden; width: calc(var(--w) * var(--ts, 0) * 1px); height: calc(var(--h) * var(--ts, 0) * 1px); }
.crop img, .tp-frame .crop img {
  display: block; position: absolute; top: 0; left: 0; width: 100%; height: 100%; max-width: none; object-fit: fill; border-radius: 0; opacity: 1 !important; transition: none !important;
  -webkit-user-drag: none; user-drag: none;
}
.tp:not(.pic-in) .crop img { visibility: hidden; }
.tp-prob { display: none; flex: none; flex-direction: column; align-items: center; transition: opacity var(--t-in) var(--ease-out); }
.tp-prob.panels .crop::after { content: ""; position: absolute; top: 0; right: 0; bottom: 0; left: 0; inset: 0; border: 1px solid #c9c9c9; pointer-events: none; }
.tp-prob.panels .crop::before { content: ""; position: absolute; z-index: 1; top: 0; bottom: 0; left: calc(var(--split) * var(--ts, 0) * 1px - 1px); width: 0; border-left: 1px solid #c9c9c9; pointer-events: none; }
.tp.run-tiles .tp-prob { display: flex; }
.tp.run-tiles .tp-frame { display: flex; align-items: center; justify-content: center; }
.tp.run-tiles #Image1 { display: none; }
.tp.run-pic.no-prob .tp-pic { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); }
.tp.is-pending .tp-prob { opacity: 0.75; transition: opacity 120ms var(--ease-out); }
.tp.is-swapping .tp-prob { opacity: 0; transition: none; }
.tp.run-tiles .tp-answers { position: relative; }
.tp-answers > .qiw { z-index: 1; background: rgba(255, 255, 255, 0.88); top: calc(-1 * var(--tq-up, 0px)); }

.qiw { position: absolute; top: 0; right: 0; bottom: 0; left: 0; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; visibility: hidden; opacity: 0; }
.tp.qiw-on .qiw, .tp.qiw-stuck .qiw { visibility: visible; opacity: 1; transition: opacity 300ms ease; }
.qiw-dots { line-height: 0; visibility: hidden; }
.tp.qiw-on .qiw-dots { visibility: visible; }
.qiw-dots i { display: inline-block; width: 10px; height: 10px; margin: 0 5px; border-radius: 50%; background: var(--muted); opacity: 0.3; }
.tp.qiw-on .qiw-dots i { animation: qiwDot 1.4s ease-in-out infinite; }
.tp.qiw-on .qiw-dots i:nth-child(2) { animation-delay: 0.2s; }
.tp.qiw-on .qiw-dots i:nth-child(3) { animation-delay: 0.4s; }
@keyframes qiwDot { 0%, 80%, 100% { opacity: 0.3; } 40% { opacity: 1; } }
.qiw-retry { display: none; }
.qiw-note { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.tp.qiw-stuck .qiw-dots { display: none; }
.tp.qiw-stuck .qiw-note { position: static; width: auto; height: auto; overflow: visible; clip: auto; white-space: normal; margin: 0; font-size: 16px; color: var(--ink-2); text-align: center; }
.tp.qiw-stuck .qiw-retry { display: inline-flex; }
.tp.qiw-held .tp-answers > .ans > :not(.tp-input) { opacity: 0.4; transition: opacity 300ms ease; }
.tp.qiw-held .tp-answers > .ans > :focus-visible { opacity: 1; transition: none; }
.tp.qiw-held .tp-answers > .ans > :focus-visible > * { opacity: 0.4; }
.tp.qiw-held .tp-answers > .ans-tiles > .key:focus-visible { outline-color: transparent; }
.tp.qiw-held .tp-answers > .ans-tiles > .key:focus-visible::after { content: ""; position: absolute; top: -7.5px; right: -7.5px; bottom: -7.5px; left: -7.5px; inset: -7.5px; z-index: 2; border: 3px solid var(--focus); border-radius: 20px; pointer-events: none; }
.tp.qiw-held.is-pending .tp-answers > .ans > .key:not([aria-pressed="true"]) { opacity: 0.18; }
.tp.qiw-held .tp-answers { pointer-events: none; }

.tp-answers { flex: none; margin-top: var(--ans-gap); display: grid; grid-template-columns: minmax(0, 1fr); height: var(--key-h); min-width: 0; }
.tp[data-shape="two"] .tp-answers, .tp[data-shape="list"] .tp-answers { height: auto; min-height: var(--ans-h, 0px); align-items: start; }
.tp-answers > .ans { grid-area: 1 / 1; min-width: 0; display: flex; align-items: center; justify-content: center; gap: var(--key-gap); visibility: hidden; opacity: 0; }
.tp-answers > .ans.on { visibility: visible; opacity: 1; }
.tp.motion-xfade .tp-answers > .ans { transition: opacity var(--t-in) var(--ease-out), visibility 0s linear var(--t-in); }
.tp.motion-xfade .tp-answers > .ans.on { transition: opacity var(--t-in) var(--ease-out), visibility 0s; }

.key {
  -webkit-appearance: none; appearance: none;
  position: relative; flex: 0 1 var(--key-w); min-width: 0;
  height: var(--key-h); padding: 0 8px;
  display: inline-flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  border-radius: 14px; border: 1.5px solid var(--control);
  background: var(--sheet); color: var(--ink);
  font-weight: 650; line-height: 1.1;
  -webkit-tap-highlight-color: transparent; touch-action: manipulation;
  transition: background-color var(--t-mark-clear) var(--ease-std), border-color var(--t-mark-clear) var(--ease-std), opacity 120ms var(--ease-std);
}
.key-num { font-size: 26px; font-variant-numeric: tabular-nums; }
.key-wide { flex-basis: var(--yn-w); }
.key-main { font-size: 21px; }
.ans-scale .key-n, .ans-scale .key-main, .key-word .key-num { display: none; }
.ans-scale .key-word .key-main { display: block; min-width: 0; max-width: 100%; overflow-wrap: break-word; }
.ans-scale .key-word.key-fig .key-n {
  display: inline-flex; align-items: center; justify-content: center;
  position: absolute; bottom: 8px; left: 8px; inset-block-end: 8px; inset-inline-start: 8px;
  font-size: 12px; font-weight: 600; line-height: 1; color: var(--muted); font-variant-numeric: tabular-nums;
}
[dir="rtl"] .tp-twin-keys .key-word.key-fig .key-n { left: auto; right: 8px; }
html.non-touch .ans-scale .key-word.key-fig .key-n {
  min-width: 22px; height: 22px; padding: 0 6px;
  border-radius: 6px; border: 1px solid var(--line); border-bottom-width: 2px; background: var(--sheet);
}
.ans-list .key-word.key-fig .key-n, .ans-two .key-word.key-fig .key-n {
  position: static; flex: none; min-width: 26px; height: 26px; padding: 0 5px;
  border-radius: 7px; border: 1.5px solid var(--control); background: none;
  font-size: 14px; font-weight: 650; color: var(--ink);
}
.ans-words .key-fig[aria-pressed="true"] .key-n, html.non-touch .ans-words .key-fig[aria-pressed="true"] .key-n { color: inherit; border-color: transparent; background: none; }
.tp.keys-off .key-fig .key-n { visibility: hidden; }
@media (max-width: 599px) {
  .ans-scale .key-word.key-fig .key-n { bottom: 6px; left: 7px; inset-block-end: 6px; inset-inline-start: 7px; }
  [dir="rtl"] .tp-twin-keys .key-word.key-fig .key-n { right: 7px; }
}
.tp { --key-hint: 20px; }
html.non-touch .tp { --key-hint: 34px; }
.ans-words .key { flex: 0 0 var(--word-w, var(--yn-w)); flex-direction: row; gap: 0; padding: 0 0 0 8px; }
.ans-words .key::before { content: ""; flex: 1 0 calc(var(--key-hint) - 8px); }
.ans-words .key::after { content: ""; flex: 1 1 var(--key-hint); }
.ans-words .key-word .key-main { flex: 0 0 auto; max-width: calc(100% - var(--key-hint)); }
html:not(.non-touch) .ans-words .key-check { top: 3px; bottom: auto; left: 3px; right: auto; inset-block: 3px auto; inset-inline: 3px auto; margin-inline: 0; width: 16px; height: 16px; }
.ans-scale.ans-list { flex-direction: column; align-items: stretch; justify-content: flex-start; gap: var(--li-gap); }
.ans-scale.ans-two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--li-gap) var(--key-gap); align-items: stretch; }
.ans-list .key, .ans-two .key {
  flex: none; height: auto; min-height: var(--li-h);
  flex-direction: row; align-items: center; justify-content: flex-start; gap: 12px;
  padding: 7px 14px; text-align: start; line-height: 1.3;
}
.ans-list .key-word .key-main, .ans-two .key-word .key-main { flex: 1 1 auto; font-size: min(21px, var(--q-size)); font-weight: 500; }
.ans-list .key-check, .ans-two .key-check { position: static; flex: none; }
.key-check { position: absolute; top: 6px; left: 6px; inset-block-start: 6px; inset-inline-start: 6px; width: 20px; height: 20px; border-radius: 50%; background: var(--ink); color: #fff; display: grid; place-content: center; transform: scale(0); opacity: 0; }
.key-check svg { width: 13px; height: 13px; }
.key[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); transition: none; }
.key[aria-pressed="true"] .key-check { transform: none; opacity: 1; }
html.non-touch .key:not([aria-pressed="true"]):hover { border-color: var(--ink); background: #F5F8FA; }
.key:focus { outline-offset: 3px; }
.tp.is-pending .key:not([aria-pressed="true"]), .tp.is-pending .tp-nav:not([disabled]) { opacity: 0.45; }
.tp.is-swapping .key { transition: none !important; }

.tp { --tile-pad: 10px; --tile-pad-min: 4px; --tile-rail: 26px; --tile-gap: 12px; --tile-gap-min: 6px; }
.tp.tiled .tp-answers { height: var(--tiles-h, var(--key-h)); }
.ans-scale.ans-tiles { flex-wrap: wrap; align-content: flex-start; gap: var(--tile-g, 12px); width: 100%; max-width: var(--tiles-w, none); justify-self: center; }
.ans-tiles .key { flex: none; width: var(--tile-w); height: var(--tile-h); padding: var(--tile-pad) var(--tile-px, var(--tile-pad)) var(--tile-rail); justify-content: flex-start; gap: 0; }
.key-art { display: none; }
.key-tile .key-art { display: flex; align-items: center; justify-content: center; flex: 1 1 auto; align-self: stretch; min-width: 0; min-height: 0; border-radius: 4px; transition: opacity var(--t-in) var(--ease-out); }
.ans-tiles .key-tile[aria-pressed="true"] { background: var(--sheet); border-color: var(--accent); box-shadow: inset 0 0 0 1.5px var(--accent); }
.tp.is-swapping .key-art { opacity: 0; transition: none; }
.ans-scale .key-tile .key-num { display: block; position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.tp .ans-tiles .key-tile .key-check { top: auto; bottom: calc((var(--tile-rail) - 16px) / 2); left: 4px; right: auto; inset-block-start: auto; inset-block-end: calc((var(--tile-rail) - 16px) / 2); inset-inline: 4px auto; margin-inline: 0; width: 16px; height: 16px; }

.ans-text { gap: 10px; }
.tp-input { width: min(320px, 100%); height: var(--key-h); min-height: 0; font-size: 22px; text-align: center; font-weight: 600; }
.tp-input[aria-invalid="true"] { border-color: var(--danger); border-width: 3px; }
.tp-submit { height: var(--key-h); padding: 0 22px; gap: 12px; }
.tp-start { height: 56px; min-width: 260px; gap: 12px; padding: 0 32px; }
.tp-start svg { width: 22px; height: 22px; }

.tp-bar {
  flex: none; background: var(--sheet);
  padding: 0 max(var(--gutter), env(safe-area-inset-right, 0px)) env(safe-area-inset-bottom, 0px) max(var(--gutter), env(safe-area-inset-left, 0px));
  box-shadow: 0 -1px 0 rgba(30, 36, 41, 0.04), 0 -6px 18px rgba(30, 36, 41, 0.04);
  position: relative; z-index: 4;
}
.tp-bar-in {
  max-width: var(--unit-w); margin: 0 auto; height: var(--bar-h2);
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px;
}
.tp-status { position: relative; display: flex; align-items: center; justify-content: center; gap: 20px; min-width: 0; font-size: 14px; color: var(--muted); font-weight: 500; white-space: nowrap; }
.tp-count { display: inline-flex; align-items: baseline; gap: 6px; }
.tp-count b { font-size: 17px; font-weight: 650; color: var(--ink); }
.tp-code { color: var(--muted); }
.tp-count-num { display: inline-flex; align-items: baseline; gap: 4px; unicode-bidi: isolate; justify-content: flex-start; }
.tp-count-total { display: inline-flex; gap: 4px; }
.tp-slash { color: var(--muted); }
.tp-clock { display: inline-flex; align-items: center; gap: 6px; }
.tp-clock svg { width: 16px; height: 16px; }
.tp-saving { position: absolute; top: 0; right: 0; bottom: 0; left: 0; inset: 0; display: flex; align-items: center; justify-content: center; gap: 8px; white-space: nowrap; color: var(--ink-2); visibility: hidden; }
.tp.is-saving-text .tp-saving { visibility: visible; }
.tp.is-saving-text .tp-status > :not(.tp-saving):not(.sr-only) { visibility: hidden; }
.tp-saving-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.tp.is-saving-text .tp-saving-dot { animation: tpPulse 1s ease-in-out infinite; }
@keyframes tpPulse { 50% { opacity: 0.25; } }

.tp-nav {
  -webkit-appearance: none; appearance: none;
  display: inline-flex; align-items: center; justify-content: center;
  height: 48px; min-width: var(--nav-w); padding: 0 14px;
  border: 1.5px solid var(--control); border-radius: var(--r-m);
  background: var(--sheet); color: var(--ink-2);
  -webkit-tap-highlight-color: transparent; touch-action: manipulation;
  transition: opacity 120ms var(--ease-std), background-color 140ms var(--ease-std), border-color 140ms var(--ease-std);
}
.tp-nav svg { width: 22px; height: 22px; flex: none; }
.tp-nav[disabled] { opacity: 0.35; cursor: default; }
html.non-touch .tp-nav:not([disabled]):hover { border-color: var(--ink); color: var(--ink); }


.tp-q, .tp-read, .tp-frame img { transition: opacity var(--t-in) var(--ease-out); }
.tp.is-pending .tp-q, .tp.is-pending .tp-read, .tp.is-pending .tp-frame img.loaded { opacity: 0.75; transition: opacity 120ms var(--ease-out); }
.tp.is-swapping .tp-q, .tp.is-swapping .tp-frame img { opacity: 0; transition: none; }
.tp.is-swapping.read-new .tp-read { opacity: 0; transition: none; }
.key-word .key-main { transition: opacity var(--t-in) var(--ease-out); }
.tp.is-swapping.keys-new .key-word .key-main { opacity: 0; transition: none; }
.tp-sheet { transition: opacity var(--t-in) var(--ease-out); }
.tp.card-out .tp-sheet { opacity: 0; transition: opacity var(--t-card-out, 60ms) linear; }
.tp.card-out.is-swapping .tp-sheet, .tp.card-out.is-swapping .tp-answers > .ans { transition: none; }
.tp.beside .tp-sheet { max-width: var(--side-w); display: grid; grid-template-columns: var(--side-pw) minmax(0, 1fr); column-gap: var(--side-cg); row-gap: var(--side-rg); align-items: start; align-content: start; }
.tp.beside .tp-body { display: contents; }
.tp.beside .tp-q { grid-column: 1 / -1; }
.tp.beside .tp-pic { grid-column: 1; }
.tp.beside .tp-answers { grid-column: 2; margin-top: 0; }

@media (max-height: 760px) {
  .tp { --pad-y: 30px; --key-h: 64px; --ans-gap: 28px; --li-h: 52px; --bar-h2: 56px; --tile-pad: 8px; --tile-rail: 24px; }
  .tp-stage { padding-block: 14px; }
  .tp { --q-gap: 14px; }
}
@media (min-width: 1600px) and (min-height: 860px) {
  .tp { --unit-w: 1040px; --q-size: 26px; }
}
@media (max-width: 1199px) { .tp { --unit-w: 880px; } }
@media (max-width: 1100px) { .tp { --pad-x: 36px; --key-w: 84px; } }

@media (max-width: 599px) {
  .tp {
    --pad-x: 16px; --pad-y: 8px;
    --q-size: 19px; --key-h: 64px; --key-gap: 8px; --ans-gap: 28px; --li-h: 44px; --li-gap: 6px;
    --key-w: calc((100% - 4 * var(--key-gap)) / 5);
    --yn-w: calc((100% - var(--key-gap)) / 2);
    --bar-h2: 56px; --nav-w: 56px;
    --tile-pad: 6px; --tile-pad-min: 4px; --tile-rail: 20px; --tile-gap: 6px; --tile-gap-min: 4px;
  }
  .tp { --stage-bg: var(--sheet); }
  .tp-stage { padding: 12px 0; background: var(--sheet); }
  .tp-sheet { max-width: none; border-radius: 0; box-shadow: none; }
  .tp { --q-gap: 14px; }
  .tp-pic { margin-inline: calc(-1 * var(--pad-x)); justify-content: flex-start; }
  .tp.tiled .tp-pic { justify-content: flex-end; }
  body[data-screen="test"] .tp.tiled .tp-answers { margin-inline: -8px; padding-inline: 0; }
  .tp-passage { --pass-size: 18px; }
  .tp-frame img { border-radius: 0; }
  .key { border-radius: 12px; }
  .key-num { font-size: 24px; }
  .key-main { font-size: 19px; }
  .key-check { top: 5px; left: 5px; inset-block-start: 5px; inset-inline-start: 5px; width: 18px; height: 18px; }
  .ans-list .key, .ans-two .key { gap: 10px; padding-inline: 12px; }
  .tp-input { flex: 1 1 auto; width: auto; min-width: 0; }
  .tp-submit { flex: none; padding: 0 16px; }
  .tp-start { width: 100%; min-width: 0; }
  .tp-status { gap: 14px; font-size: 13px; }
  .tp-saving { font-size: 12px; gap: 6px; }
  .tp-count-lbl { display: none; }
  .tp.no-total .tp-count-lbl { display: inline; }
  .tp-bar { box-shadow: 0 -1px 0 var(--line); }
}
@media (max-width: 359px) { .tp { --q-size: 18px; --key-gap: 6px; } .tp[data-count="6"], .tp[data-count="7"] { --key-gap: 4px; } }
@media (max-width: 599px) {
  .tp[data-count="6"] .key-check, .tp[data-count="7"] .key-check { top: auto; bottom: 5px; left: 0; right: 0; inset-block-start: auto; inset-block-end: 5px; inset-inline: 0; margin-inline: auto; width: 16px; height: 16px; }
  .tp[data-count="6"] .key[aria-pressed="true"] .key-num, .tp[data-count="7"] .key[aria-pressed="true"] .key-num { transform: translateY(-7px); }
}
.tp-bar.no-code .tp-code { display: none; }
.tp-bar.no-word .tp-count-lbl { display: none; }

@media (max-height: 640px) and (min-width: 600px) {
  body[data-screen="test"] { --bar-h: 48px; }
  body[data-screen="test"] .bar-btn { height: 40px; min-height: 40px; }
  .tp { --pad-y: 20px; --ans-gap: 20px; --li-h: 48px; --bar-h2: 48px; --tile-gap: 10px; }
  .tp-stage { padding-block: 8px; }
  .tp { --q-gap: 10px; }
  .tp-nav { height: 44px; }
}

@media (max-height: 569px) and (min-width: 600px) {
  body[data-screen="test"] { --bar-h: 44px; }
  .tp { --q-size: 22px; --key-h: 56px; --pad-y: 12px; --ans-gap: 12px; --li-h: 44px; --li-gap: 6px; --bar-h2: 44px; --tile-pad: 6px; --tile-rail: 22px; }
  .tp-stage { padding-block: 4px; }
  .tp { --q-gap: 8px; }
  .tp-nav { height: 36px; position: relative; }
  .tp-nav::after { content: ""; position: absolute; top: -5.5px; right: -1.5px; bottom: -5.5px; left: -1.5px; inset: -5.5px -1.5px; }
  body[data-screen="test"] .toast { line-height: 1.2; padding-block: 2px; }
}
@media (max-width: 359px) { body[data-screen="test"] .toast { padding-inline: 10px; gap: 8px; font-size: 13px; } }

@media (max-height: 520px) and (min-width: 480px) and (orientation: landscape) and (pointer: coarse) {
  .tp { --stage-bg: var(--sheet); }
  .tp { --pad-x: 20px; --pad-y: 8px; --q-size: 17px; --key-h: 56px; --key-gap: 8px; --li-h: 44px; --li-gap: 6px; --bar-h2: 44px; --nav-w: 52px;
    --key-w: calc((100% - 4 * var(--key-gap)) / 5); --yn-w: calc((100% - var(--key-gap)) / 2);
    --edge-room: 0px;
    --tile-pad: 4px; --tile-pad-min: 4px; --tile-rail: 18px; --tile-gap: 6px; --tile-gap-min: 4px; }
  body[data-screen="test"] .brand { display: none; }
  .tp-stage { padding: 0; background: var(--sheet); }
  .tp-stage::before, .tp-stage::after { flex: 0 0 0; }
  .tp-sheet {
    flex: 1 1 auto; max-width: none; max-height: none; border-radius: 0; box-shadow: none;
    display: grid; grid-template-columns: minmax(0, 1fr) minmax(300px, 40%); grid-template-rows: minmax(0, 1fr);
    column-gap: 24px; align-items: stretch;
    padding-inline: max(var(--pad-x), env(safe-area-inset-left, 0px)) max(var(--pad-x), env(safe-area-inset-right, 0px));
  }
  .tp.run-pic .tp-sheet { max-height: none; }
  .tp-body { grid-column: 1; grid-row: 1; }
  .tp { --q-gap: 10px; }
  .tp-pic { flex: 1 1 auto; margin-inline: 0; justify-content: flex-end; }
  .tp-passage { --pass-size: 18px; }
  .tp-frame img { border-radius: 6px; }
  .tp-answers { grid-column: 2; grid-row: 1; align-self: end; margin: 0 0 8px; }
  .tp.wide-keys .tp-sheet { grid-template-columns: minmax(0, 1fr) minmax(300px, 50%); }
  .tp.list-wide .tp-sheet { grid-template-columns: minmax(0, 1fr) minmax(300px, 60%); }
  body.tp-overflow .tp-answers { margin-inline: 0; padding-inline: 0; }
  body.tp-overflow .tp[data-shape="list"] .tp-answers, body.tp-overflow .tp[data-shape="two"] .tp-answers { padding-top: 0; }
  .tp-twin { right: auto; inset-inline-end: auto; width: 0; }
  [dir="rtl"] .tp-twin { left: auto; right: var(--pad-x); }
  .tp-bar { box-shadow: 0 -1px 0 var(--line); }
  .tp-nav { height: 36px; position: relative; }
  .tp-nav::after { content: ""; position: absolute; top: -5.5px; right: -1.5px; bottom: -5.5px; left: -1.5px; inset: -5.5px -1.5px; }
  body[data-screen="test"] .toast { line-height: 1.2; padding-block: 2px; }
  .tp-input { width: auto; flex: 1 1 auto; min-width: 0; }
}

@media (max-height: 520px) and (min-width: 480px) and (max-width: 639px) and (orientation: landscape) and (pointer: coarse) {
  .tp-sheet, .tp.wide-keys .tp-sheet { grid-template-columns: minmax(0, 1fr) minmax(240px, 44%); }
  .tp.list-wide .tp-sheet { grid-template-columns: minmax(0, 1fr) minmax(240px, 60%); }
}
@media (max-height: 520px) and (min-width: 480px) and (orientation: landscape) and (pointer: coarse) {
  .tp.tiled .tp-sheet, .tp.tiled.wide-keys .tp-sheet { grid-template-columns: minmax(0, 1fr) minmax(300px, 60%); grid-template-rows: minmax(0, 1fr) auto; }
  .tp.tiled .tp-body { display: contents; }
  .tp.tiled .tp-q { grid-column: 1; grid-row: 1 / -1; }
  .tp.tiled .tp-pic { grid-column: 2; grid-row: 1; }
  .tp.tiled .tp-answers { grid-column: 2; grid-row: 2; margin: 8px 0; }
  body[data-screen="test"] .tp.tiled .tp-answers { margin-inline: 0; }
  .tp .ans-tiles .key-tile .key-check { width: 14px; height: 14px; bottom: calc((var(--tile-rail) - 14px) / 2); inset-block-end: calc((var(--tile-rail) - 14px) / 2); }
  .tp .ans-tiles .key-tile .key-check svg { width: 10px; height: 10px; }
}
@media (max-height: 520px) and (min-width: 480px) and (max-width: 639px) and (orientation: landscape) and (pointer: coarse) {
  .tp.tiled .tp-sheet, .tp.tiled.wide-keys .tp-sheet { grid-template-columns: minmax(0, 1fr) minmax(240px, 60%); }
}

@media (max-width: 599px) { .tp { --pic-gap: calc(var(--q-gap) + 6px); } }
@media (max-height: 640px) and (min-width: 600px) { .tp { --pic-gap: var(--q-gap); } }
@media (max-height: 520px) and (min-width: 480px) and (orientation: landscape) and (pointer: coarse) { .tp { --pic-gap: var(--q-gap); } }

[dir="rtl"] .tp-more { right: auto; left: var(--pad-x); }
[dir="rtl"] .tp-progress-fill { left: auto; right: 0; }
[dir="rtl"] body.tp-overflow .tp.cue-on .tp-cue { right: auto; left: 0; }

[dir="rtl"] .tp-answers, [dir="rtl"] .tp-bar-in { direction: ltr; }
[dir="rtl"] .tp-answers .key-main, [dir="rtl"] .tp-submit span, [dir="rtl"] .tp-start span, [dir="rtl"] .tp-status { direction: rtl; }

@media (prefers-reduced-motion: reduce) {
  .tp.qiw-on .qiw-dots i { animation: none; opacity: 1; }
  .tp.is-slow .tp-progress-busy { animation: none; opacity: 0.6; }
  .tp.is-saving-text .tp-saving-dot { animation: none; }
  .tp-progress-fill { transition: none; }
}
@media (forced-colors: active) {
  .key[aria-pressed="true"] { forced-color-adjust: none; background: Highlight; border-color: Highlight; color: HighlightText; }
  .key[aria-pressed="true"] .key-check { background: HighlightText; color: Highlight; }
  .key[aria-pressed="true"]:focus { outline-color: CanvasText; }
  .tp.qiw-held .tp-answers > .ans-tiles > .key[aria-pressed="true"]:focus-visible::after { border-color: CanvasText; }
  .qiw-dots i { forced-color-adjust: none; background: CanvasText; }
  .tp-input[aria-invalid="true"] { border: 3px dashed CanvasText; }
  .tp-progress-fill, .tp-saving-dot { forced-color-adjust: none; background: Highlight; }
  .crop, .key-tile .key-art { forced-color-adjust: none; background: #fff; }
  .ans-tiles .key-tile[aria-pressed="true"] { background: Highlight; border-color: Highlight; box-shadow: none; }
}
@media (inverted-colors: inverted) { .crop, .key-tile .key-art { background: #000; } .tp-prob.panels .crop::before, .tp-prob.panels .crop::after { border-color: #363636; } }

.bar-who { display: none; font-size: 14px; color: var(--muted); white-space: nowrap; gap: 14px; min-width: 0; max-width: 38%; overflow: hidden; }
.bar-who > span { overflow: hidden; text-overflow: ellipsis; }
.bar-who > span:first-child { color: var(--ink-2); }
@media (max-width: 599px) { body[data-screen="test"] .bar-title { visibility: hidden; } }
body[data-screen="test"] .bar-who { display: inline-flex; }
body[data-screen="test"] .bar.no-who .bar-who { display: none; }
body[data-screen="test"] .bar.tools-icons #barZoom .lbl, body[data-screen="test"] .bar.tools-icons #barHelp .lbl { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
body[data-screen="test"] .bar.tools-icons #barZoom, body[data-screen="test"] .bar.tools-icons #barHelp { padding: 0 12px; }
body[data-screen="test"] .bar.brand-compact .brand .wordmark { display: none; }
body[data-screen="test"] .bar.brand-compact .brand .mark { display: block; }
.dialog-help { max-width: 620px; }
.help-sitting {
  margin: 0 0 18px; padding: 14px 16px; border-radius: var(--r-m); background: var(--ground);
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 20px;
}
.help-sitting div { min-width: 0; }
.help-sitting dt { font-size: 12px; font-weight: 600; letter-spacing: 0.03em; color: var(--muted); }
.help-sitting dd { margin: 2px 0 0; font-size: 15px; font-weight: 600; color: var(--ink); overflow-wrap: anywhere; }
#helpBody { font-size: 16px; line-height: 1.6; color: var(--ink-2); }
#helpBody .help-title { margin: 4px 0 8px; font-size: 17px; font-weight: 650; color: var(--ink); }
#helpBody p { margin: 0 0 12px; }
#helpBody .help-list { margin: 0 0 14px; padding-inline-start: 0; list-style: none; display: flex; flex-direction: column; gap: 8px; }
#helpBody .help-list li { padding-inline-start: 14px; border-inline-start: 3px solid var(--line); }
#helpBody .help-list strong { color: var(--ink); white-space: nowrap; }
#helpBody .help-note { margin: 0 0 12px; padding: 10px 14px; border-radius: var(--r-s); background: var(--accent-wash); color: var(--ink); font-size: 15px; }
#helpBody .help-contact { font-size: 14px; color: var(--muted); }
@media (max-width: 599px) { .help-sitting { grid-template-columns: minmax(0, 1fr); } }

.dialog-confirm { max-width: 460px; }
.confirm-body { padding: 28px 28px 4px; text-align: center; }
.confirm-icon {
  width: 52px; height: 52px; margin: 0 auto 14px; border-radius: 50%;
  background: var(--accent-wash); color: var(--ink); display: grid; place-content: center;
}
.confirm-icon svg { width: 28px; height: 28px; }
.confirm-body h2 { margin: 0 0 8px; font-size: 21px; font-weight: 650; }
.confirm-body p { margin: 0 0 10px; font-size: 17px; line-height: 1.5; color: var(--ink); }
.confirm-body .confirm-note { font-size: 15px; color: var(--muted); }
.confirm-foot { justify-content: center; padding-top: 14px; }
.confirm-foot .btn { flex: 1 1 0; min-width: 140px; }

html.non-touch .tp.pic-whole .tp-frame { cursor: zoom-in; }
html.non-touch .tp.pic-whole.run-tiles .tp-frame { cursor: auto; }
html.non-touch .tp.pic-whole .tp-prob { cursor: zoom-in; }
.bar-btn[disabled] { opacity: 0.4; cursor: default; }
.pv {
  position: fixed; top: 0; right: 0; bottom: 0; left: 0; inset: 0; z-index: 70; background: #101417;
  display: flex; flex-direction: column; opacity: 0; visibility: hidden;
  -webkit-user-select: none; user-select: none; -webkit-touch-callout: none;
  transition: opacity 180ms var(--ease-std), visibility 0s linear 180ms;
}
.pv.open { opacity: 1; visibility: visible; transition: opacity 180ms var(--ease-std), visibility 0s; }
.pv-bar { flex: none; display: flex; justify-content: flex-end; gap: 8px; padding: calc(8px + env(safe-area-inset-top, 0px)) max(12px, env(safe-area-inset-right, 0px)) 8px max(12px, env(safe-area-inset-left, 0px)); }
.pv-bar .icon-btn { color: #fff; background: rgba(255, 255, 255, 0.12); }
.pv-scroll { flex: 1 1 auto; min-height: 0; overflow: auto; -webkit-overflow-scrolling: touch; display: flex; padding: 0 max(12px, env(safe-area-inset-right, 0px)) calc(12px + env(safe-area-inset-bottom, 0px)) max(12px, env(safe-area-inset-left, 0px)); direction: ltr; overscroll-behavior: contain; }
.pv { overscroll-behavior: contain; touch-action: manipulation; }
.pv-bar { justify-content: flex-start; flex-wrap: nowrap; } .pv-bar .pv-btn { flex: none; }
.pv-bar.pv-icons .pv-btn .lbl { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; } .pv-bar.pv-icons .pv-btn { padding: 0; }
.pv-gap { flex: 1 1 auto; }
.pv-btn {
  -webkit-appearance: none; appearance: none; display: inline-flex; align-items: center; gap: 8px;
  min-height: 44px; min-width: 44px; justify-content: center; padding: 0 12px; border: 0; border-radius: var(--r-m);
  background: rgba(255, 255, 255, 0.12); color: #fff; font: inherit; font-size: 14px; font-weight: 600;
}
.pv-btn svg { width: 20px; height: 20px; flex: none; }
.pv-btn[aria-disabled="true"] { opacity: 0.35; cursor: default; }
.pv-btn[aria-pressed="true"] { background: rgba(255, 255, 255, 0.28); }
@media (max-width: 599px) { .pv-btn .lbl { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; } .pv-btn { padding: 0; } }
html.pv-open { scrollbar-color: #3A4249 #101417; }
@media (max-width: 599px) { .pv-scroll { padding-inline: env(safe-area-inset-left, 0px) env(safe-area-inset-right, 0px); } }
.pv-scroll img { margin: auto; flex: none; display: block; max-width: none; background: #fff; border-radius: 6px; -webkit-user-drag: none; }
.pv :focus { outline-color: #fff; }
.pv-scroll:focus { outline-offset: -4px; }

.tp.no-total .tp-progress-fill { background: var(--accent-deep); }
body[data-screen="test"].tp-overflow.tp-unpin-top .bar, body.tp-overflow.tp-unpin-top .tp-progress { position: relative; top: auto; }
html.non-touch .tp-text, html.non-touch .tp-passage { -webkit-user-select: text; user-select: text; }
.tp-text .tp-start-keys { display: none; margin-top: 0.9em; font-size: 0.8em; color: var(--ink-2); }
@media (pointer: fine) { .tp-text .tp-start-keys { display: block; } }
.tp.keys-off .tp-text .tp-start-keys, .tp.start-short .tp-text .tp-start-keys { display: none; }
.tp-tip {
  position: fixed; left: 0; top: 0; z-index: 40; max-width: min(320px, calc(100vw - 16px));
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 5px 10px; border-radius: 8px; border: 1px solid var(--control); background: var(--sheet); color: var(--ink);
  font-size: 14px; font-weight: 500; line-height: 1.35; text-align: center;
  box-shadow: 0 4px 14px rgba(30, 36, 41, 0.18); pointer-events: none;
}
.tp-tip[hidden] { display: none; }
.tp-tip::before, .tp-tip::after { content: ""; position: absolute; top: 50%; border: solid transparent; }
.tp-tip::before { margin-top: -7px; border-width: 7px; }
.tp-tip::after { margin-top: -6px; border-width: 6px; }
.tp-tip.left::before { right: 100%; border-right-color: var(--control); }
.tp-tip.left::after { right: 100%; border-right-color: var(--sheet); }
.tp-tip:not(.left)::before { left: 100%; border-left-color: var(--control); }
.tp-tip:not(.left)::after { left: 100%; border-left-color: var(--sheet); }
.tp-tip kbd { margin: 0 2px; }
.tp-tip.keys-only .tp-tip-word { display: none; }
@media (forced-colors: active) { .tp-tip { border-color: CanvasText; } .tp-tip::before, .tp-tip::after { display: none; } }
#helpBody .help-keys { margin: 0 0 6px; }
#helpBody .help-keys-note { margin: 0 0 18px; font-size: 14px; line-height: 1.5; color: var(--muted); }
@media (min-width: 360px) and (max-width: 599px) {
  body[data-screen="test"] #barInterrupt .lbl { position: static; width: auto; height: auto; margin: 0; overflow: visible; clip: auto; }
}
