/* 手続きノート：配色A「さくら餅」（mockups/src/gen.py の V["A"] から） */
@font-face { font-family: "BIZ UDPGothic"; src: url("../fonts/BIZUDPGothic-Regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "BIZ UDPGothic"; src: url("../fonts/BIZUDPGothic-Bold.woff2") format("woff2"); font-weight: 700; font-display: swap; }
:root { --bg:#FBF5EC; --sf:#FFFDF9; --tx:#4A3B35; --sub:#6E5F57; --ac:#E79AAA; --st:#B4566B; --soft:#FBE7EB; --line:#EADFD1;
  --2nd:#C7A586; --2soft:#F4EADD; --btn:#C9687D; --btnfg:#FFFFFF; --ug:#FDEFF1; --ti:#F6D3DA;
  --font: "BIZ UDPGothic", "BIZ UDPゴシック", "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", "Noto Sans CJK JP", sans-serif; }
* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { background: var(--bg); color: var(--tx); font-family: var(--font); font-size: 17px; line-height: 1.6; -webkit-font-smoothing: antialiased;
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left); min-height: 100vh; }
a { color: var(--st); }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; }
:focus-visible { outline: 3px solid var(--st); outline-offset: 2px; }
#app { max-width: 560px; margin: 0 auto; padding-bottom: 40px; }
.wrap { padding: 8px 16px 24px; }
.pad { padding-top: 12px; }
.pad-x { padding: 0 16px; }
.center { text-align: center; }
.mt { margin-top: 14px; } .mt-s { margin-top: 8px; }
.hidden { display: none !important; }
.vh { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; }
h1 { font-size: 24px; line-height: 1.45; margin: 10px 0 12px; outline: none; }
h1.big { font-size: 24px; }
h2 { font-size: 19px; display: flex; align-items: center; gap: 8px; margin: 20px 0 8px; }
h2 .muted { font-size: 15px; font-weight: 400; color: var(--sub); margin-left: auto; }
p + p { margin-top: 6px; }
.sub-t { font-size: 17px; color: var(--sub); margin-top: 6px; }
.small { font-size: 17px; }

/* ヘッダー */
.hdr { display: flex; align-items: center; gap: 10px; padding: 6px 0 10px; }
.logo { width: 44px; height: 44px; border-radius: 12px; background: var(--ac); display: flex; align-items: center; justify-content: center; flex: none; }
.ttl { flex: 1; font-size: 21px; line-height: 1.3; }
.menu { min-width: 56px; height: 48px; padding: 0 12px; border-radius: 24px; background: var(--sf); border: 1.5px solid var(--line); display: flex; align-items: center; justify-content: center; font-size: 17px; color: var(--tx); font-weight: 700; text-decoration: none; position: relative; }
.menu.bell i { font-style: normal; background: var(--st); color: #fff; border-radius: 10px; font-size: 13px; padding: 0 6px; margin-left: 4px; }
.ex { background: var(--2soft); color: var(--tx); border-radius: 12px; padding: 6px 12px; font-size: 17px; display: flex; align-items: center; gap: 8px; margin-bottom: 10px; flex-wrap: wrap; }
.ex .tag { white-space: nowrap; background: #8A6A50; color: #fff; border-radius: 8px; padding: 1px 8px; font-weight: 700; font-size: 15px; }

/* 進み具合 */
.prog { background: var(--sf); border: 1.5px solid var(--line); border-radius: 20px; padding: 10px 16px; margin-bottom: 6px; }
.prog .row { display: flex; justify-content: space-between; align-items: baseline; }
.prog .pct { font-size: 28px; line-height: 1.2; font-weight: 700; color: var(--st); }
.prog .pct .u { font-size: 17px; }
.bar, .wbar { height: 14px; background: var(--soft); border-radius: 7px; overflow: hidden; margin: 6px 0 4px; }
.bar i, .wbar i { display: block; height: 100%; width: 0; background: var(--ac); border-radius: 7px; transition: width .3s; }
.prog .note { font-size: 17px; color: var(--sub); }

/* カード */
.card { background: var(--sf); border: 1.5px solid var(--line); border-radius: 18px; padding: 12px 14px; margin-bottom: 10px; display: flex; align-items: center; gap: 10px; color: var(--tx); text-decoration: none; min-height: 48px; }
.card.note, .card.warn, .card.ok, .card.res, .card.notice, .card.empty { display: block; }
.card.note { background: var(--2soft); border-color: var(--2soft); }
.card.soft { background: var(--sf); border-color: var(--line); }
.card.warn { background: var(--ug); border: 2px solid var(--ac); }
.card.ok { background: #F1F6EC; border-color: #D9E6CF; }
.card .main { flex: 1; min-width: 0; }
.card .k { font-size: 15px; color: var(--sub); }
.card .t { font-size: 18px; font-weight: 700; line-height: 1.4; }
.card .t.xl { font-size: 24px; }
.card .d { font-size: 17px; color: var(--sub); }
.card.item .chev, .row .chev { font-size: 24px; color: var(--sub); }
.days { text-align: center; min-width: 80px; border-radius: 14px; padding: 4px 6px; background: var(--2soft); flex: none; }
.days small { display: block; font-size: 15px; color: var(--sub); line-height: 1.2; }
.days b { font-size: 26px; line-height: 1.15; }
.days b span { font-size: 15px; }
.st { display: inline-block; font-size: 15px; font-weight: 700; border-radius: 8px; padding: 0 8px; margin-left: 6px; vertical-align: 1px; }
.st.soon { background: var(--soft); color: var(--st); }
.st.past { background: #F3E3D3; color: #7A4B2E; }
.st.ok { background: var(--2soft); color: var(--tx); }
.card.ug { background: var(--ug); border: 2px solid var(--ac); display: block; padding: 12px 14px; }
.card.ug .top { display: flex; align-items: center; gap: 10px; }
.card.ug .days { background: var(--sf); }
.card.ug .days b { color: var(--st); }
.pill { display: inline-flex; align-items: center; gap: 6px; background: var(--sf); color: var(--st); border-radius: 14px; padding: 2px 12px 2px 8px; font-size: 17px; font-weight: 700; margin-bottom: 6px; }
.card.bk { margin-top: 16px; }
.card.bk.nudge { background: var(--ug); border-color: var(--ac); }
.more { display: flex; align-items: center; min-height: 48px; font-weight: 700; text-decoration: none; }
.foot { font-size: 15px; color: var(--sub); margin: 6px 2px 8px; line-height: 1.6; }
.foot.small { margin-top: 16px; }
.stamp { display: inline-flex; align-items: center; min-height: 44px; font-weight: 700; }

/* ボタン */
.btn { display: flex; width: 100%; align-items: center; justify-content: center; min-height: 54px; padding: 8px 18px; border-radius: 27px; background: var(--btn); color: var(--btnfg); font-weight: 700; font-size: 19px; text-decoration: none; text-align: center; border: 2px solid var(--btn); margin-top: 8px; }
.btn.sub { background: var(--sf); color: var(--tx); border-color: var(--ac); }
.btn.small { width: auto; min-height: 48px; font-size: 17px; padding: 6px 18px; margin-top: 0; flex: none; }
.btn:disabled { opacity: .6; }
.btn.add { border-style: dashed; }
.linkbtn { display: block; width: 100%; min-height: 48px; color: var(--sub); text-decoration: underline; font-size: 17px; }
.back { height: 48px; min-width: 104px; padding: 0 14px; border-radius: 24px; background: var(--sf); border: 1.5px solid var(--line); display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: 17px; color: var(--tx); text-decoration: none; }
.wtop { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.wtop .sec { font-size: 17px; color: var(--sub); font-weight: 700; text-align: right; }

/* タイル */
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.tile { background: var(--sf); border: 1.5px solid var(--line); border-radius: 18px; min-height: 72px; padding: 10px 8px; display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 17px; line-height: 1.3; color: var(--tx); text-decoration: none; }
.tile .ic { flex: none; width: 34px; height: 34px; border-radius: 17px; background: var(--ti); display: flex; align-items: center; justify-content: center; font-size: 19px; color: var(--st); }
.tile small { display: block; font-weight: 400; font-size: 15px; color: var(--sub); }

/* ウィザード */
.wz { padding: 12px 16px 0; min-height: calc(100vh - env(safe-area-inset-top) - env(safe-area-inset-bottom)); display: flex; flex-direction: column; }
.wbar { margin-top: 14px; }
.step { font-size: 17px; color: var(--sub); text-align: right; }
h1.q { font-size: 24px; font-weight: 700; line-height: 1.5; margin: 16px 0 12px; }
.hint { background: var(--2soft); border-radius: 16px; padding: 12px 14px; font-size: 17px; line-height: 1.6; }
.hint b { color: var(--st); }
.ans { margin-top: 18px; display: flex; flex-direction: column; gap: 12px; }
.a { min-height: 64px; border-radius: 32px; display: flex; flex-direction: column; align-items: center; justify-content: center; font-size: 21px; font-weight: 700; background: var(--sf); border: 2px solid var(--ac); color: var(--tx); padding: 6px 16px; line-height: 1.35; width: 100%; }
.a small { font-size: 15px; font-weight: 400; color: var(--sub); }
.a.yes { background: var(--btn); border-color: var(--btn); color: var(--btnfg); }
.a.selected { box-shadow: 0 0 0 4px var(--soft); }
.a.selected::after { content: "（いまの答え）"; font-size: 15px; font-weight: 400; }
.a.dk { border-style: dashed; border-color: var(--2nd); }
.dknote { font-size: 15px; color: var(--sub); text-align: center; margin-top: -4px; }
.later { margin-top: auto; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 24px 0 22px; }
.skip { min-height: 52px; padding: 0 36px; border-radius: 26px; border: 1.5px solid var(--line); display: flex; align-items: center; font-size: 18px; font-weight: 700; color: var(--sub); background: transparent; }
.save { font-size: 15px; color: var(--sub); text-align: center; }
.inp { width: 100%; min-height: 56px; border: 2px solid var(--line); border-radius: 14px; background: #fff; padding: 10px 14px; font-size: 19px; }
.inp:focus { border-color: var(--ac); outline: none; box-shadow: 0 0 0 3px var(--soft); }
textarea.inp { min-height: 120px; line-height: 1.6; }
input[type="date"].inp { -webkit-appearance: none; appearance: none; display: block; }
.wareki { font-size: 17px; color: var(--sub); text-align: center; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { min-height: 48px; padding: 4px 16px; border-radius: 24px; background: var(--2soft); border: 1.5px solid var(--line); font-size: 17px; }
.drow { display: flex; gap: 8px; align-items: center; }
.drow .inp { flex: 1; }
.lbl { display: block; font-weight: 700; margin: 14px 0 6px; }
.inp.code { font-size: 22px; letter-spacing: .06em; text-transform: uppercase; }
.msg { color: var(--st); min-height: 1.6em; margin-top: 6px; font-weight: 700; }
.check { display: flex; align-items: center; gap: 12px; min-height: 56px; margin-top: 12px; font-weight: 700; }
.check input { width: 28px; height: 28px; accent-color: var(--btn); flex: none; }
.filebtn { cursor: pointer; }

/* リスト */
.list { background: var(--sf); border: 1.5px solid var(--line); border-radius: 18px; overflow: hidden; }
.row { display: flex; align-items: center; gap: 10px; padding: 10px 14px; min-height: 56px; border-bottom: 1px solid var(--line); color: var(--tx); text-decoration: none; width: 100%; text-align: left; }
.row:last-child { border-bottom: 0; }
.row .q { flex: 1; font-size: 17px; }
.row .a { all: unset; font-size: 17px; font-weight: 700; text-align: right; max-width: 55%; word-break: break-all; }
.row .a.none { color: var(--sub); font-weight: 400; }
.row .fix { flex: none; min-height: 44px; min-width: 64px; display: inline-flex; align-items: center; justify-content: center; border-radius: 22px; border: 1.5px solid var(--ac); font-weight: 700; font-size: 15px; text-decoration: none; }
.list .row { flex-wrap: wrap; }
/* 質問と答えは縦に（長い質問でも読みやすく） */
.list:not(.menu-list) .row { display: grid; grid-template-columns: 1fr auto; column-gap: 10px; row-gap: 2px; }
.list:not(.menu-list) .row .q { grid-column: 1 / -1; font-size: 15px; color: var(--sub); }
.list:not(.menu-list) .row .a { max-width: none; text-align: left; font-size: 18px; }
.nw { white-space: nowrap; }
.warn-s { color: var(--st); font-weight: 700; font-size: 17px; margin-bottom: 8px; }
.links { list-style: none; margin: 6px 0; }
.links li a { display: flex; align-items: center; min-height: 48px; font-weight: 700; }
.plain { padding-left: 1.2em; } .plain li { margin: 6px 0; }
.sw { width: 56px; height: 32px; border-radius: 16px; background: var(--line); position: relative; flex: none; }
.sw i { position: absolute; top: 3px; left: 3px; width: 26px; height: 26px; border-radius: 13px; background: #fff; transition: left .2s; }
.sw.on { background: var(--btn); } .sw.on i { left: 27px; }

/* オンボーディング */
.onb .hero { text-align: center; margin: 14px 0 4px; }
.appicon { border-radius: 22%; box-shadow: 0 2px 10px rgba(120, 70, 70, .18); }
.steps { list-style: none; margin: 14px 0; display: flex; flex-direction: column; gap: 10px; }
.steps li { display: flex; gap: 12px; align-items: flex-start; background: var(--sf); border: 1.5px solid var(--line); border-radius: 16px; padding: 12px; }
.steps .no { flex: none; width: 34px; height: 34px; border-radius: 17px; background: var(--btn); color: #fff; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.kbd { display: inline-block; border: 1.5px solid var(--sub); border-radius: 6px; padding: 0 6px; font-weight: 700; }
.points { list-style: none; margin: 16px 0; display: flex; flex-direction: column; gap: 12px; }
.points li { display: flex; gap: 10px; align-items: flex-start; }
.points svg { flex: none; margin-top: 3px; }
.dots { display: flex; gap: 8px; justify-content: center; margin: 12px 0 4px; }
.dots i { width: 10px; height: 10px; border-radius: 5px; background: var(--line); }
.dots i.on { background: var(--btn); width: 24px; }
.devbox { margin-top: 18px; border: 2px dashed #8A6A50; border-radius: 14px; padding: 10px 12px; background: #FFF8EE; font-size: 17px; }
.break { word-break: break-all; }

/* トースト・モーダル */
#toast { position: fixed; left: 16px; right: 16px; margin: 0 auto; width: fit-content; bottom: calc(24px + env(safe-area-inset-bottom)); transform: translateY(160px); background: #4A3B35; color: #fff; padding: 12px 20px; border-radius: 24px; font-size: 17px; max-width: 90vw; transition: transform .25s; z-index: 50; text-align: center; }
#toast.show { transform: translateY(0); }
.modal-wrap { position: fixed; inset: 0; background: rgba(60, 40, 35, .45); display: flex; align-items: center; justify-content: center; padding: 20px; z-index: 40; }
.modal { background: var(--sf); border-radius: 20px; padding: 18px; width: 100%; max-width: 460px; max-height: 85vh; overflow: auto; }
.modal h2 { margin-top: 0; }
.modal-body p { margin-top: 6px; }
.modal-body hr { border: 0; border-top: 1px solid var(--line); margin: 10px 0; }
.modal-btns { display: flex; gap: 10px; margin-top: 14px; }
.modal-btns .btn { margin-top: 0; }

/* まとめ（画面とA4印刷） */
.sheet { background: #fff; border: 1.5px solid var(--line); border-radius: 12px; padding: 14px; font-size: 15px; line-height: 1.5; color: #333; }
.sh-title { font-size: 19px; font-weight: 700; color: #7A3A4A; }
.sh-sub { font-size: 15px; color: #555; display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; margin-bottom: 6px; }
.sh-ex { color: #7A3A4A; font-weight: 700; }
.sh-h { font-weight: 700; background: #FBEBD8; padding: 3px 8px; margin-top: 10px; border-radius: 4px; }
.sh-t { width: 100%; border-collapse: collapse; }
.sh-t th, .sh-t td { border-bottom: 1px solid #E8DCCB; padding: 4px 6px; text-align: left; vertical-align: top; }
.sh-t th { width: 34%; font-weight: 700; color: #6B3E1F; }
.sh-foot { margin-top: 12px; font-size: 13px; color: #555; }
.print-bar { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; gap: 10px; }
.printview .sheet.a4 { margin: 8px 16px; }
@media print {
  @page { size: A4 portrait; margin: 12mm; }
  body { background: #fff; padding: 0; font-size: 11pt; }
  .no-print, #toast, .modal-wrap { display: none !important; }
  #app { max-width: none; padding: 0; }
  .printview .sheet.a4 { margin: 0; border: 0; padding: 0; font-size: 10.5pt; }
  .sh-title { font-size: 15pt; } .sh-foot { font-size: 8.5pt; }
  .sh-h { break-after: avoid; } .sh-t tr { break-inside: avoid; }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
h1[tabindex]:focus, h1[tabindex]:focus-visible { outline: none; }
