:root {
  --paper: #F0EEE5;
  --paper-raised: #FBFAF5;
  --ink: #221B27;
  --ink-soft: #5B5460;
  --rule: #DBD5C6;
  --plum: #3D2A42;
  --plum-soft: #5B4066;
  --plum-wash: #EDE6EC;
  --gold: #E2A63B;
  --gold-ink: #4A360B;
  --gold-wash: #FBF0DA;
  --green: #3E8E5C;
  --red: #B44B4B;
  --red-wash: #F7E4E1;
  --radius-card: 14px;
  --radius-pill: 999px;
  --serif: "Fraunces", Georgia, "Iowan Old Style", serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color-scheme: light;
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
}

body {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

a { color: inherit; }

::selection { background: var(--gold); color: var(--gold-ink); }

/* ---------- Topbar ---------- */

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  border-bottom: 1px solid var(--rule);
  background: var(--paper-raised);
  position: sticky;
  top: 0;
  z-index: 20;
}

.topbar-mark {
  display: flex;
  align-items: center;
  gap: 8px;
}

.topbar-mark-x {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--plum);
  color: var(--paper-raised);
  font-family: var(--serif);
  font-weight: 680;
  display: grid;
  place-items: center;
  font-size: 13px;
  letter-spacing: -0.02em;
}

.topbar-mark-text {
  font-family: var(--serif);
  font-weight: 560;
  font-size: 17px;
  letter-spacing: -0.01em;
}

.topbar {
  padding-top: max(14px, env(safe-area-inset-top));
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.sync-pill {
  border: 1px solid var(--rule);
  background: var(--paper);
  color: var(--ink-soft);
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 600;
  padding: 5px 10px 5px 9px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.sync-pill::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ink-soft);
}
.sync-pill[data-state="live"]::before { background: var(--green); }
.sync-pill[data-state="offline"]::before { background: var(--red); }
.sync-pill[data-state="local"]::before { background: var(--gold); }

.chip {
  border: none;
  cursor: pointer;
  font-family: var(--sans);
  font-weight: 600;
  border-radius: var(--radius-pill);
}

.chip--me {
  background: var(--plum-wash);
  color: var(--plum);
  padding: 6px 14px;
  font-size: 14px;
}
.chip--me:hover { background: var(--plum); color: var(--paper-raised); }
.chip--me {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 130px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }

.lang-btn {
  border: 1px solid var(--rule);
  background: var(--paper-raised);
  color: var(--plum);
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.03em;
  padding: 5px 9px;
  border-radius: var(--radius-pill);
  cursor: pointer;
}
.lang-btn:hover { border-color: var(--plum-soft); }

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

.app {
  flex: 1;
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
  padding: 0 16px calc(96px + env(safe-area-inset-bottom));
}

.loading {
  text-align: center;
  color: var(--ink-soft);
  padding: 80px 16px;
}

.muted { color: var(--ink-soft); font-weight: 400; }

/* ---------- Pick screen ---------- */

.pick {
  padding-top: 64px;
  text-align: center;
}

.pick-eyebrow {
  font-size: 14px;
  color: var(--plum-soft);
  font-weight: 600;
  margin: 0 0 14px;
}

.pick-title {
  font-family: var(--serif);
  font-weight: 560;
  font-size: clamp(32px, 6vw, 44px);
  line-height: 1.08;
  margin: 0 0 14px;
  letter-spacing: -0.01em;
}

.pick-sub {
  color: var(--ink-soft);
  font-size: 16px;
  max-width: 440px;
  margin: 0 auto 36px;
  line-height: 1.5;
}

.pick-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  max-width: 480px;
  margin: 0 auto;
}

.pick-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 18px;
  background: var(--paper-raised);
  border: 1px solid var(--rule);
  border-radius: var(--radius-card);
  cursor: pointer;
  text-align: left;
  font-family: var(--sans);
  transition: transform 0.15s ease, border-color 0.15s ease;
}

.pick-card:hover {
  border-color: var(--plum-soft);
  transform: translateY(-2px);
}

.pick-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--paper-raised);
  font-family: var(--serif);
  font-weight: 680;
  font-size: 16px;
  flex-shrink: 0;
}

.pick-text { display: flex; flex-direction: column; gap: 2px; }

.pick-name {
  font-size: 16px;
  font-weight: 600;
  color: var(--ink);
}

.pick-count {
  font-size: 12.5px;
  color: var(--ink-soft);
}

.pick-card--add { border-style: dashed; }
.pick-avatar--add {
  background: var(--plum-wash);
  color: var(--plum);
  font-family: var(--sans);
  font-size: 22px;
  font-weight: 500;
}

.add-form {
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
  cursor: default;
  border-color: var(--plum-soft);
}
.add-form:hover { transform: none; }
.add-input {
  width: 100%;
  border: 1px solid var(--rule);
  background: var(--paper);
  border-radius: 10px;
  padding: 10px 12px;
  font-family: var(--sans);
  font-size: 16px;
  color: var(--ink);
}
.add-input:focus { outline: 2px solid var(--plum-soft); outline-offset: 1px; }
.add-actions { display: flex; gap: 8px; }
.add-submit,
.add-cancel {
  flex: 1;
  border-radius: var(--radius-pill);
  padding: 9px 12px;
  font-family: var(--sans);
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
}
.add-submit { border: none; background: var(--plum); color: var(--paper-raised); }
.add-cancel { border: 1px solid var(--rule); background: none; color: var(--ink-soft); }
.add-error { margin: 0; font-size: 13px; color: var(--red); min-height: 0; }
.add-error:empty { display: none; }

/* ---------- Schedule screen ---------- */

.days {
  display: flex;
  gap: 8px;
  margin: 20px 0 16px;
  border-bottom: 1px solid var(--rule);
}

.day-tab {
  border: none;
  background: none;
  cursor: pointer;
  font-family: var(--serif);
  font-size: 17px;
  font-weight: 560;
  color: var(--ink-soft);
  padding: 8px 4px 12px;
  border-bottom: 3px solid transparent;
  margin-bottom: -1px;
}

.day-tab.is-active {
  color: var(--plum);
  border-bottom-color: var(--gold);
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}

.filter-group {
  display: flex;
  gap: 6px;
  background: var(--paper-raised);
  border: 1px solid var(--rule);
  padding: 4px;
  border-radius: var(--radius-pill);
}

.filter-btn {
  border: none;
  background: none;
  cursor: pointer;
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-soft);
  padding: 7px 13px;
  border-radius: var(--radius-pill);
}

.filter-btn.is-active {
  background: var(--plum);
  color: var(--paper-raised);
}

.search {
  flex: 1;
  min-width: 180px;
  border: 1px solid var(--rule);
  background: var(--paper-raised);
  border-radius: var(--radius-pill);
  padding: 9px 16px;
  font-family: var(--sans);
  font-size: 14px;
  color: var(--ink);
}
.search:focus { outline: 2px solid var(--plum-soft); outline-offset: 1px; }

.toolbar-row {
  display: flex;
  gap: 8px;
  flex: 1;
  min-width: 0;
}
.toolbar-row .search { flex: 1; }

.tag-select {
  max-width: 44%;
  border: 1px solid var(--rule);
  background: var(--paper-raised);
  border-radius: var(--radius-pill);
  padding: 9px 12px;
  font-family: var(--sans);
  font-size: 14px;
  color: var(--ink);
}

.list-count {
  font-size: 13px;
  color: var(--ink-soft);
  margin: 0 0 12px;
}

.cta-btn {
  display: inline-block;
  margin-top: 14px;
  background: var(--plum);
  color: var(--paper-raised);
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  padding: 11px 20px;
  border-radius: var(--radius-pill);
}
.empty-state p { margin: 0; }

.agenda-heading {
  font-family: var(--serif);
  font-size: 14px;
  font-weight: 560;
  color: var(--plum-soft);
  margin: 26px 0 10px;
  padding-bottom: 6px;
  border-bottom: 1px dashed var(--rule);
}
.agenda-heading:first-child { margin-top: 0; }
.agenda-heading { display: flex; align-items: center; gap: 10px; }

.session {
  display: grid;
  grid-template-columns: 84px 1fr auto;
  gap: 16px;
  align-items: start;
  padding: 16px 0;
  border-bottom: 1px solid var(--rule);
  cursor: pointer;
}
.session:focus-visible {
  outline: 2px solid var(--plum-soft);
  outline-offset: -2px;
  border-radius: 6px;
}

.session-time {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.session-time-h {
  font-family: var(--serif);
  font-weight: 680;
  font-size: 19px;
  color: var(--plum);
}

.session-time-end {
  font-size: 12px;
  color: var(--ink-soft);
}

.session-room {
  font-size: 12px;
  color: var(--ink-soft);
  line-height: 1.3;
}

.session-title {
  font-family: var(--serif);
  font-weight: 560;
  font-size: 17px;
  line-height: 1.3;
  margin: 0 0 4px;
}

.session-speaker {
  font-size: 13.5px;
  color: var(--ink-soft);
  margin: 0 0 8px;
  line-height: 1.4;
}

.session-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag {
  font-size: 11.5px;
  padding: 3px 9px;
  border-radius: var(--radius-pill);
  background: var(--plum-wash);
  color: var(--plum-soft);
}

.session-side {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  min-width: 96px;
}

.attendees {
  display: flex;
}

.avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--paper-raised);
  font-size: 11px;
  font-weight: 700;
  font-family: var(--sans);
  border: 2px solid var(--paper-raised);
  margin-left: -8px;
}
.attendees .avatar:first-child { margin-left: 0; }
.attendees { flex-wrap: wrap; justify-content: flex-end; max-width: 150px; row-gap: 4px; }

.attendees-empty {
  font-size: 12px;
  color: var(--ink-soft);
  font-style: italic;
}

.going-btn {
  border: 1px solid var(--plum);
  background: none;
  color: var(--plum);
  font-family: var(--sans);
  font-weight: 600;
  font-size: 12.5px;
  padding: 7px 12px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  white-space: nowrap;
}

.going-btn.is-going {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--gold-ink);
}

.empty-state {
  text-align: center;
  padding: 48px 16px;
  color: var(--ink-soft);
  font-size: 15px;
}

.session.is-mine .session-title { color: var(--plum); }
.session.is-mine { box-shadow: inset 3px 0 0 var(--gold); padding-left: 12px; }
.session.is-past { opacity: 0.55; }
.session.is-live .session-time-h::after {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-left: 6px;
  vertical-align: middle;
  border-radius: 50%;
  background: var(--red);
  animation: pulse 1.6s ease-in-out infinite;
}

.clash {
  margin: 10px 0 0;
  font-size: 12.5px;
  line-height: 1.4;
  color: var(--red);
  background: var(--red-wash);
  padding: 6px 10px;
  border-radius: 8px;
}

.live-dot {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--red);
  margin-right: 6px;
}
.live-dot::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  animation: pulse 1.6s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

.notice {
  display: block;
  width: 100%;
  text-align: left;
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.45;
  color: var(--ink);
  background: var(--plum-wash);
  border: none;
  border-radius: 12px;
  padding: 12px 14px;
  margin: 0 0 16px;
}
.notice--warn {
  background: var(--red-wash);
  color: var(--red);
  cursor: pointer;
}

/* ---------- Notification banner ---------- */

.notif-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 16px;
  background: var(--plum-wash);
  border-bottom: 1px solid var(--rule);
  font-family: var(--sans);
  font-size: 13.5px;
  line-height: 1.4;
  color: var(--ink);
}
.notif-banner p {
  margin: 0;
  flex: 1;
  min-width: 0;
}
.notif-banner-actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}
.notif-banner-btn,
.notif-banner-dismiss {
  border: none;
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 600;
  border-radius: var(--radius-pill);
  padding: 7px 14px;
  cursor: pointer;
}
.notif-banner-btn {
  background: var(--plum);
  color: var(--paper-raised);
}
.notif-banner-dismiss {
  background: none;
  color: var(--ink-soft);
  font-weight: 500;
  padding: 7px 6px;
}
@media (max-width: 400px) {
  .notif-banner { flex-wrap: wrap; }
  .notif-banner p { flex-basis: 100%; }
}

/* ---------- Export ---------- */

.export {
  margin-top: 32px;
  text-align: center;
}

.export-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: none;
  background: var(--plum);
  color: var(--paper-raised);
  font-family: var(--sans);
  font-weight: 600;
  font-size: 14px;
  padding: 12px 20px;
  border-radius: var(--radius-pill);
  cursor: pointer;
}
.export-btn svg,
.tabbar-btn svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.export-hint {
  font-size: 12.5px;
  color: var(--ink-soft);
  margin: 10px auto 0;
  max-width: 340px;
}

/* ---------- Tab bar ---------- */

.tabbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 30;
  display: flex;
  justify-content: center;
  gap: 4px;
  background: var(--paper-raised);
  border-top: 1px solid var(--rule);
  padding: 6px 12px calc(6px + env(safe-area-inset-bottom));
}
.tabbar[hidden] { display: none; }

.tabbar-btn {
  flex: 1;
  max-width: 160px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 6px 0;
  border-radius: 12px;
  text-decoration: none;
  color: var(--ink-soft);
  font-size: 11.5px;
  font-weight: 600;
  text-align: center;
  line-height: 1.15;
}
.tabbar-btn.is-active {
  color: var(--plum);
  background: var(--plum-wash);
}

/* ---------- Now view ---------- */

.now-header {
  padding: 24px 0 12px;
}
.now-clock {
  font-family: var(--serif);
  font-weight: 680;
  font-size: 44px;
  line-height: 1;
  color: var(--plum);
  margin: 0;
}
.now-date {
  margin: 6px 0 0;
  color: var(--ink-soft);
  font-size: 14px;
}

.section-title {
  font-family: var(--serif);
  font-weight: 560;
  font-size: 20px;
  margin: 24px 0 12px;
}

.now-block,
.now-free {
  background: var(--paper-raised);
  border: 1px solid var(--rule);
  border-radius: var(--radius-card);
  padding: 14px 16px;
  margin-bottom: 10px;
}
.now-block.is-live {
  border-color: var(--gold);
  background: var(--gold-wash);
}
.now-free p { margin: 6px 0 0; color: var(--ink-soft); font-size: 14px; line-height: 1.45; }

.now-label {
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--plum-soft);
}
.now-title {
  font-family: var(--serif);
  font-weight: 560;
  font-size: 19px;
  line-height: 1.25;
  margin: 6px 0 4px;
}
.now-meta {
  margin: 0;
  font-size: 13.5px;
  color: var(--ink-soft);
}
.progress {
  height: 5px;
  border-radius: 5px;
  background: rgba(61, 42, 66, 0.12);
  margin-top: 12px;
  overflow: hidden;
}
.progress span {
  display: block;
  height: 100%;
  background: var(--plum);
  border-radius: 5px;
}
.now-with {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 10px;
  font-size: 13px;
}
.now-with .avatar { margin-left: 0; }

.team-row {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 12px 0;
  border-bottom: 1px solid var(--rule);
}
.team-row-body { min-width: 0; flex: 1; }
.team-row-body p { margin: 0; font-size: 14px; line-height: 1.4; }
.team-row-name { font-weight: 600; margin-bottom: 2px !important; }
.team-row-now { color: var(--ink); }
.team-row-next { color: var(--ink-soft); font-size: 13px !important; margin-top: 2px !important; }

/* ---------- Team view ---------- */

.team-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.team-card {
  background: var(--paper-raised);
  border: 1px solid var(--rule);
  border-radius: var(--radius-card);
  padding: 14px;
}
.team-card.is-me { border-color: var(--gold); }

.team-card-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}
.team-card-head p { margin: 0; }
.team-card-name { font-weight: 600; font-size: 15px; }
.team-card-count { font-size: 12.5px; }

.team-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.team-list li {
  display: flex;
  gap: 10px;
  padding: 7px 0;
  border-top: 1px dashed var(--rule);
  font-size: 13.5px;
  line-height: 1.35;
}
.team-list li.is-past { opacity: 0.5; }
.team-list li.is-clash .team-list-room { color: var(--red); }
.team-list li.is-live .team-list-time { color: var(--red); }
.team-list-time {
  font-family: var(--serif);
  font-weight: 680;
  color: var(--plum);
  min-width: 44px;
}
.team-list-body { display: flex; flex-direction: column; min-width: 0; }
.team-list-title { font-weight: 500; }
.team-list-room { font-size: 12px; }
.team-empty { font-size: 13.5px; margin: 4px 0 0; }
.plan-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  color: var(--plum-soft);
  background: var(--plum-wash);
  border-radius: var(--radius-pill);
  padding: 2px 8px;
  margin-left: 6px;
  vertical-align: 1px;
}
.avatar.is-planned { opacity: 0.55; }

/* ---------- Toast ---------- */

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(84px + env(safe-area-inset-bottom));
  transform: translate(-50%, 12px);
  max-width: calc(100% - 32px);
  text-align: center;
  background: var(--ink);
  color: var(--paper-raised);
  padding: 10px 18px;
  border-radius: var(--radius-pill);
  font-size: 13.5px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 50;
}
.toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* ---------- Responsive ---------- */

@media (max-width: 480px) {
  .session {
    grid-template-columns: 64px 1fr;
  }
  .session-side {
    grid-column: 1 / -1;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    min-width: 0;
    margin-top: 8px;
  }
  .pick-grid { grid-template-columns: 1fr; }
  .attendees { justify-content: flex-start; max-width: none; }
  .filter-group { width: 100%; }
  .filter-btn { flex: 1; }
  .search { min-width: 0; width: 100%; }
  .toolbar-row { flex-basis: 100%; }
}

@media (max-width: 359px) {
  .topbar { padding-left: 14px; padding-right: 14px; }
  .topbar-mark-text { display: none; }
}

@media (max-width: 620px) {
  .team-grid { grid-template-columns: 1fr; }
}

/* ---------- Session detail overlay ---------- */

.session-detail {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: flex;
  align-items: flex-end;
}

.session-detail-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(34, 27, 39, 0.45);
}

.session-detail-sheet {
  position: relative;
  width: 100%;
  max-height: min(88vh, 720px);
  margin: 0 auto;
  max-width: 560px;
  background: var(--paper);
  border-radius: 18px 18px 0 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: calc(20px + env(safe-area-inset-bottom));
  animation: sheet-in 0.2s ease-out;
}
@keyframes sheet-in {
  from { transform: translateY(24px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.session-detail-head {
  position: sticky;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  background: var(--paper);
  border-bottom: 1px solid var(--rule);
}

.session-detail-time {
  font-size: 13px;
  color: var(--ink-soft);
}

.session-detail-close {
  border: none;
  background: var(--plum-wash);
  color: var(--plum);
  width: 30px;
  height: 30px;
  border-radius: 50%;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  flex-shrink: 0;
}

.session-detail-body {
  padding: 16px;
}

.session-detail-title {
  font-family: var(--serif);
  font-weight: 620;
  font-size: 21px;
  line-height: 1.3;
  margin: 0 0 6px;
}

.session-detail-speaker {
  font-size: 14px;
  color: var(--ink-soft);
  margin: 0 0 10px;
}

.session-detail-body .session-tags { margin-bottom: 4px; }

.session-detail-attendees {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--rule);
}

.note-section-title {
  font-family: var(--serif);
  font-weight: 620;
  font-size: 16px;
  margin: 18px 0 10px;
  padding-top: 16px;
  border-top: 1px solid var(--rule);
}

.note-thread {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 280px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 2px;
}

.note-bubble {
  max-width: 85%;
  align-self: flex-start;
  background: var(--plum-wash);
  border-radius: 14px 14px 14px 4px;
  padding: 7px 12px;
}
.note-bubble.is-mine {
  align-self: flex-end;
  background: var(--gold-wash);
  border-radius: 14px 14px 4px 14px;
}

.note-bubble-meta {
  margin: 0 0 2px;
  font-size: 11px;
  font-weight: 600;
  color: var(--ink-soft);
}

.note-bubble-text {
  margin: 0;
  font-size: 14.5px;
  line-height: 1.4;
  color: var(--ink);
  white-space: pre-wrap;
  overflow-wrap: break-word;
}

.note-thread-empty {
  margin: 0;
  padding: 10px 0;
  text-align: center;
  font-size: 13px;
  font-style: italic;
  color: var(--ink-soft);
}

.note-compose {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}

.note-compose-input {
  flex: 1;
  min-width: 0;
  border: 1px solid var(--rule);
  background: var(--paper-raised);
  border-radius: var(--radius-pill);
  padding: 9px 14px;
  font-family: var(--sans);
  font-size: 14.5px;
  color: var(--ink);
}
.note-compose-input:focus { outline: 2px solid var(--plum-soft); outline-offset: 1px; }

.note-compose-send {
  flex-shrink: 0;
  border: none;
  background: var(--plum);
  color: var(--paper-raised);
  font-family: var(--sans);
  font-weight: 600;
  font-size: 14px;
  padding: 0 16px;
  border-radius: var(--radius-pill);
  cursor: pointer;
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}
