/* ===== Abif · Alice & Isaac ===== */

:root {
  --bg: #faf6ef;
  --card: #ffffff;
  --ink: #2d2620;
  --muted: #94897b;
  --line: #ece4d8;
  --isaac: #6f8b6e;
  --isaac-soft: #e7eee5;
  --isaac-ink: #465c45;
  --alice: #c96f5d;
  --alice-soft: #f8e6e0;
  --alice-ink: #9c4a3a;
  --plum-soft: #ece3f0;
  --plum-ink: #6d5377;
  --accent: #c96f5d;
  --gold: #d9a441;
  --shadow: 0 1px 2px rgba(45, 38, 32, .05), 0 8px 28px rgba(45, 38, 32, .08);
  --radius: 18px;
  --font-display: 'Fraunces', Georgia, serif;
  --font-body: 'Inter', system-ui, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

button, input, select, textarea, a {
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--bg);
  background-image:
    radial-gradient(1100px 500px at 85% -10%, rgba(201, 111, 93, .10), transparent 60%),
    radial-gradient(900px 500px at -10% 110%, rgba(111, 139, 110, .12), transparent 60%);
  background-attachment: fixed;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

.hidden { display: none !important; }

/* ===== Login ===== */
.screen {
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.login-card {
  background: var(--card);
  border-radius: 28px;
  box-shadow: var(--shadow);
  padding: 48px 44px 40px;
  width: 100%;
  max-width: 400px;
  text-align: center;
}

.logo-rings { display: inline-flex; margin-bottom: 6px; }
.ring {
  width: 44px; height: 44px; border-radius: 50%; display: inline-block;
}
.ring-i { background: var(--isaac); opacity: .9; }
.ring-a { background: var(--alice); opacity: .85; margin-left: -16px; mix-blend-mode: multiply; }

.wordmark {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 44px;
  letter-spacing: -.02em;
  margin: 6px 0 4px;
}

.login-sub { color: var(--muted); margin: 0 0 28px; font-size: 14.5px; }

.who { display: flex; gap: 14px; justify-content: center; margin-bottom: 20px; }
.who-btn {
  flex: 1;
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  padding: 18px 10px 14px;
  background: var(--bg);
  border: 2px solid transparent;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 15px; font-weight: 600; color: var(--ink);
  cursor: pointer;
  transition: border-color .15s, transform .15s;
}
.who-btn:hover { transform: translateY(-2px); }
.who-btn.selected { border-color: var(--accent); background: #fff; box-shadow: var(--shadow); }

.avatar {
  width: 44px; height: 44px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-weight: 600; font-size: 19px; color: #fff;
}
.avatar-isaac { background: var(--isaac); }
.avatar-alice { background: var(--alice); }

#login-form { display: flex; flex-direction: column; gap: 12px; }
#login-form input {
  padding: 13px 16px;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  font-size: 16px;
  font-family: var(--font-body);
  outline: none;
  transition: border-color .15s;
}
#login-form input:focus { border-color: var(--accent); }

.login-error { color: var(--alice-ink); font-size: 14px; min-height: 20px; margin: 12px 0 0; }

/* ===== Buttons ===== */
.btn {
  border: none; cursor: pointer;
  font-family: var(--font-body); font-weight: 600; font-size: 15px;
  border-radius: 999px;
  padding: 12px 24px;
  transition: transform .12s, box-shadow .12s, background .12s;
}
.btn-primary { background: var(--ink); color: #fff; }
.btn-primary:hover { transform: translateY(-1px); box-shadow: var(--shadow); }
.btn-danger { background: var(--alice-soft); color: var(--alice-ink); }

.ghost-btn {
  background: none; border: 1.5px solid var(--line); border-radius: 999px;
  padding: 7px 16px; font-family: var(--font-body); font-size: 13.5px; font-weight: 500;
  color: var(--muted); cursor: pointer; transition: all .12s;
}
.ghost-btn:hover { border-color: var(--ink); color: var(--ink); }

.icon-btn {
  background: var(--card); border: 1.5px solid var(--line); border-radius: 50%;
  width: 36px; height: 36px; font-size: 20px; line-height: 1;
  color: var(--ink); cursor: pointer; transition: all .12s;
}
.icon-btn:hover { border-color: var(--ink); }

/* ===== Topbar ===== */
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 28px;
  max-width: 1060px; margin: 0 auto;
  gap: 16px;
}

.brand { display: flex; align-items: center; gap: 10px; }
.brand-rings {
  width: 30px; height: 22px; display: inline-block;
  background:
    radial-gradient(circle at 32% 50%, var(--isaac) 0 46%, transparent 47%),
    radial-gradient(circle at 68% 50%, var(--alice) 0 46%, transparent 47%);
}
.brand-name { font-family: var(--font-display); font-weight: 600; font-size: 24px; letter-spacing: -.01em; }

.tabs {
  display: flex; gap: 4px;
  background: rgba(255,255,255,.75);
  border: 1px solid var(--line);
  padding: 4px; border-radius: 999px;
  backdrop-filter: blur(8px);
}
.tab {
  position: relative;
  border: none; background: none; cursor: pointer;
  font-family: var(--font-body); font-size: 14.5px; font-weight: 600;
  color: var(--muted);
  padding: 9px 20px; border-radius: 999px;
  transition: all .15s;
}
.tab:hover { color: var(--ink); }
.tab.active { background: var(--ink); color: #fff; }
.tab-ico { display: none; width: 20px; height: 20px; }

/* eight tabs need a little less air on narrower desktops */
@media (max-width: 1024px) {
  .tab { padding: 9px 13px; font-size: 13.5px; }
}

/* tablets and narrow desktops: give the tabs their own row so nothing gets squashed */
@media (max-width: 1024px) and (min-width: 721px) {
  .topbar { flex-wrap: wrap; }
  .tabs { order: 3; flex: 1 1 100%; justify-content: center; overflow-x: auto; scrollbar-width: none; }
  .tabs::-webkit-scrollbar { display: none; }
  .tab { padding: 8px 11px; font-size: 13px; flex-shrink: 0; }
}

.badge {
  position: absolute; top: 2px; right: 6px;
  background: var(--alice); color: #fff;
  font-size: 10.5px; font-weight: 700;
  min-width: 17px; height: 17px; border-radius: 999px;
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0 4px;
}

.topbar-right { display: flex; align-items: center; gap: 12px; }
.topbar-right .avatar { width: 34px; height: 34px; font-size: 15px; }

main { max-width: 1060px; margin: 0 auto; padding: 8px 28px 80px; }

.section-title {
  font-family: var(--font-display); font-weight: 600;
  font-size: 30px; letter-spacing: -.01em; margin: 14px 0 18px;
}

.card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

/* ===== Calendar ===== */
.cal-head { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 10px; }
.cal-nav { display: flex; gap: 8px; align-items: center; }

.cal-weekdays {
  display: grid; grid-template-columns: repeat(7, 1fr);
  gap: 8px; padding: 0 2px 8px;
  font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase;
  color: var(--muted); text-align: center;
}

.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; }

.cal-day {
  background: var(--card);
  border-radius: 14px;
  min-height: 96px;
  padding: 8px 8px 6px;
  box-shadow: 0 1px 2px rgba(45,38,32,.04);
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: border-color .12s, transform .12s;
  display: flex; flex-direction: column; gap: 4px;
  overflow: hidden;
}
.cal-day:hover { border-color: var(--line); transform: translateY(-1px); }
.cal-day.other { background: transparent; box-shadow: none; opacity: .45; }
.cal-day.today { border-color: var(--gold); }

.cal-daynum { font-size: 13px; font-weight: 600; color: var(--muted); }
.cal-day.today .cal-daynum {
  color: #fff; background: var(--gold);
  width: 22px; height: 22px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
}

.pill {
  font-size: 11.5px; font-weight: 600;
  border-radius: 7px; padding: 3px 7px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.pill-isaac { background: var(--isaac-soft); color: var(--isaac-ink); }
.pill-alice { background: var(--alice-soft); color: var(--alice-ink); }
.pill-both { background: #f0e8cf; color: #8a6d2f; }
.pill-task { background: rgba(255, 255, 255, .72); border: 1.2px dashed currentColor; }
.pill-rem { background: var(--plum-soft); color: var(--plum-ink); }

/* ===== Plans ===== */
.task-form { padding: 18px; margin-bottom: 22px; }
/* the big first input in every add form: plans, trips, shopping, reminders, itinerary */
.task-form > input {
  width: 100%; border: none; outline: none;
  font-family: var(--font-body); font-size: 17px; font-weight: 500;
  padding: 4px 2px 14px; color: var(--ink);
  border-bottom: 1.5px solid var(--line);
  margin-bottom: 14px; background: none;
}
.task-form > input::placeholder { color: var(--muted); }

.task-form-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.task-form-row input[type="date"] {
  border: 1.5px solid var(--line); border-radius: 999px;
  padding: 8px 14px; font-family: var(--font-body); font-size: 13.5px; color: var(--muted);
  background: none; outline: none;
}

.chip-group { display: flex; gap: 6px; }
.chip {
  border: 1.5px solid var(--line); background: none; border-radius: 999px;
  padding: 8px 14px; font-family: var(--font-body); font-size: 13.5px; font-weight: 600;
  color: var(--muted); cursor: pointer; transition: all .12s;
}
.chip.active { background: var(--ink); color: #fff; border-color: var(--ink); }

.attach-label {
  cursor: pointer; font-size: 17px;
  border: 1.5px solid var(--line); border-radius: 50%;
  width: 38px; height: 38px;
  display: inline-flex; align-items: center; justify-content: center;
  transition: border-color .12s;
}
.attach-label:hover { border-color: var(--ink); }

.task-form-row .btn { margin-left: auto; }

.task-group-title {
  font-size: 12.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  color: var(--muted); margin: 26px 4px 10px;
}

.task {
  display: flex; align-items: flex-start; gap: 14px;
  background: var(--card); border-radius: 14px;
  padding: 14px 16px; margin-bottom: 8px;
  box-shadow: 0 1px 2px rgba(45,38,32,.04);
}
.task.done { opacity: .55; }
.task.done .task-title { text-decoration: line-through; }

.task-check {
  flex-shrink: 0; width: 24px; height: 24px; margin-top: 1px;
  border: 2px solid var(--line); border-radius: 50%;
  background: none; cursor: pointer; font-size: 13px; color: #fff;
  transition: all .12s;
}
.task-check:hover { border-color: var(--isaac); }
.task.done .task-check { background: var(--isaac); border-color: var(--isaac); }

.task-main { flex: 1; min-width: 0; }
.task-title { font-size: 15.5px; font-weight: 500; }
.task-meta { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 5px; font-size: 12.5px; color: var(--muted); }
.task-meta .overdue { color: var(--alice-ink); font-weight: 600; }

.assignee-chip {
  font-size: 11.5px; font-weight: 700; border-radius: 999px; padding: 2px 9px;
}
.assignee-isaac { background: var(--isaac-soft); color: var(--isaac-ink); }
.assignee-alice { background: var(--alice-soft); color: var(--alice-ink); }
.assignee-both { background: #f0ead9; color: #8a6d2f; }

.task-del {
  border: none; background: none; color: var(--muted); cursor: pointer;
  font-size: 16px; opacity: 0; transition: opacity .12s; padding: 2px 6px;
}
.task:hover .task-del { opacity: .7; }
.task-del:hover { color: var(--alice-ink); }

.empty-note { text-align: center; color: var(--muted); padding: 40px 0; font-size: 15px; }

/* ===== Attachments ===== */
.att-card {
  display: inline-flex; align-items: center; gap: 9px;
  background: var(--bg); border: 1px solid var(--line); border-radius: 11px;
  padding: 8px 12px; font-size: 13px; font-weight: 500;
  color: var(--ink); text-decoration: none;
  max-width: 260px;
}
.att-card:hover { border-color: var(--accent); }
.att-icon { font-size: 17px; }
.att-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.att-size { color: var(--muted); font-size: 11.5px; flex-shrink: 0; }
.att-img { max-width: 220px; max-height: 180px; border-radius: 11px; display: block; }

.pending-files { display: flex; gap: 8px; flex-wrap: wrap; }
.pending-files:not(:empty) { margin-top: 12px; }
.pending-file {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--isaac-soft); border-radius: 999px;
  padding: 6px 12px; font-size: 13px; font-weight: 500; color: var(--isaac-ink);
}
.pending-file button { border: none; background: none; cursor: pointer; color: inherit; font-size: 14px; padding: 0; }

/* ===== Trips ===== */
.pill-trip { background: #ddeef0; color: #35707c; }
.day-event.by-trip { background: #ddeef0; align-items: flex-start; }
.day-trip-item { font-size: 12.5px; color: #35707c; margin-top: 4px; }
.day-trip-conv { font-size: 11px; color: #5a8a94; margin: 1px 0 0 22px; }

.tz-select {
  border: 1.5px solid var(--line); border-radius: 999px;
  padding: 8px 12px; font-family: var(--font-body); font-size: 13.5px; color: var(--ink);
  background: var(--card); outline: none; max-width: 300px;
}
.tz-select:focus { border-color: var(--accent); }

.trip-now {
  font-size: 13px; font-weight: 600; color: #35707c;
  background: #ddeef0; border-radius: 999px; display: inline-block;
  padding: 5px 14px; margin-top: 10px;
}

.text-pill {
  border: 1.5px solid var(--line); border-radius: 999px;
  padding: 8px 14px; font-family: var(--font-body); font-size: 13.5px; color: var(--ink);
  background: none; outline: none; transition: border-color .12s;
}
.text-pill:focus { border-color: var(--accent); }
.text-pill::placeholder { color: var(--muted); }

.inline-label {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 12.5px; font-weight: 600; color: var(--muted);
}
.inline-label input[type="date"], .inline-label input[type="time"] {
  border: 1.5px solid var(--line); border-radius: 999px;
  padding: 8px 12px; font-family: var(--font-body); font-size: 13.5px; color: var(--ink);
  background: none; outline: none;
}

.form-hint { font-size: 12.5px; color: var(--muted); }

.trip-card { padding: 16px 18px; margin-bottom: 10px; cursor: pointer; border: 1.5px solid transparent; transition: border-color .12s, transform .12s; }
.trip-card:hover { border-color: var(--line); transform: translateY(-1px); }
.trip-card-name { font-family: var(--font-display); font-weight: 600; font-size: 20px; }
.trip-card-sub { font-size: 13px; color: var(--muted); margin-top: 4px; line-height: 1.5; }

.trip-back { margin: 14px 0 12px; }
.trip-head { padding: 18px 20px; margin-bottom: 16px; }
.trip-head-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.trip-head-name { font-family: var(--font-display); font-weight: 600; font-size: 26px; margin: 0; letter-spacing: -.01em; }
.trip-head-btns { display: flex; gap: 8px; }
.trip-head-sub { font-size: 13.5px; color: var(--muted); margin-top: 6px; line-height: 1.5; }
.trip-head-notes { font-size: 14px; margin-top: 8px; }

.trip-day-title {
  font-size: 12.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  color: var(--muted); margin: 22px 4px 8px;
}
.trip-day-empty { font-size: 13px; color: var(--muted); padding: 4px 6px 2px; font-style: italic; }

.trip-item {
  display: flex; align-items: flex-start; gap: 12px;
  background: var(--card); border-radius: 14px;
  padding: 13px 15px; margin-bottom: 8px;
  box-shadow: 0 1px 2px rgba(45,38,32,.04);
}
.trip-item-ico { font-size: 19px; margin-top: 1px; }
.trip-item-main { flex: 1; min-width: 0; }
.trip-item-title { font-size: 15px; font-weight: 500; }
.trip-item-sub { font-size: 12.5px; color: var(--muted); margin-top: 3px; }
.trip-item-atts { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 7px; }
.trip-item button[data-edit-item], .trip-item button[data-del-item] {
  border: none; background: none; color: var(--muted); cursor: pointer;
  font-size: 15px; opacity: 0; transition: opacity .12s; padding: 2px 5px;
}
.trip-item:hover button { opacity: .7; }
.trip-item button:hover { color: var(--alice-ink); }

.trip-kind-chip {
  font-size: 10.5px; font-weight: 700; border-radius: 999px; padding: 2px 8px;
  background: var(--bg); color: var(--muted); vertical-align: middle;
}
.trip-kind-flight { background: #ddeef0; color: #35707c; }
.trip-kind-stay { background: var(--plum-soft); color: var(--plum-ink); }
.trip-kind-transport { background: #f0e8cf; color: #8a6d2f; }
.trip-kind-activity { background: var(--alice-soft); color: var(--alice-ink); }
.trip-kind-food { background: var(--isaac-soft); color: var(--isaac-ink); }

.chip-wrap { flex-wrap: wrap; }
#ti-kind { flex-wrap: wrap; }

/* ===== Groceries ===== */
.sugg-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.sugg-chip { background: var(--card); box-shadow: 0 1px 2px rgba(45,38,32,.04); border-color: transparent; color: var(--ink); }
.sugg-chip:hover { border-color: var(--isaac); color: var(--isaac-ink); }
.sugg-chip:disabled { opacity: .5; cursor: default; }

.grocery-cat {
  margin: 16px 4px 6px; font-size: 11.5px; letter-spacing: .05em;
  text-transform: none; color: var(--muted);
}

.grocery-got-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.grocery-got-head .task-group-title { margin: 26px 4px 10px; }
.grocery-got-head .ghost-btn { margin-top: 14px; }

/* ===== News ===== */
.news-head { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 10px; }
.news-updated { font-size: 12.5px; color: var(--muted); }
.news-intro { color: var(--muted); font-size: 13.5px; margin: -6px 0 16px; line-height: 1.5; }
.news-filters { flex-wrap: wrap; margin-bottom: 6px; }

.news-item {
  display: block;
  background: var(--card); border-radius: 14px;
  padding: 14px 16px; margin-bottom: 8px;
  box-shadow: 0 1px 2px rgba(45,38,32,.04);
  text-decoration: none; color: var(--ink);
  border: 1.5px solid transparent;
  transition: border-color .12s, transform .12s;
}
.news-item:hover { border-color: var(--line); transform: translateY(-1px); }

.news-item-top { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; flex-wrap: wrap; }
.news-source {
  font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  color: var(--muted);
}
.news-time { font-size: 11.5px; color: var(--muted); margin-left: auto; }

.news-topic {
  font-size: 11px; font-weight: 700; border-radius: 999px; padding: 2px 9px;
  background: var(--bg); color: var(--muted);
}
.news-topic-conflict { background: var(--alice-soft); color: var(--alice-ink); }
.news-topic-diplomacy { background: var(--plum-soft); color: var(--plum-ink); }
.news-topic-economy { background: #f0e8cf; color: #8a6d2f; }
.news-topic-politics { background: var(--isaac-soft); color: var(--isaac-ink); }
.news-topic-climate { background: #ddeef0; color: #35707c; }
.news-topic-australia { background: #fdeecd; color: #a2701c; }

.news-paywall {
  font-size: 11px; font-weight: 700; border-radius: 999px; padding: 2px 9px;
  background: #f3efe6; color: #8a7a55; border: 1px dashed #d8cdb4;
}

.news-title { font-size: 15.5px; font-weight: 600; line-height: 1.35; }
.news-summary { font-size: 13.5px; color: var(--muted); line-height: 1.5; margin-top: 5px; }

@media (max-width: 720px) {
  .news-item { padding: 13px 14px; }
  .news-summary { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
}

/* ===== Workout ===== */
.wo-intro { color: var(--muted); font-size: 13.5px; margin: -6px 0 14px; line-height: 1.5; }

.wo-track { padding: 18px; margin-bottom: 18px; }
.wo-track-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.wo-track-title { font-family: var(--font-display); font-weight: 600; font-size: 21px; margin: 0; }
.wo-track > .form-hint { display: block; margin: 6px 0 12px; }
#wo-day-pick { margin-bottom: 10px; }
.wo-hint { color: var(--muted); font-size: 14px; line-height: 1.55; padding: 14px 2px 4px; margin: 0; }

.wo-day-title {
  font-size: 12.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  color: var(--muted); margin: 18px 2px 6px;
}
.wo-item { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.wo-item.done .wo-item-name { text-decoration: line-through; opacity: .6; }
.wo-item-main { flex: 1; min-width: 0; }
.wo-item-name { font-size: 14.5px; font-weight: 500; }
.wo-item-detail { font-size: 12.5px; color: var(--muted); margin-top: 2px; }

.wo-weight {
  width: 86px; flex-shrink: 0; text-align: center;
  border: 1.5px solid var(--line); border-radius: 999px;
  padding: 8px 10px; font-family: var(--font-body); font-size: 14px; font-weight: 600;
  color: var(--ink); background: none; outline: none; transition: border-color .12s;
}
.wo-weight:focus { border-color: var(--accent); }
.wo-weight::placeholder { color: var(--muted); font-weight: 400; }

.wo-finish-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-top: 14px; }
.wo-progress { font-size: 13px; font-weight: 600; color: var(--muted); }
.wo-done-badge {
  font-size: 13.5px; font-weight: 700; color: var(--isaac-ink);
  background: var(--isaac-soft); border-radius: 999px; padding: 6px 14px; margin-left: auto;
}

.wo-hist { cursor: pointer; }
.wo-hist-open { box-shadow: 0 0 0 1.5px var(--gold); }
.wo-nav { flex-wrap: wrap; margin-bottom: 18px; }
.wo-sub { color: var(--muted); font-size: 13.5px; line-height: 1.55; margin: 0 2px 14px; }

.wo-block { margin-bottom: 10px; border: 1.5px solid transparent; transition: border-color .12s; }
.wo-block:hover { border-color: var(--line); }
.wo-block summary {
  cursor: pointer; list-style: none;
  display: flex; align-items: center; gap: 10px;
  padding: 15px 18px;
  font-size: 15.5px; font-weight: 600;
  -webkit-user-select: none; user-select: none;
}
.wo-block summary::-webkit-details-marker { display: none; }
.wo-block summary::after {
  content: '\203A';
  margin-left: auto; color: var(--muted);
  font-size: 19px; line-height: 1;
  transform: rotate(90deg); transition: transform .15s;
}
.wo-block[open] summary::after { transform: rotate(-90deg); }
.wo-block[open] summary { border-bottom: 1px solid var(--line); }

.wo-tag {
  font-size: 10.5px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
  border-radius: 999px; padding: 2px 9px; flex-shrink: 0;
}
.wo-tag-upper { background: var(--isaac-soft); color: var(--isaac-ink); }
.wo-tag-lower { background: var(--alice-soft); color: var(--alice-ink); }
.wo-tag-core { background: #f0e8cf; color: #8a6d2f; }
.wo-tag-easy { background: #ddeef0; color: #35707c; }
.wo-tag-daily { background: var(--plum-soft); color: var(--plum-ink); }
.wo-tag-rest { background: #f3efe6; color: #8a7a55; }

.wo-body { padding: 4px 18px 15px; }
.wo-body ul { margin: 10px 0 4px; padding-left: 20px; }
.wo-body li { font-size: 14.5px; line-height: 1.55; margin-bottom: 7px; }
.wo-note { font-size: 13px; color: var(--muted); line-height: 1.5; margin: 10px 0 2px; }

/* ===== Messages ===== */
.chat { display: flex; flex-direction: column; height: calc(100dvh - 190px); min-height: 420px; margin-top: 14px; }
.chat-scroll { flex: 1; overflow-y: auto; padding: 22px; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
.chat-list { display: flex; flex-direction: column; gap: 4px; }

.day-divider {
  text-align: center; font-size: 12px; font-weight: 600; color: var(--muted);
  margin: 18px 0 10px; letter-spacing: .04em;
}

.msg { display: flex; flex-direction: column; max-width: 72%; margin-bottom: 6px; }
.msg.mine { align-self: flex-end; align-items: flex-end; }
.msg.theirs { align-self: flex-start; align-items: flex-start; }

.bubble {
  padding: 10px 15px; border-radius: 18px;
  font-size: 15px; line-height: 1.45;
  white-space: pre-wrap; word-wrap: break-word;
}
.msg.mine .bubble { background: var(--ink); color: #fff; border-bottom-right-radius: 6px; }
.msg.theirs .bubble { background: var(--bg); border: 1px solid var(--line); border-bottom-left-radius: 6px; }

.mention { font-weight: 700; color: var(--gold); }
.msg.theirs .mention { color: var(--alice-ink); }

.msg-time { font-size: 11px; color: var(--muted); margin: 3px 6px 4px; }
.msg-atts { display: flex; flex-direction: column; gap: 6px; margin-top: 4px; }

.chat-pending { padding: 0 16px; }
.chat-form {
  display: flex; align-items: flex-end; gap: 10px;
  padding: 14px 16px; border-top: 1px solid var(--line);
}
#chat-input {
  flex: 1; resize: none; border: 1.5px solid var(--line); border-radius: 16px;
  padding: 11px 16px; font-family: var(--font-body); font-size: 15px;
  outline: none; max-height: 130px; transition: border-color .12s;
  background: none; color: var(--ink);
}
#chat-input:focus { border-color: var(--accent); }

.send-btn {
  border: none; background: var(--accent); color: #fff;
  width: 42px; height: 42px; border-radius: 50%;
  font-size: 17px; cursor: pointer; flex-shrink: 0;
  transition: transform .12s, opacity .12s;
}
.send-btn:hover { transform: scale(1.06); }

/* ===== Modal ===== */
.modal-overlay {
  position: fixed; inset: 0; z-index: 50;
  background: rgba(45, 38, 32, .35);
  backdrop-filter: blur(3px);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
}
.modal {
  background: var(--card); border-radius: 22px;
  box-shadow: var(--shadow);
  width: 100%; max-width: 460px;
  max-height: 86vh; overflow-y: auto;
  padding: 26px 26px 22px;
  animation: pop .18s ease-out;
}
@keyframes pop { from { transform: scale(.96); opacity: 0; } to { transform: scale(1); opacity: 1; } }

.modal h3 { font-family: var(--font-display); font-weight: 600; font-size: 22px; margin: 0 0 16px; }
.modal .field { margin-bottom: 13px; }
.modal label { display: block; font-size: 12.5px; font-weight: 600; color: var(--muted); margin-bottom: 5px; }
.modal input[type="text"], .modal input[type="date"], .modal input[type="time"], .modal input[type="password"], .modal textarea {
  width: 100%; border: 1.5px solid var(--line); border-radius: 11px;
  padding: 10px 13px; font-family: var(--font-body); font-size: 15px;
  outline: none; transition: border-color .12s; background: none; color: var(--ink);
}
.modal input:focus, .modal textarea:focus { border-color: var(--accent); }
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 18px; }

.toggle-row { display: flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 500; }
.toggle-row input { width: 17px; height: 17px; accent-color: var(--accent); }

.day-event {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: 12px; margin-bottom: 8px;
}
.day-event.by-isaac { background: var(--isaac-soft); }
.day-event.by-alice { background: var(--alice-soft); }
.day-event.by-both { background: #f0e8cf; }
.day-event.by-rem { background: var(--plum-soft); }

.modal-sub {
  font-size: 12px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase;
  color: var(--muted); margin: 16px 2px 8px;
}

.mini-check {
  flex-shrink: 0; width: 26px; height: 26px;
  border: 2px solid rgba(45, 38, 32, .25); border-radius: 50%;
  background: rgba(255, 255, 255, .8); cursor: pointer;
  transition: border-color .12s;
}
.mini-check:hover { border-color: var(--isaac); }

.rem-done { white-space: nowrap; flex-shrink: 0; }
.day-event-main { flex: 1; min-width: 0; }
.day-event-title { font-weight: 600; font-size: 14.5px; }
.day-event-sub { font-size: 12.5px; color: var(--muted); margin-top: 1px; }
.day-event button { border: none; background: none; cursor: pointer; font-size: 14px; color: var(--muted); padding: 3px 5px; }
.day-event button:hover { color: var(--ink); }

/* ===== Toast ===== */
.toast {
  position: fixed; bottom: 26px; left: 50%; transform: translateX(-50%);
  background: var(--ink); color: #fff;
  padding: 11px 22px; border-radius: 999px;
  font-size: 14px; font-weight: 500;
  box-shadow: var(--shadow); z-index: 100;
}

/* ===== Touch devices (no hover) ===== */
@media (hover: none) {
  .task-del { opacity: .55; }
  .who-btn:hover, .btn-primary:hover, .cal-day:hover, .send-btn:hover { transform: none; }
}

/* ===== Mobile ===== */
@media (max-width: 720px) {
  .topbar { padding: 12px 16px 6px; }
  .brand-name { font-size: 21px; }
  main { padding: 0 12px calc(94px + env(safe-area-inset-bottom)); }

  /* tabs become a fixed bottom navigation bar; with eight of them it
     scrolls sideways on narrow phones instead of squashing the labels */
  .tabs {
    position: fixed;
    left: 12px; right: 12px;
    bottom: calc(10px + env(safe-area-inset-bottom));
    z-index: 40;
    background: rgba(255, 255, 255, .94);
    backdrop-filter: blur(12px);
    box-shadow: 0 4px 24px rgba(45, 38, 32, .16);
    padding: 6px;
    border-radius: 22px;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }
  .tabs::-webkit-scrollbar { display: none; }
  .tab {
    flex: 1 0 auto;
    display: flex; flex-direction: column; align-items: center; gap: 3px;
    padding: 8px 6px 7px;
    font-size: 9.5px;
    border-radius: 14px;
    min-width: 52px;
  }
  .tab-ico { display: block; width: 19px; height: 19px; }
  .tab .badge { top: 3px; right: calc(50% - 22px); }

  .section-title { font-size: 25px; margin-top: 8px; }

  .cal-grid, .cal-weekdays { gap: 4px; }
  .cal-day { min-height: 72px; padding: 5px 5px 4px; border-radius: 10px; gap: 3px; }
  .pill { font-size: 9.5px; padding: 2px 4px; border-radius: 5px; }
  .icon-btn { width: 40px; height: 40px; }

  /* chip rows wrap instead of spilling off the edge */
  .chip-group { flex-wrap: wrap; }

  /* the toast used to hide behind the bottom navigation bar */
  .toast {
    bottom: calc(86px + env(safe-area-inset-bottom));
    max-width: calc(100vw - 32px);
    text-align: center;
  }

  .task { padding: 14px; }
  .task-check { width: 28px; height: 28px; }
  .task-del { font-size: 20px; padding: 8px 12px; }
  .day-event button { font-size: 20px; padding: 10px 12px; }
  .task-form-row .btn { margin-left: 0; width: 100%; padding: 13px; }
  .task-form-row input[type="date"] { font-size: 16px; flex: 1; }
  .text-pill { font-size: 16px; flex: 1; min-width: 0; }
  .tz-select { font-size: 16px; flex: 1; min-width: 0; max-width: none; }
  .inline-label { flex: 1; min-width: 0; }
  .inline-label input[type="date"], .inline-label input[type="time"] { font-size: 16px; flex: 1; min-width: 0; }
  .trip-item button[data-edit-item], .trip-item button[data-del-item] { opacity: .55; font-size: 18px; padding: 8px 9px; }
  .trip-head-name { font-size: 22px; }

  .wo-block summary { padding: 14px; font-size: 14.5px; }
  .wo-body { padding: 2px 14px 14px; }
  .wo-body li { font-size: 14px; }
  .wo-track { padding: 15px 14px; }
  .wo-weight { font-size: 16px; width: 82px; }
  .wo-finish-row .btn { width: 100%; padding: 13px; }
  .wo-hist .task-del { opacity: .55; }

  .msg { max-width: 86%; }
  .chat { height: calc(100dvh - 168px - env(safe-area-inset-bottom)); min-height: 320px; }
  .chat-scroll { padding: 16px 14px; }
  #chat-input { font-size: 16px; }

  /* dialogs slide up as bottom sheets */
  .modal-overlay { align-items: flex-end; padding: 0; }
  .modal {
    max-width: none;
    max-height: 88dvh;
    border-radius: 24px 24px 0 0;
    padding: 24px 20px calc(20px + env(safe-area-inset-bottom));
    animation: sheet .22s ease-out;
  }
  .modal input[type="text"], .modal input[type="date"], .modal input[type="time"],
  .modal input[type="password"], .modal textarea { font-size: 16px; }
}

@keyframes sheet {
  from { transform: translateY(40px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

/* ===== Partner visa ===== */
.visa-intro {
  color: var(--muted); font-size: 14.5px; line-height: 1.6;
  max-width: 62ch; margin: -4px 0 16px;
}

.visa-alarm {
  border-left: 4px solid var(--alice);
  background: linear-gradient(var(--alice-soft), var(--card) 70%);
  padding: 0; margin-bottom: 18px; overflow: hidden;
}
.visa-alarm > summary {
  cursor: pointer; padding: 16px 20px; font-weight: 600; font-size: 15px;
  color: var(--alice-ink); list-style: none;
}
.visa-alarm > summary::-webkit-details-marker { display: none; }
.visa-alarm > summary::after { content: ' \25BE'; opacity: .6; }
.visa-alarm[open] > summary::after { content: ' \25B4'; }
.visa-alarm-body { padding: 0 20px 18px; }
.visa-alarm-body p { margin: 0 0 10px; font-size: 14px; line-height: 1.62; }
.visa-alarm-foot { color: var(--muted); font-size: 12.5px !important; margin-bottom: 0 !important; }

.visa-stats { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 16px; }
.visa-stat {
  background: var(--card); border: 1px solid var(--line); border-radius: 14px;
  padding: 12px 16px; min-width: 150px; flex: 1 1 150px;
}
.visa-stat-n { display: block; font-family: var(--font-display); font-size: 25px; line-height: 1.1; }
.visa-stat-of { font-size: 14px; color: var(--muted); }
.visa-stat-l { display: block; font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.visa-stat-warn { border-color: var(--alice); background: var(--alice-soft); }
.visa-stat-warn .visa-stat-n, .visa-stat-warn .visa-stat-l { color: var(--alice-ink); }
.visa-bar { height: 5px; background: var(--line); border-radius: 99px; margin-top: 9px; overflow: hidden; }
.visa-bar-fill { height: 100%; background: var(--isaac); border-radius: 99px; transition: width .3s ease; }

.visa-nav { margin-bottom: 12px; }
.visa-filters { margin-bottom: 14px; }

.visa-cat, .visa-phase { margin-bottom: 26px; }
.visa-cat-head { display: flex; align-items: center; gap: 9px; }
.visa-cat-n {
  font-size: 12px; color: var(--muted); font-weight: 500;
  background: var(--line); border-radius: 99px; padding: 1px 9px; letter-spacing: 0;
}
.visa-phase-n { font-family: var(--font-display); color: var(--isaac); }
.visa-cat-note {
  font-size: 12.5px; color: var(--muted); margin: -4px 0 10px; max-width: 66ch; line-height: 1.55;
}

.visa-doc {
  background: var(--card); border: 1px solid var(--line); border-radius: 14px;
  margin-bottom: 7px; overflow: hidden;
}
.visa-doc > summary {
  cursor: pointer; list-style: none; padding: 12px 14px;
  display: flex; align-items: center; gap: 11px;
}
.visa-doc > summary::-webkit-details-marker { display: none; }
.visa-doc-title { flex: 1 1 auto; font-size: 14.5px; line-height: 1.4; min-width: 0; }
.visa-meta { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; flex-shrink: 0; }
.visa-tick {
  width: 21px; height: 21px; border-radius: 50%; flex-shrink: 0;
  border: 1.5px solid var(--line); display: flex; align-items: center;
  justify-content: center; font-size: 12px; color: #fff;
}
.visa-have .visa-tick { background: var(--isaac); border-color: var(--isaac); }
.visa-na .visa-tick { background: var(--line); border-color: var(--line); color: var(--muted); }
.visa-have .visa-doc-title { color: var(--muted); }
.visa-na { opacity: .6; }
.visa-count { font-size: 12px; color: var(--muted); white-space: nowrap; }
.visa-exp { font-size: 11.5px; border-radius: 99px; padding: 2px 8px; white-space: nowrap; }
.visa-exp-soon { background: #f7eed6; color: #8a6d2f; }
.visa-exp-expired { background: var(--alice-soft); color: var(--alice-ink); font-weight: 600; }

.visa-doc-body { padding: 2px 14px 14px; border-top: 1px solid var(--line); }
.visa-why { font-size: 13.5px; line-height: 1.6; margin: 12px 0 10px; }
.visa-why strong { color: var(--alice-ink); }
.visa-how {
  background: var(--bg); border-radius: 11px; padding: 11px 13px; margin-bottom: 12px;
}
.visa-how strong {
  display: block; font-size: 11px; text-transform: uppercase; letter-spacing: .07em;
  color: var(--isaac-ink); margin-bottom: 5px;
}
.visa-how p { margin: 0; font-size: 13.5px; line-height: 1.6; }
.visa-files { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.visa-file-row { display: inline-flex; align-items: center; gap: 4px; }
.visa-file-del {
  border: none; background: none; cursor: pointer; color: var(--muted);
  font-size: 13px; padding: 2px 4px; line-height: 1;
}
.visa-file-del:hover { color: var(--alice-ink); }
.visa-nofiles { font-size: 13px; color: var(--muted); margin: 0; }
.visa-actions {
  display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
  justify-content: space-between; margin-bottom: 10px;
}
.visa-upload { width: auto; padding: 0 13px; gap: 6px; font-size: 13.5px; white-space: nowrap; }
.visa-dates { margin-bottom: 10px; }
.visa-note {
  width: 100%; border: 1px solid var(--line); border-radius: 11px;
  padding: 9px 12px; font-family: var(--font-body); font-size: 14px;
  color: var(--ink); background: var(--bg);
}
.visa-note:focus { outline: none; border-color: var(--isaac); }
.visa-del { margin-top: 10px; color: var(--alice-ink); }

.visa-step {
  background: var(--card); border: 1px solid var(--line); border-radius: 14px;
  padding: 12px 14px; margin-bottom: 7px; display: flex; gap: 12px; align-items: flex-start;
}
.visa-step.done { opacity: .55; }
.visa-step.done .task-title { text-decoration: line-through; }
.visa-step-note {
  font-size: 12.5px; color: var(--muted); line-height: 1.55; margin-top: 4px; max-width: 70ch;
}

@media (max-width: 720px) {
  .visa-stat { min-width: 132px; padding: 10px 13px; }
  .visa-stat-n { font-size: 21px; }
  .visa-doc > summary { padding: 11px 12px; gap: 9px; }
  .visa-doc-title { font-size: 14px; }
  .visa-meta { gap: 5px; }
  .visa-actions { flex-direction: column; align-items: stretch; }
  .visa-actions .chip-group { flex-wrap: wrap; }
  .visa-upload { justify-content: center; height: 40px; }
}

.visa-quote {
  margin: 10px 0; padding: 11px 14px; background: rgba(255,255,255,.62);
  border-radius: 11px; font-size: 13.5px !important; line-height: 1.55;
  font-style: italic; color: var(--ink);
}
.visa-quote cite {
  display: block; font-style: normal; font-size: 11.5px;
  color: var(--muted); margin-top: 6px;
}

.visa-sources { margin-top: 28px; padding: 0; overflow: hidden; }
.visa-sources > summary {
  cursor: pointer; padding: 15px 20px; font-weight: 600; font-size: 14.5px; list-style: none;
}
.visa-sources > summary::-webkit-details-marker { display: none; }
.visa-sources > summary::after { content: ' \25BE'; opacity: .5; }
.visa-sources[open] > summary::after { content: ' \25B4'; }
.visa-sources-body { padding: 0 20px 18px; }
.visa-sources-body p { font-size: 13.5px; line-height: 1.62; margin: 0 0 12px; max-width: 72ch; }
.visa-src-list { margin: 0 0 14px; padding-left: 20px; }
.visa-src-list li { font-size: 13px; line-height: 1.6; margin-bottom: 7px; max-width: 72ch; }
.visa-src-links { display: flex; flex-wrap: wrap; gap: 7px; }
.visa-src-links a {
  font-size: 12.5px; text-decoration: none; color: var(--isaac-ink);
  background: var(--isaac-soft); border-radius: 99px; padding: 4px 11px;
}
.visa-src-links a:hover { background: var(--isaac); color: #fff; }
.visa-disclaim {
  border-top: 1px solid var(--line); padding-top: 13px; margin-top: 4px !important;
  color: var(--muted);
}
.visa-disclaim strong { color: var(--ink); }

/* ---------- wedding ---------- */
.wed-intro { color: var(--muted); font-size: 14.5px; line-height: 1.55; margin: -6px 0 16px; }
.wed-plan { padding: 18px; margin-bottom: 16px; }
.wed-plan-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.wed-field { display: block; margin-bottom: 12px; }
.wed-field-l { display: block; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-bottom: 5px; }
.wed-input {
  width: 100%; border: 1.5px solid var(--line); border-radius: 12px; padding: 10px 12px;
  font: inherit; font-size: 16px; background: #fff; color: var(--ink);
}
.wed-input:focus { outline: none; border-color: var(--accent); }
.wed-notes { resize: vertical; min-height: 56px; line-height: 1.45; }
.wed-saved { min-height: 16px; font-size: 12px; color: var(--muted); text-align: right; }
.wed-filters { margin-bottom: 12px; }
.wed-guest {
  background: var(--card); border: 1px solid var(--line); border-radius: 14px;
  margin-bottom: 8px; overflow: hidden;
}
.wed-guest > summary {
  display: flex; align-items: center; gap: 10px; padding: 12px 14px; cursor: pointer; list-style: none;
}
.wed-guest > summary::-webkit-details-marker { display: none; }
.wed-guest-name { flex: 1 1 auto; font-size: 15px; font-weight: 500; min-width: 0; }
.wed-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--line); flex: none; }
.wed-invited .wed-dot { background: #e0b84a; }
.wed-yes .wed-dot { background: var(--isaac); }
.wed-no .wed-dot { background: var(--alice); }
.wed-list-maybe .wed-dot { background: transparent; border: 2px dashed var(--muted); }
.wed-list-maybe .wed-guest-name { color: var(--muted); }
.wed-list-head { margin-top: 18px; }
.wed-filters-status { margin-top: -4px; }
.wed-filters-status .chip { font-size: 12.5px; padding: 5px 11px; }
#wed-guest-form .form-hint { display: block; margin-top: 8px; }
.wed-no .wed-guest-name { text-decoration: line-through; opacity: .6; }
.wed-heads { font-size: 12.5px; color: var(--muted); white-space: nowrap; }
.wed-status-chip {
  font-size: 12px; padding: 3px 9px; border-radius: 999px; background: #f0ede6; color: var(--muted); white-space: nowrap;
}
.wed-invited .wed-status-chip { background: #faf0cf; color: #8a6d2f; }
.wed-yes .wed-status-chip { background: var(--isaac-soft); color: var(--isaac-ink); }
.wed-no .wed-status-chip { background: var(--alice-soft); color: var(--alice-ink); }
.wed-guest-body { padding: 4px 14px 14px; border-top: 1px solid var(--line); display: grid; gap: 12px; }
.wed-guest-body .wed-status-pick { padding-top: 10px; }
.wed-edit-row .text-pill { flex: 1 1 180px; }
.wed-edit-heads { width: 64px; border: 1.5px solid var(--line); border-radius: 10px; padding: 6px 8px; font-size: 15px; }
.wed-guest-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
@media (max-width: 560px) {
  .wed-plan-grid { grid-template-columns: 1fr; gap: 0; }
  .wed-guest > summary .visa-meta { flex-basis: 100%; }
  .wed-guest > summary { flex-wrap: wrap; row-gap: 6px; }
  .wed-edit-row .text-pill { flex-basis: 100%; }
}

/* ---------- poems ---------- */
.poem-input {
  width: 100%; border: 1.5px solid var(--line); border-radius: 12px; padding: 12px 14px; margin: 10px 0 12px;
  font: inherit; font-size: 16px; line-height: 1.6; background: #fff; color: var(--ink); resize: vertical;
}
.poem-input:focus { outline: none; border-color: var(--accent); }
.poem-edit-title {
  width: 100%; border: 1.5px solid var(--line); border-radius: 12px; padding: 10px 14px;
  font: inherit; font-size: 17px; font-weight: 600; background: #fff; color: var(--ink);
}
.poem-edit-title:focus { outline: none; border-color: var(--accent); }
.poem { padding: 22px 24px; margin-bottom: 14px; }
.poem-title { font-family: var(--font-display); font-weight: 600; font-size: 22px; margin: 0 0 12px; }
.poem-body { white-space: pre-wrap; font-size: 16px; line-height: 1.75; max-width: 60ch; }
.poem-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 16px; }
.poem-actions { display: flex; gap: 6px; }
