/* Story Verifier screens (/verify). Shared by VerifyList and VerifyStory, so not scoped. */

/* Phone-only and desktop-only pieces of the verifier screens (My work, a text check, a recording check). */
@media (min-width: 641px) { .vf-mob { display: none !important; } }
@media (max-width: 640px) { .vf-desk { display: none !important; } }

.vf-page { display: flex; flex-direction: column; gap: 16px; max-width: 1200px; }
.vf-narrow { max-width: 560px; }
.vf-stack-6 { display: flex; flex-direction: column; gap: 6px; }
.vf-stack-8 { display: flex; flex-direction: column; gap: 8px; }
.vf-h1 { font-size: 1.5rem; font-weight: 700; margin: 0; color: var(--adm-text); }
.vf-muted { color: var(--adm-muted); margin: 0; }
.vf-small { font-size: .85rem; }
.vf-big { font-size: 1.75rem; font-weight: 700; color: var(--adm-text); }
.vf-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.vf-center { text-align: center; }
.vf-right { text-align: right; }
.vf-spacer { flex: 1; }
.vf-end { align-self: flex-end; }

.vf-card {
    background: var(--adm-surface);
    border: 1px solid var(--adm-border);
    border-radius: var(--adm-radius);
    padding: 20px;
}

.vf-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; }

/* ── Buttons ──────────────────────────────────────────────────────────── */
.vf-btn {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 7px 14px; border-radius: 10px;
    border: 1px solid var(--adm-border); background: var(--adm-surface);
    color: var(--adm-text); font-weight: 600; text-decoration: none; cursor: pointer; white-space: nowrap;
}
.vf-btn:hover { background: var(--adm-panel); color: var(--adm-text); }
.vf-btn--primary { background: var(--t-brand); border-color: var(--t-brand); color: var(--t-brand-on); }
.vf-btn--primary:hover { background: var(--t-brand-strong); color: var(--t-brand-on); }
.vf-btn--ghost { border-color: transparent; background: transparent; }
.vf-btn:disabled { opacity: .5; cursor: default; }

/* ── Language picker ──────────────────────────────────────────────────── */
.vf-picker { display: flex; flex-direction: column; gap: 18px; margin: 24px auto; }
.vf-options { display: flex; flex-direction: column; gap: 8px; border: 0; padding: 0; margin: 0; }
.vf-option {
    display: flex; align-items: center; gap: 12px; padding: 12px 14px;
    border: 1px solid var(--adm-border); border-radius: 12px; cursor: pointer;
}
.vf-option--on { border-color: var(--t-brand); background: var(--t-brand-soft); }
.vf-option input { accent-color: var(--t-brand); }
.vf-option__text { display: flex; flex-direction: column; }
.vf-option__name { font-weight: 600; color: var(--adm-text); }

.vf-langpick { display: flex; flex-direction: column; gap: 4px; }
.vf-langpick select {
    padding: 7px 10px; border-radius: 10px; border: 1px solid var(--adm-border);
    background: var(--adm-surface); color: var(--adm-text); font-weight: 600;
}

/* ── Progress + filters ───────────────────────────────────────────────── */
.vf-progress { display: flex; flex-direction: column; gap: 10px; }
.vf-progress__count { display: flex; align-items: baseline; gap: 8px; }
.vf-progress__meta { display: flex; gap: 18px; }
.vf-bar { height: 8px; border-radius: 99px; background: var(--adm-panel); overflow: hidden; }
.vf-bar__fill { height: 100%; background: var(--t-success); border-radius: 99px; }

.vf-filters { display: flex; gap: 8px; flex-wrap: wrap; }
.vf-chip {
    padding: 6px 12px; border-radius: 99px; border: 1px solid var(--adm-border);
    background: var(--adm-surface); color: var(--adm-text); font-size: .9rem; cursor: pointer;
}
.vf-chip--on { background: var(--t-brand-soft); border-color: var(--t-brand); font-weight: 600; }

/* ── Story table ──────────────────────────────────────────────────────── */
.vf-tablewrap { padding: 0; overflow-x: auto; }
.vf-table { width: 100%; border-collapse: collapse; }
.vf-table th {
    text-align: left; font-size: .8rem; font-weight: 600; color: var(--adm-muted);
    padding: 10px 14px; border-bottom: 1px solid var(--adm-border); white-space: nowrap;
}
.vf-table td { padding: 10px 14px; border-bottom: 1px solid var(--adm-border); vertical-align: middle; }
.vf-table tr:last-child td { border-bottom: 0; }
.vf-table th.vf-center { text-align: center; }
.vf-num { width: 44px; }
.vf-title { font-weight: 600; color: var(--adm-text); }
.vf-localtitle { display: block; }
.vf-done {
    display: inline-block; margin-left: 8px; padding: 1px 8px; border-radius: 99px;
    background: var(--t-success-soft); color: var(--t-success); font-size: .75rem; font-weight: 600;
}

.vf-state { display: inline-block; min-width: 1.2em; text-align: center; font-weight: 700; }
.vf-state--ok { color: var(--t-success); }
.vf-state--changed { color: var(--t-warn); }
.vf-state--todo { color: var(--adm-muted); }
.vf-state--none { color: var(--t-text-subtle); }

.vf-legend { display: flex; gap: 18px; flex-wrap: wrap; }

/* ── Story page ───────────────────────────────────────────────────────── */
.vf-story { padding-bottom: 96px; }
.vf-crumbs { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.vf-crumbs > a { color: var(--adm-muted); text-decoration: none; font-weight: 600; }
.vf-crumbs__nav { display: flex; gap: 4px; }
.vf-langtag { padding: 6px 12px; border-radius: 99px; background: var(--t-brand-soft); color: var(--adm-text); }

.vf-tabs { display: flex; gap: 6px; flex-wrap: wrap; border-bottom: 1px solid var(--adm-border); }
.vf-tab {
    display: inline-flex; align-items: center; gap: 8px; padding: 9px 14px;
    border: 0; border-bottom: 3px solid transparent; background: transparent;
    color: var(--adm-muted); font-weight: 600; cursor: pointer;
}
.vf-tab--on { color: var(--adm-text); border-bottom-color: var(--adm-tab-active); }

/* How-to-check panel: three steps, then the three marks a verifier must not change. */
.vf-guide { background: var(--adm-surface); border: 2px solid var(--t-brand); border-radius: var(--adm-radius); overflow: hidden; }
.vf-guide--min { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding: 10px 20px; }
.vf-guide__summary { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.vf-guide__head {
    display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap;
    padding: 14px 20px; background: var(--t-brand-soft);
}
.vf-guide__title { margin: 0; font-size: 1.2rem; font-weight: 800; color: var(--adm-text); }
.vf-guide__steps { list-style: none; margin: 0; padding: 20px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.vf-guide__steps li { display: flex; gap: 12px; }
.vf-guide__steps strong { display: block; margin-bottom: 6px; color: var(--adm-text); }
.vf-guide__steps span { font-size: .9rem; color: var(--adm-muted); line-height: 1.55; }
.vf-guide__steps b { color: var(--adm-text); }
.vf-guide__keep { padding: 0 20px 20px; display: flex; flex-direction: column; gap: 12px; }
.vf-guide__keeptitle { margin: 0; font-size: 1rem; font-weight: 800; color: var(--adm-text); display: flex; align-items: center; gap: 8px; }
.vf-guide__keeptitle i { color: var(--t-danger); }

.vf-rules { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.vf-rule { border: 1px solid var(--adm-border); border-radius: 12px; padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.vf-rule__head { display: flex; align-items: center; gap: 10px; color: var(--adm-text); }
.vf-rule__mark { font-size: 1.15rem; }
.vf-rule__text { font-size: .9rem; color: var(--adm-muted); }
.vf-rule__text b { color: var(--adm-text); }
.vf-ex { display: flex; gap: 8px; align-items: baseline; padding: 8px 10px; border-radius: 8px; font-size: .9rem; line-height: 1.6; color: var(--adm-text); }
.vf-ex--ok { background: var(--t-success-soft); }
.vf-ex--bad { background: var(--t-danger-soft); }
.vf-ok { color: var(--t-success); font-weight: 700; }
.vf-bad { color: var(--t-danger); font-weight: 700; }
.vf-strike { text-decoration: line-through; text-decoration-color: var(--t-danger); }
.vf-fn { font-weight: 800; color: var(--t-info); }

/* Step numbers tie the panel to the column or bar where each step happens. */
.vf-step {
    display: inline-flex; align-items: center; justify-content: center; flex: none;
    width: 28px; height: 28px; border-radius: 50%;
    background: var(--adm-text); color: var(--adm-surface); font-weight: 800; font-size: .95rem;
}
.vf-step--sm { width: 24px; height: 24px; font-size: .8rem; }
.vf-step--done { background: var(--t-success); color: var(--adm-surface); }
.vf-btn--sm { padding: 5px 12px; font-size: .9rem; }
.vf-alert {
    padding: 10px 14px; border-radius: 12px; background: var(--t-danger-soft); color: var(--t-danger); font-weight: 600;
}

.vf-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
.vf-cols.vf-cols--single, .m-split2.vf-cols--single { grid-template-columns: 1fr; }
.vf-cols--single > div { width: 100%; }
.vf-col { display: flex; flex-direction: column; gap: 14px; }
.vf-col--edit { border-color: var(--t-brand); }
.vf-col__head { display: flex; justify-content: space-between; align-items: center; }
.vf-col__lang { font-weight: 700; font-size: 1.05rem; color: var(--adm-text); }
.vf-col__name { display: flex; align-items: center; gap: 10px; }
.vf-saved { color: var(--t-success); }

.vf-field { display: flex; flex-direction: column; gap: 6px; margin: 0; }
.vf-label { font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--adm-muted); }
.vf-readonly { margin: 0; color: var(--adm-text); }
.vf-prose { color: var(--adm-text); line-height: 1.7; }
.vf-prose p { margin: 0 0 1em; }
.vf-input {
    width: 100%; padding: 9px 12px; border-radius: 10px; border: 1px solid var(--adm-border);
    background: var(--adm-panel-elevated); color: var(--adm-text); font: inherit; line-height: 1.7;
}
.vf-input:focus { outline: 2px solid var(--t-ring-strong); outline-offset: 1px; }
.vf-grow { field-sizing: content; resize: vertical; }
.vf-storytext { min-height: 16em; }
.vf-empty { padding: 14px; border-radius: 10px; background: var(--adm-panel); color: var(--adm-muted); }

.vf-dir {
    display: inline-block; padding: 0 6px; border-radius: 6px;
    background: var(--adm-panel); color: var(--adm-muted); font-size: .85em; font-style: italic;
}
.vf-ar { font-family: 'Amiri', serif; font-size: 1.15em; unicode-bidi: isolate; }

.vf-bottombar {
    position: sticky; bottom: 0; z-index: 5;
    display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
    padding: 14px 20px; border-radius: var(--adm-radius);
    background: var(--adm-surface); border: 1px solid var(--adm-border); box-shadow: var(--t-shadow);
}

/* Native checkbox kept for keyboard and screen readers, drawn as a switch. */
.vf-switch { position: relative; display: inline-flex; align-items: center; gap: 12px; cursor: pointer; margin: 0; }
.vf-switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.vf-switch__track {
    position: relative; width: 46px; height: 26px; border-radius: 99px;
    background: var(--adm-panel); border: 1px solid var(--adm-border); transition: background .15s;
}
.vf-switch__thumb {
    position: absolute; top: 2px; left: 2px; width: 20px; height: 20px; border-radius: 50%;
    background: var(--adm-surface); box-shadow: var(--t-shadow); transition: left .15s;
}
.vf-switch input:checked + .vf-switch__track { background: var(--t-success); border-color: var(--t-success); }
.vf-switch input:checked + .vf-switch__track .vf-switch__thumb { left: 22px; }
.vf-switch input:focus-visible + .vf-switch__track { outline: 2px solid var(--t-ring-strong); outline-offset: 2px; }
.vf-switch__text { display: flex; flex-direction: column; }
.vf-switch--off { opacity: .5; cursor: default; }
/* Waiting to be switched on: outlined so step 3 is the obvious next thing to do. */
.vf-switch--todo, .vf-switch--done { padding: 6px 14px 6px 8px; border-radius: 12px; }
.vf-switch--todo { border: 2px dashed var(--t-brand); background: var(--t-brand-soft); }
.vf-switch--done { border: 2px solid var(--t-success); background: var(--t-success-soft); }
.vf-switch--done strong { color: var(--t-success); }

.vf-hint { font-size: .95rem; color: var(--adm-muted); }
.vf-hint strong { color: var(--adm-text); }
.vf-next { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.vf-skip {
    border: 0; background: none; padding: 0; cursor: pointer;
    font: inherit; font-size: .82rem; color: var(--adm-muted); text-decoration: underline;
}
.vf-skip:hover { color: var(--adm-text); }

@media (max-width: 900px) {
    .vf-cols, .vf-guide__steps, .vf-rules { grid-template-columns: 1fr; }
    .vf-next { align-items: flex-start; }
}

.vf-nbr{max-width:220px;} .vf-nbr{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}

/* ── Phone: checking a text ─────────────────────────────────────────────
   One sticky header (back, story, Saved, ⋯, four age buttons), a one-line guide, the story as tappable
   paragraphs, and a one-row bar. While a paragraph is open the age buttons and the bar step aside. */
.vf-mhead { position: sticky; top: 0; z-index: 20; background: var(--surface); border-bottom: 1px solid var(--line); }
.vf-mhead__bar { height: 60px; display: flex; align-items: center; gap: 2px; padding: 0 4px; }
.vf-mhead__ib { width: 44px; height: 44px; flex: none; display: grid; place-items: center; border: 0; border-radius: var(--r-md); background: transparent; color: var(--ink); text-decoration: none; padding: 0; cursor: pointer; }
.vf-mhead__ib:hover { color: var(--ink); background: var(--surface-2); }
.vf-mhead__t { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
.vf-mhead__t b { font-size: 17px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-align: left; }
.vf-mhead__t span { font-size: var(--fs-xs); color: var(--muted); }
.vf-mhead__saved { display: inline-flex; align-items: center; gap: 3px; padding: 0 2px; font-size: var(--fs-xs); font-weight: 600; color: var(--success); }
.vf-mhead__menuwrap { position: relative; }
.vf-mmenu-backdrop { position: fixed; inset: 0; z-index: 30; }
.vf-mmenu { position: absolute; right: 4px; top: 46px; z-index: 31; min-width: 240px; max-width: calc(100vw - 24px); padding: 6px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-3); display: flex; flex-direction: column; }
.vf-mmenu__item { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 8px 10px; border: 0; border-radius: var(--r-md); background: transparent; color: var(--ink); font: inherit; font-size: var(--fs-md); text-align: left; text-decoration: none; cursor: pointer; }
.vf-mmenu__item:hover { background: var(--surface-2); color: var(--ink); }
.vf-mmenu__item span { display: flex; flex-direction: column; min-width: 0; }
.vf-mmenu__item small { color: var(--muted); font-size: var(--fs-xs); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vf-mages { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; padding: 0 12px 10px; }
.vf-mage { height: 44px; display: flex; align-items: center; justify-content: center; gap: 3px; padding: 0; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface-2); color: var(--ink-2); font: inherit; font-size: var(--fs-md); font-weight: 600; cursor: pointer; }
.vf-mage.is-done { background: var(--success-soft); border-color: var(--success-line); color: var(--success); }
.vf-mage.is-changed { background: var(--warn-soft); border-color: var(--warn-line); color: var(--warn); }
.vf-mage.is-none { color: var(--subtle); }
.vf-mage.is-on { background: var(--surface); border: 2px solid var(--ink); color: var(--ink); }
.vf-mguide { display: flex; align-items: center; gap: 10px; padding: 6px 4px 6px 12px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); font-size: var(--fs-sm); color: var(--ink-2); }
.vf-mguide > .i { color: var(--info); flex: none; }
.vf-mguide__text { flex: 1; min-width: 0; }
.vf-mguide .m-btn { color: var(--info); flex: none; }
.vf-mread { display: flex; flex-direction: column; gap: 2px; }
.vf-mread__hint { display: flex; align-items: center; gap: 6px; margin: 0 0 6px; font-size: var(--fs-xs); font-weight: 600; color: var(--brand-text); }
.vf-mpara { display: block; width: 100%; padding: 6px 10px; border: 0; border-radius: var(--r-md); background: transparent; color: var(--ink); font: inherit; font-size: 1.05rem; line-height: 1.8; text-align: start; white-space: pre-line; cursor: pointer; }
.vf-mpara:hover, .vf-mpara:focus-visible { background: var(--brand-soft); box-shadow: inset 0 0 0 1px var(--brand-line); outline: none; }
[dir="rtl"] .vf-mpara, .vf-mread:lang(ar) .vf-mpara { font-family: var(--font-arabic); font-size: 1.3rem; line-height: 1.85; }
.vf-medit { display: block; width: 100%; min-height: 40vh; padding: 8px 12px; border: 2px solid var(--brand); border-radius: var(--r-lg); background: var(--surface); color: var(--ink); font: inherit; font-size: 1.05rem; line-height: 1.8; resize: vertical; field-sizing: content; }
.vf-mread:lang(ar) .vf-medit { font-family: var(--font-arabic); font-size: 1.25rem; }
.vf-medit:focus { outline: none; box-shadow: 0 0 0 3px var(--focus); }
.vf-meditbar { position: sticky; bottom: 0; z-index: 20; display: flex; align-items: center; gap: 8px; padding: 8px 12px; background: var(--surface); border-top: 1px solid var(--line); box-shadow: var(--shadow-up); }
.vf-meditbar__note { flex: 1; min-width: 0; font-size: var(--fs-sm); color: var(--muted); }
.vf-mbar { display: flex; align-items: center; gap: 8px; width: 100%; }
.vf-mbar .m-btn { height: 48px; font-size: 15px; }
.vf-mbar__go { flex: 1; justify-content: center; }

@media (max-width: 640px) {
    .vf-guide--mclosed { display: none; }
    .vf-step { background: var(--inverse-bg); color: var(--inverse-fg); }
    .m-savebar-wrap:has(.vf-bottombar) { position: sticky; bottom: 0; margin: 0; z-index: 20; }
    .m-savebar-wrap.vf-editing { display: none; }
    .m-savebar.vf-bottombar { flex-wrap: nowrap; gap: 8px; padding: 12px 16px; border-radius: 0; background: var(--surface); color: var(--ink); border: 0; border-top: 1px solid var(--line); box-shadow: var(--shadow-up); }
    .m-savebar.vf-bottombar .m-btn--ghost { color: var(--ink-2); }
    .vf-cols--single .m-split2__head { display: none; }
    /* English labels inside a right-to-left column keep their punctuation where it belongs. */
    .vf-cols [dir="rtl"] .m-field > .m-label, .vf-cols [dir="rtl"] .vf-onceonly { direction: ltr; text-align: left; }
    .vf-storytext { display: none; }
}

/* Age tabs: the selected one is a filled pill lifted off the app bar's bottom line, so it reads at a glance. */
.vf-agetabs .m-tabs { gap: 6px; padding: 4px 12px 8px; }
.vf-agetabs .m-tab { height: 34px; padding: 0 14px; border-radius: var(--r-md); }
.vf-agetabs .m-tab::after { display: none; }
.vf-agetabs .m-tab[aria-selected="true"] { background: var(--brand-soft); color: var(--brand-text); box-shadow: inset 0 0 0 1.5px var(--brand); }
