:root {
  color-scheme: light;
  --ink: #4a3542;
  --muted: #9e838e;
  --rose: #e77b8c;
  --berry: #9a536b;
  --cream: #fff8f3;
  --line: #f1dedc;
  font-family: "DM Sans", "Noto Sans SC", sans-serif;
  color: var(--ink);
  background: #fff5f2;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  min-width: 320px;
  min-height: 100svh;
  background:
    radial-gradient(ellipse at 50% 8%, #fffefd 0%, #fffaf6 32%, transparent 67%),
    radial-gradient(circle at 8% 42%, #fce8e7 0 1px, transparent 2px),
    #fff5f2;
}
button { font: inherit; }
.page-shell { width: min(100%, 1080px); margin: 0 auto; padding: 0 40px; overflow: hidden; }
.topbar { height: 76px; display: flex; align-items: center; justify-content: space-between; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.brand-mark { width: 35px; height: 35px; display: grid; place-items: center; border-radius: 50%; color: white; background: linear-gradient(145deg, #efa5ab, #bb7187); box-shadow: 0 4px 11px #bc718733; font-size: 21px; }
.brand-mark span { transform: translateY(-1px); }
.brand-name { font-size: 11px; font-weight: 800; letter-spacing: 2px; }
.brand-name i { color: #cf8897; font-style: normal; font-weight: 500; }
.history-button { border: 1px solid #f1dedc; border-radius: 30px; background: #fffaf7; color: #896c79; padding: 9px 14px; display: flex; align-items: center; gap: 7px; cursor: pointer; font-size: 10px; transition: .2s; }
.history-button:hover { border-color: #e7b9be; transform: translateY(-1px); }
.history-heart { color: #dc8192; font-size: 16px; line-height: 1; }
.intro { text-align: center; padding-top: 23px; position: relative; }
.eyebrow { display: flex; justify-content: center; align-items: center; gap: 11px; color: #bb9399; font-size: 9px; letter-spacing: 2.6px; font-weight: 700; }
.eyebrow span { width: 20px; height: 1px; background: #e9c5c3; }
h1 { font-size: clamp(31px, 5.2vw, 47px); line-height: 1.2; letter-spacing: .045em; margin: 16px 0 8px; font-weight: 800; color: #503847; }
h1 em { position: relative; color: var(--rose); font-style: normal; display: inline-block; }
h1 em::after { content: ""; position: absolute; width: 100%; height: 7px; bottom: -3px; left: 0; border-top: 2px solid #edbdad; border-radius: 50%; transform: rotate(-8deg); }
.intro > p { color: #a58c95; font-size: 12px; letter-spacing: .04em; margin: 0; }
.promise { display: inline-flex; align-items: center; gap: 9px; margin-top: 15px; padding: 7px 14px; border: 1px solid #f2dfd9; border-radius: 30px; color: #a57983; background: #fff7ef; font-size: 9px; letter-spacing: .04em; }
.promise span { color: #df8b96; font-size: 13px; }
.couple-art { display: block; width: 124px; height: 94px; object-fit: contain; margin: -1px auto -10px; position: relative; z-index: 2; filter: drop-shadow(0 5px 5px #b7647718); }
.game { width: min(100%, 495px); margin: 0 auto; text-align: center; position: relative; z-index: 1; }
.mode-picker { display: inline-flex; gap: 4px; padding: 4px; border: 1px solid #efdfdc; border-radius: 30px; background: #fffaf7; box-shadow: 0 4px 16px #8a54620a; }
.mode-tab { border: 0; border-radius: 24px; background: transparent; color: #a48b93; padding: 8px 15px; font-size: 10px; cursor: pointer; transition: .2s; }
.mode-tab span { margin-right: 3px; font-size: 13px; }
.mode-tab.active { background: #df8390; color: #fff; box-shadow: 0 3px 9px #d7788c3b; }
.mode-tab:disabled { opacity: .7; cursor: wait; }
.mode-caption { margin: 9px 0 0; font-size: 10px; color: #aa9098; min-height: 16px; }
.wheel-stage { position: relative; width: min(100%, 394px); aspect-ratio: 1; margin: 1px auto 0; display: grid; place-items: center; }
.wheel-glow { position: absolute; width: 92%; height: 92%; border-radius: 50%; background: radial-gradient(circle, #f4d9d98c 0, #f9e6df73 54%, transparent 72%); filter: blur(12px); }
.wheel-frame { position: relative; z-index: 1; width: 87%; height: 87%; padding: 10px; border-radius: 50%; background: linear-gradient(145deg, #fffdfa, #de9ba2 29%, #fff4ea 48%, #c4798d 75%, #fffaf4); box-shadow: 0 12px 28px #8a53602d, 0 3px 0 #bd7187, inset 0 1px 1px #fff; }
.wheel-frame::before { content: ""; position: absolute; inset: 5px; border: 1px solid #fff8f4; border-radius: 50%; pointer-events: none; z-index: 2; }
canvas { width: 100%; height: 100%; display: block; border-radius: 50%; filter: drop-shadow(0 3px 4px #80515a27); }
.pointer { position: absolute; top: 3.4%; left: 50%; transform: translateX(-50%); z-index: 4; width: 34px; height: 46px; display: grid; place-items: start center; color: #fff8f4; filter: drop-shadow(0 3px 4px #9b536255); }
.pointer::before { content: ""; position: absolute; top: 0; width: 30px; height: 30px; border-radius: 50%; background: linear-gradient(145deg, #f4bbc0, #d97487); border: 3px solid #fff8f4; box-shadow: 0 2px 7px #985b6352; }
.pointer span { position: relative; margin-top: 3px; font-size: 14px; }
.tiny-heart { position: absolute; z-index: 2; color: #d88391; }
.heart-one { top: 15%; right: 6%; font-size: 20px; transform: rotate(12deg); }
.heart-two { bottom: 20%; left: 5%; color: #d8a6aa; font-size: 17px; }
.hub { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 5; width: 22%; aspect-ratio: 1; border: 3px solid #fff8f4; border-radius: 50%; background: radial-gradient(circle at 40% 28%, #fff7f1, #f2bdba 76%); box-shadow: 0 4px 11px #80515a45, inset 0 1px 4px #fff; color: #a1526c; display: flex; align-items: center; justify-content: center; flex-direction: column; cursor: pointer; transition: filter .2s, transform .2s; }
.hub:hover { filter: brightness(1.04); transform: translate(-50%, -50%) scale(1.04); }
.hub:disabled { cursor: wait; filter: saturate(.65); }
.hub-heart { font-size: 11px; line-height: 1; }
.hub-label { font-size: 15px; font-weight: 900; letter-spacing: 1px; line-height: 1.3; }
.hub-small { font-size: 8px; font-weight: 700; letter-spacing: .1em; }
.play-meta { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: -4px; color: #8e707d; font-size: 10px; }
.meta-heart { color: #dc8291; font-size: 12px; }
.meta-dot { color: #d0a5a7; }
.meta-no-limit { color: #b09aa0; font-size: 9px; }
.gentle-note { margin: 10px 0 0; color: #b09aa0; font-size: 9px; }
.gentle-note span { color: #dc8795; margin-right: 4px; }
.note-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; max-width: 760px; margin: 26px auto 0; }
.note-card { position: relative; overflow: hidden; min-height: 111px; border: 1px solid #f0ded9; border-radius: 14px; background: #fffdfa; padding: 17px 19px; box-shadow: 0 5px 16px #67433308; }
.note-feature { background: linear-gradient(125deg, #fffdfa, #fff2ed); }
.card-kicker { color: #bd9294; font-size: 8px; letter-spacing: 1.7px; font-weight: 800; }
.note-card h2 { margin: 5px 0; color: #57404e; font-size: 13px; }
.note-card p { margin: 0; max-width: 250px; color: #a58e96; font-size: 9px; line-height: 1.7; }
.note-doodle { position: absolute; top: 13px; right: 17px; color: #dfa3a7; font-size: 16px; transform: rotate(12deg); }
.rule-title { display: flex; align-items: center; gap: 8px; }
.rule-heart { width: 24px; height: 24px; display: grid; place-items: center; border-radius: 50%; background: #f9eeea; color: #cf8590; font-size: 13px; }
.note-rule h2 { margin: 0; font-size: 12px; }
.note-rule ul { margin: 7px 0 0 32px; padding: 0; color: #a58e96; font-size: 9px; line-height: 1.75; }
footer { padding: 21px 0 18px; text-align: center; color: #c5a9a8; font-size: 8px; letter-spacing: 2px; }
footer span { color: #dc8792; margin-left: 4px; }
.scrim { position: fixed; inset: 0; z-index: 10; background: #38233055; backdrop-filter: blur(3px); animation: fade-in .2s; }
.scrim[hidden], .result-modal[hidden], .drawer[hidden] { display: none; }
.result-modal { position: fixed; z-index: 12; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(90vw, 390px); padding: 28px 26px 24px; border: 1px solid #f2dfdb; border-radius: 23px; background: linear-gradient(180deg, #fff9f4, #fff); box-shadow: 0 22px 90px #3c243d40; text-align: center; animation: pop .32s cubic-bezier(.2, 1.3, .4, 1); }
.modal-close { position: absolute; top: 10px; right: 14px; border: 0; background: transparent; color: #af989d; font-size: 25px; cursor: pointer; }
.result-heart { color: #df8794; font-size: 27px; line-height: 1; }
.result-kicker { margin: 7px 0 10px; color: #bb9496; font-size: 8px; font-weight: 800; letter-spacing: 2px; }
.result-modal h2 { margin: 0; color: #513947; font-size: 17px; }
.result-icon { margin: 14px 0 4px; color: #dd8592; font-size: 31px; }
.result-prompt { margin: 0 auto; max-width: 310px; color: #614b57; font-size: 14px; font-weight: 700; line-height: 1.7; }
.result-caption { margin: 8px 0 20px; color: #a79098; font-size: 10px; line-height: 1.6; }
.modal-actions { display: flex; gap: 9px; }
.primary-button, .skip-button { min-height: 42px; border-radius: 30px; font-size: 11px; font-weight: 700; cursor: pointer; }
.primary-button { flex: 1; border: 0; padding: 10px 15px; color: white; background: linear-gradient(100deg, #e88695, #c9758b); box-shadow: 0 5px 12px #cc71833b; }
.skip-button { border: 1px solid #eedbd8; padding: 9px 17px; color: #9b7d89; background: #fffaf7; }
.drawer { position: fixed; z-index: 13; top: 0; right: 0; bottom: 0; display: flex; flex-direction: column; width: min(88vw, 370px); padding: 30px 23px calc(23px + env(safe-area-inset-bottom)); background: #fffdfa; box-shadow: -14px 0 44px #38253b22; animation: slide-in .25s; }
.drawer-head { display: flex; justify-content: space-between; align-items: center; padding-bottom: 17px; border-bottom: 1px solid #f0e7e3; }
.drawer-head h2 { margin: 4px 0 0; font-size: 20px; }
.close-button { width: 38px; height: 38px; border: 1px solid #f0e1df; border-radius: 50%; background: #fffaf7; color: #907d83; font-size: 22px; cursor: pointer; }
.history-list { flex: 1; overflow: auto; padding: 8px 0; }
.history-entry { display: flex; align-items: center; gap: 11px; padding: 12px 2px; border-bottom: 1px solid #f3ece8; }
.history-icon { width: 37px; height: 37px; display: grid; place-items: center; border-radius: 13px; background: #f9ece9; font-size: 18px; }
.history-entry strong { color: #624958; font-size: 11px; }
.history-entry small { display: block; margin-top: 4px; color: #ad989f; font-size: 9px; }
.history-empty { margin: auto; color: #a99099; font-size: 11px; line-height: 1.8; text-align: center; }
.history-empty span { color: #dc8792; font-size: 28px; }
.drawer-foot { margin: 14px 0 0; color: #b19da1; font-size: 10px; text-align: center; }
.drawer-foot span { color: #db8792; }
.toast { position: fixed; z-index: 20; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom)); transform: translate(-50%, 20px); padding: 10px 16px; border-radius: 30px; background: #543d4b; color: white; font-size: 11px; opacity: 0; pointer-events: none; transition: .25s; white-space: nowrap; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
@keyframes pop { from { opacity: 0; transform: translate(-50%, -46%) scale(.87); } to { opacity: 1; transform: translate(-50%, -50%) scale(1); } }
@keyframes slide-in { from { transform: translateX(30px); opacity: .6; } to { transform: translateX(0); opacity: 1; } }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@media (min-width: 760px) { .intro { padding-top: 27px; } .couple-art { width: 133px; height: 98px; } .wheel-stage { width: min(100%, 380px); } .note-grid { margin-top: 28px; } }
@media (max-width: 600px) {
  .page-shell { padding: 0 19px; }
  .topbar { height: 62px; }
  .intro { padding-top: 18px; }
  .eyebrow { font-size: 8px; letter-spacing: 2px; }
  .intro > p { font-size: 11px; }
  .promise { margin-top: 12px; font-size: 8px; }
  .couple-art { width: 112px; height: 83px; margin-bottom: -8px; }
  .game { margin-top: 0; }
  .wheel-stage { width: min(100%, 390px); }
  .wheel-frame { width: 88%; height: 88%; padding: 8px; }
  .pointer { top: 2.8%; transform: translateX(-50%) scale(.9); }
  .play-meta { gap: 6px; font-size: 9px; }
  .meta-no-limit { font-size: 8px; }
  .note-grid { grid-template-columns: 1fr; gap: 9px; margin-top: 21px; }
  .note-card { min-height: 91px; padding: 14px 16px; }
  .note-rule { min-height: 102px; }
  footer { padding: 18px 0 15px; }
}
@media (max-width: 370px) {
  .page-shell { padding: 0 13px; }
  h1 { font-size: 29px; }
  .wheel-stage { width: calc(100% + 8px); margin-left: -4px; }
  .mode-tab { padding: 8px 12px; }
  .play-meta { font-size: 8px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; } }
