/* look tokens plus.css reads; these are the pearl values, each look file overrides them */
:root { --panel-dark: #211f2e; --on-dark: #f2f0fa; --on-dark-soft: #e9e6f4; --on-dark-muted: #b9b4cc; --tile: #fbfaff; --on-lime: #211f2e; --bezel: #1c1a27; --bezel-hi: #34313f; }
.band-spine { display: none; }
/* review links only (?theme=…): switch between the four looks */
.look-switch { position: fixed; z-index: 70; right: 16px; top: 92px; display: flex; gap: 2px; padding: 4px; border-radius: 12px;
  background: rgba(20, 20, 24, .88); color: #fff; box-shadow: 0 12px 30px -12px rgba(0,0,0,.5); font: 700 12px/1 var(--font-sans); }
.look-switch span { padding: 9px 8px 9px 10px; opacity: .6; font-weight: 600; }
.look-switch a { padding: 9px 11px; border-radius: 9px; color: inherit; text-decoration: none; }
.look-switch a[aria-current="true"] { background: #fff; color: #141418; }
@media (max-width: 640px) { .look-switch { top: auto; bottom: 74px; right: 12px; } .look-switch span { display: none; } }

/* Japanese headings and leads break between phrases (plus.js inserts <wbr> from BudouX) */
:root:lang(ja) :where([data-phrased]) {   /* plus.js PHRASE owns the list; it marks what it phrased */
  word-break: keep-all; overflow-wrap: break-word; line-break: strict; /* break-word, not anywhere: anywhere also shrinks min-content, so auto-sized columns split phrases (業務領｜域) */
}
:root:lang(ja) :is(h2, h3, .section-lead) { text-wrap: balance; }
/* Chinese and English have no phrase model here: balanced lines keep a lone character or word off the last line */
:root:not(:lang(ja)) :is(h2, h3, .section-lead) { text-wrap: balance; }
:root:lang(ja) :is(h2, h3) { font-feature-settings: "palt"; letter-spacing: -0.01em; }

/* Additions on top of the live landing page: guest kiosk, market rates, section progress,
   AI state orb. Uses the original tokens (--ink, --card, --celadon, --lime, radii, shadows). */

/* ---------- guest kiosk (refs: Mews Kiosk / Canary photo + device card) ---------- */
.kiosk [hidden], .sec-progress [hidden] { display: none !important; }
/* the front-desk terminal: a tablet on a counter stand; the demo controls and the caveat sit below it */
.guest-stage { display: grid; justify-items: center; gap: 18px; }
.kiosk-device { position: relative; width: min(100%, 720px); padding: 14px; border-radius: 32px; margin-bottom: 30px;
  background: linear-gradient(160deg, var(--bezel-hi), var(--bezel)); box-shadow: 0 46px 70px -46px rgba(20, 18, 15, .7), inset 0 0 0 1px rgba(255, 255, 255, .07); }
.kiosk-device::before { content: ""; position: absolute; left: 50%; top: 6px; width: 6px; height: 6px; margin-left: -3px; border-radius: 50%; background: rgba(255, 255, 255, .16); }   /* camera */
.kiosk-device::after { content: ""; position: absolute; left: 50%; bottom: -30px; width: 132px; height: 30px; transform: translateX(-50%);
  background: linear-gradient(180deg, var(--bezel), var(--bezel-hi)); clip-path: polygon(34% 0, 66% 0, 100% 100%, 0 100%); border-radius: 0 0 6px 6px; }   /* stand */
.kiosk { position: relative; background: var(--card); border-radius: 20px; padding: 22px 24px 20px; display: grid; gap: 16px; }
.guest-stage > .step-player { width: min(100%, 420px); }
.guest-stage > .kiosk-note { max-width: 720px; text-align: center; border-top: 0; padding-top: 0; }
.kiosk-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.kiosk-brand { font-size: 12px; color: var(--muted); }
.kiosk-mode { display: inline-flex; background: var(--canvas); border-radius: 999px; padding: 4px; gap: 2px; position: relative; }
.kiosk-mode button { border: 0; background: transparent; font: 700 13px/1 var(--font-sans); color: var(--ink-soft);
  padding: 10px 14px; min-height: 44px; border-radius: 999px; cursor: pointer; position: relative; z-index: 1; transition: color .2s; }
.kiosk-mode button[aria-selected="true"] { background: var(--ink); color: #fff; }
.kiosk-screen { min-height: 214px; display: grid; align-content: start; gap: 8px; }
.kiosk-step-label { font-size: 11px; letter-spacing: .12em; color: var(--celadon-deep); font-weight: 800; margin: 0; font-variant-numeric: tabular-nums; }
.kiosk-title { font-size: clamp(22px, 2.2vw, 27px); line-height: 1.35; letter-spacing: -0.02em; margin: 0; }
.kiosk-body { color: var(--muted); font-size: 14px; line-height: 1.8; margin: 0; }
.kiosk-screen [data-enter] { animation: plus-enter .32s var(--ease-out) both; }
@keyframes plus-enter { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.kiosk-note { font-size: 12px; color: var(--muted); margin: 0; border-top: 1px solid var(--line); padding-top: 12px; }
/* each kiosk step shows its own screen piece */
.kiosk-extra:empty { display: none; }
.kiosk-extra { margin-top: 6px; }
.kx-card { display: grid; gap: 4px; padding: 14px 16px; border-radius: 16px; background: var(--canvas); border: 1px solid var(--line); }
.kx-card .kx-ch { justify-self: start; font-size: 11px; font-weight: 800; color: #fff; background: #1d3f8f; border-radius: 6px; padding: 2px 8px; }
.kx-card .kx-ch.room { background: var(--ink); }
.kx-card b { font-size: 17px; }
.kx-card > span:not(.kx-ch) { font-size: 13px; color: var(--muted); }
.kx-chips { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 4px; }
.kx-chips i { font-style: normal; font-size: 11.5px; font-weight: 700; color: #2c5546; background: rgba(111,168,147,.16); border-radius: 999px; padding: 3px 10px; } /* 6:1 on the tint */
/* the agent reply between typing rounds is invisible: hide it from assistive tech and contrast checks too */
.terminal-card .agent-reply { transition: opacity .7s var(--ease-out), transform .7s var(--ease-out), visibility 0s linear .7s; }
.terminal-card .agent-reply:not(.show) { visibility: hidden; }
.terminal-card .agent-reply.show { transition-delay: 0s; }
.kx-scan { display: grid; grid-template-columns: 74px 1fr; gap: 14px; align-items: center; padding: 12px 14px; border-radius: 16px; background: var(--canvas); border: 1px solid var(--line); }
.kx-doc { position: relative; height: 96px; border-radius: 8px; background: linear-gradient(160deg, #2c3e66, #1b2945); overflow: hidden; }
.kx-doc::before { content: ""; position: absolute; left: 10px; top: 12px; width: 26px; height: 32px; border-radius: 4px; background: rgba(255,255,255,.28); }
.kx-doc::after { content: ""; position: absolute; left: 0; right: 0; height: 2px; top: 0; background: var(--lime); box-shadow: 0 0 10px 2px rgba(227,245,108,.8); animation: kx-scan 1.6s var(--ease-swift) infinite alternate; }
@keyframes kx-scan { to { top: calc(100% - 2px); } }
.kx-scan ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; }
.kx-scan li { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; color: var(--ink-soft); opacity: .35; animation: kx-tick .4s var(--ease-out) forwards; animation-delay: calc(.5s + var(--i) * .55s); }
.kx-scan li::before { content: "✓"; width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center; font-size: 10px; color: #fff; background: var(--celadon-deep); transform: scale(0); animation: kx-pop .35s var(--ease-spring) forwards; animation-delay: calc(.5s + var(--i) * .55s); }
@keyframes kx-tick { to { opacity: 1; } }
@keyframes kx-pop { to { transform: none; } }
.kx-room { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 16px; align-items: center; padding: 14px 18px; border-radius: 16px; background: var(--ink); color: #fff; }
.kx-room b { grid-row: 1 / span 2; font-size: 44px; font-weight: 800; letter-spacing: -.03em; line-height: 1; font-variant-numeric: tabular-nums; }
.kx-room span { font-size: 12.5px; color: #cfcbe0; }
.kx-room span:first-of-type { font-size: 14px; color: #fff; font-weight: 700; }
.kx-bill { display: grid; gap: 6px; padding: 12px 16px; border-radius: 16px; background: var(--canvas); border: 1px solid var(--line); font-variant-numeric: tabular-nums; }
.kx-bill div { display: flex; justify-content: space-between; gap: 12px; font-size: 13px; color: var(--muted); }
.kx-bill b { color: var(--ink); }
.kx-bill .sum { border-top: 1px solid var(--line); padding-top: 6px; font-weight: 800; color: var(--ink); }
.kx-bill .sum b { font-size: 18px; color: var(--celadon-deep); }

/* workflow: a pause control beside the bar, and each step shows a slice of the screen it describes */
.wf-transport { display: flex; align-items: center; justify-content: center; gap: 12px; margin-top: 18px; }
.wf-transport .workflow-progress { flex: 0 1 320px; margin: 0; }
.wf-transport .sp-control { width: 40px; height: 40px; background: var(--card); border: 1px solid var(--line); }
.panel-visual .wv { width: 100%; display: grid; gap: 7px; font-size: 12px; animation: panel-emoji-in .6s var(--ease-out); }
.wv-book div { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 8px; align-items: center; padding: 8px 10px; border-radius: 12px; background: var(--canvas); }
.wv-book .ch { grid-row: 1 / span 2; font-style: normal; font-size: 10px; font-weight: 800; color: #fff; border-radius: 6px; padding: 3px 6px; }
.wv-book .ch.b { background: #1d3f8f; } .wv-book .ch.r { background: #bf1f2f; } .wv-book .ch.t { background: var(--ink-soft); }
.wv-book b { font-size: 12.5px; } .wv-book span { font-size: 11px; color: var(--muted); }
.wv-rooms { grid-template-columns: repeat(4, 1fr); gap: 6px; }
.wv-rooms i { aspect-ratio: 1; border-radius: 7px; background: linear-gradient(135deg, #a7c6d6, #d0e2ea); }
.wv-rooms i.c { background: linear-gradient(135deg, #f7dcc8, #fbe9df); } .wv-rooms i.r { background: linear-gradient(135deg, #cdebd9, #e2f5ec); }
.wv-rooms small { grid-column: 1 / -1; font-size: 11px; color: var(--muted); }
.wv-close { padding: 12px 14px; border-radius: 14px; background: var(--canvas); font-variant-numeric: tabular-nums; }
.wv-close span { color: var(--muted); font-size: 11px; } .wv-close b { font-size: 22px; letter-spacing: -.02em; }
.wv-close .ok { justify-self: start; font-weight: 800; color: #fff; background: var(--celadon-deep); border-radius: 999px; padding: 3px 10px; }
.wv-ai { padding: 12px 14px; border-radius: 14px; background: var(--panel-dark); color: var(--on-dark); }
.wv-ai .tag { justify-self: start; font-size: 10px; font-weight: 800; color: var(--on-lime); background: var(--lime); border-radius: 999px; padding: 2px 8px; }
.wv-ai b { font-size: 14px; } .wv-ai span { color: #c9c4dd; font-size: 11.5px; }
.wv-ai i { justify-self: start; font-style: normal; font-size: 11px; font-weight: 800; border: 1px solid rgba(227,245,108,.6); color: var(--lime); border-radius: 999px; padding: 2px 9px; }

/* task list (ref: Rare UI task-list: tick → strike → nudge, reversible) */
.kiosk-tasks { list-style: none; padding: 0; margin: 6px 0 0; display: grid; gap: 8px; }
.task { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 44px; text-align: left; cursor: pointer;
  background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 8px 12px; font: 600 14px/1.5 var(--font-sans); color: var(--ink);
  box-shadow: 0 1px 2px rgba(28,26,39,.04), 0 3px 10px rgba(28,26,39,.06); transition: box-shadow .3s; }
.task:hover { box-shadow: 0 1px 2px rgba(28,26,39,.05), 0 6px 18px rgba(28,26,39,.09); }
.task:focus-visible { outline: 2px solid var(--celadon-deep); outline-offset: 2px; }
.task svg { width: 24px; height: 24px; flex: none; overflow: visible; }
.task .ring { fill: none; stroke: #c9c5d6; stroke-width: 2; stroke-dasharray: 1 4.32; stroke-linecap: round; transition: opacity .24s; }
.task .fill { fill: var(--celadon-deep); transform-box: view-box; transform-origin: 12px 12px; transform: scale(0); transition: transform .24s var(--ease-out); }
.task .tick { fill: none; stroke: #fff; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 14; stroke-dashoffset: 14;
  transition: stroke-dashoffset .22s var(--ease-out) .06s; }
.task span { background: linear-gradient(currentColor, currentColor) no-repeat 0 55% / 0% 2px; transition: background-size .38s cubic-bezier(.65,0,.35,1) .2s, color .3s .2s; }
.task[aria-checked="true"] .ring { opacity: 0; }
.task[aria-checked="true"] .fill { transform: scale(1); }
.task[aria-checked="true"] .tick { stroke-dashoffset: 0; }
.task[aria-checked="true"] span { background-size: 100% 2px; color: var(--muted); }
.task[aria-checked="true"] svg { animation: task-pop .34s var(--ease-out); }
.task.nudge { animation: task-nudge .3s var(--ease-out); }
@keyframes task-pop { 40% { transform: scale(1.08); } }
@keyframes task-nudge { 35% { transform: translateX(8px); } 70% { transform: translateX(-2px); } }

/* completion receipt with a one-shot edge light (ref: Libraries.dev BorderBeam: active → fade-out → stops) */
.kiosk-receipt { margin: 4px 0 0; font-size: 12px; color: var(--muted); }
.kiosk.beam::after { content: ""; position: absolute; inset: -1px; border-radius: inherit; pointer-events: none; padding: 1.5px;
  background: conic-gradient(from var(--beam-a, 0deg), transparent 0 70%, var(--celadon) 82%, var(--lime-deep) 88%, transparent 96%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude;
  animation: beam-sweep 1.4s var(--ease-out) forwards; }
@property --beam-a { syntax: "<angle>"; inherits: false; initial-value: 0deg; }
@keyframes beam-sweep { 0% { --beam-a: 0deg; opacity: 0; } 15% { opacity: 1; } 80% { opacity: 1; } 100% { --beam-a: 360deg; opacity: 0; } }

/* step player (ref: Rare UI step-player: dot → bar, fill = time, play/pause/replay, seekable) */
.step-player { display: flex; align-items: center; gap: 10px; }
.sp-track { flex: 1; display: flex; align-items: center; justify-content: center; gap: 0; height: 44px; padding-inline: 16px;
  background: var(--canvas); border-radius: 999px; }
.sp-dot { position: relative; box-sizing: content-box; width: 6px; height: 6px; padding: 9px; border: 0; border-radius: 999px; background: #a9a4ba; background-clip: content-box; cursor: pointer;
  transition: width .42s cubic-bezier(.34,1.25,.5,1), background-color .3s; }  /* 24px target, 6px dot */
.sp-dot.past { background-color: var(--ink); }  /* background-color, not the shorthand: keep the content-box clip */
.sp-dot[aria-current="step"] { width: 52px; overflow: hidden; }
.sp-dot i { position: absolute; top: 9px; bottom: 9px; left: 9px; width: 0; max-width: calc(100% - 18px); border-radius: 999px; background: var(--ink); }
.sp-dot:focus-visible { outline: 2px solid var(--celadon-deep); outline-offset: 4px; }
.sp-control { flex: none; width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--canvas); color: var(--ink); cursor: pointer;
  display: grid; place-items: center; transition: transform .25s cubic-bezier(.34,1.4,.5,1); }
.sp-control:active { transform: scale(.88); }
.sp-control:focus-visible { outline: 2px solid var(--celadon-deep); outline-offset: 2px; }
.sp-control svg { width: 26px; height: 26px; }
.sp-control path { fill: currentColor; opacity: 0; transform: scale(.82); transform-origin: 12px 12px; transition: opacity .26s, transform .32s cubic-bezier(.34,1.3,.5,1); }
.sp-control[data-state="playing"] .ico-pause, .sp-control[data-state="paused"] .ico-play, .sp-control[data-state="finished"] .ico-replay { opacity: 1; transform: none; }

/* ---------- market rates (ref: Lighthouse Pricing: product fragments with delta chips) ---------- */
.rates-stage { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-soft); padding: 26px; }
.rates-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.rates-head b { display: block; font-size: 15px; }
.rates-head > div:first-child { flex: 1 1 220px; min-width: 0; }
.rates-head b { text-wrap: balance; }   /* the pause button stays beside the title on phones */
.rates-head span { font-size: 12px; color: var(--muted); }
.rates-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.rate-tile { border: 1px solid var(--line); border-radius: var(--radius-md); padding: 16px; display: grid; gap: 8px; align-content: start; background: var(--tile); }
.rate-tile.own { background: var(--ink); color: #fff; border-color: var(--ink); }
.rate-name { font-size: 13px; font-weight: 700; min-width: 0; }   /* a grid item: without this one long phrase widens the tile instead of wrapping */
.rate-name small { display: block; font-weight: 500; font-size: 11px; color: var(--muted); }
.rate-price { font-size: clamp(24px, 2.6vw, 32px); font-weight: 800; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.rate-delta { justify-self: start; font-size: 11px; font-weight: 800; color: var(--on-lime); background: var(--lime); border-radius: 999px; padding: 4px 10px; }
.rates-controls { display: flex; align-items: center; gap: 8px; }
/* the week the AI priced: every day carries its proposal; the chosen day opens below */
.rates-week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; margin: 0 0 18px; touch-action: pan-y; user-select: none; -webkit-user-select: none; }
.rates-week button { position: relative; overflow: hidden; display: grid; gap: 5px; justify-items: start; align-content: start; min-height: 76px; padding: 10px 11px 12px;
  border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--canvas); color: var(--ink); font: inherit; text-align: left; cursor: pointer;
  transition: background-color .25s, border-color .25s, color .25s; }
.rates-week button:hover { border-color: var(--ink-soft); }
.rates-week button[aria-checked="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.rw-date { font-size: 14px; font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
.rw-date small { margin-left: 4px; font-size: 11px; font-weight: 700; color: var(--muted); }
[data-dow="sat"] .rw-date small { color: #2f5fb3; }
[data-dow="sun"] .rw-date small { color: #a93226; }
.rates-week [aria-checked="true"] .rw-date small, .rates-week [aria-checked="true"] .rw-own { color: rgba(255, 255, 255, .72); }
.rates-week [aria-checked="true"][data-dow="sat"] .rw-date small { color: #a9c4ff; }
.rates-week [aria-checked="true"][data-dow="sun"] .rw-date small { color: #ffb0a6; }
.rw-own { font-size: 11.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.rw-move { display: inline-flex; gap: 3px; align-items: center; font-size: 11.5px; font-weight: 800; font-variant-numeric: tabular-nums; border-radius: 999px; padding: 2px 8px;
  background: rgba(28, 26, 39, .07); color: var(--ink-soft); transition: opacity .3s, transform .45s var(--ease-spring); transition-delay: calc(var(--i) * 80ms); }
.rates-week [aria-checked="true"] .rw-move { background: rgba(255, 255, 255, .14); color: #fff; }
.rates-week [data-move="raise"] .rw-move { background: var(--lime); color: var(--on-lime); }
.rates-week [data-move="lower"] .rw-move { background: #dbe8ff; color: #1d3f8f; }
.rates-week:not(.scanned) .rw-move { opacity: 0; transform: translateY(5px); }
.rates-week button i { position: absolute; left: 0; bottom: 0; height: 3px; width: 0; background: var(--lime); }
.rates-body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.04fr); gap: 18px; align-items: stretch; }
.rates-compare { display: grid; align-content: start; gap: 12px; }
.rates-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); position: relative; }
.rates-avg { margin: 0; font-size: 13px; color: var(--ink-soft); font-variant-numeric: tabular-nums; }
.rates-note { margin: 14px 0 0; font-size: 12px; color: var(--muted); }
/* the AI reading the market: one lime sweep across the tiles per analysis */
.rates-grid.scanning::after { content: ""; position: absolute; inset: -6px; border-radius: var(--radius-md); pointer-events: none;
  background: linear-gradient(100deg, transparent 0 35%, rgba(227,245,108,.55) 47%, rgba(111,168,147,.35) 53%, transparent 65%) no-repeat;
  background-size: 260% 100%; animation: rates-scan .9s cubic-bezier(.45,0,.25,1) forwards; mix-blend-mode: multiply; }
@keyframes rates-scan { from { background-position: 130% 0; } to { background-position: -30% 0; opacity: .2; } }
.rate-ai { position: relative; overflow: hidden; background: var(--panel-dark); color: var(--on-dark); border-radius: var(--radius-lg); padding: 22px 22px 18px;
  box-shadow: var(--shadow-soft); display: grid; align-content: start; gap: 10px; }
.rate-ai::before { content: ""; position: absolute; inset: auto -30% -55% auto; width: 70%; aspect-ratio: 1; border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle, rgba(227,245,108,.22), transparent 65%); animation: ai-halo 5s ease-in-out infinite; }
@keyframes ai-halo { 50% { transform: scale(1.18) translate(-6%, -6%); opacity: .7; } }
.rate-ai > * { position: relative; }
.rate-ai-top { display: flex; align-items: center; gap: 10px; }
.rate-ai-orb canvas { display: block; }
.rate-ai-top b { font-size: 15px; letter-spacing: .02em; }
.rate-ai-top b, .rate-ai-state { white-space: nowrap; }
.rate-ai-state { margin-left: auto; font-size: 11px; font-weight: 800; letter-spacing: .06em; color: var(--on-lime); background: var(--lime); border-radius: 999px; padding: 4px 10px; }
.rate-ai[data-state="thinking"] .rate-ai-state { background: rgba(255,255,255,.12); color: var(--on-dark-soft); }
.rate-ai-ctx { margin: 4px 0 0; font-size: 12.5px; color: var(--on-dark-muted); }
.rate-ai-label { margin: 0; font-size: 13px; font-weight: 800; color: var(--lime); }
.rate-ai-price { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 10px; font-variant-numeric: tabular-nums; }
.rate-ai-from { font-size: 17px; color: var(--on-dark-muted); }
.rate-ai-arrow { color: var(--lime); font-weight: 800; }
.rate-ai-to { font-size: clamp(34px, 4vw, 46px); font-weight: 800; letter-spacing: -0.03em; line-height: 1.1; }
.rate-ai-chip { align-self: center; font-size: 12px; font-weight: 800; color: var(--on-lime); background: var(--lime); border-radius: 999px; padding: 4px 11px; }
.rate-ai[data-change="hold"] .rate-ai-from, .rate-ai[data-change="hold"] .rate-ai-arrow { display: none; }
.rate-ai[data-change="hold"] .rate-ai-chip { background: rgba(255,255,255,.14); color: var(--on-dark); }
.rate-ai-reasons { list-style: none; margin: 4px 0 0; padding: 0; display: grid; gap: 8px; counter-reset: why; }
.rate-ai-reasons li { counter-increment: why; display: grid; grid-template-columns: 22px 1fr; gap: 10px; font-size: 13.5px; line-height: 1.6; color: var(--on-dark-soft);
  animation: reason-in .5s var(--ease-out) both; animation-delay: calc(var(--i, 0) * 120ms + 80ms); }
.rate-ai-reasons li::before { content: counter(why); width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center;
  font-size: 11px; font-weight: 800; color: var(--on-lime); background: var(--lime); }
@keyframes reason-in { from { opacity: 0; transform: translateY(8px); filter: blur(2px); } to { opacity: 1; transform: none; filter: none; } }
.rate-ai[data-state="thinking"] .rate-ai-reasons, .rate-ai[data-state="thinking"] .rate-ai-price, .rate-ai[data-state="thinking"] .rate-ai-label { opacity: .28; transition: opacity .2s; }
.rate-ai-basis { margin: 6px 0 0; padding-top: 10px; border-top: 1px solid rgba(243, 238, 227, .16); font-size: 12px; font-weight: 700; color: var(--on-dark-soft); }
.rate-ai-note { margin: 2px 0 0; font-size: 11.5px; color: var(--on-dark-muted); }

/* digit wheel (ref: Rare UI animated-counter: per-place wheel, eased mask, direction-aware, sr-only value) */
.counter { display: inline-flex; align-items: center; }
.counter .wheel { display: inline-block; position: relative; height: 1.25em; line-height: 1.25em; overflow: hidden; vertical-align: bottom;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 22%, #000 78%, transparent 100%);
          mask-image: linear-gradient(to bottom, transparent 0, #000 22%, #000 78%, transparent 100%); }
.counter .wheel .sizer { visibility: hidden; }
.counter .wheel .stack { position: absolute; inset: 0 0 auto; display: flex; flex-direction: column; text-align: center;
  transition: transform .62s cubic-bezier(.3,1.3,.5,1); }
.counter .wheel .stack span { height: 1.25em; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- AI state orb in the agent terminal (refs: Rare UI matrix-orb, Libraries.dev ThinkingOrb) ---------- */
.terminal-top { position: relative; }
.agent-orb { margin-left: auto; display: inline-flex; align-items: center; gap: 8px; font-size: 12px; color: #c9c4dd; }
.agent-orb canvas { width: 36px; height: 36px; display: block; margin-block: -6px; }

/* ---------- module bento: real rows, same motion as the shapes they replace ---------- */
.mv { width: 100%; display: grid; gap: 8px; }
.mv > small { font-size: 11px; font-weight: 700; color: var(--ink-soft); display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; }
.mv > small b { width: 7px; height: 7px; border-radius: 50%; background: var(--celadon); display: inline-block; }
.mv-book div { display: grid; grid-template-columns: auto 1fr auto; grid-template-rows: auto auto; column-gap: 9px; align-items: center; padding: 7px 10px; border-radius: 10px;
  background: rgba(255, 255, 255, .78); opacity: 0; transform: translateX(-10px); }
.in-view .mv-book div { opacity: 1; transform: none; transition: opacity .5s, transform .7s var(--ease-out); transition-delay: calc(var(--d) * .16s + .3s); }
.mv-book .ch { grid-row: 1 / span 2; font-style: normal; font-size: 9.5px; font-weight: 800; color: #fff; border-radius: 6px; padding: 3px 6px; }
.mv-book .ch.b { background: #1d3f8f; } .mv-book .ch.r { background: #bf1f2f; } .mv-book .ch.t { background: #4a4760; }
.mv-book b { font-size: 12px; } .mv-book span { font-size: 10.5px; color: var(--muted); }
.mv-book span { grid-column: 2 / -1; grid-row: 2; }   /* the date takes the whole second line; the status sits beside the name */
.mv-book em { grid-row: 1; grid-column: 3; font-style: normal; font-size: 10px; font-weight: 800; border-radius: 999px; padding: 3px 8px; background: rgba(28, 26, 39, .07); color: var(--ink-soft); }
.mv-book em.ok { background: rgba(72, 121, 104, .14); color: var(--celadon-deep); } .mv-book em.wait { background: rgba(242, 176, 74, .2); color: #8a5a10; }
.mv-rooms .viz-grid i { aspect-ratio: auto; height: 26px; display: grid; place-items: center; font-style: normal; font-size: 9.5px; font-weight: 800; color: var(--ink-soft); font-variant-numeric: tabular-nums; }
.mv-rooms .viz-grid i.o { background: rgba(28, 26, 39, .72); color: #fff; }
.mv-rooms .viz-grid i.c { background: #f2c9b8; color: #7a3a22; }
.mv-rooms small b { background: rgba(255, 255, 255, .9); box-shadow: inset 0 0 0 1px rgba(28, 26, 39, .2); } .mv-rooms small b.o { background: rgba(28, 26, 39, .72); box-shadow: none; } .mv-rooms small b.c { background: #f2c9b8; box-shadow: none; }
.mv-tasks i { height: auto; font-style: normal; font-size: 11.5px; font-weight: 700; color: var(--ink); }
.mv-tasks i::after { display: none; }
.mv-tasks b { font-size: 10px; font-weight: 800; border-radius: 6px; padding: 2px 6px; background: rgba(255, 255, 255, .85); font-variant-numeric: tabular-nums; }
.mv-tasks small { margin-left: auto; font-size: 10.5px; font-weight: 600; color: var(--muted); }
.mv-rate .viz-bars { height: 70px; padding-bottom: 16px; }
.mv-rate .viz-bars i { position: relative; overflow: visible; }
.mv-rate .viz-bars small { font-style: normal; position: absolute; left: 50%; bottom: -16px; transform: translateX(-50%); font-size: 9.5px; font-weight: 800; color: var(--muted); }
.mv-rate .viz-bars i:first-child small { color: #2f5fb3; } .mv-rate .viz-bars i:nth-child(2) small { color: #a93226; }
.mv-guest { grid-template-columns: auto 1fr; align-items: center; column-gap: 14px; }
.mv-guest .viz-avatars i { display: grid; place-items: center; font-style: normal; font-size: 11px; font-weight: 800; color: #2a2733; }
.mv-guest > small { display: block; line-height: 1.5; }
.mv-cash .viz-ticker { align-items: center; }
.mv-cash .lbl { font-size: 11px; font-weight: 700; color: var(--ink-soft); }
.mv-cash .counter { font-size: 24px; font-variant-numeric: tabular-nums; }
.mv-tax .viz-donut span { display: grid; }
.mv-tax .viz-donut small { font-size: 11px; font-weight: 700; color: var(--ink-soft); }

@media (min-width: 641px) { .swipe-dots { display: none; } }
/* ---------- phones: the main call to action leads, full width; tighter section rhythm ---------- */
@media (max-width: 640px) {
  /* the module cards swipe sideways (the next one peeks in) instead of a 2,600px column */
  .bento { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; overscroll-behavior-x: contain;
    margin-inline: -24px; padding: 6px 24px 14px; scroll-padding-inline: 24px; scrollbar-width: none; }
  .bento::-webkit-scrollbar { display: none; }
  .bento > .bento-card { flex: 0 0 84%; scroll-snap-align: start; }
  .bento-card:hover { transform: none; }
  .swipe-dots { display: flex; justify-content: center; gap: 6px; margin-top: 4px; }
  .swipe-dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--line); transition: width .3s var(--ease-out), background-color .3s; }
  .swipe-dots i.on { width: 18px; border-radius: 3px; background: var(--ink); }
  /* the six AI abilities and the six safeguards: two compact columns */
  .capability-grid, .security-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .capability-card, .security-card { padding: 14px 13px; }
  .capability-card h3 { font-size: 14px; }
  .capability-card p, .security-card p { font-size: 12.5px; line-height: 1.65; }
  .security-card strong { font-size: 13.5px; }
  .security-card .sec-ico { width: 30px; height: 30px; border-radius: 9px; margin-bottom: 10px; }
  .service-card { padding: 22px 20px; }
  .service-num { margin-bottom: 18px; }
  .hero-actions > *, .band-actions > * { flex: 1 1 100%; justify-content: center; }
  .section { padding-top: 76px; }
  .rates-week { margin-inline: -12px; }   /* seven 44px days fit a phone */
}
/* one focus ring for everything without its own (the browser default differed per element) */
:where(a, button, summary, input, textarea, select, [tabindex]):focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
:where(.trail-section, .terminal-card, .rate-ai, .cta-band) :where(a, button, summary, [tabindex]):focus-visible { outline-color: var(--on-dark); }
/* the digit wheels are pictures of numbers: selecting or finding text should get the real value only */
.counter-visual { user-select: none; -webkit-user-select: none; }
.nobr { white-space: nowrap; }

/* ---------- touch: the language buttons stay 28px tall but take taps 44px tall ---------- */
@media (max-width: 640px) { .lang-button { position: relative; } .lang-button::after { content: ""; position: absolute; inset: -8px 0; } }

/* ---------- the approval seal (印): one press shared by the title, the hero console and the case file ---------- */
@keyframes seal-press {
  0% { opacity: 0; transform: rotate(-20deg) scale(1.7); }
  55% { opacity: 1; transform: rotate(-9deg) scale(.92); }
  78% { transform: rotate(-11deg) scale(1.04); }
  100% { opacity: 1; transform: rotate(-10deg) scale(1); }
}
.seal { position: absolute; display: none; place-content: center; text-align: center; border-radius: 50%; border: 2px solid var(--vermilion); color: var(--vermilion);
  font-family: var(--serif); font-weight: 700; line-height: 1.05; letter-spacing: 0; background: rgba(253, 251, 246, .3); mix-blend-mode: multiply;
  pointer-events: none; opacity: 0; transform: rotate(-10deg); }
.seal::before { content: attr(data-a); }   /* generated text: the seal never adds words to the h1 or the page text */
.seal::after { content: attr(data-b); display: block; margin-top: .15em; font-family: var(--font-sans); font-size: .62em; font-weight: 700; }
.seal.pressed { animation: seal-press .5s cubic-bezier(.3, 1.4, .5, 1) both; }
.mock-assistant { position: relative; }
.op-seal { width: 50px; height: 50px; right: -7px; bottom: -9px; font-size: 13px; }   /* across the note's edge, like a seal over a fold */
@media (max-width: 980px) { .op-seal { width: 46px; height: 46px; right: 18px; bottom: 10px; font-size: 12px; } }   /* wide panel: beside the buttons, clear of the log times */
/* the title: once the marker has run, the manager's seal lands after へ。 — in the margin, never on a glyph */
.hero-title .title-soft .word { position: relative; }
.title-seal { font-size: .17em; width: 3.7em; height: 3.7em; left: calc(100% + .9em); top: calc(50% - 1.85em); border-width: .17em; animation: seal-press .5s cubic-bezier(.3, 1.4, .5, 1) 2.3s both; }

/* ---------- hub: the signal and the event it carries ---------- */
.hub-signal { fill: var(--lime); stroke: var(--ink); stroke-width: 1.5; opacity: 0; transition: opacity .2s; filter: drop-shadow(0 0 7px rgba(227, 245, 108, .95)); }
.hub-signal.on { opacity: 1; }
.hub-node { transition: box-shadow .35s, background-color .35s; }
.hub-node.hub-hot { box-shadow: 0 0 0 2px var(--ink), 0 14px 34px -16px rgba(40, 32, 80, .35); }
.hub-node.hub-done { box-shadow: 0 0 0 2px var(--celadon-deep), 0 0 0 7px rgba(72, 121, 104, .16), 0 14px 34px -16px rgba(40, 32, 80, .35); }
.hub-center::after { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: 0; }
.hub-center.hub-recv::after { animation: hub-recv .7s var(--ease-out); }   /* a ring, so the breathing animation is never restarted */
@keyframes hub-recv { from { opacity: 1; box-shadow: 0 0 0 0 rgba(227, 245, 108, .9); } to { opacity: 0; box-shadow: 0 0 0 18px rgba(227, 245, 108, 0); } }
.hub-event { position: absolute; left: 50%; top: calc(50% + 40px); width: min(360px, 42%); transform: translateX(-50%); display: grid; gap: 3px; text-align: center; pointer-events: none; }
.hub-event small { font-size: 11px; font-weight: 800; letter-spacing: .04em; color: var(--celadon-deep); }
.hub-event b { font-size: 14px; line-height: 1.45; }
.hub-event span { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.hub-event.swap { animation: hub-swap .5s var(--ease-out); }
@keyframes hub-swap { from { opacity: 0; translate: 0 6px; } }
.hub-control { position: absolute; right: 50%; translate: 50% 0; bottom: -58px; }
@media (max-width: 980px) {
  .hub-diagram { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; max-width: 460px; padding: 6px 0 64px; }
  .hub-center { grid-column: 1 / -1; justify-self: center; margin-bottom: 4px; position: relative; inset: auto; }
  .hub-node { justify-content: flex-start; }
  .hub-event { position: static; grid-column: 1 / -1; width: auto; transform: none; margin-top: 8px; min-height: 66px; }
  .hub-control { right: 50%; translate: 50% 0; bottom: 8px; }
}
@media (prefers-reduced-motion: reduce) { .hub-event.swap, .hub-center.hub-recv::after { animation: none; } }

/* ---------- floating section progress (ref: Rare UI scroll-progress) ---------- */
.sec-progress { position: fixed; left: 24px; bottom: calc(22px + env(safe-area-inset-bottom, 0px)); z-index: 60;
  opacity: 0; pointer-events: none; transition: opacity .3s; }
.sec-progress.ready { opacity: 1; pointer-events: auto; }
.sec-progress { transition: opacity .3s, transform .35s var(--ease-out); }
/* steps aside while it would sit on a link or button */
.sec-progress.ready.tuck { opacity: 0; transform: translateY(calc(100% + 28px)); pointer-events: none; }
.sp-surface { background: rgba(255, 255, 255, 0.86); border: 1px solid rgba(28,26,39,.1); box-shadow: 0 16px 40px -18px rgba(40,32,80,.45);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); border-radius: 26px; overflow: hidden;
  transition: width .5s cubic-bezier(.34,1.2,.5,1), height .5s cubic-bezier(.34,1.2,.5,1), border-radius .5s; }
.sp-pill { display: flex; align-items: center; gap: 10px; height: 44px; padding: 0 18px 0 10px; border: 0; background: transparent; cursor: pointer;
  font: 700 13px/1 var(--font-sans); color: var(--ink); white-space: nowrap; }
.sp-pill svg { width: 22px; height: 22px; transform: rotate(-90deg); flex: none; }
.sp-pill .bg { fill: none; stroke: rgba(28,26,39,.12); stroke-width: 2.5; }
.sp-pill .fg { fill: none; stroke: var(--ink); stroke-width: 2.5; stroke-linecap: round; }
.sp-pill .helm { fill: none; stroke: var(--ink); stroke-width: 1.3; stroke-linecap: round; transform-origin: 12px 12px; }
.sp-pill .helm .axle { fill: var(--ink); stroke: none; }
.sp-label { position: relative; display: inline-block; }
.sp-label span { display: inline-block; animation: label-in .22s var(--ease-out); }
@keyframes label-in { from { opacity: 0; filter: blur(1.5px); } to { opacity: 1; filter: none; } }
.sp-list { list-style: none; margin: 0; padding: 6px; display: grid; gap: 2px; }
.sp-list button { display: flex; align-items: center; gap: 12px; width: 100%; border: 0; background: transparent; border-radius: 14px; padding: 11px 14px;
  min-height: 40px; font: 600 13px/1 var(--font-sans); color: rgba(28,26,39,.55); cursor: pointer; text-align: left; white-space: nowrap; position: relative;
  animation: item-in .3s cubic-bezier(.65,0,.35,1) both; animation-delay: calc(40ms + var(--i) * 30ms); }
.sp-list button::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: rgba(28,26,39,.3); flex: none; }
.sp-list button[aria-current="true"] { color: var(--ink); background: rgba(28,26,39,.07); }
.sp-list button[aria-current="true"]::before { background: var(--ink); }
.sp-list button:hover { color: var(--ink); }
.sp-list button:focus-visible, .sp-pill:focus-visible { outline: 2px solid var(--celadon-deep); outline-offset: -2px; }
@keyframes item-in { from { opacity: 0; transform: translateY(4px); filter: blur(3px); } to { opacity: 1; transform: none; filter: none; } }

/* decorative loops stop while offscreen; resume where they were (ref: Libraries.dev lifecycle) */
.is-offscreen * { animation-play-state: paused !important; }
.is-offscreen .stage-tilt { animation-play-state: running !important; } /* scroll-driven, not a loop */

.rare-credit { font-size: 12px; color: var(--muted); }

@media (max-width: 860px) {
  .kiosk-device { padding: 9px; border-radius: 24px; }
  .kiosk { padding: 18px 16px 16px; border-radius: 16px; }
  .rates-body { grid-template-columns: 1fr; }
  .rates-stage { padding: 18px; }
  .rates-week { gap: 2px; }
  .rates-week button { min-height: 60px; padding: 8px 2px 10px; justify-items: center; text-align: center; }
  .rw-date { display: grid; justify-items: center; font-size: 12.5px; }
  .rw-date small { margin: 0; }
  .rw-own, .rw-to { display: none; }
  .rw-move { padding: 2px 7px; }
}
/* phones: the progress pill shrinks to its ring in the corner so it never covers a heading */
@media (max-width: 640px) {
  .sec-progress { left: auto; right: 14px; bottom: calc(14px + env(safe-area-inset-bottom, 0px)); }
  .sp-pill { padding: 0 11px; }
  .sp-pill .sp-label { display: none; }
}
@media (max-width: 420px) {
  .kiosk { margin-inline: 0; padding: 18px 16px 14px; }
  .kiosk-mode button { padding-inline: 12px; }
}

/* ---------- approval case file (form ref: Rare UI folder-component; state = the four approval steps) ---------- */
.case-wrap { position: relative; display: grid; justify-items: center; gap: 14px; margin: 10px 0 6px; }
.case { --flap: -16deg; --peek: 0deg; position: relative; width: 320px; height: 400px; padding: 0; border: 0; background: none; color: inherit;
  font: inherit; cursor: pointer; perspective: 900px; -webkit-tap-highlight-color: transparent; }
.case:hover { --peek: -6deg; }
.case-back { position: absolute; left: 0; right: 0; bottom: 0; height: 200px; border-radius: 6px 20px 20px 20px;
  background: linear-gradient(180deg, #1d3040, #132331); border: 1px solid rgba(255,255,255,.12); box-shadow: 0 30px 60px -30px rgba(0,0,0,.7); }
.case-tab { position: absolute; left: -1px; top: -27px; height: 28px; padding: 7px 16px 0; border-radius: 14px 14px 0 0; background: #1d3040;
  border: 1px solid rgba(255,255,255,.12); border-bottom: 0; font-size: 11px; font-weight: 700; letter-spacing: .06em; color: #8aa0a0; }
.case-cards { position: absolute; left: 50%; bottom: 26px; width: 0; height: 0; }
.case-card { --x: 0px; --y: 0px; --r: 0deg; --o: 1; position: absolute; left: -68px; bottom: 0; width: 136px; height: 172px; border-radius: 12px;
  padding: 14px; display: flex; flex-direction: column; gap: 6px; text-align: left; color: #0b141f;
  background: linear-gradient(160deg, #f6faf8, #dfe9e5); box-shadow: 0 18px 30px -18px rgba(0,0,0,.75);
  transform: translate(var(--x), var(--y)) rotate(var(--r)); opacity: var(--o);
  transition: transform .72s cubic-bezier(.34,1.18,.5,1), opacity .4s ease; }
.case-card small { font-size: 10px; font-weight: 800; letter-spacing: .08em; color: #4d8270; }
.case-card b { font-size: 13px; line-height: 1.3; }
.case-card strong { font-size: 24px; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.case-card i { display: block; height: 4px; border-radius: 2px; background: rgba(11,20,31,.14); width: 82%; }
.case-card i:nth-of-type(2) { width: 60%; } .case-card i:nth-of-type(3) { width: 70%; }
.case-card em { margin-top: auto; font-style: normal; font-size: 10.5px; color: #5b6b6b; }
.c-evid { z-index: 1; } .c-rule { z-index: 2; }
.c-draft { z-index: 3; background: linear-gradient(160deg, #94f2b0, #68e78e); animation: draft-breath 4.6s ease-in-out infinite; }
/* the active document breathes, as the glass fan's active doc did in the original */
@keyframes draft-breath {
  0%, 100% { box-shadow: 0 0 46px -10px rgba(104,231,142,.55), 0 18px 30px -18px rgba(0,0,0,.75); }
  50% { box-shadow: 0 0 82px -6px rgba(104,231,142,.82), 0 18px 30px -18px rgba(0,0,0,.75); }
}
/* first sight: the folder opens a little and the draft rises out of it */
.case:not(.shown) { --flap: -4deg; }
.case:not(.shown) .c-draft { --y: 34px; --o: 0; }
/* the "you are here" marker rides on the item being worked on, so it always points at something */
.c-draft .trail-here { top: -46px; white-space: nowrap; font-size: 12px; }
.c-draft .trail-here small, .c-draft .trail-here span { font-size: 12px; letter-spacing: 0; color: #06250f; }
.c-draft small { color: #06250f; } .c-draft i { background: rgba(6,40,18,.2); }
.case-stamp { position: absolute; right: 10px; bottom: 12px; background: #fff; border: 2px solid #0b141f; border-radius: 8px; padding: 4px 8px;
  font-size: 13px; font-weight: 800; line-height: 1.15; text-align: center; color: #0b141f; opacity: 0; transform: rotate(-10deg) scale(1.6); }
.case-stamp small { font-size: 8.5px; font-weight: 700; letter-spacing: 0; color: #0b141f; }
.case-flap { position: absolute; left: 0; right: 0; bottom: 0; height: 158px; border-radius: 20px; z-index: 4;
  background: linear-gradient(180deg, rgba(44,68,84,.96), rgba(26,43,56,.98)); border: 1px solid rgba(255,255,255,.16);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.14); transform-origin: 50% 100%;
  transform: rotateX(calc(var(--flap) + var(--peek))); transition: transform .72s cubic-bezier(.34,1.15,.5,1); }
.case-flap-label { position: absolute; left: 20px; right: 20px; bottom: 18px; display: grid; gap: 3px; text-align: left; }
.case-flap-label b { font-size: 13px; color: #eaf2ee; transition: color .3s; }
.case-flap-label small { font-size: 11px; color: #8aa0a0; }
/* 01 作成: the draft rises out of the file */
.case[data-phase="0"] .c-draft { --y: -66px; }
.case[data-phase="0"] .c-evid { --x: -230px; --y: -30px; --r: -20deg; --o: 0; }
.case[data-phase="0"] .c-rule { --x: 230px; --y: -30px; --r: 20deg; --o: 0; }
/* 02 添付: evidence and policy slide in behind it */
.case[data-phase="1"] { --flap: -22deg; }
.case[data-phase="1"] .c-draft { --y: -40px; --r: -2deg; }
.case[data-phase="1"] .c-evid { --x: -42px; --y: -24px; --r: -9deg; }
.case[data-phase="1"] .c-rule { --x: 42px; --y: -18px; --r: 8deg; }
/* 03 承認: a person opens the file, everything is laid out, the draft gets stamped */
.case[data-phase="2"] { --flap: -62deg; }
.case[data-phase="2"] .c-draft { --y: -152px; }
.case[data-phase="2"] .c-evid { --x: -128px; --y: -112px; --r: -13deg; }
.case[data-phase="2"] .c-rule { --x: 128px; --y: -108px; --r: 12deg; }
/* 04 記録: filed and closed with the audit id */
.case[data-phase="3"] { --flap: -5deg; }
.case[data-phase="3"] .c-draft { --y: -20px; }
.case[data-phase="3"] .c-evid { --x: -22px; --y: -10px; --r: -6deg; }
.case[data-phase="3"] .c-rule { --x: 22px; --y: -8px; --r: 5deg; }
.case[data-phase="2"] .case-stamp, .case[data-phase="3"] .case-stamp { animation: seal-press .5s cubic-bezier(.3, 1.4, .5, 1) .38s both; }
.case[data-phase="3"] .case-flap-label b { color: #68e78e; }
.case-flap-label { transition: opacity .25s; }
.case[data-phase="2"] .case-flap-label { opacity: 0; } /* foreshortened text on an open flap is unreadable */

/* the existing progress panel now follows the same clock instead of three 5.4s loops */
.trail-section .trail-step .num, .trail-section .trail-steps::after, .trail-section .trail-valid .bar::before { animation: none !important; }
.trail-section .trail-step .num { transition: background-color .35s, border-color .35s, color .35s, box-shadow .35s; }
.trail-section .trail-steps::after { transition: transform .6s var(--ease-out); }
.trail-section .trail-valid .bar::before { transition: transform .6s var(--ease-out); }
.trail-section[data-phase="1"] .trail-steps::after { transform: scaleX(.333); }
.trail-section[data-phase="2"] .trail-steps::after { transform: scaleX(.667); }
.trail-section[data-phase="3"] .trail-steps::after { transform: scaleX(1); }
.trail-section[data-phase="1"] .trail-valid .bar::before { transform: scaleX(.333); }
.trail-section[data-phase="2"] .trail-valid .bar::before { transform: scaleX(.667); }
.trail-section[data-phase="3"] .trail-valid .bar::before { transform: scaleX(1); }
.trail-section[data-phase] .trail-step:nth-child(1) .num,
.trail-section[data-phase="1"] .trail-step:nth-child(2) .num, .trail-section[data-phase="2"] .trail-step:nth-child(2) .num, .trail-section[data-phase="3"] .trail-step:nth-child(2) .num,
.trail-section[data-phase="3"] .trail-step:nth-child(4) .num { background: #68e78e; border-color: #68e78e; color: #06250f; box-shadow: 0 0 22px -4px rgba(104,231,142,.7); }
.trail-section[data-phase="2"] .trail-step:nth-child(3) .num, .trail-section[data-phase="3"] .trail-step:nth-child(3) .num { background: #fff; border-color: #fff; color: #0b141f; }
.trail-section:not([data-phase="3"]) .trail-valid .fin { color: #8aa0a0; }
.trail-section .trail-tl .row { transition: transform .45s var(--ease-out); }
.trail-section .trail-tl time { transition: color .35s; }
/* rows not reached yet: the time drops to the muted text colour (5:1 on every band colour); 40% opacity left them at about 2:1 */
.trail-section .trail-tl .row:not(.go) { transform: translateX(-10px); }
.trail-section .trail-tl .row:not(.go) time { color: #8aa0a0; }
/* a step that just lit pops once with a glow; the human step glows white */
.trail-section .trail-step .num.pop { animation: num-pop .55s cubic-bezier(.3,1.45,.5,1) !important; }
.trail-section .trail-step:nth-child(3) .num { --pop: rgba(255,255,255,.7); }
@keyframes num-pop {
  0% { transform: scale(.8); }
  45% { transform: scale(1.2); box-shadow: 0 0 0 7px rgba(104,231,142,.18), 0 0 30px var(--pop, rgba(104,231,142,.85)); }
  100% { transform: scale(1); }
}
.trail-section[data-phase="3"] .trail-valid .fin { animation: fin-glow 1.4s ease-out; }
@keyframes fin-glow { 30% { text-shadow: 0 0 16px rgba(104,231,142,.95); } }

.step-player.on-dark { width: min(360px, 100%); }
.step-player.on-dark .sp-track, .step-player.on-dark .sp-control { background: rgba(255,255,255,.08); }
.step-player.on-dark .sp-dot { background-color: rgba(255,255,255,.3); }
.step-player.on-dark .sp-dot.past { background-color: #68e78e; }
.step-player.on-dark .sp-dot i { background: #68e78e; }
.step-player.on-dark .sp-control { color: #eaf2ee; }
.step-player.on-dark :focus-visible { outline-color: #68e78e; }

/* ---------- pain points: the old way gets struck through once ---------- */
/* inline, cloned per line fragment: each wrapped line gets its own strike that ends with its text (Rare UI task-list) */
.pain-old { background: linear-gradient(rgba(91,86,110,.5), rgba(91,86,110,.5)) no-repeat 0 56% / 0% 1px;
  -webkit-box-decoration-break: clone; box-decoration-break: clone;
  transition: background-size .55s cubic-bezier(.65,0,.35,1) calc(var(--stagger, 0s) * 3); }
.pain-cards.struck .pain-old { background-size: 100% 1px; }
.pain-chip.after { transition: transform .32s cubic-bezier(.3,1.45,.5,1) calc(var(--stagger, 0s) * 3 + .45s); }
.pain-cards:not(.struck) .pain-chip.after { transform: scale(.9); }

/* ---------- FAQ: height follows content (ref: Rare UI family-drawer; CSS-only where supported) ---------- */
@supports (interpolate-size: allow-keywords) {
  .faq-item { interpolate-size: allow-keywords; }
  .faq-item::details-content { height: 0; overflow: clip; transition: height .3s var(--ease-out), content-visibility .3s allow-discrete; }
  .faq-item[open]::details-content { height: auto; }
}

@media (max-width: 560px) {
  .case { zoom: .8; }
}

/* ---------- motion tokens for the additions ---------- */
:root { --ease-spring: cubic-bezier(.34, 1.18, .5, 1); --ease-swift: cubic-bezier(.45, 0, .25, 1); }

/* ---------- hero: above the fold, the rise plays on first paint (no wait for app.js; phone LCP) ---------- */
@keyframes hero-rise { from { opacity: 0; transform: translateY(34px); } to { opacity: 1; transform: none; } }
.hero-inner > [data-animate]:not(.hero-title) { animation: hero-rise .9s var(--ease-out) both; }
.hero-inner > .eyebrow-chip { animation-delay: .05s; }
.hero-inner > .hero-sub { animation-delay: .5s; }
.hero-inner > .hero-lead { animation-delay: .6s; }
.hero-inner > .hero-actions { animation-delay: .7s; }
.hero-inner > .hero-metrics { animation-delay: .8s; }

/* ---------- hero: the tagline played out — AI drafts, a manager approves, room 507 moves ---------- */
.hero { padding-top: 124px; }
.hero-stage { margin-top: 26px; }
.hero .hero-metrics { margin-top: 24px; }
/* proportional kana and punctuation: the title tightens ~15% and the leading 「 loses its empty half */
.hero-title { font-feature-settings: "palt"; letter-spacing: -0.02em; font-size: min(clamp(40px, 6.6vw, 80px), (100vw - 48px) / 10); }
.hero-sub, .kicker-chip, .eyebrow-chip { font-feature-settings: "palt"; }
.hero-title .title-soft .word:not(:last-child) {
  background: linear-gradient(transparent 66%, var(--marker, #e4f577) 66%, var(--marker, #e4f577) 93%, transparent 93%) no-repeat 0 0 / 0% 100%;
  padding-right: 1px; margin-right: -1px; /* overlap the word boxes so the band has no seams (the colour must be opaque) */
  animation: word-rise .85s var(--ease-out) forwards, marker-sweep .42s var(--ease-swift) forwards;
  animation-delay: calc(.25s + var(--w) * .07s), calc(1.2s + var(--w) * .045s);
}
@keyframes marker-sweep { to { background-size: 100% 100%; } }
.mock-console .op-cursor { position: absolute; left: 0; top: 0; z-index: 8; pointer-events: none; display: flex; align-items: flex-start; gap: 2px;
  opacity: 0; transition: opacity .25s; will-change: transform; }
.op-cursor.op-show { opacity: 1; }
.op-cursor svg { width: 22px; height: 22px; margin: -3px 0 0 -5px; transform-origin: 5px 3px; filter: drop-shadow(0 3px 6px rgba(28,26,39,.35)); }
.op-cursor path { fill: var(--ink); stroke: #fff; stroke-width: 1.4; stroke-linejoin: round; }
.op-cursor span { margin-top: 14px; font-size: 10.5px; font-weight: 800; color: var(--on-lime); background: var(--lime); border-radius: 999px; padding: 3px 8px;
  box-shadow: 0 6px 14px -8px rgba(28,26,39,.5); white-space: nowrap; }
.mock-console .op-spark { position: absolute; left: 0; top: 0; z-index: 7; width: 12px; height: 12px; margin: -6px 0 0 -6px; border-radius: 50%; pointer-events: none;
  background: var(--lime); box-shadow: 0 0 0 4px rgba(227,245,108,.35), 0 0 18px 4px rgba(227,245,108,.9); opacity: 0; }
.assistant-actions .chip-dark.op-pressed { transform: scale(.92); transition: transform .12s; }
.assistant-actions .chip-dark.op-approved { animation: none; transform: none; background: var(--celadon-deep); color: #fff;
  transition: background-color .3s, transform .35s var(--ease-spring); }
.assistant-actions .chip-dark.op-approved::before { content: "✓ "; }
.mock-room.op-target { position: relative; }
.op-face { position: absolute; inset: -1px; border-radius: inherit; display: grid; place-content: center; justify-items: center; gap: 1px; font-style: normal;
  background: linear-gradient(135deg, #f0ad52, #f8d59e); color: #3d2604; transform: perspective(200px) rotateY(90deg); opacity: 0;
  transition: transform .5s var(--ease-spring), opacity .2s; }
.op-face svg { width: 18px; height: 18px; fill: currentColor; }
.op-face b { font-size: 9px; font-weight: 800; line-height: 1; letter-spacing: .02em; }
.op-fixing .op-face { transform: none; opacity: 1; }
.mock-room.op-fixing::after { content: ""; position: absolute; inset: -5px; border-radius: 11px; border: 2px solid rgba(240,173,82,.95); pointer-events: none;
  animation: op-ring 1.1s ease-out 2; opacity: 0; }
@keyframes op-ring { from { opacity: 1; transform: scale(.85); } to { opacity: 0; transform: scale(1.45); } }
.mock-console .op-toast { position: absolute; z-index: 8; left: 50%; top: 58px; transform: translate(-50%, -12px); opacity: 0; pointer-events: none;
  display: flex; align-items: center; gap: 10px; padding: 9px 16px 9px 10px; border-radius: 14px; background: var(--panel-dark); color: var(--on-dark);
  box-shadow: 0 18px 36px -16px rgba(28,26,39,.6); font-size: 12px; font-weight: 700; white-space: nowrap;
  transition: transform .45s var(--ease-spring), opacity .25s; }
.op-toast i { flex: none; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-style: normal; font-size: 12px; background: var(--lime); color: var(--on-lime); }
.op-toast small { display: block; font-size: 10.5px; font-weight: 600; color: var(--on-dark-muted); margin-top: 1px; }
.op-toast.op-show { opacity: 1; transform: translate(-50%, 0); }
/* after approval the empty part of the AI panel becomes the run's record */
.mock-assistant .op-log { list-style: none; margin: auto 0 0; padding: 0; display: grid; gap: 6px; }
.op-log li { display: flex; align-items: center; gap: 8px; font-size: 11.5px; font-weight: 700; color: #3a3d20;
  opacity: 0; transform: translateY(6px); transition: opacity .3s, transform .45s var(--ease-spring); transition-delay: calc(var(--i) * 140ms); }
.op-log li::before { content: "✓"; flex: none; width: 17px; height: 17px; border-radius: 50%; display: grid; place-items: center; font-size: 10px;
  background: rgba(58,61,32,.14); color: #3a3d20; }
.op-log time { margin-left: auto; font-weight: 600; opacity: .7; font-variant-numeric: tabular-nums; }
.mock-assistant.op-logged .op-log li { opacity: 1; transform: none; }
/* the console stands up as the reader scrolls into it */
@keyframes stage-rise { from { transform: perspective(1800px) rotateX(24deg) scale(.9); } to { transform: none; } }
@keyframes stage-in { from { opacity: 0; transform: translateY(60px); } to { opacity: 1; transform: none; } }
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) and (min-width: 981px) {
    .stage-tilt { transform-origin: 50% 0; animation: stage-rise linear both; animation-timeline: view(); animation-range: entry 0% cover 42%; }
    /* only its top edge is in the first view, below the reveal threshold: it enters on load instead */
    .hero-stage[data-animate="float-in"] { animation: stage-in 1.1s var(--ease-out) .55s both; }
  }
}

/* ---------- section rhythm: editorial heads, sticky FAQ head, the dark band opens ---------- */
@media (min-width: 981px) {
  .section-head.head-split { max-width: none; display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); column-gap: 72px; align-items: end; text-align: left; }
  .head-split .kicker-chip { grid-column: 1; justify-self: start; }
  .head-split .section-title { grid-column: 1; }
  .head-split .section-lead { grid-column: 2; grid-row: 1 / span 2; align-self: end; margin: 0; padding-bottom: 6px; }
  .faq-section { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); column-gap: 72px; align-items: start; }
  .faq-section .section-head { position: sticky; top: 132px; text-align: left; margin: 0; max-width: none; }
  .faq-section .faq-list { width: 100%; max-width: none; margin: 0; } /* auto margins shrank it to its text in the grid cell */
}
@keyframes band-open { from { clip-path: inset(0 4% 0 4% round var(--radius-lg)); } to { clip-path: inset(0 0 0 0 round 0); } }
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .trail-section { animation: band-open linear both; animation-timeline: view(); animation-range: entry 0% entry 85%; }
  }
}
@media (max-width: 640px) {
  .op-face svg { display: none; }
  .mock-console .op-toast { top: 50px; font-size: 11px; padding: 8px 12px 8px 8px; }
}

/* reduced motion (ref: Apple HIG motion + accessibility: replace movement with fades, no bounce, no blur) */
@media (prefers-reduced-motion: reduce) {
  .kiosk-screen [data-enter] { animation: plus-fade .2s linear both; }
  @keyframes plus-fade { from { opacity: 0; } to { opacity: 1; } }
  .task svg, .task.nudge, .kiosk.beam::after, .sp-label span, .sp-list button { animation: none !important; }
  .task span, .task .fill, .task .tick, .sp-dot, .sp-control, .sp-control path, .sp-surface { transition: none !important; }
  .counter .wheel .stack { transition: none !important; }
  .marquee .marquee-track { animation-play-state: paused; }
  .case-card, .case-flap { transition: opacity .2s linear !important; }
  .case-stamp { transition: opacity .2s linear !important; transform: rotate(-10deg) !important; }
  .trail-section .trail-steps::after, .trail-section .trail-valid .bar::before, .pain-old, .pain-chip.after { transition: none !important; }
  .faq-item::details-content { transition: none !important; }
  .op-face, .mock-console .op-toast, .op-cursor { transition: opacity .2s linear !important; }
  .op-face, .op-log li { transform: none !important; }
  .mock-console .op-toast { transform: translate(-50%, 0) !important; }
  .mock-room.op-fixing::after { animation: none !important; }
  .kx-doc::after, .kx-scan li, .kx-scan li::before { animation: none !important; opacity: 1; transform: none; }
  .rw-move { transition: none !important; }
  .c-draft, .rate-ai::before, .rate-ai-reasons li, .trail-section[data-phase="3"] .trail-valid .fin { animation: none !important; }
  .trail-section .trail-step .num.pop { animation: none !important; }
  .trail-section .trail-tl .row { transform: none !important; }
}
