/* 따뜻한 여행 감성: 크림 배경 + 로제 코랄 포인트 + 큰 둥근 카드 (앱 theme.dart 와 같은 색) */
:root {
  --cream: #FBF3EA; --ink: #3A2A26; --muted: #7A625A; --accent: #C44A42; --accent-dark: #8E2F29;
  --rose: #F8DAD3; --line: #F0E3D8; --card: #fff; --radius: 22px; --maxw: 720px;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--cream); color: var(--ink); font-family: 'Noto Sans KR', system-ui, sans-serif; font-size: 15px; line-height: 1.45; }
body.noscroll { overflow: hidden; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3 { margin: 0; }
.mi { font-family: 'Material Icons'; font-weight: normal; font-style: normal; font-size: 24px; line-height: 1; letter-spacing: normal; text-transform: none; display: inline-block; white-space: nowrap; direction: ltr; -webkit-font-smoothing: antialiased; user-select: none; vertical-align: middle; }
.grow { flex: 1; }
.muted { color: var(--muted); }
.pre { white-space: pre-wrap; }
.center { display: flex; align-items: center; justify-content: center; text-align: center; min-height: 40vh; padding: 24px; }
.spin { width: 36px; height: 36px; border-radius: 50%; border: 4px solid var(--rose); border-top-color: var(--accent); animation: sp .8s linear infinite; }
@keyframes sp { to { transform: rotate(360deg); } }

/* 레이아웃 */
.page { max-width: var(--maxw); margin: 0 auto; min-height: 100vh; padding-bottom: calc(110px + env(safe-area-inset-bottom)); }
.appbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 6px; padding: 10px 14px; background: var(--cream); }
.appbar h1 { font-family: 'Gowun Batang', serif; font-size: 22px; font-weight: 700; line-height: 1.2; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
main { padding: 4px 20px 0; }
.round { width: 44px; height: 44px; flex: none; border: 0; border-radius: 50%; background: #fff; display: inline-flex; align-items: center; justify-content: center; }
.round.plain { background: transparent; margin-left: -8px; }
.round:active { filter: brightness(.95); }

/* 카드·버튼·입력 */
.card { background: var(--card); border-radius: var(--radius); padding: 18px 20px; }
.btn { min-height: 48px; padding: 0 22px; border: 0; border-radius: 16px; background: var(--accent); color: #fff; font-weight: 700; }
.btn:disabled { opacity: .5; }
.btn.danger { background: #d32f2f; }
.btn.text { background: transparent; color: var(--accent); }
.btn.outline { background: transparent; color: var(--ink); border: 1px solid #E3CFC1; font-weight: 500; }
.btn.block { width: 100%; }
.btn.small { min-height: 38px; padding: 0 14px; border-radius: 12px; }
.field { display: block; margin-bottom: 14px; }
.field > span.lb { display: block; font-size: 13px; color: var(--muted); margin: 0 0 4px 4px; }
.in { width: 100%; min-height: 50px; padding: 12px 16px; border: 1.5px solid transparent; border-radius: 16px; background: #fff; outline: none; }
.in:focus { border-color: var(--accent); }
textarea.in { min-height: 90px; resize: vertical; }
.row { display: flex; gap: 10px; align-items: center; }
.row.wrap { flex-wrap: wrap; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { border: 0; border-radius: 999px; padding: 9px 16px; background: #fff; color: #5B443D; font-weight: 600; white-space: nowrap; }
.chip.on { background: var(--ink); color: #fff; }
.chip.sm { padding: 5px 11px; font-size: 13px; font-weight: 500; }
.scroll-x { display: flex; gap: 8px; overflow-x: auto; padding: 14px 0 4px; scrollbar-width: none; }
.scroll-x::-webkit-scrollbar { display: none; }
.tag { display: inline-block; padding: 2px 9px; border-radius: 999px; background: var(--rose); color: var(--accent-dark); font-size: 11px; font-weight: 700; }
.fab { position: fixed; right: max(20px, calc(50% - var(--maxw) / 2 + 20px)); bottom: calc(22px + env(safe-area-inset-bottom)); z-index: 15; border: 0; border-radius: 28px; background: var(--ink); color: #fff; font-weight: 700; padding: 0 22px; min-height: 56px; display: inline-flex; align-items: center; gap: 8px; box-shadow: 0 4px 14px rgba(0,0,0,.22); }
.fab.round-fab { width: 58px; padding: 0; justify-content: center; background: var(--accent); border-radius: 50%; }
.badge { display: flex; align-items: center; justify-content: center; flex: none; }
.sec-title { font-size: 15px; font-weight: 700; margin: 22px 4px 10px; }
.day-title { font-weight: 700; color: var(--accent); margin: 16px 4px 8px; }

/* 목록 카드 */
.hero { display: block; width: 100%; text-align: left; border: 0; position: relative; overflow: hidden; border-radius: 28px; background: var(--accent); color: #fff; padding: 22px; margin: 4px 0; }
.hero::before, .hero::after { content: ''; position: absolute; border-radius: 50%; background: rgba(255,255,255,.12); }
.hero::before { width: 190px; height: 190px; right: -50px; top: -60px; }
.hero::after { width: 130px; height: 130px; right: 40px; bottom: -70px; opacity: .85; }
.hero > * { position: relative; }
.hero .pill { display: inline-block; background: #fff; color: var(--accent-dark); font-size: 12px; font-weight: 700; padding: 5px 12px; border-radius: 999px; }
.hero h2 { font-family: 'Gowun Batang', serif; font-size: 28px; margin: 14px 0 4px; }
.hero hr { border: 0; height: 1px; background: rgba(255,255,255,.35); margin: 14px 0; }
.hero .big { font-size: 30px; font-weight: 700; }
.hero .sm { font-size: 12px; }
.due { background: var(--rose); border-radius: var(--radius); padding: 16px; margin-top: 12px; }
.due b { color: var(--accent-dark); }
.tile { display: flex; align-items: center; gap: 14px; width: 100%; text-align: left; border: 0; background: #fff; border-radius: var(--radius); padding: 14px 16px; margin-bottom: 12px; }
.tile .ti { width: 52px; height: 52px; border-radius: 18px; display: flex; align-items: center; justify-content: center; flex: none; }
.tile .mid { flex: 1; min-width: 0; }
.tile .mid b { display: block; font-size: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tile .mid small { color: var(--muted); font-size: 13px; }
.tile .end { text-align: right; flex: none; }
.tile .end b { font-size: 15px; display: block; }
.exp { position: relative; overflow: hidden; border-radius: 20px; margin-bottom: 10px; background: #fff; }
.exp > .tile { margin: 0; border-radius: 0; padding: 12px 16px; }
.exp .mid b { font-size: 15px; }
.exp .mid small { display: block; font-size: 12px; white-space: normal; }
.exp .del { position: absolute; right: 0; top: 0; bottom: 0; width: 56px; border: 0; background: #ef5350; color: #fff; display: none; }
.exp:hover .del, .exp.show-del .del { display: block; }
.stars { color: #f5a623; font-size: 12px; }
.bar { display: flex; height: 10px; border-radius: 5px; overflow: hidden; gap: 2px; margin-top: 14px; }
.legend { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 10px; font-size: 12px; color: #5B443D; }
.legend i { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; }
.total { font-size: 28px; font-weight: 700; }
hr.sep { border: 0; border-top: 1px solid var(--line); margin: 14px 0; }

/* 대화상자·시트·메뉴·토스트 */
.overlay { position: fixed; inset: 0; z-index: 100; background: rgba(40,25,20,.45); display: flex; align-items: center; justify-content: center; padding: 20px; }
.overlay .box { background: #fff; border-radius: 28px; padding: 24px; width: 100%; max-width: 440px; max-height: 88vh; overflow-y: auto; }
.overlay.sheet { align-items: flex-end; padding: 0; }
.overlay.sheet .box { max-width: var(--maxw); border-radius: 28px 28px 0 0; padding: 20px 18px calc(20px + env(safe-area-inset-bottom)); }
.overlay h3 { font-size: 19px; margin-bottom: 10px; }
.overlay p { margin: 0 0 14px; color: #5B443D; }
.actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 8px; }
.menu { position: fixed; z-index: 110; background: #fff; border-radius: 18px; padding: 8px 0; min-width: 220px; box-shadow: 0 6px 24px rgba(0,0,0,.18); }
.menu button { display: block; width: 100%; text-align: left; padding: 12px 18px; border: 0; background: none; }
.menu button:hover:not(:disabled) { background: var(--cream); }
.menu button:disabled { color: var(--muted); font-size: 12px; }
.menu button.danger { color: #d32f2f; }
.menu hr { border: 0; border-top: 1px solid var(--line); margin: 6px 0; }
#toast { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom)); transform: translate(-50%, 30px); opacity: 0; pointer-events: none; z-index: 200; background: var(--ink); color: #fff; padding: 13px 18px; border-radius: 16px; max-width: min(92vw, 520px); display: flex; gap: 14px; align-items: center; transition: .2s; }
#toast.show { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
.toast-act { border: 0; background: none; color: #ffb3a8; font-weight: 700; }

/* 로그인 */
.login { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding: 24px; text-align: center; }
.login img { width: 108px; height: 108px; border-radius: 28px; }
.login h1 { font-family: 'Gowun Batang', serif; font-size: 32px; }
.gbtn { display: inline-flex; align-items: center; gap: 10px; min-height: 52px; padding: 0 24px; border: 1px solid #E3CFC1; border-radius: 16px; background: #fff; font-weight: 700; }

/* 일정표·일정 계획·통계·보고서 */
.table-wrap { overflow-x: auto; margin: 0 -20px; padding: 0 20px 6px; }
table.grid { border-collapse: separate; border-spacing: 6px; min-width: 100%; }
table.grid th { font-size: 13px; padding: 8px 6px; background: #fff; border-radius: 12px; white-space: nowrap; }
table.grid th.slot { position: sticky; left: 0; z-index: 1; }
table.grid td { vertical-align: top; min-width: 150px; max-width: 220px; padding: 8px 10px; background: #fff; border-radius: 14px; font-size: 13px; cursor: pointer; }
table.grid td.empty { background: rgba(255,255,255,.55); color: #c7b3a8; text-align: center; }
table.grid td .amt { display: block; margin-top: 4px; font-weight: 700; color: var(--accent-dark); }
.timeline { position: relative; }
.step { display: flex; gap: 12px; padding: 12px 14px; background: #fff; border-radius: 18px; margin-bottom: 8px; align-items: center; }
.step .tm { width: 48px; font-weight: 700; color: var(--accent); flex: none; }
.bars { display: flex; align-items: flex-end; gap: 6px; height: 150px; padding-top: 10px; }
.bars .b { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; height: 100%; font-size: 11px; color: var(--muted); }
.bars .b i { display: block; width: 100%; max-width: 34px; background: var(--accent); border-radius: 8px 8px 2px 2px; min-height: 2px; }
.bars .b.prev i { background: #E3CFC1; }
.rep pre { white-space: pre-wrap; font-family: inherit; margin: 0; font-size: 14px; }
@media (min-width: 760px) { main { padding: 8px 28px 0; } }
@media print { .appbar, .fab { display: none; } }
