[hidden] { display: none !important; }
:root { --card: #fff; --glass: rgba(255,255,255,.85); --glass-2: rgba(255,255,255,.6); --wall3d: #eee8dd; --paper: #f3efe6; --ink: #1f241f; --soft: #5f6a5f; --line: #d9d2c2; --soil: #6b4727; --soil-2: #4a2f18; --trail: #1c3fd6; --trail-ink: #1431a6;
        --display: "Barlow Condensed", "Arial Narrow", Impact, sans-serif; --body: "Source Sans 3", "Segoe UI", system-ui, sans-serif; }
/* dark: the room after sunset; the kits themselves keep their printed colours */
:root[data-theme="dark"] { --card: #1f2420; --glass: rgba(26,30,27,.86); --glass-2: rgba(26,30,27,.7); --wall3d: #34352f;
  --paper: #161916; --ink: #ece7dc; --soft: #a7ad9f; --line: #373c35; --trail: #2f52e8; --trail-ink: #2444cf; }
:root[data-theme="dark"] h1 em, :root[data-theme="dark"] .wl-label, :root[data-theme="dark"] .guest-intro b, :root[data-theme="dark"] .ed-pick { color: #8aa0ff; }
* { box-sizing: border-box; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 17px/1.5 var(--body); }
.wrap { max-width: 1100px; margin: 0 auto; padding: 0 max(18px, env(safe-area-inset-left, 0px)) 60px max(18px, env(safe-area-inset-right, 0px)); }
h1, h2 { font-family: var(--display); text-transform: uppercase; letter-spacing: .01em; line-height: .95; margin: 0; }
h1 { font-size: clamp(34px, 6vw, 56px); font-weight: 800; }
h1 em { font-style: normal; color: var(--trail); }
.sub { color: var(--soft); margin: 10px 0 24px; }
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 11px 20px; border-radius: 8px; border: 0; cursor: pointer; font-family: var(--display); font-weight: 700; font-size: 17px; letter-spacing: .04em; text-transform: uppercase; text-decoration: none; background: var(--trail); color: #fff; }
.btn:hover { background: var(--trail-ink); }
.btn.quiet, button.quiet, a.quiet { background: transparent; color: var(--ink); border: 2px solid var(--line); }
button { font: inherit; }

.acts { display: flex; gap: 8px; flex-wrap: wrap; }
.acts button, .acts a { padding: 7px 12px; border-radius: 7px; border: 0; cursor: pointer; font-family: var(--display); font-weight: 700; font-size: 14px; letter-spacing: .04em; text-transform: uppercase; text-decoration: none; background: var(--trail); color: #fff; }
.acts .quiet { background: transparent; color: var(--ink); border: 2px solid var(--line); }

/* Add a trek */
.note { font-size: 14px; color: var(--soft); }
footer { color: var(--soft); font-size: 14px; border-top: 1px solid var(--line); padding: 18px 0; }

.btn:disabled { opacity: .45; cursor: not-allowed; }

/* The 3D wall fills the screen under the top bar; the title, link, add button and the picked
   kit's bar float over it. */
body.walling footer, body.walling main { display: none; }
.stage { position: relative; height: calc(100dvh - 59px); min-height: 360px; overflow: hidden; background: var(--wall3d); }
.wall3d { position: absolute; inset: 0; display: grid; place-items: center; }
.wall3d canvas { display: block; width: 100% !important; height: 100% !important; }
.ov { position: absolute; left: 0; right: 0; padding: 12px max(16px, calc((100% - 1100px) / 2)); pointer-events: none; display: grid; gap: 8px; }
.ov > * { pointer-events: auto; }
.ov-top { top: 0; }
.ov-bottom { bottom: 0; justify-items: center; }
.ov h1, .ov .sub { margin: 0; }
.ov .sub { color: var(--soft); }
.kitbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; width: min(100%, 720px); background: var(--glass); backdrop-filter: blur(6px); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; box-shadow: 0 6px 20px rgba(0,0,0,.08); }
.kitbar .kp-name { display: grid; line-height: 1.2; }
.kitbar .kp-name b { font-family: var(--display); font-size: 22px; text-transform: uppercase; letter-spacing: .02em; }
.kitbar .kp-name span { color: var(--soft); font-size: 14px; }
.kitbar .soon { padding: 7px 12px; border-radius: 7px; border: 2px solid var(--line); font-family: var(--display); font-weight: 700; font-size: 14px; letter-spacing: .04em; text-transform: uppercase; color: var(--soft); }
.wallhint { margin: 0; font-size: 13px; color: var(--soft); background: var(--glass-2); padding: 3px 10px; border-radius: 99px; }
.kitbar:not([hidden]) + .wallhint { display: none; }
/* the wall's link: one pill with the address (handle in bold) and small copy / share / open buttons */
.wlink { justify-self: start; display: flex; align-items: center; gap: 4px; max-width: 100%; background: var(--glass); backdrop-filter: blur(8px);
  border: 1px solid rgba(217,210,194,.9); border-radius: 999px; padding: 4px 4px 4px 12px; box-shadow: 0 4px 14px rgba(31,36,31,.06); }
.wl-label { font-family: var(--display); font-weight: 700; font-size: 14px; letter-spacing: .06em; text-transform: uppercase; color: var(--trail); white-space: nowrap; margin-right: 8px; }
.wl-ic { width: 16px; height: 16px; flex: none; fill: none; stroke: var(--trail); stroke-width: 2.2; stroke-linecap: round; }
.wl-url { font-size: 14px; color: var(--soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin: 0 8px 0 4px; min-width: 0; }
.wl-url { display: flex; }
.wl-url #wl-site { overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.wl-url b { color: var(--ink); font-weight: 600; flex: none; }
.wl-btn { display: inline-flex; align-items: center; gap: 6px; border: 0; background: transparent; color: var(--ink); font: 600 13px/1 var(--body);
  padding: 8px 12px; border-radius: 999px; cursor: pointer; text-decoration: none; transition: background .15s, color .15s; }
.wl-btn:hover { background: rgba(28,63,214,.08); color: var(--trail); }
.wl-btn svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.wl-btn.done { background: #e7f3e4; color: #2f7a2a; }
.wl-btn[hidden] { display: none; }
.wl-btn, .wl-label, .wl-ic { flex: none; }
@media (max-width: 640px) { .ov h1 { font-size: 30px; } .wl-site, #wl-site { display: none; } .wl-btn span { display: none; } .wl-btn { padding: 8px; } }
/* wide screens: the "show off" pill sits beside the title, as tall as the title's letters */
@media (min-width: 900px) {
  .ov-top#signed-in { display: flex; align-items: center; gap: 22px; flex-wrap: nowrap; }
  .ov-top#signed-in h1 { flex: none; }
  .ov-top#signed-in h1 { line-height: 1; }
  .ov-top#signed-in .wlink { height: 46px; padding: 4px 5px 4px 18px; gap: 6px; min-width: 0; flex: 0 1 auto; }
  .ov-top#signed-in .wl-label { font-size: 16px; }
  .ov-top#signed-in .wl-url { font-size: 15px; }
  .ov-top#signed-in .wl-btn { font-size: 14px; padding: 10px 14px; }
}

/* ---- adding a trek on the wall: an outline of the new kit over the empty spot ---- */
body.editing .wlink, body.editing .wallhint, body.editing .kitbar { display: none !important; }
.editor { position: absolute; inset: 0; pointer-events: none; z-index: 3; }
.editor > * { pointer-events: auto; }
.ed-tile, .ed-plate { position: absolute; box-sizing: border-box; border: 2px dashed rgba(28,63,214,.55); background: var(--glass-2);
  backdrop-filter: blur(2px); border-radius: 6px; overflow: hidden; }
.ed-tile.over { background: rgba(28,63,214,.08); border-color: var(--trail); }
.ed-drop { position: absolute; inset: 0; display: grid; align-content: center; justify-items: center; gap: 8px; padding: 6%; text-align: center; }
.ed-drop svg { width: 34px; height: 34px; fill: none; stroke: var(--trail); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ed-drop b { font-family: var(--display); font-size: clamp(18px, 2.4vw, 26px); text-transform: uppercase; letter-spacing: .03em; color: var(--ink); }
.ed-pick { color: var(--trail); font-weight: 600; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.ed-drop small { color: var(--soft); font-size: 13px; max-width: 30ch; }
.ed-known { margin-top: 6px; font-size: 13px; color: var(--soft); display: flex; gap: 6px; align-items: center; flex-wrap: wrap; justify-content: center; }
.ed-known select { font: inherit; color: var(--ink); padding: 4px 6px; border: 1px solid var(--line); border-radius: 6px; background: var(--card); }
.ed-change[hidden], .ed-drop[hidden], .ed-busy[hidden] { display: none; }
/* once the tile hangs in the spot, the outline steps back to a faint frame so the tile shows through */
.ed-tile.filled { background: transparent; backdrop-filter: none; border-color: rgba(28,63,214,.35); pointer-events: none; }
.ed-tile.filled .ed-change { pointer-events: auto; }
.ed-busy { position: absolute; inset: 0; display: grid; align-content: center; justify-items: center; gap: 8px; background: var(--glass-2); }
.ed-busy p { margin: 0; font-size: 14px; color: var(--soft); }
.ed-busy .track { width: 60%; height: 6px; background: var(--line); border-radius: 99px; overflow: hidden; }
.ed-busy .fill { height: 100%; width: 0; background: var(--trail); border-radius: 99px; transition: width .4s ease; }
.ed-change { position: absolute; right: 8px; top: 8px; z-index: 2; font: 600 12px/1 var(--body); background: var(--card); border: 1px solid var(--line); border-radius: 99px; padding: 6px 10px; cursor: pointer; }
/* the plate: four rows like the print, the letters sized from the plate's height */
.ed-plate { display: grid; grid-template-rows: 1.35fr 1fr 1fr 1fr; padding: calc(var(--ph) * .06) calc(var(--ph) * .1); gap: calc(var(--ph) * .025);
  background: rgba(107,71,39,.86); border-color: rgba(255,255,255,.75); }
.pr { display: flex; align-items: center; gap: calc(var(--ph) * .05); min-width: 0; color: #fff; font: 700 calc(var(--ph) * .13)/1 Arimo, "Liberation Sans", Arial, sans-serif; text-transform: uppercase; }
.pr.r1 { font-size: calc(var(--ph) * .17); }
.pr i { font-style: normal; flex: none; font-size: .8em; }
.pr span { flex: none; opacity: .9; }
.pr input { min-width: 0; flex: 1 1 0; height: 100%; box-sizing: border-box; font: inherit; color: #fff; text-transform: uppercase; background: rgba(255,255,255,.08);
  border: 0; border-bottom: 1.5px dashed rgba(255,255,255,.6); border-radius: 3px; padding: 0 .3em; outline: none; }
.pr input:focus { background: rgba(255,255,255,.2); border-bottom-style: solid; }
.pr input::placeholder { color: rgba(255,255,255,.6); }
.pr input[readonly] { border-bottom-color: transparent; background: transparent; }
.pr input[type="date"], .pr input[type="time"] { flex: 0 1 auto; width: 9.5em; color-scheme: dark; }
.pr input#height { flex: 0 0 5.6em; font-size: .78em; }
.edbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; width: min(100%, 720px); background: var(--glass);
  backdrop-filter: blur(6px); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; box-shadow: 0 6px 20px rgba(0,0,0,.08); }
.ed-msg { margin: 0; font-size: 13px; color: var(--soft); flex: 1 1 200px; }
.ed-msg #fit, .ed-msg #err { color: #a8401c; }
.ed-acts { display: flex; gap: 8px; }
.ed-acts .navbtn:disabled { opacity: .45; cursor: not-allowed; }

/* arranging the wall */

.arrange-hint { display: none; }
body.arranging .arrange-hint { display: block; margin: 0; color: var(--soft); font-size: 14px; }
body.arranging .wlink, body.arranging .wallhint { display: none !important; }
.kitbar .acts button:disabled { opacity: .4; cursor: default; }
@media (min-width: 900px) { body.arranging .ov-top#signed-in { flex-wrap: wrap; } }
.ed-confirm { position: absolute; z-index: 6; display: grid; gap: 4px; justify-items: center; text-align: center; background: var(--card); border: 1px solid var(--line);
  border-radius: 14px; padding: 14px 16px; box-shadow: 0 12px 32px rgba(31,36,31,.22); width: min(290px, calc(100% - 16px)); box-sizing: border-box; left: 0; top: 0; }
.ed-confirm b { font-family: var(--display); font-size: 20px; text-transform: uppercase; letter-spacing: .02em; color: var(--ink); }
.ed-confirm span { font-size: 14px; color: var(--soft); margin-bottom: 6px; }
.ed-confirm div { display: flex; gap: 8px; }
.ed-confirm[hidden] { display: none; }
/* while it asks, everything but the new kit and the question steps back */
body.asking .ov-top, body.asking .ov-bottom, body.asking header.nav { opacity: .35; pointer-events: none; transition: opacity .25s; }
.ov-top, .ov-bottom, header.nav { transition: opacity .25s; }
.navbtn.danger { background: #a8401c; border-color: #a8401c; }
.navbtn.danger:hover { background: #8a3316; border-color: #8a3316; }

/* signed-out visitors: a sample wall to try */
.guest-intro { display: grid; gap: 2px; max-width: 640px; background: var(--glass); backdrop-filter: blur(8px); border: 1px solid rgba(217,210,194,.9);
  border-radius: 14px; padding: 10px 14px; box-shadow: 0 4px 14px rgba(31,36,31,.06); }
.guest-intro b { font-family: var(--display); font-size: 20px; text-transform: uppercase; letter-spacing: .02em; color: var(--trail); }
.guest-intro span { font-size: 14px; color: var(--ink); }
.guest-intro[hidden] { display: none; }
body.guest .wlink { display: none !important; }
body.editing .guest-intro, body.arranging .guest-intro { display: none; }
.guest-save { width: min(340px, calc(100% - 16px)); gap: 8px; }
.guest-save .gbtn { width: 100%; margin-top: 4px; }
.guest-save .linklike { background: none; border: 0; color: var(--soft); text-decoration: underline; cursor: pointer; font: 600 13px/1 var(--body); padding: 4px; }
.guest-save .guest-err { margin: 0; color: #a8401c; font-size: 13px; min-height: 0; }

/* the wall's own tools (add a trek, arrange / done): top right of the wall, beside the share pill */
.walltools { display: flex; gap: 8px; align-items: center; justify-self: start; }   /* right beside the share pill */
.walltools .navbtn { box-shadow: 0 4px 14px rgba(31,36,31,.08); }
.walltools .navbtn.quiet { background: var(--glass); backdrop-filter: blur(8px); }
body.editing .walltools { display: none; }
@media (min-width: 900px) { .ov-top#signed-in .walltools { flex: none; } body.arranging .ov-top#signed-in { flex-wrap: nowrap; } }

/* the share sheet: preview on the left (9:16), choices on the right; stacked on phones */
.sharesheet { position: fixed; inset: 0; z-index: 50; background: rgba(8,10,12,.62); backdrop-filter: blur(4px); display: grid; place-items: center; padding: 16px; }
.ss-panel { position: relative; display: grid; grid-template-columns: auto 1fr; gap: 22px; width: min(860px, 100%); max-height: calc(100dvh - 32px); overflow: auto;
  background: var(--card); color: var(--ink); border: 1px solid var(--line); border-radius: 18px; padding: 20px; box-shadow: 0 24px 60px rgba(0,0,0,.4); }
.ss-close { position: absolute; right: 10px; top: 8px; width: 36px; height: 36px; border-radius: 50%; border: 0; background: transparent; color: var(--soft); font-size: 26px; cursor: pointer; }
.ss-preview canvas, .ss-preview video { display: block; width: min(300px, 60vw); height: auto; aspect-ratio: 9 / 16; border-radius: 14px; background: #0b1020; object-fit: contain; }
.ss-preview canvas[hidden], .ss-preview video[hidden] { display: none; }
.ss-side { display: grid; align-content: start; gap: 12px; min-width: 0; }
.ss-side h2 { font-size: 30px; margin-right: 36px; }
.ss-side h2 em { font-style: normal; color: var(--trail); }
:root[data-theme="dark"] .ss-side h2 em { color: #8aa0ff; }
.ss-side p { margin: 0; color: var(--soft); font-size: 15px; }
.ss-tabs { display: inline-flex; background: var(--paper); border: 1px solid var(--line); border-radius: 999px; padding: 3px; justify-self: start; }
.ss-tabs button { border: 0; background: transparent; color: var(--soft); font: 700 15px/1 var(--display); letter-spacing: .05em; text-transform: uppercase; padding: 9px 16px; border-radius: 999px; cursor: pointer; }
.ss-tabs button.on { background: var(--trail); color: #fff; }
.ss-tab { display: grid; gap: 10px; }
.ss-tab[hidden], .ss-out[hidden] { display: none; }
.ss-add { justify-self: start; border: 2px dashed var(--line); border-radius: 10px; padding: 10px 14px; cursor: pointer; font: 700 15px/1 var(--display); letter-spacing: .05em; text-transform: uppercase; color: var(--ink); }
.ss-thumbs { display: flex; flex-wrap: wrap; gap: 10px; }
.ss-card { display: grid; gap: 4px; width: 104px; }
.ss-card .ss-thumb { width: 104px; height: 78px; }
.ss-cap { width: 100%; box-sizing: border-box; font: 700 11px/1 var(--display); letter-spacing: .04em; text-transform: uppercase; color: var(--ink);
  background: var(--paper); border: 1px solid var(--line); border-radius: 6px; padding: 5px 6px; }
.ss-cap:focus { outline: none; border-color: var(--trail); }
.ss-thumbs:empty { display: none; }
.ss-thumb { position: relative; width: 72px; height: 72px; border-radius: 8px; overflow: hidden; border: 1px solid var(--line); }
.ss-thumb canvas { width: 100%; height: 100%; display: block; }
.ss-thumb { cursor: grab; touch-action: none; user-select: none; transition: transform .12s, box-shadow .12s; }
.ss-thumb.dragging { cursor: grabbing; transform: scale(1.08); box-shadow: 0 8px 20px rgba(0,0,0,.35); z-index: 2; }
.ss-thumb button { position: absolute; top: 3px; right: 3px; width: 22px; height: 22px; border-radius: 50%; border: 0; background: rgba(0,0,0,.6); color: #fff; font-size: 13px; cursor: pointer; padding: 0; }
.ss-num { position: absolute; left: 4px; bottom: 4px; min-width: 20px; height: 20px; border-radius: 10px; background: #1c3fd6; color: #fff; font: 700 12px/20px var(--display); text-align: center; padding: 0 5px; box-sizing: border-box; }
.ss-note { font-size: 13px !important; }
.ss-acts { display: flex; gap: 8px; flex-wrap: wrap; }
.ss-acts .navbtn:disabled { opacity: .5; cursor: wait; }
.ss-status { font-size: 14px !important; min-height: 1.2em; }
@media (max-width: 640px) { .ss-panel { grid-template-columns: 1fr; } .ss-preview { justify-self: center; } .ss-preview canvas, .ss-preview video { width: min(240px, 62vw); } }

/* the option chosen on the landing page: its price, and only its fields */
.ed-tier { margin: 0; font-size: 14px; flex: 1 1 100%; }
.ed-tier b { font-family: var(--display); font-size: 18px; text-transform: uppercase; letter-spacing: .03em; }
.ed-tier a { margin-left: 8px; color: var(--soft); font-size: 13px; }
body.tier-tile .ed-drop > svg, body.tier-tile .ed-drop > b, body.tier-tile .ed-drop > .ed-pick, body.tier-tile .ed-drop > small,
body.tier-name .ed-drop > svg, body.tier-name .ed-drop > b, body.tier-name .ed-drop > .ed-pick, body.tier-name .ed-drop > small,
body.tier-trail .ed-known { display: none; }
body.tier-tile .pr.r2 { visibility: hidden; }
/* a trek we know fills its own start and top (no times on these options); they show once it is picked */
body.tier-tile:not(.trek-picked) .pr.r3, body.tier-tile:not(.trek-picked) .pr.r4,
body.tier-name:not(.trek-picked) .pr.r3, body.tier-name:not(.trek-picked) .pr.r4 { visibility: hidden; }
body.tier-tile #startTime, body.tier-tile #topTime, body.tier-name #startTime, body.tier-name #topTime { display: none; }
body.tier-tile .ed-known, body.tier-name .ed-known { font-family: var(--display); font-weight: 700; font-size: 20px; text-transform: uppercase; letter-spacing: .03em; display: grid; gap: 10px; justify-items: center; }
body.tier-tile .ed-known select, body.tier-name .ed-known select { font-size: 17px; padding: 8px 12px; }

/* the order card: where to send the tile, then WhatsApp */
.order-card { width: min(360px, calc(100% - 16px)); gap: 8px; justify-items: stretch; text-align: left; }
.order-card b, .order-card > span { text-align: center; }
.order-card label { display: grid; gap: 3px; font-size: 13px; font-weight: 600; color: var(--soft); }
.order-card input, .order-card textarea { font: 15px var(--body); padding: 8px 10px; border: 1.5px solid var(--line); border-radius: 8px; background: var(--card); color: var(--ink); resize: none; }
.order-card > div { justify-content: flex-end; }
.order-card .oc-note { margin: 0; font-size: 13px; color: var(--soft); }
.order-card .oc-note:empty, .order-card .guest-err:empty { display: none; }
.order-card .navbtn:disabled { opacity: .55; cursor: not-allowed; }
.order-card .guest-err { margin: 0; color: #a8401c; font-size: 13px; }
body.tier-tile:not(.trek-picked) .pr.r1, body.tier-name:not(.trek-picked) .pr.r1 { visibility: hidden; }

/* the plate while the tile hangs in the spot: the real 3D letters (exactly as printed) show through.
   A row being typed in becomes plain text boxes; every row that can change has an Edit button beside it. */
body.plate-live .ed-plate { background: transparent; backdrop-filter: none; border-color: transparent; overflow: visible; }
body.plate-live .pr > i, body.plate-live .pr > span { visibility: hidden; }
body.plate-live .pr input { background: transparent; border-color: transparent; color: transparent; cursor: pointer; }
body.plate-live .pr input::-webkit-datetime-edit { color: transparent; }
body.plate-live .pr input::-webkit-calendar-picker-indicator { opacity: 0; }
body.plate-live .pr:not(.editing) input::placeholder { color: transparent; }   /* the Edit buttons show what can change */
body.plate-live .pr.editing input::placeholder { color: rgba(255,255,255,.6); }
body.plate-live .pr.editing { background: rgba(38,26,14,.94); border-radius: 4px; outline: 2px solid #ffd166; outline-offset: 1px; z-index: 1; }
body.plate-live .pr.editing > i, body.plate-live .pr.editing > span { visibility: visible; }
body.plate-live .pr.editing input { color: #fff; cursor: text; background: rgba(255,255,255,.08); border-bottom: 1.5px solid rgba(255,255,255,.5); }
body.plate-live .pr.editing input[readonly] { background: transparent; border-color: transparent; }
body.plate-live .pr.editing input::-webkit-datetime-edit { color: #fff; }
body.plate-live .pr.editing input::-webkit-calendar-picker-indicator { opacity: 1; }
body.plate-live .pr.editing input:focus { background: rgba(255,255,255,.18); border-bottom-color: #ffd166; }
.pr-edits { display: none; }
body.plate-live .pr.editable .pr-edits { display: flex; gap: 6px; position: absolute; left: calc(100% + 10px); top: 50%; transform: translateY(-50%); }
.pr-edit { white-space: nowrap; font: 700 calc(var(--ph) * .11)/1 var(--body); text-transform: none; color: var(--ink); background: var(--card); border: 1px solid var(--line);
  border-radius: 99px; padding: .35em .8em; cursor: pointer; box-shadow: 0 2px 6px rgba(0,0,0,.18); }
.pr-edit[hidden] { display: none; }
.pr-edit:hover { border-color: var(--trail); color: var(--trail); }
body.plate-live .pr.editing .pr-edits { display: none; }
/* the typing rows sit exactly on the printed rows (title, name and date, start, top; the legend row needs no typing) */
body.plate-live .ed-plate { display: block; padding: 0; }
body.plate-live .pr { position: absolute; left: 1.5%; right: 1.5%; height: 19%; }
body.plate-live .pr.r1 { top: 0; } body.plate-live .pr.r2 { top: 21.5%; } body.plate-live .pr.r3 { top: 41.5%; } body.plate-live .pr.r4 { top: 62%; }

/* a field the chosen option fixes can't be clicked into at all */
.pr input[readonly] { pointer-events: none; cursor: default; }

/* what is missing, popped up over the Save and Order buttons */
.edbar { position: relative; }
.ed-pop { position: fixed; left: 0; top: 0; margin: 0; max-width: min(300px, calc(100vw - 16px)); box-sizing: border-box; background: #a8401c; color: #fff;
  font: 600 14px/1.35 var(--body); padding: 10px 14px; border-radius: 10px; box-shadow: 0 8px 22px rgba(0,0,0,.25); z-index: 7; }
.ed-pop::after { content: ""; position: absolute; left: calc(var(--ax, 50%) - 8px); top: 100%; border: 8px solid transparent; border-top-color: #a8401c; }
.ed-pop.below::after { top: auto; bottom: 100%; border-top-color: transparent; border-bottom-color: #a8401c; }
.ed-pop[hidden] { display: none; }

/* narrow screens: the plate's Edit buttons wait in the bar under the wall, and the bar's buttons wrap
   (Order on its own full-width line) so nothing runs off the screen */
.ed-fields { display: none; }
body.plate-live.edits-in-bar .ed-fields { display: flex; flex-wrap: wrap; gap: 6px; flex: 1 1 100%; }
body.plate-live.edits-in-bar .ed-fields:not(:has(.pr-edit:not([hidden]))) { display: none; }
.ed-fields .pr-edits { display: contents; }
.ed-fields .pr-edit { font-size: 13px; }
.ed-acts { flex-wrap: wrap; justify-content: flex-end; }
@media (max-width: 560px) {
  .edbar { padding: 10px; gap: 8px; }
  .ed-acts { width: 100%; }
  .ed-acts .navbtn { flex: 1 1 auto; font-size: 14px; padding: 8px 10px; }
  .ed-acts #orderbtn { order: -1; flex-basis: 100%; font-size: 16px; padding: 10px; }
}

/* "How do I get my GPX file?": where each tracking app keeps its export */
.ed-help { font: 600 14px var(--body); color: var(--trail); background: none; border: 0; padding: 4px; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.gpx-help { position: fixed; inset: 0; z-index: 50; background: rgba(15,18,15,.55); display: grid; place-items: center; padding: 16px; }
.gpx-help[hidden] { display: none; }
.gh-card { width: min(440px, 100%); max-height: calc(100vh - 32px); overflow: auto; box-sizing: border-box; background: var(--card); color: var(--ink);
  border: 1px solid var(--line); border-radius: 16px; padding: 18px 18px 14px; box-shadow: 0 18px 40px rgba(0,0,0,.3); }
.gh-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.gh-head b { font-family: var(--display); font-size: 24px; text-transform: uppercase; letter-spacing: .02em; }
.gh-x { background: none; border: 0; font-size: 18px; color: var(--soft); cursor: pointer; padding: 6px; }
.gh-sub { margin: 2px 0 12px; color: var(--soft); font-size: 14px; }
.gh-apps { display: flex; flex-wrap: wrap; gap: 6px; }
.gh-apps button { font: 600 14px var(--body); color: var(--ink); background: transparent; border: 1.5px solid var(--line); border-radius: 99px; padding: 6px 12px; cursor: pointer; }
.gh-apps button[aria-selected="true"] { background: var(--trail); border-color: var(--trail); color: #fff; }
.gh-steps { margin: 14px 0 6px; padding-left: 22px; display: grid; gap: 8px; font-size: 15px; line-height: 1.4; }
.gh-tip { margin: 6px 0 0; font-size: 13px; color: var(--soft); background: rgba(28,63,214,.07); border-radius: 8px; padding: 8px 10px; }
.gh-tip[hidden] { display: none; }
.gh-foot { margin: 12px 0 0; font-size: 13px; color: var(--soft); }

/* Connect Strava: Strava's own orange, and the list of recent activities to pick from */
.ed-strava { font: 700 15px var(--body); color: #fff; background: #fc4c02; border: 0; border-radius: 8px; padding: 10px 16px; cursor: pointer; }
.ed-strava[hidden] { display: none; }
.ed-strava:hover { background: #e34402; }
.sp-list { display: grid; gap: 6px; margin-top: 4px; }
.sp-item { display: grid; gap: 2px; text-align: left; font: 15px var(--body); color: var(--ink); background: transparent; border: 1.5px solid var(--line); border-radius: 10px; padding: 10px 12px; cursor: pointer; }
.sp-item:hover { border-color: #fc4c02; }
.sp-item span { font-size: 13px; color: var(--soft); }
body.tier-tile .ed-strava, body.tier-name .ed-strava, body.tier-tile .ed-help, body.tier-name .ed-help { display: none; }

/* changing the option right in the bar */
.ed-tier .linklike { background: none; border: 0; color: var(--soft); text-decoration: underline; cursor: pointer; font: 600 13px/1 var(--body); padding: 4px; margin-left: 6px; }
.ed-plans { display: flex; flex-wrap: wrap; gap: 6px; }
.ed-plans[hidden] { display: none; }
.ed-plans button { font: 600 14px var(--body); color: var(--ink); background: transparent; border: 1.5px solid var(--line); border-radius: 99px; padding: 6px 12px; cursor: pointer; }
.ed-plans button:hover { border-color: var(--trail); }
.ed-plans button[aria-current="true"] { background: var(--trail); border-color: var(--trail); color: #fff; }

/* an ordered tile: where its order is, and the courier's tracking once shipped */
.ostat { display: flex; align-items: center; gap: 6px; flex: 1 1 100%; font-size: 13px; font-weight: 600; color: var(--soft); }
.ostat span { display: flex; align-items: center; gap: 5px; white-space: nowrap; }
.ostat span::before { content: ""; width: 10px; height: 10px; border-radius: 50%; border: 2px solid var(--line); box-sizing: border-box; }
.ostat span.done::before { background: var(--trail); border-color: var(--trail); }
.ostat span.now { color: var(--ink); }
.ostat span.now::before { background: var(--trail); border-color: var(--trail); box-shadow: 0 0 0 3px rgba(28,63,214,.2); }
.ostat i { flex: 1 1 12px; max-width: 40px; height: 2px; background: var(--line); }
.kitbar .kp-note { flex: 1 1 100%; margin: 0; font-size: 13px; color: var(--soft); }

/* narrow screens: the field being typed, as a normal-size box in the bar */
.bar-edit { display: flex; gap: 8px; align-items: flex-end; flex: 1 1 100%; }
.bar-edit[hidden] { display: none; }
.bar-edit label { flex: 1; display: grid; gap: 3px; font-size: 13px; font-weight: 600; color: var(--soft); min-width: 0; }
.bar-edit input { font: 16px var(--body); color: var(--ink); background: var(--card); border: 1.5px solid var(--trail); border-radius: 8px; padding: 9px 10px; min-width: 0; text-transform: uppercase; }
.bar-edit input[type="date"], .bar-edit input[type="time"], .bar-edit input[type="number"] { text-transform: none; }
.ed-fields[hidden] { display: none !important; }
/* the Feedback tab would sit on the tile while adding a trek on a phone */
@media (max-width: 640px) { body.editing .fb-tab { display: none; } }
/* small phones: the wall's link pill keeps its link and buttons; the words "Show off your wall" step aside */
@media (max-width: 440px) { .wl-label { display: none; } .wlink { padding-left: 12px; } .wl-url { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } }
