:root {
  --bg: #f4efe2; --ink: #2f2a22; --card: #fffaf0; --line: #d9cfb8; --leaf: #5e9b3a; --leaf2: #e3f1d6;
  --sun: #f2b632; --sky: #4f8fd6; --soft: #7a705e;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--bg); color: var(--ink); font-family: "Hiragino Maru Gothic ProN", "Hiragino Sans", "Yu Gothic", system-ui, sans-serif; }
body { padding: env(safe-area-inset-top) 0 env(safe-area-inset-bottom); overscroll-behavior: none; }
#app { max-width: 720px; margin: 0 auto; padding: 0 16px 130px; }
.loading { font-size: 64px; text-align: center; margin-top: 30vh; }
.hidden { display: none; }
button, .btn { font: inherit; color: inherit; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 64px; padding: 10px 22px; border-radius: 22px; border: 3px solid var(--line); background: var(--card); font-size: 24px; font-weight: 700; text-decoration: none; cursor: pointer; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .4; }
.btn.big { width: 100%; min-height: 96px; font-size: 32px; margin: 12px 0; background: var(--leaf); color: #fff; border-color: #4a7d2d; }
.btn.alt { background: #fff; }
.btn.big.alt { background: #fff; color: var(--ink); border-color: var(--line); }
.btn.next { min-width: 160px; min-height: 80px; font-size: 32px; background: var(--leaf); color: #fff; border-color: #4a7d2d; }
.btn.round { width: 64px; min-height: 64px; padding: 0; border-radius: 50%; font-size: 34px; }
.btn.tiny { min-height: 44px; padding: 4px 12px; font-size: 18px; }
.btn.mic { width: 180px; height: 180px; border-radius: 50%; font-size: 84px; background: #fff; margin: 20px auto; }
.btn.mic.rec { background: #ffdddd; border-color: #e05555; animation: pulse 1s infinite; }
@keyframes pulse { 50% { transform: scale(1.06); } }
.hold { position: relative; overflow: hidden; }
.hold-ring { position: absolute; left: 0; bottom: 0; height: 6px; width: 0; background: var(--sun); }
.hold.holding .hold-ring { width: 100%; transition: width 1.2s linear; }
.adult { font-size: 20px; }
.home .hero { text-align: center; padding: 40px 0 10px; }
.logo { font-size: 48px; margin: 8px 0 20px; letter-spacing: .1em; }
.corner { position: fixed; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); opacity: .6; }
.bar { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 0; background: var(--bg); }
.nav { width: 64px; height: 64px; flex: none; border-radius: 20px; border: 3px solid var(--line); background: var(--card); font-size: 28px; }
.steps { display: flex; flex-wrap: wrap; justify-content: center; gap: 3px; flex: 1; }
.step { font-size: 18px; opacity: .3; filter: grayscale(1); }
.step.done { opacity: .7; filter: none; }
.step.now { opacity: 1; filter: none; font-size: 28px; }
.title { font-size: 30px; text-align: center; margin: 10px 0 16px; line-height: 1.4; }
h2 { font-size: 22px; margin: 22px 0 10px; }
.foot { position: fixed; left: 0; right: 0; bottom: 0; display: flex; justify-content: center; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); background: linear-gradient(transparent, var(--bg) 30%); }
.grid { display: grid; gap: 12px; }
.g2 { grid-template-columns: repeat(2, 1fr); }
.g3 { grid-template-columns: repeat(3, 1fr); }
.g4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 400px) { .g4 { grid-template-columns: repeat(3, 1fr); } }
.tile { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; min-height: 110px; padding: 10px 6px; border-radius: 24px; border: 4px solid var(--line); background: var(--card); cursor: pointer; }
.tile.on { border-color: var(--leaf); background: var(--leaf2); box-shadow: 0 0 0 3px var(--leaf2); }
.tile.on::after { content: "✔"; position: absolute; top: 4px; right: 10px; color: var(--leaf); font-size: 22px; font-weight: 900; }
.tile:disabled { opacity: .35; }
.tile.leaf { border-style: dashed; }
.tlabel { font-size: 15px; line-height: 1.25; text-align: center; font-weight: 700; }
.need { position: absolute; top: 6px; left: 10px; color: var(--sun); }
.ic { display: inline-flex; line-height: 1; align-items: center; justify-content: center; }
.ic svg { width: 100%; height: 100%; }
.ic.md { font-size: 30px; width: 34px; height: 34px; }
.ic.lg { font-size: 44px; width: 52px; height: 52px; }
.ic.xl { font-size: 54px; width: 72px; height: 72px; }
.ic.huge { font-size: 110px; width: 140px; height: 140px; }
.thumb { width: 100%; max-height: 110px; object-fit: cover; border-radius: 14px; }
.note { font-size: 18px; color: var(--soft); text-align: center; line-height: 1.6; }
.small { font-size: 15px; line-height: 1.7; }
.hint { display: flex; align-items: center; justify-content: center; gap: 10px; font-size: 22px; margin-bottom: 14px; }
.align-box { width: 100%; }
.aligner { display: block; width: 100%; border-radius: 18px; touch-action: none; }
.readout { text-align: center; font-size: 22px; font-weight: 700; margin: 10px 0; }
.sliders, .steppers { display: grid; gap: 10px; }
.slider { display: flex; align-items: center; gap: 12px; background: var(--card); border: 3px solid var(--line); border-radius: 20px; padding: 8px 14px; margin: 8px 0; }
.slider input[type=range] { flex: 1; height: 44px; accent-color: var(--leaf); }
.val { min-width: 48px; text-align: center; font-size: 26px; font-weight: 800; }
.stepper { display: flex; align-items: center; justify-content: space-between; gap: 10px; background: var(--card); border: 3px solid var(--line); border-radius: 20px; padding: 8px 14px; }
.pv { width: 100%; border-radius: 22px; overflow: hidden; background: radial-gradient(circle at 50% 30%, #eaf4ff, #cfe3c4); touch-action: none; }
.pv.small { height: 34vh; min-height: 220px; }
.pv.big { height: 56vh; min-height: 320px; }
.row { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin: 10px 0; }
.center { display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; }
.map { display: block; width: 100%; image-rendering: pixelated; border-radius: 16px; border: 4px solid var(--line); touch-action: none; }
.map.mini { width: 60%; margin: 10px auto; }
.legend { font-size: 15px; text-align: center; margin-top: 8px; }
.form label, .form .words { display: flex; align-items: center; gap: 10px; font-size: 30px; margin: 12px 0; }
.words { flex-wrap: wrap; }
.big-input, .mid-input { flex: 1; min-height: 64px; font-size: 26px; padding: 8px 14px; border-radius: 18px; border: 3px solid var(--line); background: #fff; font-family: inherit; color: var(--ink); }
.mid-input { font-size: 20px; min-width: 0; }
.party { font-size: 120px; margin-top: 40px; }
.card { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 10px; border-radius: 20px; border: 3px solid var(--line); background: var(--card); }
.cname { font-weight: 800; font-size: 18px; }
.zcard { text-align: center; }
.pics { display: flex; gap: 8px; overflow-x: auto; justify-content: center; }
.pics img { height: 200px; border-radius: 14px; }
.wordchips { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin: 12px 0; }
.chip { padding: 8px 16px; border-radius: 999px; background: var(--leaf2); font-size: 22px; font-weight: 700; }
.dots { color: var(--leaf); letter-spacing: .2em; }
.toast { position: fixed; left: 50%; top: 20%; transform: translateX(-50%); background: #333; color: #fff; padding: 14px 24px; border-radius: 18px; font-size: 22px; z-index: 99; }
.adult-screen { font-size: 16px; }
.adult-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.adult-table td, .adult-table th { border-bottom: 1px solid var(--line); padding: 6px 4px; text-align: left; }
.group { margin-bottom: 8px; }
.login { max-width: 420px; margin: 18vh auto 0; text-align: center; }
.season { font-size: 40px; margin-top: -8px; }
.palette { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin: 12px 0; }
.swatch { width: 48px; height: 48px; border-radius: 50%; border: 3px solid var(--line); cursor: pointer; font-size: 22px; background: #fff; }
.swatch.on { border-color: var(--ink); box-shadow: 0 0 0 3px var(--sun); }
.card.on { border-color: var(--leaf); background: var(--leaf2); }
.gattai { align-items: center; }
.plus { font-size: 40px; font-weight: 900; }
.oekaki { width: min(100%, 360px); margin: 0 auto; image-rendering: pixelated; touch-action: none; }
.kansatsu { background: var(--card); border: 3px solid var(--line); border-radius: 20px; padding: 6px 12px; margin: 14px 0; }
.partpanel .hint { margin-bottom: 4px; }
.mii { display: grid; gap: 8px; margin: 8px 0; }
.miirow { display: flex; align-items: center; justify-content: center; gap: 8px; flex-wrap: wrap; }
.btn.tiny.on { border-color: var(--leaf); background: var(--leaf2); }
.sizesteps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 8px 0; }
.btn.sizestep { flex-direction: column; min-height: 84px; padding: 6px 4px; font-size: 14px; gap: 2px; }
.card.pick { cursor: pointer; font: inherit; color: inherit; }
.card.pick .thumb { max-height: 90px; }
.card.nazo { background: repeating-linear-gradient(45deg, #fffaf0, #fffaf0 10px, #f1e8d4 10px, #f1e8d4 20px); }
.dayori, .onegai { text-align: left; }
.dayori-line { font-size: 20px; line-height: 1.6; margin: 6px 0; }
.btn.big.birthday { background: linear-gradient(90deg, #ffd23a, #ff9ec4); color: #4a2a10; border-color: #e0a020; }
.printout { width: min(100%, 360px); border-radius: 12px; box-shadow: 0 2px 10px rgba(0,0,0,.15); margin: 10px auto; }
.book { display: grid; gap: 16px; }
.bookpage { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; background: #fff; padding: 10px; border-radius: 12px; }
.bookpage.cover { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 300px; }
.bookcard { width: 100%; }
@media print {
  @page { size: A4; margin: 10mm; }
  body { background: #fff; padding: 0; }
  #app { max-width: none; padding: 0; }
  .bar, .noprint, .corner, .foot, .toast { display: none !important; }
  .bookpage { break-after: page; page-break-after: always; padding: 0; gap: 6mm; }
  .bookpage.cover { min-height: 260mm; }
  .bookcard { width: 63mm; height: 88mm; justify-self: center; }
}
