/* Connected player: a small type scale, one action style, and generous spacing. */
:root{--body-size:16px;--small-size:14px;--label-size:12px;--control-radius:6px}
body{font-size:var(--body-size);line-height:1.5}
.masthead{min-height:88px;height:auto;gap:24px;padding-top:20px;padding-bottom:20px}
.masthead nav{align-items:center;font-size:var(--small-size);gap:24px}
.masthead .brand{font-size:26px;line-height:1.2}
h1,h2,h3{font-family:Georgia,serif;font-weight:400;letter-spacing:-.025em}
.play-heading h1{font-size:36px;line-height:1.2;margin:8px 0}
h2,.section-heading h2{font-size:28px;line-height:1.25}
h3,.puzzle-card h3,.support-note h3{font-size:22px;line-height:1.3}
.eyebrow{font-size:var(--label-size);letter-spacing:.1em;line-height:1.5}
.quiet,.account-status,.back-link,.play-heading .editor-credit,.progress-panel p,.completion-row,.puzzle-card p,footer p,footer small{font-size:var(--small-size);line-height:1.5}
.account-status{max-width:1250px;margin:12px auto 0;padding:0 42px;color:var(--muted)}
.account-status:empty,#connection-status:empty,#home-sign-in-message:empty{display:none}
.button,.text-button,.dialog-close,.xlv-frame .xlv-button{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:44px;padding:10px 16px;border:1px solid var(--ink);border-radius:var(--control-radius);font:600 var(--small-size)/1.4 Arial,Helvetica,sans-serif;text-decoration:none;background:var(--white);color:var(--ink);vertical-align:middle}
.button.primary{background:var(--ink);color:var(--white)}
.button:hover:not(:disabled),.text-button:hover:not(:disabled),.dialog-close:hover:not(:disabled),.xlv-frame .xlv-button:hover:not(:disabled){background:#e9eee2;color:var(--ink)}
.button.primary:hover:not(:disabled){background:#28534d;color:var(--white)}
button:disabled{opacity:.55;cursor:not-allowed}
.xlv-frame .xlv-button{background:var(--white)!important;color:var(--ink)!important;border:1px solid var(--ink)!important;border-radius:var(--control-radius)!important;padding:10px 16px!important;box-shadow:none!important}
.xlv-frame .xlv-controls-row{display:flex;align-items:center;flex-wrap:wrap;gap:8px;margin-top:16px}
/* The selected square and paired clue bars already show direction. Exolve's
   four tiny input arrows and blinking text caret look like a stray cursor. */
.xlv-frame .xlv-grid-input-rarr,.xlv-frame .xlv-grid-input-larr,.xlv-frame .xlv-grid-input-darr,.xlv-frame .xlv-grid-input-uarr{display:none!important}
.xlv-frame .xlv-grid-input,.xlv-frame .xlv-grid-input:focus{caret-color:transparent!important}
.home-sign-in{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:16px 24px;margin:24px 0 0;padding:20px;border:1px solid var(--line);border-radius:8px;background:var(--white)}
.support-link.button{background:#963d27;border-color:#963d27;color:#fffefa;white-space:nowrap;min-height:44px}.support-link.button:hover,.support-link.button:focus-visible{background:#78301f;color:#fffefa}.masthead nav .support-link{padding:8px 12px}.privacy-header .support-link{margin-left:auto}@media(max-width:580px){.masthead nav .support-link{padding:8px 10px}footer .support-link{max-width:100%;white-space:normal;text-align:center}}.welcome-support{display:flex;align-items:center;justify-content:space-between;gap:14px 24px;flex-wrap:wrap;margin-top:24px;padding:20px;border:1px solid var(--line);border-radius:8px;background:var(--white)}
.welcome-support p{margin:0;font-size:var(--body-size);line-height:1.5}
.welcome-support .button{white-space:normal;text-align:center}
.sign-in-invitation{max-width:540px}.sign-in-invitation .quiet{margin:10px 0 0}
.sign-in-invitation>.text-button{background:var(--ink);color:var(--white)}
.home-sign-in-options{display:flex;align-items:center;gap:12px;flex-wrap:wrap;flex-shrink:0}
.home-sign-in #home-sign-in-message{flex-basis:100%;margin:0}
/* Keep the supplied Google artwork intact at its original proportions. */
.google-sign-in{display:inline-flex;align-items:center;justify-content:center;padding:0;border:0;background:transparent;border-radius:4px;min-width:198px;min-height:44px;vertical-align:middle;flex-shrink:0}
.google-sign-in img{display:block;width:198px;height:44px;max-width:none}
.google-sign-in:hover:not(:disabled){box-shadow:0 1px 3px #0002}
#today-label{margin:28px 0 0}.play-heading{padding:20px 0 24px;gap:24px}
.play-heading .eyebrow{margin:12px 0 0}.play-heading .editor-credit{font-weight:400;margin:8px 0 0;color:var(--muted)}
.clock-panel{display:flex;align-items:center;justify-content:flex-end;flex-wrap:wrap;gap:12px;min-width:0}
.clock-panel>span{font-size:var(--label-size)}.clock-panel strong{font:600 20px/1.3 Arial,Helvetica,sans-serif;margin:0;font-variant-numeric:tabular-nums}
.play-area{padding:24px;border-radius:8px}.xlv-frame{font:var(--body-size)/1.5 Arial,Helvetica,sans-serif}
.xlv-clues{font-size:var(--body-size);line-height:1.5}.xlv-clues td{padding-top:6px;padding-bottom:6px}
.xlv-frame .selected-clue-bar:not([style*="display: none"]){display:flex!important;align-items:center;gap:6px;background:var(--paper)!important;border-radius:6px;min-height:0!important;max-height:none!important;overflow:visible;position:relative;top:auto!important;bottom:auto;width:100%!important;margin-top:8px!important;left:0!important}
.selected-clue-bar .xlv-curr-clue-inner{display:none!important}
.selected-clue-bar .clue-cycle{display:flex;align-items:center;justify-content:center;flex:0 0 44px;min-height:48px;padding:0;border:1px solid var(--line);border-radius:var(--control-radius);background:var(--white);color:var(--ink);font:28px/1 Arial,Helvetica,sans-serif}
.crossing-clues{display:flex;flex:1;flex-direction:column;gap:6px;min-width:0;padding:4px 0}
.crossing-clue{display:block;width:100%;min-height:52px;padding:8px 12px;border:1px solid var(--line);border-left:4px solid var(--line);border-radius:var(--control-radius);background:var(--white);color:var(--ink);text-align:left;white-space:normal;overflow-wrap:anywhere;cursor:pointer;font:400 var(--body-size)/1.4 Arial,Helvetica,sans-serif}
.crossing-clue[aria-pressed="true"]{border-left-color:var(--ink);background:#e9eee2}
.crossing-clue:hover:not(:disabled){border-color:var(--ink)}
.crossing-clue:focus-visible,.clue-cycle:focus-visible{outline:3px solid var(--ink);outline-offset:2px}
.crossing-clue-label{display:block;font-size:var(--label-size);font-weight:700;letter-spacing:.04em;margin-bottom:2px}
.crossing-clue-text{display:block}.crossing-clue:disabled{opacity:1;color:var(--muted);cursor:default}
.remote-help,.sync-conflict{display:flex;gap:12px;flex-wrap:wrap;margin-top:16px}
.remote-help{position:relative;text-align:left;margin:12px 0 0}.remote-help:not(:has(button:not([hidden]))){display:none}
#remote-reveal{background:transparent;color:var(--muted);border-color:var(--line);font-weight:400}
.xlv-frame .xlv-nav-button{display:none}.xlv-frame .xlv-controls-row:has(.xlv-nav-button){display:none}
.controls-help{margin-top:20px}.completion{font-size:var(--body-size);padding:16px 20px}.completion+#completion-sign-in{margin:0 0 20px}
#play{padding-bottom:40px}#home{padding-top:24px}#progress{padding-top:48px}
.play-guide{max-width:78ch;margin:24px 0;color:var(--muted);font-size:var(--small-size);line-height:1.5}.play-guide p{margin:12px 0}.play-guide p:first-child{color:var(--ink);font-weight:600}
.progress-panel{gap:32px;padding:24px}.progress-panel strong{font-size:36px}.progress-panel span{font-size:var(--small-size)}
.start-card p{font-size:var(--body-size);line-height:1.5}.start-card h2{font-size:28px}
.sign-in-dialog{border:1px solid var(--line);border-radius:10px;padding:24px;max-width:460px;width:calc(100% - 32px);color:var(--ink);background:var(--paper)}
.sign-in-dialog::backdrop{background:#173c3880}.sign-in-dialog h2{font-size:28px;clear:both}.sign-in-dialog p{font-size:var(--body-size);line-height:1.5}
.sign-in-dialog .button{width:100%;margin-top:12px}.sign-in-dialog .google-sign-in{margin-top:12px}.sign-in-dialog label{display:block;font-size:var(--small-size);margin-bottom:8px}
.sign-in-dialog input{width:100%;min-height:44px;padding:12px;border:1px solid var(--line);border-radius:var(--control-radius);font:inherit}.dialog-close{float:right}
@media(max-width:800px){
 .home-sign-in{display:block;padding:20px}.home-sign-in-options{margin-top:16px}.home-sign-in-options .button{flex:1}.masthead nav{gap:16px}
 .play-heading{align-items:flex-start}.play-heading h1{font-size:30px}.clock-panel{max-width:250px}
}
@media(max-width:580px){.welcome-support{align-items:stretch}.welcome-support .button{width:100%}}
@media(max-width:580px), (max-width:950px) and (max-height:500px){
 .masthead,main,footer{padding-left:18px;padding-right:18px}.masthead{min-height:72px;gap:12px;flex-wrap:wrap;padding-top:16px;padding-bottom:16px}
 .masthead .brandmark{display:none}.masthead .brand{font-size:22px;white-space:nowrap}.masthead nav{gap:12px;flex-wrap:wrap;font-size:var(--small-size);margin-left:auto}
 .masthead nav a{min-height:44px;display:inline-flex;align-items:center}.account-status{padding:0 18px}
 .home-sign-in{padding:16px}.home-sign-in-options{gap:12px}.home-sign-in-options .button{flex:0 1 auto}
 .play-heading{display:block;padding:16px 0 20px}.play-heading h1{font-size:28px;line-height:1.2;margin:8px 0}
 h2,.section-heading h2{font-size:26px}.section-heading{align-items:center;gap:16px}.section-heading>.quiet{max-width:100px}
 .clock-panel{max-width:none;display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:12px;text-align:left;margin-top:16px}
 .clock-panel>span{display:none}.clock-panel strong{font-size:18px;flex:1;text-align:center}.clock-panel #pause{flex-shrink:0}
 .play-area{padding:8px 0;min-width:0;margin-left:-18px;margin-right:-18px;border-left:0;border-right:0;border-radius:0}
 .play-area>div[id^="exolve"],.xlv-frame,.xlv-grid-and-clues-flex,.xlv-grid-panel,.xlv-grid-parent-centerer{min-width:0;max-width:100%;width:100%}.xlv-title-setter{max-width:100%}
 .xlv-grid-panel{margin:0}
 /* Native clue boxes carry pixel widths. Constrain their content as well as
    their flex parents so reading padding cannot enlarge the phone viewport. */
 .xlv-clues{box-sizing:border-box;min-width:0;width:100%;max-width:100%!important}
 .xlv-clues-panel{box-sizing:border-box;min-width:0;width:100%;max-width:100%;margin:0 0 8px}
 .xlv-clues-box{box-sizing:border-box;min-width:0;max-width:100%}
 .xlv-frame .selected-clue-bar:not([style*="display: none"]){padding:0 6px;box-sizing:border-box}
 .xlv-frame .selected-clue-bar[data-keyboard-visible="true"]:not([style*="display: none"]){position:sticky;align-items:flex-start;bottom:var(--sda-clue-bottom,0px);width:var(--sda-clue-width,100%)!important;left:var(--sda-clue-left,0px)!important;max-height:none!important;overflow:visible;z-index:3}
 .selected-clue-bar[data-keyboard-visible="true"] .clue-cycle{align-self:center}
 .selected-clue-bar[data-keyboard-visible="true"] .crossing-clues{display:grid;grid-template-rows:repeat(2,minmax(0,1fr));min-height:128px;max-height:var(--sda-clue-max-height,none)}
 .selected-clue-bar[data-keyboard-visible="true"] .crossing-clue{display:grid;grid-template-rows:auto minmax(0,1fr);min-height:0;min-width:0}
 .selected-clue-bar[data-keyboard-visible="true"] .crossing-clue-text{min-height:0;min-width:0;overflow-y:auto;overscroll-behavior:contain;scrollbar-width:thin;touch-action:pan-y pinch-zoom}
 .remote-help{padding:0 12px}.xlv-controls-etc,.xlv-clues{padding-left:12px;padding-right:12px}
 .crossing-clue{padding:7px 9px}
 .selected-clue-bar .clue-cycle{display:flex}
 .xlv-frame .xlv-controls-row{justify-content:center}.xlv-frame .xlv-nav-button{display:none}.xlv-grid-parent-centerer{overflow-anchor:none}
 .xlv-phone-kb{background:var(--paper)!important;padding-bottom:max(6px,env(safe-area-inset-bottom))}
 .xlv-phone-kb-btn{height:44px;min-height:44px;aspect-ratio:auto;border-color:var(--line)!important;border-radius:var(--control-radius);background:var(--white)!important;color:var(--ink)!important;font:600 17px Arial,Helvetica,sans-serif}
 .xlv-phone-kb-btn:active{background:#d4ddcc!important}.play-overlay{padding:28px 16px}.progress-panel{gap:20px;padding:20px}
}

.new-puzzle-notice{display:flex;align-items:center;justify-content:space-between;gap:16px;flex-wrap:wrap;margin:24px 0 0;padding:20px;border:1px solid #bdcdb5;border-radius:8px;background:#e9eee2}.new-puzzle-notice p{font-size:var(--small-size);margin:0;max-width:60ch}

/* A verified finish stays visible even when the player is scrolled to the grid. */
.completion-dialog{box-sizing:border-box;width:calc(100% - 32px);max-width:460px;max-height:calc(100dvh - 32px);overflow:auto;margin:auto;padding:28px;border:1px solid var(--line);border-radius:10px;background:var(--paper);color:var(--ink)}
.completion-dialog::backdrop{background:#173c3880}.completion-dialog h2{margin:8px 0 16px;font-size:28px}.completion-dialog p{font-size:var(--body-size);line-height:1.5}.completion-dialog .eyebrow{font-size:var(--label-size);color:var(--muted)}.completion-dialog-actions{display:flex;gap:12px;flex-wrap:wrap;margin-top:24px}

/* Separate dense grid input from the large clue navigation touch targets. */
@media(max-width:580px), (max-width:950px) and (max-height:500px){.xlv-frame .xlv-grid-parent{margin-top:8px}}

/* Short, wide screens keep the two labels beside independently scrollable
   clue text. Neither switching direction nor opening More can scroll arrows. */
@media(max-width:950px) and (max-height:500px) and (orientation:landscape){
 /* Fixed accessible rows make the selected-square height budget independent
    of grid width, while long clue text retains its own scrolling region. */
 .selected-clue-bar[data-keyboard-visible="true"] .crossing-clues{grid-template-rows:auto auto;min-height:0;max-height:none;padding:0;gap:2px}
 .selected-clue-bar[data-keyboard-visible="true"] .crossing-clue{box-sizing:border-box;height:calc(1.4em + 10px);min-height:44px;grid-template-columns:max-content minmax(0,1fr);grid-template-rows:minmax(0,1fr);gap:10px;padding:4px 8px}
 .selected-clue-bar[data-keyboard-visible="true"] .crossing-clue-label{align-self:center;white-space:nowrap;margin:0}
}
/* Keep every phone key inside the visible viewport, including browser zoom.
   The vendor keyboard otherwise inherits the puzzle frame's left inset. */
.xlv-phone-kb{left:var(--sda-keyboard-left,0px)!important;right:auto!important;bottom:var(--sda-keyboard-bottom,0px)!important;width:var(--sda-keyboard-width,100%)!important;max-width:100%!important;box-sizing:border-box}
.xlv-phone-kb-row{min-width:0}
.xlv-phone-kb-btn{min-width:0;box-sizing:border-box;padding-left:0;padding-right:0}
.xlv-phone-kb-btn-small{font-size:11px;line-height:1.1;overflow-wrap:anywhere}

/* The welcome choice precedes both today's grid and the archive, without a preview leak. */
body[data-entry="pending"] #account-status,body[data-entry="pending"] #archive-link,body[data-entry="pending"] #progress-link,body[data-entry="pending"] #sign-in-open{display:none}
body[data-entry="pending"] main{max-width:860px;margin-inline:auto}
.welcome-intro{max-width:680px;padding:clamp(24px,6vh,64px) 0 0}
.welcome-intro h1{font-size:clamp(36px,6vw,58px);line-height:1.08;margin:16px 0 24px}
.welcome-lead{font-size:20px;line-height:1.5;max-width:32ch}
#welcome-benefits{max-width:60ch;color:var(--muted);line-height:1.7;margin-top:24px}
.welcome-choice{padding:24px 0 40px}.welcome-choice .quiet{max-width:52ch;margin:12px 0 0}
body[data-entry="pending"] footer{margin-top:32px}
.completion-dialog[data-result="correct"]{max-width:560px;text-align:center;padding:clamp(24px,5vw,48px);border:2px solid #c0ab70;box-shadow:0 16px 64px #173c3833}
.completion-dialog[data-result="correct"] h2{font-size:clamp(36px,7vw,52px);line-height:1.12}
.completion-dialog[data-result="correct"] .completion-dialog-actions{justify-content:center}
.completion-emblem{display:none}
.completion-dialog[data-result="correct"] .completion-emblem{display:grid;place-items:center;width:76px;height:76px;margin:0 auto 22px;border-radius:50%;background:#e9eee2;color:var(--ink);font:48px/1 Georgia,serif}
.completion-confetti{position:fixed;inset:0;overflow:hidden;pointer-events:none;z-index:1}
.completion-confetti i{position:absolute;top:-24px;left:var(--x);width:9px;height:15px;background:var(--color);opacity:0;animation:sda-confetti 2.8s var(--delay) ease-in forwards}
.completion-confetti i:nth-child(3n){border-radius:50%;width:10px;height:10px}
@keyframes sda-confetti{0%{opacity:0;transform:translate3d(0,-10px,0) rotate(0)}8%{opacity:.95}80%{opacity:.9}100%{opacity:0;transform:translate3d(var(--drift),110dvh,0) rotate(var(--turn))}}
@media(prefers-reduced-motion:reduce){.completion-confetti{display:none}.completion-confetti i{animation:none}}
@media(max-width:580px){.welcome-intro{padding-top:28px}.welcome-lead{font-size:18px}.welcome-choice .button{width:100%}.completion-dialog-actions .button{flex:1 1 100%}footer>a{display:block;width:fit-content;margin:12px 0}footer small{display:block;margin-top:12px}}
