/* © 2026 William C. Chesher. All Rights Reserved.
   companion - the phone companion's skin (companion/index.html). Phone first: one column, the tabs
   under the thumb, big targets. spawn's tokens (tokens.css), its pixel labels, its one lime action.
   On a tablet or a desktop the column just gets a comfortable width. */
@import url("/tokens.css");

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { background: var(--surface); }
body { margin: 0; color: var(--ink); font: 17px/1.55 var(--body); min-height: 100dvh; -webkit-text-size-adjust: 100%; }
a { color: var(--accent); text-underline-offset: 3px; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
code { font-family: var(--mono); font-size: .92em; color: var(--ink); }
.grow { flex: 1 1 auto; min-width: 0; }

.app { max-width: 640px; margin: 0 auto; padding: 0 16px calc(84px + env(safe-area-inset-bottom)); }
.top { display: flex; align-items: baseline; gap: 12px; padding: 18px 0 10px; }
.lockup { font: 800 26px/.9 var(--display); letter-spacing: -.055em; color: var(--ink); text-decoration: none; display: flex; align-items: baseline; }
.lockup .pt { width: .17em; height: .17em; margin-left: .05em; background: var(--accent); display: inline-block; }
/* the door's mini hero: the mark and the word larger on the stage, the link box under them on it */
.companion-hero { margin: 14px 0 16px; }
.companion-hero .top { align-items: center; padding: 0 0 14px; }
.companion-hero .lockup { align-items: center; gap: 12px; font-size: 38px; }
.companion-hero .word { display: flex; align-items: baseline; }
.lockmark { width: 44px; height: 44px; flex: none; display: block; }
.lockmark .frame { fill: none; stroke: var(--muted); stroke-width: 3; stroke-linecap: square; }
.lockmark .p1 { fill: var(--accent); }
.lockmark .p2 { fill: var(--p2); }
.companion-hero .link { margin: 0; background: color-mix(in srgb, var(--surface) 70%, transparent); }
.eyebrow { font: 400 var(--type-small)/1.4 var(--pixel); color: var(--muted); margin: 0; }
.eyebrow .n, .n { color: var(--accent); font-family: var(--pixel); }

/* the link to the studio */
.link { display: flex; align-items: center; gap: 10px; padding: 10px 12px; margin: 0 0 14px; border: 1px dashed var(--line-2); border-radius: var(--radius-sm);
  font-size: var(--type-small); color: var(--ink-2); }
.link.on { border-style: solid; border-color: var(--accent); color: var(--ink); }
.link .dot { width: 9px; height: 9px; background: var(--accent); flex: none; animation: blink 1.6s steps(2, end) infinite; }
@keyframes blink { 50% { opacity: .25; } }
.link-form { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; width: 100%; }
.code-in { width: 7.5em; min-height: 44px; padding: 0 10px; background: var(--well); border: 1px solid var(--line); border-radius: var(--radius-sm);
  font-family: var(--mono); text-transform: lowercase; letter-spacing: .12em; }
.quiet-link { background: none; border: 0; padding: 8px 4px; color: var(--muted); font-size: var(--type-small); text-decoration: underline; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 20px; border-radius: var(--radius-sm);
  background: transparent; border: 1px solid var(--line-2); color: var(--ink-2); font-weight: 600; }
.btn:disabled { opacity: .4; cursor: default; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.primary.ready { box-shadow: 0 0 0 4px var(--accent-soft); }

/* the tabs, under the thumb; the Feedback corner (suite-feedback.js) sits on top of them */
:root { --feedback-lift: 69px; }
.tabs { position: fixed; left: 0; right: 0; bottom: 0; z-index: 10; display: grid; grid-template-columns: repeat(4, 1fr);
  padding: 6px max(8px, env(safe-area-inset-left)) calc(6px + env(safe-area-inset-bottom)); background: color-mix(in srgb, var(--surface) 88%, transparent);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); border-top: 1px solid var(--line); }
.tab { min-height: 56px; padding: 0 2px; background: none; border: 0; border-top: 3px solid transparent; font: 600 14px/1.2 var(--body); color: var(--muted); }
/* a phone tab bar: the icon over its word, lit lime on the page you are on */
.tab { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; }
.tab .icon { width: 18px; height: 18px; color: var(--muted); }
.tab[aria-current="page"] .icon { color: var(--accent); }
.tab[aria-current="page"] { color: var(--accent); border-top-color: var(--accent); }

h2 { font: 700 var(--type-lead)/1.25 var(--display); margin: 6px 0 8px; }
.say { color: var(--ink-2); margin: 0 0 14px; line-height: 1.55; }

/* quest: the world map */
.map { display: grid; gap: 12px; margin: 20px 0 0; }
.world-name { margin: 0 0 6px; font-size: 15px; color: var(--ink-2); }
.world-name .n { margin-right: 6px; font-size: var(--type-label); }
.levels { display: flex; flex-wrap: wrap; gap: 6px; }
.level { width: 48px; height: 48px; display: grid; place-items: center; background: var(--panel-2); border: 1px solid var(--line); border-radius: 4px;
  font: 600 14px var(--mono); color: var(--ink-2); }
.level.lit { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.level.here { outline: 2px solid var(--ink); outline-offset: 2px; }
.level-card { position: relative; padding: 16px; background: var(--panel); border: 1px solid var(--line-2); border-radius: var(--radius); animation: spawn-in var(--step) both; }
.task { margin: 0 0 12px; padding: 10px 12px; background: var(--well); border-left: 3px solid var(--caution); border-radius: 4px; color: var(--ink); }
.task.done { border-left-color: var(--accent); }
.task .tag { display: block; margin-bottom: 2px; font: 600 13px var(--mono); color: var(--caution); }
.task.done .tag { color: var(--accent); }
.more summary, .topic summary { cursor: pointer; padding: 12px 0; font-weight: 600; color: var(--ink); }
.more div { color: var(--ink-2); padding-bottom: 8px; line-height: 1.55; }
.step-row { display: flex; gap: 10px; margin-top: 12px; }
.step-row .btn { flex: 1 1 0; }
.quest-count { margin: 14px 0 0; font-size: var(--type-small); color: var(--muted); }

/* here */
.places { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.place { min-height: 44px; padding: 0 12px; background: var(--panel-2); border: 1px solid var(--line); border-radius: 999px; color: var(--ink-2); font-size: var(--type-small); }
.place.on { border-color: var(--accent); color: var(--accent); }
.following { margin: 0 0 8px; font: 400 var(--type-small) var(--mono); color: var(--accent); }
.topic { border-top: 1px solid var(--line); }
.answer { color: var(--ink-2); padding-bottom: 14px; line-height: 1.55; }
.more-link { margin-top: 16px; font-size: var(--type-small); color: var(--muted); }

/* words: cards */
.search { width: 100%; min-height: 48px; padding: 0 14px; margin-bottom: 12px; background: var(--well); border: 1px solid var(--line); border-radius: var(--radius-sm); }
.search:focus { border-color: var(--accent); outline: none; }
.cards { display: grid; gap: 10px; }
.card { padding: 12px 14px; background: var(--panel); border: 1px solid var(--line); border-left: 3px solid var(--accent); border-radius: var(--radius-sm); }
.card .word { margin: 0 0 2px; font-weight: 700; color: var(--accent); }
.card .means { margin: 0; color: var(--ink-2); line-height: 1.55; }

/* code */
.refs { display: grid; gap: 8px; margin-top: 8px; }
.ref { display: grid; gap: 2px; padding: 12px 14px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-sm); text-decoration: none; color: var(--ink); }
.ref span { color: var(--ink-2); font-size: 15px; }
.pane > .eyebrow { margin-top: 18px; }

/* level clear: the stamp */
.stamp { position: fixed; left: 50%; top: 30%; z-index: 20; transform: translate(-50%, -50%); display: grid; justify-items: center; gap: 4px; padding: 18px 28px; pointer-events: none; opacity: 0;
  background: var(--surface); border: 2px solid var(--accent); border-radius: var(--radius); box-shadow: 0 0 60px -10px var(--accent); }
.stamp .k { font: 600 15px var(--body); color: var(--ink); }
.stamp .v { font: 400 54px/1 var(--pixel); color: var(--accent); text-shadow: 0 0 24px var(--accent-soft); text-transform: uppercase; }
.stamp.go { animation: stamp 1.6s steps(8, end) both; }
@keyframes stamp { 0% { opacity: 0; transform: translate(-50%, -50%) scale(1.6); } 15% { opacity: 1; transform: translate(-50%, -50%) scale(1); } 80% { opacity: 1; } 100% { opacity: 0; } }

.copyright { max-width: 640px; margin: 24px auto 96px; padding: 0 16px; font-size: var(--type-label); color: var(--faint); }
