/* スタンプ帳 — クラフト紙×朱肉 */
:root {
  --kraft: #dfaa6c;
  --kraft-d: #9c7b52;
  --kraft-l: #e6d5b6;
  --card: #f6efe1;
  --sumi: #2a231e;
  --sumi-2: #3d3128;
  --shu: #c2302a;
  --shu-d: #8e1f1a;
  --ai: #2e4468;
  --leaf: #3e6a48;
  --f-head: "Shippori Antique B1", "BIZ UDPGothic", sans-serif;
  --f-body: "BIZ UDPGothic", "Hiragino Sans", "Yu Gothic", sans-serif;
  --f-num: "Special Elite", "Courier New", monospace;
  --f-seal: "Yuji Syuku", "Shippori Antique B1", serif;
  --r-card: 6px;
  --r-pill: 999px;
  --sh-paper: 0 1px 0 rgba(60, 40, 20, .10), 0 8px 18px -6px rgba(60, 40, 20, .35);
  --sh-lift: 0 2px 0 rgba(60, 40, 20, .10), 0 18px 30px -10px rgba(60, 40, 20, .45);
  --ease: cubic-bezier(.2, .8, .2, 1);
  --spring: cubic-bezier(.3, 1.4, .5, 1);
  --t: 260ms;
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --tab-h: 66px;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  background: #3b2f25;
  color: var(--sumi);
  font: 400 15px/1.7 var(--f-body);
  line-break: strict;
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
  overflow: hidden;
}
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; }
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3, p { margin: 0; }
.defs { position: absolute; width: 0; height: 0; }
.nowrap { white-space: nowrap; }
.kw { word-break: keep-all; }
.num { font-family: var(--f-num); font-feature-settings: "tnum"; letter-spacing: .02em; }

.app {
  position: fixed; inset: 0; margin: 0 auto; max-width: 430px; overflow: hidden;
  background-color: var(--kraft);
}
.app::before, .screen::before { content: ""; position: absolute; inset: 0; pointer-events: none; background: url(/app-development/apps/a080/img/kraft.webp) center / cover; }
@media (min-width: 600px) {
  body {
    background:
      radial-gradient(circle at 20% 20%, rgba(255, 255, 255, .06), transparent 40%),
      repeating-linear-gradient(90deg, rgba(0, 0, 0, .05) 0 2px, transparent 2px 7px),
      #3b2f25;
  }
  .app { box-shadow: 0 0 0 1px rgba(0, 0, 0, .3), 0 30px 80px rgba(0, 0, 0, .55); }
}

/* ---------- 画面 ---------- */
.screens { position: absolute; inset: 0; }
.screen {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  background-color: var(--kraft);
  will-change: transform;
}
.screen.is-in-push { animation: pushIn var(--t) var(--ease) both; }
.screen.is-out-push { animation: pushOut var(--t) var(--ease) both; }
.screen.is-in-pop { animation: popIn var(--t) var(--ease) both; }
.screen.is-out-pop { animation: popOut var(--t) var(--ease) both; z-index: 2; }
.screen.is-in-fade { animation: fadeIn 180ms ease both; }
@keyframes pushIn { from { transform: translateX(100%); box-shadow: -10px 0 30px rgba(0,0,0,.25); } to { transform: none; } }
@keyframes pushOut { to { transform: translateX(-28%); filter: brightness(.86); } }
@keyframes popIn { from { transform: translateX(-28%); filter: brightness(.86); } to { transform: none; } }
@keyframes popOut { to { transform: translateX(100%); } }
@keyframes fadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.bar {
  flex: none; display: flex; align-items: center; gap: 8px;
  padding: calc(var(--safe-t) + 8px) 12px 8px; min-height: calc(var(--safe-t) + 60px);
  position: relative; z-index: 3;
}
.bar__title { flex: 1; min-width: 0; font: 400 17px/1.3 var(--f-head); text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar.is-scrolled { background: var(--kraft-l); box-shadow: 0 1px 0 rgba(60, 40, 20, .2); }
.icon-btn {
  flex: none; width: 44px; height: 44px; border-radius: 50%; border: 1.5px solid rgba(42, 35, 30, .35);
  background: var(--card); display: grid; place-items: center; transition: transform .12s;
}
.icon-btn:active { transform: scale(.9); }
.icon-btn svg { width: 22px; height: 22px; fill: none; stroke: var(--sumi); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.icon-btn.is-on svg .mute { display: none; }
.icon-btn:not(.is-on) svg .wave { display: none; }

.scroll {
  position: relative; flex: 1; min-height: 0; overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain;
  padding: 0 16px calc(var(--tab-h) + var(--safe-b) + 28px);
  -webkit-overflow-scrolling: touch;
}
.screen--detail .scroll { padding-bottom: calc(var(--safe-b) + 32px); }

.hello { display: flex; align-items: flex-end; gap: 12px; padding: calc(var(--safe-t) + 22px) 0 14px; }
.hello__txt { flex: 1; min-width: 0; }
.hello__sub { font-size: 13px; font-weight: 700; letter-spacing: .06em; color: var(--sumi-2); }
.hello__title { font: 400 31px/1.2 var(--f-head); letter-spacing: .04em; font-feature-settings: "palt"; }

.sec-h { display: flex; align-items: baseline; gap: 10px; margin: 26px 0 10px; font: 400 18px/1.4 var(--f-head); font-feature-settings: "palt"; }
.sec-h small { font: 700 13px/1.4 var(--f-body); color: var(--sumi-2); }

/* ---------- タブバー（革の財布のふち・ステッチ） ---------- */
.tabbar {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 20;
  height: calc(var(--tab-h) + var(--safe-b)); padding: 0 6px var(--safe-b);
  display: grid; grid-template-columns: repeat(5, 1fr); align-items: end;
  background: #2a231e; border-radius: 18px 18px 0 0;
  box-shadow: 0 -6px 20px rgba(42, 35, 30, .35);
  transition: transform var(--t) var(--ease);
}
.tabbar::before {
  content: ""; position: absolute; left: 14px; right: 14px; top: 6px; border-top: 1.5px dashed #8a7356; pointer-events: none;
}
.tabbar.is-hidden { transform: translateY(110%); }
.tab {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  height: var(--tab-h); padding-top: 8px; text-decoration: none; color: #cdb896; font-size: 11px; font-weight: 700; letter-spacing: .02em;
  transition: transform .12s;
}
.tab:active { transform: scale(.92); }
.tab svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.tab.is-active { color: #fff8ea; }
.tab.is-active::after { content: ""; position: absolute; bottom: 5px; left: calc(50% - 11px); width: 22px; height: 3px; border-radius: 2px; background: #e0574d; }
.tab--seal { justify-content: flex-end; padding-bottom: 6px; }
.tab--seal.is-active::after { display: none; }
.seal-btn {
  width: 62px; height: 62px; margin-top: -30px; margin-bottom: 2px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #d8473f, var(--shu) 55%, var(--shu-d));
  display: grid; place-items: center; box-shadow: 0 0 0 5px #2a231e, 0 8px 16px rgba(0, 0, 0, .35);
  position: relative;
}
.seal-btn::before { content: ""; position: absolute; inset: 5px; border-radius: 50%; border: 1.5px solid rgba(255, 240, 225, .55); }
.seal-btn svg { width: 28px; height: 28px; stroke: #fff; stroke-width: 1.8; }
.tab__badge {
  position: absolute; top: 6px; left: calc(50% + 6px); min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px;
  background: var(--shu); color: #fff; font: 700 11px/18px var(--f-body); text-align: center;
}

/* ---------- 紙のスタンプカード ---------- */
.pcard {
  --c-bg: var(--card); --c-ac: var(--sumi);
  position: relative; width: 100%; aspect-ratio: 1.55; border-radius: var(--r-card);
  background-color: var(--c-bg);
  box-shadow: var(--sh-paper);
  color: var(--c-ac); display: flex; flex-direction: column; overflow: hidden;
}
.pcard > * { position: relative; }
.pcard::before { content: ""; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(rgba(120, 90, 50, .08) 1px, transparent 1.2px) 0 0 / 5px 5px; }
.pcard__head { display: flex; align-items: center; gap: 10px; padding: 10px 14px 6px; min-height: 52px; }
.pcard__mark { flex: none; width: 34px; height: 34px; }
.pcard__mark svg { width: 100%; height: 100%; }
.pcard__name { flex: 1; min-width: 0; }
.pcard__kind { display: block; font-size: 11px; font-weight: 700; letter-spacing: .12em; line-height: 1.3; }
.pcard__shop { display: block; font: 400 19px/1.25 var(--f-head); letter-spacing: .03em; font-feature-settings: "palt"; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pcard__count { flex: none; text-align: right; font-family: var(--f-num); line-height: 1.1; }
.pcard__count b { font-size: 24px; font-weight: 400; }
.pcard__count span { font-size: 14px; }
.pcard__no { display: block; font-size: 11px; letter-spacing: .06em; }
.pcard__grid {
  flex: 1; min-height: 0; display: grid; grid-template-columns: repeat(var(--cols), 1fr); grid-auto-rows: 1fr;
  gap: 4px; padding: 2px 14px 4px; align-items: center; justify-items: center;
}
.pcard__foot { display: flex; justify-content: space-between; gap: 8px; padding: 4px 14px 9px; font-size: 11px; font-weight: 700; letter-spacing: .04em; }
.cell { position: relative; width: min(100%, var(--cell, 54px)); aspect-ratio: 1; display: grid; place-items: center; }
.cell__ring { position: absolute; inset: 6%; border-radius: 50%; border: 1.5px dashed currentColor; opacity: .55; }
.cell__n { font: 400 14px/1 var(--f-num); }
.cell--goal .cell__ring { border-style: solid; border-width: 2px; opacity: .8; }
.cell--goal .cell__n { font: 700 11px/1.15 var(--f-body); text-align: center; letter-spacing: .04em; }
.cell .imp { position: absolute; inset: -4%; width: 108%; height: 108%; }
.cell.is-new .imp { animation: impIn 420ms var(--ease) both; }
@keyframes impIn { 0% { opacity: 0; transform: scale(1.25) rotate(var(--rot)); } 40% { opacity: 1; } 100% { opacity: 1; transform: scale(1) rotate(var(--rot)); } }

/* 店ごとの印刷の違い */
.pcard--band .pcard__head { background: var(--c-ac); color: var(--c-bg); margin-bottom: 6px; }
.pcard--band .pcard__head .seal-ring { stroke: var(--c-bg); }
.pcard--side { padding-left: 14px; }
.pcard--side::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 14px; background: repeating-linear-gradient(180deg, var(--c-ac) 0 10px, transparent 10px 14px); opacity: .9; }
.pcard--wave::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 12px; pointer-events: none;
  background: radial-gradient(circle at 8px 0, transparent 7px, var(--c-ac) 7.5px) 0 0 / 16px 12px repeat-x; opacity: .85;
}
.pcard--wave .pcard__foot { padding-bottom: 16px; }
.pcard--dots { outline: 2px dotted var(--c-ac); outline-offset: -7px; }
.pcard--rule { box-shadow: var(--sh-paper), inset 0 0 0 5px var(--c-bg), inset 0 0 0 6px var(--c-ac), inset 0 0 0 8px var(--c-bg), inset 0 0 0 9px var(--c-ac); }

.pcard.is-full .pcard__grid { opacity: .3; transition: opacity .3s; }
.seal-big { position: absolute; left: 50%; top: 52%; width: 46%; aspect-ratio: 1; transform: translate(-50%, -50%) rotate(-14deg); pointer-events: none; z-index: 4; }
.seal-big.is-new { animation: slam 520ms var(--spring) both; }
@keyframes slam { 0% { opacity: 0; transform: translate(-50%, -50%) rotate(-14deg) scale(1.9); } 60% { opacity: 1; transform: translate(-50%, -50%) rotate(-14deg) scale(.94); } 100% { opacity: 1; transform: translate(-50%, -50%) rotate(-14deg) scale(1); } }

/* ---------- カード一覧（重なった束） ---------- */
.slip {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px 12px 16px; margin: 4px 0 6px;
  background: var(--card); border-left: 5px solid var(--shu); border-radius: 2px 4px 4px 2px; text-decoration: none;
  box-shadow: var(--sh-paper); transform: rotate(-.6deg); transition: transform .15s;
}
.slip:active { transform: rotate(-.6deg) scale(.98); }
.slip__label { font-size: 12px; font-weight: 700; color: var(--shu-d); letter-spacing: .08em; }
.slip__main { font: 400 17px/1.4 var(--f-head); font-feature-settings: "palt"; word-break: keep-all; }
.slip__left { flex: none; text-align: center; font-family: var(--f-num); color: var(--shu-d); line-height: 1; }
.slip__left b { display: block; font-size: 38px; font-weight: 400; }
.slip__left span { font: 700 12px/1.2 var(--f-body); }
.slip__txt { flex: 1; min-width: 0; }
.slip__arrow { flex: none; width: 20px; height: 20px; fill: none; stroke: var(--sumi); stroke-width: 2; }

.chips { display: flex; align-items: center; gap: 6px; margin: 14px 0 4px; }
.seg { display: inline-flex; padding: 3px; border-radius: var(--r-pill); background: rgba(42, 35, 30, .14); }
.seg button {
  border: 0; background: transparent; min-height: 40px; padding: 0 12px; border-radius: var(--r-pill); font-size: 13px; font-weight: 700;
  color: var(--sumi); transition: background .2s, color .2s;
}
.seg button[aria-pressed="true"] { background: var(--sumi); color: #fff8ea; }
.cp-link {
  margin-left: auto; display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 12px; border-radius: var(--r-pill);
  background: var(--card); text-decoration: none; font-size: 13px; font-weight: 700; box-shadow: 0 1px 0 rgba(60, 40, 20, .2);
}
.cp-link b { color: var(--shu-d); font-family: var(--f-num); font-size: 17px; font-weight: 400; }

.stack { position: relative; padding: 18px 2px 8px; }
.stack__item { position: relative; display: block; text-decoration: none; transition: transform .25s var(--ease); }
.stack__item + .stack__item { margin-top: calc(var(--peek, 78px) - var(--h, 220px)); }
.stack__item:nth-child(odd) .pcard { transform: rotate(-.7deg); }
.stack__item:nth-child(even) .pcard { transform: rotate(.6deg); }
.stack__item:active { transform: translateY(-8px); }
.stack__item .pcard { box-shadow: var(--sh-lift); }
.stack__dots { display: flex; gap: 3px; margin-top: 3px; }
.stack__dots i { width: 7px; height: 7px; border-radius: 50%; border: 1.2px solid currentColor; opacity: .7; }
.stack__dots i.on { background: var(--shu); border-color: var(--shu); opacity: 1; }
.pcard--band .stack__dots i.on { border-color: var(--c-bg); }

.archive-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 22px; padding: 14px 4px; border-top: 1.5px dashed rgba(42, 35, 30, .35); font-size: 14px; }
.archive-row b { font-family: var(--f-num); font-size: 18px; font-weight: 400; }

/* ---------- カード詳細 ---------- */
.flip { perspective: 1400px; margin-top: 4px; }
.flip__inner { position: relative; transition: transform 620ms var(--ease); transform-style: preserve-3d; }
.flip.is-back .flip__inner { transform: rotateY(180deg); }
.flip__face { backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.flip__back { position: absolute; inset: 0; transform: rotateY(180deg); }
.flip:not(.is-back) .flip__back { visibility: hidden; transition: visibility 0s .3s; }
.flip.is-back .flip__front { visibility: hidden; transition: visibility 0s .3s; }
.back {
  height: 100%; border-radius: var(--r-card); background: var(--c-bg, var(--card)); color: var(--c-ac, var(--sumi));
  box-shadow: var(--sh-paper); display: grid; grid-template-rows: 40% 1fr; overflow: hidden;
}
.back__ph { position: relative; min-height: 0; }
.back img { width: 100%; height: 100%; object-fit: cover; }
.back__ph h3 { position: absolute; left: 0; bottom: 0; padding: 3px 12px 3px 14px; background: var(--c-ac); color: var(--c-bg); font: 400 16px/1.4 var(--f-head); border-radius: 0 4px 0 0; }
.back__body { padding: 9px 14px 8px; display: flex; flex-direction: column; justify-content: center; gap: 2px; font-size: 14px; line-height: 1.45; min-width: 0; }
.back__row { display: flex; gap: 6px; }
.back__row svg { flex: none; width: 16px; height: 16px; margin-top: 2px; fill: none; stroke: currentColor; stroke-width: 1.8; }

.goal-line { display: flex; align-items: baseline; justify-content: center; gap: 6px; margin: 18px 0 4px; font: 400 17px/1.4 var(--f-head); text-align: center; flex-wrap: wrap; }
.goal-line b { font: 400 42px/1 var(--f-num); color: var(--shu-d); }
.goal-line.is-done b { font-size: 28px; }
.hint { text-align: center; font-size: 14px; color: var(--sumi-2); margin-bottom: 14px; }

.btn {
  display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; min-height: 56px; padding: 0 22px;
  border: 0; border-radius: var(--r-pill); font: 700 16px/1.3 var(--f-body); letter-spacing: .04em; text-decoration: none;
  transition: transform .12s, box-shadow .12s; word-break: keep-all;
}
.btn:active { transform: scale(.97); }
.btn--shu { background: var(--shu-d); color: #fff; box-shadow: 0 3px 0 #5e1310, 0 10px 18px -8px rgba(142, 31, 26, .7); }
.btn--shu:active { box-shadow: 0 1px 0 #5e1310; transform: translateY(2px); }
.btn--ink { background: var(--sumi); color: #fff8ea; }
.btn--paper { background: var(--card); color: var(--sumi); box-shadow: 0 1px 0 rgba(60, 40, 20, .25); }
.btn svg { flex: none; width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.btn small { font-size: 12px; font-weight: 700; opacity: .9; }
.btn[disabled] { opacity: .5; }

.facts { display: grid; grid-template-columns: repeat(3, 1fr); margin: 22px 0 0; background: var(--card); border-radius: var(--r-card); box-shadow: var(--sh-paper); }
.facts div { padding: 12px 10px; text-align: center; }
.facts div + div { border-left: 1.5px dashed rgba(42, 35, 30, .3); }
.facts dt { font-size: 11px; font-weight: 700; color: var(--sumi-2); letter-spacing: .06em; }
.facts dd { margin: 2px 0 0; font: 400 14px/1.4 var(--f-head); word-break: keep-all; }

.tl { list-style: none; margin: 0; padding: 0 0 0 4px; position: relative; }
.tl::before { content: ""; position: absolute; left: 26px; top: 8px; bottom: 8px; border-left: 1.5px dashed rgba(42, 35, 30, .4); }
.tl li { position: relative; display: flex; align-items: center; gap: 14px; padding: 8px 0; }
.tl__seal { flex: none; width: 44px; height: 44px; border-radius: 50%; background: var(--card); box-shadow: 0 1px 0 rgba(60, 40, 20, .2); position: relative; z-index: 1; }
.tl__seal svg { width: 100%; height: 100%; }
.tl__date { flex: none; width: 56px; font: 400 17px/1.15 var(--f-num); }
.tl__date small { display: block; font: 700 11px/1.3 var(--f-body); color: var(--sumi-2); }
.tl__txt { flex: 1; min-width: 0; font-size: 14px; line-height: 1.5; }
.tl__txt b { display: block; font: 400 15px/1.4 var(--f-head); }
.tl__day { margin: 14px 0 2px 64px; font: 700 13px/1.4 var(--f-body); color: var(--sumi-2); letter-spacing: .06em; }

/* はんこ（押印の演出） */
.hanko { position: absolute; z-index: 30; width: 64px; height: 108px; pointer-events: none; transform-origin: 50% 100%; }
.hanko svg { width: 100%; height: 100%; overflow: visible; }
.hanko.is-press { animation: press 560ms var(--ease) both; }
@keyframes press {
  0% { transform: translateY(-120px) scale(1.2); opacity: 0; }
  25% { opacity: 1; }
  38% { transform: translateY(0) scale(1); }
  46% { transform: translateY(2px) scaleY(.9) scaleX(1.05); }
  62% { transform: translateY(0) scale(1); }
  100% { transform: translateY(-140px) scale(1.15); opacity: 0; }
}

/* ---------- 会員コード ---------- */
.member {
  margin-top: 6px; border-radius: 10px; background: var(--card); box-shadow: var(--sh-lift); overflow: hidden; text-align: center;
}
.member__band { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 11px 16px; background: var(--shu-d); color: #fff4e6; font: 400 15px/1.3 var(--f-head); letter-spacing: .08em; }
.member__band svg { width: 22px; height: 22px; }
.member__body { padding: 18px 18px 20px; }
.qr { position: relative; width: min(232px, 70vw); aspect-ratio: 1; margin: 0 auto; padding: 12px; background: #fff; border-radius: 6px; box-shadow: inset 0 0 0 1px rgba(42, 35, 30, .15); }
.qr svg { width: 100%; height: 100%; display: block; }
.qr__scan { position: absolute; left: 6px; right: 6px; height: 3px; top: 10px; border-radius: 2px; background: var(--shu); box-shadow: 0 0 12px 3px rgba(194, 48, 42, .55); opacity: 0; }
.qr.is-scanning .qr__scan { animation: scan 1.1s ease-in-out both; }
@keyframes scan { 0% { opacity: 0; top: 10px; } 10% { opacity: 1; } 50% { top: calc(100% - 14px); } 90% { opacity: 1; } 100% { opacity: 0; top: 10px; } }
.qr.is-refresh svg { animation: qrFlash .4s ease; }
@keyframes qrFlash { from { opacity: .2; } to { opacity: 1; } }
.member__no { margin-top: 14px; font: 400 23px/1.2 var(--f-num); letter-spacing: .1em; white-space: nowrap; }
.member__name { margin-top: 4px; font-size: 14px; font-weight: 700; }
.refresh { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 12px; font-size: 14px; color: var(--sumi-2); }
.refresh svg { width: 22px; height: 22px; transform: rotate(-90deg); }
.refresh circle { fill: none; stroke-width: 3; }
.refresh .bg { stroke: rgba(42, 35, 30, .15); }
.refresh .fg { stroke: var(--shu); stroke-linecap: round; transition: stroke-dashoffset 1s linear; }
.note { margin: 18px 4px 16px; font-size: 14px; line-height: 1.75; word-break: normal; }

/* ---------- クーポン（ミシン目の切符） ---------- */
.tickets { display: flex; flex-direction: column; gap: 14px; margin-top: 14px; }
.ticket {
  --ac: var(--sumi); --stub: 88px;
  position: relative; display: flex; min-height: 118px; text-decoration: none; color: var(--sumi);
  filter: drop-shadow(0 6px 8px rgba(60, 40, 20, .28));
  transition: transform .15s;
}
.ticket:active { transform: scale(.98); }
.ticket__in {
  position: relative; flex: 1; display: flex; min-width: 0; background: var(--card); border-radius: 4px;
  -webkit-mask: radial-gradient(circle 9px at var(--stub) 0, #0000 97%, #000) top / 100% 51% no-repeat, radial-gradient(circle 9px at var(--stub) 100%, #0000 97%, #000) bottom / 100% 51% no-repeat;
  mask: radial-gradient(circle 9px at var(--stub) 0, #0000 97%, #000) top / 100% 51% no-repeat, radial-gradient(circle 9px at var(--stub) 100%, #0000 97%, #000) bottom / 100% 51% no-repeat;
}
.ticket__stub { position: relative; flex: none; width: var(--stub); display: grid; place-items: center; padding: 10px; }
.ticket__stub::after { content: ""; position: absolute; right: 0; top: 14px; bottom: 14px; border-right: 2px dashed rgba(42, 35, 30, .35); }
.ticket__stub svg { width: 60px; height: 60px; }
.ticket__body { position: relative; flex: 1; min-width: 0; padding: 14px 16px 14px 18px; display: flex; flex-direction: column; justify-content: center; gap: 2px; }
.ticket__shop { font-size: 13px; font-weight: 700; color: var(--ac); letter-spacing: .06em; }
.ticket__title { font: 400 19px/1.35 var(--f-head); font-feature-settings: "palt"; word-break: keep-all; }
.ticket__exp { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; margin-top: 4px; font-size: 13px; }
.ticket__days { font-weight: 700; color: var(--shu-d); }
.ticket.is-used .ticket__stub svg, .ticket.is-expired .ticket__stub svg { filter: grayscale(1); opacity: .5; }
.ticket.is-used .ticket__body { padding-right: 84px; }
.ticket__state { position: absolute; right: 10px; top: 50%; width: 72px; height: 72px; transform: translateY(-50%) rotate(-12deg); pointer-events: none; }
.ticket__state svg { width: 100%; height: 100%; }
.ticket__tag { display: inline-block; padding: 1px 8px; border-radius: 3px; border: 1.5px solid var(--sumi-2); font-size: 12px; font-weight: 700; color: var(--sumi-2); }

.empty { text-align: center; padding: 26px 8px 10px; }
.empty img { width: 64%; max-width: 240px; margin: 0 auto 16px; border-radius: 50%; aspect-ratio: 1; object-fit: cover; box-shadow: var(--sh-paper); }
.empty h3 { font: 400 19px/1.4 var(--f-head); word-break: keep-all; }
.empty p { margin: 6px auto 18px; max-width: 290px; font-size: 14px; line-height: 1.7; }

/* クーポン詳細 */
.cpd { position: relative; margin-top: 4px; filter: drop-shadow(0 10px 14px rgba(60, 40, 20, .3)); }
.cpd__paper {
  position: relative; background: var(--card); border-radius: 6px; overflow: hidden;
  -webkit-mask: radial-gradient(circle 12px at 0 var(--perf, 70%), #0000 97%, #000) left / 51% 100% no-repeat, radial-gradient(circle 12px at 100% var(--perf, 70%), #0000 97%, #000) right / 51% 100% no-repeat;
  mask: radial-gradient(circle 12px at 0 var(--perf, 70%), #0000 97%, #000) left / 51% 100% no-repeat, radial-gradient(circle 12px at 100% var(--perf, 70%), #0000 97%, #000) right / 51% 100% no-repeat;
}
.cpd__photo { position: relative; height: 150px; }
.cpd__photo img { width: 100%; height: 100%; object-fit: cover; }
.cpd__band { position: absolute; left: 0; bottom: 0; padding: 6px 14px 6px 16px; background: var(--ac, var(--sumi)); color: #fff8ea; font: 400 15px/1.3 var(--f-head); letter-spacing: .06em; border-radius: 0 4px 0 0; }
.cpd__main { padding: 16px 20px 18px; position: relative; }
.cpd__title { font: 400 27px/1.3 var(--f-head); font-feature-settings: "palt"; word-break: keep-all; }
.cpd__list { list-style: none; margin: 12px 0 0; padding: 0; font-size: 14px; line-height: 1.6; }
.cpd__list li { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; border-top: 1px solid rgba(42, 35, 30, .15); }
.cpd__list li span:first-child { color: var(--sumi-2); font-weight: 700; flex: none; }
.cpd__list li span:last-child { text-align: right; }
.cpd__perf { position: relative; height: 0; border-top: 2px dashed rgba(42, 35, 30, .35); margin: 0 16px; }
.cpd__stub { padding: 18px 16px 20px; }
.cpd__usedrow { display: flex; align-items: center; gap: 10px; }
.cpd__usedrow .cpd__used { flex: 1; text-align: left; word-break: keep-all; }
.cpd__stamp { flex: none; width: 96px; height: 96px; margin: -6px 0; pointer-events: none; transform: rotate(-12deg); }
.cpd__stamp svg { width: 100%; height: 100%; }
.cpd__stamp.is-new { animation: slam2 480ms var(--spring) both; }
@keyframes slam2 { 0% { opacity: 0; transform: rotate(-14deg) scale(1.8); } 100% { opacity: 1; transform: rotate(-14deg) scale(1); } }
.cpd__used { text-align: center; font-size: 15px; font-weight: 700; }
.cpd__used small { display: block; font-size: 13px; font-weight: 400; margin-top: 2px; }

.slider {
  position: relative; height: 68px; border-radius: var(--r-pill); background: var(--kraft-l);
  box-shadow: inset 0 2px 4px rgba(60, 40, 20, .25); touch-action: none; user-select: none; -webkit-user-select: none; overflow: hidden;
}
.slider__fill { position: absolute; left: 0; top: 0; bottom: 0; width: 0; border-radius: var(--r-pill); background: rgba(194, 48, 42, .18); }
.slider__label { position: absolute; inset: 0; display: grid; place-items: center; padding-left: 60px; font-size: 15px; font-weight: 700; color: var(--sumi); letter-spacing: .04em; pointer-events: none; }
.slider__knob {
  position: absolute; left: 5px; top: 5px; width: 58px; height: 58px; border-radius: 50%; border: 0; padding: 0;
  background: radial-gradient(circle at 40% 35%, #c69a64, #8b6238 70%, #6b4826); box-shadow: 0 3px 8px rgba(42, 35, 30, .45);
  display: grid; place-items: center; touch-action: none;
}
.slider__knob::before { content: ""; position: absolute; inset: 9px; border-radius: 50%; border: 3px solid var(--shu); background: rgba(255, 240, 225, .2); }
.slider__knob svg { position: relative; width: 22px; height: 22px; fill: none; stroke: #fff8ea; stroke-width: 2.4; stroke-linecap: round; }
.slider.is-shake { animation: shake .4s; }
@keyframes shake { 20% { transform: translateX(-6px); } 40% { transform: translateX(6px); } 60% { transform: translateX(-3px); } 80% { transform: translateX(3px); } }
.slider-note { text-align: center; margin-top: 10px; font-size: 13px; color: var(--sumi-2); }

/* ---------- きろく ---------- */
.meter { display: flex; align-items: stretch; gap: 10px; margin-top: 4px; }
.meter > div { flex: 1; padding: 14px 12px; border-radius: var(--r-card); background: var(--card); box-shadow: var(--sh-paper); }
.meter dt { font-size: 12px; font-weight: 700; color: var(--sumi-2); }
.meter dd { margin: 2px 0 0; font: 400 34px/1.1 var(--f-num); }
.meter dd span { font: 700 13px var(--f-body); margin-left: 3px; }
.cal { margin-top: 14px; padding: 12px; border-radius: var(--r-card); background: var(--card); box-shadow: var(--sh-paper); }
.cal__h { display: flex; justify-content: space-between; align-items: center; font: 400 16px/1.3 var(--f-head); margin-bottom: 8px; }
.cal__h .num { font-size: 15px; }
.cal__grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; text-align: center; }
.cal__w { font-size: 11px; font-weight: 700; color: var(--sumi-2); padding-bottom: 2px; }
.cal__d { position: relative; aspect-ratio: 1; display: grid; place-items: center; font: 400 13px/1 var(--f-num); }
.cal__d.is-today { outline: 1.5px solid var(--sumi); outline-offset: -3px; border-radius: 50%; }
.cal__d svg { position: absolute; inset: 3px; width: calc(100% - 6px); height: calc(100% - 6px); }
.cal__d.has { color: var(--shu-d); font-weight: 700; }
.cal__d .cnt { position: relative; }

/* ---------- 設定 ---------- */
.group { margin-top: 10px; border-radius: var(--r-card); background: var(--card); box-shadow: var(--sh-paper); overflow: hidden; }
.row { display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 8px 16px; text-decoration: none; width: 100%; border: 0; background: none; text-align: left; font-size: 15px; }
.row + .row { border-top: 1px dashed rgba(42, 35, 30, .25); }
.row__label { flex: 1; min-width: 0; }
.row__label small { display: block; font-size: 13px; color: var(--sumi-2); line-height: 1.5; }
.row__val { font-family: var(--f-num); font-size: 16px; }
.row--link:active { background: rgba(42, 35, 30, .06); }
.row svg.chev { flex: none; width: 18px; height: 18px; fill: none; stroke: var(--sumi); stroke-width: 2; }
.row--danger { color: var(--shu-d); font-weight: 700; }
.row input[type=text] { flex: 1; min-width: 0; height: 40px; border: 1.5px solid rgba(42, 35, 30, .3); border-radius: 6px; background: #fffaf0; padding: 0 10px; font-size: 16px; }
.switch { position: relative; flex: none; width: 54px; height: 32px; border-radius: 16px; border: 0; background: #b5a184; transition: background .2s; }
.switch::after { content: ""; position: absolute; left: 3px; top: 3px; width: 26px; height: 26px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .3); transition: transform .22s var(--spring); }
.switch[aria-checked="true"] { background: var(--shu-d); }
.switch[aria-checked="true"]::after { transform: translateX(22px); }

.about-hero { text-align: center; padding: 10px 0 6px; }
.about-hero img { width: 96px; height: 96px; margin: 0 auto 10px; border-radius: 22px; box-shadow: var(--sh-lift); }
.about-hero h2 { font: 400 24px/1.3 var(--f-head); }
.about-hero p { font-size: 13px; color: var(--sumi-2); }
.paper-box { margin-top: 14px; padding: 16px; border-radius: var(--r-card); background: var(--card); box-shadow: var(--sh-paper); font-size: 14px; line-height: 1.75; }
.paper-box h3 { font: 400 16px/1.4 var(--f-head); margin-bottom: 6px; }
.paper-box ul { margin: 0; padding-left: 1.2em; }
.paper-box a { font-weight: 700; color: var(--shu-d); }

/* カードを追加 */
.shoplist { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 8px; }
.shopcard { display: flex; flex-direction: column; border: 0; padding: 0; background: var(--card); border-radius: var(--r-card); overflow: hidden; text-align: left; box-shadow: var(--sh-paper); transition: transform .12s; }
.shopcard:active { transform: scale(.97); }
.shopcard img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.shopcard__b { padding: 10px 12px 12px; }
.shopcard__b b { display: block; font: 400 16px/1.35 var(--f-head); }
.shopcard__b span { display: block; font-size: 13px; line-height: 1.5; color: var(--sumi-2); }
.shopcard.is-held img { filter: grayscale(.85); }
.shopcard.is-held .shopcard__b span { color: var(--leaf); font-weight: 700; }

/* ---------- シート・トースト・重ね ---------- */
.layer { position: absolute; inset: 0; z-index: 50; pointer-events: none; }
.layer > * { pointer-events: auto; }
.scrim { position: absolute; inset: 0; background: rgba(30, 22, 15, .5); animation: fade .2s both; }
@keyframes fade { from { opacity: 0; } }
.sheet {
  position: absolute; left: 0; right: 0; bottom: 0; max-height: 88%; overflow-y: auto; overscroll-behavior: contain;
  background: var(--card); border-radius: 22px 22px 0 0; padding: 10px 18px calc(var(--safe-b) + 20px);
  box-shadow: 0 -10px 40px rgba(30, 20, 10, .35); animation: sheetIn 320ms var(--spring) both; touch-action: pan-y;
}
.sheet.is-closing { animation: sheetOut 220ms ease both; }
@keyframes sheetIn { from { transform: translateY(100%); } }
@keyframes sheetOut { to { transform: translateY(100%); } }
.sheet__grab { width: 40px; height: 5px; border-radius: 3px; background: rgba(42, 35, 30, .3); margin: 0 auto 12px; }
.sheet h2 { font: 400 20px/1.4 var(--f-head); text-align: center; font-feature-settings: "palt"; word-break: keep-all; }
.sheet__lead { text-align: center; font-size: 14px; color: var(--sumi-2); margin: 4px 0 14px; word-break: normal; }
.sheet .btn + .btn { margin-top: 10px; }
.staff { display: flex; align-items: center; gap: 8px; justify-content: center; padding: 6px 12px; margin: 0 auto 10px; width: max-content; border-radius: var(--r-pill); background: var(--sumi); color: #fff8ea; font-size: 12px; font-weight: 700; letter-spacing: .06em; }
.stepper { display: flex; align-items: center; justify-content: center; gap: 22px; margin: 6px 0 4px; }
.stepper button { width: 56px; height: 56px; border-radius: 50%; border: 2px solid var(--sumi); background: transparent; font: 400 28px/1 var(--f-num); display: grid; place-items: center; }
.stepper button:active { transform: scale(.92); }
.stepper output { min-width: 96px; text-align: center; font: 400 52px/1 var(--f-num); }
.stepper output span { font: 700 16px var(--f-body); margin-left: 4px; }
.amount { display: flex; align-items: baseline; justify-content: center; gap: 6px; font: 400 44px/1.1 var(--f-num); margin: 4px 0; }
.amount span { font: 700 18px var(--f-body); }
.keys { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 10px 0 12px; }
.keys button { height: 50px; border-radius: 12px; border: 0; background: #ebdfc8; font: 400 22px/1 var(--f-num); }
.keys button:active { background: #dccbab; }
.keys button.k-fn { font: 700 14px var(--f-body); }
.calc { text-align: center; font-size: 15px; margin-bottom: 12px; min-height: 26px; }
.calc b { font-family: var(--f-num); font-size: 22px; font-weight: 400; color: var(--shu-d); }
.pick { display: flex; flex-direction: column; gap: 8px; margin-bottom: 8px; }
.pick button { display: flex; align-items: center; gap: 12px; min-height: 60px; padding: 8px 14px; border-radius: 12px; border: 1.5px solid rgba(42, 35, 30, .2); background: #fffaf0; text-align: left; }
.pick button:active { background: #efe3cc; }
.pick svg { flex: none; width: 40px; height: 40px; }
.pick b { display: block; font: 400 16px/1.3 var(--f-head); }
.pick span { font-size: 13px; color: var(--sumi-2); }

.toast {
  position: absolute; left: 50%; bottom: calc(var(--tab-h) + var(--safe-b) + 18px); z-index: 60; transform: translate(-50%, 20px);
  display: flex; align-items: center; gap: 12px; max-width: calc(100% - 32px); width: max-content; padding: 10px 10px 10px 18px;
  background: var(--sumi); color: #fff8ea; border-radius: 12px; font-size: 14px; font-weight: 700;
  box-shadow: 0 10px 24px rgba(0, 0, 0, .35); opacity: 0; pointer-events: none; transition: opacity .2s, transform .25s var(--ease);
}
.toast.is-on { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
.toast.is-low { bottom: calc(var(--safe-b) + 22px); }
.toast button { min-height: 40px; padding: 0 14px; border-radius: 8px; border: 0; background: #4a3d31; color: #ffd9c8; font-weight: 700; }
.toast span { word-break: keep-all; }

/* 満了→クーポン発行 */
.issue { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: flex-end; padding: 0 16px calc(var(--safe-b) + 18px); background: rgba(30, 22, 15, .72); animation: fade .25s both; }
.issue__card { position: relative; background: var(--card); border-radius: 10px; overflow: hidden; animation: tear 700ms var(--spring) both; box-shadow: 0 20px 50px rgba(0, 0, 0, .5); }
@keyframes tear { 0% { transform: translateY(120%) rotate(6deg); } 70% { transform: translateY(-8px) rotate(-1.5deg); } 100% { transform: none; } }
.issue__photo { height: 170px; }
.issue__photo img { width: 100%; height: 100%; object-fit: cover; }
.issue__body { padding: 16px 18px 18px; text-align: center; }
.issue__lbl { display: inline-block; padding: 3px 12px; border-radius: 3px; background: var(--shu-d); color: #fff; font-size: 12px; font-weight: 700; letter-spacing: .1em; }
.issue__title { margin-top: 8px; font: 400 25px/1.35 var(--f-head); word-break: keep-all; font-feature-settings: "palt"; }
.issue__sub { margin: 4px 0 14px; font-size: 14px; color: var(--sumi-2); }
.issue__perf { border-top: 2px dashed rgba(42, 35, 30, .35); margin: 0 -18px 16px; }

/* スプラッシュ・オンボーディング */
.splash { position: absolute; inset: 0; z-index: 80; display: grid; place-items: center; align-content: center; gap: 14px; background: var(--kraft) url(/app-development/apps/a080/img/kraft.webp) center / cover; animation: fade .2s both; }
.splash img { width: 112px; height: 112px; border-radius: 26px; box-shadow: var(--sh-lift); }
.splash p { font: 400 26px/1.2 var(--f-head); letter-spacing: .12em; }
.splash.is-out { animation: fadeOut .3s both; }
@keyframes fadeOut { to { opacity: 0; } }
.onb { position: absolute; inset: 0; z-index: 70; display: flex; flex-direction: column; background: var(--kraft) url(/app-development/apps/a080/img/onboard.webp) center top / cover; }
.onb__skip { position: absolute; top: calc(var(--safe-t) + 12px); right: 12px; min-height: 44px; padding: 0 16px; border-radius: var(--r-pill); border: 0; background: var(--card); font-size: 14px; font-weight: 700; }
.onb__panel { margin-top: auto; background: var(--card); border-radius: 22px 22px 0 0; padding: 22px 22px calc(var(--safe-b) + 22px); }
.onb__dots { display: flex; gap: 6px; justify-content: center; margin-bottom: 12px; }
.onb__dots i { width: 8px; height: 8px; border-radius: 50%; background: rgba(42, 35, 30, .25); }
.onb__dots i.on { background: var(--shu-d); width: 22px; border-radius: 4px; }
.onb h2 { font: 400 25px/1.4 var(--f-head); text-align: center; word-break: keep-all; font-feature-settings: "palt"; }
.onb p { margin: 8px 0 18px; font-size: 15px; line-height: 1.75; text-align: center; }

.boot { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; padding: 24px; gap: 8px; }
.boot__title { font: 400 26px var(--f-head); }
.noscript { position: fixed; inset: auto 16px 16px; padding: 12px; background: var(--card); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 1ms !important; animation-delay: 0ms !important; transition-duration: 1ms !important; }
}
