/* Tents and Trees: the dusk scene, the meadow board, its numbers, tents and trees are one canvas filling the stage; the
   HUD, the tool bar, the coach line, the result card and the panels are HTML over it (game.js keeps the board between them) */
.tt { display: flex; flex-direction: column; color: #e9edff; --tt-hud: 54px; --tt-bar: 64px; --tt-accent: #55d6ff; --tt-gold: #ffd166; --tt-amber: #ffb36b; --tt-leaf: #7fe3a6;
  --tt-rose: #ff8fb1; --tt-line: #1c2b4a; --tt-glass: rgba(9,12,32,0.82); --tt-muted: #8aa3c4; }
.tt-stage { position: relative; width: 100%; height: min(86vh, 800px); min-height: 480px; background: #070a1f; overflow: hidden;
  user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; -webkit-tap-highlight-color: transparent; touch-action: none; outline: none; }
@media (max-width: 600px) { .tt-stage { height: auto; aspect-ratio: 3 / 4.5; max-height: 88vh; min-height: 0; } }
#tt-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; outline: none; cursor: pointer; }
#tt-canvas:focus-visible { box-shadow: inset 0 0 0 2px rgba(85,214,255,.5); }

/* HUD */
.tt-hud { position: absolute; left: 0; right: 0; top: 0; height: var(--tt-hud); display: flex; align-items: center; gap: 14px; padding: 0 8px 0 10px; z-index: 3; pointer-events: none; }
.tt-hud > * { pointer-events: auto; }
.tt-pz { flex: 0 1 auto; display: flex; flex-direction: column; align-items: flex-start; justify-content: center; position: relative; min-width: 96px; max-width: 46vw; height: 44px; padding: 2px 26px 2px 10px; border-radius: 12px;
  border: 1px solid var(--tt-line); background: var(--tt-glass); color: #fff; cursor: pointer; font: inherit; line-height: 1.05; touch-action: manipulation; text-align: left; transition: border-color .15s; }
.tt-pz-lv { font-size: 10px; font-weight: 800; letter-spacing: 0.16em; text-transform: uppercase; color: var(--dc, #9aa8d6); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.tt-pz-n { font-size: 18px; font-weight: 900; letter-spacing: 0.01em; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.tt-pz-dd { position: absolute; right: 6px; top: 50%; width: 16px; height: 16px; margin-top: -8px; fill: none; stroke: #9aa8d6; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
@media (hover: hover) { .tt-pz:hover { border-color: var(--tt-accent); } }
.tt-pz:focus-visible { outline: 2px solid var(--tt-accent); outline-offset: 2px; }
.tt-stat { display: flex; flex-direction: column; line-height: 1.05; flex: none; }
.tt-k { font-size: 10px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: #9aa8d6; }
.tt-stat b { font-size: 21px; font-weight: 800; color: #fff; font-variant-numeric: tabular-nums; letter-spacing: -0.01em; white-space: nowrap; }
.tt-count b { display: inline-block; transition: transform .16s cubic-bezier(.3,1.6,.5,1), color .16s; transform-origin: left center; }
.tt-count b.pop { transform: scale(1.14); }
.tt-count b.full { color: var(--tt-leaf); }
.tt-count b.over { color: #ff9b8a; }
.tt-count small { font-size: 13px; font-weight: 700; color: #9aa8d6; margin-left: 1px; letter-spacing: 0; }
.tt-time b { font-size: 17px; margin-top: 3px; color: #e9edff; }
.tt-notimer .tt-time { display: none; }
.tt-sp { flex: 1 1 auto; }
.tt-tool { position: relative; display: grid; place-items: center; width: 40px; height: 40px; flex: none; border-radius: 12px; border: 1px solid var(--tt-line); background: var(--tt-glass);
  color: #cdd6ff; cursor: pointer; touch-action: manipulation; padding: 0; transition: border-color .15s, color .15s, opacity .15s; }
.tt-tool::before, .tt-x::before { content: ""; position: absolute; inset: -3px; border-radius: inherit; }
.tt-tool svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.tt-tool .spk { fill: currentColor; stroke: none; }
@media (hover: hover) { .tt-tool:hover:not(:disabled) { border-color: var(--tt-accent); color: #fff; } }
.tt-tool:focus-visible { outline: 2px solid var(--tt-accent); outline-offset: 2px; }
#tt-sound .off { display: none; } #tt-sound[aria-pressed="true"] { color: #6d76a8; } #tt-sound[aria-pressed="true"] .on { display: none; } #tt-sound[aria-pressed="true"] .off { display: inline; }
.tt-dot { position: absolute; top: 6px; right: 6px; width: 8px; height: 8px; border-radius: 50%; background: var(--tt-amber); box-shadow: 0 0 8px var(--tt-amber); }
.tt-dot[hidden] { display: none; }

/* the coach line: a hint and why, or a word for a first game */
.tt-coach[hidden] { display: none; }
.tt-coach { position: absolute; left: 50%; transform: translateX(-50%); top: calc(var(--tt-hud) + 4px); z-index: 3; width: min(calc(100% - 20px), 560px); padding: 8px 34px 9px 12px; border-radius: 12px;
  background: rgba(9,12,32,0.92); border: 1px solid rgba(127,227,166,0.45); box-shadow: 0 10px 30px rgba(0,0,0,.45), 0 0 18px rgba(127,227,166,.12); font-size: 13.5px; line-height: 1.4; color: #e9edff;
  animation: tt-drop .22s ease-out; pointer-events: auto; }
@keyframes tt-drop { from { opacity: 0; transform: translate(-50%, -6px); } }
@keyframes tt-rise { from { opacity: 0; transform: translate(-50%, 6px); } }
.tt-coach b { color: var(--tt-leaf); font-weight: 800; margin-right: 6px; }
.tt-coach.hint { border-color: rgba(255,209,102,0.6); box-shadow: 0 10px 30px rgba(0,0,0,.45), 0 0 18px rgba(255,209,102,.14); }
.tt-coach.hint b { color: var(--tt-gold); }
.tt-coach.oops { border-color: rgba(255,123,107,0.6); } .tt-coach.oops b { color: #ff9b8a; }
.tt-coach small { display: block; color: #9aa8d6; font-size: 12px; margin-top: 2px; }
.tt-coach-act { display: flex; gap: 6px; margin-top: 7px; } .tt-coach-act:empty { display: none; }
.tt-coach-act button { font: inherit; font-size: 13px; font-weight: 800; min-height: 38px; padding: 5px 12px; border-radius: 10px; cursor: pointer; touch-action: manipulation; border: 1px solid var(--tt-line); background: #0d1433; color: #e9edff; }
.tt-coach-act button.go { background: linear-gradient(135deg, #ffd166, #ffb36b); color: #1d1204; border-color: transparent; }
.tt-coach-act button:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.tt-coach-close { position: absolute; top: 1px; right: 1px; width: 38px; height: 38px; border: 0; border-radius: 50%; background: transparent; color: #9aa8d6; font-size: 19px; line-height: 1; cursor: pointer; }
@media (hover: hover) { .tt-coach-close:hover { color: #fff; background: rgba(255,255,255,.08); } }

/* the tool bar */
.tt-bar { position: absolute; left: 50%; transform: translateX(-50%); bottom: 8px; height: calc(var(--tt-bar) - 12px); z-index: 3; display: flex; gap: 6px; padding: 0 6px; width: min(calc(100% - 12px), 540px); }
.tt-btn { position: relative; flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; border-radius: 14px; border: 1px solid var(--tt-line);
  background: rgba(9,12,32,0.86); color: #d6ddff; font: inherit; font-size: 11.5px; font-weight: 700; letter-spacing: 0.02em; cursor: pointer; touch-action: manipulation; padding: 0 2px;
  transition: border-color .15s, color .15s, opacity .15s, background .15s, transform .08s; }
.tt-btn svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.tt-btn span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
@media (hover: hover) { .tt-btn:hover:not(:disabled) { border-color: var(--tt-accent); color: #fff; } }
.tt-btn:active:not(:disabled) { transform: translateY(1px); }
.tt-btn:focus-visible { outline: 2px solid var(--tt-accent); outline-offset: 2px; }
.tt-btn:disabled { opacity: 0.36; cursor: default; }
.tt-hint { color: #ffe3a3; }
.tt-btn[hidden] { display: none; }
.tt-zoomable .tt-btn { letter-spacing: 0; }
@media (max-width: 400px) { .tt-zoomable .tt-bar { gap: 5px; } .tt-zoomable .tt-btn { font-size: 10px; } }
.tt-zoom.in { color: var(--tt-accent); border-color: rgba(85,214,255,.5); box-shadow: inset 0 0 14px rgba(85,214,255,.12); } .tt-zoom.in .plus { display: none; }
@media (hover: hover) { .tt-hint:hover:not(:disabled) { border-color: var(--tt-gold); } }
.tt-next.ready { background: linear-gradient(135deg, #ffd166, #ffb36b); color: #1d1204; border-color: transparent; box-shadow: 0 6px 22px rgba(255,179,107,0.35); }
/* on a wide, short stage (a phone on its side) the coach sits at the left, beside the board, instead of above it */
.tt-side .tt-coach { left: 8px; transform: none; width: min(300px, 36%); max-height: calc(100% - var(--tt-hud) - 16px); overflow: auto; overscroll-behavior: contain; animation-name: tt-drop-side; }
@keyframes tt-drop-side { from { opacity: 0; transform: translateY(-6px); } }
.tt-side .tt-card { left: 8px; transform: none; bottom: 8px; width: min(340px, 42%); max-height: calc(100% - var(--tt-hud) - 12px); animation-name: tt-up-side; }
@keyframes tt-up-side { from { opacity: 0; transform: translateY(24px); } }
.tt-side .tt-bar { left: auto; right: 8px; top: calc(var(--tt-hud) + 4px); bottom: 8px; transform: none; height: auto; width: 76px; flex-direction: column; padding: 0; }
.tt-side .tt-btn { font-size: 10.5px; }

/* the result card: a strip over the bottom of the board, so the lit campsite stays in view */
.tt-card[hidden] { display: none; }
.tt-card { position: absolute; left: 50%; bottom: 10px; transform: translateX(-50%); z-index: 4; width: min(calc(100% - 16px), 460px); padding: 14px 14px 12px; border-radius: 18px;
  background: rgba(9,12,32,0.93); border: 1px solid rgba(255,209,102,0.35); box-shadow: 0 18px 50px rgba(0,0,0,.6), 0 0 40px rgba(255,179,107,.12); animation: tt-up .35s cubic-bezier(.2,.9,.25,1.1);
  max-height: calc(100% - var(--tt-hud) - 20px); overflow: auto; overscroll-behavior: contain; }
@keyframes tt-up { from { opacity: 0; transform: translate(-50%, 24px); } }
.tt-card h2 { margin: 0; font-size: 22px; font-weight: 900; color: #fff; letter-spacing: 0.01em; text-transform: none; line-height: 1.15; text-shadow: 0 0 22px rgba(255,179,107,.55); }
.tt-card p { margin: 3px 0 0; font-size: 13px; color: #9aa8d6; line-height: 1.45; }
.tt-card .tt-stats { margin-top: 10px; }
.tt-card .tt-actions { margin-top: 12px; }
.tt-card .tt-lb { margin-top: 8px; }
.tt-card h3 { margin: 12px 0 6px; font-size: 11.5px; font-weight: 800; letter-spacing: 0.16em; text-transform: uppercase; color: #9aa8d6; line-height: 1.3; }
.tt-card .tt-lb .tt-fine { margin-top: 2px !important; }

/* panels */
.tt-overlay[hidden] { display: none; }
.tt-overlay { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; padding: 12px; z-index: 6; overflow: auto;
  background: radial-gradient(ellipse at center, rgba(5,7,20,0.5), rgba(3,4,12,0.86)); animation: tt-fade .18s ease-out; }
.tt-panel { position: relative; width: min(100%, 440px); margin: auto; padding: 20px 18px 18px; border: 1px solid var(--tt-line); border-radius: 18px; text-align: left; outline: none;
  background: rgba(9,12,32,0.96); box-shadow: 0 20px 60px rgba(0,0,0,0.55), 0 0 0 1px rgba(85,214,255,0.05) inset; animation: tt-in .26s cubic-bezier(.2,.9,.25,1.1); }
.tt-panel.wide { width: min(100%, 580px); }
@keyframes tt-in { from { opacity: 0; transform: scale(.95) translateY(8px); } }
@keyframes tt-fade { from { opacity: 0; } }
.tt-panel h2 { margin: 0 36px 12px 0; font-size: 20px; font-weight: 900; color: #fff; letter-spacing: 0.01em; text-transform: none; line-height: 1.25; }
.tt-panel h3 { margin: 16px 0 8px; font-size: 11.5px; font-weight: 800; letter-spacing: 0.16em; text-transform: uppercase; color: #9aa8d6; }
.tt-panel p, .tt-panel li { font-size: 13.5px; line-height: 1.55; color: #c0c8ea; }
.tt-panel p { margin: 0 0 9px; }
.tt-panel ul { margin: 0 0 8px; padding-left: 18px; }
.tt-panel kbd { display: inline-block; min-width: 1.4em; padding: 0 5px; border-radius: 5px; border: 1px solid #2c3a70; background: #0b1028; color: #fff; font: 700 12px/1.6 system-ui, sans-serif; text-align: center; }
.tt-x { position: absolute; top: 12px; right: 12px; width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; border: 0; background: rgba(255,255,255,.07); color: #d6ddff; cursor: pointer; padding: 0; z-index: 2; }
.tt-x svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; }
@media (hover: hover) { .tt-x:hover { background: rgba(255,255,255,.14); color: #fff; } }
.tt-x:focus-visible { outline: 2px solid var(--tt-accent); outline-offset: 2px; }
.tt-fine { font-size: 12px !important; color: #7884b0 !important; margin: 8px 0 0 !important; line-height: 1.45 !important; }

.tt-actions { display: flex; flex-direction: column; gap: 8px; margin-top: 14px; }
.tt-row { display: flex; gap: 8px; } .tt-row > * { flex: 1 1 0; }
.tt-b { font: inherit; font-weight: 700; font-size: 14.5px; padding: 10px 14px; min-height: 46px; border-radius: 12px; cursor: pointer; touch-action: manipulation; text-decoration: none;
  border: 1px solid var(--tt-line); background: #0c1230; color: #e9edff; transition: background .15s, border-color .15s, transform .1s, filter .15s; display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
@media (hover: hover) { .tt-b:hover:not(:disabled) { border-color: var(--tt-accent); } }
.tt-b:active { transform: translateY(1px); }
.tt-b:disabled { opacity: .45; cursor: default; }
.tt-b:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.tt-b svg { width: 17px; height: 17px; flex: none; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.tt-b span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tt-b-primary { background: linear-gradient(135deg, #ffd166, #ffb36b); color: #1d1204; border-color: transparent; font-size: 16px; font-weight: 800; box-shadow: 0 6px 24px rgba(255,179,107,0.3); }
@media (hover: hover) { .tt-b-primary:hover:not(:disabled) { border-color: transparent; filter: brightness(1.06); } }
.tt-b-sm { min-height: 40px; padding: 6px 10px; font-size: 13px; }

/* stats */
.tt-tag { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 11px; font-weight: 900; letter-spacing: 0.14em; text-transform: uppercase; vertical-align: middle; margin-left: 6px;
  color: #1a1200; background: linear-gradient(90deg, #ffd166, #fff1b8, #ffd166); background-size: 200% 100%; animation: tt-shine 1.6s linear infinite; box-shadow: 0 0 18px rgba(255,209,102,0.5); }
@keyframes tt-shine { to { background-position: -200% 0; } }
.tt-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin: 10px 0 4px; }
.tt-stats.three { grid-template-columns: repeat(3, 1fr); }
.tt-stats div { padding: 8px 4px; border-radius: 10px; background: #070b22; border: 1px solid #161d44; text-align: center; min-width: 0; }
.tt-stats span { display: block; font-size: 9.5px; letter-spacing: 0.12em; text-transform: uppercase; color: #6f7aa8; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tt-stats b { display: block; margin-top: 2px; font-size: 17px; color: #e9edff; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tt-stats .gold b { color: var(--tt-gold); } .tt-stats .ok b { color: var(--tt-leaf); } .tt-stats .hot b { color: var(--tt-amber); }
.tt-lb ol { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 3px; }
.tt-lb h3 { margin-top: 6px; }
.tt-lb li { display: grid; grid-template-columns: 26px 1fr auto auto; gap: 8px; align-items: center; padding: 5px 8px; border-radius: 8px; background: #070b22; font-size: 13px; }
.tt-lb li span { color: #6f7aa8; font-weight: 800; font-variant-numeric: tabular-nums; }
.tt-lb li b { color: #e9edff; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 700; }
.tt-lb li em { font-style: normal; color: var(--tt-gold); font-weight: 800; font-variant-numeric: tabular-nums; }
.tt-lb li i { font-style: normal; color: #9aa8d6; font-variant-numeric: tabular-nums; font-size: 12px; }
.tt-lb li.me { background: rgba(85,214,255,0.12); box-shadow: inset 0 0 0 1px rgba(85,214,255,0.4); }

/* the puzzle picker */
.tt-dailyc { position: relative; display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px; border-radius: 15px; border: 1px solid var(--tt-line); color: #e9edff; font: inherit; text-align: left; cursor: pointer; touch-action: manipulation;
  background: radial-gradient(120% 140% at 100% 0%, rgba(255,179,107,.22), transparent 60%), radial-gradient(90% 120% at 0% 100%, rgba(167,123,255,.16), transparent 60%), #080c25; transition: border-color .15s, transform .1s; }
.tt-dailyc svg { width: 34px; height: 34px; flex: none; fill: none; stroke: var(--tt-amber); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; filter: drop-shadow(0 0 6px rgba(255,179,107,.6)); }
.tt-dailyc b { display: block; font-size: 15.5px; color: #fff; } .tt-dailyc small { display: block; font-size: 12px; color: #9aa8d6; line-height: 1.35; margin-top: 1px; }
.tt-dailyc em { margin-left: auto; font-style: normal; font-size: 12px; font-weight: 800; color: var(--tt-amber); white-space: nowrap; }
@media (hover: hover) { .tt-dailyc:hover { border-color: var(--tt-amber); } }
.tt-dailyc:focus-visible { outline: 2px solid var(--tt-amber); outline-offset: 2px; }
.tt-seg { display: grid; grid-template-columns: repeat(6, 1fr); gap: 4px; padding: 4px; border-radius: 12px; background: #070b22; border: 1px solid var(--tt-line); }
.tt-seg button { min-height: 38px; border: 0; border-radius: 8px; background: transparent; color: #9aa8d6; font: 800 13px system-ui, sans-serif; font-variant-numeric: tabular-nums; cursor: pointer; padding: 0 2px; touch-action: manipulation; white-space: nowrap; }
.tt-seg button[aria-pressed="true"] { background: #162050; color: #fff; box-shadow: inset 0 0 0 1px rgba(85,214,255,.5), 0 0 14px rgba(85,214,255,.15); }
.tt-seg button:focus-visible { outline: 2px solid var(--tt-accent); outline-offset: 1px; }
.tt-seg.two { grid-template-columns: repeat(2, 1fr); }
.tt-list { display: flex; flex-direction: column; gap: 6px; }
.tt-li { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 12px; border-radius: 13px; border: 1px solid #161d44; background: #070b22; color: #e9edff; font: inherit; text-align: left; cursor: pointer; touch-action: manipulation; transition: border-color .15s; }
.tt-li:disabled { opacity: .42; cursor: default; }
@media (hover: hover) { .tt-li:not(:disabled):hover { border-color: var(--lc, var(--tt-accent)); } }
.tt-li:focus-visible { outline: 2px solid var(--tt-accent); outline-offset: 2px; }
.tt-li.cur { border-color: color-mix(in srgb, var(--lc) 60%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--lc) 35%, transparent); }
.tt-li-ic { width: 38px; height: 38px; flex: none; display: grid; place-items: center; border-radius: 11px; background: color-mix(in srgb, var(--lc, #55d6ff) 15%, transparent); color: var(--lc, #55d6ff); }
.tt-li-ic svg { width: 24px; height: 24px; }
.tt-li-t { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.tt-li-t b { font-size: 14.5px; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .tt-li-t small { font-size: 12px; color: #9aa8d6; line-height: 1.35; }
.tt-li-s { font-size: 12px; font-weight: 800; color: #6f7aa8; white-space: nowrap; text-align: right; line-height: 1.35; font-variant-numeric: tabular-nums; } .tt-li-s.ok { color: var(--lc); }
.tt-li-s small { display: block; font-weight: 700; color: #6f7aa8; }

/* calendar */
.tt-cal-head { display: flex; align-items: center; gap: 8px; margin: 12px 0 6px; }
.tt-cal-head b { flex: 1 1 auto; text-align: center; color: #fff; font-size: 15px; }
.tt-step { width: 42px; height: 42px; flex: none; display: grid; place-items: center; padding: 0; border-radius: 10px; border: 1px solid #26305f; background: #0c1230; color: #e9edff; cursor: pointer; }
.tt-step svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.tt-step:disabled { opacity: .35; cursor: default; }
.tt-cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.tt-cal-w { text-align: center; font-size: 10.5px; font-weight: 800; color: #6f7aa8; padding: 2px 0; }
.tt-cal-d { position: relative; aspect-ratio: 1.3; display: grid; place-items: center; border-radius: 9px; border: 1px solid #161d44; background: #070b22; color: #d6ddff; font: 700 13px system-ui, sans-serif; cursor: pointer; padding: 0; }
.tt-cal-d.off { opacity: .28; cursor: default; }
.tt-cal-d.ok { background: rgba(127,227,166,0.12); border-color: rgba(127,227,166,0.55); color: var(--tt-leaf); }
.tt-cal-d.ok::after { content: ""; position: absolute; bottom: 4px; left: 50%; width: 5px; height: 5px; margin-left: -2.5px; border-radius: 50%; background: var(--tt-gold); box-shadow: 0 0 6px var(--tt-gold); }
.tt-cal-d.today { box-shadow: 0 0 0 2px var(--tt-amber), 0 0 14px rgba(255,179,107,.45); }
.tt-cal-pad { aspect-ratio: 1.3; }
@media (hover: hover) { .tt-cal-d:not(.off):hover { border-color: var(--tt-accent); } }
.tt-cal-d:focus-visible { outline: 2px solid var(--tt-accent); outline-offset: 1px; }

/* settings, tabs, help */
.tt-set { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid #141b40; cursor: pointer; }
.tt-set span { display: flex; flex-direction: column; gap: 2px; } .tt-set b { font-size: 14px; color: #fff; } .tt-set small { font-size: 12px; color: #9aa8d6; line-height: 1.35; }
.tt-set input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.tt-sw { position: relative; width: 46px; height: 27px; flex: none; border-radius: 14px; border: 1px solid #26305f; background: #0c1230; transition: background .15s, border-color .15s; }
.tt-sw::after { content: ""; position: absolute; top: 3px; left: 3px; width: 19px; height: 19px; border-radius: 50%; background: #6d76a8; transition: transform .15s, background .15s; }
.tt-set input:checked + .tt-sw { background: #123a2c; border-color: var(--tt-leaf); }
.tt-set input:checked + .tt-sw::after { transform: translateX(19px); background: var(--tt-leaf); box-shadow: 0 0 10px rgba(127,227,166,.7); }
.tt-set input:focus-visible + .tt-sw { outline: 2px solid var(--tt-accent); outline-offset: 2px; }
.tt-setrow { padding: 10px 0; border-bottom: 1px solid #141b40; }
.tt-setrow > span { display: flex; flex-direction: column; gap: 2px; margin-bottom: 8px; } .tt-setrow b { font-size: 14px; color: #fff; } .tt-setrow small { font-size: 12px; color: #9aa8d6; }
.tt-tabs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; padding: 4px; border-radius: 13px; background: #070b22; border: 1px solid var(--tt-line); margin: 0 0 12px; }
.tt-tab { font: inherit; font-size: 13.5px; font-weight: 700; color: #9aa8d6; background: transparent; border: 0; border-radius: 9px; min-height: 38px; cursor: pointer; }
.tt-tab[aria-selected="true"] { background: #162050; color: #fff; box-shadow: inset 0 0 0 1px rgba(127,227,166,0.45), 0 0 16px rgba(127,227,166,0.14); }
.tt-tab:focus-visible { outline: 2px solid var(--tt-accent); outline-offset: 1px; }
.tt-howto { display: grid; grid-template-columns: 66px 1fr; gap: 12px 12px; align-items: center; margin: 4px 0 8px; }
.tt-howto svg { width: 66px; height: 58px; }
.tt-howto p { margin: 0; }
.tt-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.tt-table th, .tt-table td { padding: 6px 4px; text-align: right; border-bottom: 1px solid #141b40; font-variant-numeric: tabular-nums; }
.tt-table th:first-child, .tt-table td:first-child { text-align: left; }
.tt-table thead th { font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; color: #6f7aa8; }
.tt-table tbody th { color: #fff; font-weight: 700; }
.tt-table td { color: #d6ddff; } .tt-table td.dim { color: #4c5684; }
.tt-tswrap { overflow-x: auto; margin: 0 -2px; }

.tt-toast[hidden] { display: none; }
.tt-toast { position: absolute; left: 50%; bottom: calc(var(--tt-bar) + 10px); transform: translateX(-50%); z-index: 7; padding: 8px 14px; border-radius: 999px; background: #e9edff; color: #0a0b1d; font-size: 13px; font-weight: 800; animation: tt-rise .2s ease-out; pointer-events: none; white-space: nowrap; max-width: calc(100% - 24px); overflow: hidden; text-overflow: ellipsis; }
.tt-side .tt-toast { bottom: 14px; }
.tt-loading[hidden] { display: none; }
.tt-loading { position: absolute; inset: 0; z-index: 5; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; background: rgba(4,5,16,0.45); color: #d6ddff; font-size: 14px; pointer-events: none; }
.tt-spin { width: 34px; height: 34px; border-radius: 50%; border: 3px solid rgba(255,179,107,.2); border-top-color: var(--tt-amber); animation: tt-rot .9s linear infinite; }
@keyframes tt-rot { to { transform: rotate(360deg); } }
.tt-sr { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

.tt-help { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 6px 14px; text-align: center; }
.tt-help .hint-touch { display: none; }
@media (hover: none) and (pointer: coarse) { .tt-help .hint-kb { display: none; } .tt-help .hint-touch { display: inline; } }
.stage .tt-help { padding: 10px 14px 12px; }

/* narrow phones */
@media (max-width: 560px) { .tt-hud { gap: 10px; } }
@media (max-width: 460px) {
  .tt-hud { gap: 8px; padding-left: 8px; padding-right: 6px; }
  .tt-pz { padding-right: 22px; padding-left: 8px; max-width: 50vw; }
  .tt-pz-lv { letter-spacing: 0.08em; }
  .tt-pz-n { font-size: 16px; }
  .tt-stat b { font-size: 19px; }
  .tt-count small { font-size: 12px; }
  .tt-time b { font-size: 14px; }
  .tt-tool { width: 36px; height: 36px; border-radius: 11px; }
  .tt-btn { font-size: 10.5px; border-radius: 12px; }
  .tt-panel { padding: 18px 14px 14px; }
  .tt-stats b { font-size: 15px; }
  .tt-seg button { font-size: 12px; }
  .tt-cal-d { min-height: 40px; }
}
@media (max-width: 420px) { .tt-hud { gap: 6px; } .tt-count small { font-size: 11px; } }
@media (max-width: 359px) { .tt-time { display: none; } }
@media (max-width: 400px) { #tt-sound { display: none; } }

/* full screen: the campsite takes every pixel */
.stage.is-immersive .stage-body > .tt { min-height: 0; flex: 1 1 auto; }
.stage.is-immersive .tt-stage { flex: 1 1 auto; height: auto; aspect-ratio: auto; max-height: none; min-height: 0; }
.stage.is-immersive .tt-help { display: none; }
@media (prefers-reduced-motion: reduce) { .tt-panel, .tt-toast, .tt-coach, .tt-overlay, .tt-card { animation: none; } .tt-tag { animation: none; } .tt-count b { transition: none; } }
.tt-calm .tt-panel, .tt-calm .tt-toast, .tt-calm .tt-coach, .tt-calm .tt-overlay, .tt-calm .tt-card { animation: none; } .tt-calm .tt-tag { animation: none; }
