:root {
  /* Warm light theme: off-white paper, beige surfaces, brown text, burnt-orange accent. */
  --bg: #f6efe4;
  --surface: #fffbf5;
  --surface-2: #f0e5d4;
  --text: #3a2a1f;
  --muted: #86705d;
  --border: #e5d6c1;
  --accent: #c2611f;
  --accent-soft: #fbe2cb;
  --accent-text: #ffffff;
  --danger: #b3261e;
  --user-bubble: #7c4f33;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(90,55,25,.06), 0 4px 16px rgba(90,55,25,.07);
  color-scheme: light;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font: 15px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); }
button, input, textarea, select { font: inherit; color: inherit; }
h1, h2, h3 { margin: 0; line-height: 1.2; }
h1, h2 { font-family: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif; letter-spacing: -.01em; }
[hidden] { display: none !important; }

.btn {
  border: 1px solid var(--border); background: var(--surface); border-radius: 10px;
  padding: 8px 14px; cursor: pointer; white-space: nowrap;
}
.btn:hover { background: var(--surface-2); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-text); font-weight: 600; }
.btn.primary:hover { filter: brightness(1.08); }
.btn.danger { color: var(--danger); }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.small { padding: 4px 10px; font-size: 13px; }
.btn:disabled { opacity: .5; cursor: default; }

input[type=text], input[type=password], input[type=date], input[type=time], input[type=url], select, textarea {
  width: 100%; padding: 9px 11px; border: 1px solid var(--border); border-radius: 10px;
  background: var(--surface); outline: none;
}
input:focus, textarea:focus, select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
label.field { display: grid; gap: 4px; font-size: 13px; color: var(--muted); }
.row { display: flex; gap: 10px; }
.row > * { flex: 1; min-width: 0; }
.muted { color: var(--muted); }
.error { color: var(--danger); font-size: 14px; min-height: 1em; }

/* ---------- auth ---------- */
.auth-wrap { min-height: 100%; display: grid; place-items: center; padding: 16px; }
.auth-card {
  width: 100%; max-width: 380px; background: var(--surface); border: 1px solid var(--border);
  border-radius: 20px; padding: 28px; box-shadow: var(--shadow); display: grid; gap: 14px;
}
.brand { font-size: 26px; font-weight: 700; }
.auth-card .switch { text-align: center; font-size: 14px; }
.linklike { background: none; border: 0; color: var(--accent); cursor: pointer; padding: 0; text-decoration: underline; }

/* ---------- top bar ---------- */
.topbar {
  display: flex; align-items: center; gap: 12px; padding: 12px 16px;
  background: var(--surface); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 5;
}
.topbar .title { flex: 1; min-width: 0; }
.topbar h1 { font-size: 18px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar .sub { font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- trip list ---------- */
.page { max-width: 880px; margin: 0 auto; padding: 20px 16px 40px; display: grid; gap: 20px; }
.trip-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.trip-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px;
  cursor: pointer; box-shadow: var(--shadow); display: grid; gap: 6px; text-align: left;
}
.trip-card:hover { border-color: var(--accent); }
.trip-card h3 { font-size: 17px; }
.pill { display: inline-block; font-size: 12px; padding: 2px 9px; border-radius: 99px; background: var(--surface-2); color: var(--muted); }
.pill.live { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; display: grid; gap: 12px; }
.panel h2 { font-size: 16px; }
.empty { text-align: center; padding: 30px 10px; color: var(--muted); }

.new-code { background: var(--accent-soft); border-radius: 12px; padding: 12px; display: grid; gap: 8px; }
.code-big { font: 700 26px/1.2 ui-monospace, monospace; letter-spacing: .08em; color: var(--accent); user-select: all; }

/* ---------- trip view ---------- */
.trip-view { height: 100vh; height: 100dvh; display: flex; flex-direction: column; }
.trip-layout { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(320px, 440px) 1fr; }
.plan-pane { overflow-y: auto; border-right: 1px solid var(--border); padding: 16px; display: flex; flex-direction: column; gap: 14px; }
.plan-pane > * { flex-shrink: 0; }
.chat-pane { position: relative; display: flex; flex-direction: column; min-height: 0; }
.mobile-tabs { display: none; }

.today-banner { background: var(--accent); color: var(--accent-text); border-radius: var(--radius); padding: 14px 16px; }
.today-banner .big { font-size: 20px; font-weight: 700; }
.today-banner .small { font-size: 13px; opacity: .85; }

.sections { display: flex; gap: 4px; padding: 4px; background: var(--surface); border: 1px solid var(--border); border-radius: 999px; }
.sections button { flex: 1; border: 0; background: none; padding: 8px 10px; border-radius: 999px; font: inherit; font-weight: 600; font-size: 14px; color: var(--muted); cursor: pointer; white-space: nowrap; }
.sections button.active { background: var(--accent); color: var(--accent-text); }
.sections .count { font-size: 12px; font-weight: 700; opacity: .8; }

.day-strip { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: thin; }
.day-chip {
  flex: none; border: 1px solid var(--border); background: var(--surface); border-radius: 12px;
  padding: 6px 10px; cursor: pointer; text-align: center; min-width: 54px; position: relative;
}
.day-chip .dow { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.day-chip .dnum { font-size: 17px; font-weight: 700; }
.day-chip.selected { background: var(--accent); border-color: var(--accent); color: var(--accent-text); }
.day-chip.selected .dow { color: inherit; opacity: .85; }
.day-chip.today:not(.selected) { border-color: var(--accent); }
.day-chip .dot { position: absolute; bottom: 4px; left: 50%; width: 5px; height: 5px; margin-left: -2.5px; border-radius: 50%; background: var(--accent); }
.day-chip.selected .dot { background: var(--accent-text); }

.day-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.day-heading h2 { font-size: 17px; }
.stays:empty { display: none; }
.stays { display: grid; gap: 2px; margin: -4px 0 2px; }
.stay-line summary { list-style: none; display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; padding: 4px 2px; font-size: 13px; color: var(--muted); cursor: pointer; border-radius: 8px; }
.stay-line summary::-webkit-details-marker { display: none; }
.stay-line summary:hover { color: var(--text); }
.stay-line .stay-icon { font-size: 14px; }
.stay-line .stay-label { font-weight: 600; }
.stay-line .stay-title { color: var(--text); }
.stay-line .stay-detail::before { content: "· "; }
.stay-line summary::after { content: "▸"; margin-left: auto; font-size: 11px; opacity: .6; }
.stay-line[open] summary::after { content: "▾"; }
.stay-line[open] .item { margin: 4px 0 8px; }
.items { display: grid; gap: 10px; }
.item {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 14px;
  display: grid; grid-template-columns: 34px 1fr; gap: 4px 10px; box-shadow: var(--shadow);
}
.item.done { opacity: .55; }
.item.next { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); }
.item.flash { animation: flash 1.6s ease-out; }
@keyframes flash { from { box-shadow: 0 0 0 4px var(--accent); } }
.item .icon { font-size: 22px; grid-row: span 3; line-height: 1.2; }
.item .time { font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.item .tag { font-size: 11px; padding: 1px 7px; border-radius: 99px; background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.item .ititle { font-weight: 600; }
.item .meta { font-size: 13px; color: var(--muted); display: grid; gap: 2px; }
.item .meta a { text-decoration: none; }
.item .actions { grid-column: 2; display: flex; gap: 4px; margin-top: 4px; }
.conf { font-family: ui-monospace, monospace; background: var(--surface-2); padding: 0 5px; border-radius: 4px; color: var(--text); }

.item-files { grid-column: 2; }
.tiles { display: flex; flex-wrap: wrap; gap: 8px; }
.tile { position: relative; width: 84px; }
.tile a { display: grid; gap: 3px; text-decoration: none; color: var(--muted); }
.tile a > .tile-icon, .tile a > img { grid-area: 1 / 1; width: 84px; height: 84px; border-radius: 10px; border: 1px solid var(--border); }
.tile .tile-icon { display: grid; place-items: center; font-size: 28px; background: var(--surface-2); }
.tile img { object-fit: cover; background: var(--surface); }
.tile-name { grid-row: 2; font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tile-x {
  position: absolute; top: -6px; right: -6px; width: 22px; height: 22px; border-radius: 50%; border: 1px solid var(--border);
  background: var(--surface); color: var(--muted); font-size: 11px; cursor: pointer; display: none; padding: 0;
}
.tile:hover .tile-x, .tile:focus-within .tile-x { display: block; }
@media (hover: none) { .tile-x { display: block; } }
.day-files { border: 1px dashed var(--border); border-radius: var(--radius); padding: 12px 14px; display: grid; gap: 10px; }
.day-files h3, .files-h { font-size: 14px; }
.files-h { margin-top: 6px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; font-size: 12px; }
.files-view { display: grid; gap: 10px; border-radius: var(--radius); }
.file-row { display: flex; gap: 12px; align-items: flex-start; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 10px; }
.file-info { flex: 1; min-width: 0; display: grid; gap: 4px; }
.file-info .ititle { font-weight: 600; overflow-wrap: anywhere; }
.file-day { max-width: 180px; }
.drop-hover { outline: 3px dashed var(--accent); outline-offset: 2px; background: var(--accent-soft) !important; }
.drop-overlay .small { font-size: 13px; font-weight: 400; margin-top: 4px; }

/* ---------- chat ---------- */
.chat-bar { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 38px; padding: 4px 12px 4px 16px; border-bottom: 1px solid var(--border); color: var(--muted); font-size: 13px; }
.messages { flex: 1; overflow-y: auto; padding: 18px 16px; display: flex; flex-direction: column; gap: 10px; }
.msg { max-width: min(640px, 88%); display: grid; gap: 4px; }
.msg.user { align-self: flex-end; justify-items: end; }
.msg .author { font-size: 12px; color: var(--muted); padding: 0 4px; }
.bubble { padding: 9px 13px; border-radius: 16px; white-space: pre-wrap; overflow-wrap: anywhere; }
.msg.user .bubble { background: var(--user-bubble); color: #fff; border-bottom-right-radius: 4px; }
.msg.user .bubble a { color: #fff; }
.msg.assistant .bubble { background: var(--surface); border: 1px solid var(--border); border-bottom-left-radius: 4px; }
.msg .files, .msg .acts { display: flex; flex-wrap: wrap; gap: 5px; }
.file-tag, .act {
  font-size: 12px; padding: 3px 9px; border-radius: 99px; background: var(--surface-2); border: 1px solid var(--border);
  color: var(--text); text-decoration: none; cursor: pointer;
}
.act.added { background: var(--accent-soft); border-color: transparent; color: var(--accent); }
.act.deleted { text-decoration: line-through; }
.typing .bubble { color: var(--muted); }
.typing .dots::after { content: "…"; animation: dots 1.2s steps(4) infinite; display: inline-block; width: 1.2em; overflow: hidden; vertical-align: bottom; }
@keyframes dots { from { width: 0; } to { width: 1.2em; } }
.welcome { margin: auto; max-width: 420px; text-align: center; color: var(--muted); display: grid; gap: 10px; padding: 20px; }
.welcome .suggestions { display: grid; gap: 6px; }
.welcome .suggestions button { text-align: left; }

.composer-wrap { border-top: 1px solid var(--border); background: var(--surface); padding: 10px 12px calc(10px + env(safe-area-inset-bottom)); }
.pending-files { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.pending-files:empty { display: none; }
.pending-files .file-tag button { border: 0; background: none; cursor: pointer; padding: 0 0 0 4px; color: var(--muted); }
.composer { display: flex; gap: 8px; align-items: flex-end; }
.composer textarea { resize: none; max-height: 160px; min-height: 42px; border-radius: 12px; }
.attach-btn { font-size: 20px; padding: 6px 10px; }
.drop-overlay {
  position: absolute; inset: 8px; text-align: center; padding: 16px; border: 3px dashed var(--accent); border-radius: 18px;
  background: color-mix(in srgb, var(--accent-soft) 85%, transparent); display: grid; place-items: center;
  font-size: 18px; font-weight: 600; color: var(--accent); pointer-events: none; z-index: 4;
}

/* ---------- modal & toast ---------- */
.modal-backdrop { position: fixed; inset: 0; background: rgba(58,42,31,.45); display: grid; place-items: center; padding: 16px; z-index: 20; }
.modal {
  background: var(--surface); border-radius: 18px; padding: 20px; width: 100%; max-width: 520px;
  max-height: 90vh; overflow-y: auto; display: grid; gap: 12px; box-shadow: 0 20px 60px rgba(58,42,31,.3);
}
.modal h2 { font-size: 18px; }
.modal .footer { display: flex; justify-content: flex-end; gap: 8px; }
.member { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 0; border-bottom: 1px solid var(--border); }
.copy-row { display: flex; gap: 8px; }
.toast {
  position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); background: var(--text); color: var(--bg);
  padding: 10px 16px; border-radius: 10px; z-index: 30; font-size: 14px; max-width: calc(100% - 32px);
}

/* ---------- mobile ---------- */
@media (max-width: 860px) {
  .trip-layout { grid-template-columns: 1fr; }
  .plan-pane { border-right: 0; }
  .mobile-tabs { display: flex; background: var(--surface); border-bottom: 1px solid var(--border); }
  .mobile-tabs button { flex: 1; border: 0; background: none; padding: 10px; font-weight: 600; color: var(--muted); border-bottom: 2px solid transparent; cursor: pointer; }
  .mobile-tabs button.active { color: var(--accent); border-bottom-color: var(--accent); }
  .trip-layout[data-tab=chat] .plan-pane { display: none; }
  .trip-layout[data-tab=plan] .chat-pane { display: none; }
  .msg { max-width: 92%; }
}

/* DD/MM/YYYY date field: text box + calendar button; the native input only hosts the picker. */
.date-in { position: relative; display: flex; align-items: stretch; gap: 4px; }
.date-in .date-text { flex: 1; min-width: 0; }
.date-in .date-native {
  position: absolute; left: 0; bottom: 0; width: 1px; height: 1px;
  opacity: 0; pointer-events: none; border: 0; padding: 0;
}
.date-in .date-pick {
  flex: none; border: 1px solid var(--border); background: transparent;
  border-radius: 10px; padding: 0 10px; cursor: pointer; font-size: 15px;
}
.date-in .date-text:invalid { border-color: var(--danger); }

/* Assistant / Travel switch in the trip header. */
.mode-switch { display: flex; background: var(--surface-2); border: 1px solid var(--border); border-radius: 99px; padding: 3px; gap: 2px; flex: none; }
.mode-switch button { border: 0; background: none; border-radius: 99px; padding: 6px 14px; cursor: pointer; color: var(--muted); font-weight: 600; white-space: nowrap; }
.mode-switch button.active { background: var(--surface); color: var(--accent); box-shadow: var(--shadow); }
.trip-view .travel-pane { display: none; }
.trip-view[data-mode=travel] .trip-layout,
.trip-view[data-mode=travel] .mobile-tabs { display: none; }
.trip-view[data-mode=travel] .travel-pane { display: block; flex: 1; min-height: 0; overflow-y: auto; }

/* Travel mode: a read-only itinerary for use on the go. */
.travel { max-width: 720px; margin: 0 auto; padding: 18px 16px 48px; display: grid; gap: 14px; }
.travel-hero { padding: 6px 2px 0; }
.travel-hero .big { font-family: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif; font-size: 28px; font-weight: 700; line-height: 1.15; }
.travel-hero .small { color: var(--muted); font-size: 14px; }
.feature { background: var(--accent); color: var(--accent-text); border-radius: var(--radius); padding: 16px 18px; display: grid; gap: 4px; box-shadow: var(--shadow); }
.feature + .feature { background: var(--surface); color: var(--text); border: 1px solid var(--border); }
.feature-label { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; opacity: .85; }
.feature-when { font-size: 14px; font-variant-numeric: tabular-nums; }
.feature-when .until { display: inline-block; margin-left: 6px; padding: 1px 8px; border-radius: 99px; background: rgba(255,255,255,.22); font-weight: 600; }
.feature-title { font-size: 20px; font-weight: 700; line-height: 1.25; }
.feature .tmeta a, .feature .tmeta { color: inherit; }
.feature .conf { background: rgba(255,255,255,.22); color: inherit; }
.feature + .feature .feature-when .until { background: var(--accent-soft); color: var(--accent); }
.feature + .feature .tmeta { color: var(--muted); }
.feature + .feature .tmeta a { color: var(--accent); }
.feature + .feature .conf { background: var(--surface-2); color: var(--text); }
.tonight { display: flex; gap: 12px; align-items: flex-start; background: var(--surface-2); border-radius: var(--radius); padding: 12px 16px; font-size: 15px; }
.tonight > :first-child { font-size: 22px; }
.tonight .feature-label { color: var(--muted); }
.tmeta { display: grid; gap: 3px; font-size: 14px; color: var(--muted); justify-items: start; }
.tmeta a { color: var(--accent); text-decoration: none; }
.tmeta .tiles { margin-top: 4px; }
.ref { border: 0; background: none; padding: 0; font: inherit; color: inherit; cursor: pointer; }
.show-past { justify-self: start; }

.tday { display: grid; gap: 8px; }
.tday-h {
  position: sticky; top: 0; z-index: 1; background: var(--bg); margin: 0 -16px; padding: 10px 16px 6px;
  display: flex; justify-content: space-between; align-items: baseline; gap: 8px; font-size: 18px;
  border-bottom: 1px solid var(--border);
}
.tday-h .muted { font-family: system-ui, sans-serif; font-size: 13px; font-weight: 400; }
.tday.is-today .tday-h > span:first-child { color: var(--accent); }
.tday.past { opacity: .6; }
.stay { font-size: 14px; color: var(--muted); padding: 0 2px; }
.free { color: var(--muted); font-style: italic; padding: 4px 2px; }
.timeline { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.tl { display: grid; grid-template-columns: 100px 1fr; gap: 12px; padding: 10px 0; position: relative; }
.tl::before { content: ""; position: absolute; left: 112px; top: 0; bottom: 0; width: 2px; background: var(--border); }
.tl::after { content: ""; position: absolute; left: 108px; top: 16px; width: 10px; height: 10px; border-radius: 50%; background: var(--surface); border: 2px solid var(--muted); }
.tl.next::after { background: var(--accent); border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.tl.done { opacity: .5; }
.tl-time { text-align: right; font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums; display: grid; justify-items: end; gap: 3px; align-content: start; padding-top: 1px; }
.tl-time .tag { font-size: 11px; padding: 1px 7px; border-radius: 99px; background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.tl-body { padding-left: 22px; display: grid; gap: 3px; min-width: 0; }
.tl-title { font-weight: 600; font-size: 16px; }

@media (max-width: 860px) { .share-label { display: none; } }
@media (max-width: 420px) {
  .mode-switch span { display: none; }
  .mode-switch button { padding: 6px 12px; font-size: 16px; }
}

/* Time zones */
.your-time { font-size: 12px; font-weight: 400; color: var(--muted); }
.feature .your-time { color: inherit; opacity: .85; }
.zone-chip { font-size: 15px; letter-spacing: .02em; }
.clocks { display: flex; flex-wrap: wrap; gap: 8px; }
.clock { flex: 1 1 180px; display: flex; gap: 10px; align-items: center; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 8px 12px; }
.clock b { font-size: 18px; font-variant-numeric: tabular-nums; }
.clock-flag { font-size: 24px; line-height: 1; }
.clock-sub { font-size: 12px; color: var(--muted); }
.clock.here { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); }
.clock.you { background: var(--surface-2); }

/* Admin page */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px; }
.stat { background: var(--surface-2); border-radius: 12px; padding: 10px 14px; }
.stat-label { font-size: 12px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.stat-value { font-size: 22px; font-weight: 700; font-variant-numeric: tabular-nums; }
.stat-sub { font-size: 12px; color: var(--muted); }
.path { font-family: ui-monospace, monospace; font-size: 12px; overflow-wrap: anywhere; }
.table-wrap { overflow-x: auto; }
.admin-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.admin-table th { text-align: left; font-size: 12px; color: var(--muted); font-weight: 600; padding: 6px 8px; border-bottom: 1px solid var(--border); }
.admin-table td { padding: 7px 8px; border-bottom: 1px solid var(--border); vertical-align: top; }
.admin-table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.admin-table .mono { font-family: ui-monospace, monospace; font-size: 12px; overflow-wrap: anywhere; }
.admin-table tr.recent td { color: var(--muted); }
.admin-table a { text-decoration: none; }
.small { font-size: 12px; }
.ok-box { background: var(--surface-2); border-radius: 12px; padding: 12px 14px; }
.issue { border: 1px solid var(--accent); background: var(--accent-soft); border-radius: 12px; padding: 12px 14px; display: grid; gap: 10px; }
.issue .admin-table td, .issue .admin-table th { border-color: rgba(194,97,31,.25); }
.confirm-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: flex-end; }
.confirm-row span { flex: 1 1 220px; font-weight: 600; }
.notice { background: var(--surface-2); border-left: 3px solid var(--accent); border-radius: 8px; padding: 10px 12px; }
.admin-table td.mono { min-width: 190px; }
@media (max-width: 600px) { .admin-table .hide-narrow { display: none; } }

/* ---------- places ---------- */
.act.place { background: var(--accent-soft); border-color: transparent; color: var(--accent); cursor: pointer; }
.place-add { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
.place-add input[name=q], .place-add .add-tags { grid-column: 1 / -1; }
.add-tags summary { font-size: 13px; font-weight: 600; cursor: pointer; padding: 2px 0; }
.add-tags summary .muted { font-weight: 400; margin-left: 4px; }
.add-tags .tag-picker { margin-top: 8px; }
.tag-picker { display: flex; flex-wrap: wrap; gap: 6px; font-weight: 400; }
.tag-picker input { position: absolute; opacity: 0; pointer-events: none; }
.tag-picker .chip:has(input:checked) { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); font-weight: 600; }
.tag-picker .chip:has(input:focus-visible) { outline: 2px solid var(--accent); }
#place-error:empty { display: none; }
.place-filters { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); color: var(--text); font: inherit; font-size: 13px; cursor: pointer; }
.chip.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.chip input { margin: 0; accent-color: var(--accent); }
.places-map-slot { position: relative; margin-bottom: 12px; }
.places-map { height: 340px; border-radius: 14px; border: 1px solid var(--border); overflow: hidden; background: var(--surface-2); z-index: 0; }
.places-map.picking, .places-map.picking .leaflet-interactive { cursor: crosshair; }
@media (max-width: 860px) { .places-map { height: 270px; } }
.pin-hint { position: absolute; z-index: 500; top: 10px; left: 50%; transform: translateX(-50%); background: var(--surface); border: 1px solid var(--border); border-radius: 999px; padding: 6px 8px 6px 14px; font-size: 13px; box-shadow: 0 4px 14px rgba(0, 0, 0, .12); white-space: nowrap; }
.pin { background: none; border: none; }
.pin span { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); background: var(--accent); border: 2px solid #fff; box-shadow: 0 2px 6px rgba(0, 0, 0, .3); font-size: 16px; }
.pin i { font-style: normal; transform: rotate(45deg); line-height: 1; }
.pin.visited span { background: #9c8b7a; opacity: .75; }
.pin.approx span { border-style: dashed; }
.places { display: grid; gap: 8px; }
.place { display: flex; gap: 12px; padding: 12px; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; cursor: pointer; }
.place.visited { opacity: .6; }
.place-icon { font-size: 22px; line-height: 1.2; }
.place-main { flex: 1; min-width: 0; display: grid; gap: 3px; }
.place .ititle a { color: inherit; text-decoration: none; }
.place .ititle a:hover { text-decoration: underline; }
.place .meta { font-size: 13px; color: var(--muted); }
.place .note { font-size: 14px; }
.place .warn { color: #b0641c; }
.place-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.btn.voted { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }
