/* ==========================================================================
   TIERMAKE
   Made By Alakshit

   Same performance rules as the rest of my sites: no blur filters, no
   backdrop-filter, no looping animations, no per-frame work. Dragging is
   the only thing that moves, and it moves one element.
   ========================================================================== */

:root{
  --bg:        #0A0C10;
  --bg-2:      #0E1117;
  --surface:   #141821;
  --surface-2: #1B202B;
  --line:      rgba(255,255,255,.08);
  --line-2:    rgba(255,255,255,.16);
  --inset:     inset 0 1px 0 rgba(255,255,255,.05);

  --ink:       #EDF1F7;
  --ink-2:     #A9B4C4;
  --muted:     #6E7A8C;

  --accent:    #38BDF8;
  --accent-2:  #0EA5E9;
  --danger:    #F4556B;
  --ok:        #34D399;

  --r-sm: 8px;
  --r:    12px;
  --r-lg: 18px;
  --gutter: clamp(12px, 3vw, 28px);
  --max: 1180px;

  --row-h: 92px;
  --tile: 84px;

  --ease: cubic-bezier(.22,.68,.28,1);

  --f-display: "Outfit", system-ui, sans-serif;
  --f-body: "Space Grotesk", system-ui, sans-serif;
}

*,*::before,*::after{ box-sizing:border-box }
*{ margin:0; padding:0 }

html{ -webkit-text-size-adjust:100% }

/* An explicit display on a component beats the UA rule for [hidden], which
   turned the hidden sheet into an invisible full-screen click blocker.
   This has to win over anything that sets display below. */
[hidden]{ display:none !important }

body{
  min-height:100svh;
  font-family:var(--f-body);
  font-size:15px;
  line-height:1.6;
  color:var(--ink-2);
  background:var(--bg);
  -webkit-font-smoothing:antialiased;
  -moz-osx-font-smoothing:grayscale;
  -webkit-tap-highlight-color:transparent;
  overflow-x:hidden;
}

h1,h2,h3{ font-family:var(--f-display); color:var(--ink); letter-spacing:-.02em; line-height:1.15 }
button{ font:inherit; color:inherit; background:none; border:0; cursor:pointer }
a{ color:inherit; text-decoration:none }
img{ display:block; max-width:100% }
::selection{ background:var(--accent); color:#04121B }

:focus-visible{ outline:2px solid var(--accent); outline-offset:2px; border-radius:6px }

.skip{
  position:absolute; left:-9999px; top:0; z-index:200;
  padding:12px 18px; background:var(--accent); color:#04121B; font-weight:700;
  border-radius:0 0 var(--r-sm) 0;
}
.skip:focus{ left:0 }

/* --------------------------------------------------------------------------
   Header
   -------------------------------------------------------------------------- */
.bar{
  position:sticky; top:0; z-index:40;
  background:var(--bg-2);
  border-bottom:1px solid var(--line);
}
.bar__in{
  display:flex; align-items:center; gap:8px;
  max-width:var(--max); margin-inline:auto;
  padding:10px var(--gutter);
}
.bar__spacer{ flex:1 }

.brand{ display:inline-flex; align-items:center; gap:9px; flex:none }
.brand__mark{
  width:30px; height:30px; border-radius:9px;
  display:grid; place-items:center;
  color:#04121B;
  background:linear-gradient(140deg, var(--accent), var(--accent-2));
  box-shadow:var(--inset);
}
.brand__mark svg{ width:16px; height:16px }
.brand__txt{
  font-family:var(--f-display); font-weight:800; font-size:17px;
  letter-spacing:-.03em; color:var(--ink);
}

.btn{
  display:inline-flex; align-items:center; gap:7px;
  padding:9px 14px; border-radius:999px;
  font-family:var(--f-display); font-weight:700; font-size:13.5px;
  color:var(--ink);
  border:1px solid var(--line-2);
  background:rgba(255,255,255,.04);
  white-space:nowrap;
  transition:background-color .15s var(--ease), border-color .15s var(--ease);
}
.btn:hover{ background:rgba(255,255,255,.09) }
.btn svg{ width:15px; height:15px; flex:none }
.btn--primary{
  color:#04121B; border-color:transparent;
  background:linear-gradient(140deg, var(--accent), var(--accent-2));
}
.btn--primary:hover{ filter:brightness(1.08) }
.btn--danger{ color:var(--danger); border-color:rgba(244,85,107,.4) }
.btn--danger:hover{ background:rgba(244,85,107,.14) }

.iconbtn{
  width:36px; height:36px; border-radius:10px; flex:none;
  display:grid; place-items:center;
  border:1px solid var(--line-2); background:rgba(255,255,255,.04);
  color:var(--ink-2);
  transition:background-color .15s var(--ease);
}
.iconbtn:hover{ background:rgba(255,255,255,.09); color:var(--ink) }
.iconbtn svg{ width:16px; height:16px }

@media (max-width: 720px){
  .btn span{ display:none }
  .btn{ padding:9px 11px }
  .brand__txt{ display:none }
}

/* --------------------------------------------------------------------------
   Layout
   -------------------------------------------------------------------------- */
.wrap{ max-width:var(--max); margin-inline:auto; padding:22px var(--gutter) 40px }

.titlerow{ display:flex; align-items:baseline; gap:14px; flex-wrap:wrap; margin-bottom:18px }
.title{
  font-size:clamp(22px, 3.6vw, 32px); font-weight:800;
  color:var(--ink); outline:none; min-width:40px;
  border-bottom:2px dashed transparent; padding-bottom:2px;
}
.title:hover{ border-bottom-color:var(--line-2) }
.title:focus{ border-bottom-color:var(--accent) }
.title:empty::before{ content:attr(data-placeholder); color:var(--muted) }
.saved{ font-size:12px; color:var(--muted); margin-left:auto }

/* --------------------------------------------------------------------------
   Tier rows
   -------------------------------------------------------------------------- */
.board{
  border:1px solid var(--line);
  border-radius:var(--r-lg);
  overflow:hidden;
  background:var(--surface);
}
.row{
  display:grid;
  grid-template-columns:104px 1fr 40px;
  align-items:stretch;
  border-bottom:1px solid var(--line);
  min-height:var(--row-h);
}
.row:last-child{ border-bottom:0 }

.row__label{
  display:grid; place-items:center;
  padding:8px 6px;
  background:var(--c, #64748B);
  color:#0B0D12;
  position:relative;
}
.row__name{
  font-family:var(--f-display); font-weight:900;
  font-size:clamp(15px, 2.4vw, 22px); letter-spacing:-.02em;
  text-align:center; word-break:break-word; line-height:1.1;
  outline:none; max-width:100%;
  padding:2px 4px; border-radius:5px;
}
.row__name:focus{ background:rgba(0,0,0,.18) }

.row__items{
  display:flex; flex-wrap:wrap; align-content:flex-start;
  gap:5px; padding:6px;
  background:var(--surface-2);
  min-height:var(--row-h);
}
.row__items.over{ background:#232A38; box-shadow:inset 0 0 0 2px var(--accent) }

.row__menu{
  display:grid; place-items:center;
  border-left:1px solid var(--line);
  background:var(--surface);
  color:var(--muted);
  transition:color .15s var(--ease), background-color .15s var(--ease);
}
.row__menu:hover{ color:var(--ink); background:var(--surface-2) }
.row__menu svg{ width:16px; height:16px }

.boardtools{ display:flex; gap:8px; flex-wrap:wrap; margin-top:12px }

/* --------------------------------------------------------------------------
   Items
   -------------------------------------------------------------------------- */
/* The tile takes the picture's own aspect ratio, clamped so a panorama or a
   tall strip cannot eat the whole row. The image is drawn with contain, so
   nothing is ever cut off — at worst a clamped tile letterboxes slightly. */
.item{
  position:relative;
  height:var(--tile);
  width:calc(var(--tile) * var(--ar, 1));
  border-radius:var(--r-sm);
  overflow:hidden;
  background:#0B0E14;
  border:1px solid rgba(255,255,255,.1);
  cursor:grab;
  flex:none;
  touch-action:none;          /* the pointer drag owns this gesture */
  user-select:none; -webkit-user-select:none;
}
body[data-shape="square"] .item{ width:var(--tile) }
.item img{ width:100%; height:100%; object-fit:contain; pointer-events:none }
.item__label{
  position:absolute; inset:auto 0 0 0;
  padding:2px 4px;
  font-size:10px; line-height:1.25; font-weight:600;
  color:#fff; background:rgba(6,8,12,.78);
  text-align:center;
  overflow:hidden; text-overflow:ellipsis; white-space:nowrap;
  pointer-events:none;
}
.item.dragging{ opacity:.32 }
.item.pick{ box-shadow:0 0 0 2px var(--accent) }

.slot{
  width:4px; height:var(--tile); flex:none;
  border-radius:3px; background:var(--accent);
}

/* --------------------------------------------------------------------------
   Tray
   -------------------------------------------------------------------------- */
.tray{ margin-top:26px }
.tray__head{ display:flex; align-items:center; gap:10px; margin-bottom:10px }
.tray__head h2{ font-size:15px; font-weight:700; display:flex; align-items:center; gap:8px }
.pill{
  font-family:var(--f-body); font-size:11px; font-weight:700;
  padding:2px 8px; border-radius:999px;
  color:var(--ink-2); background:rgba(255,255,255,.07); border:1px solid var(--line);
}
.tray__tools{ margin-left:auto; display:flex; gap:6px }
.chip{
  padding:6px 12px; border-radius:999px;
  font-size:12px; font-weight:600;
  color:var(--ink-2);
  border:1px solid var(--line-2); background:rgba(255,255,255,.04);
  transition:background-color .15s var(--ease), color .15s var(--ease);
}
.chip:hover{ background:rgba(255,255,255,.1); color:var(--ink) }

.tray__items{
  display:flex; flex-wrap:wrap; gap:5px;
  padding:6px; min-height:calc(var(--tile) + 12px);
  border:1px solid var(--line);
  border-radius:var(--r);
  background:var(--surface-2);
}
.tray__items.over{ background:#232A38; box-shadow:inset 0 0 0 2px var(--accent) }

.drop{
  display:grid; place-items:center; gap:4px;
  margin-top:10px; padding:22px 16px;
  border:2px dashed var(--line-2); border-radius:var(--r);
  color:var(--muted); text-align:center; cursor:pointer;
  transition:border-color .15s var(--ease), background-color .15s var(--ease);
}
.drop:hover{ border-color:var(--accent); background:rgba(56,189,248,.05) }
.drop.over{ border-color:var(--accent); background:rgba(56,189,248,.1); color:var(--ink) }
.drop svg{ width:26px; height:26px; margin-bottom:2px }
.drop b{ font-family:var(--f-display); font-size:15px; color:var(--ink) }
.drop span{ font-size:12.5px }

.hint{
  margin-top:22px; padding:14px 16px;
  border:1px solid var(--line); border-radius:var(--r);
  background:rgba(255,255,255,.02);
  font-size:13px; color:var(--muted); text-align:center;
}
.hint b{ color:var(--ink-2) }

/* --------------------------------------------------------------------------
   Menus, sheet, toast
   -------------------------------------------------------------------------- */
.menu{
  position:fixed; z-index:60;
  min-width:200px; max-width:min(300px, calc(100vw - 24px));
  padding:6px;
  background:var(--surface); border:1px solid var(--line-2);
  border-radius:var(--r);
  box-shadow:0 18px 40px -14px rgba(0,0,0,.85);
}
.menu button, .menu a{
  display:flex; align-items:center; gap:9px; width:100%;
  padding:9px 10px; border-radius:8px;
  font-size:13.5px; color:var(--ink-2); text-align:left;
  transition:background-color .12s var(--ease), color .12s var(--ease);
}
.menu button:hover, .menu a:hover{ background:rgba(255,255,255,.07); color:var(--ink) }
.menu button.danger{ color:var(--danger) }
.menu button.danger:hover{ background:rgba(244,85,107,.14) }
.menu hr{ border:0; border-top:1px solid var(--line); margin:5px 2px }
.menu__head{ padding:6px 10px 4px; font-size:11px; letter-spacing:.12em; text-transform:uppercase; color:var(--muted) }
.menu svg{ width:15px; height:15px; flex:none }

.swatches{ display:grid; grid-template-columns:repeat(6,1fr); gap:5px; padding:5px }
.swatch{ aspect-ratio:1; border-radius:7px; border:2px solid transparent }
.swatch.on{ border-color:#fff }

.sheet{
  position:fixed; inset:0; z-index:70;
  display:grid; place-items:center;
  background:rgba(6,8,12,.78);
  padding:18px;
}
.sheet__card{
  width:min(520px, 100%); max-height:min(80vh, 660px);
  display:flex; flex-direction:column;
  background:var(--surface); border:1px solid var(--line-2);
  border-radius:var(--r-lg);
  box-shadow:0 24px 60px -20px rgba(0,0,0,.9);
}
.sheet__card h3{ padding:18px 20px 10px; font-size:19px }
.sheet__body{ padding:0 20px; overflow-y:auto; flex:1 }
.sheet__foot{ padding:14px 20px 18px; display:flex; gap:8px; justify-content:flex-end }

.listrow{
  display:flex; align-items:center; gap:12px;
  padding:12px; margin-bottom:8px;
  border:1px solid var(--line); border-radius:var(--r);
  background:var(--surface-2);
  cursor:pointer;
  transition:border-color .15s var(--ease);
}
.listrow:hover{ border-color:var(--line-2) }
.listrow.on{ border-color:var(--accent) }
.listrow__n{ font-family:var(--f-display); font-weight:700; font-size:15px; color:var(--ink) }
.listrow__d{ font-size:12px; color:var(--muted); margin-top:2px }
.listrow__x{ margin-left:auto; color:var(--muted); padding:6px; border-radius:8px }
.listrow__x:hover{ color:var(--danger); background:rgba(244,85,107,.12) }

.field{ margin-bottom:14px }
.field label{ display:block; font-size:12px; letter-spacing:.06em; text-transform:uppercase; color:var(--muted); margin-bottom:6px }
.field input[type=text]{
  width:100%; padding:11px 13px;
  font:inherit; color:var(--ink);
  background:var(--bg-2); border:1px solid var(--line-2); border-radius:10px;
}
.field input:focus{ outline:none; border-color:var(--accent) }
.check{ display:flex; align-items:center; gap:9px; font-size:13.5px; color:var(--ink-2); cursor:pointer }
.check input{ width:17px; height:17px; accent-color:var(--accent) }

.toast{
  position:fixed; left:50%; bottom:22px; z-index:90;
  transform:translateX(-50%);
  padding:11px 18px; border-radius:999px;
  background:var(--surface); border:1px solid var(--line-2);
  color:var(--ink); font-size:13.5px; font-weight:600;
  box-shadow:0 12px 30px -10px rgba(0,0,0,.8);
}

/* the element that follows your finger while dragging */
.dragghost{
  position:fixed; z-index:95; top:0; left:0;
  height:var(--tile);
  width:calc(var(--tile) * var(--ar, 1));
  border-radius:var(--r-sm); overflow:hidden;
  border:2px solid var(--accent);
  box-shadow:0 10px 24px -8px rgba(0,0,0,.8);
  pointer-events:none;
  will-change:transform;
}
.dragghost img{ width:100%; height:100%; object-fit:contain }

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */
/* ==========================================================================
   ABS STUDIO
   The mark is drawn in currentColor so it takes this site's accent. Same
   rules as everything else here: no blur, no looping animation.
   ========================================================================== */
.studio{ margin-top:48px; padding:0 var(--gutter); }
.studio__in{ max-width:var(--max); margin-inline:auto; }
.studio__card{
  padding:30px clamp(18px, 3.5vw, 36px) 32px;
  border-radius:var(--r-lg);
  border:1px solid var(--line);
  background:var(--surface);
  box-shadow:var(--inset);
}
.studio__head{ display:flex; align-items:flex-start; gap:18px; }
.studio__mark{ flex:none; width:54px; height:54px; color:var(--accent); }
.studio__mark svg{ width:100%; height:100%; display:block; }
.studio__eyebrow{
  font-size:10.5px; font-weight:700; letter-spacing:.22em; text-transform:uppercase;
  color:var(--muted);
}
.studio__name{
  margin-top:4px; font-family:var(--f-display);
  font-size:clamp(25px, 4vw, 32px); font-weight:900; letter-spacing:-.035em; color:var(--ink);
}
.studio__tag{ margin-top:7px; font-size:14px; color:var(--ink-2); }
.studio__body{ margin-top:18px; max-width:66ch; font-size:13.5px; line-height:1.75; color:var(--muted); }
.studio__list{
  margin-top:24px; display:grid; gap:12px;
  grid-template-columns:repeat(auto-fit, minmax(255px, 1fr));
}
.studio__item{
  display:block; padding:17px 19px; border-radius:var(--r); text-decoration:none;
  border:1px solid var(--line); background:var(--bg-2);
  transition:border-color .15s var(--ease), background-color .15s var(--ease);
}
.studio__item:hover{ border-color:var(--line-2); background:var(--surface-2); }
.studio__item.is-here{ border-color:rgba(56,189,248,.35); }
.studio__itemT{ display:block; font-family:var(--f-display); font-weight:800; font-size:16.5px; color:var(--ink); }
.studio__itemD{ display:block; margin-top:6px; font-size:12.5px; line-height:1.6; color:var(--muted); }
.studio__itemM{
  display:block; margin-top:10px; font-size:10.5px; font-weight:700;
  letter-spacing:.16em; text-transform:uppercase; color:var(--accent);
}
.studio__item.is-here .studio__itemM{ color:var(--muted); }

@media (max-width: 520px){
  .studio__head{ gap:13px; }
  .studio__mark{ width:42px; height:42px; }
}

.foot{ border-top:1px solid var(--line); margin-top:40px; background:var(--bg-2) }
.foot__in{
  max-width:var(--max); margin-inline:auto;
  padding:26px var(--gutter) 34px;
  display:grid; gap:14px; place-items:center; text-align:center;
}
.foot__note{ font-size:13px; color:var(--muted); max-width:52ch }
.made{
  font-family:var(--f-display); font-weight:900;
  font-size:clamp(20px, 4.4vw, 32px); letter-spacing:-.04em;
  background:linear-gradient(100deg, var(--accent), #A78BFA 60%, #F472B6);
  -webkit-background-clip:text; background-clip:text; color:transparent;
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 640px){
  :root{ --row-h:76px; --tile:66px }
  .row{ grid-template-columns:74px 1fr 34px }
}
@media (max-width: 380px){
  :root{ --tile:58px }
  .row{ grid-template-columns:62px 1fr 30px }
}

@media (prefers-reduced-motion: reduce){
  *{ transition-duration:.01ms !important }
}

@media print{
  .bar, .boardtools, .tray, .hint, .foot, .menu, .sheet{ display:none !important }
}

/* ==========================================================================
   Additions — themes, sizes, and the new controls
   ========================================================================== */

/* --------------------------------------------------------------------------
   Light theme. Only the tokens change; nothing else knows about it.
   -------------------------------------------------------------------------- */
:root[data-theme="light"]{
  --bg:        #F5F7FA;
  --bg-2:      #FFFFFF;
  --surface:   #FFFFFF;
  --surface-2: #EDF1F6;
  --line:      rgba(16,24,40,.10);
  --line-2:    rgba(16,24,40,.20);
  --inset:     inset 0 1px 0 rgba(255,255,255,.6);
  --ink:       #101828;
  --ink-2:     #475467;
  --muted:     #8592A6;
  --accent:    #0284C7;
  --accent-2:  #0369A1;
}
:root[data-theme="light"] .btn{ background:rgba(16,24,40,.04) }
:root[data-theme="light"] .btn:hover{ background:rgba(16,24,40,.09) }
:root[data-theme="light"] .iconbtn{ background:rgba(16,24,40,.04) }
:root[data-theme="light"] .iconbtn:hover{ background:rgba(16,24,40,.09) }
:root[data-theme="light"] .chip{ background:rgba(16,24,40,.04) }
:root[data-theme="light"] .chip:hover{ background:rgba(16,24,40,.1) }
:root[data-theme="light"] .btn--primary{ color:#fff }
:root[data-theme="light"] .row__items.over,
:root[data-theme="light"] .tray__items.over{ background:#DDE7F1 }
:root[data-theme="light"] .item{ background:#E4EAF1 }
:root[data-theme="light"] .made{ background:linear-gradient(100deg,#0284C7,#7C3AED 60%,#DB2777);
  -webkit-background-clip:text; background-clip:text; color:transparent }
:root[data-theme="light"] .menu, :root[data-theme="light"] .sheet__card{
  box-shadow:0 18px 40px -14px rgba(16,24,40,.28) }
:root[data-theme="light"] .sheet{ background:rgba(16,24,40,.45) }
:root[data-theme="light"] .lightbox{ background:rgba(16,24,40,.86) }

/* --------------------------------------------------------------------------
   Tile size
   -------------------------------------------------------------------------- */
body[data-tile="s"]{ --tile:60px; --row-h:70px }
body[data-tile="m"]{ --tile:84px; --row-h:92px }
body[data-tile="l"]{ --tile:112px; --row-h:122px }
@media (max-width: 640px){
  body[data-tile="s"]{ --tile:48px; --row-h:58px }
  body[data-tile="m"]{ --tile:66px; --row-h:76px }
  body[data-tile="l"]{ --tile:84px; --row-h:94px }
}

.titlerow__side{ display:flex; align-items:center; gap:12px; margin-left:auto }
.sizer{ display:flex; gap:2px; padding:3px; border-radius:999px; background:var(--surface-2); border:1px solid var(--line) }
.sizer button{
  width:28px; height:24px; border-radius:999px;
  font-family:var(--f-display); font-weight:700; font-size:11.5px; color:var(--muted);
  transition:background-color .15s var(--ease), color .15s var(--ease);
}
.sizer button.on{ background:var(--accent); color:#04121B }
:root[data-theme="light"] .sizer button.on{ color:#fff }

/* --------------------------------------------------------------------------
   Row grip, count and the reorder line
   -------------------------------------------------------------------------- */
.row__label{ position:relative }
.row__grip{
  position:absolute; left:3px; top:3px;
  width:20px; height:20px; border-radius:6px;
  display:grid; place-items:center;
  color:rgba(0,0,0,.42); font-size:11px; line-height:1;
  cursor:grab; touch-action:none;
}
.row__grip:hover{ background:rgba(0,0,0,.14); color:rgba(0,0,0,.7) }
.row__count{
  position:absolute; right:4px; bottom:2px;
  font-family:var(--f-body); font-size:10px; font-weight:700;
  color:rgba(0,0,0,.42);
}
.row.lift{ opacity:.45 }
.rowline{
  position:fixed; z-index:96; height:3px; border-radius:2px;
  background:var(--accent); pointer-events:none;
  box-shadow:0 0 0 1px rgba(0,0,0,.25);
}

/* --------------------------------------------------------------------------
   Tray search
   -------------------------------------------------------------------------- */
.search{
  width:150px; padding:6px 11px; border-radius:999px;
  font:inherit; font-size:12.5px; color:var(--ink);
  background:var(--surface-2); border:1px solid var(--line);
}
.search:focus{ outline:none; border-color:var(--accent) }
.search::placeholder{ color:var(--muted) }
.item.dim{ opacity:.18 }
@media (max-width: 560px){ .search{ width:104px } }

/* --------------------------------------------------------------------------
   Templates + export options
   -------------------------------------------------------------------------- */
.tpl{ display:grid; gap:8px }
.tplrow{
  display:flex; align-items:center; gap:10px;
  padding:10px; border:1px solid var(--line); border-radius:var(--r);
  background:var(--surface-2); cursor:pointer; text-align:left; width:100%;
  transition:border-color .15s var(--ease);
}
.tplrow:hover{ border-color:var(--accent) }
.tplrow__n{ font-family:var(--f-display); font-weight:700; font-size:14px; color:var(--ink) }
.tplrow__bar{ display:flex; gap:3px; margin-left:auto; flex:none }
.tplrow__bar i{ width:22px; height:20px; border-radius:4px; display:grid; place-items:center;
  font-size:9px; font-weight:800; color:#0B0D12; font-family:var(--f-display) }

.opt{ display:flex; align-items:center; justify-content:space-between; gap:14px; padding:11px 0; border-bottom:1px solid var(--line) }
.opt:last-child{ border-bottom:0 }
.opt__t{ font-size:14px; color:var(--ink) }
.opt__d{ font-size:12px; color:var(--muted); margin-top:2px }
.seg{ display:flex; gap:3px; flex:none; padding:3px; border-radius:999px; background:var(--surface-2); border:1px solid var(--line) }
.seg button{ padding:6px 12px; border-radius:999px; font-size:12px; font-weight:700; color:var(--muted) }
.seg button.on{ background:var(--accent); color:#04121B }
:root[data-theme="light"] .seg button.on{ color:#fff }

.hexrow{ display:flex; gap:6px; padding:5px }
.hexrow input{
  flex:1; min-width:0; padding:7px 10px; border-radius:8px;
  font:inherit; font-size:12.5px; color:var(--ink);
  background:var(--bg-2); border:1px solid var(--line-2);
}
.hexrow input:focus{ outline:none; border-color:var(--accent) }
/* .menu button sets width:100%, which in this flex row squeezed the input
   down to nothing. The button has to opt out of that. */
.hexrow button{ width:auto; flex:none; justify-content:center;
  padding:7px 12px; border-radius:8px; font-size:12px; font-weight:700;
  background:var(--accent); color:#04121B }
.hexrow input{ flex:1 1 auto; min-width:90px }
:root[data-theme="light"] .hexrow button{ color:#fff }

/* --------------------------------------------------------------------------
   Lightbox
   -------------------------------------------------------------------------- */
.lightbox{
  position:fixed; inset:0; z-index:88;
  display:grid; place-items:center; gap:12px; align-content:center;
  background:rgba(6,8,12,.9); padding:24px; cursor:zoom-out;
}
.lightbox img{ max-width:min(520px, 88vw); max-height:70vh; border-radius:var(--r); border:1px solid var(--line-2) }
.lightbox p{ font-size:14px; color:var(--ink) }
