/* Shared styles for 碧祺的客廳 pages (home, radio, shop). BiG Buddy keeps style.css. */
:root {
  --bg: #fff6f2; --surface: #ffffff; --ink: #3a2a2f; --muted: #8a7479;
  --pink: #f06292; --pink-soft: #fde3ec; --orange: #ff8a3d; --line: #f3d9df;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #1e1719; --surface: #2a2023; --ink: #f6e9ec; --muted: #b79ea5;
          --pink: #f48fb1; --pink-soft: #3d2730; --line: #43313a; color-scheme: dark; }
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--ink);
  font: 16px/1.65 -apple-system, BlinkMacSystemFont, "PingFang HK", "Noto Sans HK", "Microsoft JhengHei", sans-serif; }
a { color: var(--pink); }
.wrap { max-width: 1100px; margin: 0 auto; padding: 20px 16px 40px; }
.top { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.badge { width: 44px; height: 44px; flex: none; border-radius: 50%; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--pink), var(--orange)); color: #fff; font-weight: 800; font-size: 14px; text-decoration: none; }
.top h1 { margin: 0; font-size: 21px; line-height: 1.2; }
.top p { margin: 0; color: var(--muted); font-size: 13px; }
.back { margin-left: auto; font-size: 14px; text-decoration: none; border: 1px solid var(--line);
  background: var(--surface); border-radius: 999px; padding: 6px 12px; color: var(--muted); white-space: nowrap; }

/* Living room */
.room { position: relative; border-radius: 18px; overflow: hidden; box-shadow: 0 10px 40px rgba(58,42,47,.18); }
.room img { display: block; width: 100%; height: auto; }
.spot { position: absolute; display: block; border-radius: 16px; outline: none; }
.spot::after { content: attr(data-label); position: absolute; left: 50%; bottom: 8px; transform: translateX(-50%) translateY(4px);
  background: rgba(255,255,255,.95); color: #3a2a2f; font-size: 14px; font-weight: 700; padding: 5px 12px; border-radius: 999px;
  white-space: nowrap; box-shadow: 0 2px 10px rgba(0,0,0,.2); opacity: 0; transition: opacity .2s, transform .2s; pointer-events: none; }
.spot:hover, .spot:focus-visible { box-shadow: inset 0 0 0 3px rgba(255,255,255,.85), 0 0 30px rgba(255,200,150,.55); background: rgba(255,230,200,.12); }
.spot:hover::after, .spot:focus-visible::after { opacity: 1; transform: translateX(-50%); }
/* Label placement per object, so labels never cover the radio or 碧祺's face */
.spot.label-above::after { bottom: calc(100% + 4px); }
.spot.label-below::after { bottom: auto; top: calc(100% + 4px); }
.spot.label-left::after  { left: 0; transform: translateY(4px); }
.spot.label-right::after { left: auto; right: 0; transform: translateY(4px); }
.spot.label-left:hover::after, .spot.label-left:focus-visible::after,
.spot.label-right:hover::after, .spot.label-right:focus-visible::after { transform: none; }
/* Touch screens: labels always visible, shorter text */
@media (hover: none) {
  .spot::after { content: attr(data-short); opacity: 1; transform: translateX(-50%); font-size: 11px; padding: 3px 8px; bottom: 4px; }
  .spot.label-above::after { bottom: calc(100% + 3px); }
  .spot.label-below::after { bottom: auto; top: calc(100% + 3px); }
  .spot.label-left::after, .spot.label-right::after { transform: none; }
}
/* Wide picture on landscape screens; tall picture (about 60% of the screen height) on portrait screens */
.room-tall { display: none; }
@media (orientation: portrait), (max-width: 720px) {
  .room-wide { display: none; }
  .room-tall { display: block; width: min(100%, calc(60vh * 0.75)); margin: 0 auto; }
}
.intro { max-width: 720px; margin: 14px auto 0; text-align: center; color: var(--ink); font-size: 15px; }
.hint { text-align: center; color: var(--muted); font-size: 13px; margin: 6px 0 0; }
/* Small doors along the bottom */
.doors { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin-top: 18px; }
.door { padding: 5px 11px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface);
  color: var(--ink); text-decoration: none; font-size: 13px; white-space: nowrap; }
@media (max-width: 420px) { .doors { gap: 5px; } .door { padding: 4px 9px; font-size: 12px; } }
.door:hover { border-color: var(--pink); background: var(--pink-soft); }

/* Content pages */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 16px 18px; margin: 12px 0; }
.card h2 { margin: 0 0 4px; font-size: 18px; }
.card p { margin: 4px 0 10px; color: var(--muted); font-size: 15px; }
audio { width: 100%; }
.note { font-size: 13px; color: var(--muted); }
.soon { display: inline-block; font-size: 12px; font-weight: 700; color: var(--pink); border: 1px solid var(--pink); border-radius: 999px; padding: 1px 8px; margin-left: 6px; }
.foot { text-align: center; font-size: 12px; color: var(--muted); margin-top: 26px; }

/* Shop */
.shop-note { color: var(--ink) !important; background: var(--pink-soft); border-radius: 10px; padding: 8px 12px; }
.products { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin: 12px 0; }
.product { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; display: flex; flex-direction: column; }
.product img, .product .noimg { width: 100%; aspect-ratio: 1; object-fit: cover; display: block; background: var(--pink-soft); }
.product .noimg { display: grid; place-items: center; font-size: 48px; }
.pbody { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.pbody h3 { margin: 0; font-size: 16px; }
.pbody p { margin: 0; color: var(--muted); font-size: 13px; }
.prow { margin-top: auto; padding-top: 6px; display: flex; align-items: center; justify-content: space-between; }
.qty { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; }
.qty button { border: 0; background: var(--pink-soft); color: var(--ink); width: 32px; height: 32px; font-size: 18px; cursor: pointer; }
.qty span { min-width: 28px; text-align: center; font-weight: 700; }
.order label { display: block; margin: 10px 0; font-size: 14px; color: var(--muted); }
.order input:not([type=checkbox]), .order select, .order textarea { display: block; width: 100%; margin-top: 4px; font: inherit; font-size: 16px;
  color: var(--ink); background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 9px 11px; }
.order .check { display: flex; gap: 8px; align-items: flex-start; }
.order .check input { margin-top: 5px; }
.cart { list-style: none; padding: 0; margin: 0 0 6px; }
.cart li { display: flex; justify-content: space-between; padding: 6px 0; border-bottom: 1px dashed var(--line); font-size: 15px; }
.total { font-size: 17px; text-align: right; }
.error { color: #c62828 !important; font-size: 14px; }
.buy { display: inline-block; width: 100%; text-align: center; border: 0; border-radius: 999px; padding: 12px 16px; font: inherit; font-weight: 700;
  color: #fff; background: linear-gradient(135deg, var(--pink), var(--orange)); cursor: pointer; text-decoration: none; }
.buy:disabled { opacity: .6; }
.pay { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; margin: 8px 0 12px; }
.pay dt { color: var(--muted); font-size: 14px; }
.pay dd { margin: 0; word-break: break-all; }
.copy { font-size: 12px; border: 1px solid var(--line); background: var(--surface); color: var(--muted); border-radius: 999px; padding: 2px 8px; cursor: pointer; }
.product img { cursor: zoom-in; }
.zoom { position: fixed; inset: 0; z-index: 20; background: rgba(20,12,15,.88); display: flex; flex-direction: column;
  align-items: center; justify-content: center; padding: 16px; cursor: zoom-out; }
.zoom img { max-width: 100%; max-height: calc(100vh - 110px); border-radius: 12px; object-fit: contain; box-shadow: 0 10px 40px rgba(0,0,0,.4); }
.zoom p { color: #fff; margin: 10px 0 0; font-size: 15px; text-align: center; }
.zoom-close { position: absolute; top: max(12px, env(safe-area-inset-top)); right: 12px; width: 40px; height: 40px; border-radius: 50%;
  border: 0; background: rgba(255,255,255,.9); color: #3a2a2f; font-size: 18px; cursor: pointer; }
