/* fitur toko: saldo Scales di HUD, lembar kedai pancing (washi + pita merah 店), kartu barang, coba-pakai.
   Scales = sisik ikan perak-hijau (beda dari koban emas). */

/* ── ikon sisik ── */
i.sc { display: inline-block; flex: none; width: 13px; height: 15px; vertical-align: -2px; border-radius: 50% 50% 46% 46% / 62% 62% 38% 38%; background: radial-gradient(120% 90% at 35% 18%, #f4fbf7 0 18%, #a9d3c6 38%, #4f8f86 72%, #2d5c58); box-shadow: inset 0 -3px 0 -1px rgba(255, 255, 255, 0.35), inset 0 0 0 1px rgba(20, 50, 48, 0.45); position: relative; }
i.sc::after { content: ''; position: absolute; left: 3px; right: 3px; bottom: 3px; height: 5px; border-radius: 0 0 50% 50%; border-bottom: 1.5px solid rgba(255, 255, 255, 0.55); }

/* ── chip HUD (sama dengan pita tinta koban) ── */
.scales-chip { display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 18px; white-space: nowrap; background: var(--wash); color: var(--washi); -webkit-mask: var(--brush-w) 0 0 / 100% 100% no-repeat; mask: var(--brush-w) 0 0 / 100% 100% no-repeat; font: 700 15px var(--ui); font-variant-numeric: lining-nums tabular-nums; transition: background 0.2s; }
.scales-chip:hover { background: rgba(21, 18, 14, 0.86); }
.scales-chip.bump i.sc { animation: scBump 0.6s ease; }
@keyframes scBump { 30% { transform: scale(1.45) rotate(-10deg); } }
/* "+N Scales" melayang di bawah chip */
.scales-pop { position: fixed; z-index: 26; display: inline-flex; align-items: center; gap: 7px; padding: 6px 16px 7px 12px; background: var(--washi) var(--fibre) 0 0 / 320px; color: var(--ink); filter: drop-shadow(0 6px 12px rgba(10, 8, 5, 0.35)); pointer-events: none; animation: scPop 2.6s ease forwards; white-space: nowrap; }
.scales-pop b { font: 800 18px var(--display); font-variant-numeric: lining-nums; color: #2f6b63; }
.scales-pop small { font: 700 12.5px var(--sc); letter-spacing: 0.06em; color: var(--ink-3); }
@keyframes scPop { 0% { opacity: 0; transform: translateY(-6px) scale(0.9); } 12% { opacity: 1; transform: none; } 75% { opacity: 1; } 100% { opacity: 0; transform: translateY(10px); } }
/* baris di kartu hasil */
.rv-scales { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 8px; margin: -4px 0 12px; padding: 7px 10px 8px; background: rgba(79, 143, 134, 0.1); box-shadow: inset 2px 0 0 #4f8f86; }
.rv-scales[hidden] { display: none; }
.rv-scales i.sc { align-self: center; }
.rv-scales b { font: 800 17px var(--display); color: #2f6b63; font-variant-numeric: lining-nums; }
.rv-scales small { font-size: 13px; color: var(--ink-3); }

/* ── lembar kedai ── */
.shop-sheet { place-items: center end; padding-right: clamp(16px, 4vw, 56px); background: linear-gradient(270deg, rgba(15, 13, 11, 0.5), rgba(15, 13, 11, 0) 62%); }
.shop-card { width: min(470px, 100%); display: flex; flex-direction: column; padding-bottom: 16px; }
.shop-card > * { flex-shrink: 0; }
.shop-card > .sh-grid { flex-shrink: 1; }
#shopSheet .sheet-card::before { content: '店'; }
.shop-card h2 { margin-bottom: 6px; }
.sh-purse { display: flex; align-items: center; gap: 8px; margin: 0 0 8px; }
.sh-purse i.sc { width: 16px; height: 19px; }
.sh-purse b { font: 800 26px var(--display); font-variant-numeric: lining-nums tabular-nums; }
.sh-purse span { font: 600 14px var(--sc); letter-spacing: 0.06em; color: var(--ink-2); }
.sh-purse small { margin-left: auto; font: 500 13px var(--sc); letter-spacing: 0.04em; color: var(--ink-3); font-variant-numeric: lining-nums tabular-nums; }
.sh-tabs { margin: 0 0 10px -4px; }
.sh-seal { display: inline-grid; place-items: center; width: 18px; height: 18px; margin-right: 6px; vertical-align: -3px; font: 400 12px/1 var(--kanji); color: #2a1d08; background: linear-gradient(135deg, #f7e08a, #c9973a 55%, #8a5f17); border-radius: 3px; }
.sh-seal.big { width: 38px; height: 38px; font-size: 22px; border-radius: 5px; flex: none; transform: rotate(-4deg); }

/* kisi barang: label spesimen washi */
.sh-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; overflow: auto; min-height: 120px; max-height: 46vh; padding: 2px; margin: 0 -2px; scrollbar-width: thin; }
.sh-item { position: relative; display: flex; flex-direction: column; align-items: stretch; gap: 3px; min-width: 0; padding: 6px 6px 8px; text-align: left; border-radius: var(--r); background: rgba(255, 251, 242, 0.55); box-shadow: inset 0 0 0 1px var(--line); transition: background 0.15s, box-shadow 0.15s, transform 0.12s; }
.sh-item:hover { background: rgba(255, 251, 242, 0.9); box-shadow: inset 0 0 0 1px rgba(31, 28, 24, 0.35); }
.sh-item:active { transform: scale(0.98); }
.sh-item.sel { background: #fffaf0; box-shadow: inset 0 0 0 2px var(--ink); }
.sh-item.on { box-shadow: inset 0 0 0 2px var(--shu); }
.sh-item.sel.on { box-shadow: inset 0 0 0 2px var(--shu), 0 0 0 2px var(--ink); }
.sh-item.on::after { content: ''; position: absolute; top: 6px; right: 6px; width: 7px; height: 7px; background: var(--shu); }
.sh-prev { display: grid; place-items: center; aspect-ratio: 1; border-radius: var(--r); overflow: hidden; background: radial-gradient(80% 70% at 50% 40%, #fbf5e7, #e9dfc7); }
.sh-prev img { width: 100%; height: 100%; object-fit: cover; display: block; }
.sh-k { font: 400 34px/1 var(--kanji); color: rgba(31, 28, 24, 0.22); }
.sh-item b { font: 700 14.5px/1.15 var(--display); color: var(--ink); overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; min-height: 2.3em; }
.sh-price, .sh-tag { display: inline-flex; align-items: center; gap: 5px; font: 700 13.5px var(--ui); font-variant-numeric: lining-nums tabular-nums; color: var(--ink-2); }
.sh-price.short { color: var(--ink-3); }
.sh-price.short i.sc { filter: grayscale(0.8) opacity(0.7); }
.sh-tag { font: 700 12.5px var(--sc); letter-spacing: 0.05em; color: var(--moss); }
.sh-tag.on { color: var(--shu-d); }
.sh-tag.lock { color: var(--gold); }
.sh-item.locked .sh-prev img { filter: grayscale(0.55) brightness(0.92); }
.sh-item.gold .sh-prev { background: radial-gradient(80% 70% at 50% 40%, #fbf1d2, #e4cf98); }
/* stempel "買" saat membeli */
.sh-stamp { position: absolute; left: 50%; top: 32%; width: 46px; height: 46px; margin: -23px 0 0 -23px; display: grid; place-items: center; font: 400 26px/1 var(--kanji); color: var(--washi); background: var(--shu); box-shadow: inset 0 0 0 2px var(--shu), inset 0 0 0 3px rgba(243, 234, 214, 0.75); -webkit-mask: var(--grain) 0 0 / 120px; mask: var(--grain) 0 0 / 120px; animation: shStamp 1.4s ease forwards; pointer-events: none; }
@keyframes shStamp { 0% { opacity: 0; transform: scale(1.8) rotate(-18deg); } 18% { opacity: 1; transform: scale(1) rotate(-6deg); } 80% { opacity: 1; } 100% { opacity: 0; } }

/* rak pemegang terkunci */
.sh-lock { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 10px 12px; margin-bottom: 10px; background: rgba(201, 151, 58, 0.12); box-shadow: inset 0 0 0 1px rgba(184, 137, 47, 0.45); }
.sh-lock[hidden] { display: none; }
.sh-lock > div { flex: 1 1 180px; min-width: 0; }
.sh-lock b { display: block; font: 800 16px var(--display); }
.sh-lock small { display: block; font-size: 13.5px; color: var(--ink-2); line-height: 1.35; }
.sh-lock .ghost { height: 38px; }

/* bilah beli (tetap di bawah kisi) */
.sh-buy { position: relative; display: flex; align-items: center; gap: 12px; padding: 14px 0 4px; margin-top: 10px; min-height: 70px; }
.sh-buy::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 4px; background: var(--rule) 0 0 / 100% 100% no-repeat; }
.sh-info { flex: 1; min-width: 0; }
.sh-info b { display: block; font: 800 18px/1.15 var(--display); }
.sh-info small { display: block; font: italic 500 14px/1.35 var(--display); color: var(--ink-2); }
.sh-buy .primary { width: auto; flex: none; min-width: 150px; padding: 0 22px; height: 48px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; font-size: 16px; white-space: nowrap; }
.sh-buy .primary i.sc { margin: 0 1px 0 3px; }
.sh-buy .primary.ghosty { background: var(--ink-2); }
.sh-hint { margin: 0; flex: 1; text-align: center; font: italic 500 15px var(--display); color: var(--ink-3); }
.sh-earn { margin-top: 8px; font-size: 14px; }
.sh-earn summary { cursor: pointer; font: 700 14px var(--sc); letter-spacing: 0.06em; color: var(--shu-d); list-style: none; display: flex; align-items: center; gap: 7px; }
.sh-earn summary::-webkit-details-marker { display: none; }
.sh-earn summary::before { content: '+'; display: inline-grid; place-items: center; width: 16px; height: 16px; font: 700 14px/1 var(--ui); color: var(--washi); background: var(--shu); }
.sh-earn[open] summary::before { content: '−'; }
.sh-earn .rules { margin: 8px 0 0; font-size: 14px; }
.shop-card .fine { margin-top: 8px; font-size: 12.5px; }
/* coba-pakai: HUD aksi disembunyikan supaya tokoh terlihat */
body.shopping .act, body.shopping .prompt, body.shopping .stick, body.shopping .run-btn, body.shopping .leave-btn, body.shopping .feed, body.shopping .mylines, body.shopping .interact-chip { display: none !important; }

/* ── tautan di ruang ganti & menu ── */
.sh-open { display: flex; align-items: center; gap: 9px; text-align: left; }
.sh-open span { flex: 1; }
.sh-open b { font: 700 14.5px var(--ui); font-variant-numeric: lining-nums tabular-nums; color: var(--ink-2); }
.sh-dress .ghost.wide { margin-top: 0; color: var(--ink); }
.tab[data-pane='dress'] .sh-open { margin-top: 10px; }

/* laptop sedang: HUD kanan dirampingkan (chip Scales menambah lebar) — jumlah online jadi titik saja */
@media (max-width: 1700px) and (min-width: 761px) {
  .online { font-size: 0; gap: 0; padding: 0 16px; }
  .online i { width: 9px; height: 9px; }
  .scales-chip { padding: 0 14px; }
}
/* ── HP ── */
@media (max-width: 760px) {
  .scales-chip { padding: 0 13px; gap: 6px; font-size: 14px; height: 34px; }
  .shop-sheet { place-items: end center; padding: 0 8px 8px; background: linear-gradient(0deg, rgba(15, 13, 11, 0.45), rgba(15, 13, 11, 0) 70%); }
  .shop-card { width: 100%; max-height: 60vh; padding: 18px 14px 12px; }
  .shop-card h2 { font-size: 23px; }
  .shop-card > .kicker { font-size: 12.5px; }
  .sh-purse b { font-size: 21px; }
  .sh-grid { gap: 6px; max-height: none; flex: 1 1 auto; min-height: 150px; }
  .sh-item b { font-size: 13px; }
  .sh-buy { gap: 10px; min-height: 60px; padding-top: 10px; }
  .sh-info b { font-size: 16px; }
  .sh-info small { font-size: 13px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .sh-buy .primary { min-width: 0; padding: 0 16px; height: 44px; font-size: 14.5px; }
  .sh-earn { font-size: 13px; }
}
@media (max-width: 380px) {
  .sh-purse small { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .scales-pop, .sh-stamp, .scales-chip.bump i.sc { animation-duration: 0.01s; }
}
