/* Lock and Lay — field-notebook UI. Tokens from Open Props (sizes, easings, shadows, radii). */
:root {
  --paper: #f3eee4; --paper-2: #e9e2d4; --paper-3: #ddd4c2; --ink: #1e1a15; --ink-2: #5d564c; --ink-3: #8d8578;
  --rule: #cfc6b3; --rule-2: #b9ae98;
  --moss: #2f5d3a; --moss-2: #3e7a4c; --brick: #8b3a2b; --amber: #b8731f; --sky: #3a6d8c;
  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: Roboto, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Roboto Mono", ui-monospace, Menlo, monospace;
  --grain: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 0.06 0'/></filter><rect width='160' height='160' filter='url(%23n)'/></svg>");
  font-family: var(--sans); font-size: 14px; color: var(--ink);
}
:root[data-theme="dark"] {
  --paper: #1f1d1a; --paper-2: #27241f; --paper-3: #34302a; --ink: #ece5d6; --ink-2: #b3a996; --ink-3: #7f766a;
  --rule: #3a352e; --rule-2: #4d463d;
  --moss: #4e8f5f; --moss-2: #5fa572; --brick: #c9614e; --amber: #d59a3f; --sky: #6ca0c2;
  --grain: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 0.05 0'/></filter><rect width='160' height='160' filter='url(%23n)'/></svg>");
}
:root[data-theme="dark"] input, :root[data-theme="dark"] select, :root[data-theme="dark"] textarea { background: #15130f; color: var(--ink); border-color: var(--rule-2); }
:root[data-theme="dark"] .specimen, :root[data-theme="dark"] .gene, :root[data-theme="dark"] .tag { background: #15130f; }
:root[data-theme="dark"] .specimen { box-shadow: 2px 2px 0 #0e0d0b; }
:root[data-theme="dark"] .specimen canvas, :root[data-theme="dark"] #detail canvas, :root[data-theme="dark"] .post canvas, :root[data-theme="dark"] .egg.open canvas { background: linear-gradient(#2a2722, #1a1815); }
:root[data-theme="dark"] .egg.open { background: #15130f; }
:root[data-theme="dark"] button:hover { background: var(--ink); color: var(--paper); }
:root[data-theme="dark"] .toast { background: #2a2722; }
:root[data-theme="dark"] #phone { background: #0a0a0a; box-shadow: var(--shadow-6), inset 0 0 0 2px #333; }
:root[data-theme="dark"] .phone-notch { background: #0a0a0a; }
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: #14120f; overflow: hidden; }
#view { position: fixed; inset: 0; }
#view canvas { display: block; }
.hidden { display: none !important; }
h1, h2, h3, h4 { margin: 0; font-family: var(--serif); font-weight: 600; letter-spacing: -0.01em; }
.num, .price { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.lbl, .small-caps { font-size: 10.5px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-3); font-weight: 500; }
.rule { flex: 1; height: 1px; background: var(--rule); }
.paper { background: var(--paper); background-image: var(--grain); }

button { font: inherit; font-size: 13px; cursor: pointer; border: 1px solid var(--ink); background: transparent; color: var(--ink); border-radius: var(--radius-1); padding: 6px 12px; transition: background .12s var(--ease-2), color .12s var(--ease-2); }
button:hover { background: var(--ink); color: var(--paper); }
button.primary { background: var(--moss); border-color: var(--moss); color: #fff; }
button.primary:hover { background: var(--moss-2); border-color: var(--moss-2); }
button.danger { color: var(--brick); border-color: var(--brick); } button.danger:hover { background: var(--brick); color: #fff; }
button.quiet { border-color: transparent; color: var(--ink-2); } button.quiet:hover { background: var(--paper-2); color: var(--ink); }
button.small { padding: 3px 8px; font-size: 12px; }
button.wide { width: 100%; padding: 10px; }
button:disabled { opacity: .4; cursor: not-allowed; }
button.icon { border: 0; background: transparent; font-size: 22px; line-height: 1; padding: 0 6px; } button.icon:hover { background: transparent; color: var(--brick); }
input, select, textarea { font: inherit; padding: 8px 10px; border: 1px solid var(--rule-2); border-radius: var(--radius-1); background: #fff; color: var(--ink); }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--moss); outline-offset: 1px; }
label { display: flex; flex-direction: column; gap: 4px; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2); }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th { text-align: left; font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); font-weight: 500; padding: 6px 6px; border-bottom: 1px solid var(--ink); }
td { padding: 8px 6px; border-bottom: 1px solid var(--rule); vertical-align: middle; }
tr.row:hover td { background: rgba(47, 93, 58, .06); cursor: pointer; }
th.sortable { cursor: pointer; user-select: none; white-space: nowrap; }
th.sortable:hover { color: var(--ink); }
th.sortable.on { color: var(--moss); }
.coll-bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 10px; }
.coll-bar input { width: 240px; padding: 6px 9px; font-size: 13px; }
.meta { font-size: 12px; color: var(--ink-2); }
.loc { font-size: 13px; } .loc b { color: var(--moss); }
.sex { font-weight: 700; } .sex.M { color: var(--sky); } .sex.F { color: #a03f6a; }
.section { margin: 18px 0 8px; display: flex; align-items: center; gap: 10px; font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); }
.section::after { content: ""; flex: 1; height: 1px; background: var(--rule); }
.tag { display: inline-block; font-size: 11px; padding: 1px 6px; border: 1px solid var(--rule-2); border-radius: 2px; color: var(--ink-2); margin-right: 4px; background: #fff; }
.tag.warn { border-color: var(--amber); color: var(--amber); } .tag.bad { border-color: var(--brick); color: var(--brick); } .tag.good { border-color: var(--moss); color: var(--moss); } .tag.info { border-color: var(--sky); color: var(--sky); }
.empty { color: var(--ink-3); font-family: var(--serif); font-style: italic; font-size: 15px; padding: 28px 0; text-align: center; }
.bar { height: 5px; background: var(--paper-3); overflow: hidden; } .bar i { display: block; height: 100%; background: var(--moss); }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.actions { display: flex; flex-wrap: wrap; gap: 6px; }

/* overlay + auth */
.overlay { position: fixed; inset: 0; background: rgba(12, 10, 8, .7); display: flex; align-items: center; justify-content: center; z-index: 50; backdrop-filter: blur(3px); }
.auth-card { background: var(--paper); background-image: var(--grain); width: 460px; padding: 34px 40px 28px; box-shadow: var(--shadow-6); display: flex; flex-direction: column; gap: 14px; border-top: 6px solid var(--moss); }
.masthead { display: flex; align-items: center; gap: 14px; }
.brand { font-family: var(--serif); font-size: 30px; letter-spacing: .03em; font-weight: 600; text-transform: uppercase; white-space: nowrap; }
.lede { font-family: var(--serif); font-size: 16px; line-height: 1.45; color: var(--ink-2); margin: 0; }
.auth-tabs { display: flex; border-bottom: 1px solid var(--ink); }
.auth-tabs button { border: 0; border-radius: 0; padding: 8px 14px; color: var(--ink-3); background: transparent; }
.auth-tabs button:hover { background: transparent; color: var(--ink); }
.auth-tabs button.on { color: var(--ink); box-shadow: inset 0 -2px 0 var(--ink); }
.auth-err { color: var(--brick); font-size: 13px; min-height: 18px; }
.agree { text-transform: none; letter-spacing: 0; font-size: 13px; color: var(--ink-2); flex-direction: row; }
.agree input { margin-right: 6px; }
.agree a, .fine a { color: var(--moss); }
.oauth-row { display: flex; flex-direction: column; gap: 10px; }
.or { display: flex; align-items: center; gap: 10px; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); }
.or i { flex: 1; height: 1px; background: var(--rule); }
.oauth-btns { display: flex; gap: 8px; }
.oauth-btns a { flex: 1; display: flex; align-items: center; justify-content: center; gap: 8px; padding: 9px; border: 1px solid var(--rule-2); background: #fff; color: var(--ink); text-decoration: none; font-size: 13px; font-weight: 500; }
.oauth-btns a:hover { border-color: var(--ink); }
:root[data-theme="dark"] .oauth-btns a { background: #15130f; }
.oauth-btns svg { width: 18px; height: 18px; }
.fine { font-size: 12px; color: var(--ink-3); line-height: 1.45; margin: 0; }

/* hud */
#hud { position: fixed; top: 0; left: 0; right: 0; height: 56px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: stretch; background: var(--paper); background-image: var(--grain); border-bottom: 1px solid var(--ink); z-index: 20; }
.ledger { display: flex; }
.cell { display: flex; flex-direction: column; justify-content: center; padding: 0 16px; border-right: 1px solid var(--rule); line-height: 1.15; font-size: 14px; white-space: nowrap; }
.brand-cell .brand { font-size: 17px; }
.hud-nav { display: flex; align-items: stretch; }
.navbtn { border: 0; border-radius: 0; background: transparent; padding: 0 14px; color: var(--ink-2); font-weight: 500; position: relative; }
.navbtn { display: inline-flex; align-items: center; gap: 7px; }
.navbtn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; opacity: .85; flex: none; }
.navbtn.active svg { opacity: 1; stroke: var(--moss); }
@media (max-width: 1180px) { .navbtn > span:not(.badge) { display: none; } .navbtn { padding: 0 10px; } .navbtn svg { width: 18px; height: 18px; } }
.navbtn:hover { background: var(--paper-2); color: var(--ink); }
.navbtn.active { color: var(--ink); box-shadow: inset 0 -3px 0 var(--moss); background: transparent; }
.badge { position: absolute; top: -7px; right: -7px; background: var(--brick); color: #fff; font-size: 10px; line-height: 1.5; min-width: 17px; text-align: center; border-radius: 10px; padding: 1px 5px; font-family: var(--mono); box-shadow: 0 0 0 2px var(--paper); }
.navbtn .badge { top: 4px; right: 6px; }
.hud-right { display: flex; align-items: center; justify-content: flex-end; gap: 8px; padding: 0 14px; }
.hud-right button { white-space: nowrap; }
.tool { position: relative; border-color: var(--rule-2); } .tool.on { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.who { font-family: var(--serif); font-size: 15px; margin-left: 8px; }

#hint { position: fixed; top: 64px; left: 50%; transform: translateX(-50%); background: var(--ink); color: var(--paper); padding: 8px 16px; font-size: 13px; z-index: 19; max-width: 680px; text-align: center; box-shadow: var(--shadow-3); }
#hint b { color: #f2c98a; font-weight: 500; }
.hint-x { border: 0; background: transparent; color: var(--paper); opacity: .6; font-size: 16px; padding: 0 4px; margin-left: 6px; line-height: 1; }
.hint-x:hover { opacity: 1; background: transparent; color: #f2c98a; }

/* left binder panel */
#panel { position: fixed; top: 56px; left: 0; bottom: 0; width: 640px; background: var(--paper); background-image: var(--grain); border-right: 1px solid var(--ink); z-index: 18; display: flex; flex-direction: column; box-shadow: var(--shadow-5); }
.panel-head { display: flex; align-items: baseline; justify-content: space-between; padding: 18px 24px 12px; border-bottom: 1px solid var(--ink); }
.panel-head h2 { font-size: 26px; }
.panel-body { overflow: auto; padding: 16px 24px 30px; flex: 1; }
.tabs { display: flex; border-bottom: 1px solid var(--rule-2); margin-bottom: 14px; }
.tabs button { border: 0; border-radius: 0; padding: 8px 12px; color: var(--ink-3); background: transparent; }
.tabs button:hover { color: var(--ink); background: transparent; }
.tabs button.on { color: var(--ink); box-shadow: inset 0 -2px 0 var(--ink); }

/* specimen cards */
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 16px; }
.specimen { background: #fff; border: 1px solid var(--rule-2); display: flex; flex-direction: column; box-shadow: 2px 2px 0 var(--paper-3); }
.specimen canvas { width: 100%; aspect-ratio: 52 / 30; display: block; background: linear-gradient(#f5f1e9, #e8e1d3); border-bottom: 1px solid var(--rule); }
.specimen .body { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 6px; }
.specimen h4 { font-size: 16px; line-height: 1.2; }
.specimen dl { display: grid; grid-template-columns: auto 1fr; gap: 2px 10px; margin: 0; font-size: 12px; }
.specimen dt { color: var(--ink-3); text-transform: uppercase; letter-spacing: .08em; font-size: 10px; align-self: center; }
.specimen dd { margin: 0; font-family: var(--mono); }
.specimen .foot { display: flex; justify-content: space-between; align-items: center; border-top: 1px dashed var(--rule); padding-top: 8px; margin-top: 2px; }
.specimen .price { font-size: 15px; }
.specimen .blurb { font-size: 12.5px; color: var(--ink-2); line-height: 1.4; }
.specimen .brandline { font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); }
.stats-line { font-size: 11px; color: var(--ink-2); font-family: var(--mono); }
.swatches { display: flex; flex-wrap: wrap; gap: 8px; }
.swatch { width: 54px; height: 54px; border: 1px solid var(--rule-2); cursor: pointer; display: flex; align-items: flex-end; padding: 3px; font-size: 9px; letter-spacing: .06em; text-transform: uppercase; color: rgba(0,0,0,.6); }
.swatch.on { outline: 2px solid var(--ink); outline-offset: 2px; }

/* odds */
.odds { display: grid; grid-template-columns: 1fr auto; gap: 5px 14px; font-size: 13px; align-items: center; }
.odds .pct { font-family: var(--mono); font-size: 12px; }

/* detail card */
#detail { position: fixed; top: 64px; right: 12px; width: 372px; max-height: calc(100vh - 76px); overflow: auto; background: var(--paper); background-image: var(--grain); border: 1px solid var(--ink); z-index: 18; padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 10px; box-shadow: var(--shadow-5); }
#detail .name { font-family: var(--serif); font-size: 24px; line-height: 1.1; }
#detail .morph { color: var(--ink-2); font-size: 13px; }
#detail canvas { width: 100%; aspect-ratio: 52 / 30; display: block; background: linear-gradient(#f5f1e9, #e8e1d3); border: 1px solid var(--rule); }
.stats { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 1px; background: var(--rule); border: 1px solid var(--rule); }
.stats div { background: var(--paper); padding: 6px 8px; }
.stats b { display: block; font-size: 14px; font-weight: 500; font-family: var(--mono); }
.genes { display: flex; flex-wrap: wrap; gap: 4px; }
.gene { font-size: 11px; padding: 2px 7px; border: 1px solid var(--rule-2); background: #fff; }
.pills { display: flex; flex-wrap: wrap; gap: 3px; margin-top: 4px; }
.pill { display: inline-block; font-size: 10px; line-height: 1.5; padding: 0 6px; border-radius: 9px; border: 1px solid; font-style: normal; white-space: nowrap; }
.pill.codom { background: #fff3d6; border-color: #d9a441; color: #7a5410; }
.pill.dom { background: #e3edfa; border-color: #6c8fbf; color: #244a7a; }
.pill.rec { background: #efe4f7; border-color: #9a6db5; color: #4f2d6b; }
.pill.rec.het { background: transparent; border-style: dashed; color: #6a4d80; }
.pill.rec.het.unlikely, .gene.rec.het.unlikely { opacity: .55; border-color: var(--rule-2); color: var(--ink-3); }
.pill.paradox { background: #fff; border-color: #c99b3f; color: #8a6a1a; }
.pill.more { border-color: var(--rule-2); color: var(--ink-3); }
.pill[class*="tag-"] { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.pill.tag-holdback { background: var(--moss); border-color: var(--moss); color: #fff; }
.pill.tag-sell { background: var(--brick); border-color: var(--brick); color: #fff; }
:root[data-theme="dark"] .pill.codom { background: #3a2e12; color: #f2cd7a; } :root[data-theme="dark"] .pill.dom { background: #172a40; color: #a9c6ea; } :root[data-theme="dark"] .pill.rec { background: #2b1d38; color: #d3b5ea; } :root[data-theme="dark"] .pill.rec.het { background: transparent; color: #b99ad0; }
.quick { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.chip { border: 1px solid var(--rule-2); background: transparent; color: var(--ink-2); border-radius: 14px; padding: 3px 10px; font-size: 12px; }
.chip span { margin-left: 5px; font-family: var(--mono); font-size: 11px; color: var(--ink-3); }
.chip.on { background: var(--ink); color: var(--paper); border-color: var(--ink); } .chip.on span { color: var(--paper-3); }
.chip:hover { background: var(--paper-2); color: var(--ink); } .chip.on:hover { background: var(--ink); color: var(--paper); }
.legend { display: flex; gap: 5px; align-items: center; margin-bottom: 8px; }
.tagrow { display: flex; flex-wrap: wrap; gap: 5px; }
.gene.codom { border-color: #c99b3f; } .gene.dom { border-color: #6c8fbf; } .gene.rec { border-color: #9a6db5; } .gene.het { border-style: dashed; color: var(--ink-2); }

/* design + hold bars */
#designbar, #holdbar, #visitbar { position: fixed; bottom: 16px; left: 50%; transform: translateX(-50%); background: var(--paper); background-image: var(--grain); border: 1px solid var(--ink); padding: 8px 12px; display: flex; align-items: center; gap: 8px; z-index: 22; box-shadow: var(--shadow-4); font-size: 13px; }
.db-hint { color: var(--ink-2); padding: 0 8px; border-left: 1px solid var(--rule-2); margin-left: 4px; max-width: 360px; }
.db-hint.bad { color: var(--brick); }
#holdText, #visitText { font-family: var(--serif); font-size: 16px; }

/* phone */
#phone { position: fixed; right: 18px; bottom: 14px; width: 344px; height: 704px; max-height: calc(100vh - 80px); background: #141414; border-radius: 40px; padding: 10px; box-shadow: var(--shadow-6), inset 0 0 0 2px #2c2c2c, inset 0 0 0 4px #0a0a0a; z-index: 25; display: flex; flex-direction: column; }
.phone-notch { position: absolute; top: 18px; left: 50%; transform: translateX(-50%); width: 96px; height: 24px; background: #0a0a0a; border-radius: 14px; z-index: 3; }
.phone-screen { flex: 1; background: var(--paper); border-radius: 32px; overflow: hidden; display: flex; flex-direction: column; position: relative; }
.phone-status { display: flex; justify-content: space-between; padding: 14px 24px 4px; font-size: 12px; font-family: var(--mono); font-weight: 500; }
.phone-body { flex: 1; overflow: auto; padding: 0; }
.phone-body.home { background: radial-gradient(120% 70% at 30% 0%, rgba(47, 93, 58, .18), transparent 60%), radial-gradient(90% 60% at 100% 100%, rgba(184, 115, 31, .14), transparent 60%); }
.phone-body.enter { animation: appin .22s ease; }
@keyframes appin { from { opacity: 0; transform: translateX(24px); } to { opacity: 1; transform: none; } }
.phone-dock { display: flex; justify-content: center; padding: 6px 0 8px; }
.home-btn { width: 110px; height: 5px; border-radius: 3px; background: var(--ink); opacity: .55; border: 0; padding: 0; min-height: 0; }
.home-btn:hover { opacity: 1; background: var(--ink); }
.widget { margin: 12px 14px 4px; padding: 12px 14px; background: rgba(255, 255, 255, .5); border-radius: 16px; border: 1px solid rgba(255, 255, 255, .6); }
:root[data-theme="dark"] .widget { background: rgba(0, 0, 0, .28); border-color: rgba(255, 255, 255, .06); }
.widget.small { cursor: pointer; }
.widget .w-date { font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); }
.widget .w-cash { font-family: var(--mono); font-size: 30px; font-weight: 500; line-height: 1.1; margin: 2px 0; }
.w-post { display: flex; gap: 10px; align-items: center; margin-top: 6px; font-size: 12.5px; }
.w-post canvas { width: 92px; height: 53px; flex: none; border-radius: 6px; background: linear-gradient(#f5f1e9, #e8e1d3); }
.apps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px 6px; padding: 16px 12px 8px; }
.app { display: flex; flex-direction: column; align-items: center; gap: 6px; border: 0; padding: 0; font-size: 11px; color: var(--ink); background: transparent; min-height: 0; }
.app:hover { background: transparent; color: var(--ink); } .app:hover .ico { transform: scale(1.06); }
.app .ico { width: 56px; height: 56px; border-radius: 15px; display: flex; align-items: center; justify-content: center; position: relative; box-shadow: 0 2px 4px rgba(0, 0, 0, .22), inset 0 1px 0 rgba(255, 255, 255, .18); transition: transform .12s; }
.app .ico svg { width: 30px; height: 30px; stroke: #fff; fill: none; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.app .ico .badge { position: absolute; top: -6px; right: -6px; }
.app-bar { display: flex; align-items: center; gap: 6px; padding: 6px 10px 8px 4px; border-bottom: 1px solid var(--rule); position: sticky; top: 0; background: var(--paper); z-index: 1; }
.app-bar .app-title { font-family: var(--serif); font-size: 19px; font-weight: 600; flex: 1; }
.app-back { border: 0; font-size: 26px; line-height: 1; padding: 0 8px; color: var(--moss); min-height: 0; }
.app-back:hover { background: transparent; color: var(--moss-2); }
.app-body { padding: 8px 12px 12px; }
.app-body.chat { display: flex; flex-direction: column; min-height: calc(100% - 44px); }
.search { width: 100%; margin: 4px 0 8px; border-radius: 10px; }
.pick-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin-bottom: 10px; max-height: 196px; overflow: auto; }
.pickc { border: 1px solid var(--rule); padding: 3px; display: flex; flex-direction: column; gap: 2px; font-size: 10.5px; line-height: 1.2; text-align: left; border-radius: 6px; min-height: 0; min-width: 0; overflow: hidden; }
.pickc canvas { max-width: 100%; height: auto; }

/* ---- Hatch, the social app ---- */
.ig { display: flex; flex-direction: column; min-height: 100%; }
.ig-body { flex: 1; padding-bottom: 6px; }
.ig-top { display: flex; align-items: center; gap: 4px; padding: 4px 8px 6px 2px; border-bottom: 1px solid var(--rule); position: sticky; top: 0; background: var(--paper); z-index: 2; }
.ig-logo { flex: 1; font-family: var(--serif); font-size: 24px; font-weight: 600; letter-spacing: -.01em; font-style: italic; }
.ig-logo.plain { font-style: normal; font-size: 18px; }
.ig-right { position: relative; } .ig-right .badge { top: -2px; right: -2px; }
.ig-right button, .ig-tabs button { border: 0; background: transparent; padding: 4px 6px; min-height: 0; position: relative; }
.ig-right button:hover, .ig-tabs button:hover { background: transparent; color: var(--ink); }
.ig svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.ig-tabs { display: flex; justify-content: space-around; position: sticky; bottom: 0; background: var(--paper); border-top: 1px solid var(--rule); padding: 6px 0 2px; z-index: 2; }
.ig-tabs button { color: var(--ink-3); } .ig-tabs button.on { color: var(--ink); } .ig-tabs button.on svg { stroke-width: 2.4; }
.ig-tabs .badge { top: -2px; right: 0; }
.ig-av { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 50%; color: #fff; font-family: var(--serif); font-size: 15px; font-weight: 600; flex: none; }
.ig-av.sm { width: 24px; height: 24px; font-size: 12px; } .ig-av.lg { width: 76px; height: 76px; font-size: 34px; }
.ig-stories { display: flex; gap: 10px; padding: 10px 10px 8px; overflow-x: auto; scrollbar-width: none; border-bottom: 1px solid var(--rule); }
.ig-stories::-webkit-scrollbar { display: none; }
.ig-story { border: 0; background: transparent; padding: 0; display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 10.5px; color: var(--ink-2); min-height: 0; flex: none; width: 60px; }
.ig-story:hover { background: transparent; color: var(--ink); }
.ig-story .ring { padding: 3px; border-radius: 50%; border: 2px solid var(--rule-2); } .ig-story .ring .ig-av { width: 44px; height: 44px; font-size: 20px; }
.ig-story.fresh .ring { border-color: transparent; background: linear-gradient(var(--paper), var(--paper)) padding-box, linear-gradient(45deg, #f9ce34, #ee2a7b, #6228d7) border-box; }
.ig-story span:last-child { max-width: 60px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ig-feedmode { display: flex; gap: 14px; padding: 8px 12px 2px; }
.ig-feedmode button { border: 0; background: transparent; padding: 2px 0; font-size: 13px; color: var(--ink-3); min-height: 0; border-radius: 0; }
.ig-feedmode button.on { color: var(--ink); font-weight: 500; box-shadow: inset 0 -2px 0 var(--ink); }
.ig-feedmode button:hover { background: transparent; color: var(--ink); }
.igp { padding: 8px 0 10px; border-bottom: 1px solid var(--rule); }
.igp header { display: flex; align-items: center; justify-content: space-between; padding: 2px 12px 8px; }
.igp header .author { display: flex; align-items: center; gap: 8px; font-size: 13.5px; }
.ig-img { position: relative; overflow: hidden; background: linear-gradient(#f5f1e9, #e8e1d3); }
:root[data-theme="dark"] .ig-img { background: linear-gradient(#2a2722, #1a1815); }
.ig-img canvas { width: 100%; aspect-ratio: 52 / 30; display: block; }
.ig-img.big { border-radius: 12px; border: 1px solid var(--rule); }
.ig-tag { position: absolute; left: 8px; bottom: 8px; font-size: 11px; padding: 2px 8px; background: rgba(20, 18, 15, .55); color: #fff; border-radius: 10px; backdrop-filter: blur(4px); }
.ig-bigheart { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; pointer-events: none; opacity: 0; }
.ig-bigheart svg { width: 90px; height: 90px; fill: #fff; stroke: #fff; filter: drop-shadow(0 4px 10px rgba(0, 0, 0, .35)); }
.ig-img.pop .ig-bigheart { animation: bigheart .9s ease; }
@keyframes bigheart { 0% { opacity: 0; transform: scale(.4); } 25% { opacity: 1; transform: scale(1.1); } 70% { opacity: 1; transform: scale(1); } 100% { opacity: 0; transform: scale(1.15); } }
.ig-actions { display: flex; align-items: center; gap: 2px; padding: 6px 8px 2px; }
.ig-actions button { border: 0; background: transparent; padding: 4px; min-height: 0; color: var(--ink); }
.ig-actions button:hover { background: transparent; color: var(--ink-2); }
.ig-actions button.liked svg { fill: #ed4956; stroke: #ed4956; }
.ig-actions .right { margin-left: auto; padding-right: 6px; font-size: 11.5px; }
.ig-likes { padding: 2px 12px; font-size: 13px; }
.ig-cap { padding: 2px 12px; font-size: 13.5px; line-height: 1.4; } .ig-cap .author { cursor: pointer; }
.ig-more { border: 0; background: transparent; color: var(--ink-3); font-size: 12.5px; padding: 2px 12px; min-height: 0; }
.ig-more:hover { background: transparent; color: var(--ink); }
.ig-cmts { padding: 2px 12px; font-size: 13px; display: flex; flex-direction: column; gap: 2px; }
.ig-cform { display: flex; align-items: center; gap: 8px; padding: 6px 12px 0; }
.ig-cform input { flex: 1; border: 0; border-bottom: 1px solid var(--rule); border-radius: 0; padding: 5px 2px; font-size: 13px; background: transparent; }
.ig-cform button { border: 0; color: var(--sky); font-weight: 500; padding: 4px 6px; min-height: 0; } .ig-cform button:hover { background: transparent; }
.ig-search { padding: 8px 10px; } .ig-search input { width: 100%; border-radius: 10px; }
.ig-people { display: flex; flex-direction: column; }
.ig-person { display: flex; align-items: center; gap: 10px; border: 0; background: transparent; padding: 7px 12px; text-align: left; min-height: 0; border-radius: 0; }
.ig-person:hover { background: var(--paper-2); color: var(--ink); }
.ig-person > span:not(.ig-av) { flex: 1; display: flex; flex-direction: column; font-size: 13.5px; } .ig-person small { color: var(--ink-3); font-size: 11.5px; }
.ig-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2px; padding: 2px 0; }
.ig-cell { border: 0; padding: 0; background: var(--paper-2); position: relative; aspect-ratio: 1; overflow: hidden; min-height: 0; border-radius: 0; }
.ig-cell canvas { width: 100%; height: 100%; object-fit: cover; display: block; }
.ig-cell span { position: absolute; right: 4px; bottom: 4px; font-size: 10px; color: #fff; text-shadow: 0 1px 2px rgba(0, 0, 0, .6); display: flex; align-items: center; gap: 2px; }
.ig-cell span svg { width: 12px; height: 12px; fill: #fff; stroke: #fff; }
.ig-new { padding: 10px 12px; } .ig-new textarea { width: 100%; margin: 8px 0; }
.ig-empty { text-align: center; padding: 40px 20px; color: var(--ink-3); display: flex; flex-direction: column; align-items: center; gap: 6px; }
.ig-empty b { color: var(--ink); font-family: var(--serif); font-size: 18px; }
.ig-activity { display: flex; flex-direction: column; }
.ig-act { display: flex; align-items: center; gap: 10px; border: 0; background: transparent; padding: 8px 12px; text-align: left; min-height: 0; border-radius: 0; font-size: 13px; }
.ig-act.unread { background: rgba(58, 109, 140, .08); } .ig-act:hover { background: var(--paper-2); color: var(--ink); }
.ig-act > span:not(.ig-av) { flex: 1; display: flex; flex-direction: column; } .ig-act small { color: var(--ink-3); }
.ig-phead { display: flex; align-items: center; gap: 18px; padding: 14px 16px 8px; }
.ig-pstats { flex: 1; display: flex; justify-content: space-around; text-align: center; }
.ig-pstats b { display: block; font-size: 17px; } .ig-pstats span { font-size: 11px; color: var(--ink-3); }
.ig-pbio { padding: 0 16px 8px; font-size: 13.5px; line-height: 1.4; }
.ig-pbtns { display: flex; gap: 6px; padding: 0 16px 10px; flex-wrap: wrap; }
.ig-best { display: flex; gap: 6px; padding: 0 12px 8px; overflow-x: auto; scrollbar-width: none; }
.ig-best div { flex: none; width: 120px; font-size: 11px; color: var(--ink-2); } .ig-best canvas { width: 120px; height: 69px; border-radius: 6px; display: block; background: var(--paper-2); }
.ig-ach { padding: 0 12px 10px; display: flex; flex-wrap: wrap; gap: 4px; }
.pickc:hover { background: var(--paper-2); color: var(--ink); }
.pickc.on { border-color: var(--moss); box-shadow: 0 0 0 2px var(--moss); }
.pickc canvas { width: 100%; aspect-ratio: 52 / 30; border-radius: 4px; background: linear-gradient(#f5f1e9, #e8e1d3); }
.pickc span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.shot canvas { width: 100%; aspect-ratio: 52 / 30; display: block; border-radius: 10px; border: 1px solid var(--rule); background: linear-gradient(#f5f1e9, #e8e1d3); }
.shot-cap { font-size: 12.5px; margin: 6px 0 8px; }
.chatlog .msg { max-width: 84%; padding: 6px 10px; border-radius: 14px 14px 14px 4px; background: var(--paper-2); align-self: flex-start; }
.chatlog .msg b { display: block; font-size: 11px; }
.chatlog .msg.me { background: var(--moss); color: #fff; align-self: flex-end; border-radius: 14px 14px 4px 14px; }
.chatlog .msg.me b { color: rgba(255, 255, 255, .75); }
.board .brow { display: flex; align-items: center; gap: 8px; padding: 7px 0; border-bottom: 1px solid var(--rule); font-size: 13px; }
.brow.me { background: rgba(47, 93, 58, .07); }
.brow .rank { width: 20px; font-family: var(--mono); color: var(--ink-3); text-align: right; }
.brow .who { flex: 1; }
.avatar.sm { width: 30px; height: 30px; font-size: 15px; }
.bank-hero { padding: 14px 0 10px; }
.bank-cash { font-family: var(--mono); font-size: 34px; font-weight: 500; line-height: 1.1; }
.post { border-bottom: 1px solid var(--rule); padding: 10px 0 12px; display: flex; flex-direction: column; gap: 6px; }
.post .head { display: flex; justify-content: space-between; align-items: baseline; }
.post .author { font-weight: 500; }
.post canvas { width: 100%; aspect-ratio: 52 / 30; display: block; background: linear-gradient(#f5f1e9, #e8e1d3); border: 1px solid var(--rule); }
.post .caption { font-size: 13px; line-height: 1.4; }
.post .caption b { font-family: var(--serif); font-weight: 600; }
.post .react { display: flex; gap: 10px; align-items: center; font-size: 12px; color: var(--ink-2); }
.post .react button { border: 0; padding: 2px 6px; color: var(--ink-2); } .post .react button:hover { background: transparent; color: var(--brick); } .post .react button.liked { color: var(--brick); }
.post .comments { display: flex; flex-direction: column; gap: 3px; font-size: 12px; }
.post .comments b { font-weight: 500; }
.post form { display: flex; gap: 4px; } .post form input { flex: 1; padding: 5px 8px; font-size: 12px; }
.chatlog { display: flex; flex-direction: column; gap: 5px; font-size: 13px; padding-bottom: 8px; }
.chatlog .sys { color: var(--ink-3); font-style: italic; font-size: 12px; }
.chatlog b { color: var(--moss); font-weight: 500; }
.chatform { display: flex; gap: 4px; position: sticky; bottom: 0; background: var(--paper); padding-top: 6px; }
.chatform input { flex: 1; }
.phone h3 { font-size: 20px; margin: 6px 0 8px; }
.feed-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.seg { display: flex; border: 1px solid var(--rule-2); }
.seg button { border: 0; border-radius: 0; padding: 4px 9px; font-size: 11px; color: var(--ink-3); }
.seg button.on { background: var(--ink); color: var(--paper); }
.author { cursor: pointer; } .author:hover { text-decoration: underline; }
.alert { display: flex; gap: 10px; padding: 9px 4px; border-bottom: 1px solid var(--rule); cursor: pointer; font-size: 13px; align-items: flex-start; }
.alert.unread { background: rgba(78, 143, 95, .08); }
.alert .kind { width: 22px; height: 22px; border: 1px solid var(--rule-2); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 12px; flex: none; }
.prof-head { display: flex; gap: 12px; align-items: center; margin: 8px 0; }
.avatar { width: 46px; height: 46px; border-radius: 50%; background: var(--moss); color: #fff; display: flex; align-items: center; justify-content: center; font-family: var(--serif); font-size: 22px; flex: none; }
.prof-bio { font-size: 13px; line-height: 1.45; margin: 4px 0 8px; }
.prof-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--rule); border: 1px solid var(--rule); margin: 10px 0; }
.prof-stats div { background: var(--paper); padding: 6px 8px; text-align: center; }
.prof-stats b { display: block; font-family: var(--mono); font-size: 15px; font-weight: 500; }
.prof-stats span { font-size: 10px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }
.prof-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.prof-cell canvas { width: 100%; aspect-ratio: 26 / 15; display: block; background: linear-gradient(#f5f1e9, #e8e1d3); border: 1px solid var(--rule); }
:root[data-theme="dark"] .prof-cell canvas { background: linear-gradient(#2a2722, #1a1815); }

/* toasts */
#toasts { position: fixed; left: 12px; bottom: 14px; display: flex; flex-direction: column; gap: 6px; z-index: 30; width: 340px; pointer-events: none; }
.toast { background: var(--paper); color: var(--ink); padding: 9px 12px; font-size: 13px; line-height: 1.35; border: 1px solid var(--ink); border-left: 5px solid var(--ink-3); animation: pop .2s var(--ease-out-3); pointer-events: auto; box-shadow: var(--shadow-3); }
.toast.breed { border-left-color: #a03f6a; } .toast.hatch { border-left-color: var(--amber); } .toast.warn { border-left-color: var(--brick); } .toast.death { border-left-color: #000; } .toast.buy, .toast.sell, .toast.ok { border-left-color: var(--moss); } .toast.ach { border-left-color: #c99b3f; background: #fff7df; } .toast.news { border-left-color: var(--sky); opacity: .9; } .toast.social { border-left-color: #6c8fbf; }
@keyframes pop { from { transform: translateY(8px); opacity: 0; } to { transform: none; opacity: 1; } }

/* modal */
.modal { background: var(--paper); background-image: var(--grain); padding: 26px 30px; width: min(900px, 94vw); max-height: 90vh; overflow: auto; border: 1px solid var(--ink); box-shadow: var(--shadow-6); }
.modal h2 { font-size: 26px; margin-bottom: 4px; }
.modal.narrow { width: min(460px, 94vw); }
.dialog { display: flex; flex-direction: column; gap: 12px; }
.dlg-body { margin: 0; line-height: 1.5; color: var(--ink-2); font-size: 14px; }
.dlg-body b { color: var(--ink); font-family: var(--mono); }
.eggs { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; margin: 16px 0; }
.egg { background: linear-gradient(#cdbfa3, #b8a889); height: 160px; display: flex; align-items: center; justify-content: center; cursor: pointer; position: relative; overflow: hidden; border: 1px solid #9c8f74; }
.egg .shell { width: 78px; height: 96px; background: radial-gradient(circle at 35% 30%, #fffdf6, #e9e2cf 70%, #d6cdb5); border-radius: 50% 50% 50% 50% / 58% 58% 42% 42%; box-shadow: inset -6px -8px 14px rgba(120, 100, 70, .25), 0 6px 10px rgba(0, 0, 0, .2); transition: transform .2s; }
.egg:hover .shell { transform: scale(1.05) rotate(-3deg); }
.egg.slug .shell { background: radial-gradient(circle at 35% 30%, #f3e6b3, #d9c26a 70%, #b59a3e); transform: scale(.8); opacity: .8; }
.egg.dead .shell { background: radial-gradient(circle at 35% 30%, #b8ad98, #8e836b 70%, #6c634f); }
.egg.open { background: #fff; cursor: default; flex-direction: column; gap: 4px; padding: 6px; }
.egg.open canvas { width: 100%; aspect-ratio: 52 / 30; background: linear-gradient(#f5f1e9, #e8e1d3); }
.egg.open .n { font-size: 12px; font-weight: 500; text-align: center; line-height: 1.2; }
.egg.open .v { font-size: 11px; color: var(--ink-2); font-family: var(--mono); }
.egg.open .keep { display: inline-flex; align-items: center; gap: 3px; font-family: var(--sans); text-transform: none; letter-spacing: 0; font-size: 11px; color: var(--ink-2); cursor: pointer; }
.egg.open.jackpot { box-shadow: inset 0 0 0 3px var(--amber); }
.tubpick { display: grid; gap: 4px; margin: 6px 0 14px; }
.tubpick button { padding: 6px; font-size: 12px; border-color: var(--rule-2); }
.tubpick button.occ { background: var(--paper-2); color: var(--ink-2); }
.tubpick button.here { outline: 2px solid var(--moss); }
.help p { line-height: 1.55; font-size: 14px; }
.help h3 { margin: 16px 0 4px; font-size: 17px; }
.news { font-size: 12.5px; color: var(--ink-2); padding: 5px 0; border-bottom: 1px dotted var(--rule-2); }


/* trades + lots */
.presets { display: flex; gap: 6px; margin: 6px 0 10px; flex-wrap: wrap; }
#modal2 { z-index: 60; }
.callout { display: flex; align-items: center; gap: 12px; padding: 10px 12px; margin-bottom: 10px; border: 1px solid var(--amber); border-left-width: 5px; background: rgba(213, 154, 63, .08); font-size: 13px; line-height: 1.4; }
.callout button { flex: none; }
.selbar { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; padding: 8px 10px; border: 1px dashed var(--rule-2); }
.selbar .rule { flex: 1; }
.selcell { width: 30px; }
.specimen.lot { position: relative; }
.lotbadge { position: absolute; top: 8px; left: 8px; background: var(--ink); color: var(--paper); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; padding: 2px 8px; }
.lotlist { font-size: 13px; line-height: 1.5; max-height: 110px; overflow: auto; }
.trade .thead { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 8px; }
.tcols { display: grid; grid-template-columns: 1fr auto 1fr; gap: 12px; align-items: start; }
.tcols.builder { grid-template-columns: 1fr 1fr; }
.tcols .arrow { font-size: 22px; color: var(--ink-3); padding-top: 26px; }
.tside { display: flex; gap: 8px; align-items: center; padding: 5px 0; border-bottom: 1px dotted var(--rule); font-size: 13px; }
.tside canvas { width: 64px; height: 37px; border: 1px solid var(--rule); background: linear-gradient(#f5f1e9, #e8e1d3); flex: none; }
.tside.cash { font-family: var(--mono); color: var(--moss); }
.tb-head { margin-bottom: 8px; }
.tpicks { max-height: 300px; overflow: auto; border: 1px solid var(--rule); padding: 4px 8px; margin-bottom: 8px; }
.tpick { display: flex; gap: 8px; align-items: center; padding: 6px 0; border-bottom: 1px dotted var(--rule); text-transform: none; letter-spacing: 0; font-size: 13px; color: var(--ink); cursor: pointer; }
.tpick.on { background: rgba(63, 141, 92, .08); }
.tpick canvas { width: 64px; height: 37px; border: 1px solid var(--rule); background: linear-gradient(#f5f1e9, #e8e1d3); flex: none; }
:root[data-theme="dark"] .tside canvas, :root[data-theme="dark"] .tpick canvas { background: linear-gradient(#2a2722, #1a1815); }

/* ===================== readability + custom controls pass ===================== */
:root { font-size: 15px; }
body { line-height: 1.45; }
button { font-size: 14px; min-height: 34px; padding: 6px 14px; border-radius: 4px; }
button.small { min-height: 28px; padding: 3px 10px; font-size: 13px; }
button.icon { min-height: 0; }
button:focus-visible, input:focus-visible, textarea:focus-visible, .csel-btn:focus-visible { outline: 2px solid var(--moss); outline-offset: 2px; }
input, textarea { font-size: 15px; padding: 9px 12px; border-radius: 4px; }
input[type=number] { -moz-appearance: textfield; }
input[type=number]::-webkit-outer-spin-button, input[type=number]::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
textarea { resize: vertical; min-height: 72px; }
label { font-size: 11.5px; gap: 5px; }

/* checkboxes */
input[type=checkbox] { appearance: none; -webkit-appearance: none; width: 17px; height: 17px; border: 1.5px solid var(--rule-2); border-radius: 3px; background: #fff; display: inline-grid; place-content: center; padding: 0; margin: 0 6px 0 0; vertical-align: -3px; cursor: pointer; }
input[type=checkbox]::before { content: ""; width: 9px; height: 9px; background: var(--moss); clip-path: polygon(14% 44%, 0 65%, 50% 100%, 100% 16%, 80% 0%, 43% 62%); transform: scale(0); transition: transform .1s var(--ease-out-2); }
input[type=checkbox]:checked { border-color: var(--moss); }
input[type=checkbox]:checked::before { transform: scale(1); }
:root[data-theme="dark"] input[type=checkbox] { background: #15130f; }

/* custom select */
.csel { position: relative; display: inline-block; width: 100%; }
.csel select { position: absolute; opacity: 0; pointer-events: none; width: 1px; height: 1px; }
.csel-btn { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 10px; text-align: left; background: #fff; border: 1px solid var(--rule-2); padding: 8px 12px; font-size: 15px; color: var(--ink); }
.csel-btn:hover { background: #fff; color: var(--ink); border-color: var(--ink); }
.csel-btn .chev { width: 8px; height: 8px; border-right: 1.5px solid var(--ink-2); border-bottom: 1.5px solid var(--ink-2); transform: rotate(45deg) translateY(-2px); flex: none; }
.csel.open .csel-btn { border-color: var(--ink); }
.csel-menu { display: none; position: absolute; left: 0; right: 0; top: calc(100% + 4px); max-height: 260px; overflow: auto; background: var(--paper); border: 1px solid var(--ink); box-shadow: var(--shadow-4); z-index: 60; }
.csel.open .csel-menu { display: block; }
.csel-opt { padding: 8px 12px; font-size: 14px; cursor: pointer; border-bottom: 1px solid var(--rule); }
.csel-opt:last-child { border-bottom: 0; }
.csel-opt:hover { background: var(--paper-2); }
.csel-opt.on { background: var(--ink); color: var(--paper); }
:root[data-theme="dark"] .csel-btn { background: #15130f; }
:root[data-theme="dark"] .csel-btn:hover { background: #15130f; }

/* scrollbars */
* { scrollbar-width: thin; scrollbar-color: var(--rule-2) transparent; }
*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-track { background: transparent; }
*::-webkit-scrollbar-thumb { background: var(--rule-2); border: 3px solid var(--paper); border-radius: 6px; }
*::-webkit-scrollbar-thumb:hover { background: var(--ink-3); }

/* panels */
#panel { width: 720px; }
.panel-head { padding: 20px 26px 14px; align-items: flex-start; }
.panel-head h2 { font-size: 28px; line-height: 1.1; }
.panel-head h2 small { display: block; font-family: var(--sans); font-weight: 400; font-size: 13px; color: var(--ink-2); margin-top: 4px; letter-spacing: 0; }
.panel-body { padding: 18px 26px 40px; }
.section { margin: 22px 0 10px; font-size: 11px; }
.tabs button { padding: 9px 14px; font-size: 14px; min-height: 0; }
table { font-size: 14px; }
th { font-size: 11px; padding: 8px 8px; position: sticky; top: -18px; background: var(--paper); z-index: 1; }
td { padding: 10px 8px; }
tr.row td:first-child b { font-size: 15px; }
.meta { font-size: 13px; }
.tag { font-size: 11.5px; padding: 2px 8px; }
.pill { font-size: 10.5px; line-height: 1.6; }
.specimen h4 { font-size: 17px; }
.specimen dl { font-size: 13px; }
.specimen .blurb { font-size: 13px; }
.specimen .body { padding: 12px 14px 14px; gap: 7px; }
.empty { font-size: 16px; padding: 36px 0; }

/* detail card */
#detail { width: 400px; padding: 16px 18px 18px; gap: 12px; }
#detail .name { font-size: 26px; }
#detail .morph { font-size: 14px; }
.stats b { font-size: 15px; }
.stats div { padding: 8px 10px; }
.actions { gap: 8px; }
#detail .actions button { flex: 1 1 45%; }

/* hud */
#hud { height: 60px; }
.cell { font-size: 15px; }
.navbtn { font-size: 15px; }
#hint { font-size: 14px; padding: 10px 18px; }

/* design / hold / visit bars */
#designbar, #holdbar, #visitbar { padding: 10px 14px; font-size: 14px; gap: 10px; }

/* toasts */
.toast { font-size: 14px; padding: 11px 14px; }

/* phone */
.phone-body { font-size: 14px; }
.phone h3 { font-size: 22px; }
.post .caption { font-size: 14px; }


/* dialog */
.dialog label { margin-top: 4px; }
.dlg-body { font-size: 15px; }
.eggs { gap: 14px; }
.egg { height: 170px; }
.egg.open .n { font-size: 13px; }

/* tip bar lives at the bottom, out of the way of panel headers */
#hint { top: auto; bottom: 18px; max-width: 720px; z-index: 17; }
body.bar #hint { display: none !important; }

/* collection thumbnails */
.thumbcell { width: 92px; padding-right: 2px; }
.thumbcell canvas { width: 88px; height: 51px; display: block; border: 1px solid var(--rule); background: linear-gradient(#f5f1e9, #e8e1d3); border-radius: 3px; }
:root[data-theme="dark"] .thumbcell canvas { background: linear-gradient(#2a2722, #1a1815); }

.csel-btn, .csel-opt { text-transform: none; letter-spacing: 0; font-family: var(--sans); }

/* sex badges: bold and unmissable */
.sex { display: inline-block; font-weight: 800; font-size: 0.95em; line-height: 1.35; min-width: 1.5em; text-align: center; padding: 0 5px; border-radius: 10px; margin-left: 3px; vertical-align: 1px; }
.sex.M { color: #fff; background: #2f6f9f; } .sex.F { color: #fff; background: #b5457a; }
.egg.open .n .sex, .specimen h4 .sex, #detail .name .sex { font-size: 0.8em; }

.tpick { flex-direction: row; align-items: center; }
.tpick input[type=checkbox] { flex: none; }

/* header settings menu + name clamp */
#hud { grid-template-columns: auto auto 1fr; }
.hud-right { min-width: 0; }
.who { max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.menu-wrap { position: relative; }
#settingsBtn { display: inline-flex; align-items: center; gap: 6px; }
#settingsBtn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.menu { position: absolute; right: 0; top: calc(100% + 6px); min-width: 210px; background: var(--paper); background-image: var(--grain); border: 1px solid var(--ink); box-shadow: var(--shadow-4); z-index: 40; padding: 6px; display: flex; flex-direction: column; gap: 2px; }
.menu-item { border: 0; border-radius: 3px; text-align: left; background: transparent; color: var(--ink); padding: 8px 10px; min-height: 0; }
.menu-item:hover { background: var(--ink); color: var(--paper); }
.menu-sep { height: 1px; background: var(--rule); margin: 4px 0; }
@media (max-width: 1280px) { #settingsBtn span, .who { display: none; } .ledger .cell { padding: 0 10px; } }

/* egg cards: labeled keep/list toggles */
.egg { height: auto; min-height: 170px; }
.egg.open { justify-content: flex-start; }
.eggacts { display: flex; gap: 4px; margin-top: 6px; flex-wrap: wrap; justify-content: center; }
.chip.tiny.share { border-color: var(--sky); color: var(--sky); } .chip.tiny.share:hover { background: var(--sky); color: #fff; }
.app-bar .chip.tiny { margin-right: 6px; }
.chip.tiny.on[data-act="keep"] { background: var(--moss); border-color: var(--moss); color: #fff; }
.chip.tiny.on[data-act="list"] { background: var(--sky); border-color: var(--sky); color: #fff; }
.chip.tiny.on[data-act="sell"] { background: var(--brick); border-color: var(--brick); color: #fff; }
.chip.tiny:disabled { cursor: default; }
.hatch-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.hatch-bulk { display: flex; flex-direction: column; align-items: stretch; gap: 10px; padding: 12px 14px; margin: 4px 0 8px; background: var(--paper-2); border: 1px dashed var(--rule-2); }
.bulk-title { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.bulk-title b { font-family: var(--serif); font-size: 19px; font-weight: 600; }
.bulk-btns { display: flex; gap: 8px; flex-wrap: wrap; }
.bulk-btns button:disabled { opacity: .4; cursor: default; }
.hatch-price { display: inline-flex; align-items: center; gap: 6px; padding-top: 10px; border-top: 1px solid var(--rule); }
.hatch-price input { width: 64px; padding: 3px 6px; font-family: var(--mono); }
.hatch-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; position: sticky; bottom: -26px; margin: 0 -30px -26px; padding: 12px 30px 16px; background: var(--paper); background-image: var(--grain); border-top: 1px solid var(--ink); }
.hatch-foot .meta { font-size: 13px; line-height: 1.4; } .hatch-foot .meta b { color: var(--ink); font-family: var(--mono); }
.hatch-foot .actions { margin: 0; flex: none; }
.egg.open .stamp { position: absolute; top: 8px; right: 8px; font-family: var(--mono); font-size: 10px; letter-spacing: .14em; text-transform: uppercase; padding: 2px 6px; border: 1.5px solid currentColor; transform: rotate(-8deg); background: rgba(255, 255, 255, .7); }
:root[data-theme="dark"] .egg.open .stamp { background: rgba(0, 0, 0, .4); }
.stamp.kept { color: var(--moss); } .stamp.listed { color: var(--sky); } .stamp.sold { color: var(--brick); }
.egg.open.decided canvas { opacity: .55; }
body.mobile .hatch-foot { margin: 0 -18px calc(-20px - env(safe-area-inset-bottom)); padding: 10px 18px calc(12px + env(safe-area-inset-bottom)); bottom: calc(-20px - env(safe-area-inset-bottom)); flex-direction: column; align-items: stretch; }
body.mobile .hatch-foot .actions { display: flex; } body.mobile .hatch-foot .actions button { flex: 1; }
body.mobile .hatch-price { margin-left: 0; }
.chip.tiny { padding: 2px 9px; font-size: 11px; min-height: 0; }
.chip.tiny.on[data-keep] { background: var(--moss); border-color: var(--moss); color: #fff; }
.chip.tiny.on[data-list] { background: var(--sky); border-color: var(--sky); color: #fff; }
.chip.tiny:disabled { opacity: .7; }

/* toasts live bottom-right, out of the way of the panel; slide left when the phone is open */
#toasts { left: auto; right: 12px; bottom: 14px; width: 320px; }
body.phone-open #toasts { right: 362px; }
body.detail-open #toasts { right: 424px; }
.toast { cursor: pointer; }

tr.row.gone td { opacity: .45; }
tr.row.gone .stamp { display: inline-block; position: static; font-family: var(--mono); font-size: 10px; letter-spacing: .12em; text-transform: uppercase; padding: 1px 6px; border: 1.5px solid currentColor; transform: rotate(-6deg); margin-right: 4px; opacity: 1; }
.roomname { display: flex; gap: 10px; align-items: flex-end; margin-bottom: 10px; flex-wrap: wrap; }
.roomname .meta { align-self: center; }
#dbAgain { border-color: var(--moss); color: var(--moss); }

/* ---- proving popup on the cutting screen ---- */
.proof-pop { position: absolute; left: 50%; top: 42%; transform: translate(-50%, -50%) scale(.85) rotate(-3deg); opacity: 0; width: min(440px, 88%); background: var(--paper); background-image: var(--grain); border: 1px solid var(--ink); box-shadow: var(--shadow-6); padding: 18px 22px 16px; z-index: 5; transition: transform .35s cubic-bezier(.2, .9, .3, 1.25), opacity .25s; }
.proof-pop.in { transform: translate(-50%, -50%) scale(1) rotate(-1.5deg); opacity: 1; }
.proof-pop .stamp-big { display: inline-block; font-family: var(--mono); font-size: 15px; letter-spacing: .18em; text-transform: uppercase; padding: 4px 12px; border: 2.5px solid var(--moss); color: var(--moss); transform: rotate(-4deg); margin-bottom: 10px; }
.proof-pop.cleared .stamp-big, .proof-pop.unlikely .stamp-big { border-color: var(--brick); color: var(--brick); }
.proof-pop.mutation .stamp-big, .proof-pop.paradox .stamp-big { border-color: var(--amber); color: var(--amber); }
.proof-pop ul { margin: 0 0 12px; padding-left: 18px; font-size: 14px; line-height: 1.45; }
.proof-pop li.proven { color: var(--moss); font-weight: 500; } .proof-pop li.cleared { color: var(--brick); } .proof-pop li.mutation, .proof-pop li.paradox { color: var(--amber); font-weight: 500; }
#modalBox { position: relative; }
body.mobile .proof-pop { position: fixed; top: 40%; width: 90vw; }

/* ---- breeding board ---- */
.pair-board { display: grid; grid-template-columns: 1fr auto 1fr; gap: 14px; align-items: stretch; }
.pair-board .cross { align-self: center; }
.pcard { border: 1px solid var(--rule); padding: 10px; display: flex; flex-direction: column; gap: 5px; background: var(--paper-2); min-width: 0; }
.pcard canvas { width: 100%; aspect-ratio: 52 / 30; display: block; border: 1px solid var(--rule); background: linear-gradient(#f5f1e9, #e8e1d3); cursor: pointer; }
:root[data-theme="dark"] .pcard canvas, :root[data-theme="dark"] .pick-item canvas, :root[data-theme="dark"] .pairing canvas { background: linear-gradient(#2a2722, #1a1815); }
.pcard .nm { font-family: var(--serif); font-size: 19px; font-weight: 600; line-height: 1.15; }
.pcard.empty { align-items: center; justify-content: center; text-align: center; border-style: dashed; min-height: 240px; cursor: pointer; gap: 8px; }
.pcard.empty:hover { border-color: var(--ink); }
.pc-actions { display: flex; gap: 6px; margin-top: auto; padding-top: 6px; flex-wrap: wrap; }
.ev { display: flex; gap: 24px; margin: 12px 0 8px; flex-wrap: wrap; }
.ev > div { display: flex; flex-direction: column; } .ev b { font-family: var(--mono); font-size: 22px; font-weight: 500; line-height: 1.1; margin: 2px 0; }
.oddstrip { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 12px; }
.oddchip { position: relative; overflow: hidden; border: 1px solid var(--rule-2); padding: 5px 9px 7px; font-size: 12px; display: flex; flex-direction: column; gap: 1px; min-width: 120px; max-width: 200px; }
.oddchip b { font-family: var(--mono); font-size: 14px; } .oddchip span { line-height: 1.25; }
.oddchip i { position: absolute; left: 0; bottom: 0; height: 3px; background: var(--moss); }
.pairing { display: grid; grid-template-columns: 96px 96px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--rule); }
.pairing canvas { width: 96px; height: 55px; border: 1px solid var(--rule); background: linear-gradient(#f5f1e9, #e8e1d3); cursor: pointer; }
.pairing-blank { width: 96px; height: 55px; border: 1px dashed var(--rule-2); display: flex; align-items: center; justify-content: center; color: var(--ink-3); }
.steps { display: flex; gap: 4px; align-items: center; font-size: 11.5px; margin: 5px 0 3px; flex-wrap: wrap; }
.steps i { color: var(--ink-3); font-style: normal; }
.step { padding: 2px 9px; border: 1px solid var(--rule-2); border-radius: 12px; color: var(--ink-3); white-space: nowrap; }
.step.on { background: var(--moss); border-color: var(--moss); color: #fff; } .step.done { border-color: var(--moss); color: var(--moss); }
.coming { display: grid; grid-template-columns: minmax(120px, 1fr) 2fr 2fr auto; gap: 14px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--rule); cursor: pointer; font-size: 13px; }
.coming .prog { display: flex; align-items: center; gap: 8px; font-size: 12px; } .coming .prog .bar { flex: 1; margin: 0; } .coming .prog .num { min-width: 52px; text-align: right; }
.coming .why { white-space: nowrap; }
.pick-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; max-height: 62vh; overflow: auto; margin-top: 10px; padding: 2px; }
.pick-item { border: 1px solid var(--rule); padding: 6px; text-align: left; display: flex; flex-direction: column; gap: 3px; min-height: 0; background: var(--paper-2); }
.pick-item:hover { border-color: var(--ink); background: var(--paper-2); color: var(--ink); } .pick-item.on { box-shadow: inset 0 0 0 2px var(--moss); }
.pick-item canvas { width: 100%; aspect-ratio: 52 / 30; display: block; background: linear-gradient(#f5f1e9, #e8e1d3); }
.pick-item .genes { margin-top: 2px; } .evtag { color: var(--moss); font-family: var(--mono); font-weight: 500; }

.menu-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; cursor: default; }
.menu-row:hover { background: transparent; }
.menu-row .seg button { padding: 3px 9px; font-size: 12px; }

.disc { display: flex; flex-direction: column; }
.disc-row { display: flex; flex-direction: column; gap: 1px; padding: 7px 12px; border-bottom: 1px solid var(--rule); font-size: 13px; }
.disc-row > b { font-family: var(--serif); font-size: 15px; color: var(--amber); }
.disc-row span { color: var(--ink-2); font-size: 12.5px; }
.disc-row.unknown > b { color: var(--ink-3); font-family: var(--sans); font-size: 13px; }

/* ---- pause ---- */
#pausedBar { position: fixed; left: 0; right: 0; z-index: 17; display: flex; justify-content: center; align-items: center; gap: 12px; padding: 6px 14px; font-size: 13px; background: var(--sky); color: #fff; box-shadow: 0 2px 6px rgba(0, 0, 0, .25); }
#pausedBar button { border-color: #fff; color: #fff; } #pausedBar button:hover { background: #fff; color: var(--sky); }
#siteBtn.on { background: var(--amber); border-color: var(--amber); color: #fff; }
#pauseBtn.on { background: var(--sky); border-color: var(--sky); color: #fff; }
.rodstat { margin: 10px 0 4px; } .rodstat .bar { margin: 4px 0; } .rodstat .bar i.good { background: var(--moss); } .rodstat .bar i.warn { background: var(--amber); } .rodstat .bar i.bad { background: var(--brick); }
.specimen.trade.past { opacity: .85; } .specimen.trade.past.declined { opacity: .6; }
.specimen.hired { box-shadow: inset 0 0 0 2px var(--moss); }
.bsearch { width: 100%; margin: 4px 0 6px; }

/* ---- cash warning bar ---- */
#cashWarn { position: fixed; left: 0; right: 0; z-index: 17; text-align: center; padding: 7px 14px; font-size: 13px; font-weight: 500; color: #fff; cursor: pointer; box-shadow: 0 2px 6px rgba(0, 0, 0, .25); }
#cashWarn.amber { background: var(--amber); }
#cashWarn.red { background: var(--brick); animation: cashpulse 1.6s ease-in-out infinite; }
@keyframes cashpulse { 0%, 100% { filter: brightness(1); } 50% { filter: brightness(1.18); } }
#cashWarn:hover { filter: brightness(1.1); }

/* ---- loading card ---- */
#loader { position: fixed; left: 50%; top: 50%; transform: translate(-50%, -50%); display: flex; align-items: center; gap: 12px; padding: 14px 20px; background: var(--paper); background-image: var(--grain); border: 1px solid var(--ink); box-shadow: var(--shadow-6); z-index: 46; font-family: var(--serif); font-size: 17px; }
#loader .spin { width: 20px; height: 20px; border: 2.5px solid var(--rule-2); border-top-color: var(--moss); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---- push banner ---- */
#push { position: fixed; top: 68px; left: 50%; transform: translate(-50%, -140%); width: min(420px, 92vw); display: flex; gap: 12px; align-items: center; padding: 10px 12px; background: var(--paper); background-image: var(--grain); border: 1px solid var(--ink); border-radius: 18px; box-shadow: var(--shadow-6); z-index: 40; cursor: pointer; transition: transform .35s cubic-bezier(.2, .9, .3, 1.1), opacity .3s; opacity: 0; }
#push.in { transform: translate(-50%, 0); opacity: 1; }
#push.out { transform: translate(-50%, -140%); opacity: 0; }
#push .push-ico { width: 40px; height: 40px; border-radius: 11px; background: var(--moss); display: flex; align-items: center; justify-content: center; flex: none; }
#push .push-ico svg { width: 24px; height: 24px; stroke: #fff; fill: none; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
#push .push-text { flex: 1; font-size: 13px; line-height: 1.35; min-width: 0; }
#push .push-head { display: flex; justify-content: space-between; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 2px; }
#push canvas { width: 92px; height: 53px; flex: none; border-radius: 8px; border: 1px solid var(--rule); background: linear-gradient(#f5f1e9, #e8e1d3); }
:root[data-theme="dark"] #push canvas { background: linear-gradient(#2a2722, #1a1815); }
#phoneBtn.buzz { animation: buzz .6s ease; }
@keyframes buzz { 0%, 100% { transform: none; } 15% { transform: translateX(-3px) rotate(-3deg); } 30% { transform: translateX(3px) rotate(3deg); } 45% { transform: translateX(-3px) rotate(-2deg); } 60% { transform: translateX(3px) rotate(2deg); } 75% { transform: translateX(-2px); } }

/* ---- sales ledger ---- */
.inq .quote { font-family: var(--serif); font-style: italic; color: var(--ink-2); margin: 6px 0 2px; line-height: 1.4; }
.specimen.wide { grid-column: 1 / -1; }
.fits { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.fit .pay { color: var(--moss); font-family: var(--mono); font-size: 12px; font-weight: 500; }
.orow { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--rule); font-size: 13.5px; }
.srow { display: grid; grid-template-columns: 104px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 8px 6px; border-bottom: 1px solid var(--rule); }
.srow.players { background: rgba(47, 93, 58, .08); border-left: 4px solid var(--moss); }
.srow.wholesale { opacity: .8; }
.srow canvas { width: 104px; height: 60px; border: 1px solid var(--rule); background: linear-gradient(#f5f1e9, #e8e1d3); }
:root[data-theme="dark"] .srow canvas { background: linear-gradient(#2a2722, #1a1815); }
.srow .body { min-width: 0; }
.srow .t { font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.srow .m { font-size: 12.5px; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.srow .sbuyer { text-align: right; white-space: nowrap; }
.srow .sbuyer .num { font-size: 16px; }
.ledger { width: 100%; border-collapse: collapse; }
.ledger th { text-align: left; font: 500 10.5px var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); padding: 6px 8px; border-bottom: 1px solid var(--ink); }
.ledger td { padding: 8px; border-bottom: 1px solid var(--rule); vertical-align: middle; font-size: 13.5px; }
.ledger th.num, .ledger td.num { text-align: right; }
.lrow { display: flex; gap: 10px; align-items: center; }
.lrow canvas { width: 104px; height: 60px; flex: none; border: 1px solid var(--rule); background: linear-gradient(#f5f1e9, #e8e1d3); }
:root[data-theme="dark"] .lrow canvas { background: linear-gradient(#2a2722, #1a1815); }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; margin-bottom: 18px; }
.stat { border-top: 2px solid var(--ink); padding-top: 8px; display: flex; flex-direction: column; gap: 3px; }
.stat b { font-family: var(--mono); font-size: 22px; font-weight: 500; }
.cols3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.cols3 table { width: 100%; border-collapse: collapse; } .cols3 td { padding: 5px 4px; border-bottom: 1px solid var(--rule); font-size: 13px; }

/* ---- front page ---------------------------------------------------------- */
#auth.landing { position: fixed; inset: 0; overflow-y: auto; background: var(--paper); background-image: var(--grain); z-index: 50; color: var(--ink); scrollbar-gutter: stable; }
.land { max-width: 1240px; margin: 0 auto; padding: 22px 48px 64px 56px; position: relative; }
.land::before { content: ''; position: absolute; top: 0; bottom: 0; left: 34px; width: 1px; background: rgba(139, 58, 43, .35); }
.land-top { display: flex; justify-content: space-between; align-items: baseline; gap: 20px; padding-bottom: 12px; border-bottom: 1px solid var(--ink); }
.brandline { display: flex; align-items: center; gap: 14px; min-width: 0; }
.brandline .rule { width: 40px; height: 1px; background: var(--ink); flex: none; }
.land-links { display: flex; gap: 18px; font-size: 13px; flex: none; }
.land-links a, .land-foot a { color: var(--ink-2); text-decoration: none; border-bottom: 1px solid var(--rule-2); }
.land-links a:hover, .land-foot a:hover { color: var(--ink); border-color: var(--ink); }

.hero { display: grid; grid-template-columns: minmax(0, 1fr) 400px; gap: 56px; padding: 40px 0 28px; align-items: start; }
.hero h1 { font-family: var(--serif); font-weight: 400; font-size: clamp(38px, 4.4vw, 62px); line-height: 1.02; letter-spacing: -0.02em; margin: 0 0 18px; font-variation-settings: "opsz" 144; }
.hero h1 em { font-style: italic; color: var(--moss); }
.hero .lede { font-size: 17px; max-width: 60ch; }
.live { display: flex; align-items: baseline; gap: 12px; margin-top: 22px; padding-top: 14px; border-top: 1px solid var(--rule); font-family: var(--mono); font-size: 12.5px; color: var(--ink-2); line-height: 1.5; }
.live .lbl { flex: none; }
.live .lbl::before { content: ''; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--moss); margin-right: 7px; vertical-align: 1px; animation: pulse 2.4s infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .3; } }
.fresh { margin-top: 14px; }
.fresh .fresh-row { display: flex; gap: 14px; margin-top: 6px; }
.fresh figure { margin: 0; width: 150px; }
.fresh canvas, .parent canvas, .degg.open canvas { width: 100%; aspect-ratio: 52 / 30; display: block; background: linear-gradient(#f5f1e9, #e8e1d3); border: 1px solid var(--rule); }
:root[data-theme="dark"] .fresh canvas, :root[data-theme="dark"] .parent canvas, :root[data-theme="dark"] .degg.open canvas { background: linear-gradient(#2a2722, #1a1815); }
.fresh figcaption { font-size: 12.5px; line-height: 1.3; margin-top: 5px; }
.fresh figcaption .meta { display: block; }

.demo { margin-top: 30px; padding-top: 18px; border-top: 1px solid var(--ink); }
.demo-head { display: flex; gap: 14px; align-items: baseline; margin-bottom: 12px; }
.parents { display: grid; grid-template-columns: 1fr auto 1fr; gap: 18px; align-items: center; }
.parent { margin: 0; }
.parent figcaption { margin-top: 7px; font-size: 14px; line-height: 1.3; }
.parent .pval { font-family: var(--mono); font-size: 11.5px; margin-top: 2px; }
.parent .chip { margin-top: 8px; }
.cross { font-family: var(--serif); font-size: 36px; color: var(--ink-3); font-style: italic; }
.dodds { margin: 14px 0 10px; font-size: 13.5px; color: var(--ink-2); line-height: 1.6; }
.dodds b { font-family: var(--mono); color: var(--ink); font-weight: 500; }
.demo-act { display: flex; align-items: center; gap: 12px; }
.clutch { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 14px; }
.clutch .dcount { width: 100%; font-family: var(--mono); font-size: 12.5px; color: var(--ink-2); margin-bottom: 2px; }
.degg { width: 132px; min-height: 118px; background: linear-gradient(#cdbfa3, #b8a889); border: 1px solid #9c8f74; display: flex; align-items: center; justify-content: center; flex-direction: column; position: relative; overflow: hidden; animation: drop .4s cubic-bezier(.2, .9, .3, 1.2) both; }
@keyframes drop { from { transform: translateY(-10px); opacity: 0; } to { transform: none; opacity: 1; } }
.degg .shell { width: 54px; height: 68px; border-radius: 50% 50% 50% 50% / 58% 58% 42% 42%; background: radial-gradient(circle at 35% 30%, #fffdf6, #e9e2cf 70%, #d6cdb5); box-shadow: inset -5px -7px 12px rgba(120, 100, 70, .25), 0 5px 8px rgba(0, 0, 0, .2); animation: wobble 1.6s ease-in-out infinite; }
@keyframes wobble { 0%, 100% { transform: rotate(-4deg); } 50% { transform: rotate(4deg); } }
.degg.slug .shell { transform: scale(.75); background: radial-gradient(circle at 35% 30%, #f3e6b3, #d9c26a 70%, #b59a3e); animation: none; opacity: .85; }
.degg.open { background: #fff; padding: 5px; gap: 3px; justify-content: flex-start; }
:root[data-theme="dark"] .degg.open { background: #15130f; }
.degg .n { font-size: 11px; font-weight: 500; text-align: center; line-height: 1.2; }
.degg .v { font-family: var(--mono); font-size: 11px; color: var(--ink-2); }
.degg.jackpot { box-shadow: inset 0 0 0 3px var(--amber); }

.landing .auth-card { position: sticky; top: 24px; width: auto; padding: 26px 30px 22px; box-shadow: none; border: 1px solid var(--ink); border-top: 6px solid var(--moss); background: var(--paper-2); }
.landing .auth-card h3 { font-size: 24px; font-weight: 500; }
.landing .auth-card > .meta { margin: -6px 0 2px; line-height: 1.45; }

.season { margin-top: 44px; padding-top: 22px; border-top: 1px solid var(--ink); }
.season-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.season h2 { font-size: 32px; font-weight: 400; }
.panels { display: grid; grid-template-columns: repeat(4, 1fr); gap: 30px; }
.panel { cursor: pointer; opacity: .5; transition: opacity .5s; }
.panel.on { opacity: 1; }
.panel svg { width: 100%; aspect-ratio: 240 / 170; display: block; color: var(--ink); overflow: visible; }
.panel svg :is(path, rect, ellipse, circle, line, polyline) { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1; stroke-dashoffset: 1; }
.panel.on svg :is(path, rect, ellipse, circle, line, polyline) { animation: ink 1s cubic-bezier(.4, 0, .2, 1) forwards; animation-delay: calc(var(--i, 0) * .14s); }
@keyframes ink { to { stroke-dashoffset: 0; } }
.panel svg text { opacity: 0; font: 500 11px var(--mono); fill: currentColor; }
.panel.on svg text { animation: fadein .5s forwards; animation-delay: calc(var(--i, 0) * .14s + .9s); }
@keyframes fadein { to { opacity: 1; } }
.panel .pull { transform: translateX(0); }
.panel.on .pull { animation: pull 1s 1.4s cubic-bezier(.3, .7, .3, 1) forwards; }
@keyframes pull { to { transform: translateX(44px); } }
.panel .tag { opacity: 0; }
.panel.on .tag { animation: fadein .5s forwards; animation-delay: calc(var(--i, 0) * .5s + 1.8s); }
.panel .cap { margin-top: 10px; font-size: 13.5px; line-height: 1.45; color: var(--ink-2); }
.panel .cap b { font-family: var(--serif); font-size: 17px; font-weight: 500; color: var(--ink); display: block; margin-bottom: 3px; }
.panel .num { font-family: var(--serif); font-style: italic; font-size: 14px; color: var(--ink-3); margin-right: 6px; float: left; line-height: 1.55; }
.panel.now .cap b { text-decoration: underline; text-decoration-color: var(--moss); text-underline-offset: 4px; }

.land-foot { margin-top: 48px; padding-top: 18px; border-top: 1px solid var(--rule); display: grid; grid-template-columns: 1.4fr 1fr; gap: 40px; font-size: 14px; line-height: 1.55; color: var(--ink-2); }
.land-foot p { margin: 0; }

@media (max-width: 1040px) {
  .hero { grid-template-columns: 1fr; gap: 32px; }
  .landing .auth-card { position: static; }
  .panels { grid-template-columns: 1fr 1fr; }
  .land { padding: 18px 22px 40px; }
  .land::before { display: none; }
  .land-foot { grid-template-columns: 1fr; }
  .land-top { flex-direction: column; align-items: flex-start; gap: 8px; }
}
@media (prefers-reduced-motion: reduce) {
  .panel svg :is(path, rect, ellipse, circle, line, polyline) { stroke-dashoffset: 0; animation: none !important; }
  .panel svg text, .panel .tag { opacity: 1; animation: none !important; }
  .degg .shell, .live .lbl::before { animation: none; }
}

#postCaption { width: 100%; }

/* ---- title screen (over the live showroom) ---- */
#auth.landing { background: transparent; }
#auth.landing.nogl { background: var(--paper); background-image: var(--grain); }
.title-screen { min-height: 100vh; display: flex; flex-direction: column; padding: 22px 48px 20px; color: #f3eee4; --ink: #f3eee4; --ink-2: #d8d0c0; --ink-3: #a89f8f; --rule: rgba(243, 238, 228, .22); --rule-2: rgba(243, 238, 228, .4); background: linear-gradient(to bottom, rgba(20, 18, 15, .62), rgba(20, 18, 15, .18) 45%, rgba(20, 18, 15, .78)); text-shadow: 0 1px 2px rgba(0, 0, 0, .35); }
.nogl .title-screen { background: linear-gradient(to bottom, #2b2723, #1c1a16); }
.ts-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; }
.ts-logo { display: flex; flex-direction: column; gap: 6px; }
.ts-brand { font-family: var(--serif); font-size: clamp(54px, 7.2vw, 104px); line-height: .92; letter-spacing: -.035em; font-weight: 600; font-variation-settings: "opsz" 144; }
.ts-brand i { font-style: italic; font-weight: 400; color: #8fc79c; }
.ts-sub { font-family: var(--mono); font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); }
.title-screen .land-links a { color: var(--ink-2); border-color: var(--rule-2); text-shadow: none; }
.title-screen .land-links a:hover { color: #fff; border-color: #fff; }
.ts-mid { flex: 1; display: grid; grid-template-columns: minmax(0, 1fr) 400px; gap: 48px; align-items: center; padding: 30px 0 20px; }
.ts-tag { display: inline-block; font-family: var(--mono); font-size: 12px; letter-spacing: .14em; text-transform: uppercase; padding: 5px 10px; border: 1px solid var(--rule-2); border-radius: 3px; margin-bottom: 14px; background: rgba(20, 18, 15, .35); }
.ts-h1 { font-family: var(--serif); font-weight: 400; font-style: italic; font-size: clamp(24px, 2.5vw, 34px); line-height: 1.2; max-width: 24ch; margin: 0 0 22px; }
.ts-board { max-width: 440px; padding: 12px 16px 6px; background: rgba(20, 18, 15, .45); border: 1px solid var(--rule); border-radius: 4px; backdrop-filter: blur(6px); text-shadow: none; }
.ts-board .lbl { margin-bottom: 6px; display: block; }
.ts-row { display: grid; grid-template-columns: 22px 1fr auto; gap: 4px 12px; align-items: baseline; padding: 7px 0; border-top: 1px solid var(--rule); font-size: 14px; }
.ts-row .rank { font-family: var(--mono); color: var(--ink-3); }
.ts-row .who { font-weight: 500; }
.ts-row .num { font-family: var(--mono); }
.ts-row .meta { grid-column: 2 / -1; font-size: 12px; }
.title-screen .fresh { margin-top: 18px; }
.title-screen .fresh figcaption { text-shadow: none; }
.title-screen .auth-card { position: static; background: #f3eee4; --paper: #f3eee4; --paper-2: #e9e2d4; --paper-3: #ddd4c2; --ink: #1e1a15; --ink-2: #5d564c; --ink-3: #8d8578; --rule: #cfc6b3; --rule-2: #b9ae98; color: var(--ink); text-shadow: none; border-color: #1e1a15; box-shadow: var(--shadow-6); }
.title-screen .auth-card input { background: #fff; color: #1e1a15; border-color: #b9ae98; }
.title-screen .auth-card .oauth-btns a { background: #fff; color: #1e1a15; }
.title-screen .auth-card .auth-tabs button { color: #8d8578; } .title-screen .auth-card .auth-tabs button.on { color: #1e1a15; box-shadow: inset 0 -2px 0 #1e1a15; }
.title-screen .auth-card button { color: #1e1a15; border-color: #1e1a15; } .title-screen .auth-card button.primary { color: #fff; }
.ts-bottom { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding-top: 14px; border-top: 1px solid var(--rule); }
.title-screen .live { margin: 0; padding: 0; border: 0; }
.scroll-hint { color: var(--ink); text-decoration: none; font-family: var(--serif); font-style: italic; font-size: 16px; white-space: nowrap; animation: nudge 2.2s ease-in-out infinite; }
@keyframes nudge { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(4px); } }
.land.below { background: var(--paper); background-image: var(--grain); max-width: none; padding: 40px max(48px, calc((100vw - 1240px) / 2 + 48px)) 64px; position: relative; }
.land.below::before { display: none; }
.land.below .demo { margin-top: 0; padding-top: 0; border-top: 0; }
.demo-head h2 { font-size: 32px; font-weight: 400; }
.demo-head { align-items: baseline; flex-wrap: wrap; }
button.big { font-size: 15px; padding: 10px 22px; }
@media (max-width: 1040px) {
  .title-screen { padding: 18px 22px; }
  .ts-mid { grid-template-columns: 1fr; gap: 28px; }
  .ts-bottom { flex-direction: column; align-items: flex-start; }
  .land.below { padding: 30px 22px 40px; }
}

#designbar { flex-wrap: nowrap; }
#designbar button { white-space: nowrap; }
.db-hint { max-width: 360px; white-space: normal; line-height: 1.3; }

.ig-tabs { bottom: 0; margin-top: auto; box-shadow: 0 -1px 0 var(--rule); }
.phone-body.home { padding-bottom: 8px; }

.ig-person { cursor: pointer; }
.ig-av { width: 32px; min-width: 32px; height: 32px; flex: 0 0 32px; }
.ig-av.sm { width: 24px; min-width: 24px; height: 24px; flex-basis: 24px; }
.ig-av.lg { width: 76px; min-width: 76px; height: 76px; flex-basis: 76px; }
.ig-person .tag { flex: none; }

.pair-cta { width: 100%; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 14px 18px; margin: 12px 0 4px; font-size: 17px; box-shadow: 0 3px 0 rgba(0, 0, 0, .22); }
.pair-cta b { font-size: 18px; } .pair-cta span { font-size: 12.5px; font-weight: 400; opacity: .85; }
.pair-cta.blocked { border: 1px dashed var(--amber); color: var(--ink-2); background: rgba(184, 115, 31, .08); box-shadow: none; }
.pair-cta.blocked b { color: var(--amber); }

/* ---- discoveries app ---- */
.disc-hero { display: flex; gap: 14px; align-items: center; padding: 12px 2px 10px; border-bottom: 1px solid var(--rule); margin-bottom: 4px; }
.disc-hero > b { font-family: var(--serif); font-size: 44px; line-height: 1; font-weight: 600; color: var(--amber); } .disc-hero small { font-size: 18px; color: var(--ink-3); }
.disc-card { padding: 10px 4px; border-bottom: 1px solid var(--rule); display: flex; flex-direction: column; gap: 4px; }
.disc-card.mine { background: rgba(184, 115, 31, .08); border-left: 4px solid var(--amber); padding-left: 10px; }
.disc-gene { font-family: var(--serif); font-size: 20px; font-weight: 600; color: var(--amber); }
.disc-who { display: flex; justify-content: space-between; align-items: center; font-size: 13px; } .disc-who .author { display: flex; align-items: center; gap: 8px; cursor: pointer; }
.disc-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; padding: 4px 0; }
.disc-lock { aspect-ratio: 1; border: 1px dashed var(--rule-2); border-radius: 10px; display: flex; flex-direction: column; align-items: center; justify-content: center; color: var(--ink-3); }
.disc-lock span { font-family: var(--serif); font-size: 26px; } .disc-lock small { font-size: 9px; letter-spacing: .08em; text-transform: uppercase; }

/* ---- gene book ---- */
.gene-row { display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 10px; align-items: center; padding: 7px 2px; border-bottom: 1px solid var(--rule); }
.gene-row.own { background: rgba(47, 93, 58, .07); }
.gene-row canvas { width: 92px; height: 53px; border-radius: 6px; border: 1px solid var(--rule); background: linear-gradient(#f5f1e9, #e8e1d3); }
:root[data-theme="dark"] .gene-row canvas { background: linear-gradient(#2a2722, #1a1815); }
.gene-name { font-weight: 500; font-size: 14px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.gene-lock { width: 92px; height: 53px; border: 1px dashed var(--rule-2); border-radius: 6px; display: flex; align-items: center; justify-content: center; font-family: var(--serif); font-size: 24px; color: var(--ink-3); }
.gene-row.locked .gene-name { color: var(--ink-3); }
.disc-by b { color: var(--amber); }
.tag.codom { border-color: var(--amber); color: var(--amber); } .tag.dom { border-color: var(--sky); color: var(--sky); } .tag.rec { border-color: #8b5fbf; color: #8b5fbf; }

/* design bar: the hint keeps a readable width even with the "Another …" button showing */
#designbar { max-width: min(96vw, 1100px); }
.db-hint { flex: 1 1 220px; min-width: 200px; max-width: 420px; }

/* ---- online indicator ---- */
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--ink-3); vertical-align: middle; }
.dot.on { background: #3ba55d; box-shadow: 0 0 0 2px rgba(59, 165, 93, .22); }
.online-cell { position: relative; padding: 0 12px; }
.online-chip { display: inline-flex; align-items: center; gap: 7px; background: none; border: 0; padding: 4px 6px; font: inherit; font-size: 13px; color: var(--ink-2); cursor: pointer; border-radius: 3px; }
.online-chip:hover { background: rgba(0, 0, 0, .05); color: var(--ink); }
.online-pop { position: absolute; top: calc(100% - 4px); left: 8px; min-width: 220px; background: var(--paper); background-image: var(--grain); border: 1px solid var(--ink); box-shadow: var(--shadow-4); padding: 8px 10px 10px; z-index: 30; font-size: 13px; }
.online-pop .orow { display: flex; align-items: center; gap: 8px; padding: 5px 0; border-bottom: 1px solid var(--rule); cursor: pointer; }
.online-pop .orow b { font-weight: 500; }
.online-pop .orow .meta { margin-left: auto; }
.brow.online .author::after { content: ''; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #3ba55d; margin-left: 6px; vertical-align: middle; box-shadow: 0 0 0 2px rgba(59, 165, 93, .22); }
.brow .dot.on { display: none; }
.ig-pbio .dot.on, .prof-head .dot.on { margin-left: 2px; }
@media (max-width: 1100px) { .online-cell { display: none; } }

/* ---- captcha ---- */
.captcha { display: grid; grid-template-columns: auto 1fr; gap: 6px 12px; align-items: end; padding: 10px 0 2px; }
.captcha .cap-img { grid-row: 1 / 3; border: 1px solid var(--ink); background: #f4efe6; line-height: 0; }
.captcha .cap-img svg { display: block; width: 220px; height: 68px; }
.captcha label { margin: 0; }
.captcha input { text-transform: uppercase; letter-spacing: 0.25em; font-family: var(--mono); }
.captcha button { justify-self: start; }
@media (max-width: 520px) { .captcha { grid-template-columns: 1fr; } .captcha .cap-img { grid-row: auto; } .captcha .cap-img svg { width: 100%; height: auto; } }
.captcha { grid-template-columns: auto minmax(0, 1fr); }
.captcha input { width: 100%; min-width: 0; box-sizing: border-box; }

/* ================= left navigation rail: a game toolbar ================= */
#rail { position: fixed; top: 56px; left: 0; bottom: 0; width: 88px; display: flex; flex-direction: column; align-items: stretch; background: var(--paper); background-image: var(--grain); border-right: 1px solid var(--ink); z-index: 19; padding: 8px 0 8px; box-shadow: var(--shadow-3); overflow: visible; }
#rail .rail-card { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 4px 6px 10px; margin-bottom: 4px; border-bottom: 1px solid var(--rule); cursor: pointer; }
#rail .rc-av { width: 34px; height: 34px; border-radius: 50%; background: var(--ink); color: var(--paper); font-family: var(--serif); font-size: 18px; display: grid; place-items: center; box-shadow: 0 2px 0 var(--paper-3), 0 0 0 2px var(--paper), 0 0 0 3px var(--rule-2); }
#rail .rc-name { font-size: 10.5px; color: var(--ink-2); max-width: 76px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#rail .rail-card:hover .rc-av { transform: translateY(-1px); }
#rail .tile { position: relative; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 6px 4px 5px; margin: 2px 8px; border: 0; border-radius: 10px; background: transparent; color: var(--ink-2); min-height: 0; font-size: 10.5px; font-weight: 500; letter-spacing: .02em; line-height: 1; transition: transform .12s ease, background .12s ease; }
#rail .tile .tico { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--tc); color: #fff; box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .22), 0 1px 0 rgba(0, 0, 0, .15); transition: transform .12s ease, box-shadow .12s ease; }
#rail .tile .tico svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
#rail .tile .tlabel { display: inline; }
#rail .tile kbd { position: absolute; top: 2px; right: 6px; font-family: var(--mono); font-size: 9px; color: var(--ink-3); background: var(--paper-2); border: 1px solid var(--rule); border-radius: 3px; padding: 0 3px; line-height: 1.3; opacity: 0; transition: opacity .12s; }
#rail .tile:hover kbd, #rail:hover .tile kbd { opacity: .9; }
#rail .tile:hover { background: var(--paper-2); color: var(--ink); transform: translateX(2px); }
#rail .tile:hover .tico { transform: translateY(-2px) scale(1.06); box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .22), 0 5px 10px rgba(0, 0, 0, .22); }
#rail .tile.pressed .tico, #rail .tile:active .tico { transform: translateY(1px) scale(.96); box-shadow: inset 0 -1px 0 rgba(0, 0, 0, .22); }
#rail .tile.active, #rail .tile.on { color: var(--ink); background: var(--paper-2); box-shadow: inset 0 0 0 1px var(--rule-2); }
#rail .tile.active::after { content: ''; position: absolute; right: -9px; top: 50%; width: 12px; height: 12px; background: var(--paper-2); border: 1px solid var(--rule-2); border-left: 0; border-bottom: 0; transform: translateY(-50%) rotate(45deg); }
#rail .tile.active .tico, #rail .tile.on .tico { box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .22), 0 0 0 3px var(--paper), 0 0 0 4.5px var(--tc); }
#rail .tile .badge { top: 0; right: 4px; animation: badgepop .5s ease; }
#rail .badge.soft { background: var(--moss); font-size: 9px; letter-spacing: .06em; text-transform: uppercase; }
@keyframes badgepop { 0% { transform: scale(.4); } 60% { transform: scale(1.25); } 100% { transform: scale(1); } }
#rail .rail-gap { flex: 1; }
#rail .tile.pulse .tico { animation: railpulse 1.3s ease-in-out infinite; }
@keyframes railpulse { 0%, 100% { box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .22), 0 0 0 0 rgba(47, 93, 58, .0); } 50% { box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .22), 0 0 0 7px rgba(47, 93, 58, .35); } }
#rail .tile::before { content: attr(aria-label); position: absolute; left: calc(100% + 10px); top: 50%; transform: translateY(-50%) translateX(-4px); background: var(--ink); color: var(--paper); padding: 5px 9px; font-size: 12px; border-radius: 4px; white-space: nowrap; opacity: 0; pointer-events: none; transition: opacity .12s, transform .12s; z-index: 5; }
#rail .tile:hover::before { opacity: 1; transform: translateY(-50%) translateX(0); }
#rail .tile.active:hover::before { opacity: 0; }
#hud { grid-template-columns: 1fr auto; }
#hud .hud-nav { display: none; }
#panel { left: 88px; }
#designbar, #holdbar, #visitbar { left: calc(50% + 44px); }
#cashWarn { left: 88px; }
@media (max-height: 720px) { #rail .tile { padding: 4px 4px 4px; margin: 1px 8px; } #rail .tile .tico { width: 34px; height: 34px; border-radius: 10px; } #rail .tile .tico svg { width: 19px; height: 19px; } #rail .rail-card { padding-bottom: 6px; } #rail .rc-av { width: 28px; height: 28px; font-size: 15px; } }
@media (max-height: 600px) { #rail .tile .tlabel { display: none; } #rail .rc-name { display: none; } }

/* ================= market: browse grid ================= */
.mk-bar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 8px; }
.mk-bar .mk-q { flex: 1 1 200px; min-width: 160px; }
.mk-bar select { min-height: 32px; }
.mk-genes { display: flex; flex-wrap: wrap; gap: 5px; margin: 2px 0 8px; }
.mk-count { margin: 0 0 8px; }
.mk-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.mk-card { background: #fff; border: 1px solid var(--rule-2); display: flex; flex-direction: column; box-shadow: 1px 1px 0 var(--paper-3); min-width: 0; transition: transform .12s ease, box-shadow .12s ease; }
.mk-card:hover { transform: translateY(-1px); box-shadow: 2px 3px 0 var(--paper-3); }
:root[data-theme="dark"] .mk-card { background: var(--paper-2); box-shadow: 1px 1px 0 #0e0d0b; }
.mk-img { position: relative; }
.mk-img canvas { width: 100%; aspect-ratio: 52 / 30; display: block; background: linear-gradient(#f5f1e9, #e8e1d3); border-bottom: 1px solid var(--rule); }
:root[data-theme="dark"] .mk-img canvas { background: linear-gradient(#2a2722, #1a1815); }
.mk-tag { position: absolute; top: 6px; left: 6px; font-size: 9.5px; letter-spacing: .08em; text-transform: uppercase; padding: 2px 6px; background: var(--ink); color: var(--paper); }
.mk-tag.deal { background: var(--moss); } .mk-tag.high { background: var(--amber); color: var(--ink); } .mk-tag.new { left: auto; right: 6px; background: var(--sky); color: #fff; }
.mk-body { padding: 8px 9px 9px; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.mk-title { font-weight: 500; font-size: 13.5px; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mk-morph { font-size: 11.5px; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mk-meta { font-size: 11px; color: var(--ink-3); }
.mk-foot { display: flex; justify-content: space-between; align-items: baseline; gap: 6px; margin-top: 3px; }
.mk-price { font-family: var(--mono); font-size: 15px; font-weight: 500; }
.mk-seller { font-size: 11px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mk-actions { display: flex; gap: 6px; margin-top: 4px; }
.mk-actions button { flex: 1; min-height: 26px; padding: 2px 6px; font-size: 12px; }
.mk-bar.m { margin: 6px 0 10px; } .mk-bar.m input { flex: 1 1 120px; min-width: 0; }

/* ================= shop restock ================= */
.restock { border: 1px solid var(--rule-2); background: var(--paper-2); padding: 10px 12px 10px; margin-bottom: 12px; }
.restock .rs-top { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 7px; flex-wrap: wrap; }
.restock .rs-top b { font-family: var(--serif); font-size: 16px; }
.restock .rs-bar { height: 6px; background: var(--rule); position: relative; overflow: hidden; }
.restock .rs-bar i { display: block; height: 100%; background: var(--moss); transition: width .4s ease; }
.restock.fresh { border-color: var(--moss); }
.restock.fresh .rs-top b { color: var(--moss); }
.specimen.fresh { position: relative; }
.lotbadge.new { background: var(--sky); }

/* ================= welcome tour ================= */
.tour { display: grid; grid-template-columns: 300px 1fr; gap: 0 26px; align-items: center; }
.tour-pic canvas { width: 100%; height: auto; display: block; background: linear-gradient(#f5f1e9, #e8e1d3); border: 1px solid var(--rule-2); }
.tour-body h2 { font-size: 30px; margin: 4px 0 8px; }
.tour-body p { font-size: 15px; line-height: 1.5; color: var(--ink-2); }
.tour-body p b { color: var(--ink); }
.tour-dots { display: flex; gap: 6px; margin: 14px 0 6px; }
.tour-dots i { width: 8px; height: 8px; border-radius: 50%; background: var(--rule-2); } .tour-dots i.on { background: var(--moss); }
.tour .actions { justify-content: flex-end; margin-top: 12px; }
.tour .actions .quiet { margin-right: auto; }
.tour.m { display: block; } .tour.m h2 { font-size: 24px; } .tour.m p { font-size: 14px; }
@media (max-width: 760px) { .tour { grid-template-columns: 1fr; } }

.ghost { display: none !important; }
/* market bar: one tidy row */
.mk-bar { display: grid; grid-template-columns: minmax(0, 1fr) auto auto auto; gap: 8px; align-items: center; }
.mk-bar .mk-q { min-width: 0; }
.mk-bar .seg { display: inline-flex; border: 1px solid var(--rule-2); border-radius: 4px; overflow: hidden; }
.mk-bar .seg button { border: 0; border-radius: 0; min-height: 30px; padding: 0 10px; font-size: 13px; background: transparent; color: var(--ink-2); }
.mk-bar .seg button + button { border-left: 1px solid var(--rule-2); }
.mk-bar .seg button.on { background: var(--ink); color: var(--paper); }
.mk-bar select { min-height: 32px; max-width: 190px; }
.mk-bar .chip { min-height: 30px; }

.callout.tut { display: flex; align-items: center; gap: 14px; margin-bottom: 12px; }
.callout.tut > div { flex: 1; }
.callout.tut button { white-space: nowrap; }

/* tour: icon instead of a picture */
.tour { grid-template-columns: 150px 1fr; }
.tour-pic { display: grid; place-items: center; min-height: 150px; }
.tour-pic .tico { width: 96px; height: 96px; border-radius: 26px; display: grid; place-items: center; background: var(--tc); color: #fff; box-shadow: inset 0 -6px 0 rgba(0, 0, 0, .22), 0 8px 18px rgba(0, 0, 0, .25); }
.tour-pic .tico svg { width: 50px; height: 50px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.tour-brand { font-family: var(--serif); font-size: 30px; line-height: 1; text-align: center; }
.tour-brand i { color: var(--moss); font-style: italic; }
.modal.tour-modal { width: min(680px, 94vw); }

/* ================= settings window ================= */
.settings-modal { position: relative; display: grid; grid-template-columns: 190px 1fr; padding: 0; width: min(820px, 94vw); max-height: 86vh; overflow: hidden; }
.set-nav { background: var(--paper-2); border-right: 1px solid var(--rule-2); padding: 22px 12px 16px; display: flex; flex-direction: column; gap: 2px; }
.set-nav h2 { font-size: 24px; margin: 0 8px 12px; }
.set-nav button { border: 0; border-radius: 6px; text-align: left; background: transparent; color: var(--ink-2); padding: 9px 12px; font-size: 14px; font-weight: 500; min-height: 0; }
.set-nav button:hover { background: rgba(0, 0, 0, .05); color: var(--ink); }
.set-nav button.on { background: var(--ink); color: var(--paper); }
.set-nav .set-foot { margin-top: auto; padding: 8px 12px 0; }
.set-body { padding: 26px 30px 30px; overflow: auto; }
.set-body h3 { font-size: 22px; margin: 0 0 8px; }
.set-row { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 14px 0; border-bottom: 1px solid var(--rule); }
.set-row:last-child { border-bottom: 0; }
.set-text { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.set-text b { font-weight: 500; font-size: 14.5px; }
.set-text span { font-size: 12.5px; color: var(--ink-2); line-height: 1.4; }
.set-ctl { flex: none; display: flex; align-items: center; gap: 8px; }
.set-row.danger b { color: var(--brick); }
.set-close { position: absolute; top: 10px; right: 12px; }
.set-seg button { padding: 5px 12px; font-size: 12.5px; min-height: 0; }
.switch { position: relative; display: inline-block; width: 44px; height: 24px; margin: 0; cursor: pointer; }
.switch input { opacity: 0; width: 0; height: 0; position: absolute; }
.switch i { position: absolute; inset: 0; background: var(--rule-2); border-radius: 24px; transition: background .15s; }
.switch i::after { content: ''; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: var(--paper); box-shadow: 0 1px 2px rgba(0, 0, 0, .3); transition: transform .15s; }
.switch input:checked + i { background: var(--moss); }
.switch input:checked + i::after { transform: translateX(20px); }
.switch input:focus-visible + i { outline: 2px solid var(--sky); outline-offset: 2px; }
@media (max-width: 700px) { .settings-modal { grid-template-columns: 1fr; } .set-nav { flex-direction: row; flex-wrap: wrap; padding: 14px 10px 8px; } .set-nav h2 { width: 100%; } .set-nav .set-foot { display: none; } }
