:root {
  color-scheme: light;
  --paper: #f4f0e8;
  --paper-deep: #eae4d9;
  --surface: #fffdf8;
  --surface-blue: #e9f2f6;
  --surface-coral: #fff0eb;
  --ink: #17324d;
  --ink-soft: #526576;
  --muted: #56645c;
  --line: rgba(23, 50, 77, 0.12);
  --line-strong: rgba(23, 50, 77, 0.2);
  --coral: #ff765f;
  --coral-dark: #b64032;
  --sky: #78b8d8;
  --sky-dark: #2d6f92;
  --gold: #d5a84d;
  --sage: #71a38a;
  --danger: #b44340;
  --shadow: 0 18px 50px rgba(38, 48, 55, 0.08);
  --radius-xl: 30px;
  --radius-lg: 22px;
  --radius-md: 16px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  font-family: "Avenir Next", "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--paper);
  color: var(--ink);
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--paper);
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  background:
    linear-gradient(rgba(23, 50, 77, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(23, 50, 77, 0.025) 1px, transparent 1px),
    var(--paper);
  background-size: 28px 28px;
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.app-loading {
  min-height: 100vh;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 10px;
  padding: 32px;
  color: var(--ink-soft);
  text-align: center;
}

.app-loading span {
  width: 34px;
  height: 34px;
  border: 3px solid var(--paper-deep);
  border-top-color: var(--coral);
  border-radius: 50%;
  animation: storage-loading 0.8s linear infinite;
}

.app-loading strong {
  color: var(--ink);
  font-size: 17px;
}

.app-loading small {
  font-size: 13px;
}

.storage-fatal {
  width: min(520px, calc(100% - 32px));
  margin: 12vh auto 0;
  padding: 32px;
  border-radius: var(--radius-xl);
  background: var(--surface);
  box-shadow: var(--shadow);
  text-align: center;
}

.storage-fatal > span {
  display: inline-grid;
  place-items: center;
  width: 52px;
  height: 52px;
  margin-bottom: 16px;
  border-radius: 50%;
  color: var(--danger);
  background: var(--surface-coral);
}

.storage-fatal p {
  color: var(--ink-soft);
  line-height: 1.7;
}

@keyframes storage-loading {
  to { transform: rotate(360deg); }
}

button,
input,
textarea,
select {
  font: inherit;
}

button {
  color: inherit;
}

button,
select,
input[type="checkbox"],
input[type="radio"] {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
}

button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
a:focus-visible {
  outline: 3px solid var(--sky-dark);
  outline-offset: 3px;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

.skip-link {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 1000;
  padding: 10px 14px;
  border-radius: 10px;
  background: var(--ink);
  color: white;
  transform: translateY(-150%);
}

.skip-link:focus {
  transform: translateY(0);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.icon {
  flex: 0 0 auto;
}

.app-shell {
  width: min(100%, 900px);
  min-height: 100vh;
  margin: 0 auto;
  padding-bottom: calc(96px + var(--safe-bottom));
  background: rgba(244, 240, 232, 0.82);
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
  padding: 14px 18px 10px;
  background: rgba(244, 240, 232, 0.88);
  backdrop-filter: blur(18px);
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-lockup > span:last-child {
  display: grid;
  gap: 1px;
}

.brand-lockup strong {
  font-family: Georgia, "Songti SC", serif;
  font-size: 21px;
  letter-spacing: 0.12em;
}

.brand-lockup small {
  color: var(--muted);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.brand-mark {
  position: relative;
  width: 34px;
  height: 26px;
}

.brand-mark span {
  position: absolute;
  top: 2px;
  width: 23px;
  height: 23px;
  border-radius: 50%;
}

.brand-mark span:first-child {
  left: 0;
  background: var(--coral);
}

.brand-mark span:last-child {
  right: 0;
  background: var(--sky);
  mix-blend-mode: multiply;
}

.pair-status {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  gap: 7px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 253, 248, 0.72);
  color: var(--ink-soft);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--sage);
  box-shadow: 0 0 0 4px rgba(113, 163, 138, 0.14);
}

.pair-status.is-pending .status-dot {
  background: var(--gold);
  box-shadow: 0 0 0 4px rgba(213,168,77,.14);
}

.pair-status.is-error .status-dot {
  background: var(--danger);
  box-shadow: 0 0 0 4px rgba(189,75,72,.14);
}

#main-content {
  min-height: calc(100vh - 170px);
}

.page {
  padding: 10px 16px 34px;
  animation: page-enter 420ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.eyebrow {
  margin-bottom: 6px;
  color: var(--coral-dark);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.clock-card {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  overflow: hidden;
  border-radius: var(--radius-xl);
  background: var(--ink);
  box-shadow: var(--shadow);
  color: white;
}

.solo-intro {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 22px;
  padding: 10px 4px 22px;
}

.solo-intro h1 {
  max-width: 670px;
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(34px, 8vw, 56px);
  font-weight: 500;
  letter-spacing: -0.045em;
  line-height: .99;
}

.solo-intro p:last-child {
  max-width: 620px;
  margin: 13px 0 0;
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.7;
}

.solo-contact-window {
  position: relative;
  overflow: hidden;
  margin-top: 20px;
  padding: 22px;
  border: 1px solid rgba(45,111,146,.2);
  border-radius: var(--radius-xl);
  background: var(--surface-blue);
}

.solo-contact-window::after {
  position: absolute;
  top: -80px;
  right: -64px;
  width: 190px;
  height: 190px;
  border: 30px solid rgba(120,184,216,.14);
  border-radius: 50%;
  content: "";
  pointer-events: none;
}

.solo-contact-window__lead {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 11px;
}

.solo-contact-window__lead > span {
  display: grid;
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  place-items: center;
  border-radius: 15px;
  background: var(--ink);
  color: white;
}

.solo-contact-window h2,
.solo-meeting-preview h2 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(24px, 6vw, 34px);
  font-weight: 500;
  letter-spacing: -.035em;
}

.solo-contact-window__times {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 15px;
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid rgba(45,111,146,.16);
}

.solo-contact-window__times > div:last-child {
  text-align: right;
}

.solo-contact-window__times small,
.solo-contact-window__times strong,
.solo-contact-window__times span {
  display: block;
}

.solo-contact-window__times small {
  color: var(--sky-dark);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .08em;
}

.solo-contact-window__times strong {
  margin-top: 5px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(23px, 7vw, 38px);
  font-variant-numeric: tabular-nums;
  font-weight: 500;
  letter-spacing: -.045em;
  white-space: nowrap;
}

.solo-contact-window__times span {
  margin-top: 4px;
  color: var(--ink-soft);
  font-size: 11px;
}

.solo-contact-window__times > i {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 50%;
  background: var(--surface);
  color: var(--coral-dark);
}

.solo-contact-window__actions {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: 18px;
}

.solo-contact-window__actions p,
.solo-contact-window--empty p,
.solo-meeting-preview p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 11px;
  line-height: 1.65;
}

.solo-contact-window--empty {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 20px;
}

.solo-meeting-preview {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 20px;
  margin-top: 18px;
  padding: 20px 4px 6px;
  border-top: 1px solid var(--line-strong);
}

.solo-meeting-preview p {
  max-width: 600px;
  margin-top: 8px;
}

.solo-meeting-preview .text-button {
  white-space: nowrap;
}

.clock-card::after {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255,255,255,.15) 0.7px, transparent 0.7px);
  background-size: 13px 13px;
  content: "";
  opacity: 0.24;
  pointer-events: none;
}

.clock-person {
  position: relative;
  z-index: 1;
  min-width: 0;
  padding: 52px 18px 23px;
}

.clock-person:first-child {
  border-right: 1px solid rgba(255,255,255,.15);
}

.clock-person--partner {
  text-align: right;
}

.clock-person::before {
  position: absolute;
  right: -32px;
  bottom: -55px;
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: rgba(120, 184, 216, 0.2);
  content: "";
}

.clock-person:first-child::before {
  right: auto;
  left: -34px;
  background: rgba(255, 118, 95, 0.2);
}

.clock-person.is-night::before {
  opacity: 0.55;
}

.clock-person__meta {
  position: absolute;
  top: 17px;
  left: 18px;
  display: flex;
  align-items: center;
  gap: 7px;
  max-width: calc(100% - 28px);
  color: rgba(255,255,255,.68);
  font-size: 10px;
  font-weight: 700;
  white-space: nowrap;
}

.clock-person--partner .clock-person__meta {
  right: 18px;
  left: auto;
  flex-direction: row-reverse;
}

.clock-person strong {
  position: relative;
  display: block;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(37px, 11vw, 54px);
  font-variant-numeric: tabular-nums;
  font-weight: 500;
  letter-spacing: -0.055em;
  line-height: 1;
}

.clock-person small {
  position: relative;
  display: block;
  margin-top: 9px;
  overflow: hidden;
  color: rgba(255,255,255,.6);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.clock-bridge {
  position: absolute;
  top: 16px;
  left: 50%;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 5px;
  min-height: 29px;
  padding: 0 8px;
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 999px;
  background: rgba(13, 35, 56, 0.86);
  color: rgba(255,255,255,.78);
  font-size: 8px;
  font-weight: 800;
  white-space: nowrap;
  transform: translateX(-50%);
}

.clock-bridge .icon {
  width: 13px;
  height: 13px;
}

.avatar {
  display: inline-grid;
  width: 27px;
  height: 27px;
  flex: 0 0 27px;
  place-items: center;
  border-radius: 50%;
  color: var(--ink);
  font-size: 11px;
  font-weight: 900;
}

.avatar--me {
  background: var(--coral);
}

.avatar--partner {
  background: var(--sky);
}

.date-switcher {
  margin-top: 27px;
}

.section-heading,
.timeline-toolbar,
.page-intro {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
}

.section-heading h2,
.timeline-toolbar h2,
.settings-card h2,
.data-card h2,
.sharing-card h2,
.security-card h2 {
  margin-bottom: 0;
  font-family: Georgia, "Songti SC", serif;
  font-size: 23px;
  font-weight: 600;
  letter-spacing: -0.025em;
}

.date-arrows {
  display: flex;
  gap: 6px;
}

.icon-button {
  display: inline-grid;
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: transparent;
}

.icon-button:hover {
  background: rgba(23,50,77,.07);
}

.icon-button--soft {
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  background: var(--surface);
}

.date-strip {
  display: grid;
  grid-template-columns: repeat(7, minmax(41px, 1fr));
  gap: 5px;
  margin-top: 16px;
}

.date-pill {
  position: relative;
  display: grid;
  min-width: 0;
  min-height: 69px;
  place-content: center;
  gap: 5px;
  border: 0;
  border-radius: 18px;
  background: transparent;
  color: var(--muted);
}

.date-pill span {
  font-size: 9px;
  font-weight: 800;
}

.date-pill strong {
  font-family: Georgia, serif;
  font-size: 20px;
  font-variant-numeric: tabular-nums;
  font-weight: 500;
}

.date-pill i {
  position: absolute;
  bottom: 6px;
  left: 50%;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: transparent;
  transform: translateX(-50%);
}

.date-pill.is-today i {
  background: var(--coral);
}

.date-pill.is-selected {
  background: var(--ink);
  box-shadow: 0 10px 24px rgba(23,50,77,.16);
  color: white;
}

.date-pill.is-selected i {
  background: var(--sky);
}

.free-window {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
  margin-top: 20px;
  padding: 15px;
  border: 1px solid rgba(113,163,138,.25);
  border-radius: var(--radius-lg);
  background: #edf4eb;
}

.free-window--busy {
  border-color: var(--line);
  background: var(--surface);
}

.free-window__icon {
  display: grid;
  width: 41px;
  height: 41px;
  place-items: center;
  border-radius: 14px;
  background: var(--sage);
  color: white;
}

.free-window--busy .free-window__icon {
  background: var(--paper-deep);
  color: var(--ink-soft);
}

.free-window div {
  min-width: 0;
}

.free-window small,
.free-window strong,
.free-window p {
  display: block;
}

.free-window small {
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .04em;
}

.free-window strong {
  margin-top: 3px;
  font-family: Georgia, serif;
  font-size: 20px;
  font-variant-numeric: tabular-nums;
}

.free-window p {
  margin: 3px 0 0;
  overflow: hidden;
  color: var(--ink-soft);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.free-window > button {
  min-height: 44px;
  padding: 0 13px;
  border: 0;
  border-radius: 13px;
  background: var(--ink);
  color: white;
  font-size: 11px;
  font-weight: 800;
}

.meeting-plan-card {
  position: relative;
  overflow: hidden;
  margin-top: 14px;
  padding: 20px;
  border: 1px solid rgba(255,118,95,.24);
  border-radius: var(--radius-xl);
  background: var(--surface-coral);
}

.meeting-plan-card::after {
  position: absolute;
  right: -48px;
  bottom: -86px;
  width: 180px;
  height: 180px;
  border: 26px solid rgba(255,118,95,.1);
  border-radius: 50%;
  content: "";
  pointer-events: none;
}

.meeting-plan-card.is-confirmed {
  border-color: rgba(113,163,138,.3);
  background: #edf4eb;
}

.meeting-plan-card--empty {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 20px;
}

.meeting-plan-card--empty h2,
.meeting-plan-card__heading h2 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(24px, 6vw, 34px);
  font-weight: 500;
  letter-spacing: -.035em;
}

.meeting-plan-card--empty p,
.meeting-plan-copy p,
.meeting-plan-copy small {
  color: var(--ink-soft);
  font-size: 11px;
  line-height: 1.65;
}

.meeting-plan-card--empty p {
  max-width: 610px;
  margin: 8px 0 0;
}

.meeting-plan-card__heading {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.meeting-plan-status {
  flex: 0 0 auto;
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(213,168,77,.16);
  color: #785d1b;
  font-size: 9px;
  font-weight: 900;
}

.meeting-plan-status.is-confirmed {
  background: rgba(113,163,138,.18);
  color: #315f4a;
}

.meeting-plan-status.is-error {
  background: rgba(180,67,64,.12);
  color: var(--danger);
}

.meeting-plan-card__body {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr);
  gap: 18px;
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid rgba(23,50,77,.12);
}

.meeting-plan-date {
  display: grid;
  align-content: start;
  justify-items: center;
  min-height: 94px;
  padding: 10px 8px;
  border-radius: 19px;
  background: var(--ink);
  color: white;
}

.meeting-plan-date small {
  color: rgba(255,255,255,.66);
  font-size: 9px;
  font-weight: 800;
}

.meeting-plan-date strong {
  margin-top: -2px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 38px;
  font-weight: 500;
  line-height: 1;
}

.meeting-plan-date span {
  margin-top: 7px;
  font-size: 9px;
  font-weight: 800;
}

.meeting-plan-copy {
  min-width: 0;
  padding-top: 4px;
}

.meeting-plan-copy > strong {
  display: block;
  overflow: hidden;
  font-size: 16px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.meeting-plan-copy p {
  margin: 7px 0 5px;
}

.meeting-plan-copy small {
  display: block;
  font-size: 9px;
}

.meeting-plan-card__actions {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: flex-end;
  gap: 9px;
  margin-top: 17px;
}

.meeting-confirm-note {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 13px;
  border-radius: 15px;
  background: var(--surface-blue);
  color: var(--ink-soft);
}

.meeting-confirm-note p {
  margin: 0;
  font-size: 11px;
  line-height: 1.65;
}

.timeline-section {
  overflow: hidden;
  margin-top: 30px;
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: rgba(255,253,248,.86);
}

.timeline-toolbar {
  padding: 20px 18px 16px;
}

.button {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 0 17px;
  border: 0;
  border-radius: 15px;
  font-size: 12px;
  font-weight: 850;
  transition: transform 160ms ease, background-color 160ms ease, box-shadow 160ms ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button:active {
  transform: translateY(0);
}

.button--primary {
  background: var(--coral);
  box-shadow: 0 10px 22px rgba(255,118,95,.22);
  color: #2c2630;
}

.button--primary:hover {
  background: #ff846f;
}

.button--soft {
  border: 1px solid var(--line);
  background: var(--surface);
}

.button--text {
  background: transparent;
  color: var(--ink-soft);
}

.button--ink {
  background: var(--ink);
  color: white;
}

.button--small {
  min-height: 44px;
  padding: 0 12px;
  border-radius: 12px;
  font-size: 10px;
}

.button--block {
  width: 100%;
}

.timeline-legend {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: rgba(244,240,232,.52);
}

.timeline-legend > div {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 9px;
  padding: 12px 14px;
}

.timeline-legend > div:first-child {
  border-right: 1px solid var(--line);
}

.timeline-legend > div:last-child {
  flex-direction: row-reverse;
  text-align: right;
}

.timeline-legend > div > span:last-child {
  display: grid;
  min-width: 0;
}

.timeline-legend strong {
  overflow: hidden;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.timeline-legend small {
  overflow: hidden;
  margin-top: 1px;
  color: var(--muted);
  font-size: 8px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.timeline-canvas {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 700px;
}

.timeline-column {
  position: relative;
  min-width: 0;
}

.timeline-column--me {
  border-right: 1px solid var(--line-strong);
  background: linear-gradient(90deg, rgba(255,118,95,.025), transparent 44%);
}

.timeline-column--partner {
  background: linear-gradient(270deg, rgba(120,184,216,.04), transparent 44%);
}

.timeline-hour {
  position: absolute;
  right: 0;
  left: 0;
  border-top: 1px solid rgba(23,50,77,.08);
}

.timeline-hour span {
  position: absolute;
  top: -8px;
  left: 7px;
  z-index: 2;
  padding: 1px 5px;
  border-radius: 5px;
  background: rgba(255,253,248,.93);
  color: var(--muted);
  font-family: Georgia, serif;
  font-size: 9px;
  font-variant-numeric: tabular-nums;
}

.timeline-column--partner .timeline-hour span {
  right: 7px;
  left: auto;
}

.timeline-events {
  position: absolute;
  inset: 0;
}

.timeline-event {
  position: absolute;
  right: 8px;
  left: 8px;
  z-index: 5;
  overflow: hidden;
  padding: 8px 8px 7px 10px;
  border-left: 3px solid var(--coral-dark);
  border-radius: 12px;
  background: var(--surface-coral);
  box-shadow: 0 8px 18px rgba(38,48,55,.08);
  color: var(--ink);
}

.card-edit-hit {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  border-radius: inherit;
  background: transparent;
}

.card-edit-hit:hover {
  background: rgba(23,50,77,.035);
}

.card-edit-hit:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: -3px;
}

.timeline-event > :not(.card-edit-hit),
.anniversary-card > :not(.card-edit-hit),
.memory-entry > :not(.card-edit-hit) {
  position: relative;
  z-index: 2;
  pointer-events: none;
}

.timeline-event__top button,
.anniversary-card > button:not(.card-edit-hit),
.memory-entry > button:not(.card-edit-hit) {
  z-index: 3;
  pointer-events: auto;
}

.timeline-event--partner {
  border-left-color: var(--event-color, var(--sky-dark));
  background: var(--surface-blue);
}

.timeline-event--me {
  border-left-color: var(--event-color, var(--coral-dark));
}

.timeline-event--together {
  border-left-color: var(--gold);
  background: var(--ink);
  color: white;
}

.timeline-event__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
}

.timeline-event__top > span {
  color: var(--coral-dark);
  font-size: 7px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.timeline-event--partner .timeline-event__top > span {
  color: var(--sky-dark);
}

.timeline-event--together .timeline-event__top > span {
  color: #f2ce79;
}

.timeline-event__top button {
  display: grid;
  width: 22px;
  height: 22px;
  place-items: center;
  margin: -5px -4px 0 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: currentColor;
  opacity: .48;
}

.timeline-event__top button::before {
  position: absolute;
  inset: -11px;
  content: "";
}

.timeline-event__top button:hover {
  background: rgba(23,50,77,.08);
  opacity: 1;
}

.timeline-event strong,
.timeline-event small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.timeline-event strong {
  margin-top: 1px;
  font-size: 11px;
}

.timeline-event small {
  margin-top: 3px;
  color: var(--ink-soft);
  font-size: 8px;
}

.timeline-event--together small {
  color: rgba(255,255,255,.62);
}

.timeline-event.is-compact {
  display: grid;
  grid-template-columns: 1fr;
  align-content: center;
  padding-top: 5px;
  padding-bottom: 5px;
}

.timeline-event.is-compact .timeline-event__top > span,
.timeline-event.is-compact small {
  display: none;
}

.timeline-event.is-compact .timeline-event__top {
  position: absolute;
  top: 6px;
  right: 5px;
}

.timeline-event.is-compact strong {
  max-width: calc(100% - 18px);
}

.now-line {
  position: absolute;
  right: 0;
  left: 0;
  z-index: 12;
  height: 2px;
  background: var(--coral);
  box-shadow: 0 0 0 1px rgba(255,255,255,.8);
  pointer-events: none;
}

.now-line::before {
  position: absolute;
  top: -4px;
  left: 50%;
  width: 9px;
  height: 9px;
  border: 2px solid white;
  border-radius: 50%;
  background: var(--coral);
  content: "";
  transform: translateX(-50%);
}

.now-line span {
  position: absolute;
  top: -10px;
  left: 7px;
  padding: 2px 5px;
  border-radius: 5px;
  background: var(--coral);
  color: white;
  font-size: 7px;
  font-weight: 900;
}

.bottom-nav {
  position: fixed;
  right: max(10px, calc((100vw - 880px) / 2));
  bottom: calc(10px + var(--safe-bottom));
  left: max(10px, calc((100vw - 880px) / 2));
  z-index: 50;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  min-height: 67px;
  padding: 6px;
  border: 1px solid rgba(255,255,255,.68);
  border-radius: 24px;
  background: rgba(23,50,77,.94);
  box-shadow: 0 20px 50px rgba(23,50,77,.24);
  backdrop-filter: blur(20px);
}

.app-update {
  position: sticky;
  top: 72px;
  z-index: 120;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  margin: 4px 16px 0;
  padding: 12px;
  border: 1px solid rgba(120,184,216,.34);
  border-radius: 18px;
  background: rgba(237,246,250,.97);
  box-shadow: 0 12px 28px rgba(23,50,77,.12);
  backdrop-filter: blur(16px);
}

.app-update__icon {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 14px;
  background: var(--surface);
  color: var(--sky-dark);
}

.app-update strong {
  display: block;
  margin-bottom: 3px;
  font-size: 11px;
}

.app-update p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 9px;
  line-height: 1.55;
}

.nav-item {
  display: grid;
  min-width: 0;
  min-height: 54px;
  place-items: center;
  align-content: center;
  gap: 3px;
  border: 0;
  border-radius: 18px;
  background: transparent;
  color: rgba(255,255,255,.62);
  font-size: 8px;
  font-weight: 800;
}

.nav-item.is-active {
  background: rgba(255,255,255,.11);
  color: white;
}

.nav-item.is-active .icon {
  color: var(--coral);
}

.floating-action {
  position: fixed;
  right: max(20px, calc((100vw - 850px) / 2));
  bottom: calc(88px + var(--safe-bottom));
  z-index: 45;
  display: grid;
  width: 54px;
  height: 54px;
  place-items: center;
  border: 0;
  border-radius: 18px;
  background: var(--coral);
  box-shadow: 0 14px 30px rgba(255,118,95,.32);
  color: var(--ink);
}

.page-intro {
  align-items: flex-start;
  margin: 12px 2px 24px;
}

.page-intro > div {
  max-width: 590px;
}

.page-intro h1 {
  margin-bottom: 10px;
  font-family: Georgia, "Songti SC", serif;
  font-size: clamp(31px, 9vw, 52px);
  font-weight: 500;
  letter-spacing: -0.045em;
  line-height: 1.05;
}

.page-intro p:last-child {
  max-width: 480px;
  margin-bottom: 0;
  color: var(--ink-soft);
  font-size: 12px;
  line-height: 1.7;
}

.relationship-card {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto;
  overflow: hidden;
  min-height: 222px;
  align-items: end;
  padding: 24px;
  border-radius: var(--radius-xl);
  background: var(--ink);
  color: white;
}

.relationship-card::after {
  position: absolute;
  inset: 0;
  background-image: linear-gradient(120deg, transparent 50%, rgba(255,255,255,.04));
  content: "";
}

.relationship-card > div:not(.relationship-card__orbit),
.relationship-card > p {
  position: relative;
  z-index: 2;
}

.relationship-card small {
  display: block;
  color: rgba(255,255,255,.56);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .12em;
}

.relationship-card strong {
  font-family: Georgia, serif;
  font-size: clamp(60px, 20vw, 94px);
  font-variant-numeric: tabular-nums;
  font-weight: 400;
  letter-spacing: -.07em;
  line-height: .95;
}

.relationship-card > div > span {
  margin-left: 7px;
  color: var(--coral);
  font-weight: 800;
}

.relationship-card p {
  margin-bottom: 4px;
  color: rgba(255,255,255,.62);
  font-size: 10px;
  line-height: 1.7;
  text-align: right;
}

.relationship-card__orbit {
  position: absolute;
  top: -85px;
  right: -55px;
  width: 260px;
  height: 260px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 50%;
}

.relationship-card__orbit::after {
  position: absolute;
  inset: 40px;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 50%;
  content: "";
}

.relationship-card__orbit span {
  position: absolute;
  width: 34px;
  height: 34px;
  border-radius: 50%;
}

.relationship-card__orbit span:first-child {
  bottom: 28px;
  left: 22px;
  background: var(--coral);
}

.relationship-card__orbit span:last-child {
  right: 13px;
  bottom: 78px;
  background: var(--sky);
}

.anniversary-list {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.anniversary-card {
  position: relative;
  display: grid;
  grid-template-columns: 64px 1fr auto;
  gap: 15px;
  align-items: center;
  padding: 16px 12px 16px 15px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
}

.anniversary-card::before {
  position: absolute;
  top: 14px;
  bottom: 14px;
  left: 0;
  width: 4px;
  border-radius: 0 4px 4px 0;
  background: var(--accent);
  content: "";
}

.anniversary-card__date {
  display: grid;
  min-height: 66px;
  place-items: center;
  align-content: center;
  border-radius: 17px;
  background: color-mix(in srgb, var(--accent) 15%, white);
}

.anniversary-card__date span {
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
}

.anniversary-card__date strong {
  font-family: Georgia, serif;
  font-size: 28px;
  font-weight: 500;
  line-height: 1;
}

.anniversary-card__body {
  min-width: 0;
}

.anniversary-card__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.anniversary-card__top > strong {
  color: var(--coral-dark);
  font-size: 10px;
}

.tag {
  display: inline-flex;
  min-height: 22px;
  align-items: center;
  padding: 0 8px;
  border-radius: 999px;
  background: var(--paper-deep);
  color: var(--ink-soft);
  font-size: 8px;
  font-weight: 800;
}

.anniversary-card h2 {
  margin: 7px 0 4px;
  overflow: hidden;
  font-family: Georgia, "Songti SC", serif;
  font-size: 18px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.anniversary-card p {
  margin-bottom: 5px;
  overflow: hidden;
  color: var(--ink-soft);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.anniversary-card__body > small {
  color: var(--muted);
  font-size: 8px;
}

.memory-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 20px;
}

.memory-stats div {
  display: grid;
  min-height: 94px;
  place-items: center;
  align-content: center;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--surface);
}

.memory-stats strong {
  font-family: Georgia, serif;
  font-size: 30px;
  font-weight: 500;
}

.memory-stats span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
}

.memory-timeline {
  position: relative;
  display: grid;
  gap: 13px;
}

.memory-entry {
  position: relative;
  display: grid;
  grid-template-columns: 38px 1fr auto;
  gap: 12px;
  padding: 20px 12px 20px 0;
  border: 1px solid var(--line);
  border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
  background: var(--surface);
}

.memory-entry__rail {
  position: relative;
  display: flex;
  justify-content: center;
  border-right: 1px solid var(--line);
}

.memory-entry__rail span {
  display: grid;
  width: 25px;
  height: 25px;
  place-items: center;
  border-radius: 50%;
  background: var(--ink);
  color: white;
  font-family: Georgia, serif;
  font-size: 10px;
}

.memory-entry__content {
  min-width: 0;
}

.memory-entry__meta {
  display: flex;
  align-items: center;
  gap: 8px;
}

.memory-entry__meta time {
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
}

.memory-entry__meta span {
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--surface-coral);
  color: var(--coral-dark);
  font-size: 8px;
  font-weight: 800;
}

.memory-entry h2 {
  margin: 9px 0 7px;
  font-family: Georgia, "Songti SC", serif;
  font-size: 20px;
  font-weight: 600;
}

.memory-entry p {
  margin-bottom: 10px;
  color: var(--ink-soft);
  font-size: 11px;
  line-height: 1.75;
  white-space: pre-line;
}

.memory-entry__content > small {
  display: flex;
  align-items: center;
  gap: 4px;
  color: var(--muted);
  font-size: 8px;
}

.pair-card {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 16px;
  padding: 20px;
  border-radius: var(--radius-xl);
  background: var(--ink);
  color: white;
}

.cloud-card {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 16px;
  padding: 20px;
  border: 1px solid rgba(120,184,216,.28);
  border-radius: var(--radius-xl);
  background: var(--surface-blue);
}

.cloud-card--local {
  border-color: var(--line);
  background: var(--surface);
}

.cloud-card--error {
  border-color: rgba(189,75,72,.24);
  background: #fff0ef;
}

.cloud-card__icon {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border-radius: 16px;
  background: var(--ink);
  color: white;
}

.cloud-card small {
  color: var(--sky-dark);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.cloud-card h2 {
  margin: 3px 0 4px;
  font-family: Georgia, "Songti SC", serif;
  font-size: 20px;
  font-weight: 600;
}

.cloud-card p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 9px;
  line-height: 1.55;
}

.pair-card--cloud {
  grid-template-columns: auto 1fr auto;
}

.pair-card__actions {
  display: grid;
  gap: 7px;
}

.invite-code {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 10px;
  margin-top: 4px;
  padding: 12px 14px;
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 15px;
  background: rgba(255,255,255,.08);
}

.invite-code span {
  color: rgba(255,255,255,.58);
  font-size: 8px;
  font-weight: 800;
}

.invite-code strong {
  margin: 0;
  font-size: 18px;
  text-align: center;
}

.invite-code button {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  gap: 5px;
  padding: 0 10px;
  border: 0;
  border-radius: 10px;
  background: white;
  color: var(--ink);
  font-size: 9px;
  font-weight: 800;
}

.pair-card__avatars {
  display: flex;
  align-items: center;
}

.pair-card__avatars .avatar {
  width: 42px;
  height: 42px;
  flex-basis: 42px;
}

.pair-card__avatars .avatar:last-child {
  margin-left: -8px;
}

.pair-card__avatars i {
  z-index: 2;
  display: grid;
  width: 27px;
  height: 27px;
  place-items: center;
  margin-left: -7px;
  border: 3px solid var(--ink);
  border-radius: 50%;
  background: white;
  color: var(--coral);
}

.pair-card small,
.pair-card strong,
.pair-card p {
  display: block;
}

.pair-card small {
  color: rgba(255,255,255,.55);
  font-size: 9px;
  font-weight: 800;
}

.pair-card strong {
  margin-top: 2px;
  font-family: Georgia, serif;
  font-size: 24px;
  letter-spacing: .08em;
}

.pair-card p {
  margin: 5px 0 0;
  color: rgba(255,255,255,.6);
  font-size: 9px;
  line-height: 1.5;
}

.settings-card,
.data-card,
.sharing-card,
.security-card {
  margin-top: 16px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: var(--surface);
}

.settings-card__heading,
.data-card__heading,
.sharing-card__heading,
.security-card__heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 18px;
}

.settings-card__heading > .icon {
  color: var(--sky-dark);
}

.form-grid {
  display: grid;
  gap: 12px;
}

.form-grid--two {
  grid-template-columns: 1fr 1fr;
}

.field {
  display: grid;
  gap: 7px;
  min-width: 0;
  color: var(--ink-soft);
  font-size: 10px;
  font-weight: 800;
}

.field--full {
  grid-column: 1 / -1;
}

.field input,
.field textarea,
.field select {
  width: 100%;
  min-height: 48px;
  padding: 11px 13px;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  outline: 0;
  background: #fffefa;
  color: var(--ink);
  font-size: 12px;
  font-weight: 600;
}

.field select[data-select-enhanced] {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  border: 0;
  white-space: nowrap;
  pointer-events: none;
}

.select-control {
  min-width: 0;
}

.select-trigger {
  display: grid;
  width: 100%;
  min-height: 48px;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 11px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  background: #fffefa;
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: border-color 180ms ease, box-shadow 180ms ease, background 180ms ease, transform 180ms ease;
}

.select-trigger:active {
  transform: scale(.99);
}

.select-trigger:focus-visible,
.select-trigger[aria-expanded="true"] {
  outline: 0;
  border-color: var(--sky-dark);
  box-shadow: 0 0 0 4px rgba(120,184,216,.14);
}

.select-control.is-disabled .select-trigger {
  cursor: not-allowed;
  opacity: .48;
}

.select-trigger__swatch,
.select-sheet__swatch {
  width: 18px;
  height: 18px;
  border: 1px solid rgba(23,50,77,.14);
  border-radius: 50%;
  background: var(--select-color);
  box-shadow: inset 0 0 0 3px rgba(255,255,255,.55);
}

.select-trigger__value {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.select-trigger__arrow {
  width: 9px;
  height: 9px;
  margin: -4px 3px 0 5px;
  border-right: 2px solid var(--ink-soft);
  border-bottom: 2px solid var(--ink-soft);
  transform: rotate(45deg);
  transition: transform 180ms ease;
}

.select-trigger[aria-expanded="true"] .select-trigger__arrow {
  margin-top: 4px;
  transform: rotate(225deg);
}

.select-sheet-open {
  overflow: hidden;
}

.select-sheet-backdrop {
  position: fixed;
  inset: 0;
  z-index: 160;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 10px 10px 0;
  background: rgba(12,26,40,.58);
  backdrop-filter: blur(9px);
  animation: backdrop-enter 180ms ease both;
}

.select-sheet {
  display: grid;
  width: min(100%, 520px);
  max-height: min(74dvh, 680px);
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
  padding: 10px 12px calc(18px + var(--safe-bottom));
  border: 1px solid rgba(120,184,216,.34);
  border-radius: 30px 30px 0 0;
  background: var(--paper);
  box-shadow: 0 -24px 90px rgba(12,26,40,.3);
  animation: sheet-enter 280ms cubic-bezier(.22,1,.36,1) both;
}

.select-sheet__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 10px 8px 14px;
}

.select-sheet__header .eyebrow {
  margin-bottom: 5px;
}

.select-sheet__header h2 {
  margin: 0;
  font-family: Georgia, "Songti SC", serif;
  font-size: 25px;
  font-weight: 600;
  letter-spacing: -.03em;
}

.select-sheet__list {
  display: grid;
  align-content: start;
  gap: 6px;
  overflow: auto;
  padding: 2px 2px 8px;
  overscroll-behavior: contain;
}

.select-sheet__option {
  display: grid;
  width: 100%;
  min-height: 52px;
  grid-template-columns: 18px minmax(0, 1fr) 22px;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border: 0;
  border-radius: 16px;
  background: transparent;
  color: var(--ink-soft);
  text-align: left;
  transition: background 160ms ease, color 160ms ease, transform 160ms ease;
}

.select-sheet__option > span:nth-child(2) {
  overflow: hidden;
  font-size: 13px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.select-sheet__option .select-sheet__swatch:not([style]) {
  visibility: hidden;
}

.select-sheet__option svg {
  opacity: 0;
  color: var(--sky-dark);
}

.select-sheet__option.is-selected {
  background: var(--surface-blue);
  color: var(--ink);
}

.select-sheet__option.is-selected svg {
  opacity: 1;
}

.select-sheet__option:focus-visible {
  outline: 3px solid rgba(45,111,146,.34);
  outline-offset: -2px;
}

.select-sheet__option:active {
  transform: scale(.99);
}

.select-sheet__option:disabled {
  cursor: not-allowed;
  opacity: .38;
}

@media (hover: hover) {
  .select-trigger:hover {
    border-color: rgba(45,111,146,.5);
    background: var(--surface);
  }

  .select-sheet__option:not(:disabled):hover {
    background: rgba(120,184,216,.12);
    color: var(--ink);
  }
}

@media (min-width: 700px) {
  .select-sheet-backdrop {
    align-items: center;
    padding: 20px;
  }

  .select-sheet {
    border-radius: 30px;
  }
}

.field input[data-temporal-enhanced] {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  border: 0;
  white-space: nowrap;
  pointer-events: none;
}

.temporal-control {
  min-width: 0;
}

.temporal-trigger {
  display: grid;
  width: 100%;
  min-height: 48px;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  background: #fffefa;
  color: var(--ink);
  cursor: pointer;
  transition: border-color 180ms ease, box-shadow 180ms ease, background 180ms ease, transform 180ms ease;
}

.temporal-trigger:active {
  transform: scale(.99);
}

.temporal-trigger:focus-visible,
.temporal-trigger[aria-expanded="true"] {
  outline: 0;
  border-color: var(--sky-dark);
  box-shadow: 0 0 0 4px rgba(120,184,216,.14);
}

.temporal-trigger__icon {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 10px;
  background: var(--surface-blue);
  color: var(--sky-dark);
}

.temporal-trigger__value {
  overflow: hidden;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  font-weight: 750;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.temporal-control.is-empty .temporal-trigger__value {
  color: var(--muted);
}

.temporal-trigger__arrow {
  display: grid;
  place-items: center;
  color: var(--muted);
  transition: transform 180ms ease;
}

.temporal-trigger[aria-expanded="true"] .temporal-trigger__arrow {
  transform: rotate(90deg);
}

.temporal-control.is-disabled .temporal-trigger {
  cursor: not-allowed;
  opacity: .48;
}

.temporal-sheet-open,
.confirmation-open {
  overflow: hidden;
}

.temporal-sheet-backdrop,
.confirmation-backdrop {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 10px 10px 0;
  background: rgba(12,26,40,.58);
  backdrop-filter: blur(9px);
  animation: backdrop-enter 180ms ease both;
}

.temporal-sheet-backdrop {
  z-index: 170;
}

.temporal-sheet {
  display: grid;
  width: min(100%, 520px);
  max-height: min(88dvh, 760px);
  overflow: hidden;
  padding: 10px 16px calc(18px + var(--safe-bottom));
  border: 1px solid rgba(120,184,216,.34);
  border-radius: 30px 30px 0 0;
  background: var(--paper);
  box-shadow: 0 -24px 90px rgba(12,26,40,.3);
  animation: sheet-enter 280ms cubic-bezier(.22,1,.36,1) both;
}

.temporal-sheet.is-updating {
  animation: none;
}

.temporal-sheet__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 2px 2px 14px;
}

.temporal-sheet__header .eyebrow {
  margin-bottom: 5px;
}

.temporal-sheet__header h2 {
  margin: 0;
  font-family: Georgia, "Songti SC", serif;
  font-size: 25px;
  font-weight: 600;
  letter-spacing: -.03em;
}

.temporal-calendar__nav {
  display: grid;
  grid-template-columns: 42px 1fr 42px;
  align-items: center;
  gap: 10px;
  margin: 2px 0 12px;
}

.temporal-calendar__nav strong {
  text-align: center;
  font-size: 15px;
  font-variant-numeric: tabular-nums;
}

.temporal-calendar__weekdays,
.temporal-calendar {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
}

.temporal-calendar__weekdays {
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 850;
  text-align: center;
}

.temporal-calendar {
  gap: 4px;
}

.temporal-day {
  display: grid;
  min-width: 0;
  min-height: 40px;
  place-items: center;
  border: 0;
  border-radius: 13px;
  background: transparent;
  color: var(--ink-soft);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  font-weight: 750;
  transition: background 150ms ease, color 150ms ease, transform 150ms ease;
}

.temporal-day.is-outside {
  color: var(--muted);
  font-weight: 650;
}

.temporal-day.is-today:not(.is-selected) {
  box-shadow: inset 0 0 0 1px var(--coral);
  color: var(--ink);
}

.temporal-day.is-selected {
  background: var(--ink);
  box-shadow: 0 8px 18px rgba(23,50,77,.18);
  color: white;
}

.temporal-day:focus-visible,
.temporal-time-column button:focus-visible {
  outline: 3px solid rgba(45,111,146,.34);
  outline-offset: 1px;
}

.temporal-day:active,
.temporal-time-column button:active {
  transform: scale(.96);
}

.temporal-day:disabled,
.temporal-time-column button:disabled {
  cursor: not-allowed;
  opacity: .25;
}

.temporal-time-preview {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 74px;
  margin-bottom: 12px;
  border-radius: 22px;
  background: var(--surface-blue);
  color: var(--ink);
  font-family: Georgia, "Songti SC", serif;
  font-size: 38px;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  letter-spacing: -.04em;
}

.temporal-time-preview i {
  color: var(--coral);
  font-style: normal;
}

.temporal-time-columns {
  display: grid;
  min-height: 0;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.temporal-time-column {
  display: grid;
  min-height: 0;
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
  border-radius: 18px;
  background: rgba(244,240,232,.64);
}

.temporal-time-column small {
  padding: 10px 12px 7px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 850;
  text-align: center;
}

.temporal-time-column > div {
  display: grid;
  align-content: start;
  gap: 4px;
  overflow: auto;
  max-height: min(34dvh, 280px);
  padding: 0 7px 8px;
  overscroll-behavior: contain;
  scrollbar-width: thin;
}

.temporal-time-column button {
  min-height: 42px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--ink-soft);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  font-weight: 800;
}

.temporal-time-column button.is-selected {
  background: var(--ink);
  color: white;
}

.temporal-sheet__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-top: 15px;
}

.temporal-sheet__shortcuts,
.temporal-sheet__actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.temporal-sheet__footer .button {
  min-height: 42px;
  padding: 0 13px;
  border-radius: 13px;
  font-size: 10px;
}

.confirmation-backdrop {
  z-index: 180;
}

.confirmation-sheet {
  display: grid;
  width: min(100%, 500px);
  grid-template-columns: auto minmax(0, 1fr);
  gap: 14px;
  padding: 20px 18px calc(20px + var(--safe-bottom));
  border: 1px solid rgba(120,184,216,.3);
  border-radius: 28px 28px 0 0;
  background: var(--paper);
  box-shadow: 0 -24px 90px rgba(12,26,40,.32);
  animation: sheet-enter 260ms cubic-bezier(.22,1,.36,1) both;
}

.confirmation-sheet__symbol {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border-radius: 15px;
  background: var(--surface-blue);
  color: var(--sky-dark);
}

.confirmation-sheet--danger .confirmation-sheet__symbol {
  background: color-mix(in srgb, var(--danger) 12%, var(--surface));
  color: var(--danger);
}

.confirmation-sheet__copy {
  min-width: 0;
}

.confirmation-sheet__copy .eyebrow {
  margin-bottom: 5px;
}

.confirmation-sheet__copy h2 {
  margin: 0;
  font-family: Georgia, "Songti SC", serif;
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -.03em;
}

.confirmation-sheet__copy > p:last-child {
  max-width: 58ch;
  margin: 9px 0 0;
  color: var(--ink-soft);
  font-size: 11px;
  line-height: 1.65;
}

.confirmation-sheet__actions {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: 1fr 1.2fr;
  gap: 9px;
  margin-top: 4px;
}

.confirmation-button {
  min-height: 48px;
  padding: 0 14px;
  border: 0;
  border-radius: 15px;
  font-size: 12px;
  font-weight: 850;
  transition: transform 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.confirmation-button:active {
  transform: scale(.98);
}

.confirmation-button:focus-visible {
  outline: 3px solid rgba(45,111,146,.34);
  outline-offset: 2px;
}

.confirmation-button--cancel {
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink-soft);
}

.confirmation-button--primary {
  background: var(--ink);
  box-shadow: 0 10px 24px rgba(23,50,77,.2);
  color: white;
}

.confirmation-button--danger {
  background: var(--danger);
  box-shadow: 0 10px 24px rgba(180,67,64,.2);
  color: white;
}

@media (hover: hover) {
  .temporal-trigger:hover {
    border-color: rgba(45,111,146,.5);
    background: var(--surface);
  }

  .temporal-day:not(:disabled):hover,
  .temporal-time-column button:not(:disabled):hover {
    background: rgba(120,184,216,.14);
    color: var(--ink);
  }

  .temporal-day.is-selected:hover,
  .temporal-time-column button.is-selected:hover {
    background: var(--ink);
    color: white;
  }
}

@media (min-width: 700px) {
  .temporal-sheet-backdrop,
  .confirmation-backdrop {
    align-items: center;
    padding: 20px;
  }

  .temporal-sheet,
  .confirmation-sheet {
    border-radius: 30px;
  }
}

@media (max-width: 390px) {
  .temporal-sheet {
    padding-right: 12px;
    padding-left: 12px;
  }

  .temporal-day {
    min-height: 37px;
  }

  .temporal-sheet__footer {
    align-items: stretch;
    flex-direction: column;
  }

  .temporal-sheet__shortcuts,
  .temporal-sheet__actions {
    justify-content: space-between;
  }

  .temporal-sheet__actions .button {
    flex: 1;
  }
}

.field textarea {
  min-height: 94px;
  line-height: 1.6;
  resize: vertical;
}

.field input:focus,
.field textarea:focus,
.field select:focus {
  border-color: var(--sky-dark);
  box-shadow: 0 0 0 4px rgba(120,184,216,.14);
}

.settings-card > .button {
  margin-top: 16px;
}

.notification-card__status {
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  background: var(--surface-blue);
  color: var(--sky-dark);
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}

.notification-card__intro,
.notification-card__privacy,
.notification-card__error {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.65;
}

.notification-form {
  display: grid;
  gap: 14px;
  margin-top: 16px;
}

.notification-card__privacy {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 15px;
  background: var(--surface-coral);
}

.notification-card__error {
  margin-top: 10px;
  color: var(--danger);
}

.notification-form :disabled {
  cursor: not-allowed;
  opacity: .58;
}

.data-card__heading > span {
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  padding: 0 10px;
  border-radius: 999px;
  background: var(--paper-deep);
  color: var(--ink-soft);
  font-size: 9px;
  font-weight: 800;
}

.sharing-card__heading > span {
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  padding: 0 10px;
  border-radius: 999px;
  background: var(--surface-blue);
  color: var(--sky-dark);
  font-size: 9px;
  font-weight: 900;
  white-space: nowrap;
}

.security-card__heading {
  margin-bottom: 14px;
}

.security-badge {
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  padding: 0 10px;
  border-radius: 999px;
  background: var(--paper-deep);
  color: var(--ink-soft);
  font-size: 9px;
  font-weight: 900;
  white-space: nowrap;
}

.security-badge.is-protected {
  background: #e9f3e7;
  color: #476f45;
}

.security-card__body {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  align-items: start;
  gap: 13px;
  padding: 15px;
  border-radius: 18px;
  background: var(--paper-deep);
}

.security-card__icon,
.mfa-gate__icon {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border-radius: 16px;
  background: var(--ink);
  color: white;
}

.security-card__body strong {
  display: block;
  color: var(--ink);
  font-size: 12px;
}

.security-card__body p {
  margin: 5px 0 0;
  color: var(--ink-soft);
  font-size: 9px;
  line-height: 1.65;
}

.security-card__actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 12px;
}

.mfa-support {
  margin: 0;
  color: var(--sky-dark);
  font-size: 9px;
  font-weight: 900;
  line-height: 1.55;
}

.page--mfa-gate {
  display: grid;
  min-height: calc(100vh - 190px);
  place-items: center;
}

.page--legal-gate {
  display: grid;
  min-height: calc(100vh - 190px);
  place-items: center;
}

.mfa-gate {
  display: grid;
  width: min(100%, 560px);
  gap: 18px;
  padding: 28px;
  border: 1px solid rgba(120,184,216,.35);
  border-radius: 28px;
  background: var(--surface-blue);
}

.mfa-gate__icon {
  width: 58px;
  height: 58px;
  border-radius: 19px;
}

.mfa-gate__copy h1 {
  margin: 5px 0 8px;
  font-family: Georgia, "Songti SC", serif;
  font-size: clamp(29px, 7vw, 42px);
  font-weight: 600;
  letter-spacing: -.04em;
}

.mfa-gate__copy > p:last-child {
  max-width: 500px;
  margin: 0;
  color: var(--ink-soft);
  font-size: 10px;
  line-height: 1.7;
}

.legal-gate {
  position: relative;
  display: grid;
  width: min(100%, 680px);
  gap: 20px;
  overflow: hidden;
  padding: 30px;
  border: 1px solid rgba(120,184,216,.42);
  border-radius: 30px;
  background:
    linear-gradient(90deg, transparent 0 47px, rgba(120,184,216,.18) 47px 48px, transparent 48px),
    var(--surface-blue);
}

.legal-gate::after {
  position: absolute;
  top: 0;
  right: 0;
  width: 108px;
  height: 8px;
  background: var(--sky-dark);
  content: "";
}

.legal-gate__masthead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.legal-gate__edition {
  color: var(--sky-dark);
  font-family: "Cascadia Code", monospace;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .16em;
}

.legal-gate__icon {
  display: grid;
  width: 58px;
  height: 58px;
  place-items: center;
  border-radius: 19px;
  color: white;
  background: var(--ink);
}

.legal-gate__copy {
  padding-left: 31px;
}

.legal-gate__copy h1 {
  max-width: 590px;
  margin: 6px 0 10px;
  font-family: Georgia, "Songti SC", serif;
  font-size: clamp(31px, 7vw, 48px);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -.045em;
}

.legal-gate__copy > p:last-child {
  max-width: 560px;
  margin: 0;
  color: var(--ink-soft);
  font-size: 10px;
  line-height: 1.75;
}

.legal-document-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding-left: 31px;
}

.legal-document {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-width: 0;
  padding: 16px;
  border-radius: 20px;
  color: var(--ink);
  text-decoration: none;
  transition: transform .18s ease, box-shadow .18s ease;
}

.legal-document:hover,
.legal-document:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(37,75,96,.12);
}

.legal-document--terms {
  background: var(--surface);
}

.legal-document--privacy {
  background: var(--paper-deep);
}

.legal-document__number {
  color: var(--sky-dark);
  font-family: Georgia, "Songti SC", serif;
  font-size: 24px;
  font-style: italic;
}

.legal-document span:nth-child(2) {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.legal-document small,
.legal-document em {
  color: var(--ink-soft);
  font-size: 8px;
  font-style: normal;
  font-weight: 800;
  letter-spacing: .05em;
}

.legal-document strong {
  font-family: Georgia, "Songti SC", serif;
  font-size: 17px;
  font-weight: 600;
}

.legal-acceptance-form {
  gap: 12px;
  padding-left: 31px;
}

.legal-consent--gate {
  padding: 15px 16px;
  border-color: rgba(120,184,216,.5);
  background: rgba(255,255,255,.72);
  color: var(--ink);
  font-size: 10px;
}

.legal-gate__boundary {
  margin: 0;
  color: var(--ink-soft);
  font-size: 9px;
  line-height: 1.65;
}

.legal-gate > .text-button {
  justify-self: start;
  margin-left: 31px;
}

.mfa-challenge-form {
  padding: 16px;
  border-radius: 20px;
  background: var(--surface);
}

.mfa-enrollment-grid {
  display: grid;
  grid-template-columns: minmax(190px, 240px) minmax(0, 1fr);
  gap: 18px;
}

.mfa-qr-panel,
.mfa-enrollment-fields {
  display: grid;
  align-content: start;
  gap: 12px;
}

.mfa-qr-panel {
  justify-items: center;
  padding: 16px;
  border-radius: 20px;
  background: var(--paper-deep);
}

.mfa-qr {
  display: block;
  width: min(100%, 220px);
  height: auto;
  aspect-ratio: 1;
  border: 10px solid white;
  border-radius: 16px;
  background: white;
}

.mfa-qr-panel p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 9px;
  line-height: 1.6;
  text-align: center;
}

#mfa-manual-secret {
  font-family: "Cascadia Code", Consolas, monospace;
  letter-spacing: .08em;
}

.sharing-map {
  display: grid;
  gap: 9px;
}

.sharing-rule {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  align-items: start;
  gap: 11px;
  padding: 13px;
  border-radius: 16px;
  background: var(--paper-deep);
}

.sharing-rule__icon {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 13px;
  background: var(--surface);
  color: var(--ink);
}

.sharing-rule--identity .sharing-rule__icon { color: var(--sky-dark); }
.sharing-rule--personal .sharing-rule__icon { color: var(--sage); }
.sharing-rule--shared .sharing-rule__icon { color: var(--coral-dark); }
.sharing-rule--exit .sharing-rule__icon { color: var(--muted); }

.sharing-rule strong {
  display: block;
  margin: 1px 0 4px;
  font-size: 11px;
}

.sharing-rule p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 9px;
  line-height: 1.6;
}

.sharing-card__notice {
  margin: 11px 0 0;
  padding: 12px 14px;
  border-radius: 15px;
  background: #edf4eb;
  color: var(--ink-soft);
  font-size: 9px;
  line-height: 1.65;
}

.sharing-card__notice strong {
  color: var(--ink);
}

.data-actions {
  display: grid;
}

.data-actions > button,
.data-actions > a {
  display: grid;
  grid-template-columns: 40px 1fr auto;
  align-items: center;
  gap: 12px;
  min-height: 66px;
  padding: 10px 2px;
  border: 0;
  border-top: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  text-align: left;
  text-decoration: none;
}

.data-actions > button:first-child,
.data-actions > a:first-child {
  border-top: 0;
}

.data-actions > button:disabled {
  opacity: .48;
}

.data-actions > button > span:first-child,
.data-actions > a > span:first-child {
  display: grid;
  width: 39px;
  height: 39px;
  place-items: center;
  border-radius: 13px;
  background: var(--paper-deep);
}

.data-actions > button > span:nth-child(2),
.data-actions > a > span:nth-child(2) {
  display: grid;
  gap: 3px;
}

.data-actions strong {
  font-size: 11px;
}

.data-actions small {
  color: var(--muted);
  font-size: 9px;
}

.data-actions .is-danger {
  color: var(--danger);
}

.legal-consent {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  gap: 9px;
  padding: 11px 12px;
  border-radius: 14px;
  background: var(--paper-deep);
  color: var(--ink-soft);
  font-size: 9px;
  line-height: 1.6;
}

.legal-consent input {
  width: 16px;
  height: 16px;
  margin-top: 1px;
  accent-color: var(--ink);
}

.legal-consent a {
  color: var(--sky-dark);
  font-weight: 900;
}

@media (max-width: 560px) {
  .legal-gate {
    gap: 17px;
    padding: 22px 18px;
    border-radius: 25px;
    background: var(--surface-blue);
  }

  .legal-gate__copy,
  .legal-document-grid,
  .legal-acceptance-form {
    padding-left: 0;
  }

  .legal-gate__copy h1 {
    font-size: clamp(30px, 9.4vw, 40px);
  }

  .legal-document-grid {
    grid-template-columns: 1fr;
  }

  .legal-gate > .text-button {
    margin-left: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .legal-document {
    transition: none;
  }
}

.privacy-note {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 14px;
  padding: 15px;
  border-radius: 18px;
  background: #edf4eb;
  color: var(--ink-soft);
}

.privacy-note .icon {
  color: var(--sage);
}

.privacy-note p {
  margin: 0;
  font-size: 9px;
  line-height: 1.65;
}

.privacy-note strong {
  display: block;
  margin-bottom: 2px;
  color: var(--ink);
}

.empty-state {
  padding: 40px 20px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-lg);
  color: var(--muted);
  font-size: 11px;
  text-align: center;
}

.recycle-list {
  display: grid;
  border-top: 1px solid var(--line);
}

.recycle-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 13px;
  min-height: 86px;
  padding: 14px 2px;
  border-bottom: 1px solid var(--line);
}

.recycle-item__icon {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 14px;
  background: var(--paper-deep);
  color: var(--ink-soft);
}

.recycle-item__body {
  min-width: 0;
}

.recycle-item__body > div {
  display: flex;
  align-items: center;
  gap: 8px;
}

.recycle-item__body small {
  overflow: hidden;
  color: var(--muted);
  font-size: 8px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.recycle-item h3 {
  margin: 7px 0 3px;
  overflow: hidden;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.recycle-item p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 9px;
}

.recycle-empty {
  display: grid;
  min-height: 190px;
  place-items: center;
  align-content: center;
  gap: 9px;
}

.recycle-empty strong {
  color: var(--ink);
  font-family: Georgia, "Songti SC", serif;
  font-size: 18px;
}

.recycle-empty span {
  max-width: 300px;
  line-height: 1.6;
}

.modal-open {
  overflow: hidden;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 10px 10px 0;
  background: rgba(12, 26, 40, 0.55);
  backdrop-filter: blur(8px);
  animation: backdrop-enter 180ms ease both;
}

.modal-sheet {
  width: min(100%, 560px);
  max-height: min(92vh, 840px);
  overflow: auto;
  padding: 10px 18px calc(24px + var(--safe-bottom));
  border-radius: 30px 30px 0 0;
  background: var(--paper);
  box-shadow: 0 -20px 80px rgba(12,26,40,.24);
  animation: sheet-enter 300ms cubic-bezier(.22,1,.36,1) both;
  overscroll-behavior: contain;
}

.modal-sheet--wide {
  width: min(100%, 680px);
}

.modal-handle {
  width: 42px;
  height: 4px;
  margin: 0 auto 13px;
  border-radius: 999px;
  background: rgba(23,50,77,.18);
}

.modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding-bottom: 16px;
}

.modal-header h2 {
  margin-bottom: 6px;
  font-family: Georgia, "Songti SC", serif;
  font-size: 27px;
  font-weight: 600;
  letter-spacing: -.03em;
}

.modal-header p:last-child {
  max-width: 480px;
  margin-bottom: 0;
  color: var(--ink-soft);
  font-size: 10px;
  line-height: 1.6;
}

.modal-form {
  display: grid;
  gap: 14px;
}

.segmented-field {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin: 0;
  padding: 0;
  border: 0;
}

.segmented-field legend {
  grid-column: 1 / -1;
  margin-bottom: 2px;
  color: var(--ink-soft);
  font-size: 10px;
  font-weight: 800;
}

.segmented-field label {
  position: relative;
}

.segmented-field input {
  position: absolute;
  opacity: 0;
}

.segmented-field label span {
  display: grid;
  min-height: 44px;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 13px;
  background: var(--surface);
  font-size: 10px;
  font-weight: 800;
}

.segmented-field input:checked + span {
  border-color: var(--ink);
  background: var(--ink);
  color: white;
}

.segmented-field input:disabled + span {
  cursor: not-allowed;
  opacity: .46;
}

.auth-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.auth-panel {
  align-content: start;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--surface);
}

.auth-panel h3 {
  margin: 7px 0 0;
  font-family: Georgia, "Songti SC", serif;
  font-size: 22px;
}

.text-button {
  min-height: 36px;
  border: 0;
  background: transparent;
  color: var(--sky-dark);
  font-size: 9px;
  font-weight: 800;
}

.form-help {
  margin: 0;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.6;
}

.field-hint {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 8px;
  line-height: 1.5;
}

.event-owner-note {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 10px 12px;
  border-radius: 13px;
  background: var(--paper-deep);
  color: var(--ink-soft);
  font-size: 9px;
  line-height: 1.5;
}

.dst-hint {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  margin: 0;
  color: var(--muted);
  font-size: 8px;
  line-height: 1.5;
}

.conflict-list {
  display: grid;
  gap: 12px;
}

.conflict-item {
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--surface);
}

.conflict-item__heading,
.conflict-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.conflict-item__heading small {
  color: var(--coral-dark);
  font-size: 9px;
  font-weight: 800;
}

.conflict-versions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.conflict-versions section {
  min-width: 0;
  padding: 12px;
  border-radius: 15px;
  background: var(--paper-deep);
}

.conflict-versions small,
.conflict-versions strong,
.conflict-versions p {
  display: block;
  margin: 0;
}

.conflict-versions small {
  color: var(--muted);
  font-size: 8px;
  font-weight: 800;
}

.conflict-versions strong {
  margin-top: 7px;
  overflow: hidden;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.conflict-versions p {
  margin-top: 5px;
  color: var(--ink-soft);
  font-size: 8px;
  line-height: 1.5;
}

.conflict-actions {
  justify-content: flex-end;
}

.conflict-actions .button {
  min-height: 40px;
}

.danger-notice {
  padding: 14px;
  border-radius: 16px;
  background: color-mix(in srgb, var(--danger) 9%, var(--surface));
  color: var(--danger);
}

.danger-notice strong,
.danger-notice p {
  display: block;
  margin: 0;
}

.danger-notice strong {
  font-size: 12px;
}

.danger-notice p {
  margin-top: 6px;
  color: var(--ink-soft);
  font-size: 9px;
  line-height: 1.6;
}

.safety-consequences {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.safety-consequences li {
  display: grid;
  grid-template-columns: minmax(74px, .34fr) 1fr;
  gap: 10px;
  align-items: start;
  padding: 11px 12px;
  border-radius: 14px;
  background: var(--paper-deep);
}

.safety-consequences strong {
  color: var(--ink);
  font-size: 9px;
}

.safety-consequences span {
  color: var(--ink-soft);
  font-size: 9px;
  line-height: 1.55;
}

.safety-stop-form .button--soft {
  color: var(--ink-soft);
}

.confirm-field {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  color: var(--ink-soft);
  font-size: 9px;
  line-height: 1.5;
}

.confirm-field input {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: var(--danger);
}

.button--danger {
  background: var(--danger);
  color: white;
}

.switch-field {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 58px;
  padding: 10px 13px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: var(--surface);
}

.switch-field span {
  display: grid;
  gap: 3px;
}

.switch-field strong {
  font-size: 11px;
}

.switch-field small {
  color: var(--muted);
  font-size: 8px;
}

.switch-field input {
  width: 42px;
  height: 24px;
  accent-color: var(--coral);
}

.file-drop {
  display: grid;
  min-height: 125px;
  place-items: center;
  align-content: center;
  gap: 6px;
  border: 1px dashed var(--sky-dark);
  border-radius: 18px;
  background: var(--surface-blue);
  color: var(--sky-dark);
  text-align: center;
}

.file-drop strong {
  font-size: 11px;
}

.file-drop span {
  color: var(--ink-soft);
  font-size: 8px;
}

.file-drop input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.paste-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--ink-soft);
  font-size: 9px;
  font-weight: 800;
}

.paste-heading button {
  min-height: 34px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  color: var(--ink);
  font-size: 9px;
  font-weight: 800;
}

.format-note {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 5px 10px;
  padding: 12px;
  border-radius: 14px;
  background: var(--paper-deep);
  color: var(--ink-soft);
  font-size: 8px;
}

.format-note strong {
  color: var(--ink);
}

.sync-panel > p {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 8px;
  line-height: 1.6;
}

.backup-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.toast {
  position: fixed;
  top: 82px;
  left: 50%;
  z-index: 200;
  max-width: calc(100vw - 32px);
  padding: 11px 16px;
  border-radius: 999px;
  background: var(--ink);
  box-shadow: 0 14px 30px rgba(23,50,77,.24);
  color: white;
  font-size: 10px;
  font-weight: 800;
  opacity: 0;
  transform: translate(-50%, -10px);
  transition: opacity 200ms ease, transform 200ms ease;
}

.toast--success {
  background: #3f765f;
}

.toast--error {
  background: var(--danger);
}

.toast--visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

@keyframes page-enter {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes backdrop-enter {
  from { opacity: 0; }
  to { opacity: 1; }
}

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

@media (min-width: 720px) {
  .page {
    padding-right: 24px;
    padding-left: 24px;
  }

  .clock-person {
    padding-right: 30px;
    padding-left: 30px;
  }

  .clock-person__meta {
    left: 30px;
  }

  .clock-person--partner .clock-person__meta {
    right: 30px;
  }

  .timeline-event {
    right: 14px;
    left: 14px;
    padding-right: 12px;
    padding-left: 13px;
  }

  .anniversary-list {
    grid-template-columns: 1fr 1fr;
  }

  .sharing-map {
    grid-template-columns: 1fr 1fr;
  }

  .pair-card {
    padding: 24px;
  }

  .modal-backdrop {
    align-items: center;
    padding: 20px;
  }

  .modal-sheet {
    border-radius: 30px;
    padding-bottom: 24px;
  }

  .modal-handle {
    display: none;
  }
}

@media (max-width: 560px) {
  .solo-intro,
  .solo-contact-window--empty,
  .solo-meeting-preview {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .solo-intro .button,
  .solo-contact-window--empty .button,
  .meeting-plan-card--empty .button {
    width: 100%;
  }

  .meeting-plan-card--empty {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .meeting-plan-card__actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .meeting-plan-card__actions .button:only-child {
    grid-column: 1 / -1;
  }

  .solo-contact-window__actions {
    align-items: stretch;
    flex-direction: column;
  }

  .solo-contact-window__actions p {
    display: none;
  }

  .solo-contact-window__actions .button {
    width: 100%;
  }

  .page-intro {
    display: grid;
  }

  .page-intro .button {
    width: fit-content;
  }

  .pair-card {
    grid-template-columns: auto 1fr;
  }

  .pair-card > .button {
    grid-column: 1 / -1;
  }

  .cloud-card,
  .pair-card--cloud {
    grid-template-columns: auto 1fr;
  }

  .cloud-card > .button,
  .pair-card__actions {
    grid-column: 1 / -1;
  }

  .pair-card__actions {
    grid-template-columns: 1fr 1fr;
  }

  .auth-columns {
    grid-template-columns: 1fr;
  }

  .mfa-enrollment-grid {
    grid-template-columns: 1fr;
  }

  .security-card__actions {
    align-items: stretch;
    flex-direction: column;
  }

  .security-card__actions .button {
    width: 100%;
  }

  .app-update {
    grid-template-columns: 38px minmax(0, 1fr);
    margin-right: 11px;
    margin-left: 11px;
  }

  .app-update__icon {
    width: 38px;
    height: 38px;
  }

  .app-update > .button {
    grid-column: 1 / -1;
  }
}

@media (max-width: 390px) {
  .topbar {
    padding-right: 13px;
    padding-left: 13px;
  }

  .page {
    padding-right: 11px;
    padding-left: 11px;
  }

  .clock-person {
    padding-right: 12px;
    padding-left: 12px;
  }

  .clock-person__meta {
    left: 12px;
  }

  .clock-person--partner .clock-person__meta {
    right: 12px;
  }

  .clock-person__meta > span:last-child {
    max-width: 74px;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .clock-person strong {
    font-size: 35px;
  }

  .clock-bridge span {
    display: none;
  }

  .date-strip {
    gap: 2px;
  }

  .date-pill {
    min-height: 64px;
    border-radius: 15px;
  }

  .free-window {
    grid-template-columns: auto 1fr;
  }

  .free-window > button {
    grid-column: 1 / -1;
  }

  .solo-contact-window {
    padding: 18px 15px;
  }

  .solo-contact-window__times {
    gap: 8px;
  }

  .solo-contact-window__times strong {
    font-size: 22px;
  }

  .solo-contact-window__times > i {
    width: 30px;
    height: 30px;
  }

  .meeting-plan-card {
    padding: 17px 15px;
  }

  .meeting-plan-card__body {
    grid-template-columns: 72px minmax(0, 1fr);
    gap: 13px;
  }

  .meeting-plan-date {
    min-height: 88px;
  }

  .timeline-toolbar {
    align-items: flex-start;
  }

  .timeline-toolbar h2 {
    font-size: 20px;
  }

  .timeline-toolbar .button {
    padding: 0 9px;
  }

  .timeline-event {
    right: 5px;
    left: 5px;
  }

  .timeline-event strong {
    font-size: 10px;
  }

  .relationship-card {
    grid-template-columns: 1fr;
  }

  .relationship-card p {
    margin-top: 13px;
    text-align: left;
  }

  .anniversary-card {
    grid-template-columns: 57px 1fr auto;
    gap: 10px;
  }

  .anniversary-card__date {
    min-height: 60px;
  }

  .form-grid--two {
    grid-template-columns: 1fr;
  }

  .field--full {
    grid-column: auto;
  }

  .recycle-item {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .recycle-item > .button {
    grid-column: 2;
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .app-loading span {
    animation: none;
  }
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

@media (min-width: 1024px) {
  .app-shell {
    display: grid;
    grid-template-columns: 220px 1fr;
    grid-template-rows: auto 1fr;
    gap: 0 20px;
    width: min(100%, 1200px);
    min-height: 100vh;
    padding-bottom: 0;
  }

  .topbar {
    grid-column: 2;
    grid-row: 1;
  }

  .bottom-nav {
    position: sticky;
    top: 20px;
    right: auto;
    bottom: auto;
    left: auto;
    grid-column: 1;
    grid-row: 1 / -1;
    align-self: start;
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-height: auto;
    margin: 20px 0 20px 20px;
    padding: 16px 12px;
    border-radius: var(--radius-xl);
    box-shadow: 0 12px 40px rgba(23,50,77,.18);
  }

  .bottom-nav::before {
    content: '';
    display: block;
    width: 36px;
    height: 36px;
    margin: 0 auto 20px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--coral), var(--sky));
    opacity: 0.9;
  }

  .nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 48px;
    padding: 0 16px;
    border-radius: 14px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.02em;
  }

  .nav-item .icon {
    flex-shrink: 0;
  }

  #main-content {
    grid-column: 2;
    grid-row: 2;
  }

  .page {
    padding-right: 32px;
    padding-left: 8px;
  }

  .floating-action {
    position: fixed;
    right: max(32px, calc((100vw - 1200px) / 2 + 32px));
    bottom: 32px;
  }

  .anniversary-list {
    grid-template-columns: repeat(3, 1fr);
  }

  .sharing-map {
    grid-template-columns: repeat(3, 1fr);
  }

  .clock-card {
    gap: 24px;
  }

  .clock-person {
    padding: 24px 32px;
  }

  .modal-backdrop {
    align-items: center;
    padding: 40px;
  }

  .modal-sheet {
    max-width: 560px;
    border-radius: var(--radius-xl);
    padding-bottom: 28px;
  }

  .modal-handle {
    display: none;
  }
}
