:root {
  color-scheme: light;
  --ink: #17251f;
  --ink-soft: #33483f;
  --muted: #68766f;
  --muted-2: #8a968f;
  --paper: #f3f6f2;
  --paper-warm: #f7f5ef;
  --card: #ffffff;
  --surface: #e8f0ea;
  --surface-strong: #dce9df;
  --line: #dfe6e1;
  --green: #1f634a;
  --green-dark: #154735;
  --green-light: #6e9683;
  --orange: #d4864b;
  --orange-soft: #fff0e3;
  --blue: #4d7786;
  --blue-soft: #e4eff2;
  --red: #b64e45;
  --red-soft: #f9e9e6;
  --shadow-card: 0 10px 28px rgba(33, 64, 51, .075), 0 2px 7px rgba(33, 64, 51, .035);
  --shadow-float: 0 18px 42px rgba(26, 66, 49, .22);
  --radius-xl: 26px;
  --radius-lg: 21px;
  --radius-md: 16px;
  --radius-sm: 12px;
  --motion-fast: 150ms;
  --motion-normal: 210ms;
}

* { box-sizing: border-box; }
html { min-height: 100%; background: #dfe5df; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100%;
  background: #dfe5df;
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC", Roboto, "Noto Sans CJK SC", "Microsoft YaHei", sans-serif;
  font-size: 16px;
  line-height: 1.5;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}
.native-app { overscroll-behavior-y: none; -webkit-tap-highlight-color: transparent; }
button, input, textarea, select { font: inherit; }
button { color: inherit; -webkit-tap-highlight-color: transparent; }
button:not(:disabled), [data-open-trip], [data-open-day], [data-open-event], [data-open-document], [data-go] { cursor: pointer; }
button:disabled { cursor: not-allowed; }
button, .trip-card, .day-card, .event-card, .ticket, .doc-card {
  transition: transform var(--motion-fast) ease, box-shadow var(--motion-normal) ease, background-color var(--motion-normal) ease, border-color var(--motion-normal) ease, opacity var(--motion-fast) ease;
}
button:not(:disabled):active, .trip-card:active, .day-card:active, .event-card:active, .ticket:active, .doc-card:active { transform: scale(.975); }
button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible, [tabindex]:focus-visible {
  outline: 3px solid rgba(31, 99, 74, .2);
  outline-offset: 2px;
}
.ui-icon { display: block; width: 1.25em; height: 1.25em; flex: 0 0 auto; }

.app-shell {
  width: min(100%, 440px);
  min-height: 100dvh;
  margin: 0 auto;
  overflow: hidden;
  background: var(--paper);
  box-shadow: 0 0 70px rgba(22, 44, 35, .14);
}
#app { min-height: 100dvh; padding-bottom: calc(96px + env(safe-area-inset-bottom)); }
.page {
  min-height: 100dvh;
  overflow: hidden;
  background:
    radial-gradient(circle at 100% 0, rgba(200, 218, 206, .36), transparent 270px),
    linear-gradient(180deg, #f7f8f5 0, var(--paper) 260px);
  animation: page-enter var(--motion-normal) cubic-bezier(.2, .7, .25, 1) both;
}
@keyframes page-enter { from { opacity: .35; transform: translateY(7px); } to { opacity: 1; transform: none; } }

.topbar {
  position: relative;
  z-index: 4;
  padding: max(22px, env(safe-area-inset-top)) 18px 16px;
}
.topline { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 48px; }
.title-wrap { flex: 1; min-width: 0; }
.eyebrow {
  margin: 0 0 3px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
  letter-spacing: .055em;
  line-height: 1.3;
}
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 0; font-size: 28px; line-height: 1.15; letter-spacing: -.035em; font-weight: 780; }
h2 { font-size: 22px; line-height: 1.25; letter-spacing: -.02em; }
h3 { margin-bottom: 8px; font-size: 17px; line-height: 1.35; }
.title-wrap h1 { overflow: hidden; font-size: 25px; text-overflow: ellipsis; white-space: nowrap; }
.muted { color: var(--muted); font-size: 14px; line-height: 1.7; }
.icon-btn, .back-btn {
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border: 1px solid rgba(221, 229, 223, .9);
  border-radius: 15px;
  background: rgba(255, 255, 255, .88);
  box-shadow: 0 6px 18px rgba(38, 67, 55, .075);
}
.icon-btn .ui-icon, .back-btn .ui-icon { width: 21px; height: 21px; }

.content { padding: 0 16px; }
.section-label { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 24px 4px 11px; }
.section-label strong { font-size: 15px; }
.section-label span { color: var(--muted); font-size: 12px; }

.hero-card {
  position: relative;
  min-height: 226px;
  padding: 24px;
  overflow: hidden;
  border-radius: 30px;
  color: #fff;
  background:
    radial-gradient(circle at 83% 18%, rgba(255, 255, 255, .18), transparent 25%),
    radial-gradient(circle at 100% 120%, rgba(224, 153, 93, .82), transparent 43%),
    linear-gradient(145deg, #173f32 0%, #28634c 55%, #54806b 100%);
  box-shadow: 0 20px 44px rgba(28, 77, 57, .25);
}
.hero-card::before, .hero-card::after { content: ""; position: absolute; pointer-events: none; border-radius: 50%; }
.hero-card::before { width: 180px; height: 180px; top: -102px; right: -45px; border: 34px solid rgba(255, 255, 255, .07); }
.hero-card::after { width: 150px; height: 90px; right: -25px; bottom: -35px; background: rgba(255, 255, 255, .06); transform: rotate(-18deg); }
.hero-card h2 { position: relative; z-index: 1; max-width: 300px; margin: 15px 0 10px; font-size: 27px; line-height: 1.24; }
.hero-card > p { position: relative; z-index: 1; margin: 0; color: rgba(255, 255, 255, .82); font-size: 14px; }
.trip-meta { position: relative; z-index: 1; display: flex; gap: 8px; flex-wrap: wrap; }
.chip { padding: 7px 11px; border: 1px solid rgba(255, 255, 255, .12); border-radius: 999px; background: rgba(255, 255, 255, .13); font-size: 12px; font-weight: 650; backdrop-filter: blur(8px); }
.progress { position: absolute; z-index: 1; right: 24px; bottom: 22px; left: 24px; }
.progress p { margin: 0; color: rgba(255, 255, 255, .8); font-size: 12px; }
.progress-line { height: 6px; margin-top: 9px; overflow: hidden; border-radius: 99px; background: rgba(255, 255, 255, .2); }
.progress-line i { display: block; width: 75%; height: 100%; border-radius: inherit; background: #fff; box-shadow: 0 0 10px rgba(255, 255, 255, .35); }

.trip-card, .day-card, .event-card, .panel {
  border: 1px solid rgba(220, 228, 222, .88);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, .94);
  box-shadow: var(--shadow-card);
}
.trip-card { display: flex; align-items: center; gap: 14px; min-height: 88px; margin-bottom: 11px; padding: 14px; }
.trip-card:hover, .day-card:hover, .event-card:hover { border-color: #cfdbd3; box-shadow: 0 14px 32px rgba(33, 64, 51, .1); }
.trip-thumb {
  width: 62px;
  height: 62px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 19px;
  color: var(--green-dark);
  background: linear-gradient(145deg, #dbe9df, #f1dfc8);
}
.trip-thumb .ui-icon { width: 28px; height: 28px; }
.trip-card h3 { margin-bottom: 4px; }
.trip-card p { margin: 0; color: var(--muted); font-size: 13px; }
.chev, .doc-chevron, .event-chevron { margin-left: auto; color: var(--muted-2); }
.chev .ui-icon, .doc-chevron .ui-icon, .event-chevron .ui-icon { width: 18px; height: 18px; }

.fab {
  position: fixed;
  z-index: 7;
  right: max(18px, calc((100vw - 440px) / 2 + 18px));
  bottom: calc(22px + env(safe-area-inset-bottom));
  width: 60px;
  height: 60px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 21px;
  color: #fff;
  background: linear-gradient(145deg, #256b51, #194c39);
  box-shadow: var(--shadow-float);
}
.fab .ui-icon { width: 27px; height: 27px; transition: transform var(--motion-normal) ease; }
.fab:active .ui-icon { transform: rotate(45deg); }

.empty-state { min-height: 390px; margin: 18px 0 0 !important; padding: 42px 24px !important; display: flex; flex-direction: column; justify-content: center; text-align: center; }
.empty-emoji, .empty-day > span {
  width: 76px;
  height: 76px;
  display: grid;
  place-items: center;
  margin: 0 auto 18px;
  border-radius: 25px;
  color: var(--green);
  background: linear-gradient(145deg, var(--surface), #f4e7d7);
  box-shadow: inset 0 0 0 1px rgba(31, 99, 74, .06);
}
.empty-emoji .ui-icon, .empty-day > span .ui-icon { width: 34px; height: 34px; }
.empty-state h2 { margin: 0 0 10px; font-size: 24px; }
.empty-state p { margin: 0 auto; max-width: 310px; color: var(--muted); font-size: 15px; line-height: 1.75; }
.empty-actions { display: grid; gap: 11px; margin-top: 24px; }

.primary-btn, .secondary-btn, .form-primary, .primary-bottom, .upload-button {
  min-height: 50px;
  border: 0;
  border-radius: 15px;
  font-size: 15px;
  font-weight: 740;
}
.primary-btn, .form-primary, .primary-bottom, .upload-button { color: #fff; background: linear-gradient(135deg, #286d53, var(--green)); }
.secondary-btn { color: var(--green-dark); background: var(--surface); }
.primary-btn, .secondary-btn { padding: 13px 16px; }

.summary-strip {
  position: relative;
  margin: 0 16px 18px;
  padding: 18px 19px;
  overflow: hidden;
  border: 1px solid rgba(31, 99, 74, .08);
  border-radius: 20px;
  background: linear-gradient(135deg, #e1ece4, #eef2ea);
}
.summary-strip::after { content: ""; position: absolute; width: 100px; height: 100px; top: -55px; right: -20px; border-radius: 50%; background: rgba(255, 255, 255, .5); }
.summary-strip strong { font-size: 16px; }
.summary-strip span { display: inline-block; margin-top: 4px; color: #526a5f; font-size: 13px; }
.trip-tools { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 0 16px 19px; }
.trip-tools button {
  position: relative;
  min-width: 0;
  min-height: 94px;
  padding: 14px;
  display: flex;
  align-items: flex-start;
  gap: 11px;
  border: 1px solid rgba(221, 229, 223, .9);
  border-radius: 19px;
  background: rgba(255, 255, 255, .94);
  text-align: left;
  box-shadow: 0 7px 20px rgba(39, 64, 53, .055);
}
.trip-tools button.wide { grid-column: 1 / -1; min-height: 76px; align-items: center; }
.trip-tools i {
  width: 39px;
  height: 39px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 13px;
  color: var(--green);
  background: var(--surface);
  font-style: normal;
}
.trip-tools button:nth-child(2) i { color: var(--blue); background: var(--blue-soft); }
.trip-tools button:nth-child(3) i { color: #806a3f; background: #f4ecd9; }
.trip-tools button:nth-child(4) i { color: #ad643a; background: var(--orange-soft); }
.trip-tools i .ui-icon { width: 21px; height: 21px; }
.trip-tools span { min-width: 0; flex: 1; }
.trip-tools strong, .trip-tools small { display: block; }
.trip-tools strong { font-size: 14px; line-height: 1.35; }
.trip-tools small { margin-top: 5px; color: var(--muted); font-size: 12px; line-height: 1.45; }
.trip-tools b { color: var(--muted-2); }

.day-card { position: relative; margin-bottom: 13px; padding: 18px; overflow: hidden; }
.day-card::before { content: ""; position: absolute; top: 0; bottom: 0; left: 0; width: 4px; background: linear-gradient(var(--orange), #e4b07e); }
.day-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.day-no { color: #bd6a36; font-size: 12px; font-weight: 800; letter-spacing: .08em; }
.day-card h3 { margin: 5px 0 11px; font-size: 18px; }
.route { display: flex; align-items: center; gap: 9px; margin-bottom: 12px; color: var(--ink-soft); font-size: 13px; }
.route .line { position: relative; height: 1px; flex: 1; background: #d7dfda; }
.route .line::after { content: ""; position: absolute; right: 0; top: -2px; width: 5px; height: 5px; border-top: 1px solid #aab7af; border-right: 1px solid #aab7af; transform: rotate(45deg); }
.day-items { color: var(--muted); font-size: 13px; line-height: 1.7; }
.stay { margin-top: 13px; padding-top: 12px; display: flex; align-items: center; gap: 8px; border-top: 1px solid var(--line); color: var(--ink-soft); font-size: 13px; }
.stay .ui-icon { width: 17px; height: 17px; color: var(--green); }
.badge { display: inline-flex; align-items: center; flex: 0 0 auto; padding: 6px 9px; border-radius: 999px; color: #9c5a31; background: var(--orange-soft); font-size: 12px; font-weight: 700; }
.add-day-button { width: 100%; min-height: 55px; margin: 4px 0 26px; border: 1.5px dashed #aebdb4; border-radius: 18px; color: var(--green); background: rgba(255, 255, 255, .35); font-weight: 750; }

.weather { margin: 0 16px 13px; padding: 20px; display: flex; align-items: center; justify-content: space-between; gap: 14px; border-radius: 24px; color: #fff; background: linear-gradient(135deg, #426f78, #749d9c); box-shadow: 0 14px 28px rgba(63, 105, 112, .18); }
.weather b { display: block; margin: 3px 0; font-size: 29px; }
.weather p { margin: 0; color: rgba(255, 255, 255, .83); font-size: 13px; }
.weather-icon { width: 66px; height: 66px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 21px; background: rgba(255, 255, 255, .13); }
.weather-icon .ui-icon { width: 36px; height: 36px; }
.day-summary { margin: 0 16px 13px; padding: 17px; display: flex; align-items: center; gap: 13px; border: 1px solid rgba(31, 99, 74, .08); border-radius: 21px; background: linear-gradient(135deg, var(--surface), #eef3ed); }
.day-summary-icon { width: 43px; height: 43px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 14px; color: var(--green); background: rgba(255, 255, 255, .7); }
.day-summary strong, .day-summary span { display: flex; align-items: center; gap: 6px; }
.day-summary strong { font-size: 14px; }
.day-summary span { margin-top: 5px; color: var(--muted); font-size: 12px; }
.day-summary span .ui-icon { width: 15px; height: 15px; }

.timeline { position: relative; padding: 12px 16px 34px 82px; }
.timeline::before { content: ""; position: absolute; top: 18px; bottom: 38px; left: 61px; width: 2px; border-radius: 2px; background: linear-gradient(#b9c9c0, #dce4df); }
.event-row { --event: #42745f; --event-soft: #e3efe7; position: relative; margin-bottom: 15px; }
.event-type-transport, .event-type-bus { --event: #467686; --event-soft: #e3eff3; }
.event-type-sightseeing { --event: #ba7548; --event-soft: #faeadf; }
.event-type-meal { --event: #aa6b3d; --event-soft: #f8ecde; }
.event-type-hotel { --event: #6a5e8b; --event-soft: #ece8f4; }
.event-type-shopping { --event: #a25970; --event-soft: #f5e6ec; }
.event-row.is-completed { opacity: .66; }
.event-row.is-completed h3 { text-decoration: line-through; text-decoration-thickness: 1px; }
.event-time { position: absolute; top: 17px; left: -73px; width: 52px; color: var(--ink-soft); font-size: 13px; font-variant-numeric: tabular-nums; text-align: right; }
.event-dot { position: absolute; z-index: 1; top: 20px; left: -25px; width: 11px; height: 11px; border: 3px solid var(--paper); border-radius: 50%; background: var(--event); box-shadow: 0 0 0 2px rgba(66, 116, 95, .23); }
.event-card { padding: 15px; border-left: 3px solid var(--event); }
.event-title { display: flex; align-items: center; gap: 10px; }
.event-icon { width: 40px; height: 40px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 13px; color: var(--event); background: var(--event-soft); }
.event-icon .ui-icon { width: 21px; height: 21px; }
.event-title h3 { min-width: 0; flex: 1; margin: 0; }
.event-card > p { margin: 9px 0 0 50px; color: var(--muted); font-size: 13px; line-height: 1.6; }
.event-actions { display: flex; gap: 7px; margin: 12px 0 0 50px; }
.mini-btn { min-height: 32px; padding: 7px 10px; border: 0; border-radius: 10px; background: #f0f3ef; font-size: 12px; }
.highlight-list { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 13px; }
.highlight-list > span, .status-chip { padding: 7px 10px; display: inline-flex; align-items: center; gap: 5px; border: 0; border-radius: 999px; color: #456356; background: var(--surface); font-size: 12px; font-weight: 700; }
.event-status-list { margin-left: 50px; }
.status-chip .ui-icon { width: 13px; height: 13px; }
.status-done, .status-ready { color: #287253; background: #e0f0e7; }
.status-todo { color: #9a6038; background: var(--orange-soft); }
.status-doc { color: #426b7a; background: var(--blue-soft); }
.status-cost { color: #9b6239; background: #f5eadb; }
.status-file { color: #625b7d; background: #ece9f3; }

.detail-hero { position: relative; margin: 0 16px 15px; padding: 24px; overflow: hidden; border-radius: 28px; color: #fff; background: linear-gradient(145deg, #1d4b3a, #4b7d68); box-shadow: 0 18px 36px rgba(30, 79, 59, .2); }
.detail-hero::after { content: ""; position: absolute; width: 150px; height: 150px; top: -70px; right: -55px; border: 26px solid rgba(255, 255, 255, .08); border-radius: 50%; }
.transport-detail .detail-hero, .bus-detail .detail-hero { background: linear-gradient(145deg, #315d69, #6e9299); }
.sightseeing-detail .detail-hero { background: linear-gradient(145deg, #815438, #c18456); }
.meal-detail .detail-hero { background: linear-gradient(145deg, #754b32, #b5794d); }
.hotel-detail .detail-hero { background: linear-gradient(145deg, #4f466d, #82779a); }
.detail-icon { width: 54px; height: 54px; display: grid; place-items: center; border-radius: 18px; background: rgba(255, 255, 255, .15); }
.detail-icon .ui-icon { width: 28px; height: 28px; }
.detail-state { position: absolute; top: 27px; right: 24px; color: rgba(255, 255, 255, .8); font-size: 12px; font-weight: 650; }
.detail-hero h2 { position: relative; z-index: 1; margin: 18px 0 7px; font-size: 26px; }
.detail-hero p { position: relative; z-index: 1; margin: 0; color: rgba(255, 255, 255, .8); font-size: 14px; line-height: 1.65; }
.detail-completion { display: block; margin-top: 10px; color: rgba(255, 255, 255, .78); font-size: 12px; }
.panel { margin: 13px 16px; padding: 19px; }
.panel > h3 { margin-bottom: 15px; }
.type-heading { display: flex; align-items: center; gap: 13px; margin-bottom: 16px; }
.type-heading > span { width: 46px; height: 46px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 15px; color: var(--green); background: var(--surface); }
.type-heading > span .ui-icon { width: 24px; height: 24px; }
.transport-panel .type-heading > span { color: var(--blue); background: var(--blue-soft); }
.sight-panel .type-heading > span, .meal-panel .type-heading > span { color: #a86238; background: var(--orange-soft); }
.hotel-panel .type-heading > span { color: #675b86; background: #ece9f3; }
.type-heading small, .expense-head small, .attachment-head small { color: var(--muted); font-size: 12px; }
.type-heading h3, .expense-head h3, .attachment-head h3 { margin: 3px 0 0; }
.route-box, .place-card { padding: 16px; border: 1px solid #e3e9e5; border-radius: 17px; background: #f4f7f3; }
.route-box p { margin: 6px 0 13px; color: var(--muted); font-size: 13px; }
.place-card { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 11px; }
.place-card b { min-width: 0; font-size: 14px; }
.location-actions { display: flex; gap: 7px; flex-wrap: wrap; }
.location-actions button, .route-box button { min-height: 36px; padding: 8px 11px; display: inline-flex; align-items: center; gap: 6px; border: 0; border-radius: 11px; color: #fff; background: var(--green); font-size: 12px; font-weight: 700; }
.location-actions button:last-child { color: var(--green); background: var(--surface); }
.location-actions .ui-icon, .wide-action .ui-icon { width: 16px; height: 16px; }
.wide-action { width: 100%; min-height: 45px; margin-top: 14px; display: flex; align-items: center; justify-content: center; gap: 7px; border: 0; border-radius: 13px; color: var(--green); background: var(--surface); font-size: 13px; font-weight: 750; }
.info-row { padding: 12px 0; display: flex; justify-content: space-between; gap: 18px; border-bottom: 1px solid var(--line); font-size: 13px; line-height: 1.55; }
.info-row:last-child { border-bottom: 0; }
.info-row > span:first-child { color: var(--muted); }
.info-row > span:last-child { max-width: 64%; color: var(--ink-soft); font-weight: 600; text-align: right; overflow-wrap: anywhere; }
.ticket { margin-top: 11px; padding: 13px; display: flex; align-items: center; gap: 11px; border: 1px solid #e0e7e2; border-radius: 15px; background: #f5f7f4; }
.ticket-icon { width: 38px; height: 38px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 12px; color: var(--blue); background: var(--blue-soft); }
.ticket-icon .ui-icon { width: 20px; height: 20px; }
.ticket > div { min-width: 0; flex: 1; }
.ticket p { margin: 3px 0 0; overflow: hidden; color: var(--muted); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.qr-ticket { margin: 13px 0; padding: 14px; display: flex; align-items: center; gap: 13px; border: 1px solid #d7e2da; border-radius: 17px; background: #f6faf7; }
.fake-qr { width: 58px; height: 58px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 12px; color: var(--green-dark); background: #fff; }
.fake-qr .ui-icon { width: 38px; height: 38px; }
.qr-ticket > div:nth-child(2) { min-width: 0; flex: 1; }
.qr-ticket small, .qr-ticket strong, .qr-ticket p { display: block; }
.qr-ticket small { color: var(--muted); font-size: 12px; }
.qr-ticket strong { margin: 3px 0; font-size: 14px; }
.qr-ticket p { margin: 0; color: var(--muted); font-size: 12px; }
.empty-hint { color: var(--muted); font-size: 13px; }

.quick-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 15px 16px; }
.quick { min-width: 0; min-height: 76px; padding: 11px 4px; border: 1px solid rgba(222, 229, 224, .85); border-radius: 16px; background: #fff; box-shadow: 0 6px 17px rgba(39, 54, 47, .055); font-size: 12px; font-weight: 650; }
.quick i { width: 30px; height: 30px; display: grid; place-items: center; margin: 0 auto 7px; border-radius: 10px; color: var(--green); background: var(--surface); font-style: normal; }
.quick i .ui-icon { width: 18px; height: 18px; }
.quick.danger { color: var(--red); }
.quick.danger i { color: var(--red); background: var(--red-soft); }
.manage-label { margin: 24px 20px 9px; color: var(--muted); font-size: 12px; font-weight: 650; }
.manage-grid { margin-top: 0; }
.finance-menu .quick-grid { margin: 0 0 16px; }
.finance-menu .muted { margin-bottom: 0; }

.expense-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.expense-head > div { min-width: 0; }
.expense-head button { min-height: 40px; padding: 9px 13px; display: inline-flex; align-items: center; gap: 6px; border: 0; border-radius: 12px; color: #fff; background: var(--orange); font-size: 12px; font-weight: 750; white-space: nowrap; }
.expense-head button .ui-icon { width: 15px; height: 15px; }
.expense-entry > p { margin: 13px 0 0; color: var(--muted); font-size: 13px; line-height: 1.7; }
.expense-list { display: grid; gap: 9px; margin-top: 13px; }
.expense-item { padding: 13px; display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; border: 1px solid #e5eae6; border-radius: 15px; background: #f5f7f4; }
.expense-item strong { font-size: 13px; }
.expense-item p { margin: 5px 0 0; color: var(--muted); font-size: 12px; line-height: 1.55; }
.expense-side { flex: 0 0 auto; text-align: right; }
.expense-side b { display: block; font-size: 13px; }
.expense-side button { min-height: 32px; margin-top: 8px; padding: 6px 9px; border: 0; border-radius: 9px; color: var(--red); background: var(--red-soft); font-size: 12px; }
.member-summary + .member-summary { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line); }
.member-list { display: grid; gap: 10px; }
.member-row { padding: 13px; display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; border: 1px solid #e4eae5; border-radius: 15px; background: #f5f7f4; }
.member-row strong { font-size: 14px; }
.member-row p { margin: 4px 0 0; color: var(--muted); font-size: 12px; }
.member-actions { display: flex; gap: 7px; }
.member-actions button { min-height: 34px; padding: 7px 10px; border: 0; border-radius: 10px; background: #fff; font-size: 12px; }
.member-actions button.danger { color: var(--red); background: var(--red-soft); }
.note-panel { cursor: pointer; }
.note-title { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.note-title h3 { margin-bottom: 10px; }
.note-title span { display: inline-flex; align-items: center; gap: 5px; color: var(--green); font-size: 12px; font-weight: 700; }
.note-title .ui-icon { width: 14px; height: 14px; }
.note-copy { margin: 0; font-size: 14px; line-height: 1.75; }
.attachment-head h3 { margin-bottom: 13px; }
.attachment-list button { width: 100%; min-height: 54px; margin-bottom: 8px; padding: 10px; display: flex; align-items: center; gap: 10px; border: 0; border-radius: 14px; background: #f4f7f4; text-align: left; }
.attachment-list i { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 11px; color: var(--blue); background: var(--blue-soft); font-style: normal; }
.attachment-list i .ui-icon { width: 19px; height: 19px; }
.attachment-list span { min-width: 0; flex: 1; }
.attachment-list strong, .attachment-list small { display: block; }
.attachment-list strong { overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.attachment-list small { margin-top: 3px; color: var(--muted); font-size: 12px; }
.attachment-list b .ui-icon { width: 17px; height: 17px; color: var(--muted-2); }
.attachment-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.attachment-actions label { position: relative; min-height: 45px; padding: 11px 7px; display: flex; align-items: center; justify-content: center; gap: 7px; overflow: hidden; border-radius: 13px; color: var(--green); background: var(--surface); font-size: 12px; font-weight: 750; }
.attachment-actions label .ui-icon { width: 17px; height: 17px; }
.attachment-actions input, .file-input { position: absolute; width: 1px; height: 1px; overflow: hidden; opacity: 0; }

.edit-form { margin: 10px 16px; padding: 20px; border: 1px solid rgba(220, 228, 222, .9); border-radius: 23px; background: rgba(255, 255, 255, .95); box-shadow: var(--shadow-card); }
.edit-form label, .text-review-card label, .panel form > label { display: block; margin-bottom: 19px; color: var(--ink-soft); font-size: 13px; font-weight: 680; }
.edit-form input, .edit-form textarea, .edit-form select, .text-review-card input, .text-review-card textarea, .text-review-card select, .panel form > label input, .panel form > label textarea, .panel form > label select {
  width: 100%;
  min-height: 48px;
  margin-top: 8px;
  padding: 12px 13px;
  border: 1px solid #dbe3dd;
  border-radius: 13px;
  color: var(--ink);
  background: #f9faf8;
  font-size: 15px;
  line-height: 1.45;
  transition: border-color var(--motion-fast) ease, box-shadow var(--motion-fast) ease, background-color var(--motion-fast) ease;
}
.edit-form input:focus, .edit-form textarea:focus, .edit-form select:focus, .text-review-card input:focus, .text-review-card textarea:focus, .text-review-card select:focus, .panel form > label input:focus, .panel form > label textarea:focus, .panel form > label select:focus { border-color: var(--green-light); background: #fff; box-shadow: 0 0 0 4px rgba(31, 99, 74, .08); outline: 0; }
.edit-form textarea, .text-review-card textarea, .panel form > label textarea { min-height: 110px; resize: vertical; }
.edit-notice { margin: 4px 0 19px; padding: 14px; border-radius: 14px; color: #80563c; background: var(--orange-soft); font-size: 12px; line-height: 1.7; }
.offline-notice { display: flex; align-items: flex-start; gap: 9px; color: #3f6555; background: var(--surface); }
.offline-notice .ui-icon { width: 18px; height: 18px; margin-top: 2px; }
.form-primary { width: 100%; padding: 13px 15px; }
.date-grid, .review-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.member-checks { margin: 0 0 19px; padding: 14px; border: 1px solid var(--line); border-radius: 15px; }
.member-checks legend { padding: 0 7px; color: var(--muted); font-size: 12px; }
.member-checks label { margin: 0 0 12px; display: flex; align-items: center; gap: 9px; color: var(--ink); font-size: 14px; }
.member-checks label:last-child { margin-bottom: 0; }
.member-checks input { width: 19px; height: 19px; min-height: 0; margin: 0; accent-color: var(--green); }

.event-type-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; }
.event-type-grid button { min-height: 82px; padding: 13px 6px; border: 1px solid var(--line); border-radius: 17px; background: #fff; }
.event-type-grid button.selected { color: var(--green); border-color: var(--green-light); background: var(--surface); box-shadow: 0 0 0 2px rgba(31, 99, 74, .08); }
.event-type-grid i, .event-type-grid span { display: block; }
.event-type-grid i { width: 34px; height: 34px; display: grid; place-items: center; margin: 0 auto 7px; border-radius: 11px; color: var(--green); background: var(--surface); font-style: normal; }
.event-type-grid i .ui-icon { width: 20px; height: 20px; }
.event-type-grid span { font-size: 12px; font-weight: 680; }
.new-event-form { margin-top: 17px; }
.text-create-entry { width: 100%; min-height: 76px; margin-bottom: 20px; padding: 15px; display: flex; align-items: center; gap: 12px; border: 0; border-radius: 20px; color: #fff; background: linear-gradient(135deg, #285c49, #638a79); text-align: left; box-shadow: 0 12px 26px rgba(39, 91, 69, .17); }
.text-create-entry > i { width: 42px; height: 42px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 14px; background: rgba(255, 255, 255, .14); font-style: normal; }
.text-create-entry i .ui-icon { width: 22px; height: 22px; }
.text-create-entry span { min-width: 0; flex: 1; }
.text-create-entry strong, .text-create-entry small { display: block; }
.text-create-entry strong { font-size: 15px; }
.text-create-entry small { margin-top: 4px; color: rgba(255, 255, 255, .76); font-size: 12px; }
.text-create-entry b .ui-icon { width: 19px; height: 19px; }
.empty-create { margin: 25px 16px; padding: 35px; border: 1.5px dashed #bac6be; border-radius: 21px; color: var(--muted); text-align: center; }
.empty-create span { width: 54px; height: 54px; display: grid; place-items: center; margin: 0 auto; border-radius: 18px; color: var(--green); background: var(--surface); }
.empty-create span .ui-icon { width: 25px; height: 25px; }
.empty-create p { margin: 10px 0 0; font-size: 13px; }
.text-review-note { margin: 0 16px 13px; padding: 14px 16px; border-radius: 16px; color: #74513b; background: var(--orange-soft); font-size: 12px; line-height: 1.7; }
.text-review-list { margin: 0 16px 105px; }
.text-review-card { margin-bottom: 12px; padding: 17px; border: 1px solid rgba(222, 229, 224, .9); border-radius: 20px; background: #fff; box-shadow: var(--shadow-card); }
.review-card-head { display: flex; align-items: center; gap: 9px; margin-bottom: 13px; }
.review-card-head > span { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 12px; color: var(--green); background: var(--surface); }
.review-card-head > span .ui-icon { width: 20px; height: 20px; }
.review-card-head button { min-height: 34px; margin-left: auto; padding: 7px 10px; border: 0; border-radius: 10px; color: var(--red); background: var(--red-soft); font-size: 12px; }
.text-review-card label { margin-top: 11px; margin-bottom: 0; color: var(--muted); font-size: 12px; }
.text-save-all, .primary-bottom { position: fixed; z-index: 6; bottom: calc(16px + env(safe-area-inset-bottom)); left: 50%; width: min(calc(100% - 32px), 408px); padding: 14px; transform: translateX(-50%); box-shadow: 0 13px 30px rgba(35, 88, 68, .27); }
.text-save-all:disabled { opacity: .46; }
.ai-later { margin: -82px 16px 96px; padding: 15px; border: 1px dashed #bdc8c0; border-radius: 16px; }
.ai-later strong { font-size: 13px; }
.ai-later p { margin: 5px 0 0; color: var(--muted); font-size: 12px; line-height: 1.65; }

.upload-intro { margin: 9px 16px 18px; padding: 29px 22px; border: 1.5px dashed #a9baaf; border-radius: 26px; background: rgba(255, 255, 255, .65); text-align: center; }
.upload-intro.compact { margin-top: 24px; }
.upload-mark { width: 64px; height: 64px; margin: 0 auto 18px; display: grid; place-items: center; border-radius: 21px; color: var(--green); background: var(--surface); }
.upload-mark .ui-icon { width: 30px; height: 30px; }
.upload-intro h2 { margin-bottom: 9px; }
.upload-intro p { color: var(--muted); font-size: 13px; line-height: 1.75; }
.upload-button { position: relative; width: 100%; margin-top: 20px; padding: 13px; display: block; overflow: hidden; }
.secondary-upload { color: var(--green); background: var(--surface); text-align: center; }
.text-action { display: block; margin: 13px auto 96px; padding: 10px 16px; border: 0; color: var(--muted); background: transparent; font-size: 13px; }
.import-box { margin: 9px 16px 17px; padding: 19px; border-radius: 21px; color: #fff; background: linear-gradient(135deg, #214c3b, #527665); box-shadow: 0 12px 28px rgba(32, 77, 59, .16); }
.import-box p { margin: 6px 0 0; color: rgba(255, 255, 255, .76); font-size: 13px; }
.step-row { min-height: 46px; padding: 9px 0; display: flex; align-items: center; gap: 12px; font-size: 14px; }
.step-row b { width: 30px; height: 30px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 10px; color: var(--green); background: var(--surface); font-size: 13px; }
.recognised-day { padding: 13px 0; border-bottom: 1px solid var(--line); }
.recognised-day b, .recognised-day span { display: block; }
.recognised-day b { font-size: 14px; }
.recognised-day span { margin-top: 5px; color: var(--muted); font-size: 12px; }
.import-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; }
.import-stats div { padding: 14px 8px; border-radius: 15px; background: #f3f6f3; text-align: center; }
.import-stats b, .import-stats span { display: block; }
.import-stats b { font-size: 21px; }
.import-stats span { margin-top: 4px; color: var(--muted); font-size: 12px; }
.import-need-list p { margin: 0 0 9px; color: #805137; font-size: 13px; line-height: 1.65; }
.import-need-list p:last-child { margin-bottom: 0; }
.more-days { margin: 13px 0 0; color: var(--green); font-size: 13px; text-align: center; }
.warning { border-color: #f0ddcc; background: #fff8f2; }
code { padding: 2px 5px; border-radius: 6px; color: #4d665b; background: #edf2ee; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .9em; }

.doc-summary { margin: 0 16px 8px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; }
.doc-summary div { padding: 16px 7px; border: 1px solid rgba(222, 229, 224, .85); border-radius: 17px; background: #fff; text-align: center; box-shadow: 0 6px 16px rgba(35, 58, 48, .045); }
.doc-summary b, .doc-summary span { display: block; }
.doc-summary b { font-size: 22px; }
.doc-summary span { margin-top: 4px; color: var(--muted); font-size: 12px; }
.doc-card { position: relative; min-height: 76px; margin-bottom: 10px; padding: 13px; display: flex; align-items: center; gap: 11px; border: 1px solid rgba(222, 229, 224, .9); border-radius: 18px; background: #fff; box-shadow: 0 6px 18px rgba(35, 58, 48, .05); }
.doc-card > i { width: 43px; height: 43px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 14px; color: var(--blue); background: var(--blue-soft); font-style: normal; }
.doc-card > i .ui-icon { width: 22px; height: 22px; }
.doc-card > div { min-width: 0; flex: 1; }
.doc-card strong { display: block; padding-right: 4px; font-size: 13px; }
.doc-card p { margin: 5px 0 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.doc-card .badge { max-width: 78px; }
.doc-chevron { display: none; }
.inline-link-btn { min-height: 34px; margin-top: 9px; padding: 6px 10px; display: inline-flex; align-items: center; gap: 5px; border: 0; border-radius: 999px; color: var(--green-dark); background: var(--surface); font-size: 12px; font-weight: 750; }
.inline-link-btn .ui-icon { width: 13px; height: 13px; }
.unlinked-badge { color: #9a542f; background: var(--orange-soft); }
.document-summary { margin: 0 16px 13px; padding: 20px; display: flex; align-items: center; gap: 15px; border-radius: 24px; color: #fff; background: linear-gradient(135deg, #244e3e, #638172); box-shadow: 0 15px 32px rgba(31, 77, 58, .18); }
.document-type { width: 55px; height: 55px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 18px; background: rgba(255, 255, 255, .14); }
.document-type .ui-icon { width: 28px; height: 28px; }
.document-summary > div:last-child { min-width: 0; }
.document-summary span { color: rgba(255, 255, 255, .76); font-size: 12px; }
.document-summary h2 { margin: 4px 0; font-size: 20px; }
.document-summary p { margin: 0; overflow: hidden; color: rgba(255, 255, 255, .72); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.document-action-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 15px; }
.document-action-grid .form-primary, .document-action-grid .secondary-btn { width: 100%; min-height: 48px; padding: 10px; font-size: 13px; }
.pdf-viewer { margin: 13px 16px; overflow: hidden; border-radius: 20px; background: #fff; box-shadow: var(--shadow-card); }
.pdf-viewer iframe { width: 100%; height: 520px; display: block; border: 0; }
.pdf-fallback { padding: 13px; border-top: 1px solid var(--line); text-align: center; }
.pdf-fallback p { margin: 0; color: var(--muted); font-size: 12px; }
.privacy-note { margin: 14px 20px 26px; color: var(--muted); font-size: 12px; line-height: 1.6; text-align: center; }
.attachment-preview { margin: 13px 16px; overflow: hidden; border-radius: 20px; background: #202622; box-shadow: var(--shadow-card); }
.attachment-preview img { width: 100%; max-height: 620px; display: block; object-fit: contain; }
.attachment-preview iframe { width: 100%; height: 560px; display: block; border: 0; background: #fff; }
.attachment-delete { display: block; min-height: 44px; margin: 17px auto 32px; padding: 11px 16px; border: 0; border-radius: 13px; color: var(--red); background: var(--red-soft); }

.sheet-backdrop { position: fixed; z-index: 20; inset: 0; display: flex; align-items: flex-end; justify-content: center; background: rgba(17, 31, 25, .46); backdrop-filter: blur(4px); animation: fade-in var(--motion-fast) ease both; }
.sheet { width: min(100%, 440px); padding: 10px 18px calc(25px + env(safe-area-inset-bottom)); border-radius: 28px 28px 0 0; background: #f5f7f4; box-shadow: 0 -22px 55px rgba(0, 0, 0, .18); animation: sheet-up var(--motion-normal) cubic-bezier(.2, .75, .25, 1) both; }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes sheet-up { from { transform: translateY(24px); opacity: .4; } to { transform: none; opacity: 1; } }
.handle { width: 44px; height: 5px; margin: 0 auto 20px; border-radius: 99px; background: #c7cec9; }
.sheet h2 { margin-bottom: 16px; }
.sheet-description { margin: -8px 0 18px; color: var(--muted); font-size: 13px; }
.sheet-option { width: 100%; min-height: 66px; margin-bottom: 9px; padding: 13px; display: flex; align-items: center; gap: 12px; border: 1px solid rgba(222, 229, 224, .9); border-radius: 17px; background: #fff; text-align: left; }
.sheet-option > i { width: 41px; height: 41px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 13px; color: var(--green); background: var(--surface); font-style: normal; }
.sheet-option > i .ui-icon { width: 21px; height: 21px; }
.sheet-option > span { min-width: 0; flex: 1; }
.sheet-option strong, .sheet-option small { display: block; }
.sheet-option strong { font-size: 14px; }
.sheet-option small { margin-top: 4px; color: var(--muted); font-size: 12px; }
.sheet-option > b { color: var(--muted-2); }
.sheet-option > b .ui-icon { width: 18px; height: 18px; }
.danger-option > i { color: var(--red); background: var(--red-soft); }
.danger-option strong { color: var(--red); }
.map-letter { font-size: 15px; font-weight: 850; }

.diff-tabs { padding: 0 16px 11px; display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; }
.diff-tabs button { min-height: 36px; padding: 8px 12px; border: 0; border-radius: 999px; background: #fff; font-size: 12px; white-space: nowrap; }
.diff-tabs .active { color: #fff; background: var(--green); }
.diff-card { margin: 11px 16px; padding: 16px; border-left: 4px solid var(--orange); border-radius: 18px; background: #fff; }
.diff-card.add { border-color: #4c8c66; }
.diff-card.delete { border-color: var(--red); }
.diff-card.conflict { border-color: #cf743f; background: #fffaf6; }
.diff-top { display: flex; justify-content: space-between; gap: 10px; }
.diff-card p { margin: 8px 0 0; color: var(--muted); font-size: 13px; line-height: 1.6; }
.diff-actions { display: flex; gap: 8px; margin-top: 13px; }
.diff-actions button { min-height: 39px; flex: 1; padding: 9px; border: 0; border-radius: 11px; background: #f0f2ef; font-size: 12px; }
.diff-actions .accept { color: #fff; background: var(--green); }
.diff-actions button.selected { box-shadow: 0 0 0 2px var(--orange) inset; font-weight: 750; }
.match-card { position: relative; margin: 13px 16px; padding: 21px; border-radius: 23px; background: #fff; box-shadow: var(--shadow-card); }
.match-card h2 { margin: 8px 0; }
.match-card > p { color: var(--muted); font-size: 13px; }
.match-score { position: absolute; top: 17px; right: 17px; padding: 7px 10px; border-radius: 999px; color: #32704e; background: var(--surface); font-size: 12px; }
.booking-compare { margin: 13px 16px; display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.booking-compare > div { min-width: 0; padding: 16px; border-radius: 19px; background: #fff; box-shadow: var(--shadow-card); }
.booking-compare > div:last-child { background: var(--surface); }
.booking-compare span { color: var(--muted); font-size: 12px; }
.booking-compare h3 { margin: 9px 0 7px; font-size: 14px; }
.booking-compare p { color: var(--muted); font-size: 12px; }
.booking-actions { margin: 15px 16px; display: flex; gap: 9px; }
.booking-actions button { min-height: 46px; flex: 1; padding: 12px 8px; border: 0; border-radius: 14px; background: #e7eae7; font-size: 13px; }
.booking-actions .accept { color: #fff; background: var(--green); }

.empty-day { margin: 32px 16px; padding: 38px 21px; border: 1.5px dashed #c3ccc6; border-radius: 23px; text-align: center; }
.empty-day h3 { margin: 11px 0 6px; }
.empty-day p { margin: 0; color: var(--muted); font-size: 13px; }
.toast { position: fixed; z-index: 40; bottom: calc(102px + env(safe-area-inset-bottom)); left: 50%; max-width: calc(100% - 40px); padding: 11px 17px; border: 1px solid rgba(255, 255, 255, .1); border-radius: 999px; color: #fff; background: rgba(25, 48, 38, .94); box-shadow: 0 10px 28px rgba(20, 42, 33, .2); font-size: 13px; white-space: nowrap; transform: translateX(-50%); animation: toast 2.2s both; }
@keyframes toast { 0% { opacity: 0; transform: translate(-50%, 10px) scale(.96); } 14%, 80% { opacity: 1; transform: translate(-50%, 0) scale(1); } 100% { opacity: 0; transform: translate(-50%, -4px) scale(.98); } }

@media (max-width: 370px) {
  h1, .title-wrap h1 { font-size: 23px; }
  .topbar { padding-right: 15px; padding-left: 15px; }
  .trip-tools, .content { margin-right: 0; margin-left: 0; }
  .trip-tools { margin-right: 15px; margin-left: 15px; }
  .trip-tools button { padding: 12px; }
  .trip-tools i { width: 36px; height: 36px; }
  .quick { font-size: 12px; }
  .panel { margin-right: 14px; margin-left: 14px; }
  .event-card > p, .event-status-list { margin-left: 0; }
}
@media (min-width: 600px) {
  body { padding: 18px 0; }
  .app-shell, #app, .page { min-height: calc(100dvh - 36px); border-radius: 30px; }
  .fab { bottom: 42px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
