/* Pullstring — base styles. Skins only change the custom properties in :root[data-skin]. */
:root {
  --font: 'Figtree', system-ui, sans-serif;
  --display: 'Shrikhand', 'Figtree', serif;
  /* skin variables: defaults match "citrus"; see skins.css */
  --ink: #1f5fa8; --accent: #e8323c; --soft: #fff1a8; --ground: #fffbe3; --label: #fffdf0;
  --pattern: #ffd93b;
  --text: #231c22;
  --muted: #5b5059;
  --card: #ffffff;
  --line: rgba(0,0,0,0.09);
  --radius: 16px;
  --tab-h: 84px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); color: var(--text); background: var(--ground); min-height: 100vh; }
a { color: var(--accent); }
img { max-width: 100%; display: block; }
button, input { font: inherit; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.skip { position: absolute; left: -999px; top: 8px; background: #fff; padding: 8px 12px; border-radius: 8px; z-index: 50; }
.skip:focus { left: 8px; }

/* Header on the box pattern, title on a cream label like a box window */
.top { background: var(--pattern); padding: calc(env(safe-area-inset-top) + 18px) 16px 18px; box-shadow: inset 0 -3px 0 rgba(0,0,0,0.08); }
.top-inner { max-width: 1240px; margin: 0 auto; display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.brand { background: var(--label); border-radius: 18px; padding: 10px 18px 12px; box-shadow: 0 2px 0 rgba(0,0,0,0.08); display: flex; flex-direction: column; gap: 1px; text-decoration: none; color: var(--ink); min-width: 0; }
.brand-kicker { font-size: 11px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent); }
.brand-title { font-family: var(--display); font-size: 24px; line-height: 1.15; }
.search { flex: 1 1 260px; display: flex; align-items: center; gap: 10px; background: #fff; border-radius: 999px; padding: 0 14px; height: 48px; box-shadow: 0 1px 0 rgba(0,0,0,0.12); color: var(--muted); position: relative; }
.search input { border: 0; outline: none; flex: 1; min-width: 0; background: transparent; color: var(--text); font-size: 16px; }
.search input:focus-visible { outline: none; }
.search:focus-within { box-shadow: 0 0 0 3px var(--soft); }
.search-clear { border: 0; background: var(--soft); color: var(--ink); width: 28px; height: 28px; border-radius: 999px; font-size: 18px; line-height: 1; }
.top-nav { display: none; gap: 6px; }
.top-nav a { height: 44px; padding: 0 16px; border-radius: 999px; background: rgba(255,255,255,0.72); display: flex; align-items: center; font-weight: 600; text-decoration: none; color: #3a3038; }
.top-nav a[aria-current="page"] { background: #fff; color: var(--ink); font-weight: 700; }

.main { max-width: 1240px; margin: 0 auto; padding: 16px 16px calc(var(--tab-h) + 16px); }

/* Bottom tab bar (phone) */
.tabbar { position: fixed; left: 0; right: 0; bottom: 0; height: var(--tab-h); background: #fff; border-top: 1px solid var(--line); display: grid; grid-template-columns: repeat(4, 1fr); padding: 6px 8px calc(env(safe-area-inset-bottom) + 14px); z-index: 20; }
.tabbar a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: 11px; font-weight: 600; text-decoration: none; color: var(--muted); border-radius: 12px; }
.tabbar a[aria-current="page"] { color: var(--accent); font-weight: 700; }

@media (min-width: 900px) {
  :root { --tab-h: 0px; }
  .tabbar { display: none; }
  .top { padding: 24px 24px; }
  .top-nav { display: flex; }
  .brand-title { font-size: 28px; }
  .main { padding: 28px 24px 48px; }
}

/* Chips and filters */
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 4px 0 8px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; height: 38px; padding: 0 14px; border-radius: 999px; border: 1.5px solid rgba(0,0,0,0.18); background: #fff; color: #3a3038; font-size: 14px; font-weight: 500; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.chip[aria-pressed="true"], .chip.on { border-color: var(--ink); background: var(--soft); color: var(--ink); font-weight: 600; }
.chip small { opacity: 0.7; font-weight: 500; }

.layout { display: flex; flex-wrap: wrap; gap: 24px; align-items: flex-start; }
.filters { flex: 1 1 240px; max-width: 100%; background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 16px 18px; display: none; flex-direction: column; gap: 16px; }
.filters.open { display: flex; }
.filters fieldset { border: 0; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.filters legend { padding: 0 0 6px; font-size: 12px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.filters label { display: flex; align-items: center; gap: 10px; font-size: 14px; min-height: 30px; }
.filters input[type="checkbox"] { width: 18px; height: 18px; margin: 0; accent-color: var(--accent); }
.filters-head { display: flex; justify-content: space-between; align-items: center; }
.filters-head h2 { margin: 0; font-size: 16px; }
.linkbtn { border: 0; background: none; color: var(--accent); font-weight: 600; min-height: 44px; padding: 0; cursor: pointer; }
.results { flex: 999 1 560px; min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.results-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px; font-size: 14px; color: var(--muted); }
.results-head select { border: 1.5px solid rgba(0,0,0,0.18); border-radius: 999px; padding: 8px 12px; background: #fff; font-size: 14px; }
@media (min-width: 900px) { .filters { display: flex; } .filters-toggle { display: none; } }

/* Doll cards */
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
@media (min-width: 560px) { .grid { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 18px; } }
.card { display: flex; flex-direction: column; gap: 8px; text-decoration: none; color: inherit; }
.card-img { position: relative; aspect-ratio: 4 / 5; border-radius: var(--radius); background: var(--soft); overflow: hidden; display: flex; align-items: center; justify-content: center; }
.card-img img { width: 100%; height: 100%; object-fit: cover; }
.card-img .ph { width: 56%; opacity: 0.85; }
.badge { position: absolute; left: 8px; bottom: 8px; background: #fff; border-radius: 999px; padding: 3px 8px; font-size: 11px; font-weight: 700; color: var(--ink); }
.badge.idx { background: rgba(255,255,255,0.9); color: var(--muted); }
.card-add { position: absolute; top: 6px; right: 6px; width: 36px; height: 36px; border-radius: 999px; border: 0; background: #fff; color: var(--ink); display: flex; align-items: center; justify-content: center; cursor: pointer; }
.card-add.on { background: var(--ink); color: #fff; }
.card-name { font-weight: 700; font-size: 15px; }
.card-meta { font-size: 12.5px; color: var(--muted); margin-top: -4px; }
.empty { padding: 40px 20px; text-align: center; color: var(--muted); }

/* Doll page */
.doll { display: flex; flex-wrap: wrap; gap: 24px; align-items: flex-start; }
.doll-photo { flex: 1 1 320px; max-width: 520px; display: flex; flex-direction: column; gap: 10px; }
.photo { position: relative; aspect-ratio: 4 / 5; border-radius: 20px; background: #fffdf8; border: 1px solid var(--line); overflow: hidden; display: flex; align-items: center; justify-content: center; }
.photo img { width: 100%; height: 100%; object-fit: contain; background: #fff; }
.photo .ph { width: 50%; }
.photo-strip { display: flex; gap: 8px; }
.photo-strip button { width: 64px; height: 64px; border-radius: 12px; border: 2px solid transparent; padding: 0; overflow: hidden; background: #fff; cursor: pointer; }
.photo-strip button.on { border-color: var(--ink); }
.photo-strip img { width: 100%; height: 100%; object-fit: cover; }
.credit { font-size: 12px; color: var(--muted); }
.doll-body { flex: 1 1 360px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.doll-body h1 { margin: 0; font-family: var(--display); font-weight: 400; font-size: 30px; line-height: 1.15; color: var(--ink); }
.doll-sub { color: var(--muted); font-size: 14px; }
.listbtns { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.listbtn { min-height: 56px; border-radius: 14px; border: 1.5px solid rgba(0,0,0,0.18); background: #fff; color: #3a3038; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; padding: 6px 2px; cursor: pointer; }
.listbtn b { font-size: 13px; } .listbtn small { font-size: 11px; }
.listbtn.on { border-color: var(--ink); background: var(--ink); color: #fff; }
.spec { border-radius: var(--radius); background: var(--card); border: 1px solid var(--line); padding: 4px 16px; }
.spec div { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid rgba(0,0,0,0.07); font-size: 14px; }
.spec div:last-child { border-bottom: 0; }
.spec span:first-child { color: var(--muted); flex: none; }
.spec span:last-child { font-weight: 600; text-align: right; }
.eyes { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.eye { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 10px 6px; text-align: center; font-size: 12px; }
.eye b { display: block; font-size: 13px; }
.eye small { color: var(--muted); }
.eye.sp { border-color: var(--ink); background: var(--soft); }
.prose { font-size: 15px; line-height: 1.5; }
.prose h3 { margin: 14px 0 4px; font-size: 13px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.prose p { margin: 0; }
.back { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; text-decoration: none; font-weight: 600; }
.note { background: var(--soft); color: var(--ink); border-radius: 12px; padding: 10px 14px; font-size: 14px; }
.source { font-size: 13px; color: var(--muted); }

/* Lists */
.list-row { display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: var(--radius); background: var(--card); border: 1px solid var(--line); text-decoration: none; color: inherit; }
.list-row .thumb { width: 56px; height: 56px; flex: none; border-radius: 12px; background: var(--soft); overflow: hidden; display: flex; align-items: center; justify-content: center; }
.list-row .thumb img { width: 100%; height: 100%; object-fit: cover; }
.list-row .thumb .ph { width: 70%; }
.list-row .info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.list-row .info b { font-size: 15px; }
.list-row .info span { font-size: 12.5px; color: var(--muted); }
.list-row .rm { border: 0; background: none; color: var(--muted); width: 44px; height: 44px; border-radius: 999px; cursor: pointer; }
.stack { display: flex; flex-direction: column; gap: 10px; }
.row-between { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.btn { min-height: 44px; padding: 0 16px; border-radius: 999px; border: 0; background: var(--ink); color: #fff; font-weight: 700; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; text-decoration: none; }
.btn.ghost { background: #fff; color: var(--ink); border: 1.5px solid var(--ink); }
.switch { position: relative; width: 50px; height: 30px; flex: none; border-radius: 999px; background: rgba(0,0,0,0.2); transition: background .15s; }
.switch input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.switch i { position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 999px; background: #fff; transition: left .15s; }
.switch input:checked + i { left: 23px; }
.switch:has(input:checked) { background: var(--accent); }
.h2 { margin: 8px 0 0; font-size: 17px; }

/* Skins page */
.swatches { display: flex; flex-direction: column; gap: 12px; }
.swatch { display: flex; align-items: center; gap: 14px; padding: 10px 12px; border-radius: var(--radius); background: #fff; border: 1px solid var(--line); cursor: pointer; text-align: left; color: inherit; }
.swatch.on { border: 2px solid var(--ink); }
.swatch i { width: 84px; height: 60px; flex: none; border-radius: 10px; border: 1px solid rgba(0,0,0,0.1); }
.swatch b { display: block; font-size: 15px; }
.swatch small { color: var(--muted); font-size: 12.5px; }

.toast { position: fixed; left: 50%; bottom: calc(var(--tab-h) + 16px); transform: translateX(-50%) translateY(20px); background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 999px; font-size: 14px; font-weight: 600; opacity: 0; pointer-events: none; transition: all .2s; z-index: 30; max-width: calc(100% - 32px); }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* Accounts, profiles, messages (v0.2) */
.pill { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 999px; background: rgba(0,0,0,0.06); color: var(--muted); font-size: 11px; font-weight: 700; }
.pill.ok { background: var(--soft); color: var(--ink); }
.pills { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.list-row.unread { border-color: var(--ink); }
.tabbar a[data-unread]:not([data-unread=""])::after, .top-nav a[data-unread]:not([data-unread=""])::after { content: attr(data-unread); position: absolute; top: 4px; right: 18%; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--accent); color: #fff; font-size: 11px; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.tabbar a, .top-nav a { position: relative; }
.top-nav a[data-unread]:not([data-unread=""])::after { right: -4px; top: -4px; }
.profile-head { display: flex; align-items: center; gap: 14px; margin-bottom: 12px; }
.profile-head h1 { margin: 0; font-family: var(--display); font-weight: 400; font-size: 26px; line-height: 1.15; color: var(--ink); }
.avatar { width: 64px; height: 64px; flex: none; border-radius: 999px; background: var(--pattern); border: 3px solid var(--label); box-shadow: 0 0 0 1px var(--line); display: flex; align-items: center; justify-content: center; font-family: var(--display); font-size: 28px; color: var(--ink); text-shadow: 0 0 6px var(--label), 0 0 10px var(--label); }
.avatar.sm { width: 44px; height: 44px; font-size: 20px; }
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 12px 0; }
.stats div { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 10px 8px; text-align: center; display: flex; flex-direction: column; gap: 2px; }
.stats b { font-size: 18px; color: var(--ink); } .stats span { font-size: 12px; color: var(--muted); }
.row { display: flex; align-items: center; }
.auth { max-width: 420px; }
.auth label, #acct label { display: flex; flex-direction: column; gap: 6px; font-size: 14px; font-weight: 600; }
.auth label small, #acct label small { font-weight: 500; color: var(--muted); }
.auth input, #acct input, #acct textarea, .compose textarea { border: 1.5px solid rgba(0,0,0,0.18); border-radius: 12px; padding: 12px 14px; font-size: 16px; background: #fff; color: var(--text); width: 100%; }
.auth input:focus, #acct input:focus, #acct textarea:focus, .compose textarea:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px var(--soft); }
.seg { display: flex; gap: 8px; }
.thread { display: flex; flex-direction: column; gap: 8px; padding: 12px 0; max-height: 55vh; overflow-y: auto; }
.bubble { max-width: 80%; align-self: flex-start; background: var(--card); border: 1px solid var(--line); border-radius: 16px 16px 16px 4px; padding: 10px 14px; font-size: 15px; line-height: 1.4; white-space: pre-wrap; }
.bubble.mine { align-self: flex-end; background: var(--ink); color: #fff; border-color: var(--ink); border-radius: 16px 16px 4px 16px; }
.bubble time { display: block; font-size: 11px; opacity: 0.7; margin-top: 4px; }
.bubble-doll { display: block; font-size: 12px; font-weight: 700; margin-bottom: 2px; color: inherit; }
.compose { display: flex; gap: 8px; align-items: flex-end; flex-wrap: wrap; }
.compose textarea { flex: 1 1 200px; resize: vertical; }
.avatar { position: relative; overflow: hidden; }
.avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border-radius: 999px; }
.list-row .avatar.sm { margin-right: -4px; }

/* header account button */
.acct-btn { order: 2; margin-left: auto; height: 44px; padding: 0 14px 0 10px; border-radius: 999px; background: var(--label); color: var(--ink); font-weight: 700; font-size: 14px; text-decoration: none; display: inline-flex; align-items: center; gap: 8px; box-shadow: 0 2px 0 rgba(0,0,0,0.08); max-width: 46%; }
.acct-btn span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.avatar.xs { width: 28px; height: 28px; font-size: 14px; border-width: 2px; }
.brand { order: 1; }
.search { order: 3; flex-basis: 100%; }
@media (min-width: 900px) { .acct-btn { order: 4; margin-left: 0; max-width: none; } .search { order: 2; flex-basis: 260px; } .top-nav { order: 3; } }
.credit a { color: inherit; text-decoration: none; } .credit a:hover { text-decoration: underline; }

/* Placeholder girl */
.ph { display: block; width: 62%; }
.ph svg { width: 100%; height: auto; display: block; }
.card-img .ph { width: 62%; } .photo .ph { width: 52%; } .list-row .thumb .ph { width: 86%; }

/* Doll designer */
.tabbar { grid-template-columns: repeat(5, 1fr); }
.designer { display: flex; flex-wrap: wrap; gap: 24px; align-items: flex-start; }
.designer-preview { flex: 1 1 300px; max-width: 460px; }
.portrait { border-radius: 24px; overflow: hidden; border: 3px solid var(--label); box-shadow: 0 0 0 1px var(--line), 0 6px 0 rgba(0,0,0,0.06); }
.portrait svg { display: block; width: 100%; height: auto; }
.recipe { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.recipe a { text-decoration: none; height: 26px; }
.designer-controls { flex: 999 1 360px; min-width: 0; display: flex; flex-direction: column; gap: 18px; }
.designer-controls section { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; }
.designer-controls h3 { margin: 0; font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.swatches-row { display: flex; flex-wrap: wrap; gap: 8px; }
.sw { width: 36px; height: 36px; border-radius: 999px; border: 2px solid rgba(0,0,0,0.12); cursor: pointer; padding: 0; }
.sw.on { box-shadow: 0 0 0 3px var(--card), 0 0 0 5px var(--ink); }
.borrow { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.borrow input { flex: 1 1 200px; border: 1.5px solid rgba(0,0,0,0.18); border-radius: 999px; padding: 10px 14px; font-size: 15px; background: #fff; color: var(--text); }
.borrow input:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px var(--soft); }
.dot { width: 14px; height: 14px; border-radius: 999px; display: inline-block; border: 1px solid rgba(0,0,0,0.15); }
@media (min-width: 900px) { .designer-preview { position: sticky; top: 16px; } }
.portrait { display: flex; justify-content: center; }
.portrait svg { width: auto; height: min(64vh, 660px); max-width: 100%; }
.sub { font-size: 13px; font-weight: 700; color: var(--text); margin-top: 4px; }
.sw.none { background: #fff; color: var(--muted); font-size: 18px; line-height: 1; }

/* Dream-doll recipe card (v0.6) */
.recipe-card { max-width: 860px; border-radius: 22px; overflow: hidden; background: var(--card); border: 1px solid var(--line); box-shadow: 0 6px 0 rgba(0,0,0,0.05); }
.recipe-head { background: var(--pattern); padding: 18px; }
.recipe-label { background: var(--label); border-radius: 18px; padding: 12px 16px 14px; display: flex; flex-direction: column; gap: 2px; box-shadow: 0 2px 0 rgba(0,0,0,0.08); }
.recipe-label h1, .recipe-label input { margin: 0; font-family: var(--display); font-weight: 400; font-size: 28px; line-height: 1.2; color: var(--ink); border: 0; background: transparent; padding: 0; width: 100%; }
.recipe-label input:focus { outline: none; box-shadow: 0 2px 0 var(--accent); }
.recipe-count { font-size: 13px; color: var(--muted); }
.recipe-body { padding: 4px 16px 8px; }
.slot { display: flex; gap: 14px; padding: 14px 0; border-bottom: 1px dashed var(--line); }
.slot:last-child { border-bottom: 0; }
.slot-photo { width: 88px; height: 110px; flex: none; border-radius: 14px; overflow: hidden; background: var(--soft); display: flex; align-items: center; justify-content: center; color: var(--ink); }
.slot-photo img { width: 100%; height: 100%; object-fit: cover; }
.slot-photo .ph { width: 70%; }
.slot-empty { font-family: var(--display); font-size: 36px; opacity: .5; }
.slot-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.slot-label { font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.slot-doll { font-weight: 700; font-size: 16px; color: var(--ink); text-decoration: none; }
.slot-doll:hover { text-decoration: underline; }
.slot-meta { font-size: 12.5px; color: var(--muted); }
.slot-text { margin: 2px 0 0; font-size: 14px; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.slot-text.muted { color: var(--muted); }
.slot-sw { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.chipsw { display: inline-flex; align-items: center; gap: 5px; height: 26px; padding: 0 10px 0 4px; border-radius: 999px; background: var(--soft); color: var(--ink); font-size: 12px; font-weight: 600; }
.chipsw i { width: 18px; height: 18px; border-radius: 999px; border: 1px solid rgba(0,0,0,.15); }
.btn[disabled] { opacity: .45; cursor: default; }
.ph svg { overflow: visible; }
/* Face preview in the dream doll card */
.mock { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; padding: 16px; background: var(--soft); border-bottom: 1px dashed var(--line); }
.mock canvas { width: 200px; height: auto; flex: none; filter: drop-shadow(0 4px 0 rgba(0,0,0,.08)); }
.mock-side { flex: 1 1 200px; min-width: 0; display: flex; flex-direction: column; gap: 4px; align-items: flex-start; }
/* Your copy + price guide (v0.7) */
.copy { background: var(--card); border: 1.5px solid var(--ink); border-radius: 18px; padding: 14px 16px; display: flex; flex-direction: column; gap: 12px; }
.copy-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.copy label { display: flex; flex-direction: column; gap: 6px; font-size: 14px; font-weight: 600; }
.copy input[type=number], .copy select { border: 1.5px solid rgba(0,0,0,0.18); border-radius: 12px; padding: 10px 12px; font-size: 16px; background: #fff; color: var(--text); min-width: 0; }
.copy .paid { display: flex; gap: 6px; } .copy .paid select { flex: none; } .copy .paid input { flex: 1; }
.conds { border: 0; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.conds legend { font-size: 14px; font-weight: 600; padding: 0 0 6px; }
.cond { display: inline-flex !important; flex-direction: row !important; align-items: center; cursor: pointer; }
.cond input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.cond span { display: inline-flex; align-items: center; min-height: 40px; padding: 0 14px; border-radius: 999px; border: 1.5px solid rgba(0,0,0,0.18); background: #fff; font-weight: 500; font-size: 14px; }
.cond input:checked + span { border-color: var(--ink); background: var(--soft); color: var(--ink); font-weight: 700; }
.cond input:focus-visible + span { box-shadow: 0 0 0 3px var(--soft); }
.pricebox { display: flex; flex-direction: column; gap: 8px; }
.guide-row { padding: 8px 12px; border-radius: 12px; background: var(--card); border: 1px solid var(--line); font-size: 14px; }
.guide-row small { font-weight: 500; color: var(--muted); }
.summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 4px 0 12px; }
.summary div { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 10px 8px; text-align: center; display: flex; flex-direction: column; gap: 2px; }
.summary b { font-size: 16px; color: var(--ink); overflow-wrap: anywhere; } .summary span { font-size: 12px; color: var(--muted); }
.copy label.row { flex-direction: row; align-items: flex-start; font-weight: 500; } .copy label.row input { flex: none; margin-top: 1px; }
/* full-figure preview + workbench (v0.8) */
.mock canvas.full { width: 170px; }
.wb { display: flex; flex-wrap: wrap; gap: 20px; align-items: flex-start; }
.wb-side { flex: 1 1 320px; min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.wb-stage { flex: 1 1 300px; display: flex; justify-content: center; background: var(--soft); border-radius: 20px; padding: 16px; }
.wb-stage canvas { max-width: 100%; height: auto; max-height: 78vh; }
.drop { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-height: 120px; border: 2px dashed var(--ink); border-radius: 18px; background: var(--card); cursor: pointer; text-align: center; padding: 12px; }
.drop.over { background: var(--soft); }
.drop span { font-size: 13px; color: var(--muted); }
.wb-sel { display: flex; flex-direction: column; gap: 4px; font-size: 13px; font-weight: 600; }
.wb-sel select { border: 1.5px solid rgba(0,0,0,0.18); border-radius: 10px; padding: 8px 10px; font-size: 15px; background: #fff; }
.wb-json { font-size: 12px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 10px; overflow: auto; max-height: 240px; }
@media (min-width: 900px) { .wb-stage { position: sticky; top: 16px; } }
.ebay { display: flex; flex-direction: column; gap: 6px; }
.ebay > .btn { align-self: flex-start; }
.ebay .list-row b small { font-weight: 500; color: var(--muted); }
.ebay-stats { margin: 0 0 6px; }
.guide-group { display: flex; flex-direction: column; gap: 4px; margin-bottom: 8px; }
.guide-row.recent { background: transparent; border-style: dashed; }
.recent-buys { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 4px; font-size: 13px; font-weight: 600; }
.recent-buys span { background: var(--card); border: 1px solid var(--line); border-radius: 999px; padding: 3px 10px; }
.recent-buys small { font-weight: 500; color: var(--muted); }

/* ---------- shelf ---------- */
.viewtoggle { display: inline-flex; border: 1.5px solid var(--ink); border-radius: 999px; overflow: hidden; margin: 2px 0 12px; }
.viewtoggle button { font: 600 13px var(--font); border: 0; background: transparent; color: var(--ink); padding: 7px 16px; cursor: pointer; min-height: 36px; }
.viewtoggle button[aria-pressed="true"] { background: var(--ink); color: #fff; }
.shelf {
  /* planks are painted on the cabinet so every shelf runs full width, even a half-filled last one */
  --stand: 178px; --tag: 52px; --gap: 18px; --row: calc(var(--stand) + 7px + var(--tag) + var(--gap));
  display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); column-gap: 0; row-gap: var(--gap);
  grid-auto-rows: calc(var(--stand) + 7px + var(--tag));
  padding: 16px 12px 0; border-radius: 20px;
  background:
    repeating-linear-gradient(180deg, transparent 0 calc(var(--stand) - 12px), color-mix(in srgb, var(--accent) 55%, #fff) calc(var(--stand) - 12px) calc(var(--stand) - 9px), var(--accent) calc(var(--stand) - 9px) var(--stand), rgba(0,0,0,.12) var(--stand) calc(var(--stand) + 4px), transparent calc(var(--stand) + 4px) var(--row)) 0 16px / 100% var(--row) repeat-y,
    linear-gradient(180deg, color-mix(in srgb, var(--soft) 70%, #fff) 0%, var(--soft) 100%);
  border: 6px solid var(--accent); box-shadow: inset 0 10px 18px rgba(0,0,0,.08);
}
.shelf-doll { display: flex; flex-direction: column; align-items: center; text-decoration: none; color: inherit; min-width: 0; }
.shelf-doll .stand { position: relative; width: 100%; height: var(--stand); flex: none; display: flex; align-items: flex-end; justify-content: center; padding: 0 4px 12px; }

.shelf-doll .cut { max-width: 100%; max-height: 100%; object-fit: contain; object-position: bottom; filter: drop-shadow(0 3px 2px rgba(0,0,0,.22)); transition: transform .2s ease; transform-origin: bottom center; }
.shelf-doll:hover .cut, .shelf-doll:focus-visible .cut { transform: translateY(-4px) rotate(-1.5deg); }
.shelf-doll .box {
  position: relative; display: flex; flex-direction: column; width: 82px; height: 150px; border-radius: 8px 8px 4px 4px;
  background: var(--pattern); border: 2px solid var(--ink); padding: 6px 6px 0; box-shadow: 3px 4px 0 rgba(0,0,0,.15);
}
.shelf-doll .win { flex: 1; min-height: 0; border-radius: 30px 30px 8px 8px; background: #fff; border: 2px solid var(--ink); overflow: hidden; display: flex; align-items: flex-end; justify-content: center; }
.shelf-doll .win img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.shelf-doll .win .cut { object-fit: contain; object-position: bottom; filter: none; }
.shelf-doll .win .nophoto { width: 80%; color: var(--ink); align-self: center; }
.shelf-doll .boxlabel { font: 400 13px/1 var(--display); color: var(--ink); text-align: center; padding: 4px 0 5px; }
.shelf-doll:hover .box { transform: translateY(-3px); transition: transform .2s ease; }
.shelf-tag { margin-top: 7px; height: var(--tag); overflow: hidden; text-align: center; padding: 0 4px; max-width: 100%; display: flex; flex-direction: column; gap: 1px; }
.shelf-tag b { font-size: 12.5px; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.shelf-tag span { font-size: 11.5px; color: var(--muted); }
@media (min-width: 720px) { .shelf { grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); } .shelf { --stand: 220px; } .shelf-doll .box { width: 100px; height: 186px; } }
@media (prefers-reduced-motion: reduce) { .shelf-doll .cut, .shelf-doll .box { transition: none; } }

/* ---------- designer customising ---------- */
.custom { display: flex; flex-direction: column; gap: 14px; padding: 14px 16px; border-top: 1px dashed var(--line); border-bottom: 1px dashed var(--line); }
.custom-row { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.custom .chip.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.sws { display: flex; flex-wrap: wrap; gap: 8px; }
.sw { width: 34px; height: 34px; border-radius: 999px; border: 2px solid rgba(0,0,0,.18); cursor: pointer; padding: 0; position: relative; box-shadow: inset 0 -4px 6px rgba(0,0,0,.15), inset 0 3px 4px rgba(255,255,255,.35); }
.sw.on { outline: 3px solid var(--ink); outline-offset: 2px; }
.sw.pick { background: conic-gradient(#e85a5a, #f2c94c, #6fcf97, #56ccf2, #9b51e0, #e85a5a); display: grid; place-items: center; overflow: hidden; }
.sw.pick input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%; border: 0; padding: 0; }
.sw.pick span { font-weight: 800; color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,.5); pointer-events: none; }
.custom .linkbtn.reset { font-size: 13px; color: var(--muted); text-align: left; padding: 0; min-height: 0; }
