/* Tootle: a small, buildless, responsive game. */
@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Outfit:wght@400;500;600;650;700;800&display=swap');
:root{--paper:#fbf9f3;--ink:#28453d;--muted:#7d8277;--teal:#397c67;--green:#78a477;--yellow:#ebc865;--red:#d97767;--border:#e7e5da;--serif:Georgia,'Times New Roman',serif;--sans:'DM Sans',Arial,sans-serif;--round:'Outfit',var(--sans)}
*{box-sizing:border-box}body{margin:0;background:var(--paper);color:var(--ink);font-family:var(--sans);font-size:14px}button,input{font:inherit}button,a{-webkit-tap-highlight-color:transparent}button{cursor:pointer}button{color:inherit}a{color:inherit}button:focus-visible,a:focus-visible{outline:3px solid #3f8eaf;outline-offset:4px}button:disabled{cursor:default}.svg-defs{position:absolute;width:0;height:0;overflow:hidden}.site-header{height:98px;max-width:1320px;margin:auto;padding:0 54px;display:flex;align-items:center;border-bottom:1px solid var(--border);gap:32px}.wordmark{display:flex;align-items:center;text-decoration:none;font-family:var(--round);font-size:46px;font-weight:800;letter-spacing:-2px;line-height:1}.brand-train{width:67px;height:57px;margin-right:9px}.brand-dot{color:var(--red)}.header-tagline{font-size:12px;color:var(--muted);margin-top:10px}.header-actions{display:flex;align-items:center;gap:17px;margin-left:auto}.icon-button{width:30px;height:34px;display:grid;place-items:center;background:none;border:0;border-radius:6px}.icon-button:hover{background:#eeeee4}.icon-button svg{width:22px;height:22px;stroke:currentColor;stroke-width:1.6;fill:none;stroke-linecap:round;stroke-linejoin:round}.nav-divider{height:22px;border-left:1px solid var(--border);margin:0 2px}.account-button{border:0;background:none;font-size:13px;font-weight:600;padding:8px 0;max-width:135px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.account-button span{padding-left:14px}.intro{text-align:center;padding:39px 20px 0}.eyebrow{font-size:10px;letter-spacing:1.9px;font-weight:700;display:flex;align-items:center;justify-content:center;gap:9px}.status-dot{width:6px;height:6px;background:#699a79;border-radius:50%}.edition{color:#95978a;letter-spacing:1px;font-size:10px;border-left:1px solid #d9dccc;margin-left:4px;padding-left:12px}.intro h1{font-family:var(--serif);font-weight:400;letter-spacing:-1.1px;font-size:36px;margin:15px 0 10px}.intro>p{color:var(--muted);font-size:13px;margin:0}.game-layout{max-width:1135px;display:grid;grid-template-columns:240px minmax(340px,470px) 258px;gap:48px;margin:32px auto 0;padding:0 20px;align-items:start}.guide-column{padding-top:57px}.section-kicker{font-size:9px;letter-spacing:1.6px;color:#9a9c8d;font-weight:700}.guide-column h2{font-family:var(--serif);font-size:31px;font-weight:400;line-height:1.15;letter-spacing:-.6px;margin:18px 0}.aside-copy{font-size:12px;line-height:1.8;color:var(--muted)}.route-guide{position:relative;margin-top:28px}.route-line{position:absolute;border-left:1px dashed #c9d1bc;left:12px;top:20px;bottom:50px}.route-stop{display:flex;gap:13px;position:relative;margin-bottom:25px}.route-number{flex-shrink:0;width:25px;height:25px;display:grid;place-items:center;background:#e8eddf;border:1px solid #ccd7c1;border-radius:50%;font-family:var(--round);font-size:12px;font-weight:600}.caboose-number{background:#f4e4dc;border-color:#e6c8bd;color:#af6053}.route-stop h3{font-size:12px;margin:4px 0 6px}.route-stop p{font-size:11px;color:var(--muted);line-height:1.7;margin:0}.text-link{border:0;border-bottom:1px solid #b6c5b1;background:none;padding:0 0 5px;font-size:11px;font-weight:600}.text-link span{margin-left:15px}.little-note{margin-top:41px;border-top:1px solid var(--border);padding-top:25px;display:flex;gap:13px;color:#8e9682}.note-spark{font-size:26px;color:#aeb799}.little-note p{margin:0;font-family:var(--serif);font-style:italic;font-size:15px;line-height:1.6}.train-progress{display:flex;align-items:center;justify-content:center;margin:0 auto 18px;gap:14px}.train-stop{display:flex;align-items:center;gap:3px;opacity:.6}.train-stop.active,.train-stop.solved{opacity:1}.train-stop svg{width:65px;height:55px}.train-stop strong{display:block;font-family:var(--round);font-size:15px;font-weight:600;margin-top:4px}.stop-label{font-size:8px;letter-spacing:1px;color:var(--muted);white-space:nowrap}.stop-check{font-family:var(--sans);font-size:12px;color:var(--teal)}.connecting-track{height:6px;width:41px;display:flex;align-items:center;justify-content:space-between;border-top:1px solid #d2d5c5;border-bottom:1px solid #d2d5c5;margin-top:16px}.connecting-track i{height:10px;border-left:1px solid #d2d5c5}.board{display:grid;grid-template-columns:repeat(5,49px);gap:6px;justify-content:center}.tile{width:49px;height:47px;border:1.5px solid #e0e2d6;border-radius:6px;background:#fffefa;display:grid;place-items:center;font-family:var(--round);font-size:25px;font-weight:600;line-height:1;transition:background .25s,border-color .15s;position:relative}.tile.current{border-color:#bdcdb7;background:#fffefa}.tile.filled{border-color:#698a76;animation:pop .12s ease}.tile.evaluated{border-color:transparent;color:#203b30}.tile.absent{background:#fffefa;border-color:#d9dccf;color:#6b756a}.tile.correct,.key.correct{background:var(--green)}.tile.present,.key.present{background:var(--yellow)}.tile.caboose,.key.caboose{background:var(--red);color:#422f29}.tile.caboose-correct,.key.caboose-correct,.tile.shared-correct,.key.shared-correct{background:repeating-linear-gradient(135deg,var(--green) 0,var(--green) 8px,#ce7364 8px,#ce7364 11px)}.tile.caboose-present,.key.caboose-present,.tile.shared-present,.key.shared-present{background:repeating-linear-gradient(135deg,var(--yellow) 0,var(--yellow) 8px,#ce7364 8px,#ce7364 11px)}.game-status{font-size:10px;min-height:38px;text-align:center;padding:13px 0 10px;color:#76836c;line-height:1.5}.small-dot{display:inline-block;width:5px;height:5px;background:#7c9c68;border-radius:50%;margin:0 4px 2px 0}.keyboard{display:flex;flex-direction:column;gap:6px;user-select:none;touch-action:manipulation;max-width:470px;margin:auto}.keyboard-row{display:flex;justify-content:center;gap:5px}.key{background:#e9ece2;border:1px solid #e0e5d7;border-radius:5px;min-width:0;flex:1;height:43px;padding:0;font-family:var(--round);font-weight:600;font-size:13px;box-shadow:0 1px 0 #d2d6ca;touch-action:manipulation}.key:hover{filter:brightness(.97)}.key:active{transform:translateY(1px);box-shadow:none}.keyboard-row:nth-child(2){padding:0 19px}.key.wide{flex:1.6;font-size:9px;letter-spacing:.4px}.key.enter{background:#365c4a;border-color:#365c4a;color:#fff;font-size:9px}.key.absent{background:#fffdf8;color:#b5b8ab;border-color:#e8e7dc;box-shadow:none}.key svg{width:19px;height:19px;vertical-align:middle;fill:none;stroke:currentColor;stroke-width:1.5;stroke-linejoin:round}.game-bottom{font-size:10px;display:flex;justify-content:space-between;color:#929889;margin:15px 1px 0}.game-bottom button{font-size:10px;border:0;background:none;color:#6b8068;padding:0}.game-bottom button span{margin-left:6px}.clue-column{padding-top:55px}.legend-card{background:#f2f1e7;border:1px solid #e7e7d9;border-radius:12px;padding:24px 22px}.card-kicker{font-size:8px;letter-spacing:1.2px;font-weight:700;color:#8c927b}.card-kicker>span{margin-right:6px;font-size:14px;color:#8e9b7d}.legend-card h2{font-family:var(--serif);font-size:24px;letter-spacing:-.5px;font-weight:400;margin:15px 0 8px}.legend-card>p{font-size:10px;line-height:1.6;color:#8a8d7c;margin:0 0 22px}.legend-list{display:grid;gap:17px}.legend-item{display:flex;align-items:center;gap:12px}.legend-item .tile{flex-shrink:0;width:32px;height:32px;border-radius:4px;font-size:18px}.legend-item strong{display:block;font-size:11px;font-weight:600;margin-bottom:3px}.legend-item small{font-size:10px;line-height:1.5;color:#8a8d7c;display:block}.legend-footnote{border-top:1px solid #dfdfd0;margin-top:20px;padding:15px 0 18px;color:#8e917f;font-size:9px;line-height:1.7}.legend-card .text-link{font-size:10px}.daily-note{display:flex;gap:13px;margin:27px 7px}.sun-icon{font-size:27px;color:#b7a868;line-height:1}.daily-note h3{font-size:11px;font-weight:500;margin:0 0 7px}.daily-note p{font-size:10px;line-height:1.8;color:#959886;margin:0}footer{max-width:1212px;margin:35px auto 0;border-top:1px solid var(--border);padding:23px 0 25px;display:flex;align-items:center;justify-content:space-between;color:#9a9e8f;font-size:10px}footer>span:first-child{font-family:var(--round);font-weight:500;color:#778971;letter-spacing:.2px}footer button{font-size:10px;color:#8b9682;background:none;border:0;padding:0}
/* Dialogs deliberately share the same typographic and color system. */
dialog{background:var(--paper);color:var(--ink);border:1px solid #e0e2d5;border-radius:20px;padding:38px;width:min(440px,calc(100% - 30px));max-height:calc(100dvh - 30px);box-shadow:0 18px 90px #213e3230;text-align:center;overflow-y:auto}dialog::backdrop{background:#22372f44;backdrop-filter:blur(5px)}.modal-close{position:absolute;right:15px;top:10px;font-size:27px;font-weight:400;line-height:1;border:0;background:none;color:#7a8775;padding:5px}.modal-train{display:flex;align-items:center;justify-content:center;margin-bottom:8px}.modal-train svg{width:100px;height:78px}.modal-train svg+svg{width:90px;margin-left:-4px}.modal-kicker{font-size:9px;letter-spacing:1.7px;color:#879377;font-weight:600}.modal-title{font-family:var(--serif);font-size:33px;font-weight:400;letter-spacing:-.7px;margin:13px 0}.modal-copy{font-size:12px;line-height:1.8;color:var(--muted);margin:0 0 24px}.primary-button,.secondary-button{width:100%;border:1px solid var(--teal);border-radius:7px;padding:13px 17px;font-size:12px;font-weight:600;background:var(--teal);color:white;margin:4px 0;min-height:44px}.primary-button:hover{background:#2d6755}.secondary-button{background:transparent;color:var(--ink);border-color:#d6dacc}.secondary-button:hover{background:#eff0e6}.modal-inline{font-size:11px;margin:18px 0;color:var(--muted)}.modal-inline button{border:0;background:none;color:var(--ink);font-weight:700;text-decoration:underline;text-underline-offset:3px;padding:0 3px}.privacy-note{font-size:9px;line-height:1.7;color:#9a9e8e;margin:19px 0 0}.auth-form{text-align:left}.auth-form label{display:block;font-size:11px;font-weight:600;margin-bottom:15px}.auth-form input{width:100%;border:1px solid #d5dacb;background:#fffdf8;padding:12px;border-radius:6px;display:block;margin-top:7px;color:var(--ink);font-size:14px}.form-error{font-size:11px;color:#aa4f42;min-height:16px;line-height:1.5}.help-body{text-align:left}.help-body h3{font-size:13px;margin:23px 0 7px}.help-body p{font-size:12px;line-height:1.8;color:#76816c}.example-row{display:flex;gap:5px;justify-content:center;margin:17px 0}.example-row .tile{width:39px;height:39px;font-size:21px}.help-body .legend-list{gap:15px;margin:20px 0}.stats-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:8px;margin:26px 0}.stat-value{font-family:var(--round);font-size:30px;font-weight:600}.stat-label{font-size:9px;color:var(--muted);line-height:1.6;margin-top:5px}.setting-row{display:flex;align-items:center;justify-content:space-between;text-align:left;padding:18px 0;border-bottom:1px solid var(--border);gap:16px}.setting-row strong{font-size:12px;display:block}.setting-row small{font-size:10px;color:var(--muted);display:block;margin-top:5px;line-height:1.5}.toggle{min-width:40px;width:40px;height:23px;background:#d8ddce;border:0;border-radius:20px;padding:3px}.toggle:before{content:'';display:block;width:17px;height:17px;background:white;border-radius:100%;transition:transform .2s}.toggle[aria-pressed=true]{background:var(--teal)}.toggle[aria-pressed=true]:before{transform:translateX(17px)}.toast{position:fixed;top:104px;left:50%;transform:translate(-50%,-10px);opacity:0;pointer-events:none;background:var(--ink);color:#fff;padding:11px 20px;border-radius:8px;font-size:12px;z-index:10;transition:opacity .2s,transform .2s;max-width:90%;text-align:center}.toast.visible{opacity:1;transform:translate(-50%,0)}.result-word{display:flex;align-items:center;justify-content:space-between;background:#eeefe4;border-radius:8px;padding:12px 15px;margin:10px 0;font-size:11px}.result-word strong{font-family:var(--round);font-size:19px;letter-spacing:3px}.result-actions{margin-top:23px}.pattern-labels .tile.evaluated:after{content:attr(data-mark);position:absolute;bottom:2px;right:3px;font-size:8px;font-family:Arial;font-weight:bold}.pattern-labels .tile.evaluated{padding-bottom:4px}.reduce-motion *{animation:none!important;transition:none!important}@keyframes pop{50%{transform:scale(1.07)}}@keyframes shake{25%,75%{transform:translateX(-4px)}50%{transform:translateX(4px)}}.shake{animation:shake .22s ease}
/* Small supporting copy stays readable alongside the central board. */
:root{--muted:#687362}
.aside-copy{font-size:13px}.route-stop p{font-size:12px}.route-stop h3{font-size:13px}.legend-card>p{font-size:11px;color:#6d7763}.legend-item strong{font-size:12px}.legend-item small{font-size:11px;color:#6d7763}.legend-footnote{font-size:10px;color:#6d7763}.daily-note h3{font-size:12px}.daily-note p{font-size:11px;color:#737e69}.game-status{color:#627855}.game-bottom{color:#69795f}.privacy-note{color:#747d6b}
@media(min-width:1400px){.site-header{margin-top:10px}.intro{padding-top:45px}.game-layout{margin-top:38px}}
@media(max-width:1100px){.game-layout{grid-template-columns:190px minmax(320px,430px) 220px;gap:24px}.site-header{padding:0 30px}.legend-card{padding:22px 17px}footer{margin-left:30px;margin-right:30px}.guide-column h2{font-size:29px}.train-progress{gap:8px}.connecting-track{width:30px}.train-stop svg{width:57px}}
@media(max-width:900px){.game-layout{grid-template-columns:minmax(320px,440px) 235px;justify-content:center;gap:40px}.guide-column{display:none}.header-tagline{display:none}.site-header{height:84px}.intro{padding-top:28px}.intro h1{font-size:32px}footer{margin-top:30px}}
@media(max-width:660px){.site-header{height:72px;padding:0 19px;gap:12px}.wordmark{font-size:36px;letter-spacing:-1.5px}.brand-train{width:47px;height:42px;margin-right:4px}.header-actions{gap:9px}.icon-button{width:25px;height:30px}.icon-button svg{width:20px;height:20px}.nav-divider{margin:0 2px}.account-button{font-size:11px;max-width:73px}.account-button span{display:none}.intro{padding:22px 14px 0}.eyebrow{font-size:8px;letter-spacing:1.5px;gap:6px}.edition{font-size:8px;margin-left:1px;padding-left:8px}.intro h1{font-size:26px;letter-spacing:-.8px;margin-top:13px;margin-bottom:7px}.intro>p{font-size:10px}.game-layout{display:block;margin:20px auto 0;padding:0 12px;max-width:460px}.clue-column{display:none}.train-progress{gap:17px;margin-bottom:13px}.train-stop svg{width:53px;height:45px}.train-stop strong{font-size:14px}.stop-label{font-size:7px}.connecting-track{width:28px}.board{grid-template-columns:repeat(5,45px);gap:5px}.tile{width:45px;height:42px;font-size:23px;border-radius:5px}.keyboard{gap:6px}.keyboard-row{gap:4px}.key{height:47px;font-size:14px;border-radius:5px}.key.wide,.key.enter{font-size:9px}.keyboard-row:nth-child(2){padding:0 15px}.game-status{font-size:10px;min-height:36px;padding-top:11px}.game-bottom{font-size:9px;padding:0 4px;margin-top:14px}.game-bottom button{font-size:9px}footer{margin:26px 18px 0;padding:18px 0;font-size:9px}footer>span:nth-child(2){display:none}footer button{font-size:9px}dialog{padding:31px 25px}.modal-title{font-size:30px}.toast{top:78px}}
@media(max-width:360px){.intro h1{font-size:23px}.wordmark{font-size:30px}.brand-train{width:39px;margin-right:3px}.header-actions{gap:4px}.icon-button{width:22px}.account-button{font-size:10px;max-width:55px}.site-header{padding:0 12px;gap:8px}.nav-divider{display:none}.game-layout{padding:0 7px}.board{grid-template-columns:repeat(5,42px)}.tile{width:42px;height:40px}.train-progress{margin-bottom:10px}.game-layout{margin-top:16px}}
/* Keep the entire keyboard visible in laptop and desktop browser windows.
   Guess rows respond to viewport height while text and controls stay readable. */
@media(min-width:661px){
  .site-header{height:64px;margin-top:0}
  .wordmark{font-size:40px}
  .brand-train{width:56px;height:46px}
  .intro{padding-top:18px}
  .eyebrow{line-height:12px}
  .intro h1{font-size:30px;line-height:1.15;margin:8px 0 6px}
  .intro>p{line-height:18px}
  .game-layout{margin-top:18px}
  .train-progress{margin-bottom:10px}
  .train-stop svg{height:44px}
  .board{row-gap:4px}
  .board .tile{
    height:36px;
    height:clamp(24px,calc((100svh - 470px)/8),40px);
    font-size:23px;
  }
  .game-status{min-height:28px;padding:6px 0;line-height:16px}
  .keyboard{gap:5px}
  .key{height:40px}
  .game-bottom{margin-top:10px;line-height:14px}
  footer{margin-top:18px;padding-top:15px;padding-bottom:15px}
}
@media(min-width:661px) and (max-height:700px){
  .site-header{height:56px}
  .intro{padding-top:10px}
  .intro h1{font-size:28px;margin:6px 0 5px}
  .game-layout{margin-top:12px}
  .train-progress{margin-bottom:8px}
  .train-stop svg{height:38px}
  .board .tile{height:clamp(24px,calc((100svh - 420px)/8),34px);font-size:22px}
  .guide-column,.clue-column{padding-top:32px}
}
/* Fit the full keyboard on phone screens, including visible browser chrome.
   svh uses the smaller available viewport; only guess tiles shrink in height. */
@media(max-width:660px){
  .site-header{height:52px}
  .wordmark{font-size:32px}
  .brand-train{width:42px;height:36px}
  .intro{padding:12px 14px 0}
  .eyebrow{line-height:12px}
  .intro h1{font-size:24px;line-height:1.15;margin:8px 0 5px}
  .intro>p{line-height:14px}
  .game-layout{margin-top:12px}
  .train-progress{margin-bottom:8px}
  .train-stop svg{height:36px}
  .board{row-gap:4px}
  .board .tile{
    height:32px;
    height:clamp(24px,calc((100svh - 420px - env(safe-area-inset-bottom,0px))/8),38px);
    font-size:22px;
  }
  .game-status{min-height:28px;padding:6px 0;line-height:16px}
  .keyboard{gap:5px}
  .key{height:44px}
  .game-bottom{margin-top:8px;line-height:14px;padding-bottom:max(6px,env(safe-area-inset-bottom,0px))}
  footer{display:none}
}
@media(max-width:360px){
  .wordmark{font-size:30px}
  .brand-train{width:39px}
  .intro h1{font-size:22px}
}
@media(max-width:660px) and (max-height:600px){
  .intro{padding-top:8px}
  .intro .eyebrow,.intro>p{display:none}
  .intro h1{margin:4px 0 0}
  .game-layout{margin-top:8px}
  .board .tile{font-size:20px}
}
.share-preview{margin:18px 0 0;padding:13px;background:#eeefe4;border-radius:8px;font:12px/1.8 var(--sans);white-space:pre-wrap;overflow-wrap:anywhere;text-align:left}
/* The train starts at the left edge; departures travel along this full-width lane. */
.game-layout{row-gap:10px}
.game-layout>.train-progress{grid-column:1/-1;justify-content:flex-start;position:relative;margin:0;min-width:0}
.guide-column,.clue-column{padding-top:8px}
.departure-lane{position:absolute;inset:-12px 0 0;overflow:hidden;pointer-events:none;z-index:2}
.departing-engine{position:absolute;top:5px;left:0;width:80px;height:52px}
.departing-engine svg{width:80px;height:52px;animation:engine-chug .18s linear infinite}
.departure-steam{position:absolute;width:10px;height:10px;border-radius:50%;background:#d4d8cb;left:48px;top:4px;opacity:0;animation:engine-steam .65s ease-out infinite}
.departure-steam:nth-child(2){animation-delay:.22s}
.departure-steam:nth-child(3){animation-delay:.44s}
@keyframes engine-chug{0%,100%{transform:translateY(0) rotate(0)}50%{transform:translateY(-2px) rotate(.6deg)}}
@keyframes engine-steam{0%{transform:translate(0,0) scale(.4);opacity:.7}100%{transform:translate(-36px,-15px) scale(1.6);opacity:0}}
@media(max-width:660px){.game-layout>.train-progress{margin-bottom:8px;gap:10px}}
@media(prefers-reduced-motion:reduce){*{animation:none!important;transition:none!important}}

.shared-clue-examples{display:flex;gap:5px;margin-bottom:7px}.shared-clue-examples .tile{width:25px;height:25px;font-size:15px;border-radius:4px}

/* Completed games always keep an obvious route back to sharing. */
.game-bottom{align-items:center;gap:8px}
.game-bottom-actions{display:flex;align-items:center;justify-content:flex-end;gap:14px;flex-wrap:wrap}
.game-bottom-actions button{white-space:nowrap}
.result-navigation{display:flex;justify-content:space-between;gap:16px;margin-top:18px}
.result-navigation button{min-height:36px;padding:8px 0}
#results-button{font-weight:700;text-decoration:underline;text-underline-offset:3px}
@media(max-width:660px){.game-bottom-actions{gap:10px}}
