/* ---------- Bean Closet (/closet/) ---------- */
.closetmain { background: var(--cream); }
.closetmain svg { width: 1.1em; height: 1.1em; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* hero */
.cl-hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); align-items: center; gap: clamp(26px, 4vw, 60px); padding: 46px max(5vw, calc((100vw - 1240px) / 2)) 56px; background: linear-gradient(#7fd3ee, #c4eef3); }
.cl-title { margin: 6px 0 16px; }
.cl-title span { display: inline-block; }
.cl-title .accent { rotate: -3deg; }
.cl-hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 26px; }
.cl-hero-art { margin: 0; border: var(--line); border-radius: 30px; overflow: hidden; box-shadow: 6px 8px 0 var(--ink); rotate: 1.5deg; background: #bfe9f6; }
.cl-hero-art img { display: block; width: 100%; height: auto; }
.cl-testnet { margin: 0; display: flex; align-items: center; justify-content: center; gap: 12px; padding: 12px max(5vw, calc((100vw - 1100px) / 2)); background: var(--gold); border-block: var(--line); font-size: 15px; font-weight: 600; line-height: 1.4; }
.cl-testnet b { flex: none; padding: 3px 12px; border-radius: 999px; background: var(--ink); color: var(--gold); font-size: 12px; letter-spacing: .12em; text-transform: uppercase; }
.cl-testnet.main { background: var(--mint); font-weight: 500; }
.cl-testnet.main b { color: var(--mint); }

/* dressing room */
.cl-room { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: clamp(20px, 3vw, 40px); align-items: start; padding: clamp(40px, 5vw, 70px) max(4vw, calc((100vw - 1320px) / 2)); background: radial-gradient(circle at 1px 1px, #092c4414 1.5px, transparent 0) 0 0 / 22px 22px, var(--cream); scroll-margin-top: 70px; }
.cl-stage { position: sticky; top: 84px; height: min(76vh, 720px); min-height: 460px; border: var(--line); border-radius: 30px; overflow: hidden; background-size: cover; background-position: center 70%; box-shadow: 6px 8px 0 var(--ink); transition: background-image .4s; isolation: isolate; }
.cl-stage::before { content: ''; position: absolute; inset: 0; background: linear-gradient(transparent 55%, #00000022); pointer-events: none; z-index: 0; }
.cl-viewer { position: absolute; inset: 0 0 96px; z-index: 1; }
.cl-canvas { display: block; width: 100%; height: 100%; cursor: grab; outline: none; }
.cl-canvas:active { cursor: grabbing; }
.cl-canvas:focus-visible { outline: 4px solid #e2477e; outline-offset: -6px; border-radius: 26px; }
.cl-loading { position: absolute; inset: 0; z-index: 2; display: grid; place-content: center; justify-items: center; gap: 8px; text-align: center; padding: 20px; }
.cl-loading img { width: 150px; animation: cl-bob 1.6s ease-in-out infinite; }
.cl-loading p { margin: 0; padding: 6px 14px; border-radius: 999px; background: #ffffffd9; border: 2px solid var(--ink); }
@keyframes cl-bob { 50% { transform: translateY(-10px) rotate(3deg); } }
.cl-stage-hint { position: absolute; top: 14px; left: 14px; z-index: 2; display: inline-flex; align-items: center; gap: 8px; margin: 0; padding: 6px 13px; border-radius: 999px; background: #fffffff0; border: 2px solid var(--ink); font-size: 14px; pointer-events: none; }
.cl-stage-foot { position: absolute; left: 12px; right: 12px; bottom: 12px; z-index: 2; display: grid; gap: 10px; padding: 12px; border: 2px solid var(--ink); border-radius: 22px; background: #fffaf0f2; box-shadow: 3px 4px 0 var(--ink); }
.cl-pieces { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.cl-pieces li { display: inline-flex; align-items: center; gap: 6px; padding: 4px 4px 4px 11px; border-radius: 999px; background: #e3f6fd; border: 2px solid var(--ink); font-size: 14px; font-weight: 700; }
.cl-pieces li.plain { padding: 4px 12px; background: transparent; border-style: dashed; font-weight: 600; }
.cl-pieces li.locked { background: #fff0c4; }
.cl-pieces li button { display: grid; place-items: center; width: 24px; height: 24px; padding: 0; border: 0; border-radius: 50%; background: var(--ink); color: var(--cream); }
.cl-pieces li button svg { width: 13px; height: 13px; stroke-width: 3; }
.cl-locked-note { margin: 0; font-size: 13.5px; line-height: 1.4; color: #8a4a00; }
.cl-stage-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.cl-stage-actions .button { min-height: 46px; padding: 9px 20px; font-size: 15px; }
.button:disabled { opacity: .55; cursor: default; transform: none !important; box-shadow: 2px 2px 0 var(--ink) !important; }
.cl-stage-actions .button.primary.is-saved:disabled { opacity: 1; background: #d9f1d0; }

/* panel */
.cl-panel { min-width: 0; display: grid; gap: 16px; }
.cl-wallet { display: grid; gap: 10px; padding: 14px 16px; border: var(--line); border-radius: 22px; background: white; box-shadow: var(--shadow); }
.cl-wallet small { color: #3f6478; font-size: 13.5px; line-height: 1.4; }
.cl-wallet small a { text-decoration: underline; font-weight: 700; }
.cl-wallet-who { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-weight: 700; }
.cl-wallet-who a { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 15px; text-decoration: underline; text-underline-offset: 3px; }
.cl-wallet-dot { width: 11px; height: 11px; border-radius: 50%; background: #42cf7f; border: 2px solid var(--ink); }
.cl-bal { margin-left: auto; padding: 3px 12px; border-radius: 999px; background: var(--mint); border: 2px solid var(--ink); font-size: 14px; }
.cl-faucet { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.button.cl-small { min-height: 42px; padding: 8px 16px; font-size: 14.5px; justify-self: start; }
.cl-iconbtn { display: grid; place-items: center; width: 36px; height: 36px; padding: 0; border: 2px solid var(--ink); border-radius: 50%; background: var(--cream); }
.cl-iconbtn:hover { background: var(--gold); }
.cl-tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.cl-tabs button { position: relative; padding: 8px 15px; border: 2px solid var(--ink); border-radius: 999px; background: white; font-weight: 800; font-size: 15px; transition: transform .15s, background .15s; }
.cl-tabs button:hover { transform: translateY(-2px); }
.cl-tabs button.on { background: var(--ink); color: var(--cream); }
.cl-tabs button i { position: absolute; top: -3px; right: -3px; width: 11px; height: 11px; border-radius: 50%; background: var(--pink); border: 2px solid var(--ink); }
.cl-tab-note { margin: 0; padding: 10px 14px; border-radius: 14px; background: #e3f6fd; border: 2px dashed #0b7fb866; font-size: 14px; line-height: 1.45; }
.cl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 14px; }
.cl-item { position: relative; display: flex; flex-direction: column; gap: 3px; padding: 10px 10px 12px; border: var(--line); border-radius: 20px; background: white; box-shadow: 3px 4px 0 var(--ink); transition: transform .18s cubic-bezier(.3,1.6,.5,1), box-shadow .18s, background .18s; text-align: left; min-width: 0; }
button.cl-item { font: inherit; cursor: pointer; }
.cl-item:hover { transform: translate(-1px, -3px) rotate(-.6deg); box-shadow: 5px 7px 0 var(--ink); }
.cl-item.on { background: #dff4ff; box-shadow: 0 0 0 4px var(--bean), 5px 7px 0 var(--ink); }
.cl-item-hit { position: absolute; inset: 0; z-index: 1; border: 0; border-radius: 18px; background: none; padding: 0; }
.cl-item-art { display: grid; place-items: center; aspect-ratio: 4 / 3; border-radius: 13px; background: radial-gradient(circle at 50% 60%, #ffffff, #e5f5fb 70%); overflow: hidden; margin-bottom: 4px; }
.cl-item-art img { max-width: 86%; max-height: 86%; object-fit: contain; transition: transform .25s cubic-bezier(.3,1.6,.5,1); }
.cl-item:hover .cl-item-art img { transform: scale(1.06) rotate(-2deg); }
.cl-item-art.room { background: #cdeffb; }
.cl-item-art.room img { max-width: none; max-height: none; width: 100%; height: 100%; object-fit: cover; }
.cl-item.locked .cl-item-art img { filter: saturate(.8); }
.cl-none-mark { font-size: 46px; font-weight: 800; color: #9cc3d4; }
.cl-item-name { font-weight: 800; font-size: 15.5px; line-height: 1.2; }
.cl-item-note { font-size: 13px; color: #4d7184; line-height: 1.3; }
.cl-item-foot { display: flex; align-items: center; justify-content: space-between; gap: 6px; margin-top: auto; padding-top: 8px; flex-wrap: wrap; }
.cl-badge { display: inline-flex; align-items: center; gap: 4px; font-style: normal; font-size: 12.5px; font-weight: 700; line-height: 1.25; color: #3f6478; }
.cl-badge svg { width: 13px; height: 13px; }
.cl-badge.wearing { padding: 2px 9px; border-radius: 999px; background: var(--ink); color: var(--cream); }
.cl-badge.ok { padding: 2px 9px; border-radius: 999px; background: #d9f1d0; color: var(--ink); border: 1.5px solid var(--ink); }
.cl-badge.lock { color: #6b5a2c; }
.cl-badge.soon { padding: 2px 9px; border-radius: 999px; background: #fff0c4; color: var(--ink); border: 1.5px dashed var(--ink); }
.cl-price { font-size: 15px; font-weight: 800; white-space: nowrap; }
.cl-price small { font-size: 11px; font-weight: 700; color: #4d7184; }
.cl-buy { position: relative; z-index: 2; padding: 5px 14px; border: 2px solid var(--ink); border-radius: 999px; background: var(--gold); font-weight: 800; font-size: 14px; box-shadow: 2px 2px 0 var(--ink); transition: transform .15s; }
.cl-buy:hover { transform: translateY(-2px) rotate(-2deg); }
.cl-tier { position: absolute; top: 16px; left: 16px; padding: 1px 8px; border-radius: 999px; border: 1.5px solid var(--ink); font-size: 10.5px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; background: white; pointer-events: none; }
.cl-tier.free { background: var(--mint); }
.cl-tier.points { background: #ffe9a8; }
.cl-tier.achievement { background: #ffd2e0; }
.cl-tier.premium { background: linear-gradient(90deg, #7fdcff, #2fb6ea); }

/* rules + split */
.cl-rules { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 22px 40px; padding: clamp(50px, 6vw, 90px) max(5vw, calc((100vw - 1240px) / 2)); background: var(--ink); color: var(--cream); }
.cl-rules-head { grid-column: 1 / -1; }
.cl-rules h2 { margin: 0; font-size: clamp(32px, 4vw, 54px); line-height: 1; letter-spacing: -.03em; }
.cl-rules h2::after { content: ''; display: block; width: 90px; height: 6px; margin-top: 14px; border-radius: 6px; background: var(--bean); rotate: -2deg; }
.cl-tiers { margin: 0; padding: 0; list-style: none; display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.cl-tiers li { display: grid; align-content: start; gap: 4px; padding: 16px 18px; border-radius: 20px; border: 2px solid var(--cream); line-height: 1.45; }
.cl-tiers li b { font-size: 18px; }
.cl-tiers li span { font-size: 15px; color: #cfe4ee; }
.cl-tiers .tier-0 b { color: #a9f0c0; } .cl-tiers .tier-1 b { color: var(--gold); } .cl-tiers .tier-2 b { color: var(--pink); } .cl-tiers .tier-3 b { color: #7fdcff; }
.cl-split { padding: 20px 22px; border-radius: 24px; background: var(--cream); color: var(--ink); border: 2px solid var(--cream); box-shadow: 5px 6px 0 #2fb6ea; align-self: start; }
.cl-split h3 { margin: 0 0 12px; font-size: 22px; }
.cl-split-bar { display: flex; height: 52px; border: var(--line); border-radius: 999px; overflow: hidden; font-weight: 800; font-size: 18px; }
.cl-split-bar span { flex: 1; display: flex; align-items: center; justify-content: center; gap: 8px; }
.cl-split-bar .burn { background: linear-gradient(90deg, #ff9a5a, #ff6a4d); border-right: var(--line); }
.cl-split-bar .tre { background: linear-gradient(90deg, #7fdcff, #2fb6ea); }
.cl-split-bar.all .burn { border-right: 0; }
.cl-split-keys { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 12px; }
.cl-split-keys.one { grid-template-columns: 1fr; }
.cl-split-keys p { margin: 0; display: grid; gap: 2px; font-size: 13.5px; line-height: 1.4; color: #3f6478; }
.cl-split-keys b { color: var(--ink); font-size: 15px; }
.cl-split-eg { margin: 14px 0 0; padding-top: 12px; border-top: 2px dashed #092c4433; font-family: var(--hand); font-weight: 600; font-size: 17px; }
.cl-fine { grid-column: 1 / -1; margin: 6px 0 0; font-size: 14px; color: #a9c6d3; max-width: 60em; }

/* burn dashboard */
.cl-burn { padding: clamp(60px, 7vw, 110px) max(5vw, calc((100vw - 1240px) / 2)); background: linear-gradient(#fff3d9, var(--cream)); scroll-margin-top: 70px; }
.cl-burn-head { max-width: 760px; margin-bottom: 28px; }
.cl-h2 { margin: 0 0 12px; font-size: clamp(40px, 5.4vw, 76px); line-height: .95; letter-spacing: -.035em; font-weight: 900; text-transform: uppercase; }
.cl-burn-tiles { margin: 0 0 22px; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.cl-burn-tiles li { display: grid; gap: 6px; padding: 18px 20px; border: var(--line); border-radius: 22px; background: white; box-shadow: var(--shadow); }
.cl-burn-tiles li b { font-size: clamp(26px, 2.6vw, 38px); line-height: 1; letter-spacing: -.02em; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cl-burn-tiles li.long b { font-size: clamp(20px, 1.9vw, 30px); padding-top: .2em; }
.cl-burn-tiles li span { font-size: 14px; font-weight: 600; color: #3f6478; }
.cl-burn-tiles li.hot { background: linear-gradient(135deg, #ffd9a6, #ff9a5a); }
.cl-burn-tiles li.hot span { color: var(--ink); }
.cl-burn-body { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 20px; }
.cl-recent, .cl-contracts { padding: 18px 20px; border: var(--line); border-radius: 22px; background: white; box-shadow: var(--shadow); min-width: 0; }
.cl-recent-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.cl-recent h3, .cl-contracts h3 { margin: 0; font-size: 20px; }
.cl-contracts h3 { margin-bottom: 10px; }
.cl-recent table { width: 100%; border-collapse: collapse; font-size: 14.5px; font-variant-numeric: tabular-nums; }
.cl-recent th { text-align: left; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: #4d7184; padding: 6px 8px 8px 0; border-bottom: 2px solid var(--ink); }
.cl-recent td { padding: 9px 8px 9px 0; border-bottom: 1.5px dashed #092c4426; white-space: nowrap; }
.cl-recent td:first-child { white-space: normal; font-weight: 700; }
.cl-recent td.burned { color: #c2410c; font-weight: 800; }
.cl-recent td a { text-decoration: underline; text-underline-offset: 3px; }
.cl-contracts dl { margin: 0; display: grid; gap: 10px; }
.cl-contracts dl div { display: grid; gap: 2px; }
.cl-contracts dt { font-size: 13px; font-weight: 700; color: #4d7184; }
.cl-contracts dd { margin: 0; display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; font-weight: 700; }
.cl-contracts dd a { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 14.5px; text-decoration: underline; text-underline-offset: 3px; }
.cl-contracts dd small { font-size: 13px; color: #3f6478; }

/* checkout */
.co-backdrop { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; padding: 18px; background: #092c4470; backdrop-filter: blur(4px); animation: co-in .2s ease-out; }
.co-box { position: relative; width: min(470px, 100%); max-height: calc(100vh - 36px); overflow: auto; padding: 22px; border: var(--line); border-radius: 26px; background: var(--cream); box-shadow: 6px 8px 0 var(--ink); outline: none; animation: co-pop .28s cubic-bezier(.3,1.5,.5,1); }
@keyframes co-in { from { opacity: 0; } }
@keyframes co-pop { from { transform: translateY(14px) scale(.96); opacity: 0; } }
.co-close { position: absolute; top: 14px; right: 14px; }
.co-head { display: flex; gap: 14px; align-items: center; padding-right: 40px; margin-bottom: 16px; }
.co-art { flex: none; display: grid; place-items: center; width: 92px; height: 92px; border-radius: 18px; border: 2px solid var(--ink); background: radial-gradient(circle at 50% 60%, white, #e5f5fb 70%); overflow: hidden; }
.co-art img { max-width: 88%; max-height: 88%; object-fit: contain; }
.co-head .eyebrow { margin: 0 0 2px; font-size: 12px; }
.co-head h2 { margin: 0; font-size: 26px; line-height: 1.05; }
.co-note { margin: 4px 0 0; font-size: 14px; color: #4d7184; }
.co-split { margin: 0 0 16px; display: grid; gap: 0; border: 2px solid var(--ink); border-radius: 16px; overflow: hidden; background: white; }
.co-split div { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 14px; }
.co-split div + div { border-top: 1.5px dashed #092c4430; }
.co-split dt { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; font-size: 14.5px; }
.co-split dd { margin: 0; font-weight: 800; font-variant-numeric: tabular-nums; }
.co-split dd small { font-size: 11px; color: #4d7184; }
.co-split .price { background: #e3f6fd; }
.co-split .price dd { font-size: 20px; }
.co-split .burn dt { color: #c2410c; }
.co-steps, .co-actions { display: grid; gap: 10px; }
.co-actions { grid-auto-flow: column; justify-content: start; flex-wrap: wrap; }
.co-msg { margin: 0; padding: 12px 14px; border-radius: 14px; background: #fff0c4; border: 2px solid #e8c25a; font-size: 14.5px; line-height: 1.45; }
.co-msg.ok { background: #d9f1d0; border-color: #7cc48a; }
.co-msg a { text-decoration: underline; font-weight: 700; }
.co-err { margin: 10px 0 0; padding: 10px 14px; border-radius: 14px; background: #ffe0e6; border: 2px solid #e2477e; font-size: 14px; line-height: 1.4; overflow-wrap: anywhere; }
.co-tx { margin: 10px 0 0; font-size: 14px; } .co-tx a { text-decoration: underline; }
.co-fine { margin: 14px 0 0; font-size: 12.5px; color: #4d7184; line-height: 1.45; }
.co-contracts { margin: 6px 0 0; font-size: 12.5px; color: #4d7184; line-height: 1.5; }
.co-contracts a { text-decoration: underline; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.co-done { display: grid; gap: 8px; text-align: center; justify-items: center; }
.co-done-title { margin: 0; font-size: 34px; color: var(--bean-deep); rotate: -2deg; }
.co-done p { margin: 0; }
.co-done .co-actions { justify-content: center; margin-top: 6px; }

/* toast */
.cl-toast { position: fixed; left: 50%; bottom: 22px; z-index: 210; display: grid; gap: 2px; min-width: min(340px, 90vw); max-width: 90vw; padding: 12px 18px; border: var(--line); border-radius: 20px; background: var(--ink); color: var(--cream); box-shadow: 4px 5px 0 var(--bean); transform: translate(-50%, 140%); opacity: 0; transition: transform .35s cubic-bezier(.3,1.4,.5,1), opacity .25s; pointer-events: none; }
.cl-toast.show { transform: translate(-50%, 0); opacity: 1; pointer-events: auto; }
.cl-toast b { font-size: 17px; }
.cl-toast span { font-size: 14px; color: #cfe4ee; }
.cl-toast a { margin-top: 4px; color: var(--gold); font-weight: 800; text-decoration: underline; text-underline-offset: 3px; }

@media (max-width: 1100px) {
  .cl-burn-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .cl-hero { grid-template-columns: 1fr; padding-top: 30px; }
  .cl-hero-art { rotate: 0deg; }
  .cl-room { grid-template-columns: 1fr; }
  .cl-stage { position: relative; top: 0; height: 68vh; min-height: 440px; max-height: 620px; }
  .cl-rules { grid-template-columns: 1fr; }
  .cl-burn-body { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .cl-testnet { flex-direction: column; gap: 6px; text-align: center; font-size: 14px; }
  .cl-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .cl-item { padding: 8px 8px 10px; border-radius: 18px; }
  .cl-item-note { display: none; }
  .cl-tier { top: 12px; left: 12px; font-size: 9.5px; }
  .cl-tiers { grid-template-columns: 1fr; }
  .cl-split-keys { grid-template-columns: 1fr; }
  .cl-stage { height: auto; min-height: 0; max-height: none; display: flex; flex-direction: column; border-radius: 24px; }
  .cl-viewer { position: relative; inset: auto; height: 54vh; min-height: 330px; max-height: 470px; }
  .cl-stage-foot { position: relative; left: auto; right: auto; bottom: auto; margin: 0 10px 10px; padding: 10px; }
  .cl-stage-actions .button { flex: 1 1 auto; min-height: 44px; padding: 8px 14px; font-size: 14px; }
  .cl-stage-hint { font-size: 12.5px; }
  .cl-recent { overflow-x: auto; }
  .co-actions { grid-auto-flow: row; }
}
@media (prefers-reduced-motion: reduce) {
  .cl-loading img, .co-backdrop, .co-box { animation: none; }
  .cl-toast { transition: opacity .2s; }
}
html[data-motion="off"] .cl-loading img { animation: none; }

/* ---------- connect-wallet dialog (our own, not a third-party modal) ---------- */
.cw-backdrop { position: fixed; inset: 0; z-index: 220; display: grid; place-items: center; padding: 16px; background: #092c4470; backdrop-filter: blur(4px); animation: co-in .2s ease-out; }
.cw-box { position: relative; width: min(420px, 100%); max-height: calc(100dvh - 32px); overflow: auto; border: var(--line); border-radius: 28px; background: var(--cream); box-shadow: 6px 8px 0 var(--ink); outline: none; animation: co-pop .3s cubic-bezier(.3,1.5,.5,1); color: var(--ink); }
.cw-box svg { width: 1.1em; height: 1.1em; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.cw-head { position: sticky; top: 0; z-index: 2; display: grid; grid-template-columns: 40px 1fr 40px; align-items: center; gap: 8px; padding: 14px 14px 12px; background: var(--cream); border-bottom: 2px dashed #092c4426; }
.cw-head h2 { margin: 0; text-align: center; font-size: 20px; font-weight: 900; letter-spacing: -.01em; }
.cw-head-bean { width: 40px; height: 40px; object-fit: contain; rotate: -8deg; }
.cw-round { display: grid; place-items: center; width: 40px; height: 40px; padding: 0; border: 2px solid var(--ink); border-radius: 50%; background: white; box-shadow: 2px 2px 0 var(--ink); transition: transform .15s; }
.cw-round:hover { transform: translateY(-2px) rotate(-6deg); background: var(--gold); }
.cw-body { padding: 14px 18px 20px; animation: cw-slide .28s cubic-bezier(.3,1.3,.5,1); }
@keyframes cw-slide { from { opacity: 0; transform: translateX(14px); } }
.cw-sub { margin: 0 0 12px; font-size: 14px; line-height: 1.45; color: #3f6478; }
.cw-group { margin: 16px 0 8px; font-size: 12px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: #29627a; }
.cw-list { margin: 0; padding: 0; list-style: none; display: grid; gap: 9px; }
.cw-opt { width: 100%; display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 2px solid var(--ink); border-radius: 18px; background: white; box-shadow: 3px 4px 0 var(--ink); text-align: left; transition: transform .18s cubic-bezier(.3,1.6,.5,1), box-shadow .18s, background .15s; }
.cw-opt:hover:not(:disabled) { transform: translate(-1px, -3px) rotate(-.6deg); box-shadow: 5px 7px 0 var(--ink); background: #f1fbff; }
.cw-opt:active:not(:disabled) { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--ink); }
.cw-opt:disabled { opacity: .6; }
.cw-ico { flex: none; display: grid; place-items: center; width: 44px; height: 44px; border: 2px solid var(--ink); border-radius: 14px; background: var(--cream); overflow: hidden; }
.cw-ico img { width: 30px; height: 30px; object-fit: contain; }
.cw-ico svg { width: 24px; height: 24px; }
.cw-ico.phone { background: linear-gradient(135deg, #7fdcff, #2fb6ea); }
.cw-opt-text { flex: 1; min-width: 0; display: grid; gap: 1px; }
.cw-opt-text b { font-size: 16.5px; line-height: 1.2; }
.cw-opt-text small { font-size: 12.5px; color: #4d7184; line-height: 1.3; }
.cw-opt:not(.wc) .cw-opt-text small { width: fit-content; padding: 0 7px; border-radius: 999px; background: #d9f1d0; color: var(--ink); font-weight: 700; font-size: 11px; letter-spacing: .04em; }
.cw-go { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--ink); color: var(--cream); transition: transform .2s; }
.cw-go svg { width: 16px; height: 16px; stroke-width: 3; }
.cw-opt:hover .cw-go { transform: translateX(3px); background: var(--bean-deep); }
.cw-empty { padding: 12px 14px; border: 2px dashed #092c4440; border-radius: 16px; background: #fffdf5; font-size: 14px; line-height: 1.45; }
.cw-empty p { margin: 0; }
.cw-get { margin-top: 6px !important; display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; color: #4d7184; }
.cw-get a { font-weight: 800; color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.cw-skel { display: grid; gap: 9px; }
.cw-skel i { display: block; height: 68px; border-radius: 18px; background: linear-gradient(90deg, #f3ecd6 25%, #fff9e9 50%, #f3ecd6 75%) 0 0 / 200% 100%; animation: cw-shimmer 1.2s linear infinite; }
@keyframes cw-shimmer { to { background-position: -200% 0; } }
.cw-net { display: flex; align-items: center; gap: 8px; margin: 16px 0 0; padding: 9px 12px; border-radius: 14px; background: #e3f6fd; font-size: 12.5px; line-height: 1.4; color: #29627a; font-weight: 600; }
.cw-net i { flex: none; width: 9px; height: 9px; border-radius: 50%; background: #42cf7f; border: 2px solid var(--ink); }

.cw-center { display: grid; justify-items: center; text-align: center; gap: 10px; }
.cw-wait { position: relative; display: flex; align-items: center; gap: 14px; margin: 8px 0 4px; }
.cw-ico.big { width: 76px; height: 76px; border-radius: 22px; box-shadow: 3px 4px 0 var(--ink); background: white; }
.cw-ico.big img { width: 52px; height: 52px; }
.cw-ico.big svg { width: 38px; height: 38px; }
.cw-wait-bean { width: 64px; height: 64px; object-fit: contain; animation: cl-bob 1.4s ease-in-out infinite; }
.cw-dots { display: inline-flex; gap: 5px; }
.cw-dots i { width: 8px; height: 8px; border-radius: 50%; background: var(--bean); border: 1.5px solid var(--ink); animation: cw-dot 1s ease-in-out infinite; }
.cw-dots i:nth-child(2) { animation-delay: .15s; } .cw-dots i:nth-child(3) { animation-delay: .3s; }
@keyframes cw-dot { 50% { transform: translateY(-6px); background: var(--gold); } }
.cw-wait.err .cw-dots i { animation: none; background: #ff9cbc; }
.cw-wait.err .cw-wait-bean { animation: none; rotate: -10deg; filter: saturate(.6); }
.cw-wait-title { margin: 2px 0 0; font-size: 26px; color: var(--bean-deep); rotate: -1.5deg; }
.cw-wait-sub { margin: 0; max-width: 30em; font-size: 14px; line-height: 1.45; color: #3f6478; }
.cw-err { margin: 4px 0; padding: 10px 14px; border-radius: 14px; background: #ffe0e6; border: 2px solid #e2477e; font-size: 14px; line-height: 1.4; overflow-wrap: anywhere; }
.cw-qr-box { width: min(260px, 72vw); aspect-ratio: 1; padding: 14px; border: var(--line); border-radius: 24px; background: white; box-shadow: 4px 5px 0 var(--ink); color: var(--ink); rotate: -1deg; }
.cw-qr-box.loading { background: linear-gradient(90deg, #f3ecd6 25%, #fff9e9 50%, #f3ecd6 75%) 0 0 / 200% 100%; animation: cw-shimmer 1.2s linear infinite; }
.cw-box svg.cw-qr { display: block; width: 100%; height: 100%; fill: none; stroke: none; stroke-width: 0; }
.cw-row { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 2px; }
.cw-waiting { display: flex; align-items: center; gap: 10px; margin: 2px 0 0; font-size: 13.5px; font-weight: 700; color: #29627a; }
.cw-apps { width: 100%; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.cw-app { display: flex; align-items: center; justify-content: space-between; gap: 6px; padding: 12px 14px; border: 2px solid var(--ink); border-radius: 16px; background: white; box-shadow: 3px 3px 0 var(--ink); font-weight: 800; font-size: 15px; }
.cw-app svg { width: 16px; height: 16px; }
.cw-app.other { background: var(--gold); }
.cw-link { border: 0; background: none; padding: 4px; font-weight: 700; font-size: 14px; color: var(--bean-deep); text-decoration: underline; text-underline-offset: 3px; }
@media (max-width: 560px) {
  .cw-backdrop { place-items: end center; padding: 0; }
  .cw-box { width: 100%; max-height: 92dvh; border-radius: 28px 28px 0 0; border-bottom: 0; box-shadow: 0 -4px 0 var(--ink); animation: cw-up .32s cubic-bezier(.3,1.2,.5,1); }
  @keyframes cw-up { from { transform: translateY(40%); opacity: 0; } }
  .cw-body { padding-bottom: max(20px, env(safe-area-inset-bottom)); }
}
@media (prefers-reduced-motion: reduce) {
  .cw-backdrop, .cw-box, .cw-body, .cw-wait-bean, .cw-dots i, .cw-skel i, .cw-qr-box.loading { animation: none; }
}
html[data-motion="off"] .cw-wait-bean, html[data-motion="off"] .cw-dots i { animation: none; }

/* ================= one-screen Closet (no page scroll, like the Playground and Bean Bounce) ================= */
html:has(body[data-page="closet"]), body[data-page="closet"] { height: 100%; overflow: hidden; overscroll-behavior: none; }
body[data-page="closet"] .site-header { position: fixed; left: 0; right: 0; }
.cl-room.cl-app { position: fixed; inset: var(--header-h, 99px) 0 0; z-index: 1; height: auto; padding: 14px max(16px, calc((100vw - 1440px) / 2)) 16px; grid-template-columns: minmax(0, 1.1fr) minmax(400px, 1fr); gap: clamp(14px, 2vw, 26px); align-items: stretch; }
.cl-app .cl-stage { position: relative; top: 0; height: auto; min-height: 0; max-height: none; }
.cl-app .cl-panel { display: flex; flex-direction: column; gap: 10px; min-height: 0; }
.cl-app .cl-panel > * { flex: none; }
.cl-stage-net { display: none; }

/* panel head: title, sheets, network */
.cl-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px 14px; flex-wrap: wrap; }
.cl-head .eyebrow { margin: 0 0 4px; font-size: 11.5px; }
.cl-title-sm { margin: 0; font-size: clamp(26px, 2.5vw, 38px); line-height: .95; font-weight: 900; text-transform: uppercase; letter-spacing: -.03em; }
.cl-title-sm .accent { display: inline-block; rotate: -3deg; }
.cl-head-btns { display: flex; gap: 8px; }
.cl-chipbtn { display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; border: 2px solid var(--ink); border-radius: 999px; background: white; color: var(--ink); font-weight: 800; font-size: 14px; box-shadow: 2px 2px 0 var(--ink); transition: transform .15s; }
.cl-chipbtn:hover { transform: translateY(-2px); }
.cl-chipbtn.hot { background: linear-gradient(90deg, #ffd9a6, #ff9a5a); }
.cl-net { display: flex; align-items: center; gap: 10px; margin: 0; padding: 5px 14px 5px 5px; border-radius: 999px; background: var(--gold); border: 2px solid var(--ink); font-size: 13.5px; font-weight: 600; line-height: 1.3; }
.cl-net b { flex: none; padding: 2px 10px; border-radius: 999px; background: var(--ink); color: var(--gold); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; }
.cl-net.main { background: var(--mint); }
.cl-net.main b { color: var(--mint); }

/* compact wallet row */
.cl-app .cl-wallet { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 8px 12px; border-radius: 18px; box-shadow: 3px 3px 0 var(--ink); }
.cl-app .cl-wallet-who { flex: 1 1 auto; }
.cl-app .cl-wallet .button.cl-small { min-height: 38px; padding: 6px 14px; font-size: 14px; }
.cl-app .cl-wallet small { font-size: 12.5px; }
.cl-app .cl-faucet small { flex-basis: 100%; }

/* the item grid is the only part that scrolls, inside its own box */
.cl-app .cl-grid { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; align-content: start; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; padding: 4px 12px 14px 4px; margin-right: -8px; scrollbar-width: thin; scrollbar-color: #092c4455 transparent; }
.cl-app .cl-item-art { aspect-ratio: 3 / 2; }
.cl-app .cl-tab-note { padding: 7px 12px; font-size: 13px; }

/* sheets */
.cl-sheet-backdrop { position: fixed; inset: 0; z-index: 1000; display: grid; place-items: center; padding: 16px; background: #092c4470; backdrop-filter: blur(4px); animation: co-in .2s ease-out; }
.cl-sheet { position: relative; width: min(1040px, 100%); max-height: calc(100dvh - 32px); overflow: auto; overscroll-behavior: contain; border: var(--line); border-radius: 28px; background: var(--cream); color: var(--ink); box-shadow: 6px 8px 0 var(--ink); outline: none; animation: co-pop .3s cubic-bezier(.3,1.5,.5,1); }
.cl-sheet.dark { background: var(--ink); color: var(--cream); border-color: var(--cream); box-shadow: 6px 8px 0 var(--bean); }
.cl-sheet svg { width: 1.1em; height: 1.1em; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.cl-sheet-close { position: absolute; top: 14px; right: 14px; z-index: 3; color: var(--ink); }
.cl-sheet .cl-rules { padding: clamp(24px, 3vw, 36px); background: transparent; }
.cl-sheet .cl-rules h2 { font-size: clamp(28px, 3vw, 42px); padding-right: 50px; }
.cl-rules-lede { margin: 12px 0 0; max-width: 46em; font-size: 16px; line-height: 1.5; color: #cfe4ee; }
.cl-sheet .cl-burn { padding: clamp(24px, 3vw, 36px); background: transparent; }
.cl-sheet .cl-burn-head { margin-bottom: 18px; padding-right: 50px; }
.cl-sheet .cl-h2 { font-size: clamp(30px, 3.6vw, 52px); }
.cl-sheet .cl-burn-tiles li b { font-size: clamp(22px, 2.2vw, 32px); }

/* not much height (laptops): smaller cards, no notes */
@media (max-height: 820px) and (min-width: 861px) {
  .cl-app .cl-item-note { display: none; }
  .cl-app .cl-grid { grid-template-columns: repeat(auto-fill, minmax(136px, 1fr)); }
  .cl-app .cl-wallet small { display: none; }
}

/* phones and narrow tablets: the dressing room on top, the items below */
@media (max-width: 860px) {
  .cl-room.cl-app { grid-template-columns: 1fr; grid-template-rows: minmax(0, 44fr) minmax(0, 56fr); padding: 8px 10px 10px; gap: 8px; }
  .cl-app .cl-stage { display: block; border-radius: 22px; box-shadow: 4px 5px 0 var(--ink); }
  .cl-app .cl-viewer { position: absolute; inset: 0 0 58px; height: auto; min-height: 0; max-height: none; }
  .cl-app .cl-stage-hint { display: none; }
  .cl-app .cl-stage-foot { position: absolute; left: 8px; right: 8px; bottom: 8px; margin: 0; padding: 6px; gap: 6px; border-radius: 16px; grid-template-columns: minmax(0, 1fr) auto; align-items: center; }
  .cl-app .cl-pieces { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .cl-app .cl-pieces li { flex: none; font-size: 12.5px; }
  .cl-app .cl-locked-note { display: none; }
  .cl-app .cl-stage-actions { flex-wrap: nowrap; }
  .cl-app .cl-stage-actions .button { min-height: 36px; padding: 5px 12px; font-size: 13px; flex: none; }
  .cl-app .cl-stage-actions .button.pale { display: none; }
  .cl-app .cl-panel { gap: 7px; }
  .cl-head .eyebrow, .cl-app .cl-wallet small { display: none; }
  .cl-title-sm { font-size: 22px; }
  .cl-chipbtn { padding: 5px 11px; font-size: 13px; }
  .cl-net { font-size: 12px; padding: 3px 10px 3px 3px; }
  .cl-net span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .cl-app .cl-wallet { padding: 6px 8px; border-radius: 14px; }
  .cl-app .cl-tabs { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
  .cl-app .cl-tabs button { flex: none; padding: 6px 12px; font-size: 13.5px; }
  .cl-app .cl-grid { grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 8px; padding: 2px 8px 10px 2px; }
  .cl-app .cl-item { padding: 6px 6px 8px; border-radius: 16px; }
  .cl-app .cl-item-name { font-size: 13.5px; }
  .cl-app .cl-item-note { display: none; }
  .cl-app .cl-tier { top: 10px; left: 10px; font-size: 9px; }
  .cl-app .cl-badge { font-size: 11px; }
  .cl-app .cl-price { font-size: 13px; }
  .cl-app .cl-buy { padding: 3px 10px; font-size: 12.5px; }
  .cl-sheet-backdrop { padding: 8px; }
  .cl-sheet { border-radius: 22px; max-height: calc(100dvh - 16px); }
}
@media (max-width: 560px) {
  .cl-head > div:first-child, .cl-app .cl-net, .cl-app .cl-panel > .cl-tab-note:last-child { display: none; }
  .cl-head { align-items: center; }
  .cl-head-btns { width: 100%; }
  .cl-head-btns .cl-chipbtn { flex: 1; justify-content: center; }
  .cl-stage-net { display: block; position: absolute; top: 10px; left: 10px; z-index: 2; padding: 2px 10px; border-radius: 999px; border: 2px solid var(--ink); background: var(--gold); font-size: 10.5px; font-weight: 900; letter-spacing: .12em; text-transform: uppercase; }
  .cl-stage-net.main { background: var(--mint); }
  .cl-app .cl-wallet { padding: 0; border: 0; background: none; box-shadow: none; }
  .cl-app .cl-wallet .button.cl-small { min-height: 34px; padding: 4px 12px; font-size: 13px; }
  .cl-app .cl-wallet-who a { font-size: 13px; }
  .cl-app .cl-bal { font-size: 12.5px; padding: 2px 9px; }
}
