* {
  box-sizing: border-box;
}

:root {
  /* Frosted-glass palette designed to sit on top of the beach photo.
     Kept consistent across light/dark system themes — the photo sets the
     mood, so the UI stays a light "sea glass" frost either way. */
  --bg: #cfe6ea; /* fallback tint if the photo fails to load */
  --card-bg: rgba(255, 255, 255, 0.55);
  --card-bg-strong: rgba(255, 255, 255, 0.78);
  --glass-border: rgba(255, 255, 255, 0.6);
  --text: #0e2226;
  --text-muted: #3f565a;
  --accent: #0a6b74;
  --accent-dark: #084e55;
  --accent-contrast: #ffffff;
  --coral: #ef6f5b;
  --coral-dark: #d85843;
  --border: rgba(255, 255, 255, 0.5);
  --shadow: 0 4px 20px rgba(10, 40, 50, 0.18);
  --blur: saturate(160%) blur(16px);
  /* halo so labels sitting directly on the bright photo stay legible */
  --on-photo-halo: 0 1px 2px rgba(255, 255, 255, 0.85), 0 1px 10px rgba(255, 255, 255, 0.5);
  --chip-dining: #e85c46;
  --chip-activity: #0a6b74;
  --chip-transport: #3a63c4;
  --chip-other: #8a7c68;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

html, body {
  height: 100%;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}

/* Fixed beach photo behind everything (fixed-position element rather than
   background-attachment:fixed, which is unreliable on iOS Safari). */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  /* The photo sits on top; the gradient is a graceful fallback that shows
     until beach.jpg is added (and if it ever fails to load). */
  background-image: url("/beach.jpg"),
    linear-gradient(to bottom, #2f7fb0 0%, #4aa3c4 30%, #8fd0d8 55%, #e8f3ee 100%);
  background-size: cover, cover;
  background-position: center, center;
  background-repeat: no-repeat, no-repeat;
  z-index: -2;
}

/* Gentle scrim: darkens the very top and bottom (behind header + tab bar)
   for legibility while leaving the middle of the photo bright and clear. */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(6, 34, 44, 0.30) 0%,
    rgba(6, 34, 44, 0.06) 18%,
    rgba(6, 34, 44, 0.02) 55%,
    rgba(6, 34, 44, 0.10) 82%,
    rgba(6, 34, 44, 0.34) 100%
  );
  z-index: -1;
}

a {
  color: var(--accent);
}

button {
  font-family: inherit;
}

/* ---------------- Login page ---------------- */

.login-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.login-card {
  background: var(--card-bg-strong);
  -webkit-backdrop-filter: var(--blur);
  backdrop-filter: var(--blur);
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  box-shadow: var(--shadow);
  padding: 32px 24px;
  width: 100%;
  max-width: 360px;
  text-align: center;
}

.login-title {
  font-size: 28px;
  font-weight: 700;
  margin: 0 0 24px;
}

.login-card form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.login-card input {
  width: 100%;
}

.login-error {
  color: var(--coral-dark);
  font-size: 14px;
  min-height: 20px;
  margin: 4px 0 0;
}

/* ---------------- Form controls ---------------- */

input, select, textarea {
  font-size: 16px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--glass-border);
  background: var(--card-bg-strong);
  color: var(--text);
  font-family: inherit;
}

input::placeholder, textarea::placeholder {
  color: var(--text-muted);
}

input:focus, select:focus, textarea:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: none;
  border-radius: 12px;
  padding: 12px 18px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  min-height: 44px;
}

.btn-primary {
  background: var(--accent);
  color: var(--accent-contrast);
}

.btn-primary:active {
  background: var(--accent-dark);
}

.btn-secondary {
  background: var(--card-bg-strong);
  color: var(--accent-dark);
  border: 1px solid var(--accent);
}

.btn-delete {
  background: var(--coral);
  color: #fff;
}

.btn-delete:active {
  background: var(--coral-dark);
}

.btn-block {
  width: 100%;
}

.btn-small {
  padding: 8px 14px;
  font-size: 14px;
  min-height: 36px;
}

/* ---------------- App shell ---------------- */

.app {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.header {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: calc(14px + env(safe-area-inset-top, 0px)) 16px 14px;
  background: rgba(255, 255, 255, 0.35);
  -webkit-backdrop-filter: var(--blur);
  backdrop-filter: var(--blur);
  border-bottom: 1px solid var(--glass-border);
}

.header h1 {
  font-size: 20px;
  margin: 0;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.me-name {
  font-size: 14px;
  color: var(--text);
  font-weight: 600;
}

.logout-btn {
  background: var(--card-bg-strong);
  border: 1px solid var(--glass-border);
  color: var(--text);
  border-radius: 10px;
  padding: 8px 12px;
  font-size: 14px;
  cursor: pointer;
  min-height: 36px;
}

.main {
  flex: 1;
  padding: 16px 16px calc(90px + var(--safe-bottom));
  max-width: 640px;
  margin: 0 auto;
  width: 100%;
}

.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
}

.tab-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  gap: 8px;
}

.tab-header-row h2 {
  margin: 0;
  font-size: 18px;
  color: #ffffff;
  text-shadow: 0 1px 3px rgba(6, 34, 44, 0.55), 0 1px 12px rgba(6, 34, 44, 0.35);
}

/* ---------------- Bottom tab bar ---------------- */

.tab-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  background: rgba(255, 255, 255, 0.55);
  -webkit-backdrop-filter: var(--blur);
  backdrop-filter: var(--blur);
  border-top: 1px solid var(--glass-border);
  padding-bottom: var(--safe-bottom);
  z-index: 10;
}

.tab-btn {
  flex: 1;
  min-width: 0;
  background: none;
  border: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 8px 2px 10px;
  min-height: 56px;
  color: var(--text);
  cursor: pointer;
  font-size: 11px;
}

.tab-btn .tab-icon {
  font-size: 20px;
  line-height: 1;
}

.tab-btn span:last-child {
  display: block;
  width: 100%;
  box-sizing: border-box;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tab-btn.active {
  color: var(--accent-dark);
  font-weight: 700;
}

/* ---------------- Cards ---------------- */

.day-group {
  margin-bottom: 22px;
}

.day-header {
  font-size: 14px;
  font-weight: 800;
  color: #ffffff;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin: 0 0 8px 2px;
  text-shadow: 0 1px 3px rgba(6, 34, 44, 0.55), 0 1px 12px rgba(6, 34, 44, 0.35);
}

.card {
  background: var(--card-bg);
  -webkit-backdrop-filter: var(--blur);
  backdrop-filter: var(--blur);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  box-shadow: var(--shadow);
  padding: 14px 16px;
  margin-bottom: 10px;
}

.card-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.card-title {
  font-weight: 700;
  font-size: 16px;
  margin: 0 0 4px;
}

.card-sub {
  color: var(--text-muted);
  font-size: 14px;
  margin: 0 0 2px;
}

.card-time {
  font-weight: 700;
  font-size: 14px;
  color: var(--accent);
  white-space: nowrap;
}

.card-notes {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 6px;
  white-space: pre-wrap;
}

.card-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
}

/* Small, light Edit/Delete icon buttons — always at the end of the actions
   row so revealing them on hover never shifts other content sideways. */
.card-icon-actions {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
}

.card-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  line-height: 0;
}

.card-icon-btn svg {
  width: 16px;
  height: 16px;
  display: block;
}

.card-icon-btn:hover,
.card-icon-btn:focus-visible {
  background: rgba(255, 255, 255, 0.5);
  color: var(--text);
}

.card-icon-delete:hover,
.card-icon-delete:focus-visible {
  color: var(--coral);
}

.card-icon-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

/* Desktop / mouse: icon actions read as invisible until the card is hovered
   (or keyboard-focused), but they ALWAYS occupy their space — toggling
   visibility (not display) so revealing them never resizes the card or makes
   the list jump. */
@media (hover: hover) and (pointer: fine) {
  .card-icon-actions {
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.12s ease;
  }

  .card:hover .card-icon-actions,
  .card:focus-within .card-icon-actions {
    visibility: visible;
    opacity: 1;
  }
}

/* Touch devices have no hover state, so keep icon actions visible so
   mobile users can still edit/delete. */
@media (hover: none) {
  .card-icon-actions {
    visibility: visible;
    opacity: 1;
  }
}

/* ---------------- Attachments (docs on flights/reservations) ---------------- */
.attachments {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--glass-border);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
}

.attach-row {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
  font-size: 13px;
}

.attach-icon {
  flex: 0 0 auto;
  font-size: 14px;
  line-height: 1;
}

.attach-name {
  flex: 1 1 auto;
  min-width: 0;
  color: var(--accent-dark);
  text-decoration: underline;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.attach-del {
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  border: none;
  border-radius: 50%;
  background: rgba(6, 34, 44, 0.15);
  color: var(--text-muted);
  font-size: 11px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.flight-route {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  margin: 4px 0;
}

.flight-arrow {
  color: var(--text-muted);
}

.chip {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  padding: 3px 9px;
  border-radius: 999px;
  color: #fff;
}

.chip-dining { background: var(--chip-dining); }
.chip-activity { background: var(--chip-activity); }
.chip-transport { background: var(--chip-transport); }
.chip-other { background: var(--chip-other); }
.chip-stay { background: #2a9d8f; }

.category-group {
  margin-bottom: 20px;
}

.category-header {
  font-size: 14px;
  font-weight: 700;
  margin: 0 0 8px 2px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.empty-state {
  text-align: center;
  color: var(--text);
  padding: 40px 20px;
  font-size: 15px;
  background: var(--card-bg);
  -webkit-backdrop-filter: var(--blur);
  backdrop-filter: var(--blur);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  box-shadow: var(--shadow);
}

/* ---------------- Stay tab ---------------- */

.stay-card .card-title {
  font-size: 20px;
}

.stay-field {
  margin: 10px 0;
}

.stay-field-label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  margin: 0 0 2px;
}

.stay-field-value {
  font-size: 15px;
  white-space: pre-wrap;
}

.maps-buttons {
  display: flex;
  gap: 8px;
  margin: 12px 0;
  flex-wrap: wrap;
}

/* ---------------- Stay tab: villa photos ---------------- */

.photos-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 18px 0 4px;
}

.photos-header h3 {
  margin: 0;
  font-size: 16px;
  color: #ffffff;
  text-shadow: 0 1px 3px rgba(6, 34, 44, 0.55), 0 1px 12px rgba(6, 34, 44, 0.35);
}

.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.photo-thumb {
  position: relative;
  aspect-ratio: 1;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow);
  cursor: pointer;
}

.photo-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  -webkit-user-select: none;
  user-select: none;
  -webkit-user-drag: none;
}

/* Host-only drag-to-reorder villa thumbnails. touch-action:manipulation lets a
   quick swipe still scroll the page; the JS long-press flips it to none only
   once a drag actually starts. */
.photo-thumb.draggable {
  cursor: grab;
  touch-action: manipulation;
}

.photo-thumb.dragging {
  cursor: grabbing;
  opacity: 0.85;
  transform: scale(1.06);
  box-shadow: 0 10px 28px rgba(6, 34, 44, 0.45);
  z-index: 2;
}

.photo-grid.reordering {
  cursor: grabbing;
}

/* Host-only delete ✕ overlaid on a photo thumbnail. */
.photo-del {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 26px;
  height: 26px;
  border: none;
  border-radius: 50%;
  background: rgba(6, 34, 44, 0.6);
  color: #fff;
  font-size: 13px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 3;
  transition: opacity 0.15s;
}

.photo-del:hover {
  background: rgba(6, 34, 44, 0.8);
}

/* Desktop (mouse): keep controls out of the way until the item is hovered. */
@media (hover: hover) and (pointer: fine) {
  .photo-del {
    opacity: 0;
    pointer-events: none;
  }
  .photo-thumb:hover .photo-del {
    opacity: 1;
    pointer-events: auto;
  }
  .attach-del {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.15s;
  }
  .attach-row:hover .attach-del {
    opacity: 1;
    pointer-events: auto;
  }
}

/* Touch devices (no hover): the thumbnail ✕ can't be revealed, so hide it and
   let mobile hosts delete via the lightbox. The attachment ✕ stays visible. */
@media (hover: none) {
  .photo-del {
    display: none;
  }
}

.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(4, 22, 28, 0.9);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  z-index: 30;
  padding: 16px;
  overflow: hidden;
}

.lightbox-stage {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 900px;
  flex: 0 1 auto;
  min-height: 0;
}

.lightbox img {
  max-width: 100%;
  max-height: 60vh;
  border-radius: 12px;
  display: block;
}

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border: none;
  border-radius: 50%;
  background: rgba(6, 34, 44, 0.55);
  color: #fff;
  font-size: 30px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-nav.prev {
  left: 6px;
}

.lightbox-nav.next {
  right: 6px;
}

.lightbox-counter {
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  text-shadow: 0 1px 3px rgba(6, 34, 44, 0.6);
}

.lightbox-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 50%;
  background: rgba(6, 34, 44, 0.55);
  color: #fff;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
}

/* Subtle delete ✕ in the image's top-right corner — reveals on hover of the
   image (desktop), always visible on touch, tints coral to signal deletion. */
.lightbox-del {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 34px;
  height: 34px;
  border: none;
  border-radius: 50%;
  background: rgba(6, 34, 44, 0.4);
  color: rgba(255, 255, 255, 0.9);
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 3;
  opacity: 0;
  transition: opacity 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.lightbox-stage:hover .lightbox-del,
.lightbox-del:focus-visible {
  opacity: 1;
}

.lightbox-del:hover {
  background: var(--coral);
  color: #fff;
}

@media (hover: none) {
  .lightbox-del { opacity: 1; }
}

.lightbox-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  align-items: center;
  min-height: 0;
}

.lightbox-actions:empty {
  display: none;
}

/* Comfortable tap targets for the toolbar buttons on the dark backdrop. */
.lightbox-actions .btn {
  min-height: 40px;
  padding: 8px 16px;
  box-shadow: 0 2px 10px rgba(6, 34, 44, 0.4);
}

.lightbox-comments {
  width: 100%;
  max-width: 520px;
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  background: var(--card-bg-strong);
  border: 1px solid var(--glass-border);
  border-radius: 14px;
  box-shadow: var(--shadow);
  padding: 12px;
  overflow: hidden;
}

.lightbox-meta {
  font-size: 13px;
  color: var(--text);
  padding-bottom: 8px;
  border-bottom: 1px solid var(--glass-border);
  margin-bottom: 8px;
}

.lightbox-uploader {
  font-weight: 600;
  color: var(--text-muted);
}

.lightbox-caption {
  color: var(--text);
  margin-top: 2px;
}

.comment-thread {
  flex: 1 1 auto;
  overflow-y: auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.comment-empty {
  color: var(--text-muted);
  font-size: 13px;
  margin: 0;
}

.comment-row {
  display: flex;
  align-items: baseline;
  gap: 6px;
  font-size: 13px;
  color: var(--text);
  line-height: 1.35;
}

.comment-author {
  font-weight: 600;
  color: var(--text-muted);
  flex: 0 0 auto;
}

.comment-text {
  flex: 1 1 auto;
  word-break: break-word;
}

.comment-del {
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  border: none;
  border-radius: 50%;
  background: rgba(6, 34, 44, 0.15);
  color: var(--text-muted);
  font-size: 11px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.comment-input-row {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}

.comment-input {
  flex: 1 1 auto;
  min-width: 0;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid var(--glass-border);
  background: var(--card-bg-strong);
  color: var(--text);
  font-size: 14px;
}

.comment-input:focus {
  outline: 2px solid var(--accent);
}

/* ---------------- Photos tab: group gallery ---------------- */

.photo-cap {
  font-size: 12px;
  color: var(--text);
  padding: 4px 2px 0;
  line-height: 1.3;
}

.photo-cap span {
  color: var(--text-muted);
  font-weight: 600;
}

/* ---------------- People tab ---------------- */

.person-links {
  display: flex;
  gap: 14px;
  margin-top: 6px;
  font-size: 14px;
}

.person-links a {
  text-decoration: none;
  font-weight: 600;
}

/* ---------------- Modal / bottom sheet ---------------- */

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(10, 20, 22, 0.45);
  display: none;
  align-items: flex-end;
  justify-content: center;
  z-index: 20;
}

.modal-backdrop.open {
  display: flex;
}

.modal-sheet {
  background: rgba(244, 250, 250, 0.82);
  -webkit-backdrop-filter: saturate(160%) blur(24px);
  backdrop-filter: saturate(160%) blur(24px);
  border-top: 1px solid var(--glass-border);
  width: 100%;
  max-width: 640px;
  border-radius: 20px 20px 0 0;
  padding: 18px 18px calc(24px + var(--safe-bottom));
  max-height: 88vh;
  overflow-y: auto;
  box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.25);
  animation: slide-up 0.2s ease-out;
}

@keyframes slide-up {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.modal-header h3 {
  margin: 0;
  font-size: 18px;
}

.modal-close {
  background: none;
  border: none;
  font-size: 22px;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px 8px;
  min-height: 36px;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 14px;
}

.form-field label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
}

.form-row {
  display: flex;
  gap: 10px;
}

.form-row .form-field {
  flex: 1;
}

.modal-status {
  min-height: 18px;
  font-size: 13px;
  color: var(--text-muted);
  margin: 2px 2px 10px;
  transition: color 0.15s ease;
}

.modal-status-error {
  color: #b23b3b;
}

.modal-actions {
  display: flex;
  gap: 10px;
  margin-top: 6px;
}

/* ---------------- Unsaved-draft restore banner ---------------- */

.draft-banner {
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: calc(76px + var(--safe-bottom));
  max-width: 616px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: rgba(244, 250, 250, 0.92);
  -webkit-backdrop-filter: saturate(160%) blur(20px);
  backdrop-filter: saturate(160%) blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: 14px;
  padding: 10px 14px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.18);
  z-index: 25;
}

.draft-banner-text {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

.draft-banner-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.fab-add {
  margin-bottom: 12px;
}

/* ---------------- Person login hint ---------------- */

.login-hint {
  display: inline-block;
  font-size: 12px;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.5);
  border: 1px dashed var(--accent);
  border-radius: 8px;
  padding: 2px 8px;
  margin-top: 6px;
}

.checkbox-field {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-direction: row !important;
}

.checkbox-field input[type="checkbox"] {
  width: 22px;
  height: 22px;
  padding: 0;
}

/* ---------------- Packing tab ---------------- */

.chip-row {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 10px;
  margin-bottom: 12px;
  -webkit-overflow-scrolling: touch;
}

.person-chip {
  flex: none;
  border: 1px solid var(--glass-border);
  background: var(--card-bg-strong);
  -webkit-backdrop-filter: var(--blur);
  backdrop-filter: var(--blur);
  color: var(--text);
  border-radius: 999px;
  padding: 8px 16px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  min-height: 40px;
  white-space: nowrap;
}

.person-chip.active {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-contrast);
}

.checklist-item {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--card-bg);
  -webkit-backdrop-filter: var(--blur);
  backdrop-filter: var(--blur);
  border: 1px solid var(--glass-border);
  border-radius: 14px;
  box-shadow: var(--shadow);
  padding: 12px 14px;
  margin-bottom: 8px;
  transition: opacity 0.15s ease;
}

.checklist-check {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 2px solid var(--accent);
  background: transparent;
  flex: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-contrast);
  font-size: 14px;
  padding: 0;
}

.checklist-check.checked {
  background: var(--accent);
}

.checklist-check[disabled] {
  cursor: default;
  opacity: 0.6;
}

.checklist-text {
  flex: 1;
  font-size: 15px;
  word-break: break-word;
}

.checklist-item.is-checked .checklist-text {
  text-decoration: line-through;
  color: var(--text-muted);
}

.checklist-item.is-checked {
  opacity: 0.7;
}

.chip-host {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-contrast);
  flex: none;
}

.checklist-delete {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 18px;
  cursor: pointer;
  padding: 4px 6px;
  flex: none;
  min-height: 32px;
}

.packing-add-row {
  position: sticky;
  bottom: calc(70px + var(--safe-bottom));
  display: flex;
  gap: 8px;
  background: rgba(255, 255, 255, 0.45);
  -webkit-backdrop-filter: var(--blur);
  backdrop-filter: var(--blur);
  border-radius: 14px;
  padding: 10px;
  box-shadow: var(--shadow);
}

.packing-add-row input {
  flex: 1;
}

.shared-summary {
  margin-top: 18px;
}

.shared-summary-title {
  font-size: 14px;
  font-weight: 800;
  color: var(--text);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin: 0 0 8px 2px;
  text-shadow: var(--on-photo-halo);
}

.shared-summary-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--card-bg);
  -webkit-backdrop-filter: var(--blur);
  backdrop-filter: var(--blur);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  padding: 10px 14px;
  margin-bottom: 6px;
  font-size: 14px;
}

.shared-summary-count {
  color: var(--text-muted);
  font-size: 13px;
  white-space: nowrap;
  margin-left: 10px;
}
