:root { --ink: #f3dcb8; --paper: #1d1428; --gold: #ffcf7a; --glass: #1d1428cc; --line: #f3dcb833; }
body { background: var(--paper); }
#intro { background: radial-gradient(ellipse at 50% 60%, #2a1a3399, #0d0812ee); }
#hud::before { background: linear-gradient(#120b18e6, #120b1800); }
#card, #find { background: #1d1428f2; }
#navbar { background: #1d1428d9; }
#dirBody { background: #1d1428b8; }
#tour { background: #1b1204e6; }
#btnLib, #btnQs { display: none !important; }
#lenses .thr { border-style: dashed; } #lenses .thr.on { border-style: solid; background: var(--gold); color: #1d1428; }

#btnBuild { background: var(--gold); color: #1d1428; border-color: var(--gold); }
#bench { position: fixed; left: 16px; top: 84px; width: min(380px, calc(100vw - 32px)); max-height: calc(100vh - 110px); overflow: auto; padding: 16px 18px; border-radius: 12px; background: #1d1428f4; border: 1px solid #ffcf7a55; z-index: 6; scrollbar-width: thin; }
#bench[hidden] { display: none; }
#benchX { position: absolute; right: 10px; top: 8px; background: none; border: 0; color: var(--ink); font-size: 22px; cursor: pointer; }
#bench h2 { font: 500 24px/1.15 var(--serif); margin: 2px 0 6px; color: #fff; }
#bench p { font-size: 14px; line-height: 1.45; margin: 0 0 10px; }
#bench .dim { opacity: .78; } #bench .credit { font: 10.5px var(--mono); opacity: .65; }
#bench textarea, #bench input { width: 100%; box-sizing: border-box; margin: 4px 0; padding: 9px 11px; border-radius: 8px; border: 1px solid #f3dcb844; background: #120b18; color: var(--ink); font: 14px/1.4 var(--sans); resize: vertical; }
#bench .go { font: inherit; display: block; width: 100%; margin-top: 6px; padding: 9px 14px; border-radius: 999px; border: 1px solid var(--gold); background: var(--gold); color: #1b1204; cursor: pointer; }
#bench .go.ghost, #bench .carry { background: none; color: var(--gold); }
#bench .find-r { border-top: 1px solid #f3dcb822; margin-top: 14px; padding-top: 10px; }
#bench .lead { margin: 8px 0 6px; font: italic 16px/1.38 var(--serif); color: #fff; }
#bench audio { width: 100%; height: 32px; margin: 2px 0 6px; }
#bench .cond { display: grid; grid-template-columns: auto 1fr; gap: 3px 10px; margin: 6px 0 8px; font-size: 13px; }
#bench .cond dt { font: 10.5px var(--mono); text-transform: uppercase; letter-spacing: .06em; opacity: .7; padding-top: 2px; }
#bench .cond dd { margin: 0; } #bench .cond .gap { color: #ffb7a4; font-style: italic; border-left: 2px dashed #ef8f7a; padding-left: 8px; }
#bench .ask { display: block; font: 12px var(--mono); color: var(--gold); margin-top: 6px; }
#bench .kit { position: relative; border-left: 3px solid var(--gold); padding: 4px 26px 4px 10px; margin: 8px 0; font-size: 13px; }
#bench .kit p { margin: 2px 0; font-size: 13px; } #bench .kit .mine { color: var(--gold); }
#bench .kit button { position: absolute; right: 2px; top: 2px; background: none; border: 0; color: var(--ink); cursor: pointer; font-size: 16px; }
#bench .conn { display: block; width: 100%; text-align: left; background: none; border: 0; color: var(--ink); padding: 0; cursor: pointer; }
#bench .conn small { display: block; opacity: .7; font-size: 12px; }
@media (max-width: 900px) { #bench { left: 12px; right: 12px; top: auto; bottom: 72px; width: auto; max-height: 52vh; } }
#kindSel { font: inherit; font-size: 14px; padding: 8px 12px; border-radius: 999px; border: 1px solid var(--gold); background: #1d1428e6; color: var(--gold); max-width: 220px; }
#kindSel[hidden] { display: none; }
#grown { position: fixed; left: 50%; top: 86px; transform: translateX(-50%); z-index: 7; font: 14px var(--sans); padding: 9px 16px; border-radius: 999px; border: 1px solid var(--gold); background: #1d1428f0; color: var(--gold); cursor: pointer; box-shadow: 0 0 0 4px #ffcf7a22; }
#grown[hidden] { display: none; }
#bench .learned { border-left: 3px solid var(--gold); padding: 4px 0 2px 10px; margin: 8px 0; } #bench .learned p { font: italic 15px/1.4 var(--serif); color: #fff; margin: 4px 0; }
#bench h3.sec { font: 500 18px/1.25 var(--serif); color: #fff; margin: 18px 0 4px; border-top: 1px solid #f3dcb833; padding-top: 12px; }
#bench details { margin: 6px 0; } #bench summary { cursor: pointer; font: 12px var(--mono); color: var(--gold); padding: 6px 0; }
#bench .mini { font: 12px var(--mono); padding: 6px 12px; margin: 4px 0 2px; border-radius: 999px; border: 1px solid var(--gold); background: none; color: var(--gold); cursor: pointer; }
#bench .mini:hover { background: var(--gold); color: #1d1428; }
#bench .give { border-left: 3px solid #9fd3ff; padding-left: 10px; } #bench .give .mini { border-color: #9fd3ff; color: #9fd3ff; } #bench .mine { color: #9fd3ff; }

/* the card: wider, the picture shorter, what you can do always at the top */
#card { width: min(400px, calc(100vw - 32px)); padding-top: 14px; }
#card .hero { height: 118px; }
#card .acts { position: sticky; top: -14px; z-index: 2; display: flex; flex-wrap: wrap; gap: 8px; margin: 6px -18px 10px; padding: 10px 18px; background: linear-gradient(#1d1428 80%, #1d142800); }
#card .acts .go { flex: 1 1 140px; width: auto; margin: 0; padding: 11px 14px; font-weight: 500; text-align: center; }
#card .acts .go + .go, #card .acts a.go { background: none; color: var(--gold); }
#card details.form { margin: 8px 0; } #card details.form summary { cursor: pointer; font: 12px var(--mono); color: var(--gold); }
@media (max-width: 900px) { #card { max-height: 56vh; } #card .acts { top: -12px; margin: 4px -14px 8px; padding: 8px 14px; } #card .hero { height: 90px; } }
#card { overflow-x: hidden; }
#askForm { display: none; } /* asking goes through What we build, on the free practices door */
/* the player and the spoken notes sit just above the room's bar, however tall it wraps */
#film { bottom: calc(max(14px, env(safe-area-inset-bottom)) + var(--navH, 52px) + 8px); }
#tip { bottom: max(176px, calc(max(14px, env(safe-area-inset-bottom)) + var(--navH, 52px) + 60px)); } /* clear of the lens pill from above, and of the room bar inside */
/* the commons is seen at once, from a still, while the live one is set out behind it */
#intro:has(#go:disabled) { background: radial-gradient(ellipse at 50% 55%, #1d142866, #1d1428d8 70%), url(../media/world/made/commons-still.webp) center / cover no-repeat, #1d1428; }
#intro a { color: var(--gold); }
/* the directory starts folded; each lens explains itself in one pill above the lens bar */
#dirToggle { display: block; }
#dir { bottom: auto; }
#dirBody { display: none; margin-top: 6px; max-height: calc(100vh - 240px); }
#dir.open #dirBody { display: block; }
#legend { left: 50%; transform: translateX(-50%); bottom: calc(max(20px, env(safe-area-inset-bottom)) + 64px); max-width: min(620px, calc(100vw - 32px)); padding: 9px 16px; border-radius: 14px; background: #1d1428e0; border: 1px solid var(--line); text-shadow: none; text-align: center; }
#legend:empty { display: none; }
#legend b { display: inline; margin-right: 6px; }
#card p.facts { font: 500 16px/1.45 var(--sans); color: #fff; }
#card .credit { font: 13.5px/1.45 var(--sans); opacity: .82; letter-spacing: 0; }
/* on a phone: one row of tools, no joystick (tap the floor to walk), and a smaller map */
@media (max-width: 620px) {
  #tools { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; max-width: calc(100vw - 20px); }
  #tools::-webkit-scrollbar { display: none; }
  #tools button { flex: none; font-size: 13px; padding: 6px 11px; }
  #pad { display: none !important; }
  #mini { width: 92px; height: 92px; }
  #lenses { max-width: calc(100vw - 20px); overflow-x: auto; scrollbar-width: none; }
}
/* the first choice: five ways in, each one line and why */
#card .startgo { display: block; width: 100%; text-align: left; margin: 8px 0 0; padding: 12px 14px; min-height: 44px; border-radius: 14px; border: 1px solid #ffcf7a55; background: #ffcf7a12; color: var(--ink); font: inherit; cursor: pointer; }
#card .startgo:hover, #card .startgo:focus-visible { background: #ffcf7a2a; border-color: var(--gold); }
#card .startgo b { display: block; font: 500 17px/1.25 var(--serif); color: #fff; }
#card .startgo small { display: block; margin-top: 3px; font-size: 13px; opacity: .78; }
/* a find result shows the words that matched, in the speaker's own words */
#findR em.said { display: block; margin-top: 3px; font: italic 14px/1.4 var(--serif); color: #f3dcb8d9; }
/* the way on glows once when a voice finishes */
@keyframes nudge { 0%, 100% { box-shadow: 0 0 0 0 #ffcf7a00; } 40% { box-shadow: 0 0 0 8px #ffcf7a55; } }
#nMain.nudge { animation: nudge 1.4s ease-out 2; }
@media (prefers-reduced-motion: reduce) { #nMain.nudge { animation: none; outline: 2px solid var(--gold); } }
/* the way home to What We Carry, small, above where you are */
#home { display: inline-block; margin-bottom: 4px; font: 12px var(--mono); letter-spacing: .04em; color: var(--gold); text-decoration: none; pointer-events: auto; padding: 4px 0; }
#home:hover, #home:focus-visible { text-decoration: underline; }
/* on a phone the welcome card sits on solid ground, so the names drawn below don't show through its words */
@media (max-width: 620px) { #intro { background: #1d1428f2 !important; } }
