:root {
  --bg: #0f1413;
  --glass: rgba(18, 24, 23, 0.86);
  --glass-2: rgba(28, 36, 34, 0.9);
  --line: rgba(255, 255, 255, 0.09);
  --ink: #ece7db;
  --ink-2: #b9b6ac;
  --muted: #8d918b;
  --accent: #f2b35b;
  --accent-2: #ffd98a;
  --good: #7ccf8a;
  --warn: #f0b44c;
  --bad: #ef6f5e;
  --lie: #ff9ad0;
  --think: #cfd9ff;
  --series-1: #3987e5;
  --radius: 12px;
  --panel-w: 400px;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; height: 100%; overflow: hidden; background: var(--bg); color: var(--ink); font: 14px/1.45 var(--sans); }
button { font: inherit; color: inherit; }
#stage { position: fixed; inset: 0; }
#stage canvas { display: block; touch-action: none; }
#labels { position: fixed; inset: 0; pointer-events: none; }
/* ?shot=1: only the world and its bubbles */
body.shot > *:not(#stage):not(#labels):not(script) { display: none !important; }

/* ------------------------------------------------ top bar */
#topbar { position: fixed; top: 10px; left: 12px; right: calc(var(--panel-w) + 24px); display: flex; gap: 12px; align-items: flex-start; justify-content: space-between; pointer-events: none; z-index: 5; }
.brand { display: flex; gap: 10px; align-items: center; background: var(--glass); border: 1px solid var(--line); border-radius: var(--radius); padding: 8px 12px; pointer-events: auto; backdrop-filter: blur(8px); }
.brand h1 { margin: 0; font: 600 16px/1.1 var(--serif); letter-spacing: 0.02em; }
.brand .sub { margin: 2px 0 0; color: var(--muted); font-size: 12px; }
.logo { color: var(--accent); font-size: 20px; }
.pills { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; pointer-events: auto; }
.pill { background: var(--glass); border: 1px solid var(--line); border-radius: 999px; padding: 5px 10px; font-size: 12.5px; white-space: nowrap; backdrop-filter: blur(8px); }
.pill.mind { color: var(--accent-2); }
.pill.live i { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--muted); margin-right: 6px; vertical-align: 1px; }
.pill.live.ok i { background: var(--good); box-shadow: 0 0 8px var(--good); }
.pill.live.bad i { background: var(--bad); }

#hint { position: fixed; left: 12px; bottom: 12px; max-width: 460px; color: var(--ink-2); font-size: 12px; background: var(--glass); border: 1px solid var(--line); border-radius: 10px; padding: 7px 10px; z-index: 4; transition: opacity 1s; }
#hint.gone { opacity: 0; pointer-events: none; }
#viewtools { position: fixed; right: calc(var(--panel-w) + 24px); bottom: 12px; display: flex; gap: 6px; z-index: 4; }
.tool { background: var(--glass); border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px; cursor: pointer; font-size: 12.5px; }
.tool.on { border-color: var(--accent); color: var(--accent-2); }
.tool:focus-visible, #tabs button:focus-visible, .btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ------------------------------------------------ panel */
#panel { position: fixed; top: 10px; right: 12px; bottom: 12px; width: var(--panel-w); background: var(--glass); border: 1px solid var(--line); border-radius: 16px; display: flex; flex-direction: column; z-index: 6; backdrop-filter: blur(10px); overflow: hidden; }
#grab { display: none; }
#tabs { display: flex; gap: 2px; padding: 8px 8px 0; border-bottom: 1px solid var(--line); flex-shrink: 0; }
#tabs button { flex: 1 0 auto; min-width: 0; background: none; border: 0; border-bottom: 2px solid transparent; padding: 8px 7px 9px; color: var(--ink-2); cursor: pointer; font-size: 12.5px; white-space: nowrap; }
#tabs button.on { color: var(--ink); border-bottom-color: var(--accent); }
.view { display: none; flex: 1; overflow-y: auto; overflow-x: hidden; padding: 12px 14px 18px; overscroll-behavior: contain; }
.view.on { display: block; }
.muted { color: var(--muted); }
.legend { color: var(--muted); font-size: 12px; margin-bottom: 8px; }

/* feed */
#feed { list-style: none; margin: 0; padding: 0; }
#feed li { display: grid; grid-template-columns: 22px 1fr; gap: 8px; padding: 7px 4px; border-bottom: 1px solid var(--line); cursor: default; }
#feed li.click { cursor: pointer; }
#feed li.click:hover { background: rgba(255, 255, 255, 0.03); }
#feed .ic { font-size: 15px; text-align: center; }
#feed .when { color: var(--muted); font-size: 11.5px; margin-right: 6px; font-variant-numeric: tabular-nums; }
#feed .txt { overflow-wrap: anywhere; }
#feed li.imp3 .txt, #feed li.imp4 .txt { color: #fff; font-weight: 500; }
#feed li.imp0 { opacity: 0.62; }
#feed .secret { display: inline-block; font-size: 10.5px; color: var(--lie); border: 1px solid rgba(255, 154, 208, 0.4); border-radius: 6px; padding: 0 5px; margin-left: 4px; }

/* chronicle */
.chron { background: #efe6d0; color: #2c261c; border-radius: 10px; padding: 16px 18px; margin-bottom: 14px; font-family: var(--serif); box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35); }
.chron .mast { display: flex; justify-content: space-between; font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: #6b5d45; border-bottom: 2px solid #2c261c; padding-bottom: 5px; margin-bottom: 8px; }
.chron h3 { font-size: 21px; line-height: 1.2; margin: 4px 0 10px; }
.chron p { margin: 0 0 9px; font-size: 14.5px; line-height: 1.5; }
.chron .src { font: 11px var(--sans); color: #7b6e57; }

/* people */
#people { list-style: none; margin: 0; padding: 0; }
#people li { display: grid; grid-template-columns: 14px 1fr auto; gap: 10px; align-items: center; padding: 8px 6px; border-bottom: 1px solid var(--line); cursor: pointer; border-radius: 8px; }
#people li:hover { background: rgba(255, 255, 255, 0.04); }
#people .sw { width: 12px; height: 12px; border-radius: 4px; }
#people .who { min-width: 0; }
#people .who b { font-weight: 600; }
#people .act { color: var(--ink-2); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.settle-name { margin-left: 6px; padding: 0; border: 0; background: none; color: var(--accent-2); font: inherit; font-size: 11px; cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }
#people .hp { width: 56px; height: 5px; background: rgba(255, 255, 255, 0.1); border-radius: 3px; overflow: hidden; }
#people .hp i { display: block; height: 100%; background: var(--good); }
#people li.dead { opacity: 0.45; }
#people li.gone { opacity: 0.7; }
#people li.gone .act { font-style: italic; }

/* badges */
.badge { display: inline-block; font-size: 10.5px; padding: 1px 7px; border-radius: 999px; border: 1px solid var(--line); color: var(--ink-2); margin-left: 6px; vertical-align: 1px; }
.badge.cheap { color: #9fd3ff; border-color: rgba(159, 211, 255, 0.35); }
.badge.smart { color: #ffd98a; border-color: rgba(255, 217, 138, 0.5); background: rgba(255, 200, 90, 0.08); }
.badge.mid { color: #c7b3ff; border-color: rgba(199, 179, 255, 0.4); }
.badge.mock { color: var(--muted); }
.badge.stranger { color: var(--bad); border-color: rgba(239, 111, 94, 0.4); }
.badge.child { color: #a8e6b8; border-color: rgba(124, 207, 138, 0.4); }
.badge.elder { color: #d9d4c7; border-color: rgba(217, 212, 199, 0.35); }
.badge.leader { color: var(--accent-2); border-color: rgba(242, 179, 91, 0.55); }
.badge.rx { color: #9ff0d8; border-color: rgba(120, 225, 190, 0.5); background: rgba(90, 210, 170, 0.08); }
.rxlist { margin-top: 8px; font-size: 12.5px; }
.rxlist li { margin: 3px 0; }
.wonder { display: flex; gap: 4px; align-items: center; font: 600 12px var(--serif); color: #fff3cf; background: rgba(20, 18, 14, 0.55); border: 1px solid rgba(255, 220, 150, 0.35); border-radius: 999px; padding: 2px 8px 2px 5px; text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8); pointer-events: none; white-space: nowrap; }
.wonder .wi { font-size: 13px; }
.hintq { font: 700 16px var(--serif); color: rgba(225, 235, 255, 0.8); text-shadow: 0 0 8px rgba(160, 190, 255, 0.8); pointer-events: none; }
.place { font: italic 600 12px var(--serif); color: #f6ecd2; text-shadow: 0 1px 3px rgba(0, 0, 0, 0.9), 0 0 8px rgba(0, 0, 0, 0.6); pointer-events: none; white-space: nowrap; opacity: 0.9; letter-spacing: 0.02em; }
.settlement { font: 700 13px var(--serif); color: #fff4c9; background: rgba(28, 37, 27, 0.78); border: 1px solid rgba(255, 217, 138, 0.7); border-radius: 7px; padding: 2px 7px; text-shadow: 0 1px 2px #000; pointer-events: none; white-space: nowrap; box-shadow: 0 1px 8px rgba(0, 0, 0, 0.45); }

/* agent view */
.ahead { display: flex; gap: 10px; align-items: center; margin-bottom: 10px; }
.ahead .sw { width: 34px; height: 34px; border-radius: 10px; flex-shrink: 0; border: 2px solid rgba(255, 255, 255, 0.2); }
.ahead h2 { margin: 0; font: 600 20px/1.1 var(--serif); }
.ahead .meta { color: var(--ink-2); font-size: 12.5px; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.btn { background: var(--glass-2); border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; cursor: pointer; font-size: 12.5px; }
.btn.on { border-color: var(--accent); color: var(--accent-2); }
.card { background: rgba(255, 255, 255, 0.035); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; margin: 10px 0; }
.card h4 { margin: 0 0 7px; font-size: 11.5px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.duo { display: grid; grid-template-columns: 1fr; gap: 6px; }
.q { border-radius: 10px; padding: 8px 10px; overflow-wrap: anywhere; }
.q.t { background: rgba(207, 217, 255, 0.08); color: var(--think); font-style: italic; }
.q.s { background: rgba(255, 255, 255, 0.07); }
.q.s.lie { box-shadow: inset 3px 0 0 var(--lie); }
.q .lbl { display: block; font-style: normal; font-size: 11px; color: var(--muted); margin-bottom: 2px; }
.bars { display: grid; grid-template-columns: 62px 1fr 30px; gap: 5px 8px; align-items: center; font-size: 12.5px; }
.heart .hwords { font-size: 14px; margin-bottom: 7px; color: var(--accent-2); }
.bars.hbars { grid-template-columns: 74px 1fr; gap: 4px 8px; font-size: 12px; }
.bars.hbars .bar { height: 5px; }
.heart .hrow { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; margin-top: 9px; font-size: 12.5px; }
.heart .hdreams { margin-top: 3px; }
.heart .hdreams li.done { color: var(--accent-2); }
.heart > .muted { margin-top: 8px; font-size: 12.5px; }
.character { min-width: 0; overflow-wrap: anywhere; }
.character .ctemper { color: var(--accent-2); font-size: 14px; margin-bottom: 8px; }
.character .crow { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 7px 0; }
.character .cpart { margin-top: 9px; }
.character .cpart > .muted { font-size: 11.5px; text-transform: uppercase; letter-spacing: 0.05em; }
.character .cpart .list li { padding: 3px 0; }
.bar { height: 7px; background: rgba(255, 255, 255, 0.09); border-radius: 4px; overflow: hidden; }
.bar i { display: block; height: 100%; border-radius: 4px; }
.num { color: var(--ink-2); font-variant-numeric: tabular-nums; text-align: right; font-size: 12px; }
.traits { display: grid; grid-template-columns: 1fr 1fr; gap: 3px 14px; font-size: 12px; }
.traits .tr { display: grid; grid-template-columns: 84px 1fr; gap: 6px; align-items: center; }
.traits .bar { height: 5px; }
.chips { display: flex; flex-wrap: wrap; gap: 5px; }
.chip { font-size: 12px; padding: 2px 8px; border-radius: 999px; background: rgba(255, 255, 255, 0.07); border: 1px solid var(--line); }
.chip.hot { border-color: var(--accent); color: var(--accent-2); }
.list { list-style: none; margin: 0; padding: 0; }
.list li { padding: 5px 0; border-bottom: 1px dashed var(--line); font-size: 13px; overflow-wrap: anywhere; }
.list li:last-child { border-bottom: 0; }
.list .d { color: var(--muted); font-size: 11px; margin-right: 6px; font-variant-numeric: tabular-nums; }
.rel { display: grid; grid-template-columns: 1fr auto; gap: 2px 8px; padding: 6px 0; border-bottom: 1px dashed var(--line); }
.rel:last-child { border-bottom: 0; }
.rel .nm { font-weight: 600; cursor: pointer; }
.rel .em { font-size: 12px; color: var(--ink-2); text-align: right; }
.rel .note { grid-column: 1 / -1; color: var(--muted); font-size: 12px; font-style: italic; }
.rel .note.view { color: var(--ink-2); font-style: normal; overflow-wrap: anywhere; }
.rel .relhist { grid-column: 1 / -1; color: var(--muted); font-size: 11.5px; overflow-wrap: anywhere; }
.rel .em.sheet-led { grid-column: 1 / -1; text-align: left; margin-top: 2px; }
@media (max-width: 760px) {
  .character .crow { align-items: flex-start; }
  .character .chips { max-width: 100%; }
  .rel { grid-template-columns: minmax(0, 1fr) auto; }
}
.truth { font-size: 11px; margin-left: 5px; }
.truth.t { color: var(--good); }
.truth.f { color: var(--bad); }

/* discoveries */
.tree-graph { width: 100%; }
.tbranch { margin-top: 12px; }
.tbhead { font-size: 13px; margin-bottom: 6px; }
.tgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 6px; }
.ttile { border-radius: 9px; padding: 6px 8px; font-size: 11.5px; line-height: 1.3; min-width: 0; border: 1px solid var(--line); }
.ttile .tt { display: flex; justify-content: space-between; gap: 6px; align-items: baseline; }
.ttile .tn { font-weight: 600; font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ttile .tr { font-size: 10px; color: var(--muted); white-space: nowrap; }
.ttile .tw { color: #b9b6ac; font-size: 10.5px; margin-top: 2px; overflow-wrap: anywhere; }
.ttile .tv { font-style: italic; color: var(--muted); font-size: 10.5px; margin-top: 2px; overflow-wrap: anywhere; }
.ttile.t-known { background: #20322a; border-color: rgba(124, 207, 138, 0.55); }
.ttile.t-lost { background: #3a211e; border-color: rgba(239, 111, 94, 0.55); }
.ttile.t-lost .tn { text-decoration: line-through; }
.ttile.t-ahead { background: rgba(255, 255, 255, 0.025); border-style: dashed; }
.ttile.t-ahead .tn, .ttile.t-later .tn { color: var(--muted); letter-spacing: 1px; }
.ttile.t-later { background: rgba(255, 255, 255, 0.015); border-style: dotted; opacity: 0.75; }
.chip.lostc { text-decoration: line-through; opacity: 0.7; }
.tree-graph svg { width: 100%; height: auto; display: block; }
.tnode rect { rx: 8px; }
.study-row { padding: 7px 0; border-bottom: 1px dashed var(--line); }
.study-row:last-child { border-bottom: 0; }
.study-row .v { font-style: italic; color: var(--think); overflow-wrap: anywhere; }
.study-wait { color: var(--accent-2); font-size: 12.5px; margin-top: 4px; overflow-wrap: anywhere; }

/* 3D labels */
.tag { transform: translateY(-4px); font-size: 11.5px; font-weight: 600; color: #fff; background: rgba(12, 16, 15, 0.62); padding: 1px 7px; border-radius: 999px; white-space: nowrap; transition: opacity 0.3s; text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6); }
.tag.sel { background: rgba(242, 179, 91, 0.9); color: #1b1408; text-shadow: none; }
.tag .zz { font-weight: 400; opacity: 0.8; }
.tag.grave { font-weight: 500; font-size: 10.5px; font-style: italic; color: #e9e3d4; background: rgba(40, 34, 26, 0.55); opacity: 0.85; pointer-events: none; }
.tag.grave.shrine { color: #f3e6c0; background: rgba(58, 44, 22, 0.6); font-style: normal; }
.tag.thinking .zz { opacity: 1; animation: thinkpulse 1.2s ease-in-out infinite; }
@keyframes thinkpulse { 0%, 100% { opacity: 0.55; } 50% { opacity: 1; } }
.bubanchor { width: 0; height: 0; position: relative; }
.bubbles { position: absolute; left: 0; bottom: 6px; width: max-content; max-width: 280px; display: flex; flex-direction: column; gap: 4px; align-items: center; opacity: 0; transform: translate(-50%, 8px); transition: opacity 0.45s ease, transform 0.45s ease; }
.bubbles.on { opacity: 1; transform: translate(-50%, 0); }
.bub { max-width: 280px; font-size: 12px; line-height: 1.35; padding: 5px 9px; border-radius: 12px; box-shadow: 0 3px 10px rgba(0, 0, 0, 0.3); overflow-wrap: anywhere; }
.bub.thought { background: rgba(232, 236, 255, 0.92); color: #273052; font-style: italic; border-radius: 16px; }
.bub.say { background: #fffaf0; color: #20190f; }
.bub.say.lie { box-shadow: 0 0 0 2px var(--lie), 0 3px 10px rgba(0, 0, 0, 0.3); }
.bub .ic { font-style: normal; }
.liemark { font-style: normal; }

#loading { position: fixed; inset: 0; display: grid; place-content: center; text-align: center; background: var(--bg); z-index: 20; transition: opacity 0.6s; }
#loading.gone { opacity: 0; pointer-events: none; }
.spinner { width: 34px; height: 34px; border: 3px solid rgba(255, 255, 255, 0.15); border-top-color: var(--accent); border-radius: 50%; margin: 0 auto 12px; animation: spin 0.9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.noscript { position: fixed; inset: 0; display: grid; place-content: center; }

/* ------------------------------------------------ phone: bottom sheet */
@media (max-width: 760px) {
  :root { --panel-w: 0px; }
  #topbar { left: 8px; right: 8px; top: 8px; flex-direction: column; gap: 6px; }
  .brand { padding: 6px 10px; }
  .brand .sub { display: none; }
  .pills { justify-content: flex-start; }
  .pill { padding: 3px 8px; font-size: 11.5px; }
  #hint { display: none; }
  #viewtools { right: 8px; bottom: auto; top: 96px; flex-direction: column; }
  #panel { left: 0; right: 0; bottom: 0; top: auto; width: auto; height: 46vh; border-radius: 16px 16px 0 0; border-bottom: 0; transition: height 0.25s ease; padding-bottom: env(safe-area-inset-bottom); }
  #panel.min { height: 92px; }
  #panel.max { height: 82vh; }
  #grab { display: block; padding: 7px 0 2px; cursor: grab; touch-action: none; }
  #grab span { display: block; width: 42px; height: 5px; border-radius: 3px; background: rgba(255, 255, 255, 0.3); margin: 0 auto; }
  #tabs { padding-top: 2px; }
  #tabs button { font-size: 12.5px; padding: 7px 3px 8px; }
  .traits { grid-template-columns: 1fr; }
  .bubbles, .bub { max-width: 210px; }
  .bub { font-size: 11px; }
}
@media (prefers-reduced-motion: reduce) {
  .bubbles, #panel, .tag { transition: none; }
}

/* ---- family tree ---- */
.ftree { overflow-x: auto; overflow-y: hidden; -webkit-overflow-scrolling: touch; margin: 0 -4px; padding: 0 4px 6px; }
.ftree svg { display: block; }
.fnode { cursor: pointer; }
.fnode rect.bg { fill: #1c2524; stroke: rgba(255, 255, 255, 0.16); }
.fnode.dead { opacity: 0.55; }
.fnode.gone { opacity: 0.8; }
.fnode.gone rect.bg { stroke-dasharray: 4 3; }
.fnode.child rect.bg { fill: #1f2a2f; }
.fnode.sel rect.bg { stroke: var(--accent); stroke-width: 2; }
.fnode:hover rect.bg { stroke: var(--accent-2); }
.fnode text { fill: var(--ink); font-size: 12px; }
.fnode text.n { font-weight: 600; font-size: 12.5px; }
.fnode text.s { fill: var(--ink-2); font-size: 10.5px; }
.fnode text.t { fill: var(--muted); font-size: 10px; font-style: italic; }
.fedge { fill: none; stroke: rgba(255, 255, 255, 0.28); stroke-width: 1.4; }
.fedge.partner { stroke: var(--accent); stroke-width: 2; }
.fedge.past { stroke: var(--accent); stroke-width: 1.4; stroke-dasharray: 4 4; opacity: 0.7; }
.flegend { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 11.5px; color: var(--ink-2); margin-top: 6px; }
.flegend i { display: inline-block; width: 18px; height: 0; border-top: 2px solid var(--accent); vertical-align: middle; margin-right: 5px; }
.flegend i.past { border-top-style: dashed; }
.flegend i.kid { border-top: 1.4px solid rgba(255, 255, 255, 0.4); }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(84px, 1fr)); gap: 6px; }
.kpis div { background: rgba(255, 255, 255, 0.04); border: 1px solid var(--line); border-radius: 8px; padding: 6px 8px; }
.kpis b { display: block; font-size: 18px; font-variant-numeric: tabular-nums; }
.kpis span { font-size: 11px; color: var(--muted); }
/* ---- trait drift small multiples ---- */
.drift { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 10px; }
.drift .sm { min-width: 0; }
.drift .sm .hd { display: flex; justify-content: space-between; font-size: 11.5px; color: var(--ink-2); }
.drift .sm .hd b { color: var(--ink); font-variant-numeric: tabular-nums; font-weight: 600; }
.drift svg { display: block; width: 100%; height: 46px; }
.drift .ln { fill: none; stroke: var(--series-1, #3987e5); stroke-width: 2; stroke-linejoin: round; }
.drift .base { stroke: rgba(255, 255, 255, 0.1); stroke-width: 1; }
.drift .dot { fill: var(--series-1, #3987e5); stroke: #161c1b; stroke-width: 2; }
#ftip { position: fixed; z-index: 30; pointer-events: none; background: rgba(12, 16, 15, 0.94); border: 1px solid var(--line); border-radius: 8px; padding: 5px 8px; font-size: 12px; color: var(--ink); max-width: 240px; }
.fam .rel .em { text-align: right; }

#tabs { overflow-x: auto; scrollbar-width: none; }
#tabs::-webkit-scrollbar { display: none; }

/* ---- updates in progress (text only, from /api/roadmap) ---- */
#updates { position: fixed; left: 12px; top: 92px; width: 290px; z-index: 5; background: var(--glass); border: 1px solid var(--line); border-radius: var(--radius); backdrop-filter: blur(8px); overflow: hidden; }
#upd-head { display: flex; align-items: center; gap: 8px; width: 100%; background: none; border: 0; padding: 7px 11px; cursor: pointer; font-size: 12.5px; color: var(--ink); text-align: left; }
#upd-head .chev { margin-left: auto; color: var(--muted); transition: transform 0.2s; }
#updates.collapsed #upd-head .chev { transform: rotate(-90deg); }
#upd-head:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
#updates .pulse { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 0 rgba(242, 179, 91, 0.6); animation: updpulse 2.4s ease-out infinite; flex-shrink: 0; }
@keyframes updpulse { 0% { box-shadow: 0 0 0 0 rgba(242, 179, 91, 0.55); } 70%, 100% { box-shadow: 0 0 0 7px rgba(242, 179, 91, 0); } }
#upd-body { padding: 0 11px 9px; max-height: 46vh; overflow-y: auto; }
#updates.collapsed #upd-body { display: none; }
#upd-list { list-style: none; margin: 0; padding: 0; }
#upd-list li { display: grid; grid-template-columns: 62px 1fr; gap: 8px; padding: 5px 0; border-top: 1px dashed var(--line); font-size: 12.5px; line-height: 1.35; }
#upd-list .st { font-size: 10.5px; letter-spacing: 0.05em; text-transform: uppercase; padding-top: 2px; }
#upd-list .tx { overflow-wrap: anywhere; }
#upd-list .st-building .st { color: var(--accent-2); }
#upd-list .st-shipped .st { color: var(--good); }
#upd-list .st-next .st { color: var(--muted); }
#upd-list .st-next .tx { color: var(--ink-2); }
.upd-foot { margin: 6px 0 0; color: var(--muted); font-size: 11px; }
.tag.inside { opacity: 0.8; font-weight: 500; }
#t-quality { min-width: 84px; }
@media (max-width: 760px) {
  #updates { left: 8px; top: calc(var(--topbar-bottom, 112px) + 8px); width: min(260px, calc(100vw - 110px)); }
  #upd-head { padding: 5px 9px; font-size: 11.5px; }
  #upd-list li { font-size: 11.5px; grid-template-columns: 54px 1fr; }
  #t-quality { min-width: 0; }
}
@media (prefers-reduced-motion: reduce) { #updates .pulse { animation: none; } }

/* ------------------------------------------------ rival bands: drama pill and the Neighbors tab (rivals.py) */
.pill.drama { color: #ffd2c9; border-color: rgba(239, 111, 94, 0.6); background: rgba(90, 24, 18, 0.88); cursor: pointer; animation: dramaPulse 1.6s ease-in-out infinite; }
.pill.drama:hover { background: rgba(120, 32, 24, 0.92); }
@keyframes dramaPulse { 0%, 100% { box-shadow: 0 0 0 rgba(239, 111, 94, 0); } 50% { box-shadow: 0 0 12px rgba(239, 111, 94, 0.55); } }
@media (prefers-reduced-motion: reduce) { .pill.drama { animation: none; } }
.nb { background: rgba(255, 255, 255, 0.035); border: 1px solid var(--line); border-radius: 10px; padding: 11px 13px; margin: 0 0 12px; }
.nb-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin-bottom: 6px; }
.nb-head h3 { margin: 0; font: 600 16px/1.2 var(--serif); }
.nb-dispo { font-size: 11px; padding: 1px 8px; border-radius: 999px; border: 1px solid var(--line); white-space: nowrap; }
.nb-dispo.good { color: var(--good); border-color: rgba(124, 207, 138, 0.45); }
.nb-dispo.warn { color: var(--warn); border-color: rgba(240, 180, 76, 0.45); }
.nb-dispo.bad { color: var(--bad); border-color: rgba(239, 111, 94, 0.5); }
.nb-dispo.muted { color: var(--muted); }
.nb-dispo.gone { color: #f3d9a0; border-color: rgba(243, 160, 76, 0.6); background: rgba(120, 40, 10, 0.35); }
.nb.nb-gone { border-color: rgba(243, 160, 76, 0.35); background: linear-gradient(180deg, rgba(90, 30, 8, 0.22), rgba(255, 255, 255, 0.02)); }
.nb-facts { display: grid; gap: 3px; font-size: 12.5px; margin-bottom: 6px; }
.nb-facts > div { display: flex; gap: 8px; }
.nb-facts .k { color: var(--muted); min-width: 108px; flex: none; }
.nb-facts .v { color: var(--ink-2); overflow-wrap: anywhere; }
.nb-meter { display: flex; align-items: center; gap: 8px; font-size: 11.5px; color: var(--muted); margin: 3px 0; }
.nb-meter .k { min-width: 108px; }
.nb-meter .bar { flex: 1; height: 6px; background: rgba(255, 255, 255, 0.07); border-radius: 3px; overflow: hidden; }
.nb-meter .bar i { display: block; height: 100%; border-radius: 3px; }
.nb-meter .bar i.good { background: var(--good); }
.nb-meter .bar i.bad { background: var(--bad); }
.nb-hist { margin: 7px 0 0; padding-left: 16px; font-size: 12px; color: var(--ink-2); }
.nb-hist li { margin: 2px 0; }
.nb-from { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin: 0 0 12px; font-size: 12.5px; }
.nb-from label { display: flex; align-items: center; gap: 6px; color: var(--muted); }
.nb-from select { max-width: 100%; background: rgba(255, 255, 255, 0.06); color: var(--ink-2); border: 1px solid var(--line); border-radius: 6px; padding: 3px 6px; font: inherit; }
.nb-from .muted { overflow-wrap: anywhere; }
.nb-sub { margin: 16px 0 8px; font: 600 13px/1.2 var(--serif); color: var(--muted); }
.nb-acts { display: flex; flex-wrap: wrap; gap: 6px; margin: 9px 0 0; }
.nb-act { font: inherit; font-size: 12px; padding: 4px 10px; border-radius: 999px; border: 1px solid var(--line); background: rgba(255, 255, 255, 0.06); color: var(--ink-2); cursor: pointer; }
.nb-act:hover:not(:disabled) { background: rgba(255, 255, 255, 0.12); }
.nb-act:disabled { opacity: 0.45; cursor: default; }
.nb-act.danger { color: var(--bad); border-color: rgba(239, 111, 94, 0.5); }
.nb-why { font-size: 11.5px; margin: 5px 0 0; }
@media (max-width: 760px) { .nb-facts .k, .nb-meter .k { min-width: 92px; } }

/* ------------------------------------------------ new inventions (backlog 51): the pill and the feed line */
.pill.eureka { font: inherit; font-size: 12.5px; color: #fff1c4; border-color: rgba(240, 196, 84, 0.65); background: rgba(74, 56, 12, 0.88); cursor: pointer; animation: eurekaGlow 2.2s ease-in-out infinite; }
.pill.eureka:hover { background: rgba(100, 76, 16, 0.92); }
.pill.eureka span { display: inline-block; max-width: 240px; overflow: hidden; text-overflow: ellipsis; vertical-align: bottom; }
@keyframes eurekaGlow { 0%, 100% { box-shadow: 0 0 0 rgba(240, 196, 84, 0); } 50% { box-shadow: 0 0 12px rgba(240, 196, 84, 0.5); } }
@media (prefers-reduced-motion: reduce) { .pill.eureka { animation: none; } }
#feed li.inv { border-left: 3px solid rgba(240, 196, 84, 0.85); background: rgba(240, 196, 84, 0.08); }
#feed li.inv .txt { color: #ffe9a8; }
@media (max-width: 600px) { .pill.eureka span { max-width: 150px; } }
.pill.research { cursor: pointer; color: var(--ink); font: inherit; font-size: 12.5px; }
.pill.research:hover { background: var(--glass-2); }
.pill.research .rs-bar { display: inline-block; width: 46px; height: 6px; border-radius: 3px; background: rgba(255, 255, 255, 0.14); vertical-align: 1px; overflow: hidden; margin-left: 2px; }
.pill.research .rs-bar i { display: block; height: 100%; width: 0; background: #f0c454; transition: width 0.6s ease; }
@media (max-width: 600px) { .pill.research { font-size: 11.5px; } .pill.research .rs-bar { width: 30px; } }

/* ------------------------------------------------ inspect anything (backlog 28): the card for a thing */
.ahead .sw.ico { display: grid; place-items: center; font-size: 20px; background: rgba(143, 216, 255, 0.10); border-color: rgba(143, 216, 255, 0.35); }
#thing .nb-meter .num { min-width: 34px; }
.chip.click { cursor: pointer; font: inherit; font-size: 12px; color: var(--ink); }
.chip.click:hover, .chip.click:focus-visible { border-color: var(--accent); color: var(--accent-2); outline: none; }

/* THE VOICE (skyvoice.py): the words from the sky fill the view once, then fade */
#voice-overlay { position: fixed; inset: 0; z-index: 900; display: flex; align-items: center; justify-content: center; pointer-events: auto; cursor: pointer;
  opacity: 0; transition: opacity 1.8s ease; }
#voice-overlay[hidden] { display: none; }
#voice-overlay.on { opacity: 1; }
#voice-overlay.out { opacity: 0; transition: opacity 2.4s ease; }
#voice-overlay .vo-light { position: absolute; inset: 0;
  background: radial-gradient(ellipse 60% 70% at 50% -8%, rgba(255, 236, 190, 0.62), rgba(255, 206, 120, 0.22) 40%, rgba(255, 200, 110, 0) 70%),
              linear-gradient(180deg, rgba(8, 6, 18, 0.55), rgba(8, 6, 18, 0.72) 55%, rgba(4, 3, 10, 0.86));
  animation: voPulse 5s ease-in-out infinite; }
#voice-overlay .vo-box { position: relative; margin-top: -8vh; max-width: min(860px, calc(100vw - 32px)); padding: 0 16px; text-align: center; }
#voice-overlay .vo-label { margin: 0 0 14px; font: 600 13px/1.3 system-ui, sans-serif; letter-spacing: 0.32em; text-transform: uppercase; color: rgba(255, 240, 205, 0.85);
  text-shadow: 0 0 12px rgba(255, 210, 120, 0.8); }
#voice-overlay .vo-words { margin: 0; font: 500 clamp(24px, 4.2vw, 46px)/1.3 Georgia, 'Times New Roman', serif; color: #fff8e6;
  text-shadow: 0 0 24px rgba(255, 214, 130, 0.95), 0 0 60px rgba(255, 190, 90, 0.6), 0 2px 3px rgba(0, 0, 0, 0.6); }
#voice-overlay .vo-words span { display: inline-block; opacity: 0; filter: blur(6px); transform: translateY(8px) scale(1.04); animation: voWord 1.1s ease forwards; }
@keyframes voWord { to { opacity: 1; filter: blur(0); transform: none; } }
@keyframes voPulse { 0%, 100% { opacity: 0.85; } 50% { opacity: 1; } }
@media (max-width: 600px) { #voice-overlay .vo-box { margin-top: -14vh; } #voice-overlay .vo-label { letter-spacing: 0.2em; font-size: 11px; } }
@media (prefers-reduced-motion: reduce) { #voice-overlay .vo-words span { animation-duration: 0.01s; filter: none; transform: none; } #voice-overlay .vo-light { animation: none; } }

/* ------------------------------------------------ first person (Sean 9/30): through a villager's eyes */
#fpv { position: fixed; inset: 0; right: calc(var(--panel-w) + 24px); pointer-events: none; z-index: 4; }
#fpv .fpv-vig { position: fixed; inset: 0; background: radial-gradient(ellipse 78% 72% at 50% 48%, transparent 58%, rgba(6, 9, 10, 0.42) 100%); }
#fpv .fpv-top { align-self: flex-start; display: flex; align-items: center; gap: 10px; padding: 6px 6px 6px 14px; background: var(--glass); border: 1px solid var(--line); border-radius: 999px; pointer-events: auto; white-space: nowrap; box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3); }
#fpv .fpv-who { font-family: var(--serif); font-size: 15px; color: var(--accent-2); }
#fpv .fpv-x { font: inherit; font-size: 12.5px; color: var(--ink); background: var(--glass-2); border: 1px solid var(--line); border-radius: 999px; padding: 5px 12px; cursor: pointer; }
#fpv .fpv-x:hover, #fpv .fpv-x:focus-visible { border-color: var(--accent); color: var(--accent-2); outline: none; }
#fpv .fpv-low { position: absolute; left: 14px; bottom: 14px; width: min(440px, calc(100% - 28px)); display: flex; flex-direction: column; gap: 6px; }
#fpv .fpv-act { align-self: flex-start; font-size: 13px; font-weight: 600; color: var(--ink); background: var(--glass); border: 1px solid var(--line); border-radius: 999px; padding: 4px 12px; }
#fpv .fpv-act:empty { display: none; }
#fpv .fpv-gear { display: flex; flex-wrap: wrap; gap: 5px; }
#fpv .fpv-chip { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; color: var(--ink-2); background: var(--glass); border: 1px solid var(--line); border-radius: 999px; padding: 3px 9px; }
#fpv .fpv-q { font-size: 13px; line-height: 1.4; padding: 7px 11px; border-radius: 12px; box-shadow: 0 3px 10px rgba(0, 0, 0, 0.3); overflow-wrap: anywhere; transition: opacity 0.6s; }
#fpv .fpv-q.t { background: rgba(232, 236, 255, 0.92); color: #273052; font-style: italic; border-radius: 16px; }
#fpv .fpv-q.s { background: #fffaf0; color: #20190f; }
#fpv .fpv-q.old { opacity: 0.55; }
#fpv .fpv-q .lbl { display: block; font-size: 10.5px; font-style: normal; letter-spacing: 0.04em; text-transform: uppercase; opacity: 0.6; margin-bottom: 1px; }
#fpv .fpv-hint { font-size: 11.5px; color: var(--ink-2); text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8); }
#fpv-toast { position: fixed; top: 40%; left: calc((100% - var(--panel-w) - 24px) / 2); transform: translateX(-50%); z-index: 7; font-family: var(--serif); font-size: 18px; color: var(--ink); background: var(--glass); border: 1px solid var(--line); border-radius: 14px; padding: 12px 20px; box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4); max-width: calc(100% - 32px); text-align: center; pointer-events: none; }
body.fpv-on #hint { display: none; }
/* through someone's eyes, the map labels on the horizon (places, camps, grave names, wonders) are clutter */
body.fpv-on #labels .place, body.fpv-on #labels .settlement, body.fpv-on #labels .tag.grave:not(.near), body.fpv-on #labels .wonder, body.fpv-on #labels .hintq { visibility: hidden; }
body.fpv-min #fpv .fpv-q, body.fpv-min #fpv .fpv-gear, body.fpv-min #fpv .fpv-hint { display: none !important; }
@media (max-width: 760px) {
  /* phones: the view takes the whole screen; only the words and the way out stay */
  body.fpv-on #panel, body.fpv-on #topbar, body.fpv-on #viewtools, body.fpv-on #updates { display: none !important; }
  #fpv { right: 0; }
  #fpv .fpv-top { position: fixed; top: calc(10px + env(safe-area-inset-top)); left: 50%; transform: translateX(-50%); max-width: calc(100% - 32px); }
  #fpv .fpv-who { font-size: 14px; overflow: hidden; text-overflow: ellipsis; }
  #fpv .fpv-low { left: 16px; right: 16px; width: auto; bottom: calc(16px + env(safe-area-inset-bottom)); gap: 5px; }
  #fpv .fpv-chip .w { display: none; }          /* icons only; the word is in the title */
  #fpv .fpv-chip { padding: 3px 7px; }
  #fpv .fpv-q { font-size: 12px; padding: 6px 10px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
  #fpv .fpv-q.s { -webkit-line-clamp: 6; }
  #fpv .fpv-q.t { -webkit-line-clamp: 2; }
  #fpv-toast { left: 50%; font-size: 16px; }
}
@media (prefers-reduced-motion: reduce) { #fpv .fpv-q { transition: none; } }

/* writing (writing.py): what is written on a record house or a tally post's rack, and reading it through someone's eyes */
.list.writing li { margin-bottom: 7px; }
.list.writing .wtx { font-size: 12.5px; color: var(--ink-2); line-height: 1.4; overflow-wrap: anywhere; }
#fpv .fpv-q.r { background: rgba(242, 230, 200, 0.94); color: #2a2012; max-height: 34vh; overflow: auto; pointer-events: auto; }
#fpv .fpv-q.r .rd-i { margin-top: 4px; }
#fpv .fpv-q.r .rd-t { font-size: 12px; opacity: 0.85; }

/* ------------------------------------------------ playing (10/1, play.js): the join pill, the dialog, the HUD */
.pill.join { font: inherit; font-size: 12.5px; font-weight: 600; color: #20160a; background: var(--accent); border-color: var(--accent-2); cursor: pointer; }
.pill.join:hover, .pill.join:focus-visible { background: var(--accent-2); outline: none; }
#joindlg { position: fixed; inset: 0; z-index: 20; display: grid; place-items: center; background: rgba(6, 9, 10, 0.62); padding: 16px; }
#joindlg .jd-box { width: min(440px, 100%); max-height: calc(100vh - 32px); overflow-y: auto; background: var(--glass-2); border: 1px solid var(--line); border-radius: 16px; padding: 18px 20px; box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5); }
#joindlg h2 { margin: 0 0 4px; font: 600 22px/1.2 var(--serif); color: var(--accent-2); }
#joindlg .jd-sub { margin: 0 0 14px; color: var(--ink-2); font-size: 13px; }
#joindlg .jd-f { display: flex; flex-direction: column; gap: 4px; margin-bottom: 12px; font-size: 12.5px; color: var(--ink-2); }
#joindlg input { font: inherit; font-size: 15px; color: var(--ink); background: rgba(0, 0, 0, 0.3); border: 1px solid var(--line); border-radius: 10px; padding: 9px 11px; }
#joindlg input:focus { outline: none; border-color: var(--accent); }
#joindlg input[name=code] { letter-spacing: 0.12em; text-transform: uppercase; font-family: ui-monospace, Menlo, Consolas, monospace; }
#joindlg .jd-row { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
#joindlg .jd-l { width: 58px; flex: none; font-size: 12.5px; color: var(--ink-2); }
#joindlg .jd-sw { display: flex; flex-wrap: wrap; gap: 6px; }
#joindlg .jd-dot { width: 28px; height: 28px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, 0.18); cursor: pointer; padding: 0; }
#joindlg .jd-dot.on { border-color: var(--accent-2); box-shadow: 0 0 0 2px rgba(242, 179, 91, 0.45); }
#joindlg .jd-txt { font-size: 13px; padding: 6px 14px; border-radius: 999px; background: rgba(0, 0, 0, 0.3); border: 1px solid var(--line); cursor: pointer; }
#joindlg .jd-txt.on { border-color: var(--accent); color: var(--accent-2); }
#joindlg .jd-err { min-height: 1.3em; margin: 6px 0; color: #ffb4a8; font-size: 13px; }
#joindlg .jd-btns { display: flex; justify-content: flex-end; gap: 8px; }
#joindlg .jd-btns button { font-size: 14px; padding: 8px 16px; border-radius: 999px; border: 1px solid var(--line); cursor: pointer; }
#joindlg .jd-cancel { background: transparent; }
#joindlg .jd-go { background: var(--accent); color: #20160a; font-weight: 600; border-color: var(--accent-2) !important; }
#joindlg .jd-go:disabled { opacity: 0.6; cursor: wait; }
#joindlg .jd-fine { margin: 12px 0 0; font-size: 11.5px; color: var(--muted); }
#play { position: fixed; inset: 0; right: calc(var(--panel-w) + 24px); pointer-events: none; z-index: 6; }
#play .pl-top { position: absolute; top: 12px; left: 12px; right: 12px; display: flex; align-items: center; gap: 10px; }
#play .pl-who { font: 600 16px/1.2 var(--serif); color: var(--accent-2); background: var(--glass); border: 1px solid var(--line); border-radius: 999px; padding: 6px 14px; min-width: 0; max-width: 30%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 0 1 auto; }
#play .pl-clock { font-size: 12.5px; color: var(--ink-2); background: var(--glass); border: 1px solid var(--line); border-radius: 999px; padding: 5px 11px; }
#play .pl-x { margin-left: 0; pointer-events: auto; font-size: 13px; color: var(--ink); background: var(--glass); border: 1px solid var(--line); border-radius: 999px; padding: 6px 14px; cursor: pointer; }
#play .pl-x:hover, #play .pl-x:focus-visible { border-color: var(--accent); color: var(--accent-2); outline: none; }
/* hide the watch panel (feed, chronicle, people) while playing: the Feed button or H, remembered per browser (Sean 10/2) */
#play .pl-x.pl-feed { color: var(--ink-2); }
/* the bar (10/5 mobile): your name, the clock and the ? at the left, the spacer, then every other button together */
#play .pl-top .pl-sp { flex: 1 1 0; min-width: 0; }
#play .pl-feed kbd { font: 600 10.5px/1 var(--sans); color: var(--muted); border: 1px solid var(--line); border-radius: 4px; padding: 1px 4px; margin-right: 6px; }
body.playing.feed-hidden { --panel-w: 0px; }
body.playing.feed-hidden #panel { display: none; }
body.playing.feed-hidden #play { right: 0; }
#play .pl-card { position: absolute; top: 58px; left: 12px; width: 230px; background: var(--glass); border: 1px solid var(--line); border-radius: 12px; padding: 9px 11px; display: flex; flex-direction: column; gap: 4px; }
#play .pl-need { display: grid; grid-template-columns: 56px 1fr 26px; align-items: center; gap: 7px; font-size: 12px; color: var(--ink-2); }
#play .pl-bar { height: 7px; border-radius: 4px; background: rgba(255, 255, 255, 0.12); overflow: hidden; }
#play .pl-bar i { display: block; height: 100%; width: 0; transition: width 0.4s ease; }
#play .pl-nv { text-align: right; font-variant-numeric: tabular-nums; }
#play .pl-need { position: relative; }
#play .pl-gain { position: absolute; right: 38px; top: -2px; font: 700 11px/1 var(--sans); color: #e6dcff; text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8); opacity: 0; pointer-events: none; }
#play .pl-gain.on { animation: plGain 6s ease-out forwards; }
@keyframes plGain { 0% { opacity: 0; transform: translateY(4px); } 6% { opacity: 1; transform: none; } 82% { opacity: 1; } 100% { opacity: 0; } }
#play .pl-need.low .pl-nl, #play .pl-need.low .pl-nv { color: #ffb4a8; font-weight: 600; }
#play .pl-doing { margin-top: 4px; font-size: 13px; font-weight: 600; color: var(--ink); }
#play .pl-carry { font-size: 11.5px; color: var(--muted); line-height: 1.35; }
#play .pl-acts { position: absolute; left: 50%; bottom: 18px; transform: translateX(-50%); display: flex; gap: 8px; pointer-events: auto; }
#play .pl-act { font-size: 14px; padding: 9px 16px; border-radius: 999px; color: var(--ink); background: var(--glass); border: 1px solid var(--line); cursor: pointer; white-space: nowrap; box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35); }
#play .pl-act kbd { font: 600 11px/1 var(--sans); color: var(--muted); border: 1px solid var(--line); border-radius: 4px; padding: 2px 5px; margin-right: 7px; }
#play .pl-act:hover:not(:disabled) { border-color: var(--accent); color: var(--accent-2); }
#play .pl-act:disabled { opacity: 0.45; cursor: default; }
#play .pl-hint { position: absolute; left: 12px; bottom: 18px; max-width: 220px; font-size: 11.5px; color: var(--ink-2); text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8); }
#play .pl-cross { position: absolute; left: 50%; top: 50%; width: 4px; height: 4px; margin: -2px; border-radius: 50%; background: rgba(255, 255, 255, 0.7); box-shadow: 0 0 3px rgba(0, 0, 0, 0.8); }
#play .pl-aim { position: absolute; left: 50%; top: calc(50% + 12px); transform: translateX(-50%); padding: 3px 9px; border-radius: 999px; background: var(--glass); border: 1px solid var(--line); color: var(--ink-2); font-size: 11.5px; white-space: nowrap; }
#play .pl-lockhint { position: absolute; left: 50%; top: calc(50% + 14px); transform: translateX(-50%); padding: 3px 9px; border-radius: 999px; background: var(--glass); border: 1px solid var(--line); color: var(--ink-2); font-size: 11.5px; white-space: nowrap; pointer-events: none; }
#play.tcard-open .pl-lockhint, #play.talking .pl-lockhint, #play .pl-lockhint[hidden] { display: none; }
#play .pl-joy { position: absolute; left: calc(18px + env(safe-area-inset-left)); bottom: calc(22px + env(safe-area-inset-bottom)); width: 124px; height: 124px; border-radius: 50%; background: rgba(18, 24, 23, 0.45); border: 2px solid rgba(255, 255, 255, 0.22); pointer-events: auto; touch-action: none; display: grid; place-items: center; }
#play .pl-joy i { width: 52px; height: 52px; border-radius: 50%; background: rgba(242, 179, 91, 0.75); box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4); }
#play .pl-dead { position: absolute; left: 50%; top: 34%; transform: translateX(-50%); text-align: center; background: var(--glass-2); border: 1px solid var(--line); border-radius: 16px; padding: 16px 24px; max-width: calc(100% - 32px); }
#play .pl-dead h2 { margin: 0 0 6px; font: 600 22px/1.2 var(--serif); color: var(--ink); }
#play .pl-dead p { margin: 0; color: var(--ink-2); }
#play .pl-note, #pl-out { position: absolute; left: 50%; top: 22%; transform: translateX(-50%); font: 16px/1.35 var(--serif); color: var(--ink); background: var(--glass); border: 1px solid var(--line); border-radius: 14px; padding: 10px 18px; max-width: calc(100% - 32px); text-align: center; }
#play .pl-ask { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(390px, calc(100% - 32px)); padding: 22px; border: 1px solid var(--accent); border-radius: 16px; background: var(--glass-2); box-shadow: 0 16px 50px rgba(0, 0, 0, 0.55); text-align: center; pointer-events: auto; }
#play .pl-ask h2 { margin: 0 0 8px; font: 600 24px/1.2 var(--serif); color: var(--accent-2); }
#play .pl-ask p { margin: 0 0 18px; font: 17px/1.45 var(--serif); color: var(--ink); }
#play .pa-buttons { display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; }
#play .pa-buttons button { min-width: 92px; padding: 9px 14px; border: 1px solid var(--line); border-radius: 999px; background: rgba(0, 0, 0, 0.28); color: var(--ink); font: 600 13px/1.2 var(--sans); cursor: pointer; }
#play .pa-buttons button:hover:not(:disabled), #play .pa-buttons button:focus-visible { border-color: var(--accent); color: var(--accent-2); outline: none; }
#play .pa-buttons .pa-accept { border-color: var(--accent-2); background: var(--accent); color: #20160a; }
#play .pa-buttons button:disabled { opacity: 0.55; cursor: default; }
#play.ask-open .pl-acts, #play.ask-open .pl-joy, #play.ask-open .pl-task, #play.ask-open .pl-log { visibility: hidden; }
#pl-out { position: fixed; z-index: 7; left: calc((100% - var(--panel-w) - 24px) / 2); top: 40%; pointer-events: none; }
/* a touch screen wider than a phone (a foldable opened, a phone on its side, a tablet) plays with the phone's layout, as
   play.js already does with its stick and buttons (10/5 mobile): the watch panel and the view tools step aside */
@media (pointer: coarse) {
  body.playing { --panel-w: 0px; }
  body.playing #panel, body.playing #viewtools, body.playing #updates { display: none !important; }
}
body.playing #hint, body.playing #fpv, body.playing #topbar, body.playing #updates, body.playing #t-camp, body.playing #t-map, body.playing #t-quality, body.playing #t-bubbles { display: none !important; }
@media (min-width: 761px) and (pointer: fine), (min-width: 761px) and (pointer: none) { #play .pl-acts { bottom: 62px; } }
/* phase 2 (players.py "Do things"): the errand bar, the quick buttons, and the action / pack / make panel */
#play .pl-acts { flex-direction: column; align-items: center; }
#play .pl-quick, #play .pl-open { display: flex; gap: 8px; justify-content: center; }
#play .pl-quick:empty { display: none; }
#play .pl-act.off { opacity: 0.45; }
#play .pl-act.pl-main { border-color: var(--accent); color: var(--accent-2); font-weight: 600; }
#play .pl-task { position: absolute; left: 50%; bottom: 162px; transform: translateX(-50%); display: flex; align-items: center; gap: 10px; background: var(--glass); border: 1px solid var(--line); border-radius: 999px; padding: 5px 6px 5px 14px; pointer-events: auto; max-width: calc(100% - 32px); box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35); }
#play .pl-tl { font-size: 13px; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
#play .pl-tf { font-size: 11px; color: var(--accent); opacity: 0.9; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 260px; min-width: 0; }
#play .pl-tb { width: 120px; height: 7px; border-radius: 4px; background: rgba(255, 255, 255, 0.12); overflow: hidden; flex: none; }
#play .pl-tb i { display: block; height: 100%; width: 0; background: var(--accent); transition: width 0.3s linear; }
#play .pl-tb.busy i { width: 100%; background: linear-gradient(90deg, transparent, var(--accent), transparent) no-repeat; background-size: 45% 100%; animation: plbusy 1.3s linear infinite; }
@keyframes plbusy { from { background-position: -60% 0; } to { background-position: 160% 0; } }
@media (prefers-reduced-motion: reduce) { #play .pl-tb.busy i { animation: none; background: var(--accent); opacity: 0.6; } }
#play .pl-ts { flex: none; font: inherit; font-size: 12px; padding: 4px 11px; border-radius: 999px; border: 1px solid var(--line); background: rgba(0, 0, 0, 0.28); color: var(--ink); cursor: pointer; }
#play .pl-ts:hover, #play .pl-ts:focus-visible { border-color: var(--accent); color: var(--accent-2); outline: none; }
#play .pl-panel { position: absolute; right: 12px; top: 58px; width: min(390px, calc(100% - 24px)); max-height: calc(100% - 215px); display: flex; flex-direction: column; background: var(--glass-2); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 12px 34px rgba(0, 0, 0, 0.45); pointer-events: auto; overflow: hidden; }
/* A picked thing's live action card. It is independent of the larger side panel. */
#play .pl-tcard { position: fixed; width: min(300px, calc(100vw - 24px)); max-height: min(540px, calc(100vh - 24px)); display: flex; flex-direction: column; background: var(--glass-2); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 14px 38px rgba(0, 0, 0, 0.52); pointer-events: auto; overflow: hidden; }
#play .pt-grab { display: none; }
#play .pt-head { display: flex; align-items: center; gap: 9px; padding: 10px 7px 9px 11px; border-bottom: 1px solid var(--line); }
#play .pt-icon { width: 34px; height: 34px; flex: none; display: grid; place-items: center; border-radius: 50%; color: var(--accent-2); background: rgba(242, 179, 91, 0.11); border: 1px solid rgba(242, 179, 91, 0.38); font: 700 15px/1 var(--serif); }
#play .pt-names { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 2px; }
#play .pt-names h3 { margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 600 17px/1.15 var(--serif); color: var(--accent-2); }
#play .pt-sub { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); font-size: 11.5px; }
#play .pt-dist { flex: none; padding: 3px 7px; border-radius: 999px; border: 1px solid var(--line); color: var(--ink-2); font-size: 10.5px; white-space: nowrap; }
#play .pt-needs { padding: 5px 8px 4px; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 3px 5px; border-bottom: 1px solid var(--line); }
#play .pt-needs[hidden] { display: none; }
#play .pt-need { min-width: 0; display: grid; grid-template-columns: 1fr 18px; gap: 2px; align-items: center; color: var(--muted); font-size: 9.5px; line-height: 1; }
#play .pt-nl { overflow: hidden; text-overflow: clip; }
#play .pt-nv { text-align: right; font-variant-numeric: tabular-nums; }
#play .pt-bar { grid-column: 1 / -1; height: 3px; border-radius: 2px; background: rgba(255, 255, 255, 0.12); overflow: hidden; }
#play .pt-bar i { display: block; height: 100%; width: 0; transition: width 0.4s ease; }
#play .pt-need.low .pt-nl, #play .pt-need.low .pt-nv { color: #ffb4a8; font-weight: 600; }
#play .pt-flags { grid-column: 1 / -1; min-height: 0; display: flex; gap: 4px; }
#play .pt-flag { padding: 1px 5px; border: 1px solid rgba(255, 180, 168, 0.45); border-radius: 999px; color: #ffb4a8; font-size: 9px; line-height: 1.2; }
#play .pt-body { min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 8px; display: flex; flex-direction: column; gap: 5px; }
#play .pt-body .pp-item { width: 100%; min-height: 38px; }
#play .pt-body > * { flex-shrink: 0; }      /* a row grows to fit its label; the card scrolls instead of squeezing rows over each other (Sean 10/2) */
#play .pt-primary { width: 100%; min-height: 42px; display: flex; flex-wrap: wrap; align-items: center; gap: 2px 8px; padding: 9px 11px; border-radius: 9px; border: 1px solid var(--accent-2); background: var(--accent); color: #20160a; text-align: left; font: 600 14px/1.25 var(--sans); cursor: pointer; }
#play .pt-primary kbd, #play .pt-body .pp-item kbd { margin-left: auto; order: 2; }
#play .pt-body .pp-item small { order: 3; }
/* #316 (Somanath 10/5, the ore lode card): a long note under the first entry squeezed its label to one letter a line.
   The note always takes a line of its own under the label, and a label never shrinks below a few words. */
#play .pt-primary small { order: 3; flex-basis: 100%; font: 500 11.5px/1.3 var(--sans); color: rgba(32, 22, 10, 0.78); }
#play .pt-primary kbd { font: 700 10.5px/1 var(--sans); color: rgba(32, 22, 10, 0.7); border: 1px solid rgba(32, 22, 10, 0.3); border-radius: 4px; padding: 2px 5px; }
#play .pt-primary:hover, #play .pt-primary:focus-visible { filter: brightness(1.08); outline: none; }
#play .pt-loading, #play .pt-gone { margin: 8px 4px; color: var(--muted); font-size: 13px; line-height: 1.4; }
#play .pt-back { margin-bottom: 3px; color: var(--ink-2); }
#play .pp-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 8px 6px 14px; border-bottom: 1px solid var(--line); }
#play .pp-head h3 { margin: 0; font: 600 17px/1.2 var(--serif); color: var(--accent-2); }
#play .pp-x { font-size: 22px; line-height: 1; background: transparent; border: 0; color: var(--ink-2); cursor: pointer; padding: 2px 9px; border-radius: 8px; }
#play .pp-x:hover, #play .pp-x:focus-visible { color: var(--ink); background: rgba(255, 255, 255, 0.08); outline: none; }
#play .pp-body { overflow-y: auto; overscroll-behavior: contain; padding: 2px 12px 12px; }
#play .pp-sec h4 { margin: 10px 0 5px; font-size: 11px; text-transform: uppercase; letter-spacing: 0.07em; color: var(--muted); font-weight: 600; }
#play .pp-list { display: flex; flex-direction: column; gap: 4px; }
#play .pp-item { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; text-align: left; font: inherit; font-size: 13.5px; color: var(--ink); background: rgba(255, 255, 255, 0.04); border: 1px solid var(--line); border-radius: 9px; padding: 7px 10px; cursor: pointer; }
#play .pp-item:hover, #play .pp-item:focus-visible { border-color: var(--accent); color: var(--accent-2); outline: none; }
#play .pp-item kbd { font: 600 10.5px/1 var(--sans); color: var(--muted); border: 1px solid var(--line); border-radius: 4px; padding: 2px 5px; }
#play .pp-item small { flex-basis: 100%; font-size: 11.5px; color: var(--muted); }
#play .pp-item > span, #play .pt-primary > span { flex: 1 1 0; min-width: min(9em, 100%); overflow-wrap: break-word; }      /* the label wraps inside its row and the number stays beside it */
#play .pp-item kbd, #play .pt-primary kbd { flex: none; }
#play .pp-item.off { opacity: 0.55; cursor: default; }
#play .pp-item.off:hover { border-color: var(--line); color: var(--ink); }
#play .pp-meta { margin: 8px 0 2px; font-size: 12px; color: var(--ink-2); line-height: 1.4; }
#play .pp-empty { margin: 6px 0; font-size: 12.5px; color: var(--muted); line-height: 1.4; }
#play .pp-inv { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; padding: 5px 2px; border-bottom: 1px solid rgba(255, 255, 255, 0.06); }
#play .pp-n { font-size: 13.5px; color: var(--ink); }
#play .pp-nw { display: flex; flex-direction: column; gap: 1px; min-width: 0; flex: 1 1 140px; }
#play .pp-st, #play .pp-rst { font-size: 11.5px; color: var(--accent-2); line-height: 1.35; overflow-wrap: anywhere; }
#play .pp-rst { margin-top: 2px; }
#play .pp-b.all { border-color: var(--accent); color: var(--accent-2); font-weight: 600; }
#play .pp-packtop { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin: 6px 0 2px; }
#play .pp-gearsum { font-size: 12px; color: var(--accent-2); margin-right: auto; }
#play .pp-gwhat { margin: 0 2px 4px; font-size: 11.5px; color: var(--muted); line-height: 1.35; }
#play .pp-glist { display: flex; flex-direction: column; }
#play .pp-grow { display: grid; grid-template-columns: 16px minmax(0, 1fr) auto; gap: 8px; align-items: baseline; padding: 4px 2px; border-bottom: 1px solid rgba(255, 255, 255, 0.06); font-size: 13px; color: var(--ink-2); }
#play .pp-grow.have { color: var(--ink); }
#play .pp-grow.have .pp-gmark { color: var(--accent-2); }
#play .pp-gname { overflow-wrap: anywhere; }
#play .pp-gnum { font-size: 12px; color: var(--accent-2); text-align: right; white-space: normal; max-width: 52vw; }
@media (max-width: 760px), (pointer: coarse) {
  #play .pp-inv .pp-bs { width: 100%; justify-content: flex-start; }
  #play .pp-inv .pp-b { font-size: 13.5px; padding: 7px 13px; }
  #play .pp-b.all { background: rgba(242, 179, 91, 0.14); }
}
#play .pp-meta.pp-heavy { color: var(--warn); }
#play .pp-worn { font-size: 11px; padding: 2px 8px; border-radius: 999px; border: 1px solid var(--accent); color: var(--accent-2); margin-right: auto; }
#play .pp-bs { display: flex; flex-wrap: wrap; gap: 5px; justify-content: flex-end; }
#play .pp-b { font: inherit; font-size: 12px; padding: 4px 10px; border-radius: 999px; border: 1px solid var(--line); background: rgba(0, 0, 0, 0.25); color: var(--ink); cursor: pointer; white-space: nowrap; }
#play .pp-b:hover, #play .pp-b:focus-visible { border-color: var(--accent); color: var(--accent-2); outline: none; }
#play .pp-b.quiet { color: var(--ink-2); }
#play .pp-b.go { margin-top: 6px; background: var(--accent); color: #20160a; border-color: var(--accent-2); font-weight: 600; }
#play .pp-b.go.off { background: rgba(0, 0, 0, 0.25); color: var(--muted); border-color: var(--line); font-weight: 400; }
#play .pp-b.danger { background: #8e3b2e; border-color: #c4604c; color: #fff; }
#play .pp-tabs { display: flex; gap: 6px; margin: 10px 0 4px; }
#play .pp-tab { font: inherit; font-size: 13px; padding: 5px 13px; border-radius: 999px; border: 1px solid var(--line); background: transparent; color: var(--ink-2); cursor: pointer; }
#play .pp-tab.on { border-color: var(--accent); color: var(--accent-2); background: rgba(242, 179, 91, 0.1); }
#play .pp-rec { border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; margin: 6px 0; background: rgba(255, 255, 255, 0.03); }
#play .pp-rec.off .pp-rn { color: var(--ink-2); }
#play .pp-rn { font-size: 14px; font-weight: 600; color: var(--ink); }
#play .pp-rd { font-size: 12px; color: var(--ink-2); margin-top: 2px; line-height: 1.35; }
#play .pp-miss { font-size: 12px; color: #ffc6a8; margin-top: 2px; line-height: 1.35; }
/* How others see you (#394, whoview.js): a row a person, bars and words */
#play .pl-who { cursor: pointer; pointer-events: auto; }
#play .pl-who:hover, #play .pl-who:focus-visible { border-color: var(--accent); outline: none; }
#play .pw-tabs { flex-wrap: wrap; }
#play .pp-meta.pw-miss { color: #ffc6a8; }
#play .pw-alert { font-size: 12.5px; line-height: 1.4; color: #ffc6a8; padding: 5px 9px; margin: 4px 0; border-left: 3px solid #ef6f5e; background: rgba(239, 111, 94, 0.08); border-radius: 0 8px 8px 0; }
#play .pw-alert b { color: var(--ink); }
#play .pw-row.bad { border-color: rgba(239, 111, 94, 0.55); }
#play .pw-row.warn { border-color: rgba(240, 180, 76, 0.4); }
#play .pw-row .pp-rn { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
#play .pw-tag { flex: none; font-size: 11px; font-weight: 600; padding: 2px 9px; border-radius: 999px; border: 1px solid var(--line); color: var(--ink-2); white-space: nowrap; }
#play .pw-tag.good { color: #9fe2a0; border-color: rgba(124, 207, 138, 0.5); }
#play .pw-tag.warn { color: #ffd48a; border-color: rgba(240, 180, 76, 0.55); }
#play .pw-tag.bad { color: #ffb4a8; border-color: rgba(239, 111, 94, 0.65); background: rgba(239, 111, 94, 0.1); }
#play .pw-v { margin-top: 0; color: var(--muted); }
#play .pw-bars { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 4px 9px; align-items: center; margin: 6px 0 4px; }
#play .pw-bl { font-size: 11.5px; color: var(--ink-2); white-space: nowrap; }
#play .pw-bars .pt-bar.pw-bar { grid-column: auto; height: 7px; border-radius: 4px; }
#play .pw-bar.mid { position: relative; }
#play .pw-bar.mid::after { content: ''; position: absolute; left: 50%; top: 0; bottom: 0; width: 2px; margin-left: -1px; background: rgba(8, 10, 10, 0.75); }       /* the middle: neither liked nor disliked */
#play .pw-bar i { border-radius: 4px; opacity: 0.92; }
#play .pw-why { font-style: italic; }
#play .pw-ppl { margin-top: 6px; padding-top: 5px; border-top: 1px dashed rgba(255, 255, 255, 0.12); }
#play .pp-takes { margin-top: 2px; }
#play .pp-take { display: flex; gap: 6px; font-size: 12px; line-height: 1.35; color: var(--ink-2); margin-top: 1px; }
#play .pp-take .pp-tmark { flex: none; width: 1em; text-align: center; font-weight: 700; }
#play .pp-take .pp-twhat { flex: 1 1 0; min-width: 0; overflow-wrap: break-word; }
#play .pp-take.have .pp-tmark { color: #9fe2a0; }
#play .pp-take.miss { color: #ffc6a8; }
#play .pp-confirm p { margin: 12px 2px; font-size: 14px; color: var(--ink); line-height: 1.4; }
#play .pp-row { display: flex; gap: 8px; justify-content: flex-end; }
#play .pp-row .pp-b { font-size: 13.5px; padding: 7px 16px; }
#play.panel-open .pl-note { top: auto; bottom: 120px; left: 12px; transform: none; max-width: min(420px, 42%); text-align: left; }
@media (max-width: 760px), (pointer: coarse) {
  #play.panel-open .pl-card, #play.panel-open .pl-task { visibility: hidden; }
  #play.panel-open .pl-note { left: 8px; right: 8px; bottom: calc(196px + env(safe-area-inset-bottom)); max-width: none; font-size: 14px; }
  #play .pl-panel { background: rgba(18, 24, 23, 0.94); }
  #play .pl-tcard { left: calc(8px + env(safe-area-inset-left)) !important; right: calc(8px + env(safe-area-inset-right)); top: auto !important; bottom: calc(8px + env(safe-area-inset-bottom)); width: auto; max-height: 55vh; border-radius: 16px; background: rgba(18, 24, 23, 0.96); animation: ptsheet 0.18s ease-out; }
  #play .pt-grab { display: block; align-self: center; width: 38px; height: 4px; margin: 7px auto 0; border-radius: 3px; background: rgba(255, 255, 255, 0.25); }
  #play .pt-head { padding-top: 6px; }
  #play .pt-needs { padding: 5px 7px 4px; gap: 3px; }
  #play .pt-need { font-size: 8px; }
  #play .pt-body .pp-item, #play .pt-primary { min-height: 46px; font-size: 15px; }
  #play.tcard-open .pl-joy, #play.tcard-open .pl-acts { display: none; }
}
@keyframes ptsheet { from { transform: translateY(18px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
@media (prefers-reduced-motion: reduce) { #play .pl-tcard { animation: none; } }
@media (max-width: 480px) {
  #joindlg .jd-box { padding: 16px 14px; }
  #joindlg .jd-l { width: 46px; }
  #joindlg .jd-sw { flex-wrap: nowrap; gap: 4px; }
  #joindlg .jd-dot { flex: none; width: 25px; height: 25px; }
}
@media (max-width: 760px), (pointer: coarse) {
  #play { right: 0; }
  #play .pl-top { top: calc(8px + env(safe-area-inset-top)); left: 8px; right: 8px; }
  #play .pl-who { font-size: 14px; padding: 5px 11px; }
  #play .pl-feed { display: none; }                  /* a phone's play view already takes the whole screen */
  #play .pl-top { gap: 7px; }
  #play .pl-clock { display: none; }
  #play .pl-card { top: calc(48px + env(safe-area-inset-top)); left: 8px; width: 170px; padding: 7px 9px; gap: 2px; }
  #play .pl-need { grid-template-columns: 46px 1fr 22px; font-size: 11px; gap: 5px; }
  #play .pl-carry, #play .pl-hint { display: none; }
  #play .pl-acts { left: auto; right: calc(12px + env(safe-area-inset-right)); bottom: calc(22px + env(safe-area-inset-bottom)); transform: none; flex-direction: column; align-items: flex-end; gap: 7px; }
  #play .pl-act { font-size: 14px; padding: 10px 16px; }
  #play .pl-quick { flex-direction: column; align-items: flex-end; gap: 7px; }
  #play .pl-open { gap: 6px; }
  #play .pl-open .pl-act { padding: 10px 13px; }
  #play .pl-task { left: auto; right: 8px; bottom: auto; top: calc(48px + env(safe-area-inset-top)); transform: none; max-width: calc(100% - 194px); padding: 4px 4px 4px 10px; gap: 6px; }
  #play .pl-tl { font-size: 12px; }
  #play .pl-tf { display: none; }
  #play .pl-tb { width: 44px; }
  #play .pl-panel { left: 8px; right: 8px; width: auto; top: calc(48px + env(safe-area-inset-top)); max-height: calc(100% - 272px - env(safe-area-inset-top) - env(safe-area-inset-bottom)); }
  #pl-out { left: 50%; }
}

/* ------------------------------------------------ moving a built thing (10/3, #164, play.js placing): the bar under the preview */
#play .pl-place { position: absolute; left: 50%; bottom: 18px; transform: translateX(-50%); width: min(460px, calc(100% - 32px)); display: flex; flex-direction: column; gap: 6px; padding: 10px 12px; background: var(--glass-2); border: 1px solid var(--accent); border-radius: 14px; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45); pointer-events: auto; }
#play .pl-place[hidden] { display: none; }
#play .pl-place strong { font: 600 15px/1.2 var(--serif); color: var(--accent-2); }
#play .pl-place .pq-why { font-size: 13px; line-height: 1.35; color: var(--ink-2); min-height: 1.35em; }
#play .pl-place .pq-why.no { color: #ffb4a8; }
#play .pl-place .pq-row { display: flex; flex-wrap: wrap; gap: 6px; }
#play .pl-place button { flex: 1 1 96px; min-height: 40px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 999px; background: rgba(0, 0, 0, 0.28); color: var(--ink); font: 600 13px/1.2 var(--sans); cursor: pointer; }
#play .pl-place button:hover:not(:disabled), #play .pl-place button:focus-visible { border-color: var(--accent); color: var(--accent-2); outline: none; }
#play .pl-place button.go { background: var(--accent); border-color: var(--accent-2); color: #20160a; }
#play .pl-place button.go:hover:not(:disabled) { color: #20160a; }
#play .pl-place button:disabled { opacity: 0.45; cursor: default; }
#play.placing .pl-acts, #play.placing .pl-hint, #play.placing .pl-log, #play.placing .pl-say { visibility: hidden; }
#play.placing .pl-stt { visibility: hidden; }
/* walls anywhere (10/4, play.js line tool): the kinds as chips over the bar's two rows */
#play .pl-wall .pq-kinds { display: flex; flex-wrap: wrap; gap: 5px; }
#play .pl-wall .pq-kinds:empty { display: none; }
#play .pl-wall .pq-kinds button.pq-kind { flex: 0 0 auto; min-height: 30px; padding: 4px 12px; font-size: 12.5px; }
#play .pl-wall .pq-kinds button.pq-kind.on { border-color: var(--accent); color: var(--accent-2); background: rgba(0, 0, 0, 0.45); }
#play .pl-wall button[hidden] { display: none; }
#play .pl-earth.pl-wall .pq-kinds.pq-big button.pq-kind { flex: 1 1 0; min-height: 44px; font-size: 15px; }
#play .pl-earth.pl-wall .pq-kinds button.pq-kind { min-height: 36px; }
#play .pl-earth .pq-row button.on { border-color: var(--accent); color: var(--accent-2); }
@media (max-width: 760px), (pointer: coarse) {
  #play .pl-place { left: calc(152px + env(safe-area-inset-left)); right: calc(8px + env(safe-area-inset-right)); bottom: calc(18px + env(safe-area-inset-bottom)); width: auto; transform: none; padding: 8px 9px; gap: 5px; }
  #play .pl-place strong { font-size: 14px; }
  #play .pl-place .pq-why { font-size: 12px; }
  #play .pl-place button { flex: 1 1 88px; min-height: 40px; padding: 7px 8px; font-size: 12.5px; }
  #play .pl-earth.pl-wall .pq-kinds.pq-big button.pq-kind { min-height: 46px; font-size: 15px; padding: 4px 6px; }
  #play .pl-earth.pl-wall .pq-kinds button.pq-kind { min-height: 38px; padding: 4px 9px; font-size: 13px; }
  #play .pl-earth { max-height: calc(100% - 120px - env(safe-area-inset-top)); overflow-y: auto; }
  #play .pl-wall button { flex: 1 1 64px; min-height: 38px; padding: 6px 6px; font-size: 12px; }
  #play .pl-wall .pq-kinds button.pq-kind { min-height: 30px; padding: 3px 10px; }
}

/* ------------------------------------------------ talking (phase 3a, play.js): the line to say aloud and the heard log */
#play .pl-say { position: absolute; left: 12px; bottom: 205px; width: min(480px, 46%); display: flex; align-items: center; gap: 6px; background: var(--glass-2); border: 1px solid var(--accent); border-radius: 999px; padding: 5px 6px 5px 14px; pointer-events: auto; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45); }
#play .pl-say input { flex: 1; min-width: 0; font: inherit; font-size: 15px; color: var(--ink); background: transparent; border: 0; outline: none; padding: 6px 0; }
#play .pl-say input::placeholder { color: var(--muted); }
#play .pl-left { font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }
#play .pl-sgo { font: inherit; font-size: 13px; font-weight: 600; padding: 6px 14px; border-radius: 999px; border: 1px solid var(--accent-2); background: var(--accent); color: #20160a; cursor: pointer; }
#play .pl-sx { font-size: 20px; line-height: 1; background: transparent; border: 0; color: var(--ink-2); cursor: pointer; padding: 2px 8px; border-radius: 8px; }
#play .pl-sx:hover, #play .pl-sx:focus-visible { color: var(--ink); background: rgba(255, 255, 255, 0.08); outline: none; }
/* speak to type (10/5, stt.js): the mic (talk bar, and beside Talk on a phone) and the strip that says what it heard */
#play .pl-mic { flex: none; width: 34px; height: 34px; display: inline-grid; place-items: center; padding: 0; border-radius: 999px; border: 1px solid var(--line); background: rgba(255, 255, 255, 0.06); color: var(--ink); cursor: pointer; touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
#play .pl-mic svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; pointer-events: none; }
#play .pl-mic:hover, #play .pl-mic:focus-visible { border-color: var(--accent); color: var(--accent-2); outline: none; }
#play .pl-mic.on { background: #c94f3d; border-color: #ffb4a4; color: #fff; animation: pl-mpulse 1.1s ease-in-out infinite; }
#play .pl-act.pl-mic2 { width: auto; height: auto; display: inline-flex; align-items: center; padding: 9px 13px; }
@keyframes pl-mpulse { 50% { box-shadow: 0 0 0 6px rgba(201, 79, 61, 0.28); } }
#play .pl-stt { position: absolute; left: 12px; bottom: 205px; width: min(480px, 46%); display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; background: var(--glass-2); border: 1px solid var(--accent); border-radius: 16px; padding: 8px 10px 9px 14px; pointer-events: auto; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45); font-size: 15px; line-height: 1.35; color: var(--ink); }
#play .pl-stt.err { border-color: #e0634c; }
#play .pl-stxt { flex: 1 1 180px; min-width: 0; overflow-wrap: anywhere; }
#play .pl-sdot { flex: none; width: 10px; height: 10px; border-radius: 50%; background: var(--muted); }
#play .pl-stt.live .pl-sdot { background: #e0634c; animation: pl-mpulse 1.1s ease-in-out infinite; }
#play .pl-stt.err .pl-sdot { background: #e0634c; }
#play .pl-sbtn { font: inherit; font-size: 13px; font-weight: 600; padding: 5px 12px; border-radius: 999px; border: 1px solid var(--line); background: rgba(255, 255, 255, 0.06); color: var(--ink); cursor: pointer; }
#play .pl-sbtn:hover, #play .pl-sbtn:focus-visible { border-color: var(--accent); outline: none; }
#play .pl-sbtn.pl-sgo2 { background: var(--accent); color: #20160a; border-color: var(--accent-2); }
#play .pl-sbar { flex: 1 0 100%; height: 3px; border-radius: 2px; background: rgba(255, 255, 255, 0.1); overflow: hidden; }
#play .pl-sbar i { display: block; width: 100%; height: 100%; background: var(--accent); transform-origin: left center; transform: scaleX(0); }
#play .pl-stt.live .pl-sbar i { background: #e0634c; }
@keyframes pl-sfill { from { transform: scaleX(0); } to { transform: scaleX(1); } }
#play.stt-on .pl-log { bottom: 270px; }
#play .pl-log { position: absolute; left: 12px; bottom: 205px; width: min(400px, 38%); background: var(--glass); border: 1px solid var(--line); border-radius: 12px; pointer-events: auto; overflow: hidden; }
#play .pl-lh { display: flex; width: 100%; justify-content: space-between; align-items: center; gap: 8px; font: inherit; font-size: 11px; text-transform: uppercase; letter-spacing: 0.07em; font-weight: 600; color: var(--muted); background: transparent; border: 0; padding: 6px 10px 4px; cursor: pointer; }
#play .pl-lh:hover, #play .pl-lh:focus-visible { color: var(--ink-2); outline: none; }
#play .pl-lc { min-width: 18px; text-align: center; color: var(--ink-2); }
#play .pl-log:not(.open) .pl-lc:not(:empty) { color: #20160a; background: var(--accent); border-radius: 999px; padding: 0 6px; }
#play .pl-ll { max-height: 190px; overflow-y: auto; overscroll-behavior: contain; padding: 0 10px 8px; display: flex; flex-direction: column; gap: 3px; }
#play .pl-log:not(.open) .pl-ll { max-height: 2.9em; overflow: hidden; }
#play .pl-ln { font-size: 13px; line-height: 1.35; color: var(--ink); overflow-wrap: anywhere; }
#play .pl-ln.empty { color: var(--muted); }
#play .pl-ln b { color: var(--accent-2); font-weight: 600; margin-right: 2px; }
#play .pl-ln.me b { color: #9fd3a8; }
#play .pl-ln.pl b { color: #a9c8f2; }
/* #352: a note for you alone (what came of your own doing), not speech: no speaker, a mark, quieter and in italics */
#play .pl-ln.note { color: #b4b6ae; }
#play .pl-ln.note i { font-style: italic; }
#play .pl-ln .pl-nm { color: var(--muted); margin-right: 5px; font-size: 0.85em; opacity: 0.85; }
#play .pl-lt { font-size: 10.5px; color: var(--muted); margin-right: 6px; font-variant-numeric: tabular-nums; }
#play .pl-act.pl-talk { border-color: rgba(159, 211, 168, 0.6); }
#play .pp-b.pp-back { margin: 10px 0 2px; }
#play.panel-open .pl-log { display: none; }
#play.talking .pl-log { bottom: 256px; }
/* General (#159): the talk bar's Local | General switch, and the log's two tabs */
#play .pl-chan { display: inline-flex; flex: none; gap: 2px; padding: 2px; border-radius: 999px; background: rgba(255, 255, 255, 0.06); }
#play .pl-chan button, #play .pl-ltabs button { font: inherit; font-size: 11.5px; font-weight: 600; padding: 4px 9px; border-radius: 999px; border: 0; background: transparent; color: var(--muted); cursor: pointer; }
#play .pl-chan button:hover, #play .pl-ltabs button:hover, #play .pl-chan button:focus-visible, #play .pl-ltabs button:focus-visible { color: var(--ink); outline: none; }
#play .pl-chan button.on, #play .pl-ltabs button.on { background: var(--accent); color: #20160a; }
#play .pl-ltabs { display: none; gap: 4px; padding: 0 10px 6px; }
#play .pl-log.open .pl-ltabs { display: flex; }
#play .pl-log.gen { border-color: rgba(169, 200, 242, 0.45); }
/* better minds (10/5): suggested replies to the villager who just answered you, under the heard log */
#play .pl-opts { position: relative; border-top: 1px solid var(--line); padding: 6px 8px 8px; max-height: 40vh; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; }
#play .pl-opts[hidden] { display: none; }
/* the x puts the replies away (10/5 mobile, Sean: "I cant seem to close it") */
#play .pl-oclose { position: absolute; top: 3px; right: 4px; width: 26px; height: 26px; display: grid; place-items: center; padding: 0; font: 18px/1 var(--sans); border-radius: 50%; border: 1px solid var(--line); background: rgba(0, 0, 0, 0.3); color: var(--ink-2); cursor: pointer; }
#play .pl-oclose:hover, #play .pl-oclose:focus-visible { color: var(--ink); border-color: var(--accent); outline: none; }
/* folded (the - on the box): the one heading line, nothing under it, until it is opened again */
#play .pl-log.min .pl-ll, #play .pl-log.min .pl-ltabs, #play .pl-log.min .pl-opts { display: none; }
#play .pl-log.min .pl-lh { padding-bottom: 6px; }
#play .pl-oh { padding-right: 30px; font-size: 11px; text-transform: uppercase; letter-spacing: 0.07em; font-weight: 600; color: var(--muted); margin: 0 2px 5px; }
#play .pl-oh b { color: var(--accent-2); text-transform: none; letter-spacing: 0; font-size: 12px; }
#play .pl-oc { display: flex; flex-wrap: wrap; gap: 5px; }
#play .pl-ochip { font: inherit; font-size: 12.5px; line-height: 1.25; text-align: left; max-width: 100%; padding: 5px 11px; min-height: 30px; border-radius: 999px; border: 1px solid rgba(242, 179, 91, 0.45); background: rgba(242, 179, 91, 0.1); color: var(--ink); cursor: pointer; overflow-wrap: anywhere; }
#play .pl-ochip:hover, #play .pl-ochip:focus-visible { border-color: var(--accent); background: rgba(242, 179, 91, 0.24); color: var(--accent-2); outline: none; }
#play .pl-ochip.bye { border-color: var(--line); background: rgba(255, 255, 255, 0.05); color: var(--ink-2); }
#play .pl-ochip.more { border-style: dashed; border-color: var(--line); background: transparent; color: var(--ink-2); }
/* while replies show, the log keeps to its last few lines so the whole box stays clear of the needs card above it */
#play .pl-log:has(.pl-opts:not([hidden])) .pl-ll { max-height: 118px; }
@media (min-width: 761px) and (pointer: fine), (min-width: 761px) and (pointer: none) { #play .pl-opts { max-height: 156px; } }
@media (max-width: 760px), (pointer: coarse) {
  #play .pl-say { top: calc(48px + env(safe-area-inset-top)); bottom: auto; left: 8px; right: 8px; width: auto; padding-left: 12px; }
  #play .pl-say input { font-size: 16px; }
  #play .pl-stt { top: calc(48px + env(safe-area-inset-top)); bottom: auto; left: 8px; right: 8px; width: auto; padding-left: 12px; }
  #play.stt-on .pl-log { top: calc(118px + env(safe-area-inset-top)); bottom: auto; }
  #play.stt-on .pl-card, #play.stt-on .pl-task { visibility: hidden; }
  #play.talking .pl-card, #play.talking .pl-task { visibility: hidden; }
  #play .pl-log { left: 8px; right: auto; bottom: auto; top: calc(56px + var(--card-h, 130px) + env(safe-area-inset-top)); width: min(260px, calc(100% - 140px)); }   /* under the needs card, however tall it grows (play.js --card-h) */
  #play.talking .pl-log { top: calc(100px + env(safe-area-inset-top)); bottom: auto; width: calc(100% - 16px); }
  #play .pl-log.open .pl-ll { max-height: 150px; }
  #play .pl-ln { font-size: 12.5px; }
  /* replies on a phone (10/5 mobile, Sean: "takes up nearly my entire view"): one short row of small chips that scrolls
     sideways, who they answer at its start and the x at its end */
  #play .pl-log:has(.pl-opts:not([hidden])) { width: calc(100% - 16px); }
  #play .pl-log:has(.pl-opts:not([hidden])) .pl-ll { max-height: 64px; }
  #play .pl-opts { display: flex; align-items: center; gap: 6px; max-height: none; overflow: visible; padding: 5px 5px 5px 9px; }
  #play .pl-opts[hidden] { display: none; }
  #play .pl-oh { flex: none; max-width: 30%; margin: 0; padding: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  #play .pl-oc { flex: 1 1 auto; min-width: 0; display: flex; flex-wrap: nowrap; gap: 6px; overflow-x: auto; overflow-y: hidden; overscroll-behavior-x: contain; scrollbar-width: none; touch-action: pan-x; }
  #play .pl-oc::-webkit-scrollbar { display: none; }
  #play .pl-ochip { flex: none; max-width: none; white-space: nowrap; overflow-wrap: normal; min-height: 32px; padding: 4px 11px; font-size: 12.5px; line-height: 1.2; }
  #play .pl-oclose { position: static; flex: none; width: 32px; height: 32px; }
  #play .pl-act.pl-talk { align-self: flex-end; }
}

/* ------------------------------------------------ the compass (10/1, compass.js): a strip while playing, a rose by the view buttons */
#compass-strip { display: none; position: fixed; top: 14px; left: calc((100% - var(--panel-w) - 24px) / 2); transform: translateX(-50%); width: 180px; height: 26px; z-index: 6; pointer-events: none; overflow: hidden;
  background: rgba(18, 24, 23, 0.55); border: 1px solid var(--line); border-radius: 8px;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 18%, #000 82%, transparent); mask-image: linear-gradient(90deg, transparent, #000 18%, #000 82%, transparent); }
body.playing #compass-strip { display: block; }
#play.third .pl-cross { display: none; }          /* the action camera: no dot on the back of their own head */
#compass-strip .cs-tape { position: absolute; left: 0; top: 0; height: 100%; width: 1080px; will-change: transform; }
#compass-strip .cs-t { position: absolute; bottom: 0; width: 1px; height: 4px; margin-left: -0.5px; background: rgba(255, 255, 255, 0.4); }
#compass-strip .cs-t.big { height: 6px; background: rgba(255, 255, 255, 0.65); }
#compass-strip .cs-l { position: absolute; top: 2px; transform: translateX(-50%); font: 600 10px/1.2 var(--sans); color: var(--ink-2); letter-spacing: 0.02em; text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8); }
#compass-strip .cs-l.c { font-size: 11.5px; color: var(--ink); }
#compass-strip .cs-l.n { font-size: 12.5px; color: #ff8f7f; }
#compass-strip .cs-mark { position: absolute; left: 50%; top: 0; width: 0; height: 0; margin-left: -4px; border: 4px solid transparent; border-top: 5px solid var(--accent-2); }
#compass-rose { width: 38px; height: 38px; flex: none; align-self: center; border-radius: 50%; background: var(--glass); border: 1px solid var(--line); box-sizing: border-box; display: grid; place-items: center; }
#compass-rose svg { width: 36px; height: 36px; display: block; }
#compass-rose .cr-ring { fill: rgba(0, 0, 0, 0.25); stroke: rgba(255, 255, 255, 0.18); stroke-width: 1; }
#compass-rose .cr-n { fill: #ef6f5e; }
#compass-rose .cr-s { fill: rgba(236, 231, 219, 0.55); }
#compass-rose .cr-t { fill: #ffb0a4; font: 800 9px/1 var(--sans); text-anchor: middle; dominant-baseline: middle; }
body.playing #compass-rose { display: none; }
@media (max-width: 760px), (pointer: coarse) {
  #compass-strip { left: 50%; top: calc(10px + env(safe-area-inset-top)); width: 132px; height: 24px; }
  body.fpv-on #compass-rose { display: none; }
}
/* ---------------------------------------------------------------- fights (10/4, bout.py: "something you can keep up with") */
/* the telegraph over a fighter winding up a blow (everyone sees it; brighter when it is aimed at you) */
.tag .cue { display: inline-block; min-width: 14px; margin-right: 5px; padding: 0 5px; border-radius: 999px; background: #c9452f; color: #fff; font-weight: 800; text-align: center; animation: cuepulse 0.45s ease-in-out infinite alternate; }
.tag .cue[hidden] { display: none; }
.tag .cue.me { background: #ff3b1f; box-shadow: 0 0 0 2px rgba(255, 220, 200, 0.85); }
@keyframes cuepulse { from { opacity: 0.7; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .tag .cue { animation: none; } }
#play .pl-fight { position: absolute; left: max(254px, calc(50% - 280px)); top: 56px; width: min(560px, calc(100% - 266px)); background: var(--glass-2); border: 1px solid rgba(224, 80, 60, 0.55); border-radius: 14px; padding: 9px 12px 8px; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45); display: flex; flex-direction: column; gap: 6px; pointer-events: auto; }
#play .pl-fight[hidden], #play .pl-fbar[hidden] { display: none; }
#play .pf-row { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 10px; }
#play .pf-who { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
#play .pf-who[hidden] { visibility: hidden; display: flex; }
#play .pf-who.foe { text-align: right; }
#play .pf-n { font: 600 15px/1.15 var(--serif); color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#play .pf-who.foe .pf-n { color: #ffb4a8; }
#play .pf-w { font-size: 11.5px; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#play .pf-vs { font: 700 12px/1 var(--sans); color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; }
#play .pf-bar { display: block; height: 8px; border-radius: 4px; background: rgba(255, 255, 255, 0.12); overflow: hidden; }
#play .pf-bar.st { height: 4px; }
#play .pf-bar i { display: block; height: 100%; width: 0; transition: width 0.25s ease; }
#play .pf-bar.hp i { background: #7ccf8a; }
#play .pf-who.foe .pf-bar.hp i { background: #e0634c; margin-left: auto; }
#play .pf-bar.st i { background: #e8c35a; }
#play .pf-who.foe .pf-bar.st i { margin-left: auto; }
#play .pf-tele { display: flex; flex-direction: column; gap: 4px; padding: 6px 9px; border-radius: 9px; background: rgba(201, 69, 47, 0.28); border: 1px solid rgba(255, 120, 90, 0.7); }
#play .pf-tele[hidden] { display: none; }
#play .pf-tt { font: 600 14px/1.25 var(--sans); color: #fff; }
#play .pf-tb { height: 5px; border-radius: 3px; background: rgba(255, 255, 255, 0.15); overflow: hidden; }
#play .pf-tb i { display: block; height: 100%; width: 100%; background: #ffcf6a; }
#play .pf-tele.now { background: rgba(255, 70, 40, 0.5); }
#play .pf-sides { display: flex; flex-direction: column; gap: 3px; }
#play .pf-sides[hidden] { display: none; }
#play .pf-side { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
#play .pf-sl { font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); margin-right: 2px; }
#play .pf-t, #play .pf-u { font: 600 12px/1.2 var(--sans); padding: 3px 8px; border-radius: 999px; border: 1px solid var(--line); background: rgba(0, 0, 0, 0.25); color: var(--ink); }
#play .pf-t { cursor: pointer; border-color: rgba(224, 99, 76, 0.6); }
#play .pf-t.on { background: #8e3b2e; border-color: #e0634c; color: #fff; }
#play .pf-t em { font-style: normal; font-weight: 400; color: #ffcf6a; }
#play .pf-t.out, #play .pf-u.out { opacity: 0.5; }
/* 10/5: a foe your dog has stunned or slowed, and the dog itself with you */
#play .pf-who.hit .pf-w { color: #f2b35b; }
#play .pf-u.pf-dog { border-color: rgba(242, 179, 91, 0.6); }
#play .pf-log { display: flex; flex-direction: column; gap: 1px; font-size: 12.5px; line-height: 1.35; color: var(--ink-2); }
#play .pf-log .mine { color: var(--ink); }
#play .pf-log div:last-child { color: #fff; }
#play .pf-res { font: 600 15px/1.3 var(--serif); color: var(--accent-2); text-align: center; }
#play .pf-res[hidden] { display: none; }
#play .pl-fbar { position: absolute; left: 50%; bottom: 62px; transform: translateX(-50%); display: flex; gap: 7px; pointer-events: auto; flex-wrap: wrap; justify-content: center; width: max-content; max-width: calc(100% - 24px); }
#play.fighting .pl-note { top: auto; bottom: 140px; }
#play .pf-b { display: flex; flex-direction: column; align-items: center; gap: 3px; min-width: 82px; padding: 9px 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--glass-2); color: var(--ink); font: 600 14px/1.1 var(--sans); cursor: pointer; box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35); touch-action: manipulation; user-select: none; }
#play .pf-b kbd { font: 600 10.5px/1 var(--sans); color: var(--muted); border: 1px solid var(--line); border-radius: 4px; padding: 2px 5px; }
#play .pf-b:hover:not(.off) { border-color: var(--accent); color: var(--accent-2); }
#play .pf-b.pf-strike { border-color: #e0634c; background: rgba(142, 59, 46, 0.85); color: #fff; }
#play .pf-b.pf-guard { border-color: #8fb7e8; }
#play .pf-b.off { opacity: 0.45; }
#play .pf-b.hit { animation: pfhit 0.25s ease-out; }
@keyframes pfhit { from { transform: scale(0.92); } to { transform: scale(1); } }
@media (prefers-reduced-motion: reduce) { #play .pf-b.hit { animation: none; } }
#play.fighting .pl-acts, #play.fighting .pl-task, #play.fighting .pl-hint { display: none; }
@media (max-width: 760px), (pointer: coarse) {
  #play .pl-fight { left: 8px; top: calc(46px + env(safe-area-inset-top)); width: calc(100% - 16px); padding: 7px 9px 6px; gap: 4px; }
  #play.fighting .pl-note { left: 8px; right: 8px; bottom: calc(160px + env(safe-area-inset-bottom)); transform: none; max-width: none; font-size: 14px; }
  #play.fightbox .pl-card, #play.fightbox .pl-log { display: none; }
  #play .pf-n { font-size: 14px; }
  #play .pf-log { font-size: 12px; }
  #play .pf-tt { font-size: 13px; }
  #play .pl-fbar { left: auto; transform: none; right: calc(10px + env(safe-area-inset-right)); bottom: calc(18px + env(safe-area-inset-bottom)); display: grid; grid-template-columns: repeat(3, minmax(0, 68px)); gap: 7px; width: min(218px, calc(100vw - 166px)); max-width: none; }
  #play .pf-b { min-width: 0; min-height: 56px; padding: 6px 4px; font-size: 13.5px; justify-content: center; }
}
/* VR (10/4, vr.js): the Enter VR button in the play bar where a headset can be used, and the note on a PC's monitor while the headset is on */
#play .pl-x.pl-vr { color: var(--accent-2); border-color: rgba(242, 179, 91, 0.45); }
#xr-away { position: fixed; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 40; max-width: min(440px, calc(100vw - 32px)); background: var(--glass-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; text-align: center; box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5); }
#xr-away p { margin: 0 0 12px; color: var(--ink); }
#xr-away button { pointer-events: auto; font-weight: 600; color: #20160a; background: var(--accent); border: 1px solid var(--accent-2); border-radius: 999px; padding: 8px 18px; cursor: pointer; }
/* ---------------------------------------------------------------- direct combat (10/4, strike.py): the weapon readied, a swing, to the death, 3rd person */
#play .pl-cbar { bottom: 108px; }
#play .pl-cbar[hidden], #play .pl-tdask[hidden], #play .pl-slash[hidden], #play .pf-td[hidden] { display: none; }
#play.ready .pl-quick { display: none; }
#play.ready .pl-cross { width: 18px; height: 18px; margin: -9px; background: transparent; border: 2px solid rgba(255, 120, 90, 0.85); box-shadow: 0 0 4px rgba(0, 0, 0, 0.7); }
#play .pl-act.pl-ready.on { border-color: #e0634c; color: #ffd2c6; }
#play .pf-b.pf-todeath.on, #play .pf-td.on { border-color: #ff3b1f; background: rgba(160, 30, 18, 0.85); color: #fff; }
#play .pf-b.pf-lower { opacity: 0.85; }
#play .pf-td { align-self: center; font: 600 12px/1.2 var(--sans); padding: 4px 12px; border-radius: 999px; border: 1px solid rgba(224, 99, 76, 0.7); background: rgba(0, 0, 0, 0.3); color: #ffcbbf; cursor: pointer; }
#play .pf-td:hover { border-color: #ff6a4c; color: #fff; }
#play .pl-tdask { border-color: #e0634c; }
#play .pl-tdask h2 { color: #ffb4a8; }
#play .pl-tdask .pa-accept { background: #b43a26; border-color: #ff6a4c; color: #fff; }
#play .pl-slash { position: absolute; left: 50%; top: 50%; width: 220px; height: 220px; margin: -110px 0 0 -110px; border-radius: 50%; pointer-events: none;
  border: 5px solid transparent; border-top-color: rgba(255, 244, 225, 0.75); border-right-color: rgba(255, 244, 225, 0.35); opacity: 0; }
#play .pl-slash.go { animation: plslash 0.32s ease-out; }
/* the bow (#343): how far the string is drawn, under the crosshair */
#play .pl-draw { position: absolute; left: 50%; top: calc(50% + 26px); width: 120px; height: 7px; margin-left: -60px; border-radius: 4px; pointer-events: none;
  background: rgba(0, 0, 0, 0.45); border: 1px solid rgba(255, 236, 205, 0.55); overflow: hidden; }
#play .pl-draw[hidden], #play .pf-b[hidden] { display: none; }
#play .pl-draw i { display: block; height: 100%; width: 0; background: #e8c27a; }
#play .pl-draw.full i { background: #ffdf8f; box-shadow: 0 0 6px rgba(255, 223, 143, 0.9); }
@keyframes plslash { from { transform: rotate(-70deg) scale(0.8); opacity: 0.95; } to { transform: rotate(80deg) scale(1.05); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { #play .pl-slash.go { animation: none; } }
#play.third.view3 .pl-cross { display: block; }
#play .pl-x.pl-view kbd { font: 600 10.5px/1 var(--sans); color: var(--muted); border: 1px solid var(--line); border-radius: 4px; padding: 1px 4px; margin-right: 5px; }
@media (max-width: 760px), (pointer: coarse) {
  #play.ready .pl-acts, #play.tcard-open .pl-cbar, #play.panel-open .pl-cbar { display: none; }
  #play .pl-cbar { bottom: calc(18px + env(safe-area-inset-bottom)); }
  #play .pl-fbar .pf-strike { grid-column: span 2; min-height: 64px; font-size: 16px; }
  #play .pl-cbar .pf-todeath { font-size: 11.5px; }
  #play .pl-x.pl-view { padding-left: 9px; padding-right: 9px; }
}
/* the play bar's trailing buttons sit together on the right, clear of the compass strip (10/4: + the view toggle; 10/5: the spacer) */
#play.ready .pl-ready { display: none; }          /* the combat bar already has Lower */

/* ------------------------------------------------ map markers and the player's Map (10/5, #303, mapview.js) */
#compass-strip .cs-pip { position: absolute; top: 12px; transform: translateX(-50%); font: 700 9px/1 var(--sans); color: #ffd2c4; text-shadow: 0 1px 2px rgba(0, 0, 0, 0.9); white-space: nowrap; }
#compass-strip .cs-pip::before { content: ''; position: absolute; left: 50%; top: -7px; width: 6px; height: 6px; margin-left: -3px; background: #ff6b4a; transform: rotate(45deg); box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.7); }
.markb { transform: translateY(-4px); font: 700 11.5px/1.3 var(--sans); color: #ffe4da; background: rgba(120, 36, 18, 0.72); padding: 1px 8px; border-radius: 999px; white-space: nowrap; pointer-events: none; box-shadow: 0 0 0 1px rgba(255, 140, 100, 0.6); }
.pmap { position: fixed; inset: 0; z-index: 40; background: #0b0e0d; display: grid; grid-template-columns: 1fr 300px; grid-template-rows: auto 1fr; color: var(--ink, #ece7db); font-family: var(--sans, system-ui, sans-serif); }
.pmap[hidden] { display: none; }
.pmap .pm-head { grid-column: 1 / -1; display: flex; align-items: center; gap: 8px; padding: 10px 14px; border-bottom: 1px solid rgba(255, 255, 255, 0.1); }
.pmap .pm-head b { font-size: 15px; }
.pmap .pm-hint { flex: 1; font-size: 12.5px; opacity: 0.75; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pmap .pm-b { font: 600 12.5px/1 var(--sans, system-ui, sans-serif); color: inherit; background: rgba(255, 255, 255, 0.08); border: 1px solid rgba(255, 255, 255, 0.16); border-radius: 8px; padding: 7px 10px; cursor: pointer; }
.pmap .pm-b:hover { background: rgba(255, 255, 255, 0.16); }
.pmap .pm-go { background: #b9502f; border-color: #d97a55; }
.pmap { touch-action: none; }
.pmap .pm-side { touch-action: pan-y; }
.pmap .pm-cv { width: 100%; height: 100%; display: block; touch-action: none; cursor: crosshair; min-height: 0; }
.pmap .pm-side { overflow-y: auto; padding: 12px; border-left: 1px solid rgba(255, 255, 255, 0.1); }
.pmap .pm-st { font-weight: 700; margin-bottom: 8px; }
.pmap .pm-empty { font-size: 12.5px; opacity: 0.7; margin: 0; }
.pmap .pm-row { display: grid; grid-template-columns: 1fr auto; gap: 6px; align-items: center; padding: 8px 0; border-top: 1px solid rgba(255, 255, 255, 0.07); }
.pmap .pm-name { background: none; border: 0; color: #ffd2c4; font: 700 13px/1.3 var(--sans, system-ui, sans-serif); text-align: left; padding: 0; cursor: pointer; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pmap .pm-d { font-size: 12px; opacity: 0.75; }
.pmap .pm-pop { position: absolute; z-index: 2; width: 240px; background: #1b1f1d; border: 1px solid rgba(255, 255, 255, 0.18); border-radius: 10px; padding: 10px; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5); display: grid; gap: 8px; }
.pmap .pm-pop[hidden] { display: none; }
.pmap .pm-form { display: flex; flex-wrap: wrap; gap: 6px; }
.pmap .pm-form input { flex: 1 1 100%; font: 14px/1.2 var(--sans, system-ui, sans-serif); padding: 7px 9px; border-radius: 8px; border: 1px solid rgba(255, 255, 255, 0.25); background: #0f1312; color: inherit; }
.pmap .pm-btns { display: flex; gap: 6px; flex-wrap: wrap; }
@media (max-width: 760px), (pointer: coarse) {
  .pmap { grid-template-columns: 1fr; grid-template-rows: auto 1fr minmax(90px, 30%); }
  .pmap .pm-side { border-left: 0; border-top: 1px solid rgba(255, 255, 255, 0.1); }
  .pmap .pm-hint { white-space: normal; font-size: 11.5px; }
}

/* ------------------------------------------------ grave labels and the label filter (10/5, #302b) */
.tag.grave.burial { font-style: normal; font-weight: 600; color: #e9e3d4; background: rgba(46, 38, 30, 0.6); }
#t-labels { position: relative; }
.lbl-pop { position: fixed; z-index: 30; background: var(--glass, rgba(20, 24, 22, 0.92)); border: 1px solid var(--line, rgba(255, 255, 255, 0.15)); border-radius: 10px; padding: 8px 10px; display: grid; gap: 6px; font: 500 13px/1.2 var(--sans, system-ui, sans-serif); color: var(--ink, #ece7db); box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45); }
.lbl-pop[hidden] { display: none; }
.lbl-pop label { display: flex; align-items: center; gap: 8px; cursor: pointer; white-space: nowrap; }
.lbl-pop b { font-size: 12px; opacity: 0.8; }
body.lb-off-people #labels .tag:not(.grave):not(.markb) { visibility: hidden; }
body.lb-off-camps #labels .settlement { visibility: hidden; }
body.lb-off-places #labels .place, body.lb-off-places #labels .wonder, body.lb-off-places #labels .tag.grave.shrine { visibility: hidden; }
body.lb-off-graves #labels .tag.grave:not(.shrine) { visibility: hidden; }

/* ------------------------------------------------ a village's customs (10/5, #298, the Neighbors tab) */
.nb-customs .nb-cust { margin: 6px 0 0; padding-left: 18px; display: grid; gap: 5px; font-size: 13px; line-height: 1.35; }
.nb-customs .nb-cust b { font-weight: 650; }
.badge.player { background: rgba(91, 209, 242, 0.18); color: #bfefff; border-color: rgba(91, 209, 242, 0.45); }

/* ------------------------------------------------ first steps (10/5, #274, tour.js) */
.pl-tour { position: fixed; left: 50%; bottom: 150px; transform: translateX(-50%); width: min(440px, calc(100% - 32px)); z-index: 12;
  background: rgba(18, 22, 20, 0.94); border: 1px solid rgba(242, 179, 91, 0.45); border-radius: 12px; padding: 12px 14px; color: var(--ink, #ece7db);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.5); font: 14px/1.4 var(--sans, system-ui, sans-serif); pointer-events: auto; }
.pl-tour[hidden] { display: none; }
.pl-tour .pt-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 4px; }
.pl-tour .pt-head b { font-size: 15px; color: #ffd89a; }
.pl-tour .pt-n { font-size: 12px; opacity: 0.7; }
.pl-tour .pt-d { margin: 0 0 10px; }
.pl-tour .pt-row { display: flex; gap: 8px; flex-wrap: wrap; }
.pl-tour .pt-b { font: 600 13px/1 var(--sans, system-ui, sans-serif); color: inherit; background: rgba(255, 255, 255, 0.08); border: 1px solid rgba(255, 255, 255, 0.18); border-radius: 8px; padding: 8px 12px; cursor: pointer; }
.pl-tour .pt-b:disabled { opacity: 0.4; cursor: default; }
.pl-tour .pt-go { background: #b9502f; border-color: #d97a55; }
/* while a villager's suggested replies show (10/5 follow-up), the guide steps out of their way: on a phone it folds
   to a small tab at the right (tap it to open it again), on a wide screen it sits to the right of the heard log */
@media (min-width: 761px) and (pointer: fine), (min-width: 761px) and (pointer: none) {
  #play.opts-on .pl-tour { left: calc(min(400px, 38%) + 28px); transform: none; width: min(400px, calc(100% - min(400px, 38%) - 48px)); }
}
@media (max-width: 760px), (pointer: coarse) {
  #play.opts-on .pl-tour:not(.peek) { left: auto; right: 8px; bottom: auto; top: calc(96px + env(safe-area-inset-top)); transform: none; width: auto;
    max-width: 200px; padding: 6px 12px; cursor: pointer; border-radius: 999px; white-space: nowrap; }
  #play.opts-on .pl-tour:not(.peek) .pt-d, #play.opts-on .pl-tour:not(.peek) .pt-row { display: none; }
  #play.opts-on .pl-tour:not(.peek) .pt-head { margin: 0; gap: 6px; }
  #play.opts-on .pl-tour:not(.peek) .pt-head b { font-size: 13px; }
  #play.opts-on .pl-tour:not(.peek) .pt-head b::before { content: "Guide: "; color: var(--muted, #a9a395); font-weight: 600; }
  .pl-tour { bottom: 300px; font-size: 13px; }
  /* #363 (Sean: "the compass up in the middle"): a phone's compass strip is top-centre: in the bar's own row where the
     bar leaves it the room (a phone on its side, a tablet), else in a row of its own under the bar (body.cs-low, play.js) */
  body.playing #compass-strip { top: calc(13px + env(safe-area-inset-top)); left: 50%; right: auto; transform: translateX(-50%); width: 150px; z-index: 5; }
  body.playing.cs-low #compass-strip { top: calc(45px + env(safe-area-inset-top)); }
}
/* a phone on its side (10/5 mobile): the heard log, the panels and the guide sit between the stick and the buttons */
@media (pointer: coarse) and (orientation: landscape) and (max-height: 560px) {
  #play .pl-log, #play .pl-log:has(.pl-opts:not([hidden])), #play.talking .pl-log { left: calc(186px + env(safe-area-inset-left)); width: min(420px, calc(100% - 460px)); }   /* (460: 7px clear of the buttons' column, it was 444 and under it) */
  #play .pl-log { top: calc(48px + env(safe-area-inset-top)); }
  #play .pl-log.open .pl-ll { max-height: calc(100vh - 250px); }
  #play .pl-panel { left: calc(150px + env(safe-area-inset-left)); right: calc(250px + env(safe-area-inset-right)); max-height: calc(100% - 58px - env(safe-area-inset-top)); }
  #play .pl-tcard { max-height: calc(100vh - 60px); }
  .pl-tour { bottom: calc(8px + env(safe-area-inset-bottom)); left: calc(150px + env(safe-area-inset-left)); right: calc(250px + env(safe-area-inset-right)); transform: none; width: auto; max-height: calc(100% - 64px); overflow-y: auto; }
  .pmap { grid-template-columns: 1fr 230px; grid-template-rows: auto 1fr; }
  .pmap .pm-side { border-top: 0; border-left: 1px solid rgba(255, 255, 255, 0.1); }
}

/* ------------------------------------------------ #363 / #391: a phone whose compass has a row of its own under the bar
   (play.js .bar2): everything that hung under the bar starts that row (26px) lower, so the compass is over nothing */
@media (max-width: 760px), (pointer: coarse) {
  #play.bar2 .pl-card, #play.bar2 .pl-task, #play.bar2 .pl-panel, #play.bar2 .pl-say, #play.bar2 .pl-stt { top: calc(74px + env(safe-area-inset-top)); }
  #play.bar2 .pl-panel { max-height: calc(100% - 298px - env(safe-area-inset-top) - env(safe-area-inset-bottom)); }
  #play.bar2 .pl-fight { top: calc(72px + env(safe-area-inset-top)); }
  #play.bar2 .pl-log { top: calc(82px + var(--card-h, 130px) + env(safe-area-inset-top)); }
  #play.bar2.stt-on .pl-log { top: calc(144px + env(safe-area-inset-top)); }
  #play.bar2.talking .pl-log { top: calc(126px + env(safe-area-inset-top)); }
  #play.bar2.opts-on .pl-tour:not(.peek) { top: calc(122px + env(safe-area-inset-top)); }
}
@media (pointer: coarse) and (orientation: landscape) and (max-height: 560px) {
  #play.bar2 .pl-log { top: calc(74px + env(safe-area-inset-top)); }
  #play.bar2 .pl-panel { max-height: calc(100% - 84px - env(safe-area-inset-top)); }
}

/* ------------------------------------------------ #364: a phone's heard log lives with the needs card (play.js): its
   heading, with the count of lines not yet read, is the card's last line; the log shows under the card only while it
   is open (a tap on the card), or as one line and the reply chips when a villager has just answered you */
@media (max-width: 760px), (pointer: coarse) {
  #play .pl-card.has-log { pointer-events: auto; cursor: pointer; -webkit-tap-highlight-color: transparent; }
  #play .pl-card .pl-lh { margin-top: 3px; padding: 5px 0 1px; border-top: 1px solid var(--line); font-size: 10.5px; }
  #play .pl-lc.new { color: #20160a; background: var(--accent); border-radius: 999px; padding: 0 6px; }
  #play .pl-log:not(.open):not(.has-opts) { display: none; }
  #play .pl-log { top: calc(52px + var(--card-h, 152px) + env(safe-area-inset-top)); width: calc(100% - 16px); }
  #play.bar2 .pl-log { top: calc(78px + var(--card-h, 152px) + env(safe-area-inset-top)); }
  #play .pl-log.has-opts .pl-ll { max-height: 64px; }
  #play .pl-log.has-opts:not(.open) .pl-ll { max-height: 92px; overflow-y: auto; padding-top: 7px; }
}
@media (pointer: coarse) and (orientation: landscape) and (max-height: 560px) {
  #play .pl-log { top: calc(48px + env(safe-area-inset-top)); width: min(420px, calc(100% - 460px)); }
  #play.bar2 .pl-log { top: calc(74px + env(safe-area-inset-top)); }
}

/* ------------------------------------------------ who hears the talk line (play.js sayTop; Sam 10/7 wrote world speech
   into the players' General twice): the switch and, in words, who will hear, on a line of their own over the input;
   General in its own blue; and a nudge when a General line starts with a villager's name */
#play .pl-say { flex-wrap: wrap; row-gap: 4px; border-radius: 18px; padding: 6px 6px 6px 12px; }
#play .pl-stop { flex: 1 0 100%; min-width: 0; display: flex; align-items: center; gap: 8px; }
#play .pl-hears { flex: 1 1 0; min-width: 0; font-size: 11.5px; line-height: 1.25; color: var(--accent-2); }
#play .pl-hfix { flex: none; font: inherit; font-size: 11.5px; font-weight: 600; padding: 4px 10px; border-radius: 999px; border: 1px solid var(--accent-2); background: var(--accent); color: #20160a; cursor: pointer; }
#play .pl-say.gen { border-color: #8fb7e8; }
#play .pl-say.gen .pl-hears { color: #a9c8f2; }
#play .pl-say.gen .pl-chan button.on, #play .pl-say.gen .pl-sgo { background: #a9c8f2; border-color: #cfe1fa; color: #10213a; }
#play .pl-say.warn .pl-stop { flex-wrap: wrap; row-gap: 4px; justify-content: space-between; }
#play .pl-say.warn .pl-hears { order: 3; flex: 1 0 100%; color: #ffc6a8; font-weight: 600; }
#play .pl-log.gen .pl-ltabs button.on { background: #a9c8f2; color: #10213a; }
#play.talking .pl-log { bottom: calc(209px + var(--say-h, 80px)); }
@media (max-width: 760px), (pointer: coarse) {
  #play.talking .pl-log { top: calc(53px + var(--say-h, 80px) + env(safe-area-inset-top)); bottom: auto; }
  #play.bar2.talking .pl-log { top: calc(79px + var(--say-h, 80px) + env(safe-area-inset-top)); }
}


/* ------------------------------------------------ #390 (iOS): the play HUD never ends up larger than the screen
   1. Safari zooms the whole page in when a text box with type under 16px takes the focus, and stays zoomed: the fixed
      HUD is then wider than the screen and its right edge (every x and -) is cut off. The join box (15px) did that
      to every new player on an iPhone; the marker's name (14px) too. Every text box is 16px on a touch screen.
   2. While playing, a pinch or a double tap on a HUD box zooms nothing (the boxes still scroll); a page that is
      zoomed in already (.pl-zoomed, play.js) keeps its pinch, to get back out.
   3. vh is the screen with the browser's bars away: where the bars show, a box sized in vh ran off the top. dvh is
      what shows now (where a browser has it).
   4. With the keyboard up, the talk log keeps inside what still shows (--vvh, play.js); a phone on its side has no
      room for it then at all, only the line being typed. */
@media (pointer: coarse) {
  #joindlg input, .pmap .pm-form input, .nb-from select, #play input, #play select, #play textarea { font-size: 16px; }
  body.playing:not(.pl-zoomed) { touch-action: pan-x pan-y; }
}
@supports (height: 100dvh) {
  #joindlg .jd-box { max-height: calc(100dvh - 32px); }
  @media (max-width: 760px), (pointer: coarse) { #play .pl-tcard { max-height: 55dvh; } }
  @media (pointer: coarse) and (orientation: landscape) and (max-height: 560px) {
    #play .pl-log.open .pl-ll { max-height: calc(100dvh - 250px); }
    #play .pl-tcard { max-height: calc(100dvh - 60px); }
  }
}
@media (max-width: 760px), (pointer: coarse) {
  #play.talking .pl-log.open .pl-ll { max-height: clamp(34px, calc(var(--vvh, 100vh) - var(--say-h, 80px) - 172px), 150px); }
  #play.talking .pl-log.open.has-opts .pl-ll { max-height: clamp(34px, calc(var(--vvh, 100vh) - var(--say-h, 80px) - 172px), 64px); }
}
@media (pointer: coarse) and (orientation: landscape) and (max-height: 560px) {
  #play.talking.kb .pl-log { display: none; }
}

/* 233: the find box at the top of Make and Build */
.pp-find { display: block; width: 100%; box-sizing: border-box; margin: 6px 0 8px; padding: 7px 10px; font: inherit; font-size: 16px;
  color: var(--text, #f2ead8); background: rgba(0, 0, 0, .28); border: 1px solid rgba(255, 255, 255, .16); border-radius: 8px; }
.pp-find:focus { outline: none; border-color: rgba(255, 196, 92, .7); }

/* 218: pin a person to the top of the People tab */
#people li { grid-template-columns: 24px 14px 1fr auto; gap: 8px; }
#people li .pin { width: 24px; height: 26px; padding: 0; border: 0; background: none; color: var(--ink-2, #9aa3ad);
  font-size: 17px; line-height: 26px; cursor: pointer; opacity: .55; }
#people li .pin:hover, #people li .pin:focus-visible { opacity: 1; }
#people li .pin.on { color: #ffc45c; opacity: 1; }

/* #367: why VR did not start (it stays until closed), and the ?xrdebug=1 readout */
#xr-err { position: fixed; left: 50%; top: 14%; transform: translateX(-50%); z-index: 60; width: min(520px, calc(100vw - 32px)); box-sizing: border-box;
  background: var(--glass-2, rgba(20, 22, 26, .96)); border: 1px solid #c8553d; border-radius: var(--radius, 12px); padding: 14px 16px;
  color: var(--ink, #f2ead8); box-shadow: 0 10px 40px rgba(0, 0, 0, .5); }
#xr-err b { display: block; margin-bottom: 6px; color: #ffb4a2; }
#xr-err p { margin: 0 0 10px; overflow-wrap: anywhere; user-select: text; -webkit-user-select: text; }
#xr-err p.hint { color: var(--ink-2, #9aa3ad); font-size: 13px; }
#xr-err button { font-weight: 600; color: #20160a; background: var(--accent, #ffc45c); border: 1px solid var(--accent-2, #c98a2b); border-radius: 999px; padding: 6px 16px; cursor: pointer; }
#xr-debug { position: fixed; left: 8px; bottom: 8px; z-index: 59; max-width: min(640px, calc(100vw - 16px)); max-height: 46vh; overflow: auto; margin: 0; padding: 8px 10px;
  font: 11px/1.45 ui-monospace, Menlo, Consolas, monospace; white-space: pre-wrap; overflow-wrap: anywhere; color: #d7f5d0; background: rgba(0, 0, 0, .82);
  border: 1px solid rgba(255, 255, 255, .18); border-radius: 8px; user-select: text; -webkit-user-select: text; pointer-events: auto; }

/* 10/8: a desktop's compass strip drops just under the bar when the bar's buttons reach it (Enter VR on a PC with a headset) */
@media (hover: hover) and (pointer: fine) { body.playing.cs-drop #compass-strip { top: 50px; } }

/* #333: "Show older" in Make and Build (rows a better thing you know outclasses wait behind it) */
#play .pp-older { display: block; font: inherit; font-size: 13px; margin: 0 0 8px; padding: 6px 12px; min-height: 34px; border-radius: 999px;
  border: 1px solid var(--line); background: transparent; color: var(--ink-2); cursor: pointer; }
#play .pp-older:disabled { opacity: .7; cursor: default; }
#play .pp-rec[data-old] { opacity: .82; }
/* 185 c: the starting village in the join dialog (a native select: the same on a phone and a desktop) */
#joindlg select { font: inherit; font-size: 15px; color: var(--ink); background: rgba(0, 0, 0, 0.3); border: 1px solid var(--line); border-radius: 10px; padding: 9px 11px; width: 100%; max-width: 100%; }
#joindlg select:focus { outline: none; border-color: var(--accent); }
#joindlg select option { color: #1b1b1b; background: #f2efe8; }
#joindlg .jd-homefact { font-size: 11.5px; color: var(--muted); min-height: 1.3em; }
@media (pointer: coarse) { #joindlg select { font-size: 16px; } }
/* 150: the players' voice picker (voicepick.js): the join dialog's Voice row, and the Your voice panel */
#joindlg .jd-row.jd-vrow { align-items: flex-start; }
#joindlg .jd-vrow .jd-l { padding-top: 9px; }
#joindlg .jd-voices { flex: 1; min-width: 0; max-height: 150px; overflow-y: auto; display: flex; flex-direction: column; gap: 3px; padding: 4px; border: 1px solid var(--line); border-radius: 10px; background: rgba(0, 0, 0, 0.22); overscroll-behavior: contain; }
#joindlg .jd-v { display: flex; align-items: center; gap: 6px; }
#joindlg .jd-vopt { flex: 1; min-width: 0; text-align: left; font: inherit; font-size: 13px; color: var(--ink); padding: 6px 10px; border-radius: 8px; border: 1px solid transparent; background: transparent; cursor: pointer; overflow-wrap: anywhere; }
#joindlg .jd-vopt small { margin-left: 7px; font-size: 11.5px; color: var(--muted); }
#joindlg .jd-vopt:hover, #joindlg .jd-vopt:focus-visible { border-color: var(--line); outline: none; }
#joindlg .jd-vopt.on { border-color: var(--accent); color: var(--accent-2); background: rgba(242, 179, 91, 0.08); }
#joindlg .jd-vplay { flex: none; min-width: 54px; font: inherit; font-size: 12px; color: var(--ink); padding: 5px 10px; border-radius: 999px; border: 1px solid var(--line); background: rgba(0, 0, 0, 0.3); cursor: pointer; }
#joindlg .jd-vplay.on, #play .pv-play.on { border-color: var(--accent); color: var(--accent-2); }
#play .pv-now b { color: var(--accent-2); }
#play .pv-top { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 2px; }
#play .pv-top .pp-b.on, #play .pv-yours { border-color: var(--accent); color: var(--accent-2); background: rgba(242, 179, 91, 0.1); }
#play .pv-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
#play .pv-row.mine { border-color: rgba(242, 179, 91, 0.55); }
#play .pv-acc { margin-left: 8px; font-size: 12px; font-weight: 400; color: var(--muted); }
#play .pv-btns { display: flex; gap: 6px; flex: none; }
#play .pv-play { min-width: 52px; }
#play .pv-yours { cursor: default; }
@media (pointer: coarse) {
  #joindlg .jd-vopt { padding: 9px 10px; }
  #joindlg .jd-vplay { padding: 8px 12px; font-size: 13px; }
  #play .pv-btns .pp-b, #play .pv-top .pp-b { font-size: 13.5px; padding: 8px 13px; }
}

/* 185b: a private message to one other player (direct.py): its own colour in the talk line and in the log */
#play .pl-say.dm { border-color: #b48ae0; }
#play .pl-say.dm .pl-stop { flex-wrap: wrap; row-gap: 4px; }
#play .pl-say.dm .pl-hears { order: 3; flex: 1 0 100%; color: #d9b8f5; }
#play .pl-say.dm .pl-chan button.on, #play .pl-say.dm .pl-sgo { background: #d0aaf0; border-color: #e6d0fa; color: #24123a; }
#play .pl-chan .pl-dmb { max-width: 138px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#play .pl-dmlist { flex: 1 0 100%; display: flex; flex-wrap: wrap; gap: 5px; max-height: 98px; overflow-y: auto; padding: 2px 0; }
#play .pl-dmlist[hidden] { display: none; }
#play .pl-dmo { font: inherit; font-size: 12.5px; padding: 5px 11px; border-radius: 999px; border: 1px solid #b48ae0; background: rgba(180, 138, 224, 0.14); color: var(--ink); cursor: pointer; }
#play .pl-dmo.away { border-color: var(--line); background: transparent; color: var(--ink-2); }
#play .pl-dmo small { margin-left: 6px; font-size: 11px; color: var(--muted); }
#play .pl-dmo.on { background: #d0aaf0; border-color: #e6d0fa; color: #24123a; }
#play .pl-dmnone { font-size: 12px; color: var(--muted); padding: 4px 2px; }
#play .pl-log.dm { border-color: rgba(180, 138, 224, 0.55); }
#play .pl-log.dm .pl-ltabs button.on { background: #d0aaf0; color: #24123a; }
#play .pl-ln.pl-dml { display: block; width: 100%; text-align: left; font: inherit; font-size: 13px; line-height: 1.35; color: var(--ink); background: transparent; border: 0; padding: 1px 0; cursor: pointer; overflow-wrap: anywhere; }
#play .pl-ln.pl-dml b { color: #d9b8f5; font-weight: 600; margin-right: 2px; }
#play .pl-ln.pl-dml.me b { color: #b9a0d6; }
@media (max-width: 760px), (pointer: coarse) {
  #play .pl-dmo { padding: 8px 13px; font-size: 13.5px; }
  #play .pl-ln.pl-dml { font-size: 12.5px; padding: 3px 0; }
}

/* 225: the People tab cut down to one village ("My village" while playing), and the player's own panel of it (villageview.js) */
#people-filter { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 2px 0 10px; }
.ppl-tab, .ppl-pick { font: inherit; font-size: 12.5px; padding: 5px 12px; border-radius: 999px; border: 1px solid var(--line); background: transparent; color: var(--ink-2); cursor: pointer; }
.ppl-pick { min-width: 0; max-width: 100%; background: rgba(255, 255, 255, 0.06); color-scheme: dark; }
.ppl-tab.on, .ppl-pick.on { border-color: var(--accent); color: var(--accent-2); background: rgba(242, 179, 91, 0.1); }
.ppl-tab:focus-visible, .ppl-pick:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
#people li.sep { display: block; cursor: default; padding: 9px 6px 5px; font-size: 12px; line-height: 1.4; color: var(--ink-2); border-bottom: 0; }
#people li.sep:hover { background: none; }
.badge.kin { color: #9fe2a0; border-color: rgba(124, 207, 138, 0.5); }
#play .vgl-row.vgl-pinned { border-color: rgba(255, 196, 92, 0.45); }
#play .vgl-row { position: relative; }
#play .vgl-row .pp-rd { padding-right: 84px; min-height: 22px; }
#play .vgl-row .pw-bars { margin-right: 84px; }
#play .vgl-row .vgl-pin { position: absolute; right: 8px; bottom: 7px; margin: 0; font-size: 12px; padding: 3px 11px; }
@media (pointer: coarse) { .ppl-pick { font-size: 16px; } .ppl-tab { padding: 7px 13px; } }

/* 27: free flight (freecam.js): its button with the view tools, the hint and Done, a touch screen's stick and up / down */
body.playing #t-fly, body.fpv-on #t-fly { display: none !important; }
body.fly-on #hint { display: none; }
#fly-hud { position: fixed; left: 12px; right: calc(var(--panel-w) + 24px); bottom: 56px; z-index: 5; display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; pointer-events: none; }
#fly-hud[hidden] { display: none; }
#fly-hud .fly-bar { display: flex; align-items: center; gap: 10px; max-width: 560px; margin-right: auto; padding: 7px 8px 7px 12px; border-radius: 12px; background: var(--glass); border: 1px solid var(--line); pointer-events: auto; }
#fly-hud .fly-hint { margin: 0; font-size: 12px; line-height: 1.4; color: var(--ink-2); }
#fly-hud .fly-done { flex: none; font: inherit; font-size: 12.5px; padding: 5px 13px; border-radius: 999px; border: 1px solid var(--accent); background: rgba(242, 179, 91, 0.12); color: var(--accent-2); cursor: pointer; }
#fly-hud .fly-joy, #fly-hud .fly-ud { display: none; flex: none; pointer-events: auto; touch-action: none; }
#fly-hud .fly-joy { width: 112px; height: 112px; border-radius: 50%; background: rgba(18, 24, 23, 0.45); border: 2px solid rgba(255, 255, 255, 0.22); place-items: center; }
#fly-hud .fly-joy i { width: 48px; height: 48px; border-radius: 50%; background: rgba(242, 179, 91, 0.75); box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4); }
#fly-hud .fly-ud { flex-direction: column; gap: 8px; }
#fly-hud .fly-ud button { width: 52px; height: 52px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, 0.22); background: rgba(18, 24, 23, 0.55); color: var(--ink); font-size: 18px; line-height: 1; touch-action: none; -webkit-user-select: none; user-select: none; }
#fly-hud .fly-ud button.on { border-color: var(--accent); color: var(--accent-2); }
#fly-hud.fly-touch .fly-joy { display: grid; }
#fly-hud.fly-touch .fly-ud { display: flex; }
#fly-hud.fly-touch .fly-bar { margin: 0 auto; align-self: flex-end; }
#fly-hud.fly-note .fly-joy, #fly-hud.fly-note .fly-ud, #fly-hud.fly-note .fly-done { display: none; }
@media (max-width: 760px) {
  /* a phone: over the sheet, which steps down to its handle while flying; the column of view tools, which runs down
     the same edge the up and down buttons need, steps aside until Done */
  body.fly-on #viewtools { display: none; }
  #fly-hud { left: calc(12px + env(safe-area-inset-left)); right: calc(12px + env(safe-area-inset-right)); bottom: calc(var(--fly-lift, 92px) + 12px); }
  #fly-hud .fly-bar { flex-direction: column; gap: 6px; padding: 7px 10px; text-align: center; }
  #fly-hud .fly-hint { font-size: 11.5px; }
}
/* #424 real voice between players (livevoice.js): the mark on whoever is speaking, "your voice is live" in the speak strip, the panel's rows */
.tag .lvm { display: inline-block; margin-right: 5px; padding: 0 4px; border-radius: 999px; background: #c9452f; font-size: 11px; line-height: 15px; animation: pl-mpulse 1.1s ease-in-out infinite; }
.tag .lvm[hidden] { display: none; }
.tag .lvm.mute, .tag .lvm.off { background: rgba(60, 64, 62, 0.92); animation: none; }
#play .pl-lvme { flex-basis: 100%; font-size: 13px; font-weight: 700; color: #ffc9bd; }
#play .pl-lvme.none { color: var(--ink-2); font-weight: 500; }
#play .pl-lvme[hidden], #t-realvoice[hidden] { display: none; }
#play .lv-row { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 2px 10px; }
#play .lv-row .pp-rd { grid-column: 1; margin-top: 0; }
#play .lv-row .pp-b { grid-column: 2; grid-row: 1 / span 2; }
