:root {
  --brand: #ff6b4a;
  --brand-dark: #e2502f;
  --brand-soft: #fff0eb;
  --ink: #1f2430;
  --muted: #6b7280;
  --line: #ece7e3;
  --bg: #faf7f4;
  --card: #ffffff;
  --ok: #1f9d6b;
  --radius: 18px;
  --shadow: 0 6px 24px rgba(31, 36, 48, 0.08);
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: system-ui, -apple-system, "Hiragino Sans", "Noto Sans JP", "PingFang SC", "Microsoft JhengHei", "Apple SD Gothic Neo", sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  padding-bottom: calc(84px + env(safe-area-inset-bottom));
}
a { color: inherit; }
img { max-width: 100%; display: block; }

.top {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 10px 16px;
  background: rgba(250, 247, 244, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.logo { display: flex; align-items: center; gap: 8px; text-decoration: none; font-weight: 800; }
.logo-mark {
  width: 30px; height: 30px; border-radius: 10px; display: grid; place-items: center;
  background: var(--brand); color: #fff; font-size: 15px;
}
.logo-text { font-size: 17px; letter-spacing: 0.04em; }
.langs { display: flex; gap: 2px; background: #efe9e4; padding: 3px; border-radius: 999px; overflow-x: auto; }
.langs button {
  border: 0; background: transparent; font: inherit; font-size: 12px; padding: 4px 8px; border-radius: 999px; color: var(--muted); cursor: pointer; white-space: nowrap;
}
.langs button.on { background: #fff; color: var(--ink); font-weight: 700; box-shadow: 0 1px 3px rgba(0,0,0,.08); }

.main { max-width: 520px; margin: 0 auto; padding: 16px; }
.loading { display: grid; place-items: center; min-height: 50vh; }
.spinner { width: 32px; height: 32px; border: 3px solid var(--line); border-top-color: var(--brand); border-radius: 50%; animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.shop { background: var(--card); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.shop-body { padding: 16px 18px 18px; }
.shop h1 { margin: 2px 0 6px; font-size: 22px; line-height: 1.35; }
.shop p { margin: 0; }
.eyebrow { color: var(--brand-dark); font-weight: 700; font-size: 13px; }

.visual { aspect-ratio: 16 / 9; background: #eee; overflow: hidden; }
.visual img { width: 100%; height: 100%; object-fit: cover; }
.visual-ph {
  display: flex; flex-direction: column; justify-content: flex-end; padding: 16px;
  background:
    radial-gradient(circle at 85% 20%, rgba(255,255,255,.35) 0 18%, transparent 19%),
    radial-gradient(circle at 70% 75%, rgba(255,255,255,.18) 0 24%, transparent 25%),
    linear-gradient(135deg, var(--c), color-mix(in srgb, var(--c) 60%, #1f2430));
  color: #fff;
}
.ph-cat { font-size: 12px; font-weight: 700; background: rgba(255,255,255,.25); align-self: flex-start; padding: 2px 10px; border-radius: 999px; }
.ph-name { font-size: 22px; font-weight: 800; margin-top: 6px; text-shadow: 0 2px 8px rgba(0,0,0,.15); }

.coupon {
  position: relative;
  background: var(--card);
  border: 2px dashed #ffc2b2;
  border-radius: var(--radius);
  padding: 16px 18px;
  display: block;
  text-decoration: none;
}
.coupon.big { margin-top: 16px; background: linear-gradient(180deg, #fff, var(--brand-soft)); text-align: center; }
.coupon-label { margin: 0 0 4px; font-size: 13px; font-weight: 700; color: var(--brand-dark); }
.coupon-title { font-size: 20px; font-weight: 800; line-height: 1.4; }
.coupon-detail { font-size: 13px; color: var(--muted); margin-top: 4px; }
.coupon-shop { font-size: 13px; font-weight: 700; color: var(--muted); display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.coupon.mini { margin: 14px 0 12px; padding: 12px 14px; background: var(--brand-soft); }
.coupon.mini .coupon-title { font-size: 17px; }
.coupon.locked { filter: grayscale(0.6); opacity: 0.55; }
.coupon.dim { opacity: 0.55; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  width: 100%; margin-top: 12px; padding: 14px 18px; border: 0; border-radius: 14px;
  font: inherit; font-weight: 800; font-size: 16px; cursor: pointer; text-decoration: none;
  transition: transform .08s ease, background .2s ease;
}
.btn:active { transform: scale(0.98); }
.btn.primary { background: var(--brand); color: #fff; box-shadow: 0 6px 16px rgba(255, 107, 74, .35); }
.btn.primary:hover { background: var(--brand-dark); }
.btn.ghost { background: #e9f7f0; color: var(--ok); }
.btn.danger { background: #fff; color: #c2410c; border: 2px solid #fdba9b; }
.btn.text { background: transparent; color: var(--muted); width: auto; margin: 0; padding: 8px 4px; font-size: 14px; }
.btn:disabled { cursor: default; }

.section-title { font-size: 16px; margin: 28px 2px 10px; }
.ad-card { background: var(--card); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.ad-head { display: flex; justify-content: space-between; align-items: center; padding: 8px 14px; font-size: 12px; color: var(--muted); }
.pr { border: 1px solid #c9c2bc; border-radius: 4px; padding: 0 6px; font-weight: 700; letter-spacing: .05em; }
.ad-body { padding: 14px 18px 12px; }
.ad-body h3 { margin: 4px 0 4px; font-size: 19px; line-height: 1.4; }
.ad-body p { margin: 0; }
.ad-adv { font-size: 13px; font-weight: 700; color: var(--brand-dark); }
.map-link { display: inline-block; margin-top: 8px; font-size: 14px; font-weight: 700; color: var(--brand-dark); }
.progress { height: 8px; background: #f1ece8; border-radius: 99px; overflow: hidden; margin-top: 4px; }
.progress-bar { height: 100%; background: linear-gradient(90deg, #ffb199, var(--brand)); transition: width 1s linear; }
.ad-nav { display: flex; justify-content: flex-end; margin-top: 4px; }

.done-card { background: var(--card); border-radius: var(--radius); padding: 26px 20px; text-align: center; box-shadow: var(--shadow); }
.done-card p { font-weight: 700; margin: 8px 0 0; }
.done-check { width: 52px; height: 52px; margin: 0 auto; border-radius: 50%; background: #e9f7f0; position: relative; }
.done-check::after { content: ""; position: absolute; left: 18px; top: 12px; width: 12px; height: 22px; border: solid var(--ok); border-width: 0 4px 4px 0; transform: rotate(45deg); }

.page-title { font-size: 22px; margin: 4px 2px 14px; }
.wallet-list { display: grid; gap: 12px; }
.coupon.list .coupon-title { font-size: 18px; }
.tag { font-size: 11px; padding: 1px 8px; border-radius: 99px; background: #eee; color: var(--muted); }
.back { display: inline-block; margin-bottom: 12px; text-decoration: none; color: var(--muted); font-weight: 700; }
.ticket { text-align: center; padding: 26px 18px; }
.ticket .coupon-shop { justify-content: center; }
.ticket .coupon-title { font-size: 24px; margin-top: 6px; }
.ticket-code { margin: 18px auto 10px; font-size: 30px; font-weight: 800; letter-spacing: .12em; font-variant-numeric: tabular-nums; background: var(--brand-soft); border-radius: 12px; padding: 10px; }
.show { margin: 14px 0 0; font-weight: 800; color: var(--brand-dark); }
.staff { margin-top: 24px; padding: 14px; border-top: 1px solid var(--line); text-align: center; }

.empty { background: var(--card); border-radius: var(--radius); padding: 28px 20px; text-align: center; color: var(--muted); box-shadow: var(--shadow); }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.center { text-align: center; }

.bottom {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 10;
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
  background: rgba(255,255,255,.95); backdrop-filter: blur(10px); border-top: 1px solid var(--line);
  display: flex; justify-content: center;
}
.wallet-btn {
  display: flex; align-items: center; gap: 8px; text-decoration: none; font-weight: 800;
  padding: 10px 20px; border-radius: 999px; background: var(--ink); color: #fff; max-width: 520px; width: 100%; justify-content: center;
}
.wallet-icon { width: 20px; height: 14px; border: 2px solid #fff; border-radius: 3px; position: relative; }
.wallet-icon::after { content: ""; position: absolute; right: 2px; top: 3px; width: 5px; height: 4px; background: #fff; border-radius: 1px; }
.badge { background: var(--brand); color: #fff; font-size: 12px; min-width: 22px; height: 22px; border-radius: 11px; display: inline-grid; place-items: center; padding: 0 6px; }
.toast {
  position: fixed; left: 50%; bottom: calc(90px + env(safe-area-inset-bottom)); transform: translate(-50%, 20px);
  background: var(--ink); color: #fff; padding: 10px 18px; border-radius: 999px; font-weight: 700; font-size: 14px;
  opacity: 0; pointer-events: none; transition: all .25s ease; z-index: 20;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* Long-press button the customer presses themselves */
.btn.hold { position: relative; overflow: hidden; width: 100%; font-size: 17px; padding: 16px; background: var(--brand); color: #fff; border: 0; touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.btn.hold i { position: absolute; inset: 0; width: 0; background: rgba(255, 255, 255, .35); }
.btn.hold.pressing i { width: 100%; transition: width 1.2s linear; }
.btn.hold span { position: relative; }
.used-stamp { margin: 20px auto 0; width: 190px; height: 190px; border-radius: 50%; border: 6px double #d64545; color: #d64545; display: flex; flex-direction: column; align-items: center; justify-content: center; transform: rotate(-8deg); animation: stamp .4s ease-out; }
.used-stamp b { font-size: 34px; }
.live-clock { font-size: 20px; font-weight: 700; font-variant-numeric: tabular-nums; animation: blink 1s steps(2) infinite; }
@keyframes stamp { from { transform: rotate(-8deg) scale(1.6); opacity: 0; } }
@keyframes blink { 50% { opacity: .55; } }
img.logo-mark { background: none; display: block; }
.tsu { color: var(--brand); }
