@font-face {
  font-family: "Google Sans";
  src: url("./fonts/google-sans-thai.woff2") format("woff2");
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  unicode-range: U+02D7, U+0303, U+0331, U+0E01-0E5B, U+200C-200D, U+25CC;
}

@font-face {
  font-family: "Google Sans";
  src: url("./fonts/google-sans-latin.woff2") format("woff2");
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --canvas: #f6f5ef;
  --paper: #fffefa;
  --ink: #20342f;
  --muted: #6e7a73;
  --line: #e6e8df;
  --green: #284b3e;
  --green-soft: #e4eee5;
  --accent: #db785c;
  --accent-soft: #fff0e9;
  --blue-soft: #e9eef3;
  --shadow: 0 18px 55px rgba(32, 52, 47, 0.065);
  font-family: "Google Sans", "Noto Sans Thai", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--canvas); color: var(--ink); }
button { font: inherit; }
button:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.app-shell { min-height: 100vh; display: grid; grid-template-columns: 244px minmax(0, 1fr); }
.sidebar { background: #fffefa; border-right: 1px solid var(--line); padding: 32px 19px 24px; display: flex; flex-direction: column; min-height: 100vh; }
.brand-block { display: flex; align-items: center; gap: 11px; padding: 0 10px; margin-bottom: 62px; }
.brand-mark { width: 39px; height: 39px; display: grid; place-items: center; color: white; background: var(--accent); border-radius: 13px; font-weight: 800; font-size: 23px; line-height: 1; }
.brand-name { font-size: 29px; line-height: .89; font-weight: 800; letter-spacing: -.08em; }
.brand-dot { color: var(--accent); }
.brand-byline { margin-top: 6px; color: #87938b; font-size: 10px; letter-spacing: .14em; font-weight: 700; }
.sidebar-label { margin: 0 13px 13px; font-size: 10px; letter-spacing: .14em; color: #a2aaa3; font-weight: 800; }
.main-nav { display: grid; gap: 5px; }
.nav-item { width: 100%; display: flex; align-items: center; gap: 13px; border: 0; background: transparent; padding: 12px 13px; border-radius: 11px; text-align: left; color: #66756d; cursor: pointer; font-size: 13px; font-weight: 650; }
.nav-item:hover, .nav-item.is-active { background: var(--green-soft); color: var(--green); }
.nav-icon { width: 20px; text-align: center; font-size: 18px; line-height: 1; }
.sidebar-note { margin: auto 2px 0; padding: 18px 17px; border-radius: 15px; background: #f3f6ed; }
.note-spark { color: #87a06e; font-size: 20px; }
.sidebar-note strong { display: block; margin: 7px 0 4px; font-size: 12px; }
.sidebar-note p { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.6; }
.sidebar-footer { margin: 24px 11px 0; color: #a2aaa3; font-size: 10px; }
.main-column { min-width: 0; }
.topbar { height: 75px; padding: 0 40px; display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid var(--line); background: rgba(255, 254, 250, .72); }
.breadcrumb { color: #8a958c; font-size: 12px; font-weight: 600; }
.breadcrumb span { margin: 0 10px; color: #bdc5bc; }
.topbar-right { display: flex; align-items: center; gap: 18px; }
.sample-pill { padding: 7px 10px; border: 1px solid #e8d9cf; border-radius: 999px; color: #bc806c; background: #fff8f3; font-size: 9px; font-weight: 800; letter-spacing: .12em; }
.avatar { display: grid; place-items: center; height: 31px; width: 31px; border-radius: 50%; color: var(--green); background: #dce9dc; font-size: 12px; font-weight: 800; }
main { max-width: 1380px; margin: 0 auto; padding: 38px 40px 80px; }
.eyebrow { color: var(--accent); font-size: 10px; letter-spacing: .16em; font-weight: 850; text-transform: uppercase; }
.page-title { margin: 10px 0 6px; font-size: clamp(28px, 3.4vw, 40px); line-height: 1.12; letter-spacing: -.05em; }
.page-subtitle { color: var(--muted); font-size: 13px; margin: 0; line-height: 1.65; }
.page-heading { display: flex; justify-content: space-between; gap: 20px; align-items: end; margin-bottom: 28px; }
.ghost-button { border: 1px solid #d8ded4; background: var(--paper); color: var(--green); padding: 10px 15px; border-radius: 10px; font-size: 12px; font-weight: 750; cursor: pointer; white-space: nowrap; }
.ghost-button:hover { border-color: var(--green); }
.trip-hero { background: var(--green); border-radius: 19px; padding: 27px 32px 29px; color: white; display: flex; justify-content: space-between; gap: 25px; position: relative; overflow: hidden; box-shadow: var(--shadow); }
.trip-hero::before { content: ""; position: absolute; width: 310px; height: 310px; right: -55px; top: -150px; border: 1px solid rgba(255,255,255,.14); border-radius: 50%; box-shadow: 0 0 0 50px rgba(255,255,255,.035), 0 0 0 100px rgba(255,255,255,.025); }
.trip-hero > * { position: relative; }
.hero-kicker { color: #afcab5; letter-spacing: .14em; font-size: 10px; font-weight: 800; }
.trip-hero h2 { margin: 9px 0 8px; font-size: 28px; letter-spacing: -.04em; }
.trip-hero p { color: #c6d6cc; margin: 0; font-size: 12px; }
.hero-stats { display: flex; gap: 32px; align-items: end; }
.hero-stat strong { display: block; font-size: 22px; letter-spacing: -.04em; }
.hero-stat span { color: #b5cbba; font-size: 10px; }
.section-heading { margin: 31px 0 15px; display: flex; align-items: end; justify-content: space-between; gap: 12px; }
.section-heading h2 { margin: 0; font-size: 19px; letter-spacing: -.035em; }
.section-heading p { margin: 4px 0 0; color: var(--muted); font-size: 11px; }
.section-link { color: var(--green); background: none; border: 0; cursor: pointer; font-size: 11px; font-weight: 800; }
.day-list { display: grid; gap: 9px; }
.day-card { display: grid; grid-template-columns: 90px minmax(155px, 1.3fr) minmax(130px, 1fr) minmax(145px, 1fr) minmax(115px, .8fr) 22px; align-items: center; gap: 17px; padding: 17px 19px; background: var(--paper); border: 1px solid var(--line); border-radius: 13px; box-shadow: 0 4px 13px rgba(32,52,47,.025); cursor: pointer; text-align: left; color: inherit; width: 100%; }
.day-card:hover, .day-card:focus-visible { border-color: #a7bdab; box-shadow: 0 7px 22px rgba(32,52,47,.08); }
.day-number { display: block; color: #a2aca3; font-size: 10px; letter-spacing: .08em; text-transform: uppercase; font-weight: 850; }
.day-area { display: block; margin-top: 5px; font-size: 18px; font-weight: 800; letter-spacing: -.04em; }
.cell-label { display: block; color: #9ba59c; font-size: 10px; font-weight: 850; letter-spacing: .04em; text-transform: uppercase; margin-bottom: 5px; }
.cell-value { display: block; color: #344940; font-size: 12px; font-weight: 650; line-height: 1.5; }
.card-chevron { color: #b7c5b8; font-size: 21px; }
.bottom-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 17px; }
.mini-panel, .content-panel { background: var(--paper); border: 1px solid var(--line); border-radius: 16px; padding: 23px 25px; box-shadow: var(--shadow); }
.panel-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.panel-top h3, .content-panel h2 { margin: 0; font-size: 15px; letter-spacing: -.025em; }
.panel-kicker { font-size: 10px; color: var(--accent); font-weight: 800; }
.mini-progress { margin-top: 18px; height: 7px; border-radius: 10px; background: #e8ede6; overflow: hidden; }
.mini-progress > span { display: block; width: 60%; height: 100%; background: #8fad8d; border-radius: inherit; }
.panel-foot { display: flex; justify-content: space-between; margin-top: 11px; color: var(--muted); font-size: 11px; }
.money-figure { margin: 19px 0 3px; font-size: 24px; font-weight: 850; letter-spacing: -.04em; }
.money-note { color: var(--muted); font-size: 11px; }
.day-selector { display: flex; gap: 8px; overflow-x: auto; padding: 2px 0 14px; }
.day-choice { flex: 0 0 auto; min-width: 100px; background: var(--paper); border: 1px solid var(--line); border-radius: 11px; padding: 10px 12px; cursor: pointer; color: var(--muted); text-align: left; }
.day-choice strong { display: block; margin-top: 3px; color: var(--ink); font-size: 12px; }
.day-choice span { font-size: 9px; text-transform: uppercase; letter-spacing: .1em; font-weight: 800; }
.day-choice.is-active { background: var(--green); border-color: var(--green); color: #b9d2be; }
.day-choice.is-active strong { color: white; }
.detail-head { margin-top: 8px; display: flex; align-items: end; justify-content: space-between; gap: 20px; }
.detail-head h2 { margin: 5px 0 3px; font-size: 28px; letter-spacing: -.05em; }
.detail-head p { color: var(--muted); margin: 0; font-size: 12px; }
.transport-chip { display: inline-flex; align-items: center; gap: 8px; padding: 9px 12px; border-radius: 999px; background: var(--blue-soft); color: #557087; font-size: 11px; font-weight: 750; white-space: nowrap; }
.detail-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(245px, .8fr); gap: 17px; margin-top: 22px; }
.content-panel h2 { margin-bottom: 19px; }
.plan-item { display: grid; grid-template-columns: 58px 1fr; gap: 16px; padding: 16px 0; border-top: 1px solid var(--line); }
.plan-item:first-of-type { border-top: 0; padding-top: 0; }
.plan-time { color: #9ba69d; font-size: 11px; font-weight: 800; }
.plan-item strong { display: block; font-size: 13px; }
.plan-item p { margin: 5px 0 0; color: var(--muted); font-size: 11px; line-height: 1.55; }
.detail-stack { display: grid; gap: 17px; align-content: start; }
.soft-panel { background: #f5f7f0; border: 1px solid #e9eee4; border-radius: 13px; padding: 18px; }
.soft-panel.coral { background: #fff5ee; border-color: #fae6d9; }
.soft-panel.blue { background: #f1f5f7; border-color: #e3ebef; }
.soft-panel .cell-label { margin-bottom: 8px; }
.soft-panel strong { display: block; font-size: 13px; line-height: 1.5; }
.soft-panel p { color: var(--muted); font-size: 11px; margin: 6px 0 0; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 17px; }
.list-row { display: flex; gap: 12px; align-items: flex-start; padding: 13px 0; border-top: 1px solid var(--line); }
.list-row:first-of-type { border-top: 0; padding-top: 0; }
.check { appearance: none; flex: 0 0 17px; height: 17px; width: 17px; border: 1.5px solid #adbab0; border-radius: 5px; margin: 1px 0 0; cursor: pointer; }
.check:checked { background: var(--green); border-color: var(--green); }
.check:checked::after { content: "✓"; display: block; text-align: center; color: white; font-size: 12px; line-height: 14px; }
.row-main { flex: 1; }
.row-main strong { display: block; font-size: 12px; }
.row-main small { display: block; color: var(--muted); font-size: 10px; margin-top: 4px; }
.status { margin-left: auto; flex: 0 0 auto; font-size: 9px; font-weight: 850; text-transform: uppercase; letter-spacing: .06em; padding: 5px 8px; border-radius: 999px; background: var(--green-soft); color: #538063; }
.status.pending { background: var(--accent-soft); color: #bc795e; }
.idea-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.idea-tags span { background: #f3f5ef; border: 1px solid #e4eadf; border-radius: 999px; padding: 8px 10px; color: #667a69; font-size: 10px; font-weight: 650; }
.summary-row { display: flex; justify-content: space-between; align-items: center; padding: 14px 0; border-top: 1px solid var(--line); gap: 12px; }
.summary-row:first-of-type { border-top: 0; padding-top: 0; }
.summary-row strong { font-size: 12px; }
.summary-row small { color: var(--muted); font-size: 10px; display: block; margin-top: 3px; }
.summary-values { text-align: right; }
.summary-values strong { display: block; font-size: 13px; }
.summary-values small { color: #a0a99f; }
.budget-banner { display: grid; grid-template-columns: repeat(3, 1fr); gap: 13px; margin-bottom: 18px; }
.budget-stat { padding: 18px 20px; background: var(--paper); border: 1px solid var(--line); border-radius: 14px; }
.budget-stat span { color: var(--muted); font-size: 10px; font-weight: 700; }
.budget-stat strong { display: block; font-size: 23px; margin-top: 5px; letter-spacing: -.04em; }
.budget-stat small { color: #a0a99f; font-size: 10px; }
.notice { margin-top: 18px; padding: 12px 14px; border-radius: 10px; background: #eef3ef; color: #587265; font-size: 11px; line-height: 1.5; }
.prototype-note { margin-top: 22px; color: #9ba59d; font-size: 10px; line-height: 1.6; }
@media (max-width: 850px) {
  .app-shell { display: block; }
  .sidebar { min-height: auto; padding: 16px 19px 12px; border-right: 0; border-bottom: 1px solid var(--line); }
  .brand-block { margin: 0 0 14px; padding: 0; }
  .sidebar-label, .sidebar-note, .sidebar-footer { display: none; }
  .main-nav { display: flex; gap: 4px; overflow-x: auto; }
  .nav-item { width: auto; flex: 0 0 auto; padding: 9px 11px; white-space: nowrap; font-size: 11px; }
  .nav-icon { font-size: 14px; width: auto; }
  .topbar { height: 54px; padding: 0 21px; }
  main { padding: 27px 20px 60px; }
  .day-card { grid-template-columns: 82px 1fr; gap: 10px 14px; align-items: start; }
  .day-card > div:first-child { grid-row: 1 / span 4; }
  .day-card .food-cell, .day-card .outfit-cell, .day-card .transport-cell { grid-column: 2; }
  .day-card .card-chevron { display: none; }
  .detail-grid { grid-template-columns: 1fr; }
}
@media (max-width: 590px) {
  .brand-name { font-size: 24px; }
  .brand-mark { width: 33px; height: 33px; font-size: 19px; }
  .nav-item { font-size: 11px; }
  .nav-item span:last-child { display: inline; }
  .breadcrumb { font-size: 10px; }
  .sample-pill { font-size: 8px; padding: 5px 7px; }
  .avatar { display: none; }
  .page-heading { align-items: start; }
  .page-heading .ghost-button { display: none; }
  .trip-hero { display: block; padding: 25px; }
  .hero-stats { margin-top: 27px; justify-content: space-between; gap: 8px; }
  .hero-stat strong { font-size: 19px; }
  .bottom-grid, .two-col, .budget-banner { grid-template-columns: 1fr; }
  .day-card { padding: 14px; }
  .detail-head { display: block; }
  .transport-chip { margin-top: 13px; }
}

.edit-panel { margin-top: 20px; }
.panel-heading { display: flex; align-items: start; justify-content: space-between; gap: 14px; margin-bottom: 17px; }
.panel-heading h2 { margin: 0; }
.panel-heading p { margin: 5px 0 0; color: var(--muted); font-size: 11px; }
.edit-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px 16px; }
.edit-field { display: grid; align-content: start; gap: 7px; min-width: 0; }
.edit-field > span { color: var(--muted); font-size: 11px; font-weight: 750; }
.edit-field input, .edit-field textarea, .edit-field select { width: 100%; min-width: 0; border: 1px solid #dce4d9; border-radius: 10px; background: #fff; color: var(--ink); padding: 11px 12px; font: inherit; font-size: 13px; outline: none; }
.edit-field textarea { resize: vertical; line-height: 1.5; }
.edit-field input:focus, .edit-field textarea:focus, .edit-field select:focus { border-color: #80a18d; box-shadow: 0 0 0 3px rgba(80,130,95,.13); }
.edit-field input::placeholder, .edit-field textarea::placeholder { color: #a8b2a9; }
.field-wide { grid-column: 1 / -1; }
.editable-list { display: grid; gap: 12px; }
.editable-item { border-top: 1px solid var(--line); padding: 17px 0 6px; }
.editable-item:first-child { border-top: 0; padding-top: 0; }
.editable-item .text-button { margin-top: 10px; }
.text-button { border: 0; background: none; color: var(--green); font: inherit; font-size: 11px; font-weight: 800; cursor: pointer; padding: 3px 0; white-space: nowrap; }
.text-button:hover { text-decoration: underline; }
.text-button.danger { color: #b76555; }
.text-button:disabled { opacity: .35; cursor: default; text-decoration: none; }
.empty-value, .empty-hint { color: #9ba69d; }
.empty-hint { font-size: 12px; margin: 10px 0; }
.idea-edit-list { display: grid; gap: 10px; }
.idea-edit { display: flex; gap: 12px; align-items: end; }
.idea-edit .edit-field { flex: 1; }
.idea-edit .text-button { margin-bottom: 12px; }
.expense-grid { grid-template-columns: minmax(180px, 2fr) minmax(95px, .8fr) repeat(2, minmax(110px, 1fr)); }
.budget-secondary { color: var(--muted); font-size: 11px; line-height: 1.7; margin-top: 9px; }
@media (max-width: 850px) { .expense-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 590px) { .edit-grid, .expense-grid { grid-template-columns: 1fr; } .panel-heading { flex-wrap: wrap; } .sample-pill { max-width: 160px; text-align: center; } }

.logout-button { border: 0; background: none; color: var(--green); font: inherit; font-size: 11px; font-weight: 800; cursor: pointer; }
.auth-card { max-width: 440px; margin: 60px auto; padding: 35px; border: 1px solid var(--line); border-radius: 22px; background: var(--paper); box-shadow: var(--shadow); }
.auth-card h1 { margin: 8px 0; font-size: 30px; }
.auth-card p { color: var(--muted); font-size: 13px; line-height: 1.7; }
.auth-card form { display: grid; gap: 16px; margin-top: 25px; }
.login-button { border: 0; border-radius: 11px; background: var(--green); color: white; padding: 13px; font: inherit; font-weight: 800; cursor: pointer; }
.login-button:disabled { opacity: .6; cursor: wait; }
.auth-card .form-error { color: #ae5747; }
.auth-card .auth-note { margin-top: 22px; font-size: 11px; }
.is-logged-out .main-nav { opacity: .4; }
.is-logged-out #logout-button { display: none; }
@media (max-width: 590px) { .auth-card { margin: 25px auto; padding: 26px; } .logout-button { font-size: 10px; } }

.logout-button:disabled { opacity: .4; cursor: default; }
