@font-face { font-family: R; src: url("assets/fonts/mpr-bold.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: R; src: url("assets/fonts/mpr-black.woff2") format("woff2"); font-weight: 800 900; font-display: swap; }
:root { --bg:#FBF5E8; --line:#3A2621; --accent:#E0663B; --accentText:#B2512D; --text:#3D3836; --card:#FFFDF8; --muted:#6E645D;
  --est:#F2E3C3; --real:#CFE3EC; }
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { background: var(--bg); }
body { font-family: R, "Hiragino Maru Gothic ProN", sans-serif; color: var(--text); font-weight: 700; max-width: 560px; margin: 0 auto; padding: 10px 16px 120px;
  background-image: linear-gradient(rgba(58,38,33,.06) 1px, transparent 1px), linear-gradient(90deg, rgba(58,38,33,.06) 1px, transparent 1px);
  background-size: 24px 24px; min-height: 100vh; overflow-x: hidden; font-size: 16px; }
body.padon { padding-bottom: 300px; }
ruby rt { font-size: 52%; font-weight: 700; }
h1 { font-size: 26px; color: var(--line); margin: 10px 0 2px; font-weight: 900; text-align: center; }
h2 { font-size: 22px; color: var(--line); margin: 14px 0 8px; font-weight: 900; }
h3 { font-size: 18px; color: var(--line); margin: 12px 0 6px; font-weight: 900; }
.top { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.pill { border: 3px solid var(--line); border-radius: 20px; background: #fff; padding: 2px 10px; font-weight: 900; font-size: 14px; color: var(--line); white-space: nowrap; }
.sp { flex: 1; }
.ib { border: 3px solid var(--line); border-radius: 12px; background: #fff; min-width: 48px; min-height: 48px; font: 800 15px R, sans-serif; color: var(--line); padding: 0 10px; }
.card { background: var(--card); border: 3px solid var(--line); border-radius: 16px; padding: 10px 12px; margin-top: 10px; box-shadow: 0 3px 0 rgba(58,38,33,.15); }
.prob .ph { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.tn { font-size: 14px; color: var(--muted); font-weight: 800; }
.q { font-size: 18px; line-height: 1.8; color: var(--line); font-weight: 800; margin-top: 4px; }
.books { display: grid; grid-template-columns: repeat(6, 1fr); gap: 4px; margin-top: 6px; }
@media (max-width: 480px) { .books { grid-template-columns: repeat(3, 1fr); gap: 6px 14px; padding: 0 12px; } .books svg { max-height: 64px; } }
.books svg { width: 100%; height: auto; display: block; }
.books .t { font-size: 14px; text-align: center; border: 2px solid var(--line); border-radius: 6px; background: #fff; margin-top: 2px; white-space: nowrap; overflow: hidden; }
.ask { font-size: 18px; font-weight: 800; color: var(--line); line-height: 1.75; margin-top: 12px; }
.row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.row.end { justify-content: flex-end; }
.col { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.btn { border: 3px solid var(--line); border-radius: 14px; background: #fff; min-height: 52px; padding: 6px 12px; font: 800 17px R, sans-serif; color: var(--line); flex: 1 1 auto; box-shadow: 0 3px 0 rgba(58,38,33,.18); line-height: 1.5; }
.btn:active, .hb:active, .nb:active { transform: translateY(2px); box-shadow: none; }
.hb { border: 3px dashed var(--line); background: #fff; border-radius: 12px; padding: 4px 12px; font: 800 15px R, sans-serif; color: var(--line); min-height: 48px; }
.digits { display: flex; gap: 8px; justify-content: center; margin-top: 12px; align-items: flex-end; }
.dg { width: 62px; text-align: center; }
.dg .pl { font-size: 15px; color: var(--muted); }
.dg button { width: 62px; height: 72px; border: 3px solid var(--line); border-radius: 14px; background: #fff; font: 900 40px R, sans-serif; color: var(--line); }
.dg button.keep { border: 5px solid var(--accent); }
.dg button.look { border: 4px dashed var(--line); background: #FFF6E6; }
.cm { font: 900 34px R, sans-serif; color: var(--line); width: 8px; margin-left: -6px; }
.dglab { display: flex; justify-content: center; gap: 22px; font-size: 15px; margin-top: 4px; }
.dglab .k { color: var(--accentText); } .dglab .l { color: var(--line); }
.fb { margin-top: 10px; border: 3px solid var(--accent); border-radius: 14px; background: #fff; padding: 8px 12px; font-size: 16px; line-height: 1.8; color: var(--line); }
.fb.ok { border-color: var(--line); background: #FFFDF8; }
.eq { font-size: 26px; font-weight: 900; color: var(--line); text-align: center; margin-top: 10px; white-space: nowrap; }
.eq.sm { font-size: 20px; text-align: left; }
.ans { display: inline-block; min-width: 120px; border-bottom: 4px solid var(--line); text-align: center; }
.rulerbox svg { display: block; width: 100%; height: auto; margin-top: 6px; overflow: visible; }
svg text { font-family: R, sans-serif; font-weight: 800; fill: var(--line); }
.small { font-size: 14px; color: var(--muted); line-height: 1.7; margin-top: 4px; }
.cap { color: var(--accentText); font-weight: 800; }
.zoom svg { width: 100%; height: auto; }
.poke { margin-top: 6px; display: inline-block; border: 3px solid var(--line); border-radius: 12px; background: #fff; padding: 4px 10px; font-size: 14px; animation: bob 1s ease-in-out 3; cursor: pointer; }
@keyframes bob { 50% { transform: translateY(-4px); } }
.tp { animation: tp .4s ease-out both; }
@keyframes tp { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: none; } }
.grow { transform-box: fill-box; animation: grow 1.4s .5s ease-in-out both; }
@keyframes grow { from { transform: scaleX(0.9933); } to { transform: scaleX(1); } }
.hint { margin-top: 12px; }
.pad { position: fixed; left: 0; right: 0; bottom: 0; background: #F4EBDA; border-top: 3px solid var(--line); padding: 8px 12px 14px; display: none; z-index: 5; }
.pad.show { display: block; }
.pad .g { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; max-width: 480px; margin: 0 auto; }
.pad button { height: 52px; border: 3px solid var(--line); border-radius: 12px; background: #fff; font: 900 24px R, sans-serif; color: var(--line); }
.pad button.go { background: var(--est); font-size: 18px; }
.path { display: flex; gap: 8px; justify-content: center; margin-top: 8px; }
.pd { width: 48px; height: 48px; border-radius: 50%; border: 3px solid var(--line); background: #fff; font: 900 18px R, sans-serif; color: var(--line); }
.pd.done { background: var(--est); }
.pd.cur { box-shadow: 0 0 0 4px rgba(58,38,33,.25); }
.nav { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 18px; }
.nb { border: 3px solid var(--line); border-radius: 14px; background: #FFF6E6; min-height: 52px; font: 800 16px R, sans-serif; color: var(--line); }
.stamp { display: inline-block; border: 3px solid var(--line); border-radius: 14px; padding: 8px 10px; font-size: 15px; line-height: 1.6; background: #fff; transform: rotate(-2deg); margin: 6px 4px 0 0; }
.stamp.receipt { display: block; border-style: dashed; text-align: center; margin-top: 12px; }
.stamps { display: flex; flex-wrap: wrap; }
.stamp.pop { animation: pop .4s ease-out both; }
@keyframes pop { from { opacity: 0; transform: scale(1.6) rotate(-8deg); } to { opacity: 1; transform: rotate(-2deg); } }
.note { margin-top: 10px; border: 3px solid var(--line); border-radius: 10px; background: #FFFEF6; padding: 6px 10px; background-image: repeating-linear-gradient(transparent 0 46px, rgba(70,110,170,.22) 46px 48px); }
.nl { display: block; width: 100%; text-align: left; min-height: 48px; border: 0; background: transparent; font: 800 17px R, sans-serif; color: #333; line-height: 1.6; padding: 4px 4px; border-radius: 8px; }
.nl.hi { background: rgba(255,206,120,.5); }
.cz { margin-top: 8px; border: 3px solid var(--line); border-radius: 12px; background: #fff; padding: 8px 10px; font-size: 17px; line-height: 1.8; }
.cz.done { background: #FFFDF8; color: var(--muted); }
textarea { width: 100%; margin-top: 8px; border: 3px solid var(--line); border-radius: 12px; padding: 8px; font: 700 16px R, sans-serif; color: var(--text); }
.checks label { display: flex; gap: 8px; align-items: center; min-height: 44px; font-size: 16px; }
.checks input { width: 24px; height: 24px; }
.hissan { text-align: center; }
.hr { display: flex; justify-content: center; }
.hc { width: 40px; height: 48px; font: 900 34px R, sans-serif; color: var(--line); display: inline-flex; align-items: center; justify-content: center; }
.hc.in { border-bottom: 3px dotted var(--muted); }
.hline { width: 200px; height: 4px; background: var(--line); margin: 2px auto; }
.rangebar { display: flex; justify-content: space-between; align-items: center; margin-top: 8px; border: 3px dashed var(--muted); border-radius: 12px; padding: 6px 10px; font-size: 16px; }
.rng { display: block; margin-top: 12px; font-size: 16px; }
.rng input { width: 100%; height: 44px; accent-color: var(--line); }
.rcard { font-size: 17px; line-height: 1.8; }
details summary { min-height: 44px; display: flex; align-items: center; cursor: pointer; color: var(--line); }
.six { margin-top: 8px; font-size: 18px; color: var(--line); }
.mapi { border: 2px solid rgba(58,38,33,.3); border-radius: 10px; background: #fff; padding: 6px 10px; margin-top: 6px; font-size: 15px; line-height: 1.7; }
.mapi.cur { border: 3px solid var(--line); background: #FFF6E6; }
.lvl { font-size: 13px; color: var(--muted); }
.done6 .stamp { font-size: 16px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
