:root {
  color-scheme: light;
  --ink: #172a4d;
  --muted: #63718a;
  --paper: #ffffff;
  --cream: #eef5ff;
  --orange: #2563eb;
  --orange-deep: #1746a2;
  --yellow: #d8ebff;
  --mint: #7dd3fc;
  --pink: #a5b4fc;
  --line: #d7e4f5;
  --shadow: 0 16px 38px rgba(27, 72, 137, .14);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at 10% 8%, rgba(125, 211, 252, .38), transparent 25rem),
    radial-gradient(circle at 90% 16%, rgba(165, 180, 252, .34), transparent 22rem),
    #f3f8ff;
  font-family: "Hiragino Sans", "Yu Gothic", "Noto Sans JP", sans-serif;
  font-size: 16px;
  line-height: 1.6;
}
button { font: inherit; }
button:focus-visible { outline: 4px solid rgba(37, 99, 235, .28); outline-offset: 3px; }
.is-hidden { display: none !important; }

.app-shell { width: min(100%, 620px); margin: 0 auto; padding: max(18px, env(safe-area-inset-top)) 18px 38px; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.eyebrow { margin: 0 0 2px; color: var(--orange-deep); font-size: .78rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
h1 { margin: 0; font-size: clamp(1.45rem, 6vw, 2rem); line-height: 1.2; letter-spacing: .02em; }
.fortune-card { position: relative; overflow: hidden; padding: 20px 22px 24px; text-align: center; background: var(--paper); border: 2px solid white; border-radius: 30px; box-shadow: var(--shadow); }
.fortune-card::before, .fortune-card::after { content: ""; position: absolute; width: 80px; height: 80px; border-radius: 50%; opacity: .32; }
.fortune-card::before { top: -35px; right: -22px; background: var(--pink); }
.fortune-card::after { bottom: -42px; left: -24px; background: var(--mint); }
.date-pill { position: relative; z-index: 1; display: inline-block; padding: 4px 14px; border-radius: 999px; color: #1746a2; background: #d8ebff; font-size: .86rem; font-weight: 800; }
.mascot-stage { position: relative; display: grid; place-items: center; width: 230px; height: 210px; margin: 4px auto 0; }
.stage-orbit { position: absolute; border: 2px dashed rgba(37, 99, 235, .32); border-radius: 50%; animation: spin 16s linear infinite; }
.orbit-one { width: 186px; height: 186px; }
.orbit-two { width: 145px; height: 145px; border-color: rgba(37, 99, 235, .24); animation-direction: reverse; animation-duration: 11s; }
.mystery-mark { position: relative; z-index: 1; display: grid; place-items: center; width: 112px; height: 112px; color: white; background: linear-gradient(145deg, var(--orange), #4fa8ff); border: 8px solid #e4f2ff; border-radius: 38% 62% 54% 46%; box-shadow: 0 13px 25px rgba(37, 99, 235, .24); font-size: 4.4rem; font-weight: 900; line-height: 1; transform: rotate(-5deg); }
.today-mascot { position: relative; z-index: 2; width: 190px; height: 170px; object-fit: contain; filter: drop-shadow(0 12px 14px rgba(58, 41, 22, .17)); }
.fortune-card h2 { margin: 0; font-size: 1.45rem; line-height: 1.35; }
.lead { margin: 8px 0 18px; color: var(--muted); }
.primary-button, .secondary-button { display: inline-flex; align-items: center; justify-content: center; gap: 12px; min-height: 54px; border-radius: 17px; padding: 12px 22px; font-weight: 900; cursor: pointer; }
.primary-button { width: 100%; border: 0; color: white; background: linear-gradient(135deg, var(--orange), var(--orange-deep)); box-shadow: 0 10px 20px rgba(37, 99, 235, .26); }
.primary-button:hover { transform: translateY(-1px); }
.secondary-button { border: 2px solid var(--orange); color: var(--orange-deep); background: white; }
.once-note { margin: 10px 0 0; color: var(--muted); font-size: .8rem; }
.official-links { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: 20px 0 0; padding: 13px 10px; border: 1px solid var(--line); border-radius: 18px; background: #f7faff; }
.official-links p { grid-column: 1 / -1; margin: 0 0 2px; color: var(--orange-deep); font-size: .72rem; font-weight: 900; letter-spacing: .13em; }
.official-links a { display: flex; align-items: center; justify-content: center; min-width: 0; min-height: 42px; padding: 5px 3px; border: 1px solid #bfdbfe; border-radius: 12px; color: var(--orange-deep); background: white; font-size: .66rem; font-weight: 800; line-height: 1.25; text-decoration: none; }
.official-links a:focus-visible { outline: 3px solid #38bdf8; outline-offset: 2px; }
.today-summary { position: relative; z-index: 1; }
.summary-label { margin: 0 0 3px; color: var(--orange-deep); font-size: .74rem; font-weight: 900; letter-spacing: .14em; }
.fortune-name { display: inline-block; margin: 9px 0; padding: 5px 15px; border-radius: 999px; color: #1746a2; background: var(--yellow); font-weight: 900; }
.summary-comment { margin: 4px auto 16px; max-width: 28rem; font-weight: 700; }

.tabbar { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin: 20px 0 10px; padding: 5px; background: rgba(255,255,255,.75); border: 1px solid var(--line); border-radius: 18px; }
.tab { border: 0; border-radius: 13px; padding: 10px; color: var(--muted); background: transparent; font-weight: 800; cursor: pointer; }
.tab.is-active { color: white; background: var(--ink); }
.panel { padding: 19px 17px 20px; background: rgba(255,255,255,.88); border: 1px solid white; border-radius: 24px; box-shadow: 0 10px 28px rgba(83, 56, 31, .08); }
.panel-heading { display: grid; grid-template-columns: 42px 1fr 42px; align-items: center; gap: 8px; margin-bottom: 12px; }
.panel-heading h2 { margin: 0; text-align: center; font-size: 1.15rem; }
.month-button { width: 40px; height: 40px; border: 1px solid var(--line); border-radius: 13px; color: var(--ink); background: white; font-size: 1.7rem; line-height: 1; cursor: pointer; }
.weekdays, .calendar-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; }
.weekdays { margin-bottom: 5px; color: var(--muted); font-size: .75rem; font-weight: 700; text-align: center; }
.weekdays span:first-child { color: #e75d59; }
.weekdays span:last-child { color: #4b7cc5; }
.calendar-day { position: relative; aspect-ratio: 1; min-width: 0; border: 1px solid var(--line); border-radius: 13px; padding: 3px; color: var(--ink); background: #f9fbff; cursor: default; }
.calendar-day.has-result { cursor: pointer; background: white; box-shadow: 0 4px 10px rgba(73, 48, 25, .08); }
.calendar-day.is-today { border: 2px solid var(--orange); }
.calendar-day.is-empty { visibility: hidden; }
.day-number { position: absolute; top: 2px; left: 5px; z-index: 2; font-size: .68rem; font-weight: 800; }
.calendar-day img { width: 100%; height: 100%; object-fit: contain; padding: 7px 1px 0; }
.question-day { display: grid; place-items: center; width: 100%; height: 100%; padding-top: 5px; color: #c8bdad; font-weight: 900; }
.calendar-help { margin: 12px 0 0; color: var(--muted); font-size: .75rem; text-align: center; }

.collection-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; }
.collection-heading h2 { margin: 0; font-size: 1.3rem; }
.collection-score strong { font-size: 2rem; color: var(--orange-deep); }
.collection-score span { color: var(--muted); font-weight: 700; }
.progress-track { height: 10px; margin: 13px 0 18px; overflow: hidden; background: #eee7dc; border-radius: 99px; }
.progress-fill { width: 0; height: 100%; background: linear-gradient(90deg, var(--yellow), var(--orange)); border-radius: inherit; transition: width .5s ease; }
.collection-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; }
.collection-item { position: relative; min-width: 0; min-height: 130px; padding: 7px 5px 9px; text-align: center; background: #f7faff; border: 1px solid var(--line); border-radius: 15px; }
.collection-item:not(.is-locked) { color: var(--ink); font: inherit; cursor: pointer; }
.collection-item img { width: 100%; height: 78px; object-fit: contain; }
.collection-item.is-locked { overflow: hidden; }
.collection-item.is-locked img { filter: grayscale(1) blur(16px); opacity: .12; }
.collection-item.is-locked::after { content: "?"; position: absolute; inset: 25px 0 auto; color: #b9ad9f; font-size: 2rem; font-weight: 900; }
.collection-item p { overflow: hidden; margin: 4px 0 0; font-size: .68rem; font-weight: 800; line-height: 1.3; }
.collection-item.is-locked p { color: #a99e91; }
.complete-banner { margin-top: 16px; padding: 15px; color: white; background: linear-gradient(135deg, var(--orange), #4fa8ff); border-radius: 17px; text-align: center; font-size: 1.5rem; font-weight: 900; }
.complete-banner small { font-size: .78rem; }
footer { padding: 28px 0 0; color: var(--muted); text-align: center; font-size: .8rem; }

.result-dialog { width: min(calc(100% - 24px), 500px); max-height: calc(100vh - 24px); margin: auto; padding: 0; overflow: auto; border: 0; border-radius: 28px; background: transparent; }
.result-dialog::backdrop { background: rgba(35, 28, 49, .68); backdrop-filter: blur(5px); }
.dialog-card { position: relative; padding: 22px 20px 24px; text-align: center; background: var(--paper); border-radius: 28px; }
.dialog-close { position: absolute; top: 12px; right: 12px; z-index: 2; width: 40px; height: 40px; border: 0; border-radius: 50%; color: var(--ink); background: #eaf2ff; font-size: 1.45rem; cursor: pointer; }
.dialog-date { margin: 0 0 4px; color: var(--muted); font-size: .86rem; font-weight: 700; }
.new-badge { display: inline-block; padding: 3px 12px; border-radius: 99px; color: #1746a2; background: var(--yellow); font-size: .75rem; font-weight: 900; }
.result-image-wrap { display: grid; place-items: center; height: 220px; margin: -2px 0 2px; }
.result-image-wrap img { width: 220px; height: 200px; object-fit: contain; filter: drop-shadow(0 13px 15px rgba(57, 40, 24, .16)); }
.dialog-card h2 { margin: 0; font-size: 1.45rem; line-height: 1.35; }
.fortune-block { margin: 13px 0; padding: 12px 14px; background: var(--cream); border-radius: 15px; }
.fortune-block strong { color: var(--orange-deep); font-size: 1.15rem; }
.fortune-block p { margin: 3px 0 0; font-size: .9rem; }
.spoken-comment { margin: 14px auto 18px; font-size: 1.08rem; font-weight: 800; }
.message-area { margin: 6px 0 18px; }
.message-area > p { margin: 0 0 7px; color: var(--muted); font-size: .78rem; font-weight: 800; }
.message-picker { display: grid; grid-template-columns: repeat(5, 1fr); gap: 7px; }
.message-button { min-width: 0; min-height: 40px; padding: 5px 2px; border: 1px solid #93c5fd; border-radius: 13px; color: var(--orange-deep); background: #fff; font-size: .82rem; font-weight: 900; cursor: pointer; }
.message-button.is-active { color: #fff; border-color: var(--orange); background: var(--orange); }
.message-button:disabled { color: #aeb9ca; border-color: #dbe5f2; background: #f3f6fa; cursor: default; }
.message-button:focus-visible { outline: 3px solid #38bdf8; outline-offset: 2px; }
.dialog-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.today-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 16px; }
.today-actions .primary-button, .today-actions .secondary-button { width: 100%; }
.panel-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 16px; }
.panel-actions .primary-button, .panel-actions .secondary-button { width: 100%; }
.compact { min-height: 49px; padding: 9px 10px; font-size: .9rem; }
.share-status { min-height: 1.4em; margin: 8px 0 0; color: var(--muted); font-size: .78rem; }
.confetti-layer { position: fixed; inset: 0; z-index: 100; pointer-events: none; overflow: hidden; }
.confetti { position: absolute; top: -20px; width: 10px; height: 16px; border-radius: 3px; animation: fall 1.8s ease-in forwards; }
.is-drawing .mystery-mark { animation: bounce .55s ease-in-out infinite alternate; }
.is-drawing .stage-orbit { animation-duration: .7s; }

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes bounce { to { transform: translateY(-12px) rotate(8deg) scale(1.04); } }
@keyframes fall { to { transform: translate3d(var(--drift), 110vh, 0) rotate(720deg); opacity: .5; } }
@media (min-width: 700px) {
  .app-shell { padding-top: 30px; }
  .collection-grid { grid-template-columns: repeat(4, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

.sound-controls { display: flex; justify-content: flex-end; flex-wrap: nowrap; gap: 5px; margin: 0 0 14px; }
.sound-controls button { flex: 0 1 auto; min-height: 36px; padding: 5px 8px; border: 1px solid #bfdbfe; border-radius: 20px; background: #fff; color: #1746a2; font: inherit; font-size: 11px; white-space: nowrap; cursor: pointer; }
.sound-controls button[aria-pressed="true"] { background: #d8ebff; border-color: #2563eb; }
.sound-controls button:focus-visible { outline: 3px solid #38bdf8; outline-offset: 2px; }
#summaryName, #dialogName, .summary-comment, .spoken-comment, #dialogFortuneText { white-space: pre-line; word-break: keep-all; overflow-wrap: normal; line-height: 1.65; }
#summaryName, #dialogName { font-size: clamp(1.1rem, 5vw, 1.45rem); line-height: 1.45; }
.summary-comment, .spoken-comment, #dialogFortuneText { font-size: clamp(.875rem, 3.8vw, 1.08rem); }
.summary-comment, .spoken-comment { word-break: normal; overflow-wrap: anywhere; text-wrap: pretty; }
.copy-line { display: block; }
.lead, .calendar-help, .share-status, footer { word-break: keep-all; overflow-wrap: anywhere; text-wrap: pretty; }
.collection-item p { word-break: keep-all; overflow-wrap: anywhere; }

.share-status { white-space: pre-line; }

.milestone-dialog { width: min(calc(100% - 24px), 520px); max-height: calc(100dvh - 24px); margin: auto; padding: 0; overflow: auto; border: 0; border-radius: 28px; background: transparent; }
.milestone-dialog::backdrop { background: rgba(20, 41, 82, .58); backdrop-filter: blur(6px); }
.milestone-card { position: relative; isolation: isolate; overflow: hidden; padding: 18px 20px 24px; text-align: center; border-radius: 28px; color: var(--ink); background: radial-gradient(circle at 50% 39%, #fff 24%, #e7f6ff 75%, #fff 100%); box-shadow: 0 18px 60px rgba(15, 55, 116, .22); }
.milestone-card.is-grand { background: radial-gradient(circle at 50% 42%, #fffefa 24%, #fff0c5 68%, #e5f4ff 100%); }
.milestone-close { position: absolute; top: 12px; right: 12px; z-index: 3; width: 42px; height: 42px; border: 1px solid var(--line); border-radius: 50%; color: var(--ink); background: white; font-size: 1.5rem; line-height: 1; cursor: pointer; }
.milestone-sparkles { position: absolute; inset: 20px 0 auto; color: #f2c85e; font-size: 1.5rem; letter-spacing: .5em; opacity: .85; pointer-events: none; }
.milestone-hero { position: relative; height: clamp(300px, 79vw, 360px); margin: 2px auto -5px; max-width: 450px; }
.milestone-hero::before { content: '✦　★　✧　★　✦'; position: absolute; top: 16%; left: 0; right: 0; color: #50b7f5; font-size: 1.6rem; pointer-events: none; }
.is-grand .milestone-hero::before { color: #eab843; }
.milestone-rays { position: absolute; inset: 5% 7% 0; border-radius: 50%; background: repeating-conic-gradient(from 7deg, transparent 0deg 10deg, rgba(71, 173, 243, .26) 11deg 13deg, transparent 14deg 24deg); mask-image: radial-gradient(circle, transparent 0 22%, #000 63%, transparent 76%); pointer-events: none; }
.is-grand .milestone-rays { background: repeating-conic-gradient(from 7deg, transparent 0deg 10deg, rgba(245, 182, 53, .34) 11deg 14deg, transparent 15deg 24deg); }
.milestone-crown { position: absolute; top: 12%; left: 0; right: 0; z-index: 2; color: #e5b746; font-size: 2.1rem; text-shadow: 0 2px #fff; }
.milestone-laurel { position: absolute; bottom: 1%; color: #dfb555; font-size: 6rem; line-height: 1; opacity: .8; }
.laurel-left { left: 16%; transform: rotate(-22deg); }
.laurel-right { right: 16%; transform: scaleX(-1) rotate(-22deg); }
.milestone-number { position: absolute; inset: 0; display: grid; place-items: center; background: linear-gradient(#8be4ff 10%, #168df3 53%, #0752d1 85%); color: transparent; background-clip: text; -webkit-background-clip: text; -webkit-text-stroke: 2px #f8d982; font-size: clamp(10rem, 46vw, 15rem); font-weight: 900; letter-spacing: -.085em; line-height: 1; filter: drop-shadow(3px 6px 0 #1157ac); padding-right: .08em; }
.is-grand .milestone-number { background: linear-gradient(#fff6af 5%, #f6cd50 47%, #cf8e16 88%); background-clip: text; -webkit-background-clip: text; -webkit-text-stroke: 2px #2375d9; font-size: clamp(9rem, 40vw, 13rem); filter: drop-shadow(3px 5px 0 #e0a125); }
.milestone-mascots { position: absolute; inset: 0; z-index: 1; pointer-events: none; }
.milestone-character { position: absolute; width: clamp(94px, 27vw, 135px); height: clamp(94px, 27vw, 135px); object-fit: contain; filter: drop-shadow(0 5px 5px rgba(27, 72, 137, .18)); }
.milestone-character.size-0 { transform: scale(.85) rotate(-7deg); }
.milestone-character.size-1 { transform: scale(1.03) rotate(5deg); }
.milestone-character.size-2 { transform: scale(1.22) rotate(-3deg); }
.milestone-character.slot-0 { top: 4%; left: 0; }
.milestone-character.slot-1 { top: -4%; left: 36%; }
.milestone-character.slot-2 { top: 5%; right: -1%; }
.milestone-character.slot-3 { top: 52%; left: -3%; }
.milestone-character.slot-4 { top: 51%; right: -3%; }
.milestone-character.slot-5 { bottom: -2%; left: 0; }
.milestone-character.slot-6 { bottom: -2%; right: 0; }
.milestone-card:not(.is-grand) .milestone-character.slot-1 { top: auto; bottom: -2%; left: 0; }
.milestone-card:not(.is-grand) .milestone-character.slot-5 { bottom: -2%; right: 0; left: auto; }
.milestone-confetti { position: absolute; inset: 0; pointer-events: none; }
.milestone-bit { position: absolute; font-size: 1.1rem; line-height: 1; color: #ebbf48; text-shadow: 0 1px #fff; }
.milestone-bit.bit-1 { color: #39aefa; font-size: .8rem; }
.milestone-bit.bit-2,.milestone-bit.bit-3 { width: 7px; height: 20px; background: linear-gradient(#fff0a3,#e5aa29); box-shadow: 1px 1px 2px #d1a858; }
.milestone-bit.bit-3 { background: linear-gradient(#8addff,#177ee0); box-shadow: 1px 1px 2px #82a8cf; }
.milestone-character.slot-7 { top: 17%; right: 24%; }
.milestone-card h2 { position: relative; margin: 0; color: #073a98; font-size: clamp(1.55rem, 7vw, 2.4rem); line-height: 1.3; font-weight: 900; }
.milestone-congratulations { margin: 0 0 6px; color: #0789ed; font-size: clamp(2.3rem, 11vw, 3.3rem); font-weight: 900; line-height: 1.2; }
.is-grand .milestone-congratulations { color: #0789ed; }
.milestone-message { min-height: 2em; margin: 12px 0 18px; white-space: pre-line; color: #123c86; font-weight: 800; line-height: 1.55; text-wrap: pretty; }
.milestone-continue { width: 100%; background: linear-gradient(#5dc8ff, #067fea); box-shadow: 0 7px 16px #b0d8f6; }
.milestone-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 0 0 12px; }
.milestone-actions button { width: 100%; }
@media (max-height: 690px) { .milestone-hero { height: 330px; } }

/* The anniversary artwork is assembled from live characters and CSS decorations. */
.milestone-dialog { width: min(calc(100% - 28px), 540px); }
.milestone-card {
  padding: 10px 20px 18px;
  border: 1px solid rgba(255,255,255,.9);
  border-radius: 30px;
  background: radial-gradient(ellipse at 50% 32%, #fff 24%, #eaf8ff 65%, #fff 90%);
}
.milestone-card.is-grand { background: radial-gradient(ellipse at 50% 38%, #fff 23%, #fff4d2 56%, #e9f7ff 91%); }
.milestone-close { top: 13px; right: 13px; width: 45px; height: 45px; color: #7f899b; border: 0; box-shadow: 0 3px 12px #b6cbe077; font-size: 2rem; }
.milestone-sparkles { display: none; }
.milestone-hero { height: clamp(325px, 83vw, 430px); max-width: 500px; margin: -8px auto -9px; }
.milestone-hero::before { content: '✦　✧　★　✦'; top: 4%; color: #4caeff; font-size: 1.25rem; }
.milestone-rays { inset: 1% 3% 0; background: repeating-conic-gradient(from 5deg, transparent 0 12deg, rgba(51,168,255,.38) 13deg 14deg, transparent 15deg 24deg); mask-image: radial-gradient(ellipse, transparent 0 22%,#000 55%,transparent 72%); }
.is-grand .milestone-rays { background: repeating-conic-gradient(from 5deg, transparent 0 11deg, rgba(246,184,39,.48) 12deg 15deg, transparent 16deg 24deg); }
.milestone-number { z-index: 1; font-family: Georgia, 'Times New Roman', serif; font-weight: 900; font-size: clamp(12rem, 49vw, 20rem); -webkit-text-stroke: 3px #eec354; background: linear-gradient(165deg,#7bddff 5%,#00a8f8 34%,#2176e9 62%,#0955d8 83%,#68d7ff 96%); background-clip: text; -webkit-background-clip: text; filter: drop-shadow(2px 4px 0 #f5d878) drop-shadow(0 4px 4px #5486ba99); transform: translateY(5%); }
.is-grand .milestone-number { font-size: clamp(9rem, 38vw, 15rem); -webkit-text-stroke: 3px #168ee7; background: linear-gradient(165deg,#fff9bd 2%,#f9d34a 25%,#fff1a4 43%,#f4b820 59%,#d88a17 78%,#ffe172 94%); background-clip: text; -webkit-background-clip: text; filter: drop-shadow(3px 4px 0 #0975d0) drop-shadow(0 5px 6px #b8823977); }
.milestone-number::after { content: '✧'; position: absolute; left: 48%; top: 33%; color: #fff; font-size: 2rem; -webkit-text-stroke: 0; text-shadow: 0 0 8px white; }
.milestone-mascots { z-index: 2; }
.milestone-character { width: clamp(92px, 30vw, 158px); height: clamp(92px, 30vw, 158px); filter: drop-shadow(0 5px 3px #26589633); }
.milestone-character.slot-0 { top: 8%; left: -4%; }
.milestone-character.slot-1 { top: -6%; left: 35%; }
.milestone-character.slot-2 { top: 7%; right: -4%; }
.milestone-character.slot-3 { top: 52%; left: -7%; }
.milestone-character.slot-4 { top: 54%; right: -7%; }
.milestone-character.slot-5 { bottom: -8%; left: -4%; }
.milestone-character.slot-6 { bottom: -8%; right: -4%; }
.milestone-card:not(.is-grand) .milestone-character.slot-1 { top: -6%; bottom: auto; left: 35%; }
.milestone-card:not(.is-grand) .milestone-character.slot-5 { bottom: -8%; left: -4%; right: auto; }
.milestone-laurel { z-index: 1; bottom: 5%; font-size: 8rem; opacity: .86; }
.laurel-left { left: 8%; transform: rotate(-38deg); }
.laurel-right { right: 8%; transform: scaleX(-1) rotate(-38deg); }
.milestone-crown { z-index: 2; top: 30%; font-size: 3rem; filter: drop-shadow(0 2px 1px #a97611); }
.milestone-card:not(.is-grand) .milestone-crown { display: none; }
.milestone-confetti { z-index: 2; }
.milestone-bit { font-size: 1.35rem; }
.milestone-card h2 { margin: 2px 0 -2px; color: #073991; font-size: clamp(1.7rem,7vw,2.4rem); text-shadow: 0 1px #fff; }
.milestone-congratulations { margin: 0; color: #087df1; font-size: clamp(2.7rem,11vw,4rem); line-height: 1.25; letter-spacing: -.035em; }
.milestone-divider { display: flex; align-items: center; gap: 11px; margin: 5px 12% 2px; color: #edbd48; font-size: 1.55rem; line-height: 1; }
.milestone-divider::before,.milestone-divider::after { content: ''; flex: 1; height: 3px; border-radius: 100%; background: linear-gradient(90deg, transparent, #f1c457); transform: rotate(-2deg); }
.milestone-divider::after { transform: scaleX(-1) rotate(-2deg); }
.milestone-message { margin: 7px auto 15px; min-height: 0; color: #12469b; font-size: clamp(1rem,3.8vw,1.25rem); line-height: 1.45; }
.milestone-continue { width: 96%; min-height: 64px; border: 2px solid #9ed8ff; border-radius: 999px; background: linear-gradient(#53c6ff 0%,#008bf5 55%,#0871dd 100%); box-shadow: 0 7px 14px #72b3e988,inset 0 2px 2px #ffffffcc; font-size: clamp(1.1rem,4.6vw,1.5rem); }
.milestone-actions { width: 96%; margin: 12px auto 0; gap: 10px; }
.milestone-actions button { min-height: 40px; padding: 6px; border-radius: 999px; font-size: .86rem; box-shadow: none; }
.milestone-actions .primary-button { background: #eaf5ff; color: #1753ab; border: 1px solid #93c5fd; }
.milestone-actions .secondary-button { background: #fff; border: 1px solid #93c5fd; }
.milestone-card .share-status { margin: 4px 0 0; font-size: .75rem; }
@media (max-width: 420px) { .milestone-card { padding-inline: 12px; } .milestone-hero { height: 325px; } .milestone-character { width: 105px; height: 105px; } .milestone-character.slot-3,.milestone-character.slot-4 { top: 54%; } .milestone-laurel { font-size: 6rem; } }
.milestone-hero { height: clamp(325px, 77vw, 365px); }
.milestone-character { width: clamp(98px, 27vw, 135px); height: clamp(98px, 27vw, 135px); }
.milestone-laurel { bottom: 6%; width: 58px; height: 138px; color: #e9b94c; opacity: .95; }
.laurel-left { left: 14%; transform: rotate(-10deg); }
.laurel-right { right: 14%; transform: scaleX(-1) rotate(-10deg); }
.milestone-character.slot-3,.milestone-character.slot-4 { top: 49%; }
.milestone-character.slot-5,.milestone-character.slot-6 { bottom: -4%; }
.milestone-card:not(.is-grand) .milestone-character.slot-5 { bottom: -4%; }
.milestone-number { font-size: clamp(12rem, 47vw, 17rem); }
.is-grand .milestone-number { font-size: clamp(9rem, 37vw, 14rem); }
@media (max-width: 420px) { .milestone-hero { height: 325px; } .milestone-laurel { width: 43px; height: 105px; } }

/* Anniversary artwork: the characters remain independent transparent images. */
.milestone-card { background: radial-gradient(ellipse 80% 55% at 50% 31%, #fff 15%, #dff4ff 62%, #fff 100%); }
.milestone-card.is-grand { background: radial-gradient(ellipse 85% 62% at 50% 35%, #fffdf4 10%, #fff0bd 55%, #fff 100%); }
.milestone-hero { height: clamp(345px, 83vw, 420px); margin-top: -5px; margin-bottom: -8px; }
.milestone-rays { inset: 1% 0 0; background: repeating-conic-gradient(from 5deg, transparent 0deg 11deg, rgba(36, 159, 250, .28) 12deg 13deg, transparent 14deg 24deg); mask-image: radial-gradient(ellipse, transparent 0 12%, #000 42%, transparent 80%); }
.is-grand .milestone-rays { background: repeating-conic-gradient(from 5deg, transparent 0deg 11deg, rgba(242, 174, 19, .42) 12deg 14deg, transparent 15deg 24deg); }
.milestone-arcs { position: absolute; inset: 0; width: 100%; height: 100%; fill: none; stroke: #59b9f7; stroke-width: 2; opacity: .75; pointer-events: none; }
.is-grand .milestone-arcs { stroke: #f0be4d; }
.milestone-number { transform: translateY(10%); font-family: Georgia, 'Times New Roman', serif; font-size: clamp(12rem, 51vw, 19rem); letter-spacing: -.07em; -webkit-text-stroke: 3px #f4c65c; background: linear-gradient(160deg,#7de7ff 3%,#00b9ff 22%,#298ff2 40%,#0889ef 53%,#1470d9 74%,#0060da 89%,#43ceff 99%); background-clip: text; -webkit-background-clip: text; filter: drop-shadow(2px 3px 0 #e5ac2b) drop-shadow(0 6px 4px #327ac966); }
.is-grand .milestone-number { font-size: clamp(9rem, 40vw, 15.5rem); -webkit-text-stroke: 3px #168fe7; background: linear-gradient(150deg,#fffbd3 2%,#ffe46c 14%,#f4bd2a 29%,#ffea85 40%,#d89413 58%,#ffda51 70%,#c3820e 88%,#ffeab0 100%); background-clip: text; -webkit-background-clip: text; filter: drop-shadow(3px 4px 0 #0b77cf) drop-shadow(0 7px 4px #b88b2a80); }
.milestone-number::after { content: '✦'; left: 37%; top: 38%; font-family: sans-serif; font-size: 1.8rem; }
.is-grand .milestone-number::after { content: '✦'; left: 60%; top: 36%; }
.milestone-laurel { z-index: 2; bottom: 7%; width: 68px; height: 162px; color: #e3ad34; filter: drop-shadow(0 1px 1px #fff); }
.laurel-left { left: 9%; }
.laurel-right { right: 9%; }
.milestone-mascots { z-index: 3; }
.milestone-character { width: clamp(106px, 28vw, 150px); height: clamp(106px, 28vw, 150px); }
.milestone-character.slot-0 { top: 9%; left: -4%; }
.milestone-character.slot-1 { top: -5%; left: 34%; }
.milestone-character.slot-2 { top: 10%; right: -5%; }
.milestone-character.slot-3 { top: 54%; left: -6%; }
.milestone-character.slot-4 { top: 54%; right: -6%; }
.milestone-character.slot-5 { bottom: -7%; left: -4%; }
.milestone-character.slot-6 { bottom: -7%; right: -4%; }
.milestone-card:not(.is-grand) .milestone-character.slot-5 { bottom: -7%; left: -4%; }
.milestone-crown { top: 27%; z-index: 3; font-size: 2.5rem; }
.milestone-confetti { z-index: 2; }
.milestone-bit { color: #edbd44; font-size: 1.15rem; text-shadow: 0 0 3px #fff; }
.milestone-bit.bit-1,.milestone-bit.bit-5 { color: #28a7f2; }
.milestone-bit.bit-2,.milestone-bit.bit-3 { width: 6px; height: 16px; }
.milestone-bit.bit-4 { color: #f8d466; font-size: .8rem; }
.milestone-card h2 { color: #063891; letter-spacing: -.025em; }
.milestone-congratulations { color: #087cef; text-shadow: 0 2px #ebfaff; }
.milestone-divider { margin-top: 0; }
.milestone-continue { min-height: 65px; border: 1px solid #b3e3ff; box-shadow: 0 8px 15px #68aae486,inset 0 3px 2px #ffffffb0; }
@media (max-width: 420px) {
  .milestone-hero { height: 345px; }
  .milestone-character { width: 100px; height: 100px; }
  .milestone-laurel { width: 42px; height: 110px; }
  .milestone-character.slot-3,.milestone-character.slot-4 { top: 42%; }
  .milestone-character.slot-5,.milestone-character.slot-6,.milestone-card:not(.is-grand) .milestone-character.slot-5 { bottom: -4%; }
}
.milestone-character.slot-3,.milestone-character.slot-4 { top: 42%; }
.transfer-panel { max-width: 580px; margin: 26px auto; padding: 22px; border: 1px solid #bfdbfe; border-radius: 22px; background: #fff; color: #172a4d; }
.transfer-panel h2 { margin: 0 0 10px; font-size: 1.25rem; }
.transfer-panel p { margin: 8px 0 14px; line-height: 1.6; }
.transfer-panel button { border: 1px solid #2563eb; border-radius: 12px; background: #2563eb; color: #fff; min-height: 44px; padding: 8px 14px; font-weight: 800; }
.transfer-panel label { display: block; margin: 16px 0 7px; font-weight: 700; }
.transfer-entry { display: flex; gap: 8px; }
.transfer-entry input { min-width: 0; flex: 1; border: 1px solid #aac7ed; border-radius: 12px; padding: 10px; font-size: 16px; }
.transfer-entry button { flex: none; }
.transfer-panel .transfer-code { display: block; margin: 12px 0; overflow-wrap: anywhere; font-size: 1.1rem; font-weight: 900; letter-spacing: .04em; user-select: all; }
.transfer-panel .transfer-status { white-space: pre-line; color: #1746a2; font-weight: 700; }
.transfer-panel .transfer-note { color: #63718a; font-size: .9rem; }

.site-credits { padding: 30px 12px 24px; color: #66768e; font-size: .68rem; line-height: 1.65; }
.site-credits p { margin: 3px 0; }
.site-credits a { color: inherit; text-decoration: underline; overflow-wrap: anywhere; }

/* アプリ内ブラウザの案内（正式リリース） */
.inapp-gate { margin: 4px 0 0; padding: 18px 16px; border: 2px solid #f5c451; border-radius: 20px; background: #fff8e6; color: #5c3b00; text-align: center; }
.inapp-gate p { margin: 0 0 12px; font-size: .9rem; line-height: 1.6; word-break: keep-all; overflow-wrap: anywhere; }
.inapp-gate .inapp-title { margin-bottom: 8px; color: #7a4b00; font-size: 1.05rem; font-weight: 900; }
.inapp-gate .inapp-help { margin: 12px 0 0; color: #7a5a20; font-size: .82rem; }
.inapp-gate .inapp-help.is-emphasized { padding: 8px 10px; border-radius: 12px; background: #ffe7a8; color: #5c3b00; font-weight: 800; }
.is-inapp #drawButton, .is-inapp .once-note { display: none; }

/* 結果画面の引き継ぎコード（正式リリース） */
.today-code { margin: 14px 0 0; padding: 14px 12px; border: 1px dashed #93c5fd; border-radius: 16px; background: #f5f9ff; }
.today-code-label { margin: 0 0 6px; color: var(--orange-deep); font-size: .85rem; font-weight: 800; }
.today-code-value { display: block; margin: 0 0 10px; color: var(--ink); font-size: 1rem; font-weight: 900; letter-spacing: .04em; overflow-wrap: anywhere; user-select: all; }
.today-code-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.today-code-actions .secondary-button { width: 100%; min-height: 44px; padding: 8px 10px; }
.today-code-note { margin: 8px 0 0; color: var(--muted); font-size: .76rem; line-height: 1.5; white-space: pre-line; word-break: keep-all; overflow-wrap: anywhere; }
.transfer-panel .is-hidden { display: none !important; }

/* 正式公開版の修正（2026-10-29）：コードのお知らせとバックアップ状態 */
.today-code-notice:empty, .today-backup-status:empty, .transfer-sync-status:empty { display: none; }
.today-code-notice { margin: 0 0 10px; padding: 8px 10px; border-radius: 12px; background: #fff8e6; color: #5c3b00; font-size: .8rem; font-weight: 800; line-height: 1.5; white-space: pre-line; word-break: keep-all; overflow-wrap: anywhere; }
.today-backup-status { margin: 8px 0 0; color: var(--muted); font-size: .76rem; line-height: 1.5; word-break: keep-all; overflow-wrap: anywhere; }
.today-backup-status.is-warning { color: #9a3412; font-weight: 800; }
.today-backup-action { width: 100%; min-height: 44px; margin-top: 8px; }
.transfer-panel .transfer-sync-status { margin-top: 0; color: #405475; font-size: .9rem; }
