/* ----------------------------------------------------------------- hashui ---
   Everything the three-state login and the tour player need, kept out of
   desktop.css on purpose: that file is the shell's paint and this is the shell's
   new furniture. Loaded AFTER desktop.css, so it may override it and inherits
   every token from its :root.

   Nothing here hardcodes a colour that the hash theme defines. If a value below
   looks light, it is a bug — see THEME.md.                                    */

/* --------------------------------------------------- the apps are not inert --
   The old shell made every icon pointer-events:none until you signed in, which
   is exactly the behaviour we are removing: the desktop must be clickable from
   the first frame, and the refusal happens in the dialog, not in the cursor. */
body.signed-out .icon,
body.no-pass .icon,
body.visitor .icon{pointer-events:auto;filter:none}

body.signed-out #taskbar .btn98:not(.start),
body.no-pass #taskbar .btn98:not(.start),
body.visitor #taskbar .btn98:not(.start){pointer-events:auto;opacity:1}

/* The overlay is gone. Belt and braces in case a stale rule survives. */
#gate{display:none !important}

/* ------------------------------------------------------------- connect bar --
   Top right, over the wallpaper, under any window. */
#connbar{
  position:fixed;top:12px;right:14px;z-index:15;
  display:flex;align-items:center;gap:8px;flex-wrap:wrap;justify-content:flex-end;
  max-width:min(560px,calc(100vw - 28px));
}
#whoami{display:flex;align-items:center;gap:8px}
#whoami[hidden]{display:none}
#connectBtn[hidden]{display:none}

.wchip{
  display:inline-block;padding:5px 9px;
  font-family:var(--mono);font-size:11px;font-weight:600;letter-spacing:.3px;
  color:var(--ink);background:var(--face2);
  border:2px solid var(--shD);
}
/* Holding a pass is the whole point, so the count is the one thing on this bar
   that gets the phosphor. Zero passes drops to plain ink — never red: the
   visitor has done nothing wrong yet. */
.wchip.pass{color:var(--acc);text-shadow:0 0 6px rgba(61,255,158,.35)}
.wchip.pass.none{color:var(--ink2);text-shadow:none}

.cnote{
  flex-basis:100%;text-align:right;
  font-family:var(--mono);font-size:11px;color:var(--ink2);
  padding:4px 2px 0;
}
.cnote.err{color:var(--hot)}
.cnote[hidden]{display:none}

/* ------------------------------------------------------------ lock dialog -- */
.lockWin{width:min(480px,calc(100vw - 32px))}
.lockBody{display:flex;gap:14px;align-items:flex-start;padding:14px}
.lockArt{flex:0 0 auto;opacity:.9}
.lockCopy{flex:1 1 auto;min-width:0}
.lockCopy h1{
  margin:0 0 8px;font-family:var(--pix);font-size:13px;line-height:1.5;
  color:var(--gold);text-shadow:0 0 8px rgba(255,194,71,.3);
}
.lockCopy p{margin:0 0 12px;font-size:12.5px;line-height:1.6;color:var(--ink2)}
.lockRow{display:flex;gap:8px;flex-wrap:wrap}
.lockRow .btn98{font-size:11.5px}

/* ---------------------------------------------------------- immerse player --
   The stage is a fixed 16:10 well; the tour is letterboxed into it rather than
   stretched, because demo.html is composed for that ratio and squashing it
   would misrepresent the product it is showing. */
.imm{height:100%;display:flex;flex-direction:column}
.btn98.big{font-size:13px;padding:11px 20px}

/* ------------------------------------------------------------- learn more -- */
.learnRow{display:flex;gap:9px;flex-wrap:wrap;margin-top:16px}

/* ------------------------------------------------------------- portfolio --
   The window is 94% of the desk now, so the treemap gets to grow with it
   instead of sitting at a fixed 770px with dead space underneath. The floor
   keeps the smallest tiles drawable on a laptop; the vh term is what actually
   fills a big screen. desktop.js measures whatever this resolves to. */
.pf-tree{height:clamp(360px,40vh,660px) !important}

@media (max-width:900px){
  #connbar{top:8px;right:8px}
  .lockBody{flex-direction:column}
  .pf-tree{height:clamp(320px,38vh,520px) !important}
}

/* On a phone the wallet bar owns the top strip rather than floating over the
   corner of the icon grid. desktop.css leaves 52px of headroom for it. */
@media (max-width:760px){
  #connbar{top:6px;left:6px;right:6px;max-width:none;gap:6px;justify-content:flex-end}
  .wchip{font-size:10px;padding:4px 7px}
}

/* ------------------------------------------------------------ hash rain --
   The wallpaper's three layers. paintScene() in desktop.js emits the glyphs;
   the motion lives here so it is one keyframe rather than 24 inline animations.

   The rain is deliberately slow (5.5-12.5s a column) and low contrast. A fast,
   bright matrix rain behind a working tool is the kind of background that makes
   people close the tab — this one has to survive being looked at all day. */

/* The rain moved to a canvas (see startRain in desktop.js) — thousands of
   glyphs, each changing as it falls, is not something the DOM can be asked to
   animate. Nothing about the scene is styled here any more; the ground is two
   gradients in #scene and the vignette lives in desktop.css. */

/* --------------------------------------------------------- sniper pass --
   The collection, on the desktop. Art left, facts right; the art gets the
   space because it is the thing being judged. */
/* The stage needs a DEFINITE height. Previously this row was auto-sized, so
   `height:100%` on the <img> resolved circularly, fell back to the SVG's
   intrinsic 1000px, and the window simply clipped it — object-fit:contain never
   had a box to contain into. A vh-based clamp is definite no matter how the
   flex chain above resolves. */
.pass{display:grid;grid-template-columns:minmax(0,1fr) minmax(280px,340px);
  grid-template-rows:minmax(0,1fr);
  gap:16px;height:100%;align-items:stretch}
/* Stage over grid. The stage keeps the height it can afford once the strip
   below has taken what it needs, which is why this row is auto rather than a
   second fraction — a 12-cell strip has a natural height and the picture
   should get everything else. */
.passMain{display:grid;grid-template-rows:minmax(0,1fr) auto;gap:10px;min-height:0}
/* A definite height in vh, not a percentage. Percentage heights only resolve
   if every ancestor has one, and inside the nested grid that chain breaks —
   the stage then sized itself to the natural 1000px of the artwork and
   overflow:hidden cropped the figure instead of fitting it. */
.passMain > .passStage{height:clamp(220px,40vh,540px);min-height:0}

.bdGrid{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:6px}
.bdCell{
  position:relative;padding:0;aspect-ratio:1;overflow:hidden;cursor:pointer;
  background:#04050a;border:2px solid var(--shD);
}
.bdCell img{width:100%;height:100%;display:block;object-fit:cover}
.bdCell b{
  position:absolute;left:0;right:0;bottom:0;
  font-family:var(--mono);font-size:9px;font-weight:600;letter-spacing:.6px;
  padding:2px 0;background:rgba(4,6,10,.82);color:#c3ccd9;text-align:center;
}
/* the band a backdrop belongs to, as a corner tick rather than more text */
.bdCell .bdBand{position:absolute;top:0;right:0;width:7px;height:7px}
.bdCell .bdBand.base{background:#5f6a7b}
.bdCell .bdBand.earned{background:#a3b3c8}
.bdCell .bdBand.unlock{background:var(--gold,#ffc247)}
.bdCell:hover{border-color:#7a8698}
.bdCell.on{border-color:var(--gold,#ffc247)}
.bdCell.on b{background:rgba(255,194,71,.9);color:#1a1204}

.passStage{
  position:relative;min-height:0;height:clamp(220px,42vh,560px);
  background:
    linear-gradient(var(--grid,#101820) 1px,transparent 1px) 0 0/22px 22px,
    linear-gradient(90deg,var(--grid,#101820) 1px,transparent 1px) 0 0/22px 22px,
    var(--bg,#08090b);
  border:2px solid var(--shD);
  display:grid;place-items:center;overflow:hidden;
}
/* The art is ABSOLUTELY POSITIONED against the stage, and that detail is the
   whole fix. The stage is a grid with place-items:center, so its single row
   auto-sizes to its content — which means a percentage height on the image
   resolves against a box that is itself waiting on the image. The browser
   breaks that circle by treating height:100% as auto, the image renders at its
   natural 1000px, and overflow:hidden crops the figure. Taking it out of flow
   gives it the stage box directly, and object-fit letterboxes inside it. */
.passArt{position:absolute;inset:0;width:100%;height:100%;object-fit:contain;display:block}

.passSide{display:flex;flex-direction:column;min-width:0;overflow-y:auto}
.passSide h2{margin:9px 0 6px;font-family:var(--pix);font-size:15px;line-height:1.5;
  color:var(--gold);text-shadow:0 0 9px rgba(255,194,71,.3)}
.passLede{margin:0 0 14px;font-size:12.5px;line-height:1.65;color:var(--ink2)}

/* Six chips ragged-wrapped 5+1. A fixed 3-wide grid gives two even rows and
   stops the last tier looking like an afterthought. */
.tierRow{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));
  gap:6px;margin-bottom:15px}
.tierChip{font-size:11px;padding:6px 10px}
/* The selected tier is stated with the brand gold rather than a tier-coloured
   chip: six coloured chips next to six coloured lasers is noise, and the art
   is already saying which tier you are looking at. */
.tierChip.on{background:linear-gradient(180deg,var(--gold),var(--gold2));
  color:#0a0d0b;font-weight:700}

.passKv{margin:0 0 12px}
.passSide .note{font-size:11.5px;line-height:1.6;color:var(--ink2);margin:0}

@media (max-width:820px){
  .pass{grid-template-columns:1fr;grid-template-rows:minmax(220px,1fr) auto}
}

/* ------------------------------------------------------------- app frame --
   The Mint Scanner and My Portfolio windows embed the real pages rather than
   reproducing them. Full bleed: the window chrome is the frame, so the page
   inside should have no second border or padding of its own. */
.appFrame{
  position:absolute;inset:0;width:100%;height:100%;
  border:0;display:block;background:var(--bg,#08090b);
}
/* Those two windows hand their whole body to the iframe, so the wbody's own
   padding and scroll would fight it. */
.win[data-id="portfolio"] > .wbody,
.win[data-id="scanner"]   > .wbody{padding:0;overflow:hidden;position:relative}

/* ------------------------------------------------------------ wallet menu --
   Hangs off the connect bar. Sits above windows because the bar does, and a
   menu that opened behind a maximised window would be unreachable. */
#walletMenu{
  position:fixed;top:52px;right:14px;z-index:16;
  min-width:200px;padding:3px;
  background:var(--face);border:2px solid var(--shD);
  box-shadow:4px 4px 0 rgba(0,0,0,.55);
}
#walletMenu[hidden]{display:none}
.wmItem{
  display:block;width:100%;text-align:left;
  padding:8px 10px;border:0;background:none;cursor:pointer;
  font-family:var(--mono);font-size:12px;color:var(--ink);
}
.wmItem:hover{background:var(--faceHi);color:var(--gold)}
.wmItem.sep{border-top:2px solid var(--hi);margin-top:3px}

/* ---------------------------------------------------------- wallet rows --
   #walletList had a layout on the desktop but its BUTTONS had none: .wbtn was
   only ever styled in demo.css, which the desktop does not load, so every
   wallet in the picker rendered as an unstyled browser button. */
.wbtn{
  display:flex;align-items:center;gap:10px;width:100%;padding:9px 11px;
  background:var(--face);border:2px solid var(--hi);color:var(--ink);
  font-family:var(--mono);font-size:12px;text-align:left;cursor:pointer;
}
.wbtn:hover{border-color:var(--gold,#ffc247)}
.wbtn small{
  margin-left:auto;font-size:10px;text-transform:uppercase;letter-spacing:.6px;
  color:var(--ink2);
}

/* A wallet that is not installed is still listed — the picker's job is to
   answer "how do I connect", not only "which of these do I already have". It
   reads as available-but-dimmer, and its row goes to the download page. */
.wbtn.notInstalled{opacity:.62}
.wbtn.notInstalled:hover{opacity:1}
.wbtn img{border-radius:6px;flex:none}

/* ------------------------------------------------------------- stats -----
   Superuser only. Three numbers and fourteen bars: how many are here, how many
   came today, and the shape of the days behind it. */
.statsWrap{display:flex;flex-direction:column;gap:14px;height:100%;min-height:0}
/* Five across on a wide window, wrapping to two or three when the window
   is dragged narrow — a fixed three-column grid squashed the new tiles. */
.statRow{display:grid;gap:10px;
  grid-template-columns:repeat(auto-fit,minmax(150px,1fr))}
/* The live count is the one number worth looking at first. */
.statTile.live{border-color:var(--gold,#ffc247)}
.statTile.live .sv{color:#3dff9e}
.statTile{
  border:2px solid var(--shD);background:var(--bg,#08090b);padding:12px 13px;
  display:flex;flex-direction:column;gap:4px;min-width:0;
}
.statTile .sl{font-family:var(--mono);font-size:10px;letter-spacing:1.4px;
  text-transform:uppercase;color:#7d8695}
.statTile .sv{font-family:var(--pix);font-size:20px;line-height:1.35;color:var(--gold,#ffc247)}
.statTile .ss{font-family:var(--mono);font-size:11px;color:#93a0b4}
.statChart{
  position:relative;flex:1;min-height:120px;display:flex;align-items:flex-end;gap:4px;
  border:2px solid var(--shD);background:var(--bg,#08090b);padding:12px;
}
.statChart i{flex:1;background:linear-gradient(180deg,var(--gold,#ffc247),#7a5a12);min-width:3px}
.statChart i:hover{background:#fff}
.statChart .statPeak{
  position:absolute;top:6px;right:8px;font-family:var(--mono);font-size:10px;color:#7d8695
}
.statNote{font-family:var(--mono);font-size:11px;color:#7d8695}

/* ---------------------------------------------------------- whitelist ----
   Events on the left, the selected one on the right. Superuser only. */
.wl{display:grid;grid-template-columns:minmax(200px,250px) minmax(0,1fr);
  gap:14px;height:100%;min-height:0}
.wlSide{display:flex;flex-direction:column;gap:8px;min-height:0}
.wlNew{display:grid;grid-template-columns:1fr 74px auto;gap:6px}
.wlList{flex:1;overflow-y:auto;display:flex;flex-direction:column;gap:6px;min-height:0}
.wlItem{display:flex;flex-direction:column;gap:2px;text-align:left;padding:8px 9px;
  background:var(--bg,#08090b);border:2px solid var(--shD);color:var(--ink);cursor:pointer;
  font-family:var(--mono);font-size:11px}
.wlItem b{font-size:12px;color:#fff}
.wlItem span{color:#7d8695}
.wlItem:hover{border-color:#7a8698}
.wlItem.on{border-color:var(--gold,#ffc247)}
.wlMain{min-width:0;overflow-y:auto;display:flex;flex-direction:column;gap:10px}
.wlHead{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.wlHead h2{margin:0;font-family:var(--pix);font-size:14px;color:var(--gold,#ffc247)}
.wlPaste{width:100%;min-height:110px;resize:vertical;font-family:var(--mono);font-size:11px}
.wlRow{display:flex;gap:6px;flex-wrap:wrap;align-items:center}
.wlCount{width:86px}
.wlProof{border:2px solid var(--shD);background:var(--bg,#08090b);padding:12px}
.wlProof h3{margin:0 0 6px;font-family:var(--mono);font-size:11px;letter-spacing:1.5px;
  text-transform:uppercase;color:#7d8695}
.wlProof .mono{font-family:var(--mono);font-size:10.5px;word-break:break-all;color:#c3ccd9}
.wlWinners{display:grid;grid-template-columns:repeat(auto-fill,minmax(230px,1fr));gap:3px}
.wlWin{display:flex;gap:8px;font-family:var(--mono);font-size:10.5px;color:#c3ccd9}
.wlWin span{color:#7d8695;min-width:34px;text-align:right}

/* ------------------------------------------------------ whitelist users ---
   Who signed up, and how to get them out. Monospace and full-width because
   these are addresses that will be pasted somewhere else. */
.wlUsers{border:2px solid var(--shD);background:var(--bg,#08090b);
  max-height:280px;overflow-y:auto;font-family:var(--mono);font-size:11px}
.wlUserRow{display:grid;grid-template-columns:38px minmax(0,1fr) 130px 78px;
  gap:8px;padding:4px 9px;align-items:center;border-bottom:1px solid #171b23}
.wlUserRow:last-child{border-bottom:0}
.wlUserHead{position:sticky;top:0;background:#0c0e14;color:#7d8695;
  text-transform:uppercase;letter-spacing:1px;font-size:9px}
.wlUserRow code{color:#c3ccd9;overflow:hidden;text-overflow:ellipsis}
.wlYes{color:#19e894;font-weight:600}
.wlNo{color:#ff5f6d;text-decoration:none}
.wlDim{color:#5f6a7b}

/* =========================================================== join page ====
   The public face of the Whitelist icon, and the only screen on this site a
   stranger is asked to DO something on. So it is a centred column with room to
   breathe rather than a form crammed against the left edge: one thing to read,
   then three things to do, in order. */
.join{
  height:100%;overflow-y:auto;
  display:flex;justify-content:center;align-items:flex-start;
  padding:20px 30px 26px;
}
.jCard{width:100%;max-width:880px}

.jH1{
  margin:0 0 7px;font-family:var(--pix);font-size:30px;line-height:1.4;
  color:var(--gold,#ffc247);text-shadow:0 0 22px rgba(255,194,71,.28);
}
.jSub{
  margin:0 0 16px;font-family:var(--mono);font-size:16px;line-height:1.6;color:#c3ccd9;
}

/* The one line that has to be read before anything else. */
.jBanner{
  margin:0 0 18px;padding:15px 18px;text-align:center;
  font-family:var(--pix);font-size:19px;line-height:1.4;letter-spacing:1px;
  color:#0a0d0b;background:linear-gradient(180deg,#19e894,#0bb072);
  border:2px solid #0a7d52;
  box-shadow:0 0 26px rgba(25,232,148,.22);
}

.jList{list-style:none;margin:0 0 14px;padding:0;display:flex;flex-direction:column;gap:10px}

.jStep{
  display:grid;grid-template-columns:58px minmax(0,1fr) auto;
  gap:18px;align-items:center;
  padding:15px 20px;background:var(--bg,#08090b);border:2px solid var(--shD);
  transition:border-color .2s,opacity .2s;
}
.jStep.done{border-color:#19e894}
/* A locked step is visibly next, not hidden — it says what is coming. */
.jStep.locked{opacity:.42}
.jStep.locked .jBtn{pointer-events:none}

.jTick{
  width:58px;height:58px;display:grid;place-items:center;
  font-family:var(--pix);font-size:20px;
  color:#7d8695;border:2px solid #2a303a;background:#0c0e14;
}
.jStep.done .jTick{
  color:#0a0d0b;background:#19e894;border-color:#0bb072;
  font-family:var(--mono);font-size:30px;font-weight:700;
  box-shadow:0 0 18px rgba(25,232,148,.4);
}

.jText{min-width:0;display:flex;flex-direction:column;gap:3px}
.jTitle{font-family:var(--mono);font-size:20px;font-weight:600;color:#fff}
.jNote{font-family:var(--mono);font-size:15px;color:#7d8695}

/* a.jBtn, not .jBtn: these are anchors, and a plain a{color} rule later in
   the sheet was beating the class on equal specificity — which is why the
   text on the gold buttons came out link-blue and unreadable. */
a.jBtn, button.jBtn{
  font-family:var(--mono);font-size:16px;font-weight:700;
  padding:13px 22px;white-space:nowrap;cursor:pointer;text-decoration:none;
  color:#0a0d0b;background:linear-gradient(180deg,var(--gold,#ffc247),var(--gold2,#f0a500));
  border:2px solid #8a5a12;
}
a.jBtn:visited{color:#0a0d0b}
.jBtn:hover{filter:brightness(1.08)}
.jBtn:disabled{opacity:.5;cursor:default}

/* The last step is a form, so it drops under the text rather than beside it. */
.jStep:last-child{grid-template-columns:58px minmax(0,1fr)}
.jWallet{grid-column:1/-1;display:flex;flex-direction:column;gap:9px;margin-top:6px}
.jAddr{
  width:100%;padding:13px 15px;font-family:var(--mono);font-size:16px;
  color:#dbe2ec;background:#0c0e14;border:2px solid #2a303a;
}
.jAddr:focus{outline:none;border-color:var(--gold,#ffc247)}
.jAddr:disabled{opacity:.5}
.jHandleIn{font-size:16px}
.jWallet .jBtn{align-self:flex-start;margin-top:2px}

.jMsg{margin:0;font-family:var(--mono);font-size:16px;line-height:1.6;color:#93a0b4;min-height:24px}
.jMsg.good{color:#19e894}
.jMsg.bad{color:#ff5f6d}
.jFine{margin:10px 0 0;font-family:var(--mono);font-size:14px;color:#5f6a7b}

@media (max-width:560px){
  .jStep{grid-template-columns:38px minmax(0,1fr);row-gap:10px}
  .jStep .jBtn{grid-column:1/-1;text-align:center}
  .jH1{font-size:21px}
}

/* One list, so no sidebar to divide the window with. */
.wlSingle{height:100%;min-height:0;overflow:hidden;display:flex}
.wlSingle .wlMain{flex:1;min-width:0}

/* The roster header: what it is, how many, and a way to re-read it. */
.wlHead{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.wlHead .wlSub{margin:0;flex:1}
.wlCount{font-size:12px;padding:3px 9px;border:2px solid var(--gold,#ffc247);
  color:var(--gold,#ffc247);background:#1a1408;letter-spacing:.04em}
.wlPaste{width:100%;resize:vertical;min-height:64px}

/* ------------------------------------------------------- update notice ----
   Sits above everything, including the taskbar and any open window, because it
   is the one message that explains why the rest of the page might be wrong. */
#updateBar{
  position:fixed;left:0;right:0;top:0;z-index:60;
  display:flex;align-items:center;gap:12px;flex-wrap:wrap;
  padding:9px 14px;
  font-family:var(--pix,monospace);font-size:10px;letter-spacing:.4px;
  color:#0a0d0b;background:linear-gradient(180deg,var(--gold,#ffc247),var(--goldD,#c8901f));
  border-bottom:2px solid rgba(0,0,0,.45);
  box-shadow:0 2px 0 rgba(0,0,0,.35);
  animation:updateDrop .35s ease-out;
}
#updateBar .uMsg{flex:1;min-width:180px;line-height:1.5}
#updateBar .uBtn,#updateBar .uX{
  font-family:var(--pix,monospace);font-size:10px;cursor:pointer;
  color:#0a0d0b;background:#f6e2b0;border:2px solid #0a0d0b;
  padding:6px 12px;flex:none;
}
#updateBar .uBtn:hover,#updateBar .uX:hover{background:#fff}
#updateBar .uX{padding:6px 9px}
@keyframes updateDrop{from{transform:translateY(-100%)}to{transform:translateY(0)}}
@media (prefers-reduced-motion:reduce){#updateBar{animation:none}}
