:root {
  --brand: #0e7c86; --brand-ink: #0a5960; --brand-soft: #e6f4f4; --brand-line: #bfe0e2; --sky: #f0f8f8;
  --ink: #10292b; --ink-2: #4b6264; --ink-3: #86a0a2;
  --bg: #ffffff; --paper: #f4f9f9; --line: #e2ecec;
  --cream: #e9f5f5; --butter: #dcefef; --sage: #e7f6f4; --stone: #f0f2f7;
  --ok: #2f6b3a; --ok-soft: #e7f1e8;
  --r: 14px; --serif: 'Plus Jakarta Sans', system-ui, sans-serif; --sans: 'Plus Jakarta Sans', system-ui, sans-serif;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.45 var(--sans); }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; }
a { color: var(--brand); }
h1, h2, h3 { font-family: var(--serif); font-weight: 800; letter-spacing: -0.03em; margin: 0; }
h1 { font-size: 30px; line-height: 1.1; }
h2 { font-size: 21px; }
h3 { font-size: 17px; }
.muted { color: var(--ink-3); }
.small { font-size: 13px; }
.tag { display: inline-block; font-size: 11.5px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-3); }
.red { color: var(--brand); }
.row { display: flex; align-items: center; gap: 10px; }
.between { justify-content: space-between; }
.grow { flex: 1; min-width: 0; }
.hidden { display: none !important; }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 46px; padding: 0 20px; border-radius: 12px; font-weight: 700; background: var(--brand); color: #fff; transition: background .15s, transform .08s; }
.btn:active { transform: scale(.98); }
.btn:hover { background: var(--brand-ink); }
.btn.block { width: 100%; }
.btn.ghost { background: var(--bg); color: var(--ink); border: 1.5px solid var(--line); }
.btn.ghost:hover { border-color: var(--ink-3); }
.btn.soft { background: var(--brand-soft); color: var(--brand); }
.btn.sm { height: 36px; padding: 0 14px; font-size: 13.5px; border-radius: 10px; }
.btn:disabled { opacity: .45; pointer-events: none; }
.link { color: var(--brand); font-weight: 700; font-size: 14px; }

/* forms */
label.f { display: block; margin-bottom: 14px; }
label.f > span { display: block; font-size: 13px; font-weight: 600; color: var(--ink-2); margin-bottom: 6px; }
.in { width: 100%; height: 48px; padding: 0 14px; border: 1.5px solid var(--line); border-radius: 12px; background: var(--bg); outline: none; transition: border-color .15s; }
textarea.in { height: auto; padding: 12px 14px; resize: vertical; }
.in:focus { border-color: var(--brand); }

/* segmented + chips */
.seg { display: flex; background: var(--paper); border: 1px solid var(--line); border-radius: 12px; padding: 4px; gap: 4px; }
.seg button { flex: 1; height: 38px; border-radius: 9px; font-weight: 600; font-size: 14px; color: var(--ink-2); }
.seg button.on { background: var(--bg); color: var(--brand); box-shadow: 0 0 0 1px var(--brand-line); }
.chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; height: 36px; padding: 0 14px; border-radius: 999px; border: 1.5px solid var(--line); font-weight: 600; font-size: 13.5px; color: var(--ink-2); background: var(--bg); }
.chip.on { border-color: var(--brand); color: var(--brand); background: var(--brand-soft); }
.daypick { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.daypick button { height: 40px; border-radius: 10px; border: 1.5px solid var(--line); font-weight: 700; font-size: 13px; color: var(--ink-2); }
.daypick button.on { background: var(--brand); border-color: var(--brand); color: #fff; }

/* stepper */
.step { display: inline-flex; align-items: center; border: 1.5px solid var(--brand); border-radius: 10px; height: 36px; overflow: hidden; background: var(--bg); }
.step button { width: 34px; height: 100%; color: var(--brand); font-size: 19px; font-weight: 700; }
.step button:active { background: var(--brand-soft); }
.step b { min-width: 22px; text-align: center; font-size: 14.5px; color: var(--brand); }
.add { height: 36px; padding: 0 18px; border-radius: 10px; border: 1.5px solid var(--brand); color: var(--brand); font-weight: 800; font-size: 13.5px; letter-spacing: .03em; background: var(--bg); }
.add:active { background: var(--brand-soft); }

/* cards + lists */
.card { border: 1px solid var(--line); border-radius: var(--r); background: var(--bg); padding: 16px; }
.card.paper { background: var(--paper); }
.list > * + * { border-top: 1px solid var(--line); }
.item { display: flex; gap: 12px; align-items: center; padding: 12px 0; }
.thumb { flex: none; width: 56px; height: 56px; border-radius: 14px; display: grid; place-items: center; }
.thumb svg { width: 48px; height: 48px; }
.tone-cream { background: var(--cream); } .tone-butter { background: var(--butter); } .tone-sage { background: var(--sage); } .tone-stone { background: var(--stone); }
.badge { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 6px; font-size: 11.5px; font-weight: 700; background: var(--paper); color: var(--ink-2); }
.badge.red { background: var(--brand-soft); color: var(--brand); }
.badge.ok { background: var(--ok-soft); color: var(--ok); }

/* sheet */
.scrim { position: fixed; inset: 0; background: rgba(16, 41, 43, .45); z-index: 50; opacity: 0; transition: opacity .2s; }
.scrim.open { opacity: 1; }
.sheet { position: fixed; left: 50%; bottom: 0; width: 100%; max-width: 520px; transform: translate(-50%, 100%); background: var(--bg); border-radius: 22px 22px 0 0; z-index: 51; max-height: 92vh; display: flex; flex-direction: column; transition: transform .26s cubic-bezier(.2, .8, .2, 1); }
.sheet.open { transform: translate(-50%, 0); }
.sheet .grab { width: 40px; height: 4px; border-radius: 4px; background: var(--line); margin: 10px auto 0; flex: none; }
.sheet .hd { padding: 14px 20px 6px; display: flex; align-items: center; justify-content: space-between; flex: none; }
.sheet .bd { padding: 8px 20px 20px; overflow-y: auto; }
.sheet .ft { padding: 12px 20px calc(14px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); flex: none; }
.x { width: 34px; height: 34px; border-radius: 50%; background: var(--paper); display: grid; place-items: center; font-size: 18px; color: var(--ink-2); }

/* toast */
.toast { position: fixed; left: 50%; top: 16px; transform: translate(-50%, -80px); background: var(--ink); color: #fff; padding: 11px 18px; border-radius: 12px; font-weight: 600; font-size: 14px; z-index: 99; transition: transform .25s; max-width: calc(100% - 32px); }
.toast.show { transform: translate(-50%, 0); }
.toast.err { background: var(--brand); }

.empty { text-align: center; padding: 36px 16px; color: var(--ink-3); }
.empty svg { width: 54px; height: 54px; margin-bottom: 8px; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* ---------- motion ---------- */
:root { --spring: cubic-bezier(.34, 1.56, .64, 1); --ease: cubic-bezier(.2, .8, .2, 1); }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes pop { 0% { transform: scale(1); } 40% { transform: scale(1.28); } 100% { transform: scale(1); } }
@keyframes bump { 0% { transform: translateX(-50%) scale(1); } 35% { transform: translateX(-50%) scale(1.04); } 100% { transform: translateX(-50%) scale(1); } }
@keyframes barIn { from { opacity: 0; transform: translate(-50%, 30px) scale(.96); } to { opacity: 1; transform: translate(-50%, 0) scale(1); } }
@keyframes shimmer { from { background-position: -320px 0; } to { background-position: 320px 0; } }
@keyframes wave { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@keyframes fill { from { transform: translateY(30px); } }
@keyframes drop { 0% { transform: translateY(-6px); opacity: 0; } 30% { opacity: 1; } 100% { transform: translateY(16px); opacity: 0; } }
@keyframes check { from { stroke-dashoffset: 30; } to { stroke-dashoffset: 0; } }
@keyframes slideL { from { opacity: 0; transform: translateX(28px); } to { opacity: 1; transform: none; } }
@keyframes slideR { from { opacity: 0; transform: translateX(-28px); } to { opacity: 1; transform: none; } }

.stagger > * { animation: rise .5s var(--ease) both; animation-delay: calc(var(--i, 0) * 55ms); }
.view-l { animation: slideL .36s var(--ease) both; }
.view-r { animation: slideR .36s var(--ease) both; }
.btn, .add, .chip, .seg button, .opt, .wd, .cd, .pc, .step button, nav.tabs button { transition: transform .18s var(--spring), background .18s, border-color .18s, color .18s, box-shadow .18s; }
.btn:active, .add:active, .chip:active, .wd:active, .cd:active, .opt:active { transform: scale(.95); }
.pc:active { transform: scale(.98); }
.step b.pop, .pop { animation: pop .32s var(--spring); }
.seg button.on, .chip.on { animation: pop .3s var(--spring); }
.sheet { transition: transform .42s var(--spring); }
.sheet .bd > * { animation: rise .45s var(--ease) both; animation-delay: .08s; }
.toast { transition: transform .4s var(--spring); }
.skel { border-radius: 14px; background: linear-gradient(90deg, var(--paper) 0, #e3f0f0 50%, var(--paper) 100%); background-size: 640px 100%; animation: shimmer 1.2s linear infinite; }
.fly { position: fixed; z-index: 98; width: 14px; height: 14px; border-radius: 50%; background: var(--brand); pointer-events: none; transition: transform .6s cubic-bezier(.5, -0.3, .7, 1), opacity .6s; }
@media (hover: hover) {
  .pc:hover { transform: translateY(-3px); box-shadow: 0 10px 24px -14px rgba(14, 124, 134, .35); }
  .wd:hover, .chip:hover { border-color: var(--brand-line); }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; } }
