/* Tabi — giấy washi, chàm ai-iro, son shu-iro */
:root {
  --paper: #f6f1e7; --card: #fffdf8; --ink: #1d2233; --ink2: #555b6e; --muted: #7d8394;
  --line: #e4dccb; --indigo: #1f2a44; --indigo2: #34507e; --shu: #c8402f; --shu-soft: #f7e3dc;
  --fill: #34507e; --track: #ebe4d4; --good: #2e7d5b; --crit: #b3261e;
  --sky1: #f4d9c6; --sky2: #f6f1e7; --fuji: #34507e; --hill1: #7f93b5; --hill2: #1f2a44; --snow: #fffdf8;
  --shadow: 0 1px 2px rgba(31, 42, 68, .06), 0 8px 24px -12px rgba(31, 42, 68, .18);
  --serif: 'Noto Serif', 'Shippori Mincho', Georgia, serif; --jp: 'Shippori Mincho', 'Noto Serif JP', 'Hiragino Mincho ProN', serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme=light]) {
  --paper: #14161f; --card: #1c1f2b; --ink: #ece7db; --ink2: #b9bccb; --muted: #8b90a3;
  --line: #2c3040; --indigo: #dfe6f5; --indigo2: #9db4dc; --shu: #ee6a55; --shu-soft: #3a211d;
  --fill: #7d9fd6; --track: #2a2e3d; --good: #5fc39a; --crit: #ff8a7d;
  --sky1: #2a2238; --sky2: #14161f; --fuji: #3c4d73; --hill1: #2a3654; --hill2: #0d0f16; --snow: #dfe6f5;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3); color-scheme: dark;
} }
:root[data-theme=dark] {
  --paper: #14161f; --card: #1c1f2b; --ink: #ece7db; --ink2: #b9bccb; --muted: #8b90a3;
  --line: #2c3040; --indigo: #dfe6f5; --indigo2: #9db4dc; --shu: #ee6a55; --shu-soft: #3a211d;
  --fill: #7d9fd6; --track: #2a2e3d; --good: #5fc39a; --crit: #ff8a7d;
  --sky1: #2a2238; --sky2: #14161f; --fuji: #3c4d73; --hill1: #2a3654; --hill2: #0d0f16; --snow: #dfe6f5;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3); color-scheme: dark;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 15px/1.55 'Be Vietnam Pro', system-ui, sans-serif;
  background-image: radial-gradient(circle at 100% 150%, transparent 24%, var(--line) 24.5%, var(--line) 26%, transparent 26.5%), radial-gradient(circle at 0 150%, transparent 24%, var(--line) 24.5%, var(--line) 26%, transparent 26.5%);
  background-size: 56px 28px; background-attachment: fixed; }
body::before { content: ''; position: fixed; inset: 0; background: var(--paper); opacity: .93; z-index: -1; }
h1, h2, h3, p { margin: 0; }
h1 { font: 700 26px/1.2 var(--serif); letter-spacing: -.01em; }
h1 span[lang=ja], h2 span[lang=ja] { font-family: var(--jp); color: var(--shu); font-size: .62em; margin-left: 6px; font-weight: 600; }
h2 { font: 700 16px/1.3 var(--serif); }
[lang=ja] { font-family: var(--jp); }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
.muted { color: var(--muted); font-size: 13px; }
.tnum { font-variant-numeric: tabular-nums; }
.eyebrow { font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--shu); font-weight: 600; }
:focus-visible { outline: 2px solid var(--shu); outline-offset: 2px; border-radius: 6px; }

/* khung */
#app { max-width: 1120px; margin: 0 auto; padding: 0 16px calc(96px + env(safe-area-inset-bottom)); }
.top { display: flex; align-items: center; gap: 12px; padding: 14px 0; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; min-width: 0; flex: 1; }
.brand b { display: block; font: 700 17px/1.2 var(--serif); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand small { color: var(--muted); font-size: 12px; }
.hanko { flex: none; width: 38px; height: 38px; display: grid; place-items: center; background: var(--shu); color: #fff; font: 800 20px var(--jp); border-radius: 9px 12px 8px 11px; transform: rotate(-4deg); }
.nav { display: flex; gap: 2px; }
.nav a { display: flex; align-items: center; gap: 7px; padding: 8px 12px; border-radius: 10px; text-decoration: none; color: var(--ink2); font-weight: 500; font-size: 14px; }
.nav a i { display: none; }
.nav svg, .icon-btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.nav a.on { background: var(--indigo); color: var(--paper); }
.icon-btn { position: relative; flex: none; width: 40px; height: 40px; display: grid; place-items: center; border: 1px solid var(--line); background: var(--card); border-radius: 12px; color: var(--ink2); }
#syncDot { position: absolute; top: -3px; right: -3px; width: 11px; height: 11px; border-radius: 50%; border: 2px solid var(--paper); background: var(--good); }
#syncDot[data-state=off] { display: none; } #syncDot[data-state=busy] { background: #d9a400; animation: pulse 1s infinite; } #syncDot[data-state=err] { background: var(--muted); }
@keyframes pulse { 50% { opacity: .3; } }
@media (max-width: 820px) {
  .nav { position: fixed; z-index: 20; left: 0; right: 0; bottom: 0; background: var(--card); border-top: 1px solid var(--line); padding: 6px 6px calc(6px + env(safe-area-inset-bottom)); justify-content: space-around; }
  .nav a { flex: 1; flex-direction: column; gap: 2px; font-size: 11px; padding: 6px 2px; }
  .nav a.on { background: none; color: var(--shu); font-weight: 700; }
}

/* thẻ & lưới */
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: 14px; margin-top: 14px; }
@media (min-width: 700px) { .span2 { grid-column: span 2; } }
.card { position: relative; background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 18px; box-shadow: var(--shadow); min-width: 0; }
.card-h { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.page-h { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 10px 0 14px; flex-wrap: wrap; }
.link { background: none; border: 0; padding: 0; color: var(--indigo2); font-size: 13px; font-weight: 600; text-decoration: none; }
.link:hover { text-decoration: underline; }
.empty { color: var(--muted); text-align: center; padding: 22px 8px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 42px; padding: 0 16px; border-radius: 12px; border: 1px solid transparent; font-weight: 600; text-decoration: none; white-space: nowrap; }
.btn.primary { background: var(--shu); color: #fff; } .btn.primary:hover { filter: brightness(1.07); }
.btn.ghost { background: transparent; border-color: var(--line); color: var(--ink); } .btn.ghost:hover { border-color: var(--indigo2); }
.btn.danger { background: transparent; color: var(--crit); border-color: currentColor; }
.btn.link { min-height: 0; padding: 6px; } .btn.big { min-height: 52px; font-size: 16px; width: 100%; }
.fab { position: fixed; z-index: 15; right: max(16px, calc(50vw - 544px)); bottom: calc(22px + env(safe-area-inset-bottom)); height: 52px; padding: 0 20px 0 16px; border: 0; border-radius: 26px; background: var(--shu); color: #fff; font-weight: 700; box-shadow: 0 10px 24px -8px rgba(200, 64, 47, .7); }
.fab span { font-size: 20px; }
@media (max-width: 820px) { .fab { bottom: calc(78px + env(safe-area-inset-bottom)); } }

/* cảnh Phú Sĩ */
.hero { position: relative; overflow: hidden; border-radius: 22px; min-height: clamp(250px, 26vw, 300px); padding: 24px; display: flex; flex-direction: column; justify-content: space-between; background: linear-gradient(var(--sky1), var(--sky2)); border: 1px solid var(--line); }
.scene { position: absolute; inset: 0; pointer-events: none; } .scene svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.sun { fill: var(--shu); } .fuji { fill: var(--fuji); } .snow { fill: var(--snow); } .h1 { fill: var(--hill1); } .h2 { fill: var(--hill2); } .torii { fill: var(--shu); }
.scene-sakura { --hill1: #e9a9b8; } .scene-yuki { --hill1: #c9d3e3; }
.petals i { position: absolute; top: -30px; font-style: normal; opacity: .85; animation: fall linear infinite; }
@keyframes fall { to { transform: translate(70px, 340px) rotate(300deg); opacity: .2; } }
@media (prefers-reduced-motion: reduce) { .petals { display: none; } * { animation: none !important; transition: none !important; } }
.hero-txt { position: relative; max-width: 30em; text-shadow: 0 0 14px var(--sky2), 0 0 4px var(--sky2); }
.hero-txt p:last-child { color: var(--ink2); font-weight: 500; }
.count { font: 700 76px/1 var(--serif); letter-spacing: -.03em; color: var(--indigo); } .count small { font-size: 22px; letter-spacing: 0; }
.count.sm { font-size: clamp(26px, 5vw, 38px); line-height: 1.15; margin: 4px 0; }
.clocks { position: absolute; top: 14px; right: 14px; display: flex; gap: 6px; }
.clocks span { background: color-mix(in srgb, var(--card) 88%, transparent); border: 1px solid var(--line); border-radius: 12px; padding: 5px 12px; text-align: center; backdrop-filter: blur(4px); }
.clocks small { display: block; font-size: 11px; color: var(--muted); } .clocks b { font-variant-numeric: tabular-nums; font-size: 17px; }

/* hôm nay */
.wx { font-size: 13px; color: var(--ink2); white-space: nowrap; } .wx b { font-weight: 400; }
.mini-tl { list-style: none; margin: 0 0 14px; padding: 0; }
.mini-tl li { display: flex; gap: 12px; padding: 7px 0; border-bottom: 1px dashed var(--line); }
.mini-tl time { flex: none; width: 46px; font-variant-numeric: tabular-nums; color: var(--muted); font-weight: 600; }
.mini-tl .done span { text-decoration: line-through; color: var(--muted); }
.mini-tl .next { background: var(--shu-soft); margin: 0 -10px; padding: 7px 10px; border-radius: 10px; border: 0; } .mini-tl em { font-style: normal; font-size: 11px; font-weight: 700; color: var(--shu); margin-left: 6px; text-transform: uppercase; }
.stat { font: 700 28px/1.2 var(--serif); font-variant-numeric: tabular-nums; } .stat small { font: 500 13px 'Be Vietnam Pro', sans-serif; color: var(--muted); margin-left: 8px; }
.meter { height: 8px; border-radius: 4px; background: var(--track); overflow: hidden; margin: 10px 0; } .meter i { display: block; height: 100%; background: var(--fill); border-radius: 4px; min-width: 0; transition: width .4s; }
.meter.over i { background: var(--crit); }
.conv { display: flex; align-items: center; gap: 8px; border: 1px solid var(--line); border-radius: 12px; padding: 0 14px; background: var(--paper); }
.conv span { font: 700 22px var(--serif); color: var(--shu); } .conv input { flex: 1; min-width: 0; border: 0; background: none; height: 50px; font-size: 22px; font-weight: 600; outline: none; font-variant-numeric: tabular-nums; }
.conv-out { font: 700 22px/1.3 var(--serif); margin: 8px 0 10px; font-variant-numeric: tabular-nums; } .conv-out.sm { font-size: 15px; color: var(--muted); min-height: 20px; margin: 4px 0 12px; text-align: center; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; } .chips button { border: 1px solid var(--line); background: var(--paper); border-radius: 999px; padding: 5px 12px; font-size: 13px; font-weight: 500; }
.chips button.on { background: var(--indigo); color: var(--paper); border-color: var(--indigo); } .tabs { margin-bottom: 8px; }
.sos-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; } .sos-row a { text-align: center; text-decoration: none; border: 1px solid var(--line); border-radius: 12px; padding: 10px 4px; font-size: 12px; color: var(--ink2); }
.sos-row b { display: block; font: 700 22px var(--serif); color: var(--shu); }

/* lịch trình */
.toggle { display: inline-flex; background: var(--track); border-radius: 12px; padding: 3px; } .toggle button { border: 0; background: none; padding: 7px 14px; border-radius: 9px; font-weight: 600; font-size: 13px; color: var(--ink2); } .toggle .on { background: var(--card); color: var(--ink); box-shadow: var(--shadow); }
.daystrip { display: flex; gap: 8px; overflow-x: auto; padding: 4px 16px 12px; margin: 0 -16px; scrollbar-width: thin; }
.daychip { flex: none; width: 74px; padding: 8px 4px; border: 1px solid var(--line); background: var(--card); border-radius: 14px; text-align: center; line-height: 1.25; }
.daychip small { display: block; font-size: 11px; color: var(--muted); text-transform: uppercase; } .daychip b { display: block; font: 700 22px var(--serif); } .daychip span { display: block; font-size: 11px; color: var(--ink2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.daychip.today { border-color: var(--shu); } .daychip.on { background: var(--indigo); border-color: var(--indigo); } .daychip.on * { color: var(--paper); }
.day-h { display: flex; justify-content: space-between; gap: 14px; align-items: flex-end; flex-wrap: wrap; } .day-h > div { flex: 1; min-width: 200px; }
.title-in { width: 100%; border: 0; border-bottom: 1px dashed transparent; background: none; font: 700 22px/1.3 var(--serif); padding: 2px 0; } .title-in:hover, .title-in:focus { border-color: var(--line); outline: none; }
.city-sel { font-size: 12px; color: var(--muted); display: grid; gap: 2px; }
.day-meta { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 13px; color: var(--ink2); margin: 10px 0 6px; }
.stamp { position: absolute; top: 14px; right: 150px; width: 54px; height: 54px; display: grid; place-items: center; border: 3px solid var(--shu); color: var(--shu); border-radius: 50%; font: 800 26px var(--jp); transform: rotate(-14deg); opacity: .85; animation: stamp .35s cubic-bezier(.2, 2, .6, 1); pointer-events: none; }
@keyframes stamp { from { transform: rotate(-14deg) scale(2.4); opacity: 0; } }
@media (max-width: 600px) { .stamp { right: 14px; top: 10px; } }
.tl { list-style: none; margin: 8px 0 16px; padding: 0; position: relative; } .tl::before { content: ''; position: absolute; left: 11px; top: 14px; bottom: 14px; width: 2px; background: var(--line); }
.tl-item { position: relative; display: flex; gap: 12px; align-items: flex-start; padding: 9px 0; }
.tl-body { flex: 1; min-width: 0; cursor: pointer; border-radius: 8px; } .tl-title { font-weight: 600; } .tl-title time { font-variant-numeric: tabular-nums; color: var(--shu); margin-right: 4px; }
.tl-note { font-size: 13px; color: var(--ink2); } .tl-meta { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.tl-item.done .tl-title { text-decoration: line-through; color: var(--muted); } .tl-item.done .tl-title time { color: var(--muted); }
.tl-acts { display: flex; gap: 2px; flex: none; }
.mini { width: 32px; height: 32px; display: grid; place-items: center; border: 0; background: none; border-radius: 8px; text-decoration: none; color: var(--ink2); font-size: 15px; } .mini:hover { background: var(--track); } .mini:disabled { opacity: .25; cursor: default; }
@media (max-width: 520px) { .tl-item { flex-wrap: wrap; } .tl-acts { width: 100%; padding-left: 36px; margin-top: -4px; } }
.tick { display: inline-flex; align-items: flex-start; gap: 10px; cursor: pointer; } .tick input { position: absolute; opacity: 0; width: 24px; height: 24px; margin: 0; }
.tick span { flex: none; width: 24px; height: 24px; border: 2px solid var(--muted); border-radius: 50%; background: var(--card); position: relative; z-index: 1; display: grid; place-items: center; }
.tick input:checked + span { background: var(--shu); border-color: var(--shu); } .tick input:checked + span::after { content: '✓'; color: #fff; font-size: 14px; font-weight: 700; } .tick input:focus-visible + span { outline: 2px solid var(--shu); outline-offset: 2px; }
.tick em { font-style: normal; }
.note { display: grid; gap: 6px; margin-top: 18px; font-size: 13px; color: var(--muted); }
.map-card { padding: 10px; } #map { height: min(62vh, 520px); border-radius: 12px; overflow: hidden; background: var(--track); z-index: 0; } .map-card .muted { padding: 8px 6px 0; } .pad { padding: 20px; }
.pin { background: var(--shu); color: #fff; border-radius: 50%; display: grid !important; place-items: center; font-weight: 700; border: 2px solid #fff; box-shadow: 0 2px 6px rgba(0, 0, 0, .35); }

/* ngân sách */
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 10px; }
.tile { text-align: left; background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px; display: grid; gap: 2px; min-width: 0; }
.tile small { color: var(--muted); font-size: 12px; } .tile b { font: 700 21px/1.25 var(--serif); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; } .tile span { font-size: 12px; color: var(--ink2); } .tile.neg small { color: var(--crit); font-weight: 700; }
.cats { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; } .cat-h { display: flex; justify-content: space-between; gap: 8px; font-size: 14px; } .cats .meter { margin: 5px 0 0; } .warn { font-style: normal; color: var(--crit); font-weight: 700; font-size: 12px; }
.bars { position: relative; display: flex; align-items: flex-end; gap: 2px; height: 170px; padding: 18px 0 20px; }
.bar { position: relative; flex: 1; height: 100%; display: flex; align-items: flex-end; justify-content: center; min-width: 0; outline-offset: 0; }
.bar i { display: block; width: min(100%, 22px); background: var(--fill); border-radius: 4px 4px 0 0; min-height: 1px; } .bar:hover i, .bar:focus i { background: var(--shu); }
.bar small { position: absolute; bottom: -18px; font-size: 10px; color: var(--muted); }
.bar:hover::after, .bar:focus::after { content: attr(data-tip); position: absolute; bottom: 100%; left: 50%; transform: translateX(-50%); background: var(--ink); color: var(--paper); font-size: 12px; padding: 5px 9px; border-radius: 8px; white-space: nowrap; z-index: 5; pointer-events: none; }
.bar:first-child:hover::after, .bar:nth-child(2):hover::after, .bar:first-child:focus::after { left: 0; transform: none; } .bar:nth-last-child(2)::after, .bar:nth-last-child(3)::after { left: auto !important; right: 0; transform: none !important; }
.avg-line { position: absolute; left: 0; right: 0; bottom: calc(20px + (100% - 38px) * var(--avg) / 100%); border-top: 1px dashed var(--muted); pointer-events: none; height: 0; }
.avg-line em { position: absolute; right: 0; bottom: 2px; font-style: normal; font-size: 11px; color: var(--muted); background: var(--card); padding: 0 4px; }
.date-h { display: flex; justify-content: space-between; font: 600 13px 'Be Vietnam Pro', sans-serif; color: var(--muted); padding: 12px 0 4px; border-bottom: 1px solid var(--line); text-transform: capitalize; }
.exp { list-style: none; margin: 0; padding: 0; } .exp li, .bk { display: flex; align-items: center; gap: 12px; padding: 10px 6px; border-bottom: 1px dashed var(--line); cursor: pointer; border-radius: 8px; } .exp li:hover, .bk:hover { background: var(--paper); }
.exp-ic { flex: none; width: 38px; height: 38px; display: grid; place-items: center; background: var(--paper); border: 1px solid var(--line); border-radius: 12px; font-size: 18px; }
.exp-t { flex: 1; min-width: 0; } .exp-t b, .exp-a b { display: block; font-weight: 600; } .exp-t b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .exp-t small, .exp-a small { color: var(--muted); font-size: 12px; } .exp-a { text-align: right; flex: none; }
.settle { list-style: none; padding: 0; margin: 0; } .settle li { display: flex; justify-content: space-between; gap: 10px; padding: 8px 0; border-bottom: 1px dashed var(--line); } .settle span { font-weight: 700; margin-left: auto; }

/* chuẩn bị */
.ring { width: 58px; height: 58px; border-radius: 50%; display: grid; place-items: center; background: radial-gradient(var(--paper) 58%, transparent 59%), conic-gradient(var(--shu) calc(var(--p) * 1%), var(--track) 0); font-size: 13px; }
.checks { list-style: none; margin: 0; padding: 0; } .checks li { display: flex; align-items: flex-start; justify-content: space-between; gap: 6px; padding: 7px 0; position: relative; } .checks .tick { flex: 1; } .checks .done em { text-decoration: line-through; color: var(--muted); }
.checks .del { opacity: .35; width: 26px; height: 26px; } .checks li:hover .del, .del:focus { opacity: 1; } .compact .del { display: none; } .compact { margin-top: 6px; }
.code { flex: none; border: 1px dashed var(--shu); background: var(--shu-soft); color: var(--ink); border-radius: 8px; padding: 5px 10px; font: 600 14px ui-monospace, monospace; letter-spacing: .06em; }
.inline { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; } .inline input { flex: 1; min-width: 0; } .add { margin-top: 10px; }

/* cẩm nang */
.phrases { list-style: none; margin: 0; padding: 0; } .phrases li { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 12px 0; border-bottom: 1px dashed var(--line); } .phrases span { display: flex; flex: none; }
.vi { font-size: 13px; color: var(--ink2); } .jp { font: 600 20px/1.4 var(--jp); } .ro { font-size: 13px; color: var(--shu); font-style: italic; }
.bigjp { text-align: center; padding: 20px 0; } .bigjp p { font: 800 clamp(30px, 9vw, 52px)/1.35 var(--jp); } .bigjp small { color: var(--muted); font-size: 16px; }
.tel { list-style: none; margin: 0; padding: 0; } .tel a { display: flex; gap: 12px; align-items: center; padding: 9px 0; text-decoration: none; border-bottom: 1px dashed var(--line); } .tel b { flex: none; min-width: 118px; font: 700 17px var(--serif); color: var(--shu); font-variant-numeric: tabular-nums; } .tel small { display: block; color: var(--muted); font-size: 12px; } .tel span { font-size: 14px; }
.tips { margin: 0; padding-left: 18px; display: grid; gap: 8px; font-size: 14px; } .tips li::marker { color: var(--shu); }

/* biểu mẫu & hộp thoại */
label { display: grid; gap: 5px; font-size: 13px; font-weight: 500; color: var(--ink2); } label small { font-weight: 400; color: var(--muted); }
input:not([type=radio]):not([type=checkbox]), select, textarea { width: 100%; min-height: 44px; padding: 9px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--paper); font-size: 16px; color: var(--ink); }
.title-in, .conv input { min-height: 0 !important; border-radius: 0 !important; background: none !important; padding: 2px 0 !important; border-width: 0 0 1px !important; } .conv input { border: 0 !important; height: 50px; }
textarea { resize: vertical; } .row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; } .r13 { grid-template-columns: 120px 1fr; }
@media (max-width: 420px) { .row2:not(.r13) { grid-template-columns: 1fr; } }
dialog { border: 0; padding: 0; background: var(--card); color: var(--ink); border-radius: 22px; width: min(540px, calc(100vw - 20px)); max-height: calc(100dvh - 24px); box-shadow: 0 30px 80px -20px rgba(0, 0, 0, .5); }
dialog::backdrop { background: rgba(20, 22, 31, .55); backdrop-filter: blur(3px); }
dialog form { display: flex; flex-direction: column; max-height: calc(100dvh - 24px); } dialog header { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 16px 18px 8px; } dialog header h2 { font-size: 19px; }
.sheet-body { overflow-y: auto; padding: 8px 18px 16px; display: grid; gap: 12px; } dialog footer { display: flex; gap: 10px; justify-content: flex-end; padding: 12px 18px 16px; border-top: 1px solid var(--line); } dialog footer:empty { display: none; } dialog footer .danger { margin-right: auto; }
@media (max-width: 600px) { dialog { margin: auto auto 0; width: 100vw; max-width: 100vw; border-radius: 22px 22px 0 0; } }
.box { border: 1px solid var(--line); border-radius: 14px; padding: 14px; display: grid; gap: 10px; } .box h3 { font: 700 14px var(--serif); }
.amount { display: grid; gap: 10px; justify-items: center; } .amount > input { text-align: center; font: 700 40px var(--serif) !important; border: 0 !important; background: none !important; font-variant-numeric: tabular-nums; }
.cur, .seg { display: flex; gap: 6px; border: 0; padding: 0; margin: 0; } .cur label, .catpick label, .seg label { display: block; cursor: pointer; } .cur input, .catpick input, .seg input { position: absolute; opacity: 0; }
.cur span { display: block; padding: 6px 16px; border-radius: 999px; border: 1px solid var(--line); font-weight: 600; color: var(--ink); } .cur input:checked + span { background: var(--indigo); color: var(--paper); border-color: var(--indigo); }
.cur input:focus-visible + span, .catpick input:focus-visible + span, .seg input:focus-visible + span { outline: 2px solid var(--shu); outline-offset: 2px; }
.catpick { display: grid; grid-template-columns: repeat(auto-fit, minmax(68px, 1fr)); gap: 6px; } .catpick span { display: grid; justify-items: center; gap: 2px; padding: 8px 2px; border: 1px solid var(--line); border-radius: 12px; font-size: 20px; } .catpick small { font-size: 10.5px; color: var(--ink2); white-space: nowrap; } .catpick input:checked + span { border-color: var(--shu); background: var(--shu-soft); }
.seg { flex-direction: column; gap: 8px; } .seg legend { font-size: 13px; font-weight: 500; color: var(--ink2); margin-bottom: 6px; padding: 0; } .seg span { display: grid; padding: 10px 14px; border: 1px solid var(--line); border-radius: 12px; color: var(--ink); } .seg input:checked + span { border-color: var(--shu); background: var(--shu-soft); }

/* bắt đầu */
.onboard { position: relative; min-height: 100dvh; display: grid; place-items: center; padding: 24px 0; margin-bottom: -96px; }
.onboard .scene { position: fixed; background: linear-gradient(var(--sky1), var(--sky2) 70%); } .onboard-card { width: min(560px, 100%); display: grid; gap: 14px; background: color-mix(in srgb, var(--card) 94%, transparent); backdrop-filter: blur(6px); }
.onboard h1 { font-size: clamp(26px, 6vw, 34px); }

#toast { position: fixed; z-index: 99; left: 50%; bottom: calc(150px + env(safe-area-inset-bottom)); transform: translate(-50%, 20px); background: var(--ink); color: var(--paper); padding: 10px 18px; border-radius: 999px; font-weight: 500; font-size: 14px; opacity: 0; pointer-events: none; transition: .25s; max-width: calc(100vw - 32px); text-align: center; }
#toast.on { opacity: 1; transform: translate(-50%, 0); }

#print { display: none; }
@media print {
  #app, #toast, dialog { display: none !important; } body { background: #fff; color: #000; } body::before { display: none; }
  #print { display: block; font: 12px/1.5 'Be Vietnam Pro', sans-serif; } #print section { break-inside: avoid; margin-top: 16px; } #print h2 { font-size: 14px; border-bottom: 1px solid #000; } #print h3 { font: italic 12px sans-serif; margin: 2px 0; }
  #print table { width: 100%; border-collapse: collapse; } #print td { padding: 3px 6px 3px 0; vertical-align: top; border-bottom: 1px dotted #999; } #print td:first-child { width: 48px; } #print td:last-child { text-align: right; white-space: nowrap; }
}

/* bản chỉ xem */
.tick.ro { cursor: default; } .tick span.on { background: var(--shu); border-color: var(--shu); } .tick span.on::after { content: '✓'; color: #fff; font-size: 14px; font-weight: 700; }
.checks li { justify-content: flex-start; gap: 10px; } .checks em { font-style: normal; }
.day-title { font: 700 22px/1.3 var(--serif); } .city-tag { font-size: 14px; color: var(--ink2); font-weight: 500; }
.daynote { margin-top: 14px; padding: 12px 14px; background: var(--paper); border: 1px solid var(--line); border-radius: 12px; }
.tl-item > .mini { flex: none; } .exp li, .bk { cursor: default; }
.foot { text-align: center; color: var(--muted); font-size: 12px; padding: 28px 0 0; } .boot { padding-top: 40vh; }
.checks .tick { flex: none; }
@media (max-width: 600px) { .hero { min-height: 330px; justify-content: flex-start; gap: 12px; } .clocks { position: relative; top: 0; right: 0; order: -1; align-self: flex-end; } }
