/* world.css - HUD, chat, modals, avatar editor. The island itself is drawn on the canvas. */
:root {
  --ink: #1f2a3a; --paper: #e6ebf2; --paper-2: #5b7aa3; --line: #b9c6d8; --muted: #5d6f88; --title-ink: #fff;
  --accent: #3b6fd6; --accent-ink: #fff; --coral: #ef5a5a; --mint: #2fb57d; --sun: #f2c94c;
  --radius: 8px; --shadow: 0 8px 22px rgba(20, 30, 50, 0.28);
  --font: ui-rounded, "SF Pro Rounded", "Hiragino Maru Gothic ProN", "Segoe UI", system-ui, -apple-system, sans-serif;
}
* { box-sizing: border-box; }

/* ---- 3D town additions ------------------------------------------------------------------
 * Same chrome as the flat page (this file started as a copy of world/world.css, and the DOM ids
 * are identical on purpose) plus the pieces only the WebGL town needs: a real loading bar, a
 * fallback panel for browsers without WebGL 2, and the floating NPC tag layer, which is DOM
 * rather than drawn into the canvas so the text stays crisp and selectable by screen readers. */
html, body { margin: 0; height: 100%; overflow: hidden; background: #5fc0e0; color: var(--ink); font-family: var(--font); -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
#world { position: fixed; inset: 0; width: 100%; height: 100%; display: block; touch-action: manipulation; cursor: default; }
#world.pointer { cursor: pointer; }
.hidden { display: none !important; }

/* ---------- HUD */
#hud { position: fixed; top: 12px; left: 12px; right: 12px; display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; pointer-events: none; z-index: 20; }
#hud > * { pointer-events: auto; }
.brand { display: flex; align-items: center; gap: 10px; background: var(--paper); border: 2px solid var(--ink); border-radius: 8px; padding: 6px 14px 6px 8px; box-shadow: var(--shadow); }
.brand .mark { width: 30px; height: 30px; border-radius: 50%; background: var(--sun); border: 2px solid var(--ink); display: grid; place-items: center; font-weight: 800; font-size: 12px; }
.brand h1 { font-size: 15px; margin: 0; letter-spacing: -0.01em; }
.brand .online { font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 5px; white-space: nowrap; }
.brand .online::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #9aa; }
.brand.live .online::before { background: var(--mint); box-shadow: 0 0 0 3px rgba(47, 181, 125, 0.25); }
.hud-right { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.hud-btns { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.hbtn { background: var(--paper); border: 2px solid var(--ink); border-radius: 6px; padding: 7px 12px; font-weight: 700; font-size: 13px; box-shadow: var(--shadow); display: inline-flex; align-items: center; gap: 6px; transition: transform .12s; }
.hbtn:hover { transform: translateY(-1px); background: #fff; }
.hbtn:active { transform: translateY(1px); }
.hbtn.accent { background: var(--accent); color: #fff; border-color: #1b4fc0; }
.hbtn .ic { font-size: 15px; }
#minimap { width: 200px; height: 134px; border: 2px solid var(--ink); border-radius: 6px; box-shadow: var(--shadow); background: #3d9ad0; cursor: pointer; }
.places-pop { position: absolute; top: 46px; right: 0; background: var(--paper); border: 2px solid var(--ink); border-radius: var(--radius); box-shadow: var(--shadow); padding: 8px; min-width: 240px; display: none; z-index: 30; }
.places-pop.open { display: block; }
.places-pop button { display: flex; width: 100%; align-items: center; gap: 10px; background: none; border: 0; border-radius: 10px; padding: 8px 10px; text-align: left; font-weight: 700; }
.places-pop button:hover { background: var(--paper-2); }
.places-pop button small { display: block; font-weight: 500; color: var(--muted); font-size: 12px; }
.places-pop .ic { font-size: 20px; width: 26px; text-align: center; }

/* ---------- tooltip / toasts / hint */
#tip { position: fixed; z-index: 25; pointer-events: none; background: var(--ink); color: #fff; font-size: 12px; font-weight: 700; padding: 5px 10px; border-radius: 999px; transform: translate(14px, 18px); white-space: nowrap; display: none; }
#toasts { position: fixed; top: 70px; left: 50%; transform: translateX(-50%); z-index: 40; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast { background: var(--paper); border: 2px solid var(--ink); border-radius: 6px; padding: 8px 16px; font-weight: 700; font-size: 13px; box-shadow: var(--shadow); animation: pop .25s ease-out; max-width: 92vw; text-align: center; }
.toast.err { background: #ffe1e1; }
@keyframes pop { from { transform: scale(.85); opacity: 0; } to { transform: scale(1); opacity: 1; } }
#hint { position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%); z-index: 15; background: rgba(43, 34, 32, 0.78); color: #fff; padding: 8px 16px; border-radius: 999px; font-size: 13px; font-weight: 600; pointer-events: none; transition: opacity .4s; max-width: 90vw; text-align: center; }

/* ---------- NPC dialog */
#dialog { position: fixed; left: 50%; bottom: 26px; transform: translateX(-50%); width: min(640px, calc(100vw - 24px)); background: var(--paper); border: 3px solid var(--ink); border-radius: 20px; box-shadow: var(--shadow); padding: 14px 16px 12px; z-index: 30; display: none; }
#dialog.open { display: block; animation: rise .22s ease-out; }
@keyframes rise { from { transform: translate(-50%, 16px); opacity: 0; } to { transform: translate(-50%, 0); opacity: 1; } }
#dialog .who { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
#dialog .who canvas { width: 48px; height: 48px; }
#dialog .who b { font-size: 15px; }
#dialog { border-radius: 10px; }
#dialog .who small { color: var(--muted); }
#dialog p { margin: 0 0 12px; font-size: 15px; line-height: 1.45; }
#dialog .acts { display: flex; flex-wrap: wrap; gap: 8px; }
#dialog .acts button { background: #fff; border: 2px solid var(--ink); border-radius: 6px; padding: 8px 14px; font-weight: 700; font-size: 13px; }
#dialog .acts button.primary { background: var(--accent); color: #fff; border-color: #1b4fc0; }
#dialog .acts button:hover { transform: translateY(-1px); }
#dialog .x { position: absolute; top: 8px; right: 10px; background: none; border: 0; font-size: 20px; color: var(--muted); }

/* ---------- chat */
#chat { position: fixed; left: 12px; bottom: 12px; width: min(340px, calc(100vw - 24px)); z-index: 20; background: var(--paper); border: 2px solid var(--ink); border-radius: 8px; box-shadow: var(--shadow); display: flex; flex-direction: column; overflow: hidden; }
#chat .head { display: flex; align-items: center; gap: 8px; padding: 8px 12px; background: var(--paper-2); color: var(--title-ink); border-bottom: 2px solid var(--ink); cursor: pointer; font-weight: 800; font-size: 13px; }
#chat .head .cnt { margin-left: auto; color: rgba(255,255,255,0.8); font-weight: 600; font-size: 12px; }
#chat .head .chev { transition: transform .2s; }
#chat.collapsed .chev { transform: rotate(180deg); }
#chat .msgs { height: 190px; overflow-y: auto; padding: 8px 10px; font-size: 13px; line-height: 1.35; scroll-behavior: smooth; background: #f4f7fb; }
#chat.collapsed .msgs, #chat.collapsed .row, #chat.collapsed .emotes { display: none; }
.msg { margin: 0 0 5px; word-wrap: break-word; }
.msg b { margin-right: 4px; }
.msg.sys { color: var(--muted); font-style: italic; font-size: 12px; }
.msg.me b { color: var(--accent); }
.msg time { float: right; font-size: 10px; color: #b0a090; margin-left: 6px; }
#chat .row { display: flex; gap: 6px; padding: 8px; border-top: 2px solid var(--line); }
#chat input { flex: 1; min-width: 0; border: 2px solid var(--line); border-radius: 999px; padding: 8px 12px; background: #fff; outline: none; }
#chat input:focus { border-color: var(--accent); }
#chat .send { background: var(--accent); color: #fff; border: 0; border-radius: 999px; padding: 0 14px; font-weight: 800; }
#chat .emotes { display: flex; gap: 4px; padding: 0 8px 8px; }
#chat .emotes button { background: #fff; border: 2px solid var(--line); border-radius: 10px; font-size: 16px; padding: 3px 7px; line-height: 1; }
#chat .emotes button:hover { border-color: var(--ink); }

/* ---------- modal */
#modal { position: fixed; inset: 0; z-index: 50; display: none; align-items: center; justify-content: center; background: rgba(43, 34, 32, 0.45); backdrop-filter: blur(3px); padding: 16px; }
#modal.open { display: flex; }
.mbox { width: min(860px, 100%); max-height: calc(100vh - 32px); background: var(--paper); border: 3px solid var(--ink); border-radius: 12px; box-shadow: var(--shadow); display: flex; flex-direction: column; overflow: hidden; animation: pop .22s ease-out; }
.mbox.wide { width: min(1100px, 100%); height: calc(100vh - 32px); }
.mhead { display: flex; align-items: center; gap: 10px; padding: 10px 16px; border-bottom: 2px solid var(--ink); background: var(--paper-2); color: var(--title-ink); }
.mhead h2 { margin: 0; font-size: 16px; flex: 1; letter-spacing: -0.01em; }
.mhead .x { background: #fff; color: var(--ink); border: 2px solid var(--ink); border-radius: 6px; width: 30px; height: 30px; font-size: 18px; line-height: 1; display: grid; place-items: center; }
.mhead .ext { font-size: 12px; font-weight: 700; color: #fff; text-decoration: none; border: 2px solid #fff; border-radius: 6px; padding: 5px 10px; }
.mbody { overflow: auto; padding: 18px; flex: 1; line-height: 1.5; background: #f4f7fb; }
.mbody h3 { margin: 18px 0 8px; font-size: 15px; }
.mbody p { margin: 0 0 10px; }
.mbody a { color: var(--accent); }

/* about */
.about { display: grid; grid-template-columns: 220px 1fr; gap: 20px; }
.about img { width: 100%; border-radius: 16px; border: 3px solid var(--ink); }
.about .head { font-size: 20px; font-weight: 800; letter-spacing: -0.01em; margin: 0 0 10px; line-height: 1.3; }
.facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px; margin: 12px 0; }
.fact { background: #fff; border: 2px solid var(--line); border-radius: 12px; padding: 8px 10px; font-size: 13px; display: flex; gap: 8px; align-items: flex-start; }
.fact .ic { font-size: 18px; }
.fact small { display: block; color: var(--muted); font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.linkrow { display: flex; flex-wrap: wrap; gap: 8px; }
.pill { display: inline-flex; align-items: center; gap: 6px; background: #fff; border: 2px solid var(--ink); border-radius: 999px; padding: 6px 12px; font-weight: 700; font-size: 13px; text-decoration: none; color: var(--ink); cursor: pointer; }
.pill:hover { background: var(--paper-2); }
.pill.accent { background: var(--accent); color: #fff; border-color: #1b4fc0; }

/* skills */
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 10px; }
.card { background: #fff; border: 2px solid var(--line); border-radius: 14px; padding: 12px 14px; }
.card .ic { font-size: 22px; }
.card b { display: block; margin: 4px 0 2px; }
.card p { font-size: 13px; color: #4a3f38; margin: 0; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { background: var(--paper-2); border: 2px solid var(--line); border-radius: 999px; padding: 4px 10px; font-size: 12px; font-weight: 700; }

/* apps */
.apps { display: grid; grid-template-columns: 250px 1fr; gap: 0; height: 100%; }
.apps .list { border-right: 2px solid var(--line); overflow: auto; padding: 8px; background: var(--paper); }
.appbtn { display: flex; gap: 10px; align-items: center; width: 100%; background: #fff; border: 2px solid var(--line); border-radius: 14px; padding: 8px 10px; text-align: left; margin-bottom: 6px; }
.appbtn:hover { border-color: var(--ink); }
.appbtn.active { border-color: var(--accent); background: #eff4ff; }
.appbtn .ic { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; font-size: 20px; color: #fff; flex: none; }
.appbtn b { display: block; font-size: 14px; }
.appbtn small { display: block; color: var(--muted); font-size: 11px; }
.apps .view { position: relative; background: #fff; display: flex; flex-direction: column; }
.apps .view .bar { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-bottom: 2px solid var(--line); font-size: 13px; background: var(--paper-2); }
.apps .view .bar .status { background: var(--mint); color: #fff; border-radius: 999px; padding: 2px 8px; font-size: 11px; font-weight: 800; }
.apps .view .bar .status.dev { background: var(--sun); color: var(--ink); }
.apps .view .bar .status.soon { background: #7c5ce0; }
.apps .view .bar .status.site { background: var(--accent); }
.apps .view .bar .tag { flex: 1; color: #4a3f38; }
.apps .view .bar .back { display: none; }
.apps iframe { flex: 1; width: 100%; border: 0; background: #fff; }
.apps .loading { position: absolute; inset: 44px 0 0; display: grid; place-items: center; color: var(--muted); font-weight: 700; background: #fff; }
.apps .loading.off { display: none; }
.mbox.wide .mbody { padding: 0; overflow: hidden; }

/* forms */
form.inq { display: grid; gap: 10px; }
form.inq .two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
form.inq label { display: grid; gap: 4px; font-size: 12px; font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
form.inq input, form.inq select, form.inq textarea { border: 2px solid var(--line); border-radius: 12px; padding: 10px 12px; background: #fff; outline: none; font-weight: 500; text-transform: none; letter-spacing: 0; font-size: 14px; }
form.inq input:focus, form.inq select:focus, form.inq textarea:focus { border-color: var(--accent); }
form.inq textarea { min-height: 120px; resize: vertical; }
form.inq .hp { position: absolute; left: -9999px; }
form.inq .foot { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
form.inq .foot small { color: var(--muted); }
.btn { background: var(--accent); color: #fff; border: 2px solid #1b4fc0; border-radius: 999px; padding: 10px 18px; font-weight: 800; }
.btn:disabled { opacity: .6; }
.btn.ghost { background: #fff; color: var(--ink); border-color: var(--ink); }
ul.tight { margin: 6px 0 12px; padding-left: 20px; }
ul.tight li { margin-bottom: 4px; }
.sent { text-align: center; padding: 30px 10px; }
.sent .big { font-size: 46px; }

/* avatar editor + welcome */
/* One column: the town behind the modal is the preview, so the editor is just the controls. */
.editor { display: grid; grid-template-columns: 1fr; gap: 0; }
.editor .preview { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.editor .preview canvas { width: 180px; height: 220px; background: linear-gradient(#bfe6f5, #cfc5b3); border: 3px solid var(--ink); border-radius: 10px; }
.editor .opts { display: flex; flex-wrap: wrap; gap: 6px; }
.opt label { display: block; font-size: 12px; font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; margin-bottom: 5px; }
.sw { display: flex; flex-wrap: wrap; gap: 6px; }
.sw button { width: 30px; height: 30px; border-radius: 50%; border: 2px solid rgba(0,0,0,.15); padding: 0; }
.sw button.on { border: 3px solid var(--ink); transform: scale(1.12); }
.sw button.txt { width: auto; border-radius: 999px; padding: 4px 10px; font-size: 12px; font-weight: 700; background: #fff; text-transform: capitalize; }
.sw button.txt.on { background: var(--accent); color: #fff; border-color: #1b4fc0; transform: none; }
.editor input[type=text] { width: 100%; border: 2px solid var(--line); border-radius: 12px; padding: 9px 12px; background: #fff; outline: none; font-weight: 700; }
.editor input[type=text]:focus { border-color: var(--accent); }
.welcome { text-align: center; }
.welcome canvas { width: 150px; height: 190px; background: linear-gradient(#bfe6f5, #cfc5b3); border: 3px solid var(--ink); border-radius: 10px; }
.welcome h3 { margin: 10px 0 4px; font-size: 22px; }
.welcome p { color: #4a3f38; max-width: 460px; margin: 0 auto 14px; }
.welcome .acts { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }

/* player card */
#pcard { position: fixed; z-index: 35; background: var(--paper); border: 2px solid var(--ink); border-radius: 14px; box-shadow: var(--shadow); padding: 10px 12px; display: none; font-size: 13px; }
#pcard.open { display: block; }
#pcard b { display: block; margin-bottom: 6px; }
#pcard button { background: #fff; border: 2px solid var(--ink); border-radius: 999px; padding: 5px 10px; font-weight: 700; font-size: 12px; margin-right: 4px; }

/* status */
#status { position: fixed; top: 60px; left: 12px; z-index: 20; background: #ffe1e1; border: 2px solid var(--coral); border-radius: 999px; padding: 6px 12px; font-size: 12px; font-weight: 700; display: none; }
#status.on { display: block; }

@media (max-width: 720px) {
  .brand h1 { display: none; }
  .brand .online { font-size: 11px; }
  .hbtn .lbl { display: none; }
  .hbtn { padding: 7px 10px; }
  #minimap { width: 130px; height: 88px; }
  #chat { width: calc(100vw - 24px); }
  #chat .msgs { height: 130px; }
  .about { grid-template-columns: 1fr; }
  .about img { max-width: 180px; }
  .editor { grid-template-columns: 1fr; }
  .editor .preview canvas { width: 140px; height: 170px; }
  .apps { grid-template-columns: 1fr; }
  .apps .list { border-right: 0; }
  .apps.viewing .list { display: none; }
  .apps:not(.viewing) .view { display: none; }
  .apps .view .bar .back { display: inline-block; }
  .apps .view .bar .tag { display: none; }
  form.inq .two { grid-template-columns: 1fr; }
  .mbody { padding: 14px; }
  #hint { bottom: auto; top: 64px; font-size: 12px; }
  #dialog { bottom: 12px; }
}


/* ---- loading -------------------------------------------------------------------------------- */
#loader { position: fixed; inset: 0; z-index: 60; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; background: #5fc0e0; color: var(--ink); font-weight: 700; font-size: 14px; transition: opacity .45s; }
#loader.done { opacity: 0; pointer-events: none; }
#loader .lbar { width: min(280px, 60vw); height: 12px; border: 2px solid var(--ink); border-radius: 999px; background: rgba(255,255,255,0.45); overflow: hidden; }
#loader .lbar i { display: block; height: 100%; width: 0; background: var(--ink); transition: width .3s ease-out; }
#lmsg { text-shadow: 0 1px 0 rgba(255,255,255,0.4); }

/* ---- no webgl2 ------------------------------------------------------------------------------ */
#nogl { position: fixed; inset: 0; z-index: 70; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 24px; text-align: center; background: var(--paper); }
#nogl h1 { font-size: 20px; margin: 0; }
#nogl p { margin: 0; max-width: 42ch; line-height: 1.5; color: var(--muted); }
#nogl a { color: var(--accent); font-weight: 700; }

/* ---- floating name and station tags ---------------------------------------------------------
 * Positioned every frame from the renderer's projected sprite anchors. pointer-events stay off so
 * a tag never eats a click meant for the ground underneath it. */
#tags { position: fixed; inset: 0; z-index: 12; pointer-events: none; overflow: hidden; }
#tags .tag { position: absolute; transform: translate(-50%, -100%); white-space: nowrap; font-size: 12px; font-weight: 800; padding: 3px 9px; border-radius: 999px; border: 2px solid var(--ink); background: var(--paper); box-shadow: 0 2px 0 rgba(43,34,32,0.35); }
#tags .tag.station { color: #fff; }
#tags .tag.player { background: rgba(255,255,255,0.92); font-size: 11px; padding: 2px 7px; }
#tags .tag.me { background: var(--sun); }
#tags .tag::after { content: ""; position: absolute; left: 50%; bottom: -7px; width: 8px; height: 8px; margin-left: -4px; background: inherit; border-right: 2px solid var(--ink); border-bottom: 2px solid var(--ink); transform: rotate(45deg); }
#tags .bubble { position: absolute; transform: translate(-50%, -100%); max-width: 220px; white-space: normal; font-size: 12px; font-weight: 600; padding: 6px 10px; border-radius: 10px; border: 2px solid var(--ink); background: #fff; box-shadow: 0 2px 0 rgba(43,34,32,0.35); animation: pop .2s ease-out; }

/* ---- camera panel ---------------------------------------------------------------------------- */
.cam-pop { position: absolute; top: 46px; right: 0; background: var(--paper); border: 2px solid var(--ink); border-radius: var(--radius); box-shadow: var(--shadow); padding: 10px 12px; min-width: 210px; display: none; z-index: 30; font-size: 12px; }
.cam-pop.open { display: block; }
.cam-pop label { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 6px 0; font-weight: 700; }
.cam-pop input[type=range] { flex: 1; min-width: 0; }
.cam-pop .keys { margin-top: 8px; padding-top: 8px; border-top: 2px solid var(--line); color: var(--muted); font-weight: 600; line-height: 1.6; }
.cam-pop kbd { background: #fff; border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 4px; padding: 0 4px; font-family: var(--font); font-size: 11px; }

/* On a phone the minimap and the hint crowd the small canvas; the town is the point, not the HUD. */
@media (max-width: 560px) {
  #minimap { width: 128px; height: 86px; }
  #hint { font-size: 12px; bottom: 12px; }
  .hbtn .lbl { display: none; }
}

/* ---- sign panels, contact form, avatar editor ---------------------------------------------- */
.pill { display: inline-flex; align-items: center; gap: 6px; background: #fff; color: var(--ink); border: 2px solid var(--ink); border-radius: 999px; padding: 8px 16px; font-weight: 700; font-size: 13px; text-decoration: none; cursor: pointer; }
.pill:hover { transform: translateY(-1px); }
.pill.primary { background: var(--accent); color: #fff; border-color: #1b4fc0; }
.pill[disabled] { opacity: .55; cursor: default; transform: none; }
.app-head { display: flex; align-items: center; gap: 14px; margin-bottom: 12px; }
.app-icon { width: 64px; height: 64px; border-radius: 18px; display: grid; place-items: center; font-size: 32px; border: 3px solid var(--ink); flex: 0 0 auto; }
.app-status { display: inline-block; font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-bottom: 4px; }
.app h3 { margin: 0; font-size: 17px; }
.app-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 6px; }
.app-hint { color: var(--muted); font-size: 12px; min-height: 1em; }
.facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px; margin-top: 12px; }
.fact { display: flex; gap: 8px; align-items: flex-start; background: #fff; border: 2px solid var(--line); border-radius: 10px; padding: 8px 10px; font-size: 13px; }
.fact span { font-size: 18px; } .fact small { color: var(--muted); font-weight: 700; }
.form label { display: block; font-weight: 700; font-size: 13px; margin: 0 0 10px; }
.form input, .form textarea { display: block; width: 100%; margin-top: 4px; border: 2px solid var(--line); border-radius: 10px; padding: 9px 12px; font: inherit; background: #fff; outline: none; }
.form input:focus, .form textarea:focus { border-color: var(--accent); }
.form .row { display: flex; align-items: center; gap: 12px; } .form .note { color: var(--muted); font-size: 13px; } .hp { position: absolute; left: -9999px; }
.editor .name { display: flex; align-items: center; gap: 10px; font-weight: 700; margin-bottom: 12px; }
.editor .name input { flex: 1; border: 2px solid var(--line); border-radius: 999px; padding: 7px 12px; font: inherit; }
.opt-row { display: flex; align-items: flex-start; gap: 10px; margin: 0 0 8px; }
.opt-row > label { flex: 0 0 92px; font-weight: 700; font-size: 13px; padding-top: 6px; color: var(--muted); }
.opts { display: flex; flex-wrap: wrap; gap: 6px; }
.opts button { background: #fff; border: 2px solid var(--line); border-radius: 999px; padding: 5px 11px; font-weight: 700; font-size: 12px; }
.opts button.on { border-color: var(--ink); background: var(--sun); }
.opts.swatches button { width: 26px; height: 26px; padding: 0; border-radius: 50%; }
.opts.swatches button.on { outline: 3px solid var(--ink); outline-offset: 1px; }
/* head / body pickers: nine numbered chips, all the same width so the row reads as a set */
.opts.numbered button { min-width: 30px; padding: 5px 0; text-align: center; font-variant-numeric: tabular-nums; }
.colour { display: flex; align-items: center; gap: 9px; }
.colour input[type=color] { width: 48px; height: 30px; padding: 0; border: 2px solid var(--line); border-radius: 9px; background: #fff; cursor: pointer; }
.colour input[type=color]::-webkit-color-swatch-wrapper { padding: 3px; }
.colour input[type=color]::-webkit-color-swatch { border: none; border-radius: 5px; }
.colour .hex { font: 700 12px ui-monospace, Consolas, monospace; color: var(--muted); text-transform: uppercase; }
.editor .row { display: flex; justify-content: flex-end; gap: 8px; margin-top: 8px; }
.help p { margin: 0 0 10px; } .help kbd { background: #fff; border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 4px; padding: 0 5px; font-family: var(--font); font-size: 12px; }
#tags .tag.station { pointer-events: auto; cursor: pointer; font-size: 12px; }
