:root {
  font-family: 'Hiragino Sans', 'Yu Gothic', 'Noto Sans JP', sans-serif;
  color: #294c3e;
  font-synthesis: none;
  --paper: #fffdf1;
  --green: #285f48;
  --muted: #798477;
  --line: #41634626;
  --bottom: max(20px, env(safe-area-inset-bottom));
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { height: 100%; margin: 0; overflow: hidden; overscroll-behavior: none; }
body { height: 100dvh; background: #eeebe2; -webkit-user-select: none; user-select: none; -webkit-tap-highlight-color: transparent; }
button, a, #creamScene { -webkit-touch-callout: none; }
button { font: inherit; cursor: pointer; touch-action: manipulation; }
a { color: inherit; text-decoration: none; }
button:focus-visible, a:focus-visible, #creamScene:focus-visible { outline: 3px solid #dcab4e; outline-offset: 4px; }
#creamScene, .view-vignette { position: fixed; inset: 0; }
#creamScene canvas { display: block; width: 100%; height: 100%; touch-action: none; }
.view-vignette { pointer-events: none; background: linear-gradient(180deg,#eeebe24d,transparent 25%,transparent 65%,#eeebe238), radial-gradient(ellipse at 50% 45%,transparent 50%,#476b4d0d); }
.cream-header { position: fixed; top: max(20px,env(safe-area-inset-top)); left: 28px; right: 28px; z-index: 5; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.back-link, .sound-toggle { font-size: 11px; letter-spacing: .04em; border: 1px solid #45634124; border-radius: 30px; padding: 10px 15px; background: #fffdf1ce; backdrop-filter: blur(12px); color: #375a47; }
.back-link span { margin-right: 6px; }
.mini-logo { display: flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 800; letter-spacing: -.03em; }
.mini-logo b { width: 24px; height: 24px; display: grid; place-items: center; background: #47735b; color: #fff9e6; border-radius: 6px 6px 6px 0; font-size: 18px; }
.game-heading { position: fixed; top: 106px; left: max(32px, calc(50vw - 560px)); pointer-events: none; }
.eyebrow { font-size: 9px; letter-spacing: .15em; line-height: 1.5; color: #728069; }
h1 { margin: 10px 0; font-size: clamp(30px,4vw,48px); letter-spacing: -.06em; line-height: 1.25; font-weight: 900; }
h1 span { display: block; font-size: 11px; font-weight: 500; letter-spacing: .04em; margin-top: 11px; }
.cream-stats { position: fixed; left: max(32px,calc(50vw - 560px)); top: 255px; width: 170px; pointer-events: none; }
.height-value { line-height: 1; margin: 10px 0 6px; display: flex; align-items: baseline; gap: 7px; }
.height-value strong { font-size: 62px; font-weight: 500; font-family: 'Avenir Next', 'Helvetica Neue', sans-serif; letter-spacing: -.06em; font-variant-numeric: tabular-nums; }
.height-value span { font-size: 14px; }.height-block p { font-size: 10px; letter-spacing: .08em; margin: 8px 0 25px; color: #728069; }
.balance-block { width: 150px; }.balance-caption { display: flex; justify-content: space-between; gap: 12px; font-size: 9px; margin-bottom: 8px; }.balance-caption b { font-weight: 600; }.balance-meter { height: 4px; background: #2b4e331b; border-radius: 5px; overflow: hidden; }.balance-meter i { display: block; height: 100%; width: 0; background: #5a8a60; transition: width .25s, background .25s; }
.cream-comment { position: fixed; right: max(32px,calc(50vw - 560px)); top: 115px; max-width: 220px; display: flex; align-items: flex-start; gap: 9px; font-size: 11px; line-height: 1.8; pointer-events: none; }
.cream-comment span { flex: none; font-size: 8px; border: 1px solid #6175563b; padding: 0 6px; border-radius: 4px; margin-top: 1px; }.cream-comment b { font-weight: 500; background: #fffdf1b8; padding: 8px 12px; margin-top: -8px; border-radius: 0 12px 12px 12px; }
.intro-card, .result-card { position: fixed; bottom: var(--bottom); left: 50%; transform: translateX(-50%); width: min(480px,calc(100% - 36px)); background: #fffdf1ed; box-shadow: 0 8px 45px #35472d12; border: 1px solid #ffffffa8; border-radius: 22px; backdrop-filter: blur(18px); }
.intro-card { padding: 24px 28px 14px; width: min(430px,calc(100% - 36px)); text-align: center; }
.intro-copy h2 { font-size: 24px; line-height: 1.4; letter-spacing: -.04em; margin: 10px 0; }.intro-copy h2 br { display: block; }.intro-copy p { font-size: 11px; line-height: 1.9; margin: 12px 0 18px; color: #687864; }
.primary-button { display: flex; justify-content: center; align-items: center; gap: 24px; width: 100%; min-height: 50px; padding: 12px 20px; border: 0; border-radius: 12px; background: var(--green); color: #fff9e7; font-size: 14px; font-weight: 700; transition: background .2s, transform .15s; }.primary-button:hover { background: #1c4936; }.primary-button:active { transform: translateY(2px); }.primary-button span { font-size: 18px; font-weight: 400; }
.intro-footnote { font-size: 9px; color: #829078; margin: 12px 0 0; letter-spacing: .05em; }
.result-card { width: min(450px,calc(100% - 36px)); padding: 24px 26px 17px; }.result-header { display: flex; justify-content: space-between; align-items: center; gap: 12px; }.result-header h2 { font-size: 25px; margin: 8px 0 0; letter-spacing: -.045em; }.result-measure { display: flex; align-items: baseline; gap: 4px; white-space: nowrap; }.result-measure strong { font-size: 49px; font-weight: 500; letter-spacing: -.06em; font-family: 'Avenir Next','Helvetica Neue',sans-serif; }.result-measure span { font-size: 12px; }.result-card > p { font-size: 11px; color: #65745b; line-height: 1.9; margin: 14px 0 8px; }.result-card .record-text { font-size: 10px; color: #8a8d65; margin: 0 0 18px; }.result-actions { display: flex; gap: 8px; align-items: stretch; }.result-actions .primary-button { font-size: 12px; gap: 12px; }.photo-button { flex: none; border: 1px solid #45634128; border-radius: 12px; color: #4f684a; background: #f1f3e7; font-size: 11px; padding: 10px 16px; }.photo-button:disabled { opacity: .4; }.result-back { display: block; text-align: center; font-size: 9px; color: #8a967b; margin-top: 16px; }
.error-card { position: fixed; inset: 20%; background: var(--paper); padding: 30px; border-radius: 20px; z-index: 10; }.error-card h2 { font-size: 22px; }.error-card p { font-size: 12px; line-height: 1.9; overflow-wrap: anywhere; }
@media(min-width:1100px) { .intro-card { left: max(32px,calc(50vw - 560px)); transform: none; bottom: 65px; text-align: left; width: 300px; padding: 26px; }.intro-copy h2 { font-size: 28px; margin: 14px 0; }.intro-copy h2 br { display: block; }.intro-copy p br { display: none; }.intro-footnote { text-align: center; }.result-card { left: auto; transform: none; right: max(32px,calc(50vw - 560px)); bottom: 50px; } }
@media(max-width:650px) {
  .cream-header { top: max(14px,env(safe-area-inset-top)); left: 18px; right: 18px; gap: 8px; }.back-link, .sound-toggle { padding: 8px 11px; font-size: 10px; }.mini-logo { font-size: 10px; gap: 5px; }.mini-logo b { width: 19px; height: 19px; font-size: 15px; }
  .game-heading { top: 77px; left: 23px; }.game-heading > .eyebrow { font-size: 7px; letter-spacing: .1em; }h1 { font-size: 32px; margin-top: 8px; }h1 span { font-size: 9px; margin-top: 6px; }
  .cream-stats { top: 184px; left: 23px; width: 128px; }.height-value { margin-top: 5px; }.height-value strong { font-size: 45px; }.height-value span { font-size: 11px; }.height-block .eyebrow { font-size: 8px; }.height-block p { font-size: 8px; margin-bottom: 16px; }.balance-block { width: 115px; }.balance-caption { font-size: 8px; gap: 6px; }
  .cream-comment { top: 185px; right: 20px; max-width: 155px; font-size: 10px; gap: 5px; }.cream-comment span { font-size: 7px; padding: 0 4px; }.cream-comment b { padding: 8px 9px; }
  .intro-card { padding: 20px 22px 12px; bottom: var(--bottom); }.intro-copy h2 { font-size: 22px; margin: 7px 0; }.intro-copy p { font-size: 10px; margin: 10px 0 14px; }.intro-copy .eyebrow { font-size: 8px; }.intro-footnote { font-size: 8px; }
  .result-card { padding: 21px 22px 15px; }.result-header h2 { font-size: 22px; }.result-measure strong { font-size: 42px; }.result-card > p { font-size: 10px; }.result-card .record-text { font-size: 9px; }
}
@media(max-height:720px) and (max-width:650px) {
  .game-heading { top: 67px; }h1 { font-size: 27px; }h1 span { display: none; }.cream-stats { top: 139px; }.height-value strong { font-size: 36px; }.height-block p { margin-bottom: 10px; }.cream-comment { top: 141px; }.intro-card { padding-top: 15px; }.intro-copy h2 { font-size: 19px; }.intro-copy p { margin: 8px 0 12px; }.intro-footnote { display: none; }
}
@media(prefers-reduced-motion:reduce) { * { transition: none !important; } }

/* 画面下のパッドで操作。3D画面は巻き上がりを見るために使う。 */
#creamScene { touch-action: none; outline-offset: -5px; }
.is-playing .game-heading { display: none; }
.is-playing .cream-stats { top: 94px; }
.is-playing .height-value strong { font-size: 40px; }
.is-playing .height-block p { margin-top: 5px; font-size: 9px; }
.is-playing .balance-block { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.is-playing .cream-comment { top: 104px; }
.is-playing .cream-comment { display: none; }
.order-ticket { position: fixed; right: max(32px,calc(50vw - 560px)); top: 96px; z-index: 2; width: 220px; padding: 15px 17px; border: 1px solid #45634124; border-radius: 4px 4px 16px 16px; background: #fffdf1ed; box-shadow: 0 5px 18px #35472d0d; pointer-events: none; }
.order-customer { display: block; color: #829078; font-size: 8px; letter-spacing: .04em; }
.order-ticket p { font-size: 12px; line-height: 1.6; margin: 7px 0; }
.order-ticket > strong { font-size: 25px; font-weight: 600; letter-spacing: -.03em; }
.order-progress { height: 4px; margin: 10px 0 8px; border-radius: 4px; overflow: hidden; background: #dce3d1; }
.order-progress i { display: block; height: 100%; width: 0; background: #779a71; transition: width .2s; }
.order-status { display: block; color: #7c886d; font-size: 10px; }
.order-ticket[data-state="ready"] { border-color: #94b785; background: #f4ffe9eb; }
.order-ticket[data-state="ready"] .order-status { color: #37643e; font-weight: 700; }
.order-ticket[data-state="over"] .order-status { color: #b17d42; }
.serve-button.is-ready { color: #fffdf1; background: #39744f; box-shadow: 0 0 0 4px #b3d79759; }
.order-result { margin: 12px 0; padding: 11px 13px; border-radius: 10px; background: #e9efdc; }
.order-result p { font-size: 10px; line-height: 1.6; margin: 0 0 6px; color: #718269; }
.order-result strong { display: block; font-size: 13px; color: #39744f; }
.order-result > span { display: block; font-size: 10px; margin-top: 5px; color: #718269; }
.order-result .order-feedback { margin: 7px 0 0; font-size: 10px; line-height: 1.7; }
.play-footer { position: fixed; z-index: 4; bottom: var(--bottom); left: 28px; right: 28px; display: flex; justify-content: space-between; align-items: flex-end; gap: 18px; pointer-events: none; }
.top-view { position: absolute; right: 0; bottom: 80px; width: 260px; padding: 10px 12px; border: 1px solid #41634620; border-radius: 16px; background: #fffdf1e0; backdrop-filter: blur(8px); text-align: center; }
.top-view-title { display: block; font-size: 10px; color: #62785b; letter-spacing: .06em; }
.top-view svg { display: block; width: 100%; margin: 10px auto; overflow: visible; }
.top-view-cone { fill: #ead3a748; stroke: #c3a76e; stroke-width: 1.5; }
.top-view-radius { fill: none; stroke: #729378; stroke-width: 1; stroke-dasharray: 3 3; }
.top-view-cream { fill: none; stroke: #b4b596; stroke-width: 8; stroke-linecap: round; stroke-linejoin: round; }
.top-view-nozzle { fill: #2b7057; stroke: #fffdf1; stroke-width: 2; }
.top-view-nozzle.is-flowing { fill: #cf833b; }
.top-view-caption { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 4px; font-size: 8px; color: #62785b; }
.top-view-caption i { width: 5px; height: 5px; border-radius: 50%; background: #2b7057; }
.top-view-caption > span { flex-basis: 100%; color: #86917c; }
.play-instructions { padding: 10px 14px; border-radius: 14px; background: #fffdf1b8; backdrop-filter: blur(8px); }
.flow-indicator { display: flex; align-items: center; gap: 6px; font-size: 10px; color: #62785b; }
.flow-indicator i { width: 5px; height: 5px; border-radius: 50%; background: #aab797; }
.flow-indicator i.is-flowing { background: #628b4c; }
.play-instructions p { font-size: 10px; line-height: 1.7; margin: 5px 0 0; color: #718269; }
.keyboard-hint { display: block; margin-top: 7px; font-size: 8px; color: #8e987f; }
.serve-button { pointer-events: auto; flex: none; display: flex; align-items: center; gap: 24px; padding: 13px 20px; min-height: 48px; border: 1px solid #41634626; border-radius: 14px; color: #355c43; background: #fffdf1eb; box-shadow: 0 3px 12px #35472d12; font-size: 13px; font-weight: 700; }
.serve-button span { font-size: 17px; font-weight: 400; }
.serve-button:disabled { opacity: .4; cursor: default; }
.is-playing .play-instructions { transition: opacity .3s; }
.is-playing.is-winding .play-instructions > p, .is-playing.is-winding .keyboard-hint { opacity: .5; }
#creamPad { pointer-events: auto; touch-action: none; cursor: crosshair; border-radius: 50%; aspect-ratio: 1; }
#creamPad:focus-visible { outline: 2px solid #dcab4e; outline-offset: 4px; }
@media(max-width:650px) {
  .order-ticket { top: 78px; right: 18px; width: 168px; padding: 10px 12px; }
  .order-customer { font-size: 7px; }
  .order-ticket p { font-size: 10px; margin: 5px 0; }
  .order-ticket > strong { font-size: 21px; }
  .order-status { font-size: 9px; }
  .is-playing .cream-stats { top: 78px; }
  .is-playing .height-value strong { font-size: 34px; }
  .is-playing .cream-comment { top: 94px; max-width: 160px; }
  .play-footer { left: 18px; right: 18px; gap: 10px; }
  .top-view { left: 50%; right: auto; transform: translateX(-50%); width: min(300px,calc(100vw - 36px)); bottom: 78px; padding: 10px 12px; border-radius: 18px; }
  .top-view svg { width: min(100%,32svh); }
  .top-view-title { font-size: 12px; }
  .top-view-caption { font-size: 10px; }
  .is-playing #creamScene { transform: translateY(-12svh); }
  .play-instructions { padding: 8px 10px; max-width: 220px; }
  .flow-indicator { font-size: 9px; }
  .play-instructions p { font-size: 9px; margin-top: 4px; }
  .keyboard-hint { display: none; }
  .serve-button { min-height: 46px; padding: 11px 16px; gap: 16px; font-size: 12px; }
}
