@charset "UTF-8";
:root {
    --ink:#233c39;
    --muted:#6b7972;
    --green:#365e50;
    --green-dark:#284b3e;
    --accent:#b56d50;
    --border:rgba(63,82,66,.13);
    --glass:rgba(255,255,251,.50);
    --serif:Georgia,"Times New Roman",serif;
    font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Arial,sans-serif;
    color:var(--ink);
    font-size:15px;
    font-synthesis:none;
    color-scheme:light
}

* {
    box-sizing:border-box
}

body {
    margin:0;
    background:#f4f1e9;
    min-height:100vh
}

button,input {
    font:inherit
}

button,a,input,label {
    -webkit-tap-highlight-color:transparent
}

button {
    cursor:pointer
}

button:disabled {
    cursor:not-allowed
}

.search-button:disabled {
    cursor:wait
}

button,a {
    touch-action:manipulation
}

a {
    color:inherit
}

button {
    color:inherit
}

svg {
    width:20px;
    height:20px;
    fill:none;
    stroke:currentColor;
    stroke-width:1.6;
    stroke-linecap:round;
    stroke-linejoin:round;
    vertical-align:middle
}

button svg {
    pointer-events:none
}

button {
    border:0
}

button:focus-visible,a:focus-visible,input:focus-visible {
    outline:3px solid #ab755b;
    outline-offset:4px
}

button {
    transition:background .18s,transform .18s,box-shadow .18s
}

button:active {
    transform:translateY(1px)
}

[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
}

.landscape {
    position:fixed;
    inset:0;
    z-index:0;
    background-image:linear-gradient(180deg,rgba(248,246,240,.2),rgba(248,246,240,.05) 40%,rgba(245,243,234,.2)),var(--scene-image);
    background-size:cover;
    background-position:center bottom;
    pointer-events:none
}

.site-shell {
    position:relative;
    z-index:1;
    max-width:1264px;
    padding:0 48px 36px;
    margin:auto
}

.masthead {
    height:90px;
    display:flex;
    align-items:center;
    justify-content:space-between
}

.wordmark {
    display:flex;
    align-items:center;
    gap:12px;
    text-decoration:none;
    font-family:var(--serif);
    font-size:29px;
    letter-spacing:-1px;
    font-weight:700
}

.wordmark-light {
    font-weight:400
}

.brand-dot {
    color:var(--accent)
}

.brand-mark {
    display:grid;
    place-items:center;
    width:38px;
    height:42px;
    border:1px solid #aab4a3;
    border-radius:12px 12px 12px 3px;
    font-size:28px;
    line-height:1;
    font-weight:400;
    color:var(--green)
}

.masthead-note {
    color:#64776c;
    font-size:12px;
    letter-spacing:.04em
}

.ad-area {
    width:min(970px,100%);
    margin:0 auto 33px;
    text-align:center
}

.ad-label {
    display:block;
    font-size:9px;
    letter-spacing:.2em;
    color:#8a8d80;
    margin-bottom:8px
}

/* Match the supported ad-unit heights without cropping creative content. */
.ad-area { --banner-height:50px; }
.ad-slot {
    width:100%;
    min-height:var(--banner-height)
}
@media(min-width:500px) {
    .ad-area { --banner-height:60px; }
}
@media(min-width:800px) {
    .ad-area { --banner-height:90px; }
}

.ad-placeholder {
    height:90px;
    background:rgba(246,246,241,.65);
    border:1px dashed rgba(101,117,98,.3);
    border-radius:8px;
    display:flex;
    align-items:center;
    justify-content:center;
    gap:11px;
    color:#8c9487;
    font-size:12px
}

.ad-outline {
    width:24px;
    height:16px;
    border:1px solid #a5ad9d;
    border-radius:3px;
    position:relative
}

.ad-outline:after {
    content:"";
    position:absolute;
    left:4px;
    top:4px;
    width:14px;
    border-top:1px solid #a5ad9d
}

.ad-dimensions {
    border-left:1px solid #cbd0c3;
    padding-left:11px;
    font-size:10px;
    letter-spacing:.04em
}

#page {
    width:min(100%,1000px);
    margin:auto
}

.introduction {
    margin-bottom:28px;
    text-align:center
}

.eyebrow {
    font-size:10px;
    letter-spacing:.22em;
    font-weight:650;
    margin:0 0 14px;
    color:#657969;
    display:flex;
    justify-content:center;
    align-items:center;
    gap:8px
}

.eyebrow>span {
    width:5px;
    height:5px;
    border-radius:50%;
    background:var(--accent)
}

h1 {
    font:400 clamp(32px,4.2vw,48px)/1.16 var(--serif);
    letter-spacing:-1.6px;
    margin:0 0 12px
}

h1 em {
    font-weight:400;
    color:var(--accent)
}

.introduction>p:last-child {
    color:#6c7b70;
    font-size:13px;
    margin:0;
    line-height:1.6
}

.glass {
    background:var(--glass);
    border:1px solid rgba(255,255,255,.85);
    border-radius:24px;
    box-shadow:0 9px 44px rgba(51,66,46,.06),0 1px 3px rgba(51,66,46,.04);
    backdrop-filter:blur(18px);
    -webkit-backdrop-filter:blur(18px)
}

.search-panel {
    padding:25px 30px 16px;
    margin-bottom:22px
}

.search-topline {
    display:flex;
    align-items:center;
    justify-content:space-between;
    margin-bottom:20px
}

.language-picker,.match-picker {
    border:0;
    margin:0;
    padding:0;
    display:flex;
    align-items:center
}

.language-picker {
    gap:5px
}

.language-picker label {
    position:relative;
    cursor:pointer
}

.language-picker input,.match-picker input {
    position:absolute;
    opacity:0;
    width:1px;
    height:1px
}

.language-picker label>span {
    display:flex;
    align-items:center;
    gap:8px;
    padding:9px 13px;
    border-radius:11px;
    color:#7c867b;
    font-size:13px;
    transition:background .2s,color .2s
}

.language-picker label>span>span {
    font-size:19px
}

.language-picker input:checked+span {
    background:#e9eee6;
    color:var(--green-dark);
    font-weight:600
}

.language-picker input:focus-visible+span,.match-picker input:focus-visible+span {
    outline:3px solid #ab755b;
    outline-offset:2px
}

.swap-button {
    height:36px;
    width:36px;
    border-radius:50%;
    background:transparent;
    color:#919b8c
}

.swap-button:hover {
    background:#eef0e9
}

.swap-button svg {
    width:16px
}

.direction-note {
    font-size:11px;
    color:#8a9488;
    letter-spacing:.02em
}

.search-field-row {
    display:flex;
    gap:12px
}

.input-wrap {
    position:relative;
    display:flex;
    align-items:center;
    flex:1;
    min-width:0;
    background:rgba(255,255,255,.72);
    border:1px solid #d8dfd2;
    border-radius:14px;
    transition:border-color .2s,box-shadow .2s
}

.input-wrap:focus-within {
    border-color:#799582;
    box-shadow:0 0 0 3px rgba(111,144,115,.1)
}

.search-glyph {
    margin-left:19px;
    color:#839481
}

.search-glyph svg {
    width:21px;
    height:21px
}

#word {
    width:100%;
    min-width:0;
    height:62px;
    border:0;
    outline:0;
    background:none;
    padding:10px 14px;
    font-size:22px;
    color:var(--ink);
    font-family:var(--serif)
}

#word::placeholder {
    color:#a2aa9c;
    font:400 18px var(--serif)
}

.icon-button {
    display:grid;
    place-items:center;
    width:36px;
    height:36px;
    background:transparent;
    border-radius:50%;
    color:#7c8d7d;
    flex-shrink:0
}

.icon-button:hover {
    background:rgba(72,97,71,.08)
}

.clear-button {
    margin-right:8px
}

.clear-button svg {
    width:17px;
    height:17px
}

.search-button {
    display:flex;
    align-items:center;
    justify-content:center;
    gap:22px;
    padding:0 23px;
    min-width:150px;
    border-radius:14px;
    background:var(--green);
    color:#fff;
    font-size:14px;
    font-weight:550;
    box-shadow:0 4px 12px rgba(48,88,68,.1)
}

.search-button:hover {
    background:var(--green-dark);
    box-shadow:0 5px 20px rgba(48,88,68,.15)
}

.search-button svg {
    width:19px
}

.search-options {
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:14px;
    padding:17px 0 21px
}

.match-picker {
    background:rgba(229,234,221,.5);
    padding:4px;
    border-radius:10px;
    gap:3px
}

.match-picker label {
    position:relative;
    cursor:pointer;
    white-space:nowrap
}

.match-picker span {
    display:block;
    font-size:11px;
    padding:8px 14px;
    color:#788473;
    border-radius:7px
}

.match-picker input:checked+span {
    background:rgba(255,255,255,.94);
    box-shadow:0 1px 4px #43554014;
    color:var(--green-dark);
    font-weight:600
}

.filter-toggles {
    display:flex;
    gap:22px;
    align-items:center
}

.check-toggle {
    display:flex;
    align-items:center;
    gap:7px;
    font-size:11px;
    color:#6e7c69;
    cursor:pointer;
    min-height:32px
}

.check-toggle input {
    width:15px;
    height:15px;
    margin:0;
    accent-color:var(--green)
}

.keyboard-section {
    border-top:1px solid var(--border);
    padding-top:11px
}

.keyboard-toolbar {
    display:flex;
    justify-content:space-between;
    align-items:center;
    margin-bottom:10px
}

.keyboard-toggle,.keyboard-layout {
    display:flex;
    align-items:center;
    gap:8px;
    background:transparent;
    font-size:10px;
    letter-spacing:.02em;
    color:#7c8b76;
    padding:5px 0;
    min-height:28px
}

.keyboard-toggle svg {
    width:16px;
    height:16px
}

.keyboard-chevron svg {
    width:12px;
    height:12px;
    transition:transform .2s
}

.keyboard-toggle[aria-expanded=false] .keyboard-chevron svg {
    transform:rotate(-90deg)
}

.keyboard-layout {
    gap:8px
}

.keyboard-layout svg {
    width:13px;
    height:13px
}

.letter-keyboard {
    padding:2px 30px 7px
}

.keyboard-row {
    display:grid;
    grid-template-columns:repeat(var(--key-columns,12),minmax(0,1fr));
    gap:7px;
    margin-bottom:7px
}

.letter-keyboard button {
    height:35px;
    border:1px solid rgba(154,172,147,.28);
    border-radius:7px;
    background:rgba(255,255,253,.65);
    color:#4b6048;
    box-shadow:0 1px 2px #61735a08;
    font-size:14px;
    padding:0;
    min-width:0
}

.letter-keyboard button:hover {
    background:#e7eddf;
    border-color:#9aac90
}

.letter-keyboard .utility-key {
    background:rgba(231,236,222,.7);
    font-size:12px
}

.letter-keyboard .utility-key.active {
    background:var(--green);
    color:white
}

.keyboard-space {
    display:flex;
    justify-content:center;
    margin-top:1px
}

.keyboard-space button {
    width:46%;
    height:27px;
    font-size:9px;
    color:#97a18d;
    letter-spacing:.04em
}

.results-panel {
    overflow:hidden;
    min-height:180px
}

.results-topline {
    padding:22px 28px 19px;
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:15px;
    border-bottom:1px solid var(--border)
}

.results-topline h2 {
    font:400 19px/1.3 var(--serif);
    letter-spacing:-.3px;
    margin:0
}

.result-status {
    font-size:10px;
    color:#899581;
    text-align:right
}

.result-columns {
    display:grid;
    grid-template-columns:1fr 1fr;
    padding:14px 28px 12px;
    border-bottom:1px solid var(--border);
    background:rgba(238,242,231,.35);
    color:#8b9981;
    font-size:9px;
    letter-spacing:.15em;
    font-weight:650
}

.result-columns span:last-child {
    padding-left:22px
}

.welcome-state {
    text-align:center;
    padding:31px 20px 34px
}

.welcome-symbol {
    color:#88977e;
    margin-bottom:12px
}

.welcome-symbol svg {
    height:29px;
    width:29px;
    stroke-width:1.2
}

.welcome-state h3 {
    font:400 22px var(--serif);
    margin:0 0 10px;
    letter-spacing:-.4px
}

.welcome-state p {
    font-size:12px;
    line-height:1.85;
    color:#889080;
    margin:0
}

.sample-words {
    display:flex;
    justify-content:center;
    align-items:center;
    gap:8px;
    flex-wrap:wrap;
    margin-top:22px
}

.sample-words>span {
    font-size:10px;
    color:#929a88;
    margin-right:4px
}

.sample-words button {
    display:flex;
    gap:9px;
    align-items:center;
    border-radius:8px;
    border:1px solid #dde4d5;
    background:rgba(250,251,246,.6);
    padding:8px 11px;
    font-family:var(--serif);
    font-size:13px
}

.sample-words button>span {
    font:10px -apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
    color:#96a08c
}

.sample-words button svg {
    width:13px;
    height:13px
}

.sample-words button:hover {
    background:#e9efdf
}

.dictionary-note {
    display:flex;
    align-items:center;
    justify-content:center;
    gap:7px;
    font-size:10px;
    color:#71856d;
    letter-spacing:.035em;
    margin:20px 0 35px
}

.dictionary-note svg {
    width:12px;
    height:12px
}

.scene-credit {
    display:flex;
    justify-content:flex-end;
    align-items:center;
    gap:10px;
    color:#63745c;
    margin-top:20px
}

.scene-credit>span:nth-child(2) {
    display:flex;
    flex-direction:column;
    gap:4px
}

.scene-credit strong {
    font-size:11px;
    font-weight:550;
    letter-spacing:.02em
}

.scene-credit #scene-description {
    font-size:9px;
    color:#7b8b71
}

.scene-dot {
    height:6px;
    width:6px;
    border:1px solid #87967b;
    border-radius:50%;
    margin-right:2px
}

.scene-credit svg {
    width:15px;
    height:15px
}

.scene-credit .icon-button {
    margin-left:5px;
    background:rgba(250,250,243,.5);
    border:1px solid rgba(126,144,111,.2)
}

/* Retained dictionary output, styled as one continuous bilingual glass panel. */
#result table.result {
    border-collapse:collapse;
    width:100%;
    table-layout:fixed;
    border:0
}

#result table.result td.result {
    width:50%;
    padding:16px 28px;
    vertical-align:top;
    border-bottom:1px solid var(--border);
    line-height:1.8;
    font-size:16px;
    overflow-wrap:anywhere
}

#result table.result td.result[rowspan] {
    font-family:var(--serif);
    font-size:24px;
    border-right:1px solid var(--border);
    background:rgba(239,242,230,.3);
    vertical-align:middle
}

#result table.result td.result>a[data-word] {
    text-decoration:none;
    color:var(--ink);
    margin-right:5px
}

#result table.result td.result>a[data-word]:hover {
    text-decoration:underline;
    text-decoration-color:#b3bca8;
    text-underline-offset:4px
}

#result table.result > tbody > tr:last-child > td.result {
    border-bottom:0
}

#result table.result > tbody > tr > td.grammar-cell {
    padding:0;
    border-bottom:1px solid var(--border)
}

#result table.result td.result i {
    font:10px -apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
    color:#8d9784;
    margin-left:3px
}

#result table.result td.result b {
    font-weight:650
}

.result-action,.audio-button {
    display:inline-flex;
    align-items:center;
    justify-content:center;
    vertical-align:middle;
    width:26px;
    height:26px;
    border-radius:50%;
    background:transparent;
    border:0;
    color:#889b7c;
    text-decoration:none;
    padding:0;
    margin:0 1px
}

.result-action:hover,.audio-button:hover {
    background:rgba(210,224,199,.65);
    color:var(--green-dark)
}

.result-action svg,.audio-button svg {
    width:14px;
    height:14px
}

.audio-button.playing {
    background:var(--green);
    color:white
}

.result-action img {
    width:14px;
    max-height:14px;
    object-fit:contain
}

.result-legend {
    display:flex;
    gap:5px;
    font-size:10px;
    color:#8d9784
}

#result .noresult {
    width:100%;
    padding:30px;
    text-align:center;
    font-size:13px;
    color:var(--muted)
}

#result .red {
    color:#a96a51
}

#result .green {
    color:var(--green)
}

#result table table {
    border-collapse:collapse;
    width:100%;
    font-size:12px;
    table-layout:auto
}

#result table table td {
    padding:8px;
    border:1px solid var(--border)
}

#result .grammar-scroll {
    overflow-x:auto;
    max-width:100%;
    padding:18px
}

.result-summary-detail {
    font-size:11px;
    line-height:1.7;
    padding:12px 28px;
    color:var(--muted);
    border-bottom:1px solid var(--border)
}

.result-summary-detail:empty {
    display:none
}

.search-error {
    padding:32px;
    text-align:center;
    line-height:1.8;
    font-size:13px;
    color:#976347
}

#results-panel[aria-busy=true] #result {
    opacity:.55
}

.glass {
    animation:arrive .45s ease both
}

.results-panel {
    animation-delay:.08s
}

@keyframes arrive {
    from {
        opacity:0;
        transform:translateY(7px)
    }
    to {
        opacity:1;
        transform:translateY(0)
    }
}

@media(min-width:1600px) {
    .landscape {
        background-size:cover;
        background-position:center 64%
    }
    .site-shell {
        max-width:1360px
    }
    .masthead {
        height:102px
    }
    .ad-area {
        margin-bottom:40px
    }
    .introduction {
        margin-bottom:32px
    }
    .search-panel {
        margin-bottom:26px
    }
}

@media(max-width:760px) {
    .site-shell {
        padding:0 22px 24px
    }
    .masthead {
        height:76px
    }
    .wordmark {
        font-size:25px
    }
    .brand-mark {
        width:33px;
        height:37px;
        font-size:24px
    }
    .masthead-note {
        font-size:10px
    }
    .ad-area {
        margin-bottom:27px
    }
    .ad-placeholder {
        height:72px
    }
    .introduction {
        margin-bottom:23px
    }
    h1 {
        font-size:37px
    }
    .search-panel {
        padding:20px 20px 13px
    }
    .search-topline {
        margin-bottom:16px
    }
    .direction-note {
        font-size:10px
    }
    .search-button {
        min-width:114px;
        padding:0 18px;
        gap:13px
    }
    .search-options {
        gap:10px;
        flex-wrap:wrap
    }
    .filter-toggles {
        gap:18px;
        margin-left:auto
    }
    .letter-keyboard {
        padding:2px 0 5px
    }
    .keyboard-row {
        gap:5px
    }
    .results-topline {
        padding:20px
    }
    .results-topline h2 {
        font-size:18px
    }
    #result table.result td.result {
        padding:15px 20px;
        font-size:15px
    }
    #result table.result td.result[rowspan] {
        font-size:22px
    }
    .result-columns {
        padding-left:20px;
        padding-right:20px
    }
    .result-columns span:last-child {
        padding-left:20px
    }
}

@media(max-width:480px) {
    .site-shell {
        padding:0 14px 20px
    }
    .masthead {
        height:69px
    }
    .masthead-note {
        display:none
    }
    .wordmark {
        font-size:25px
    }
    .ad-area {
        margin-bottom:23px
    }
    .ad-placeholder {
        height:60px
    }
    .ad-dimensions {
        font-size:0
    }
    .ad-mobile-size {
        font-size:9px
    }
    .ad-mobile-size:before {
        content:"320 × 50 "
    }
    .ad-mobile-size {
        font-size:0
    }
    .ad-mobile-size:before {
        font-size:9px
    }
    .ad-placeholder {
        font-size:10px;
        gap:8px
    }
    .ad-outline {
        width:20px;
        height:14px
    }
    .ad-outline:after {
        width:10px
    }
    .ad-label {
        font-size:8px
    }
    .eyebrow {
        font-size:8px;
        margin-bottom:11px
    }
    h1 {
        font-size:32px;
        letter-spacing:-1px
    }
    .introduction>p:last-child {
        font-size:11px;
        padding:0 10px
    }
    .introduction {
        margin-bottom:22px
    }
    .glass {
        border-radius:19px
    }
    .search-panel {
        padding:15px 15px 10px;
        margin-bottom:16px
    }
    .language-picker label>span {
        font-size:12px;
        padding:8px 9px;
        gap:6px
    }
    .language-picker label>span>span {
        font-size:17px
    }
    .swap-button {
        width:28px;
        height:30px
    }
    .direction-note {
        font-size:9px
    }
    .search-field-row {
        gap:8px
    }
    #word {
        height:55px;
        font-size:21px;
        padding-left:8px
    }
    #word::placeholder {
        font-size:15px
    }
    .search-glyph {
        margin-left:12px
    }
    .search-glyph svg {
        width:18px
    }
    .search-button {
        min-width:55px;
        width:55px;
        padding:0;
        border-radius:12px
    }
    .search-button>span:first-child {
        position:absolute;
        clip:rect(0,0,0,0);
        width:1px;
        height:1px;
        overflow:hidden
    }
    .search-button svg {
        width:20px
    }
    .input-wrap {
        border-radius:12px
    }
    .search-options {
        padding:14px 0 15px;
        row-gap:11px
    }
    .match-picker {
        width:100%;
        justify-content:stretch
    }
    .match-picker label {
        flex:1;
        text-align:center
    }
    .match-picker span {
        font-size:10px;
        padding:8px 9px
    }
    .filter-toggles {
        margin-left:0;
        width:100%;
        justify-content:flex-start;
        gap:24px
    }
    .check-toggle {
        font-size:11px
    }
    .keyboard-toggle,.keyboard-layout {
        font-size:9px
    }
    .keyboard-row {
        display:flex;
        flex-wrap:nowrap;
        gap:3px
    }
    .keyboard-row > button {
        flex:1 1 0
    }
    .letter-keyboard button {
        height:40px;
        font-size:clamp(12px,3.6vw,15px);
        border-radius:6px
    }
    .letter-keyboard .utility-key svg {
        width:min(18px,100%);
        height:18px
    }
    .keyboard-space button {
        height:32px;
        width:60%
    }
    .results-topline {
        padding:18px 17px;
        align-items:flex-start
    }
    .results-topline h2 {
        font-size:17px
    }
    .result-status {
        font-size:9px;
        max-width:115px;
        line-height:1.6
    }
    .welcome-state {
        padding:27px 15px 29px
    }
    .welcome-state h3 {
        font-size:21px
    }
    .welcome-state p {
        font-size:11px
    }
    .sample-words {
        gap:6px;
        margin-top:20px
    }
    .sample-words>span {
        width:100%;
        margin-bottom:4px
    }
    .sample-words button {
        padding:8px;
        font-size:12px;
        gap:6px
    }
    .sample-words button span {
        font-size:9px
    }
    .dictionary-note {
        font-size:9px;
        margin:17px 0 25px
    }
    .scene-credit {
        margin-top:0
    }
    .result-columns {
        padding:12px 16px;
        font-size:8px
    }
    .result-columns span:last-child {
        padding-left:14px
    }
    #result table.result td.result {
        padding:13px 15px;
        font-size:14px;
        line-height:1.85
    }
    #result table.result td.result[rowspan] {
        font-size:20px
    }
    .result-action,.audio-button {
        width:25px;
        height:27px;
        margin:0
    }
    .scene-credit #scene-description {
        font-size:8px
    }
    .landscape {
        background-position:75% bottom;
        background-size:auto 100vh
    }
    .result-summary-detail {
        padding:12px 16px
    }
    .clear-button {
        width:26px;
        margin-right:4px
    }
}

@media(prefers-reduced-motion:reduce) {
    *,*:before,*:after {
        animation:none!important;
        transition:none!important;
        scroll-behavior:auto!important
    }
}

/* Bilingual handwritten dictionary title. */
@font-face {
    font-family: "Caveat";
    src: url("/fonts/Caveat.ttf") format("truetype");
    font-style: normal;
    font-weight: 400 700;
    font-display: swap;
}
.handwritten-title {
    display: flex;
    align-items: baseline;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0 16px;
    font-family: "Caveat", cursive;
    font-size: clamp(40px, 4.5vw, 64px);
    font-weight: 500;
    line-height: 1.2;
    letter-spacing: 0;
    margin: 0;
}
.handwritten-title > span,
.handwritten-title > em {
    white-space: nowrap;
}
.handwritten-title > em {
    color: var(--accent);
    font-style: normal;
    font-weight: 500;
}
.handwritten-title .title-divider {
    color: var(--ink);
    font-size: .7em;
    opacity: .5;
}
@media (max-width: 640px) {
    .handwritten-title {
        flex-direction: column;
        align-items: center;
        gap: 1px;
        font-size: clamp(36px, 10vw, 46px);
    }
    .handwritten-title .title-divider {
        display: none;
    }
}

.language-picker label>span>span[data-i18n] {
    font-size: 13px;
}

/* Interface language selection is independent of dictionary search direction. */
.masthead {
    gap: 12px;
}
.ui-languages {
    display: flex;
    align-items: center;
    gap: 5px;
    flex-shrink: 0;
}
.ui-languages button {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    padding: 5px;
    border: 1px solid transparent;
    border-radius: 50%;
    background: rgba(255,255,250,.42);
}
.ui-languages button:hover {
    background: rgba(255,255,250,.86);
}
.ui-languages button[aria-pressed="true"] {
    border-color: #71866c;
    background: rgba(255,255,250,.9);
    box-shadow: 0 0 0 2px rgba(113,134,108,.08);
}
.round-flag {
    display: block;
    width: 25px;
    height: 25px;
    border-radius: 50%;
    box-shadow: inset 0 0 0 1px rgba(49,66,49,.13);
    overflow: hidden;
}
.flag-hu {
    background: linear-gradient(#ce2939 0 33.333%,#fff 33.333% 66.666%,#477b54 66.666%);
}
.flag-ru {
    background: linear-gradient(#fff 0 33.333%,#2455a2 33.333% 66.666%,#ce2939 66.666%);
}
.flag-en {
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 60 60'%3E%3Cpath fill='%23012169' d='M0 0h60v60H0z'/%3E%3Cpath stroke='white' stroke-width='12' d='m0 0 60 60M60 0 0 60'/%3E%3Cpath stroke='%23c8102e' stroke-width='5' d='m0 0 60 60M60 0 0 60'/%3E%3Cpath stroke='white' stroke-width='20' d='M30 0v60M0 30h60'/%3E%3Cpath stroke='%23c8102e' stroke-width='12' d='M30 0v60M0 30h60'/%3E%3C/svg%3E") center/cover;
}
.control-tooltip {
    position: fixed;
    z-index: 1000;
    width: max-content;
    max-width: min(310px,calc(100vw - 24px));
    padding: 10px 13px;
    border-radius: 10px;
    background: #2b493f;
    color: #fffef7;
    font: 12px/1.55 -apple-system,BlinkMacSystemFont,"Segoe UI",Arial,sans-serif;
    box-shadow: 0 5px 22px rgba(30,50,40,.2);
    pointer-events: none;
    overflow-wrap: break-word;
}
.no-matches {
    padding: 28px;
    text-align: center;
    color: var(--muted);
    line-height: 1.8;
    font-size: 12px;
}
.no-matches h3 {
    color: var(--ink);
    font: 400 23px var(--serif);
    margin: 0 0 10px;
}
.retry-search {
    display: block;
    margin-top: 9px;
    color: var(--green);
    text-decoration: underline;
    text-underline-offset: 3px;
}
.direction-note {
    text-align: right;
}
@media(max-width:480px) {
    .ui-languages {
        gap: 3px;
    }
    .ui-languages button {
        width: 33px;
        height: 33px;
        padding: 4px;
    }
    .round-flag {
        width: 23px;
        height: 23px;
    }
    .wordmark {
        font-size: 22px;
        gap: 8px;
    }
    .brand-mark {
        width: 30px;
        height: 34px;
        font-size: 23px;
    }
    .language-picker label>span {
        gap: 5px;
        padding: 8px;
    }
    .language-picker label>span>span[data-i18n] {
        font-size: 11px;
    }
    .direction-note {
        max-width: 95px;
        line-height: 1.5;
    }
}

/* Indeterminate search progress follows the existing request lifecycle. */
#results-panel[aria-busy="true"] .result-status {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
#results-panel[aria-busy="true"] .result-status::before {
    content: "";
    display: inline-block;
    flex: 0 0 13px;
    width: 13px;
    height: 13px;
    border: 1.5px solid rgba(54,94,80,.2);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: search-progress-spin .8s linear infinite;
}
#searchbutton:disabled [data-icon="arrow"] svg {
    display: none;
}
#searchbutton:disabled [data-icon="arrow"]::before {
    content: "";
    display: inline-block;
    width: 19px;
    height: 19px;
    vertical-align: middle;
    border: 1.5px solid rgba(255,255,255,.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: search-progress-spin .8s linear infinite;
}
@keyframes search-progress-spin {
    to { transform: rotate(360deg); }
}

/* Align the interface flags to the same right edge as the dictionary panels. */
.masthead {
    width: min(100%,1000px);
    margin-inline: auto;
    justify-content: flex-end;
}
.introduction > h1 {
    margin: 0;
}
.title-home {
    color: inherit;
    text-decoration: none;
    border-radius: 8px;
}

/* Keep artwork credits aligned, with breathing room below the results. */
.scene-credit {
    width: min(100%,1000px);
    margin-inline: auto;
    margin-top: 24px;
}

/* Seventy percent transparent glass, with legible ink over the artwork. */
.scene-caption {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    max-width: 100%;
    padding: 9px 12px;
    border: 1px solid rgba(47,69,49,.22);
    border-radius: 999px;
    background: rgba(255,255,248,.30);
    color: #233c39;
    box-shadow: 0 3px 16px rgba(30,47,31,.13);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    text-shadow: 0 1px 2px rgba(255,255,248,.9);
}
.scene-caption > span:nth-child(2) {
    display: flex;
    flex-direction: column;
    gap: 3px;
}
.scene-caption strong {
    font-size: 12px;
    font-weight: 600;
}
.scene-caption #scene-description {
    color: #4d5e50;
    font-size: 10px;
}
.scene-caption .scene-dot {
    border-color: #5b6e55;
    background: var(--accent);
}
.scene-caption .icon-button {
    color: #365e50;
    background: rgba(255,255,255,.25);
    border-color: rgba(47,69,49,.22);
}

/* Quiet, persistent access to the policy and Google's consent choices. */
.privacy-links {
    width:min(100%,1000px);
    margin:20px auto 0;
    display:flex;
    flex-wrap:wrap;
    justify-content:flex-end;
    align-items:center;
    gap:8px 18px;
    font-size:11px;
}
.privacy-links a,.privacy-links button {
    color:var(--ink);
    background:rgba(255,255,248,.65);
    border:1px solid var(--border);
    border-radius:10px;
    padding:8px 10px;
    text-decoration:underline;
    text-underline-offset:3px;
    font:inherit;
}
.privacy-links [hidden] { display:none; }

/* Policy access at the leading edge, artwork at the trailing edge. */
.page-bottom {
    width:min(100%,1000px);
    margin:24px auto 0;
    display:flex;
    flex-wrap:wrap;
    justify-content:space-between;
    align-items:center;
    gap:16px;
}
.page-bottom .privacy-links {
    width:auto;
    margin:0;
    flex:1 1 220px;
    justify-content:flex-start;
}
.page-bottom .scene-credit {
    width:auto;
    max-width:100%;
    margin:0 0 0 auto;
    flex:0 1 auto;
}

/* Local preview mirrors the real banner's reserved responsive height. */
.ad-area .ad-placeholder { height:var(--banner-height); }
