/* Polish layer: same sticker-bathroom style, more depth and light. Loaded last; delete the <link> to roll back. */
:root { --shadow-soft: 0 1px 0 #ffffffb3 inset, 0 10px 30px -12px #5a3a0a40, 0 2px 6px -2px #5a3a0a26; --line: 2.5px solid var(--ink); }

/* background: warm honey gradient, glow behind the hero, faint halftone, soft vignette */
body { background: #ffd94f; }
body::before { content:''; position:fixed; inset:0; z-index:-1; pointer-events:none;
  background:
    radial-gradient(ellipse 120% 90% at 50% 40%, transparent 55%, #8a5a0a24 100%),
    radial-gradient(ellipse 60% 45% at 72% 22%, #fff6c9cc, transparent 70%),
    radial-gradient(ellipse 50% 40% at 15% 85%, #ffb34733, transparent 70%),
    radial-gradient(circle at 1px 1px, #5a3a0a12 1px, transparent 0) 0 0 / 24px 24px,
    linear-gradient(180deg, #ffe98a 0%, #ffd84d 45%, #ffc93a 100%); }

/* header: frosted paper */
.top { background: #fffaf0; border-bottom: 2px solid var(--ink); box-shadow: 0 6px 24px -14px #5a3a0a66; }

/* buttons keep the sticker shadow, gain a little gloss */
.btn, .nav-btn { background-image: linear-gradient(180deg, #ffffff59, #ffffff00 55%); }
.btn-pink { background-image: linear-gradient(180deg, #ff86b9, #ff4f97); }
.btn-ink { background-image: linear-gradient(180deg, #2d2721, #16130f); }

/* calmer tiles: thinner line, soft depth instead of flat slabs */
.meter, .stat, .step, .coin-card, details, .card, .pet, .poop {
  border: var(--line); border-radius: 20px;
  background-image: linear-gradient(180deg, #ffffff, #fffaf0);
  box-shadow: var(--shadow-soft);
}
.stat-fire { background-image: radial-gradient(ellipse at 30% 0%, #3b3128, #16130f 70%); box-shadow: 0 12px 30px -12px #000a, 0 0 0 1px #000 inset; }
.stat-fire b { text-shadow: 0 0 18px #c6ff3d80; }
.stat b { letter-spacing: -.5px; }
.bar { border-width: 2px; box-shadow: 0 1px 2px #0002 inset; }
.bar i { background: linear-gradient(180deg, #a06a32, #6b3f17); box-shadow: 0 1px 0 #ffffff55 inset; }
.hp i { background-image: linear-gradient(180deg, #ffffff40, #ffffff00); }

/* the live poop: a lit stage, not a grey square */
.last, .pen-live-viewport, .spec-preview { box-shadow: 0 30px 60px -24px #5a3a0a80, 8px 8px 0 var(--pink); }
.live-player { background: radial-gradient(ellipse 70% 60% at 50% 40%, #fffaf0, #efe2bd 75%, #d9c591); }
.pen-live-viewport { overflow: hidden; }

.poop:hover, .pet:hover { box-shadow: 0 18px 36px -16px #5a3a0a80, 4px 4px 0 var(--pink); }
.pet { transition: transform .15s, box-shadow .15s; } .pet:hover { transform: translateY(-3px); }

/* care controls under the big live view */
.pen-live-care { margin: 18px 0 4px; }
.pen-live-care .row { gap: 12px; }
.pen-live-care .row .btn { flex: 1 1 160px; font-size: 19px; padding: 14px 22px; }
.pen-live-care .row .btn:first-child { background: var(--lime); background-image: linear-gradient(180deg, #e2ff8f, #b8f53a); }
.pen-live-care .feed-menu { margin-top: 12px; }
.pen-live-health { font-weight: 800; font-size: 18px; margin: 6px 0 2px; }

/* type rhythm */
.lead, .page-head p { line-height: 1.6; }
h2 { text-wrap: balance; }
.tape { box-shadow: 0 10px 24px -12px #000a; }
.foot { background: radial-gradient(ellipse at 20% 0%, #2d2721, #16130f 70%); }

/* frosted header only where it is cheap: desktop pointers */
@media (hover:hover) and (min-width:768px) { .top { background:#fffaf0d9; backdrop-filter:blur(14px) saturate(1.4); -webkit-backdrop-filter:blur(14px) saturate(1.4); } }
@media (max-width:767px) { body::before { background: linear-gradient(180deg, #ffe98a 0%, #ffd84d 45%, #ffc93a 100%); } }
@media (prefers-reduced-motion:reduce) { .pet:hover, .poop:hover { transform:none; } }
.pen-live.munch .pen-live-viewport { animation: munch .6s; }

/* Feed is the main action; Flush is irreversible, so it is the quieter one */
.pen-live-care .row .btn-flush { background:#fff; background-image:none; color:#c62828; border-color:#c62828; box-shadow:3px 3px 0 #c6282855; flex:0 1 150px; font-size:17px; }
.pen-live-care .row .btn-flush.armed { background:#ff4d4d; color:#fff; }
/* tighter details column */
.pen-live-details .kicker { margin-bottom:4px; }
.pen-live-details .rarity-stars { margin:0; }
.pen-live-name { margin:2px 0 6px; }
.pen-live-vault { margin:0; }
.pen-live-label { margin-top:16px; }

/* My pen: compact summary tiles, rarity shown like on Specimens */
#sum .stat { min-height:0; padding:10px 14px; }
#sum .stat b { font-size:22px; margin:2px 0 0; }
#sum .stat small { display:none; }
.pen-live-details .rarity-heading { margin:0 0 6px; }
.pen-live-details .rarity-stars { font-size:34px; color:#f0a800; text-shadow:0 1px 0 var(--ink), 1px 0 0 var(--ink), -1px 0 0 var(--ink), 0 -1px 0 var(--ink); }
/* wide monitors: use a bit more of the width */
@media (min-width:1500px) { main { max-width:1320px; } }
.pen-live-details small.live-hint { display:block; color:var(--mut); }

/* wallet balance + where to buy YSHET */
.pen-wallet { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:8px 14px; margin:14px 0 0; padding:10px 12px 10px 16px; border:2px solid var(--ink); border-radius:14px; background:#fffaf0cc; box-shadow:var(--shadow-soft); }
.pen-wallet-bal { font-size:15px; color:var(--mut); } .pen-wallet-bal b { color:var(--ink); font:800 18px ui-monospace,monospace; margin-left:4px; }
.btn-buy { background:var(--ink); background-image:linear-gradient(180deg,#2d2721,#16130f); color:var(--lime); box-shadow:3px 3px 0 var(--pink); font-size:15px; padding:7px 14px; }
.need-yshet { width:100%; display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:8px; margin-top:6px; padding:10px 12px; border-radius:10px; background:#fff0f4; border:2px solid var(--pink); }
.need-yshet p { margin:0; font-weight:700; font-size:14px; }
.need-yshet .btn-buy { flex:none !important; }

/* "Buy YSHET" in the header: a gold coin pill with a slow sheen */
.buy-yshet { position:relative; overflow:hidden; display:inline-flex; align-items:center; gap:8px; flex:none; padding:5px 16px 5px 6px; border:2.5px solid var(--ink); border-radius:999px; text-decoration:none; font-weight:800; color:var(--ink);
  background:linear-gradient(180deg,#ffe58a,#ffc93c 60%,#f0a800); box-shadow:3px 3px 0 var(--ink), 0 0 0 4px #ffd84d55; transition:transform .12s, box-shadow .12s; }
.buy-yshet:hover { transform:translate(-2px,-2px); box-shadow:5px 5px 0 var(--ink), 0 0 18px 4px #ffc93c99; }
.buy-yshet b { font-weight:950; }
.buy-coin { width:28px; height:28px; border-radius:50%; display:grid; place-items:center; font:950 15px system-ui,sans-serif; color:#7a4a00; border:2px solid var(--ink);
  background:radial-gradient(circle at 35% 30%,#fff6c2,#ffcf3a 55%,#d98e00); box-shadow:inset 0 0 0 3px #ffffff55; }
.buy-yshet::after { content:''; position:absolute; top:0; bottom:0; width:40%; left:-60%; background:linear-gradient(100deg,transparent,#ffffffb0,transparent); transform:skewX(-20deg); animation:buy-sheen 4.5s ease-in-out infinite; pointer-events:none; }
@keyframes buy-sheen { 0%,70% { left:-60%; } 100% { left:130%; } }
@media (max-width:600px) { .buy-yshet { padding:3px 12px 3px 4px; font-size:14px; } .buy-coin { width:24px; height:24px; font-size:13px; } .top .btn-ink { margin-left:0; } .buy-yshet { margin-left:auto; } }
@media (max-width:1100px) { .top .buy-yshet { margin-left:auto; } .top .chip { margin-left:0; } }
@media (max-width:600px) { #connect { width:auto; min-width:0; padding:6px 12px; font-size:14px; } .top { gap:8px; } .logo { font-size:19px; } }
@media (max-width:380px) { .buy-label { font-size:0; } .buy-label b { font-size:14px; } }

/* live on-chain tape under the header */
.tape-top { position:relative; overflow:hidden; white-space:nowrap; background:var(--ink); color:#e9e2d0; border-bottom:2px solid var(--ink); font:700 14px ui-monospace,monospace; padding:8px 0; }
.tape-top .tape-run { display:inline-flex; animation:run 60s linear infinite; will-change:transform; }
.tape-top:hover .tape-run { animation-play-state:paused; }
.tape-group { display:inline-flex; }
.tape-item { padding:0 22px; position:relative; } .tape-item::after { content:'·'; position:absolute; right:-3px; color:#6b6254; }
.tape-item.hot { color:var(--lime); }
@media (max-width:600px) { .tape-top { font-size:12px; padding:6px 0; } }

/* calmer: softer Buy pill, rarer faint sheen; friendlier tape type */
.buy-yshet { background:linear-gradient(180deg,#ffe9a0,#ffd255); box-shadow:3px 3px 0 var(--ink); }
.buy-yshet:hover { box-shadow:5px 5px 0 var(--ink); }
.buy-yshet::after { background:linear-gradient(100deg,transparent,#ffffff70,transparent); animation-duration:10s; }
@keyframes buy-sheen { 0%,88% { left:-60%; } 100% { left:130%; } }
.tape-top { font:600 15px/1.4 system-ui,-apple-system,"Segoe UI",sans-serif; letter-spacing:.2px; padding:9px 0; }
.tape-item.hot { color:#d8ff6b; font-weight:700; }
@media (max-width:600px) { .tape-top { font-size:13px; } }

/* review round 2 */
.pet .btn-flush { background:#fff; background-image:none; color:#c62828; border-color:#c62828; box-shadow:3px 3px 0 #c6282855; }
.pet .btn-flush.armed { background:#ff4d4d; color:#fff; }
@media (prefers-reduced-motion:reduce) { .tape-top { overflow-x:auto; } .tape-top .tape-run { animation:none; } .tape-group + .tape-group { display:none; } }
@media (max-width:600px) { .tape-top { font-size:12px; padding:5px 0; } .buy-label { font-size:0; } .buy-label b { font-size:14px; } .buy-yshet { padding:3px 10px 3px 4px; } }
.tip-warn { color:#b00020; font-weight:800; background:#fff0f4; border:2px solid var(--pink); border-radius:10px; padding:8px 12px; }
#tip.tip-warn { height:auto !important; min-height:0; max-height:none; overflow:visible; }
/* Mine: alive / max / burned — each label sits over its own number, all one size, wraps as whole columns */
.receipt .cap { display:flex; flex-wrap:wrap; align-items:flex-end; gap:2px 10px; }
.receipt .cap p { margin:0; display:flex; flex-direction:column; white-space:nowrap; }
.receipt .cap span { font-size:clamp(12px, 1vw, 14px); letter-spacing:.4px; margin-bottom:2px; }
.receipt .cap b { font:800 clamp(20px, 1.6vw, 24px) ui-monospace,monospace; overflow-wrap:normal; }
.receipt .cap em { font-style:normal; }
.receipt .cap i { font:800 clamp(20px, 1.6vw, 24px) ui-monospace,monospace; font-style:normal; color:var(--mut); }
/* one row always; sizes follow the tile width, not the screen */
.receipt .cap { flex-wrap:nowrap; container-type:inline-size; gap:0 clamp(4px, 3cqi, 12px); }
.receipt .cap b, .receipt .cap i { font-size:clamp(13px, 9cqi, 26px); }
.receipt .cap span { font-size:clamp(11px, 5.4cqi, 15px); }
@media (max-width:520px) { .receipt .cap { flex-wrap:wrap; } .receipt .cap b, .receipt .cap i { font-size:18px; } .receipt .cap span { font-size:11px; } }
@media (max-width:520px) { .receipt .cap i { display:none; } .receipt .cap { gap:4px 12px; } }
/* A public transaction hash survives reloads; keep confirmation recovery visible on every page. */
.tx-status { margin: 12px auto; padding: 12px 16px; max-width: 1280px; width: calc(100% - 24px); box-sizing: border-box; border: 2px solid #181510; border-radius: 14px; background: #fff5cf; }
.tx-status[hidden] { display: none; }
.tx-status-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.tx-status-row > span { flex: 1 1 240px; overflow-wrap: anywhere; }
.tx-status-row .btn { white-space: normal; }
/* pen: OpenSea-style health/holds chips on the picture, health bar, Feed button filled to health */
.pen-live-viewport{position:relative}
.pen-chips{position:absolute;top:10px;left:10px;display:flex;flex-wrap:wrap;gap:4px;z-index:5;pointer-events:none}
.pen-chip{background:rgba(20,16,12,.78);color:#fff;font-weight:700;font-size:11px;border-radius:999px;padding:2px 8px 2px 17px;position:relative}
.pen-chip::before{content:"";position:absolute;left:7px;top:50%;width:6px;height:6px;margin-top:-3px;border-radius:50%;background:#f0a020}
.pen-chip-hp::before{background:#7ad13a}.pen-chip-hp[data-lvl=low]::before{background:#f0a020}.pen-chip-hp[data-lvl=bad]::before{background:#e5484d}
.pen-hpbar{position:absolute;left:14px;right:14px;bottom:10px;height:4px;border-radius:999px;background:rgba(20,16,12,.55);overflow:hidden;z-index:5;pointer-events:none}
.pen-hpbar i{display:block;height:100%;background:#7ad13a;transition:width .6s}.pen-hpbar[data-lvl=low] i{background:#f0a020}.pen-hpbar[data-lvl=bad] i{background:#e5484d}
.btn-feed,.pen-live-care .row .btn.btn-feed{background:linear-gradient(90deg,#b8f53a var(--hp,100%),#ffc9c9 var(--hp,100%))}
.btn-feed:disabled{opacity:.5}
.pen-chip{max-width:calc(100% - 20px);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.flush-ask{position:fixed;inset:0;z-index:1000;background:rgba(20,14,8,.72);display:grid;place-items:center;padding:16px}
.flush-ask-card{background:var(--paper,#fffaf0);border:3px solid var(--ink);border-radius:22px;box-shadow:8px 8px 0 #c62828;max-width:420px;width:100%;padding:22px;text-align:center}
.flush-ask-card h2{margin:0 0 10px;font-size:28px}.flush-ask-card p{margin:6px 0}
.flush-ask-got{font-size:18px}.flush-ask-got b{color:#2f8f3a}
.flush-ask-card .row{justify-content:center;gap:10px;margin-top:16px}
.flush-ask-yes{background:#e53935;color:#fff}
