/* The web app: the landing page's black-and-white system, arranged as a study app. A sidebar on wide screens, a tab
   bar on phones; panels on the canvas grey, cards in white, one ink colour for everything that is "on". */

/* The shell */
.app-page { background: var(--paper); }
.app { min-height: 100vh; min-height: 100dvh; }
.app[data-mode="shell"] { display: grid; grid-template-columns: 252px minmax(0, 1fr); }
.app:not([data-mode="shell"]) :is(.side, .tabbar, .cred-pill, .ava) { display: none !important; }
.app[data-mode="boot"] .top { visibility: hidden; }
.skip-link { position: absolute; left: 12px; top: -60px; z-index: 100; padding: 10px 16px; border-radius: 12px; background: var(--ink); color: var(--paper); font-weight: 600; text-decoration: none; }
.skip-link:focus { top: 12px; }

.side { position: sticky; top: 0; height: 100vh; height: 100dvh; overflow-y: auto; padding: 18px 14px 16px; border-right: 1px solid var(--line); display: flex; flex-direction: column; gap: 14px; scrollbar-width: thin; }
.side .brand { padding: 4px 10px 8px; }
.side-nav { display: flex; flex-direction: column; gap: 2px; }
.side-nav a { display: flex; align-items: center; gap: 12px; min-height: 42px; padding: 0 12px; border-radius: 13px; font-size: 15px; font-weight: 600; color: var(--soft); text-decoration: none; transition: background 0.2s, color 0.2s; }
.side-nav a svg { width: 19px; height: 19px; flex: none; }
.side-nav a:hover { background: var(--chip); color: var(--ink); }
.side-nav a[aria-current] { background: var(--ink); color: var(--paper); }
.side-h { margin: 14px 12px 4px; font-size: 12px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--sec); }
.credits { margin-top: auto; display: flex; flex-direction: column; gap: 8px; border-radius: 18px; background: var(--chip); padding: 14px; color: var(--ink); text-decoration: none; }
.credits:empty { display: none; }
.cr-top { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; font-size: 13px; font-weight: 600; color: var(--sec); }
.cr-top b { font-size: 15px; color: var(--ink); font-variant-numeric: tabular-nums; }
.cr-bar { height: 6px; border-radius: 3px; background: var(--gray5); overflow: hidden; }
.cr-bar i { display: block; height: 100%; border-radius: 3px; background: var(--ink); transition: width 0.6s var(--spring); }
.credits .fine { font-size: 12.5px; }

.main { min-width: 0; display: flex; flex-direction: column; }
.top { position: sticky; top: 0; z-index: 40; height: 64px; flex: none; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 24px; background: color-mix(in srgb, var(--paper) 94%, transparent); -webkit-backdrop-filter: saturate(1.4) blur(16px); backdrop-filter: saturate(1.4) blur(16px); border-bottom: 1px solid var(--line); }
.app[data-mode="shell"] .top-brand { visibility: hidden; }
.top-r { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.cred-pill { display: inline-flex; align-items: center; gap: 5px; height: 40px; padding: 0 13px; border-radius: 999px; background: var(--chip); font-size: 14px; font-weight: 700; text-decoration: none; color: var(--ink); font-variant-numeric: tabular-nums; }
.cred-pill svg { width: 15px; height: 15px; }
.cred-pill:empty { display: none; }
.ava { width: 40px; height: 40px; border-radius: 50%; background: var(--ink); color: var(--paper); display: grid; place-items: center; overflow: hidden; text-decoration: none; font-weight: 700; flex: none; }
.ava img { width: 100%; height: 100%; object-fit: cover; }
.home-link { font-size: 14px; font-weight: 600; color: var(--soft); text-decoration: none; padding: 0 8px; }
.home-link:hover { color: var(--ink); }
.app[data-mode="shell"] .home-link { display: none; }

.view { width: 100%; max-width: 1180px; margin: 0 auto; padding: 8px 28px 72px; outline: none; animation: fadeUp 0.35s var(--ease); }
.app[data-mode="solo"] .view { max-width: 560px; padding-top: 24px; }

.tabbar { display: none; }

@media (max-width: 980px) {
  .app[data-mode="shell"] { display: block; }
  .side { display: none; }
  .app[data-mode="shell"] .top-brand { visibility: visible; }
  .top { padding: 0 16px; }
  .view { padding: 4px 16px calc(100px + env(safe-area-inset-bottom)); }
  .tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 45; display: grid; grid-template-columns: repeat(5, 1fr); padding: 6px 6px calc(6px + env(safe-area-inset-bottom)); background: color-mix(in srgb, var(--paper) 94%, transparent); -webkit-backdrop-filter: saturate(1.4) blur(16px); backdrop-filter: saturate(1.4) blur(16px); border-top: 1px solid var(--line); }
  .tabbar a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-height: 52px; border-radius: 14px; font-size: 11.5px; font-weight: 600; color: var(--sec); text-decoration: none; transition: color 0.2s; }
  .tabbar a svg { width: 22px; height: 22px; }
  .tabbar a[aria-current] { color: var(--ink); }
  .tabbar a[aria-current] svg { transform: scale(1.06); }
}
@media (max-width: 480px) {
  .top-r { gap: 6px; }
  .cred-pill { padding: 0 10px; }
  .lang summary { width: 40px; padding: 0; justify-content: center; }
  .lang summary span { display: none; }
}

/* Page heads and layout */
.page-head { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; margin: 22px 0 22px; }
.page-head h1 { font-size: clamp(32px, 4.6vw, 50px); }
.page-head h1.h-mid { font-size: clamp(24px, 3.2vw, 34px); letter-spacing: -0.03em; }
.page-head .lede { font-size: clamp(17px, 1.8vw, 19px); }
.back { display: inline-flex; align-items: center; gap: 4px; margin-left: -4px; font-size: 14px; font-weight: 600; color: var(--soft); text-decoration: none; }
.back svg { width: 16px; height: 16px; }
.back:hover { color: var(--ink); }
.quote { font-size: 15.5px; color: var(--soft); font-style: italic; max-width: 44em; }
.quote span { display: block; margin-top: 2px; font-style: normal; font-size: 13.5px; color: var(--sec); }
.grid-2 { display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.narrow { max-width: 760px; margin: 0 auto; width: 100%; }
.stack { display: flex; flex-direction: column; gap: 14px; }
.row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; }
.row.center { justify-content: center; }
.row.tight { gap: 6px; flex-wrap: nowrap; }
.row-between { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 10px; }
.center { text-align: center; }
.h-sm { font-family: var(--sans); font-size: 19px; font-weight: 700; letter-spacing: -0.01em; line-height: 1.25; }
.h-xs { font-size: 16px; font-weight: 700; margin-top: 6px; }
.panel { min-width: 0; }
.panel > .h-sm:first-child { margin-bottom: 12px; }
.link { font-weight: 600; text-underline-offset: 3px; color: var(--ink); }
.only-narrow { display: none !important; }
@media (max-width: 980px) {
  .grid-2 { grid-template-columns: 1fr; }
  .only-narrow { display: flex !important; }
}
.loading { display: flex; justify-content: center; gap: 7px; padding: 80px 0; }
.loading i { width: 9px; height: 9px; border-radius: 50%; background: var(--ink); animation: dots 1s ease-in-out infinite; }
.loading i:nth-child(2) { animation-delay: 0.15s; } .loading i:nth-child(3) { animation-delay: 0.3s; }

/* Buttons, inputs and small things */
.btn .ic, .btn svg { width: 16px; height: 16px; }
.btn.danger { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 2px var(--ink); }
.btn.danger:hover { background: var(--ink); color: var(--paper); }
.ic.rot, svg.rot { transform: rotate(-90deg); }
.ic.flip { transform: scaleX(-1); }
.uses { display: inline-flex; align-items: center; height: 22px; margin-left: 6px; padding: 0 8px; border-radius: 11px; background: color-mix(in srgb, currentColor 14%, transparent); font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; }
.uses.none { opacity: 0.55; }
.h-sm .uses { vertical-align: 2px; color: var(--sec); }
.cost { display: inline-flex; align-items: center; gap: 3px; height: 22px; margin-left: 4px; padding: 0 7px; border-radius: 11px; background: color-mix(in srgb, currentColor 14%, transparent); font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; }
.cost::before { content: ""; width: 8px; height: 11px; background: currentColor; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 11'%3E%3Cpath d='M5 0L0 6.2h3.2L2.6 11 8 4.4H4.6z'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 11'%3E%3Cpath d='M5 0L0 6.2h3.2L2.6 11 8 4.4H4.6z'/%3E%3C/svg%3E") center / contain no-repeat; }
.chipb .cost { height: 20px; }
.chipb[aria-current="true"] { background: var(--a-ink); color: var(--a-paper); }
.chipb { display: inline-flex; align-items: center; gap: 6px; text-decoration: none; color: var(--a-ink); }
.chipb .cnt { font-size: 12px; opacity: 0.6; font-variant-numeric: tabular-nums; }
.chipb .ic { width: 15px; height: 15px; }
.chips { margin-bottom: 12px; }
.form { display: flex; flex-direction: column; gap: 8px; }
.form .btn { margin-top: 8px; }
.lbl { font-size: 14px; font-weight: 600; margin-top: 6px; }
input.field, select.field { width: 100%; height: 50px; padding: 0 16px; border-radius: 14px; font-size: 16px; }
select.field { -webkit-appearance: none; appearance: none; background: var(--card) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%238e8e93' stroke-width='1.8' stroke-linecap='round'/%3E%3C/svg%3E") right 16px center / 12px no-repeat; padding-right: 40px; }
.field.search { margin-bottom: 12px; }
.field.date-in { max-width: 260px; }
.narrow-in { width: 110px !important; }
textarea.field { font-size: 16px; }
.pass { position: relative; }
.pass .field { padding-right: 52px; }
.eye { position: absolute; right: 6px; top: 5px; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; color: var(--gray); }
.eye[aria-pressed="true"] { color: var(--ink); }
.eye svg { width: 20px; height: 20px; }
.info { border-radius: 16px; background: var(--chip); padding: 12px 14px; font-size: 15px; line-height: 1.45; }
.panel .info { background: var(--card); }
.form-err, .err { border-radius: 16px; background: var(--card); box-shadow: inset 0 0 0 1.5px var(--a-ink); padding: 12px 14px; font-size: 15px; font-weight: 600; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }
.check { display: flex; align-items: center; gap: 10px; font-size: 15px; font-weight: 600; cursor: pointer; }
.check input { width: 20px; height: 20px; accent-color: var(--ink); }
.ai-foot { font-size: 12.5px; font-style: italic; color: var(--sec); }
.note:empty { display: none; }
.empty { font-size: 14px; color: var(--sec); padding: 6px 2px; }
.empty-state { display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; padding: 40px 16px; }
.empty-state > svg { width: 52px; height: 52px; padding: 13px; border-radius: 50%; background: var(--chip); }
.empty-state b { font-size: 19px; }
.empty-state p { color: var(--soft); max-width: 30em; font-size: 15.5px; }
.empty-state.small { padding: 24px 8px; }
.placeholder { border-radius: 22px; background: var(--card); padding: 18px; font-size: 15px; font-weight: 600; color: var(--sec); display: flex; align-items: center; gap: 10px; }
.placeholder::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--a-ink); animation: pulse 1s ease-in-out infinite; flex: none; }
.placeholder.still::before { animation: none; background: var(--gray3); }
.app-toast { position: fixed; left: 50%; bottom: 28px; z-index: 90; max-width: min(520px, calc(100% - 32px)); padding: 12px 18px; border-radius: 16px; background: var(--ink); color: var(--paper); font-size: 15px; font-weight: 600; box-shadow: 0 20px 50px -14px rgba(0, 0, 0, 0.4); transform: translate(-50%, 20px); opacity: 0; pointer-events: none; transition: opacity 0.25s, transform 0.4s var(--spring); }
.app-toast.on { opacity: 1; transform: translate(-50%, 0); }
@media (max-width: 980px) { .app-toast { bottom: calc(92px + env(safe-area-inset-bottom)); } }

/* Waiting for the coach: the steps it is going through */
.wait { border-radius: 20px; background: var(--card); padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.steps-live { display: flex; flex-direction: column; gap: 7px; font-size: 14.5px; color: var(--sec); }
.steps-live span { display: flex; align-items: center; gap: 9px; transition: color 0.2s; }
.steps-live span::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--gray3); flex: none; }
.steps-live span.on { color: var(--a-ink); font-weight: 600; }
.steps-live span.on::before { background: var(--a-ink); animation: pulse 1s ease-in-out infinite; }
.steps-live span.done { color: var(--a-ink); }
.steps-live span.done::before { background: var(--a-ink); }
.wait .fine { font-size: 13px; }

/* A dialog */
.dlg { border: 0; padding: 0; border-radius: 26px; background: var(--card); color: var(--ink); width: min(440px, calc(100% - 32px)); box-shadow: 0 40px 90px -20px rgba(0, 0, 0, 0.5); }
.dlg::backdrop { background: rgba(0, 0, 0, 0.42); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
.dlg[open] { animation: popIn2 0.35s var(--spring); }
@keyframes popIn2 { from { opacity: 0; transform: scale(0.94); } }
.dlg-in { display: flex; flex-direction: column; gap: 10px; padding: 24px; }
.dlg-t { font-family: var(--sans); font-size: 21px; font-weight: 700; letter-spacing: -0.01em; }
.dlg-p { color: var(--soft); font-size: 15.5px; }
.dlg-b { display: flex; justify-content: flex-end; gap: 8px; margin-top: 10px; }

/* Logging in and the first minute */
.solo-card { display: flex; flex-direction: column; gap: 14px; padding: clamp(20px, 4vw, 30px); margin: 8px 0 40px; }
.solo-h { font-size: clamp(30px, 6vw, 40px); letter-spacing: -0.04em; }
.solo-card .lede { font-size: 17px; }
.auth-cap { width: 56px; height: 56px; border-radius: 50%; background: var(--a-ink); display: grid; place-items: center; }
.auth-cap svg { width: 38px; height: 38px; --ce: #6b6b70; --ch: var(--a-paper); }
.tg-box { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; min-height: 44px; }
.tg-login iframe { border-radius: 999px; }
.or { display: flex; align-items: center; gap: 12px; font-size: 13px; font-weight: 600; color: var(--sec); }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.dev { padding-top: 14px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 8px; }
.welcome .w-body { display: flex; flex-direction: column; gap: 14px; min-height: 300px; }
.dots-step { display: flex; gap: 6px; }
.dots-step i { flex: 1; height: 5px; border-radius: 3px; background: var(--gray5); transition: background 0.3s; }
.dots-step i.on { background: var(--ink); }
.band-pick { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.band-pick .chipb { justify-content: center; min-height: 52px; font-size: 18px; font-weight: 700; font-variant-numeric: tabular-nums; }
.w-nav { display: flex; justify-content: space-between; align-items: center; gap: 10px; }

/* Today */
.plan-bar { height: 6px; border-radius: 3px; background: var(--gray5); overflow: hidden; margin-bottom: 12px; }
.plan-bar i { display: block; height: 100%; background: var(--a-ink); border-radius: 3px; transition: width 0.8s var(--spring); }
.tasks { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.tasks a, .tasks button { width: 100%; display: grid; grid-template-columns: 40px minmax(0, 1fr) 16px; align-items: center; gap: 12px; padding: 12px; border-radius: 18px; background: var(--card); color: var(--a-ink); text-decoration: none; transition: transform 0.25s var(--spring); }
.tasks a:active, .tasks button:active { transform: scale(0.98); }
.t-ic { width: 40px; height: 40px; border-radius: 50%; background: var(--a-chip); display: grid; place-items: center; }
.t-ic svg { width: 18px; height: 18px; }
.t-tx { display: flex; flex-direction: column; min-width: 0; }
.t-tx b { font-size: 15.5px; font-weight: 600; overflow-wrap: anywhere; }
.t-tx span { font-size: 13.5px; color: var(--sec); }
.tasks .go { width: 14px; height: 14px; color: var(--gray); }
.tasks .done .t-ic { background: var(--a-ink); color: var(--a-paper); }
.tasks .done .t-tx b { color: var(--sec); }
.plan-done { display: flex; align-items: center; gap: 8px; margin-top: 12px; font-weight: 600; font-size: 15px; }
.plan-done svg { width: 22px; height: 22px; padding: 5px; border-radius: 50%; background: var(--a-ink); color: var(--a-paper); }
.tiles-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.tile.sm { padding: 16px; gap: 4px; background: var(--chip); }
.tile.sm .v b { font-size: 40px; }
.tile.sm .v span { font-size: 14px; }
.tile.sm .f { font-size: 12.5px; }
.link-tile { color: var(--ink); text-decoration: none; transition: transform 0.25s var(--spring); }
.link-tile:active { transform: scale(0.97); }
.skills { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.skill { display: grid; grid-template-columns: 36px 1fr; grid-template-rows: auto auto; column-gap: 10px; align-items: center; padding: 12px; border-radius: 18px; background: var(--card); color: var(--a-ink); text-decoration: none; }
.skill .sk-ic { grid-row: span 2; }
.skill b { font-size: 15px; }
.sk-b { font-size: 13px; color: var(--sec); font-variant-numeric: tabular-nums; }
.sk-ic { width: 36px; height: 36px; border-radius: 50%; background: var(--a-chip); display: grid; place-items: center; flex: none; color: var(--a-ink); }
.sk-ic svg { width: 18px; height: 18px; }
.sk-ic.big { width: 48px; height: 48px; background: var(--a-ink); color: var(--a-paper); }
.sk-ic.big svg { width: 22px; height: 22px; }
.out { display: flex; flex-direction: column; gap: 10px; }
.out .card { border-radius: 18px; background: var(--card); padding: 16px; display: flex; flex-direction: column; gap: 8px; align-items: flex-start; animation: fadeUp 0.4s var(--ease); }
.out .card h3 { margin: 0; font-size: 18px; line-height: 1.3; }
.out .card p { font-size: 15.5px; color: var(--soft); }
.out .card .ai-foot { font-size: 12.5px; color: var(--sec); }
.saved { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: 15px; }
.saved svg { width: 20px; height: 20px; padding: 4px; border-radius: 50%; background: var(--a-ink); color: var(--a-paper); }
#word-acts { margin-top: 12px; }
#word-acts:empty { display: none; }
@media (max-width: 640px) { .tiles-3 { grid-template-columns: 1fr 1fr; } .tiles-3 .tile:first-child { grid-column: 1 / -1; } }

/* Practice and mode pickers */
.skill-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.skill-card { border-radius: 26px; background: var(--chip); padding: 20px; display: flex; flex-direction: column; gap: 8px; }
.skill-card h2 { font-family: var(--sans); font-size: 22px; font-weight: 700; letter-spacing: -0.02em; margin-top: 6px; }
.skill-card p { color: var(--soft); font-size: 15px; }
.sc-top { display: flex; justify-content: space-between; align-items: flex-start; }
.sc-band { display: flex; flex-direction: column; align-items: flex-end; font-size: 12.5px; color: var(--sec); }
.sc-band b { font-size: 30px; font-weight: 800; color: var(--ink); line-height: 1; font-variant-numeric: tabular-nums; }
.sc-links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; padding-top: 10px; }
.modes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-bottom: 18px; }
.modes.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.mode { display: flex; flex-direction: column; gap: 6px; padding: 20px; border-radius: 26px; background: var(--chip); color: var(--ink); text-decoration: none; transition: transform 0.25s var(--spring), background 0.2s; }
.mode:hover { background: var(--gray5); }
.mode:active { transform: scale(0.98); }
.mode .sk-ic { margin-bottom: 8px; }
.mode b { font-size: 19px; }
.mode span { font-size: 15px; color: var(--soft); }
.mode .mode-cost { margin-top: auto; padding-top: 8px; font-size: 13px; font-weight: 600; color: var(--sec); }
.mic-note { display: flex; align-items: center; gap: 8px; }
.mic-note svg, .facts-list svg { width: 16px; height: 16px; flex: none; }
@media (max-width: 860px) { .modes, .modes.two { grid-template-columns: 1fr; } }
.recent .att-list li a { padding: 10px 0; }
.att-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.att-list li + li { border-top: 1px solid var(--hair); }
.att-list a { display: flex; align-items: center; gap: 12px; justify-content: space-between; padding: 12px 0; color: var(--a-ink); text-decoration: none; }
.att-list.big a { padding: 14px 4px; }
.att-t { font-size: 15px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.att-body { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.att-k { font-size: 12.5px; color: var(--sec); font-weight: 600; }
.att-m { display: flex; align-items: center; gap: 10px; flex: none; font-variant-numeric: tabular-nums; color: var(--sec); font-size: 14px; }
.att-m b { min-width: 42px; height: 30px; padding: 0 8px; border-radius: 15px; background: var(--a-ink); color: var(--a-paper); display: inline-grid; place-items: center; font-size: 14px; }
.facts-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; font-size: 15.5px; }
.facts-list li { display: flex; align-items: center; gap: 10px; }
.facts-list svg { width: 32px; height: 32px; padding: 8px; border-radius: 50%; background: var(--card); }

/* Words */
.bank-tools { display: flex; gap: 10px; align-items: flex-start; }
.bank-tools .search { flex: 1; }
.bank-tools .btn { min-height: 50px; }
.wlist { display: flex; flex-direction: column; gap: 8px; }
.wrow { border-radius: 18px; background: var(--chip); overflow: hidden; }
.wr-head { width: 100%; display: grid; grid-template-columns: minmax(120px, 0.9fr) minmax(0, 2fr) auto auto; align-items: center; gap: 12px; padding: 14px 16px; text-align: left; }
.wr-w { display: flex; flex-direction: column; min-width: 0; }
.wr-w b { font-family: var(--display); font-size: 20px; letter-spacing: -0.03em; overflow-wrap: anywhere; }
.wr-w span { font-size: 13px; font-style: italic; color: var(--sec); }
.wr-m { font-size: 14.5px; color: var(--soft); overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.wr-due { font-size: 12.5px; color: var(--sec); white-space: nowrap; min-width: 70px; text-align: right; }
.wr-body { padding: 0 12px; }
.wrow.open .wr-body { padding: 0 12px 12px; display: flex; flex-direction: column; gap: 10px; }
.wrow.open .wr-body .row { justify-content: space-between; padding: 0 4px; }
.state { height: 24px; padding: 0 10px; border-radius: 12px; display: inline-flex; align-items: center; font-size: 12px; font-weight: 700; white-space: nowrap; }
.state.new { box-shadow: inset 0 0 0 1.5px var(--gray3); color: var(--sec); }
.state.learning { background: var(--gray5); }
.state.known { background: var(--ink); color: var(--paper); }
@media (max-width: 640px) {
  .wr-head { grid-template-columns: minmax(0, 1fr) auto; row-gap: 4px; }
  .wr-m { grid-column: 1 / -1; grid-row: 2; }
  .wr-due { display: none; }
  .bank-tools { flex-direction: column; align-items: stretch; }
  .bank-tools .search { margin-bottom: 0; flex: none; }
}
.flash { max-width: 560px; margin: 0 auto; display: flex; flex-direction: column; gap: 14px; }
.fl-top { display: flex; flex-direction: column; gap: 8px; }
.fl-bar { height: 5px; border-radius: 3px; background: var(--gray5); overflow: hidden; }
.fl-bar i { display: block; height: 100%; background: var(--ink); transition: width 0.4s var(--ease); }
.fl-card { border-radius: 26px; background: var(--chip); padding: 28px 22px; min-height: 240px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; text-align: center; }
.fl-card .wcard { width: 100%; text-align: left; }
.fl-card:has(.wcard) { padding: 10px; }
.fl-word { font-family: var(--display); font-weight: 800; font-size: clamp(38px, 8vw, 56px); letter-spacing: -0.045em; line-height: 1.05; overflow-wrap: anywhere; }
.grades { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.grade { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 12px 6px; border-radius: 16px; background: var(--chip); transition: transform 0.25s var(--spring), background 0.2s; }
.grade:active { transform: scale(0.95); }
.grade b { font-size: 15.5px; }
.grade span { font-size: 12.5px; color: var(--sec); white-space: nowrap; }
.grade.good { background: var(--ink); color: var(--paper); }
.grade.good span { color: color-mix(in srgb, var(--paper) 70%, transparent); }
.grade[disabled] { opacity: 0.5; }
.poll-f { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 12px; }
.poll .ai-foot { margin-top: 2px; }

/* Speaking */
.exam-q { border-radius: 22px; padding: 18px; background: linear-gradient(170deg, #121214 0%, #26262a 100%); color: #fff; display: flex; flex-direction: column; gap: 10px; }
.exam-q small { font-size: 12px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: rgba(255, 255, 255, 0.6); }
.exam-q p { font-size: 18px; font-weight: 600; line-height: 1.45; white-space: pre-line; }
.exam-q .btn.ghost { background: rgba(255, 255, 255, 0.12); color: #fff; }
.cue-card { border-radius: 22px; padding: 18px; background: var(--card); box-shadow: inset 0 0 0 1.5px var(--a-ink); white-space: pre-line; font-size: 16.5px; line-height: 1.55; }
.cue-card small { display: block; font-size: 12px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--sec); margin-bottom: 6px; }
.timer { display: inline-flex; align-items: center; height: 32px; padding: 0 12px; border-radius: 16px; background: var(--a-chip); font-weight: 700; font-size: 14.5px; font-variant-numeric: tabular-nums; }
.timer:empty { display: none; }
.exam-q .timer { background: rgba(255, 255, 255, 0.14); }
.timer.big { height: 44px; padding: 0 16px; border-radius: 22px; font-size: 20px; }
.timer.low { background: var(--a-ink); color: var(--a-paper); }
.timer.over { background: none; box-shadow: inset 0 0 0 1.5px var(--a-ink); }
.rec { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; align-items: center; gap: 14px; }
.rec-info { display: flex; flex-direction: column; min-width: 0; }
.rec-info b { font-size: 15.5px; }
.rec-time { font-size: 13px; color: var(--sec); font-variant-numeric: tabular-nums; }
.rec-btn { width: 64px; height: 64px; border-radius: 50%; background: var(--a-ink); color: var(--a-paper); display: grid; place-items: center; transition: transform 0.25s var(--spring), background 0.2s; }
.rec-btn svg { width: 26px; height: 26px; }
.rec-btn:active { transform: scale(0.92); }
.rec-btn[disabled] { background: var(--gray3); cursor: default; }
.rec-btn.on { animation: recPulse 1.4s ease-in-out infinite; }
@keyframes recPulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(120, 120, 128, 0.5); } 50% { box-shadow: 0 0 0 12px rgba(120, 120, 128, 0); } }
[data-state="working"] .rec-btn { animation: pulse 1s ease-in-out infinite; }
.rec-level { display: flex; align-items: center; gap: 3px; height: 34px; }
.rec-level i { width: 3px; height: calc(var(--h, 0.12) * 100%); border-radius: 2px; background: var(--a-ink); transition: height 0.08s; }
.pace { display: flex; flex-wrap: wrap; gap: 8px 22px; padding-bottom: 12px; border-bottom: 1px solid var(--hair); margin-bottom: 4px; }
.pace span { display: flex; flex-direction: column; font-size: 12.5px; color: var(--sec); font-weight: 600; }
.pace b { font-size: 24px; font-weight: 800; color: var(--a-ink); font-variant-numeric: tabular-nums; }
.verdict { gap: 14px; }
.fb-list { display: flex; flex-direction: column; gap: 14px; }
.fb { font-size: 15px; gap: 5px; }
.fb b { font-size: 13.5px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--sec); }
.fb p { white-space: pre-line; }
.fb ul { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 5px; }
.ups { display: flex; flex-direction: column; gap: 6px; }
.ups div { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; padding: 8px 12px; border-radius: 12px; background: var(--a-chip); }
.ups s { color: var(--sec); }
.ups span { font-weight: 600; }
.ups svg { width: 12px; height: 12px; color: var(--sec); }
.rewrite { margin: 0; padding: 14px 16px; border-radius: 16px; background: var(--emph); color: #fff; font-size: 15.5px; line-height: 1.55; white-space: pre-line; }
details.heard, details.ch-data, details.passage-again { border-radius: 16px; background: var(--a-chip); padding: 12px 14px; }
details.heard summary, details.ch-data summary, details.passage-again summary, .settings details summary { cursor: pointer; font-weight: 600; font-size: 14.5px; }
details.heard p { margin-top: 8px; font-size: 15px; line-height: 1.55; color: var(--soft); white-space: pre-line; }
.essay-view { white-space: pre-line; }
.qa { padding: 10px 0; border-top: 1px solid var(--hair); display: flex; flex-direction: column; gap: 2px; }
.qa:first-of-type { border-top: 0; }
.qa small { font-size: 12px; color: var(--sec); font-weight: 600; }
.qa b { font-size: 14.5px; }
.qa p { font-size: 15px; color: var(--soft); white-space: pre-line; }
.mk-plan { margin: 0; padding: 0; list-style: none; counter-reset: part; display: flex; flex-direction: column; gap: 10px; }
.mk-plan li { display: grid; grid-template-columns: 34px 1fr; column-gap: 12px; }
.mk-plan li::before { counter-increment: part; content: counter(part); grid-row: span 2; width: 34px; height: 34px; border-radius: 50%; background: var(--a-ink); color: var(--a-paper); display: grid; place-items: center; font-weight: 700; }
.mk-plan span { font-size: 14.5px; color: var(--soft); }
.app-player .lines { max-height: 300px; overflow-y: auto; padding: 4px 2px; scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, 0.3) transparent; }
.app-player .cue { cursor: default; font-size: clamp(18px, 2vw, 21px); }
.app-player .cue.now-line { color: #fff; }
.app-player .cue.past { color: rgba(255, 255, 255, 0.55); }
.app-player .w { cursor: pointer; }
.app-player .w:hover { color: #fff; }
.app-player .pl-controls .skip svg { width: 26px; height: 26px; }

/* Writing */
.essay-box { display: flex; flex-direction: column; gap: 8px; }
.field.essay-in { min-height: 320px; font-size: 16px; line-height: 1.65; resize: vertical; }
.qbox { white-space: pre-line; }
.chart { margin: 0; border-radius: 18px; background: var(--card); padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.chart figcaption { display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: baseline; font-size: 15px; }
.chart figcaption span { font-size: 13px; color: var(--sec); }
.ch { width: 100%; height: auto; display: block; overflow: visible; }
.ch.pie { max-width: 280px; margin: 0 auto; }
.ch text { fill: var(--sec); font: 600 12px var(--sans); }
.ch .lbl { fill: var(--a-ink); font-size: 12.5px; }
.ch .grid { stroke: var(--hair); stroke-width: 1; }
.ch .pie-l { fill: var(--a-ink); font-size: 13px; font-weight: 700; }
.ch .pie-l.on-ink { fill: var(--a-paper); }
.ch-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 13px; color: var(--soft); }
.ch-legend span { display: flex; align-items: center; gap: 6px; }
.ch-legend i { width: 14px; height: 14px; border-radius: 4px; box-shadow: inset 0 0 0 1px var(--hair); }
.tbl-wrap { overflow-x: auto; }
.tbl { width: 100%; border-collapse: collapse; font-size: 14.5px; font-variant-numeric: tabular-nums; }
.tbl th, .tbl td { padding: 8px 10px; text-align: right; border-bottom: 1px solid var(--hair); }
.tbl th:first-child { text-align: left; }
.tbl thead th { font-size: 12.5px; color: var(--sec); font-weight: 700; }
.tbl tbody th { font-weight: 600; }
.tbl.small { font-size: 14px; margin-top: 8px; }
.tbl code { font-size: 14px; }

/* Reading and Listening tests */
.test-bar { position: sticky; top: 64px; z-index: 30; display: flex; align-items: center; gap: 12px; padding: 10px 0; margin-bottom: 12px; background: color-mix(in srgb, var(--paper) 94%, transparent); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.tb-t { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.tb-t b { font-size: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tb-n { font-size: 13.5px; font-weight: 600; color: var(--sec); white-space: nowrap; font-variant-numeric: tabular-nums; }
.test-body { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.test-body > * { position: sticky; top: 132px; max-height: calc(100vh - 150px); overflow-y: auto; scrollbar-width: thin; }
.passage { font-size: 16.5px; line-height: 1.7; display: flex; flex-direction: column; gap: 14px; padding-right: 6px; }
.passage h2 { font-family: var(--sans); font-size: 24px; font-weight: 700; letter-spacing: -0.02em; }
.qpane { padding: 0 2px 20px; }
.qgroups { display: flex; flex-direction: column; gap: 22px; }
.qgroup { display: flex; flex-direction: column; gap: 12px; }
.qgroup h3 { font-size: 17px; font-weight: 700; }
.qg-title { font-weight: 700; font-size: 15.5px; }
.qg-ins { font-size: 14.5px; color: var(--soft); font-style: italic; }
.q { display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 10px; align-items: start; }
.q-n { width: 30px; height: 30px; border-radius: 50%; background: var(--a-chip); display: grid; place-items: center; font-size: 13.5px; font-weight: 700; }
.q:has(input:checked) .q-n, .q:has(.gap-in:not(:placeholder-shown)) .q-n { background: var(--a-ink); color: var(--a-paper); }
.q-body { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.q-t { font-size: 15.5px; line-height: 1.5; }
.mcq { display: flex; flex-direction: column; gap: 6px; }
.pickr { display: grid; grid-template-columns: 28px minmax(0, 1fr); align-items: center; gap: 10px; padding: 8px 12px; border-radius: 14px; background: var(--chip); font-size: 15px; transition: background 0.15s; }
.panel .pickr { background: var(--card); }
.pickr b { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; box-shadow: inset 0 0 0 1.5px var(--gray3); font-size: 13px; }
.pickr:has(input:checked) { box-shadow: inset 0 0 0 2px var(--a-ink); }
.pickr:has(input:checked) b { background: var(--a-ink); color: var(--a-paper); box-shadow: none; }
.gapline { line-height: 2.2; }
@media (max-width: 980px) {
  .test-bar { top: 64px; }
  .test-body { display: block; }
  .test-body > * { position: static; max-height: none; overflow: visible; }
  .test-body[data-pane="passage"] .qpane, .test-body[data-pane="qs"] .passage { display: none; }
  .tb-n { display: none; }
}
.score { display: flex; flex-direction: column; gap: 12px; }
.sc-band { display: flex; align-items: baseline; gap: 12px; }
.sc-band b { font-family: var(--display); font-size: 72px; font-weight: 800; letter-spacing: -0.05em; line-height: 0.9; }
.sc-band span { font-weight: 600; color: var(--sec); }
.sc-facts { display: flex; flex-wrap: wrap; gap: 8px 26px; }
.sc-facts span { display: flex; flex-direction: column; font-size: 12.5px; color: var(--sec); font-weight: 600; }
.sc-facts b { font-size: 22px; color: var(--a-ink); font-variant-numeric: tabular-nums; }
.review { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.review li { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 12px; padding: 12px 0; border-top: 1px solid var(--hair); }
.review li:first-child { border-top: 0; }
.rv-i svg { width: 26px; height: 26px; padding: 6px; border-radius: 50%; }
.review .ok .rv-i svg { background: var(--a-ink); color: var(--a-paper); }
.review .no .rv-i svg { box-shadow: inset 0 0 0 1.5px var(--gray); color: var(--gray); }
.rv-q { font-size: 15px; }
.rv-a { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 14.5px; color: var(--soft); margin-top: 4px; }
.rv-a b { color: var(--a-ink); }
.rv-x { font-size: 14px; color: var(--sec); margin-top: 4px; }
.ctx { font-size: 16px; font-style: italic; color: var(--soft); }
.script { display: flex; flex-direction: column; gap: 4px; max-height: 420px; overflow-y: auto; }
.script p { display: grid; grid-template-columns: 90px minmax(0, 1fr); gap: 10px; padding: 6px 8px; border-radius: 10px; font-size: 15px; line-height: 1.5; cursor: pointer; transition: background 0.2s; }
.script p:hover { background: var(--a-chip); }
.script b { font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; }
.script p.now-line { background: var(--a-ink); color: var(--a-paper); }
@media (max-width: 520px) { .script p { grid-template-columns: 1fr; gap: 0; } }

/* Tutor */
.tutor { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 16px; align-items: start; margin-top: 20px; }
.chats { position: sticky; top: 84px; max-height: calc(100vh - 110px); overflow-y: auto; }
.chat-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.chat-list a { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border-radius: 14px; color: var(--a-ink); text-decoration: none; }
.chat-list a:hover { background: var(--card); }
.chat-list a[aria-current="page"] { background: var(--a-ink); color: var(--a-paper); }
.chat-list b { font-size: 14.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-list span { font-size: 12.5px; opacity: 0.65; }
.live-chat { min-height: calc(100vh - 150px); padding: 18px; }
.live-chat .title { font-size: 22px; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.live-chat .c-head { flex-wrap: nowrap; }
.live-chat .c-list { flex: 1; overflow-y: auto; max-height: calc(100vh - 300px); padding-right: 4px; }
.live-chat .bub { max-width: 86%; }
.live-chat .bub small { white-space: normal; }
.live-chat .c-chips button { white-space: normal; text-align: left; height: auto; min-height: 38px; padding: 8px 14px; line-height: 1.3; }
.c-input.real { margin-top: auto; align-items: flex-end; }
.c-input.real textarea { flex: 1; min-height: 48px; max-height: 160px; border-radius: 24px; padding: 13px 18px; resize: none; line-height: 1.35; }
.c-input .send { width: 48px; height: 48px; border-radius: 50%; background: var(--a-ink); color: var(--a-paper); display: grid; place-items: center; flex: none; transition: transform 0.25s var(--spring); }
.c-input .send svg { width: 18px; height: 18px; transform: rotate(180deg); }
.c-input .send:active { transform: scale(0.9); }
.typing-dots { display: inline-flex; gap: 5px; padding: 4px 2px; }
.typing-dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--a-ink); animation: dots 1s ease-in-out infinite; }
.typing-dots i:nth-child(2) { animation-delay: 0.15s; } .typing-dots i:nth-child(3) { animation-delay: 0.3s; }
.live-chat .err { align-self: stretch; }
@media (max-width: 980px) {
  .tutor { display: block; margin-top: 12px; }
  .tutor:not(.has-chat) .live-chat { display: none; }
  .tutor.has-chat .chats { display: none; }
  .chats { position: static; max-height: none; }
  .tutor:not(.has-chat) .chats .row-between + .chat-list { margin-top: 4px; }
  .live-chat { min-height: calc(100vh - 190px); }
  .live-chat .c-list { max-height: none; }
}
@media (min-width: 981px) { .tutor:not(.has-chat) .live-chat { display: flex; } }
.tutor:not(.has-chat) .chats + .live-chat .c-head .back { display: none !important; }

/* Progress */
.est { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 14px 22px; align-items: start; margin-bottom: 14px; }
.est-main { display: flex; flex-direction: column; gap: 4px; padding: 6px 4px; }
.est-main .k { font-size: 13px; font-weight: 600; color: var(--sec); }
.est-main b { font-family: var(--display); font-size: 88px; font-weight: 800; letter-spacing: -0.05em; line-height: 0.95; }
.est-main .f { font-size: 13.5px; color: var(--sec); }
.est-skills { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.est-s { display: grid; grid-template-columns: 36px 1fr auto; align-items: center; gap: 4px 10px; padding: 12px; border-radius: 18px; background: var(--card); color: var(--a-ink); text-decoration: none; }
.est-s b { font-size: 22px; font-weight: 800; font-variant-numeric: tabular-nums; }
.es-n { font-weight: 600; font-size: 15px; }
.est-s .spark, .est-s .spark-empty { grid-column: 1 / -1; }
.est .fine { grid-column: 1 / -1; }
.spark { width: 100%; height: 64px; display: block; }
.spark .target { stroke: var(--gray); stroke-width: 1.4; stroke-dasharray: 4 4; }
.spark-empty { font-size: 12.5px; color: var(--sec); padding: 6px 0; }
.prog { margin-bottom: 14px; }
.week { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; height: 74px; align-items: end; margin-top: auto; }
.wk { display: flex; flex-direction: column; align-items: center; gap: 4px; height: 100%; justify-content: flex-end; }
.wk i { width: 100%; max-width: 18px; height: calc(4px + var(--h) * 50px); border-radius: 5px; background: var(--a-ink); }
.wk span { font-size: 11px; color: var(--sec); font-weight: 600; }
.totals { display: flex; flex-wrap: wrap; gap: 10px 26px; margin: 4px 0 12px; }
.totals span { display: flex; flex-direction: column; font-size: 13px; color: var(--sec); font-weight: 600; }
.totals b { font-size: 24px; color: var(--a-ink); font-variant-numeric: tabular-nums; }
@media (max-width: 860px) { .est { grid-template-columns: 1fr; } .est-main b { font-size: 72px; } }
@media (max-width: 520px) { .est-skills { grid-template-columns: 1fr; } }

/* Settings and admin */
.settings .panel { padding: 20px; }
.kv { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 14px; background: var(--card); font-size: 15px; }
.kv span { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.kv svg { width: 18px; height: 18px; }
.admin-tiles .v b.small { font-size: 26px; }
.bars30 { display: grid; grid-template-columns: repeat(30, 1fr); gap: 3px; height: 110px; align-items: end; margin: 6px 0 16px; }
.bars30 div { height: 100%; display: flex; align-items: flex-end; }
.bars30 i { width: 100%; height: calc(3px + var(--h) * 100%); border-radius: 3px; background: var(--a-ink); }
.list { display: flex; flex-direction: column; gap: 8px; }
.item { border-radius: 16px; background: var(--chip); padding: 12px 14px; display: flex; flex-direction: column; gap: 6px; font-size: 14.5px; }
.item .top { position: static; height: auto; padding: 0; background: none; border: 0; -webkit-backdrop-filter: none; backdrop-filter: none; display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.item .top b { font-size: 15.5px; overflow-wrap: anywhere; }
.item .meta { font-size: 13px; color: var(--sec); }
.item .acts { display: flex; gap: 6px; flex-wrap: wrap; }
.item .acts button { height: 34px; padding: 0 14px; border-radius: 17px; background: var(--card); font-size: 13.5px; font-weight: 600; }
.badges { display: flex; gap: 4px; }
.badge { height: 24px; padding: 0 9px; border-radius: 12px; background: var(--a-chip); display: inline-flex; align-items: center; font-size: 12px; font-weight: 700; }
.badge.on { background: var(--a-ink); color: var(--a-paper); }
.badge.off { box-shadow: inset 0 0 0 1.5px var(--gray); background: none; color: var(--sec); }
.made { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 10px; }
.made code { font-size: 18px; font-weight: 700; padding: 6px 12px; border-radius: 10px; background: var(--card); }
.made .field { flex: 1; min-width: 200px; height: 44px; }

@media (max-width: 640px) {
  .page-head { margin: 16px 0 16px; }
  .panel { border-radius: 24px; }
  .band-pick { grid-template-columns: repeat(4, 1fr); }
  .grades { grid-template-columns: 1fr 1fr; }
  .rec { grid-template-columns: 64px minmax(0, 1fr); }
  .rec-level { grid-column: 1 / -1; height: 24px; }
  .w-nav .btn { min-height: 50px; padding: 0 20px; }
  .test-bar { gap: 8px; }
  .sc-band b { font-size: 60px; }
}
@media (prefers-reduced-motion: reduce) { .view { animation: none; } }

/* Beyond the browser: the installed app and NZT inside Telegram */
.update-bar { position: fixed; left: 50%; bottom: 28px; z-index: 95; display: flex; align-items: center; gap: 14px; max-width: calc(100% - 32px); padding: 10px 10px 10px 18px; border-radius: 18px; background: var(--ink); color: var(--paper); font-size: 15px; font-weight: 600; box-shadow: 0 20px 50px -14px rgba(0, 0, 0, 0.4); transform: translateX(-50%); animation: barUp 0.45s var(--spring); }
@keyframes barUp { from { opacity: 0; transform: translate(-50%, 18px); } to { opacity: 1; transform: translate(-50%, 0); } }
.update-bar .btn { background: var(--paper); color: var(--ink); flex: none; }
@media (max-width: 980px) { .update-bar { bottom: calc(92px + env(safe-area-inset-bottom)); } }
.app-card { display: flex; gap: 14px; align-items: flex-start; }
.app-card .ac-ic { flex: none; width: 44px; height: 44px; border-radius: 14px; background: var(--ink); color: var(--paper); display: grid; place-items: center; }
.app-card .ac-ic svg { width: 22px; height: 22px; }
.app-card .row { margin-top: 10px; }
.via { display: inline-flex; align-items: center; gap: 8px; border-radius: 999px; background: var(--chip); padding: 8px 14px; font-size: 14.5px; font-weight: 600; }
.via svg { width: 16px; height: 16px; }
.info.warn { box-shadow: inset 3px 0 0 var(--ink); }
.chipb svg { width: 15px; height: 15px; margin-right: 6px; vertical-align: -2px; }
.chipb:disabled { opacity: 0.45; cursor: not-allowed; }
.stack-sm { display: flex; flex-direction: column; gap: 8px; margin-top: 6px; }
.tg-btn { background: var(--ink); color: var(--paper); }
/* Inside Telegram: Telegram has its own back button, theme and close button, so NZT's are hidden. */
.in-tg .theme, .in-tg .home-link { display: none !important; }
.in-tg .top { height: 56px; }
/* Installed on a phone: clear the notch when the window runs under it. */
@media (display-mode: standalone) {
  .top { padding-top: env(safe-area-inset-top); height: calc(64px + env(safe-area-inset-top)); }
  .home-link { display: none; }
}

/* Free and Premium */
.cred-pill.pro { background: var(--ink); color: var(--paper); }
.cr-go { display: inline-flex; align-items: center; gap: 6px; align-self: flex-start; height: 34px; padding: 0 14px; border-radius: 999px; background: var(--ink); color: var(--paper); font-size: 13.5px; font-weight: 700; }
.cr-go svg { width: 14px; height: 14px; }
.pm-on { display: flex; gap: 14px; align-items: center; margin-bottom: 18px; }
.pm-on > svg { flex: none; width: 26px; height: 26px; }
.pm-grid { align-items: start; }
.pm-tbl td, .pm-tbl th { white-space: nowrap; }
.pm-tbl tbody th { white-space: normal; }
.pm-plans { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 6px 0 16px; }
.pm-plan { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 4px; padding: 16px 14px 14px; border: 0; border-radius: 20px; background: var(--card); color: var(--ink); text-align: left; font: inherit; cursor: pointer; box-shadow: inset 0 0 0 1.5px var(--line); transition: box-shadow 0.2s, transform 0.25s var(--spring); }
.pm-plan:active { transform: scale(0.98); }
.pm-plan[aria-checked="true"] { box-shadow: inset 0 0 0 2.5px var(--ink); }
.pm-plan .pm-n { font-size: 14px; font-weight: 600; color: var(--soft); }
.pm-plan b { font-size: 19px; font-variant-numeric: tabular-nums; line-height: 1.2; }
.pm-plan .pm-m { font-size: 12.5px; color: var(--sec); }
.pm-plan .pm-save { position: absolute; top: -9px; right: 10px; height: 20px; padding: 0 8px; border-radius: 10px; background: var(--ink); color: var(--paper); font-size: 11.5px; font-weight: 700; display: inline-flex; align-items: center; }
.pm-pay { display: flex; flex-direction: column; gap: 10px; margin-bottom: 10px; }
.pm-plans.one { grid-template-columns: minmax(0, 1fr); }
.pm-plans.one .pm-plan { cursor: default; }
.pm-agree { align-items: flex-start; margin: 0 0 14px; font-size: 14px; font-weight: 500; line-height: 1.45; color: var(--soft); }
.pm-agree input { flex: none; margin-top: 0; }
@media (max-width: 520px) { .pm-plans { grid-template-columns: 1fr; } .pm-plan { flex-direction: row; flex-wrap: wrap; align-items: baseline; column-gap: 10px; } .pm-plan .pm-m { flex-basis: 100%; } }
.pm-tease .ac-ic { background: var(--ink); }
.ad-uses { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.ad-uses label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 600; color: var(--soft); }
.badge svg { width: 12px; height: 12px; margin-right: 4px; }
