:root {
  color-scheme: light;
  --bg: #f8fcff;
  --surface: #ffffff;
  --surface-strong: #ffffff;
  --ink: #17202a;
  --muted: #6d7f8e;
  --line: #d9eaf5;
  --accent: #4aaee8;
  --accent-strong: #1d79b0;
  --teal: #2aa7a1;
  --gold: #b67a1c;
  --green: #537a3a;
  --blue: #3f93d0;
  --sky: #a9ddf8;
  --sky-soft: #edf9ff;
  --blush: #f08fa1;
  --shadow: 0 18px 44px rgba(50, 118, 160, 0.11);
  --float-shadow: 0 24px 70px rgba(82, 154, 198, 0.16);
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  font-family: "Microsoft YaHei", "PingFang SC", "Noto Sans CJK SC", Arial, sans-serif;
  background:
    radial-gradient(circle at 18% 8%, rgba(169, 221, 248, 0.42), transparent 24%),
    radial-gradient(circle at 82% 18%, rgba(255, 255, 255, 0.92), transparent 18%),
    linear-gradient(180deg, #ffffff 0%, var(--bg) 46%, #ffffff 100%);
  color: var(--ink);
  letter-spacing: 0;
}

button,
input,
select {
  font: inherit;
}

button,
select {
  cursor: pointer;
}

a {
  color: inherit;
}

body.auth-locked {
  overflow: hidden;
}

.auth-screen {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 22px;
  background:
    radial-gradient(circle at 28% 18%, rgba(169, 221, 248, 0.35), transparent 20%),
    #ffffff;
  color: var(--ink);
}

body:not(.auth-locked) .auth-screen {
  display: none;
}

.auth-box {
  width: min(100%, 420px);
  display: grid;
  gap: 18px;
  text-align: center;
}

.auth-box h1 {
  font-size: 30px;
  line-height: 1.2;
}

.auth-box p {
  color: var(--ink);
  font-size: 18px;
  line-height: 1.8;
}

.auth-input {
  display: grid;
  gap: 8px;
  text-align: left;
}

.auth-input span {
  color: var(--muted);
  font-size: 13px;
}

.auth-input input {
  width: 100%;
  height: 46px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 13px;
  outline: 0;
  background: #fff;
  color: var(--ink);
}

.auth-input input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(185, 52, 40, 0.1);
}

.auth-button {
  min-height: 44px;
  border: 1px solid var(--accent);
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
}

.auth-box small {
  min-height: 18px;
  color: var(--accent-strong);
}

.cloud {
  position: fixed;
  z-index: -1;
  width: 210px;
  height: 70px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow:
    45px -24px 0 10px rgba(255, 255, 255, 0.82),
    92px -8px 0 18px rgba(255, 255, 255, 0.82),
    0 12px 36px rgba(74, 174, 232, 0.12);
  pointer-events: none;
}

.cloud-one {
  top: 88px;
  right: 12%;
}

.cloud-two {
  top: 260px;
  left: 5%;
  transform: scale(0.72);
  opacity: 0.75;
}

.app-shell {
  min-height: 100vh;
  padding: 24px 28px 32px;
}

.topbar,
.workspace,
.source-note,
.site-nav,
.site-section {
  max-width: 1720px;
  margin: 0 auto;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 12px 4px 14px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.brand-mark {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--sky));
  box-shadow: 0 10px 24px rgba(74, 174, 232, 0.24);
  flex: 0 0 auto;
}

.brand-mark svg {
  width: 25px;
  height: 25px;
}

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

h1 {
  font-size: 28px;
  line-height: 1.18;
  letter-spacing: 0;
}

.brand p,
.source-note,
.collection-head p,
.list-head p {
  color: var(--muted);
}

.brand p {
  margin-top: 5px;
  font-size: 14px;
}

.summary-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(74px, 1fr));
  gap: 8px;
  flex: 0 0 auto;
}

.summary-strip div {
  min-width: 74px;
  padding: 9px 12px;
  border: 0;
  background: rgba(255, 255, 255, 0.58);
  border-radius: 18px;
  text-align: center;
  box-shadow: 0 12px 34px rgba(74, 174, 232, 0.08);
}

.site-nav {
  position: sticky;
  top: 0;
  z-index: 12;
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 8px 4px 22px;
  backdrop-filter: blur(12px);
}

.site-nav button,
.site-nav a {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  flex: 0 0 auto;
  border: 0;
  border-radius: 999px;
  padding: 0 14px;
  background: rgba(255, 255, 255, 0.46);
  color: var(--muted);
  box-shadow: inset 0 0 0 1px rgba(217, 234, 245, 0.7);
  transition: background 160ms ease, color 160ms ease, transform 160ms ease;
  text-decoration: none;
}

.site-nav button:hover,
.site-nav a:hover {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.78);
}

.site-nav button.active {
  box-shadow: 0 12px 30px rgba(74, 174, 232, 0.16);
  background: #ffffff;
  color: var(--accent-strong);
  font-weight: 700;
}

.site-nav svg {
  width: 16px;
  height: 16px;
}

.site-section {
  display: none;
}

.site-section.active {
  display: block;
}

.home-hero {
  position: relative;
  min-height: 390px;
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 22px;
  padding: 52px;
  border: 0;
  border-radius: 28px;
  background:
    radial-gradient(circle at 80% 18%, rgba(169, 221, 248, 0.62), transparent 22%),
    radial-gradient(circle at 68% 50%, rgba(255, 255, 255, 0.95), transparent 24%),
    linear-gradient(145deg, rgba(255,255,255,0.96), rgba(239, 249, 255, 0.88));
  box-shadow: var(--float-shadow);
  overflow: hidden;
}

.home-hero::before,
.home-hero::after {
  content: "";
  position: absolute;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.76);
  pointer-events: none;
}

.home-hero::before {
  width: 300px;
  height: 96px;
  right: 62px;
  top: 64px;
  box-shadow: 75px -28px 0 20px rgba(255,255,255,0.72), 142px 4px 0 10px rgba(255,255,255,0.58);
}

.home-hero::after {
  width: 210px;
  height: 70px;
  left: 46%;
  bottom: 42px;
  opacity: 0.68;
  box-shadow: 52px -18px 0 13px rgba(255,255,255,0.72);
}

.home-hero span {
  display: inline-block;
  margin-bottom: 14px;
  color: var(--accent-strong);
  font-weight: 700;
}

.home-hero h2 {
  max-width: 720px;
  font-size: 50px;
  line-height: 1.14;
  position: relative;
  z-index: 1;
}

.home-hero p {
  max-width: 620px;
  margin-top: 14px;
  color: var(--muted);
  line-height: 1.75;
  position: relative;
  z-index: 1;
}

.hero-actions {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.home-grid,
.calendar-grid,
.wish-list,
.message-wall {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 18px;
  margin-top: 22px;
}

.sky-card,
.soft-panel,
.memory-card,
.wish-card,
.message-card,
.anniversary-card,
.status-card {
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.74);
  box-shadow: 0 18px 50px rgba(82, 154, 198, 0.1);
  backdrop-filter: blur(10px);
}

.sky-card {
  min-height: 150px;
  display: grid;
  align-content: center;
  gap: 8px;
  padding: 24px;
  border: 0;
  position: relative;
  overflow: hidden;
}

.sky-card::after {
  content: "";
  position: absolute;
  width: 96px;
  height: 32px;
  right: 18px;
  top: 20px;
  border-radius: 999px;
  background: rgba(169, 221, 248, 0.22);
  box-shadow: 28px -10px 0 8px rgba(169, 221, 248, 0.16);
}

.sky-card small,
.section-head p,
.status-card small,
.memory-card small,
.wish-card small,
.message-card small,
.anniversary-card small {
  color: var(--muted);
}

.sky-card strong {
  font-size: 24px;
  position: relative;
  z-index: 1;
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 16px;
  padding: 28px 4px 18px;
}

.section-head h2 {
  font-size: 30px;
}

.two-column {
  display: grid;
  grid-template-columns: minmax(280px, 380px) minmax(0, 1fr);
  gap: 22px;
}

.soft-panel {
  padding: 22px;
  border-radius: 26px;
  border: 0;
  background: rgba(255, 255, 255, 0.68);
}

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

.form-grid label,
.inline-form label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
}

.form-grid input,
.form-grid select,
.form-grid textarea,
.inline-form input,
.inline-form select {
  width: 100%;
  border: 0;
  border-radius: 16px;
  padding: 12px 13px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--ink);
  outline: 0;
  box-shadow: inset 0 0 0 1px rgba(217, 234, 245, 0.9);
}

.form-grid textarea {
  resize: vertical;
}

.inline-form {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr)) auto;
  gap: 12px;
  align-items: center;
  padding: 16px;
  border: 0;
  border-radius: 24px;
  background:
    radial-gradient(circle at 94% 12%, rgba(169, 221, 248, 0.28), transparent 20%),
    rgba(255,255,255,0.74);
  box-shadow: 0 18px 50px rgba(82, 154, 198, 0.1);
}

.status-board,
.photo-tree,
.timeline-list {
  display: grid;
  gap: 16px;
}

.status-card,
.memory-card,
.wish-card,
.message-card,
.anniversary-card {
  padding: 18px;
  border: 0;
}

.status-card strong,
.memory-card strong,
.wish-card strong,
.message-card strong,
.anniversary-card strong {
  display: block;
  font-size: 18px;
  line-height: 1.25;
}

.status-card p,
.memory-card p,
.message-card p,
.anniversary-card p {
  margin-top: 8px;
  color: var(--ink);
  line-height: 1.55;
}

.photo-tree {
  position: relative;
  display: block;
  min-height: 640px;
  padding: 44px clamp(16px, 3vw, 34px) 58px;
  overflow: hidden;
  border-radius: 34px;
  background:
    radial-gradient(ellipse at 50% 14%, rgba(169, 221, 248, 0.24), transparent 34%),
    radial-gradient(ellipse at 18% 78%, rgba(211, 239, 198, 0.26), transparent 28%),
    linear-gradient(180deg, rgba(255,255,255,0.42), rgba(237,249,255,0.42));
}

.photo-tree::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 54px;
  bottom: 42px;
  width: 18px;
  border-radius: 999px 999px 12px 12px;
  background: linear-gradient(90deg, #b9dcae, #d6edc9 42%, #9bc98f);
  box-shadow: inset -4px 0 0 rgba(83, 122, 58, 0.1), 0 18px 36px rgba(83, 122, 58, 0.12);
  transform: translateX(-50%);
  z-index: 0;
}

.photo-tree::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 18px;
  width: min(72%, 650px);
  height: 360px;
  border-radius: 48% 52% 46% 54%;
  background:
    radial-gradient(circle at 28% 36%, rgba(211, 239, 198, 0.82), transparent 24%),
    radial-gradient(circle at 65% 30%, rgba(191, 230, 211, 0.78), transparent 26%),
    radial-gradient(circle at 48% 60%, rgba(224, 245, 211, 0.86), transparent 28%);
  opacity: 0.72;
  filter: blur(0.2px);
  transform: translateX(-50%);
  pointer-events: none;
  z-index: 0;
}

.memory-tree-stage {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 30px;
}

.memory-time-branch {
  position: relative;
  display: grid;
  grid-template-columns: minmax(92px, 132px) minmax(0, 1fr);
  gap: 18px;
  align-items: center;
  min-height: 390px;
}

.memory-time-branch.right {
  grid-template-columns: minmax(0, 1fr) minmax(92px, 132px);
}

.memory-time-branch::before {
  content: "";
  position: absolute;
  top: 50%;
  height: 5px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(139, 189, 119, 0.1), rgba(139, 189, 119, 0.76));
  z-index: 0;
}

.memory-time-branch.left::before {
  left: 50%;
  right: 16px;
}

.memory-time-branch.right::before {
  left: 16px;
  right: 50%;
  background: linear-gradient(90deg, rgba(139, 189, 119, 0.76), rgba(139, 189, 119, 0.1));
}

.memory-branch-date {
  position: relative;
  z-index: 2;
  justify-self: end;
  display: grid;
  gap: 4px;
  min-width: 88px;
  padding: 10px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  color: var(--accent-strong);
  text-align: right;
  box-shadow: 0 14px 36px rgba(82, 154, 198, 0.12);
}

.memory-time-branch.right .memory-branch-date {
  grid-column: 2;
  justify-self: start;
  text-align: left;
}

.memory-branch-date strong {
  font-size: 15px;
  line-height: 1.15;
}

.memory-branch-date span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.memory-branch-track {
  position: relative;
  z-index: 1;
  display: flex;
  gap: 24px;
  min-width: 0;
  padding: 28px 12px 34px;
  overflow-x: auto;
  overflow-y: visible;
  cursor: grab;
  scroll-snap-type: x proximity;
  scrollbar-color: rgba(74, 174, 232, 0.45) transparent;
  scrollbar-width: thin;
  touch-action: pan-y;
  user-select: none;
}

.memory-time-branch.right .memory-branch-track {
  grid-column: 1;
  grid-row: 1;
}

.memory-branch-track.dragging {
  cursor: grabbing;
}

.memory-branch-track.dragging .memory-card {
  pointer-events: none;
}

.memory-branch-track::-webkit-scrollbar {
  height: 8px;
}

.memory-branch-track::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(74, 174, 232, 0.34);
}

.memory-branch-track::-webkit-scrollbar-track {
  background: transparent;
}

.memory-card {
  position: relative;
  z-index: 2;
  flex: 0 0 clamp(246px, 24vw, 318px);
  width: clamp(246px, 24vw, 318px);
  min-height: 0;
  overflow: hidden;
  padding: 14px 14px 18px;
  border-radius: 30px;
  background:
    radial-gradient(circle at 74% 16%, rgba(255,255,255,0.9), transparent 22%),
    radial-gradient(circle at 14% 82%, rgba(211, 239, 198, 0.42), transparent 28%),
    rgba(255,255,255,0.88);
  transform: rotate(var(--tilt));
  box-shadow: 0 22px 50px rgba(82, 154, 198, 0.15);
  scroll-snap-align: start;
}

.memory-card::before {
  content: "";
  position: absolute;
  inset: 10px;
  border-radius: inherit;
  border: 1px solid rgba(139, 189, 119, 0.18);
  pointer-events: none;
}

.memory-card img,
.message-card img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 18px;
  margin-bottom: 10px;
}

.memory-card img {
  border-radius: 22px;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  background:
    linear-gradient(135deg, rgba(237, 249, 255, 0.92), rgba(255, 255, 255, 0.96));
  pointer-events: none;
}

.memory-card small,
.memory-card strong {
  position: relative;
  z-index: 1;
}

.memory-tree-empty {
  position: relative;
  z-index: 1;
  min-height: 460px;
  display: grid;
  place-items: center;
  align-content: end;
  gap: 18px;
  color: var(--muted);
  text-align: center;
}

.sapling {
  position: relative;
  width: 18px;
  height: 170px;
  border-radius: 999px;
  background: linear-gradient(90deg, #b9dcae, #91c681);
}

.sapling::before,
.sapling::after {
  content: "";
  position: absolute;
  width: 90px;
  height: 58px;
  border-radius: 58% 42% 60% 40%;
  background: rgba(211, 239, 198, 0.86);
}

.sapling::before {
  right: 8px;
  top: 26px;
  transform: rotate(-28deg);
}

.sapling::after {
  left: 8px;
  top: 70px;
  transform: rotate(26deg);
}

.timeline-list {
  position: relative;
  margin-top: 22px;
  padding: 18px 0;
}

.timeline-list::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 4px;
  border-radius: 999px;
  background: linear-gradient(180deg, transparent, #b8e3fa, #dff4ff, transparent);
  transform: translateX(-50%);
}

.timeline-item {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 40px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
  padding: 10px 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.timeline-item.left .timeline-date {
  grid-column: 1;
  justify-self: end;
  text-align: right;
}

.timeline-item.left .timeline-dot {
  grid-column: 2;
}

.timeline-item.left .timeline-bubble {
  grid-column: 3;
}

.timeline-item.right .timeline-date {
  grid-column: 3;
  justify-self: start;
}

.timeline-item.right .timeline-dot {
  grid-column: 2;
}

.timeline-item.right .timeline-bubble {
  grid-column: 1;
  grid-row: 1;
}

.timeline-dot {
  width: 18px;
  height: 18px;
  margin: 5px auto 0;
  border: 4px solid #fff;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 0 5px rgba(169, 221, 248, 0.38), 0 10px 24px rgba(74, 174, 232, 0.26);
}

.timeline-date {
  padding-top: 3px;
  color: var(--accent-strong);
  font-weight: 800;
}

.timeline-bubble {
  position: relative;
  max-width: 460px;
  padding: 18px 20px;
  border-radius: 24px 24px 24px 8px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 18px 52px rgba(82, 154, 198, 0.12);
}

.timeline-item.right .timeline-bubble {
  justify-self: end;
  border-radius: 24px 24px 8px 24px;
}

.wish-card {
  display: grid;
  gap: 10px;
  position: relative;
  min-height: 170px;
  align-content: space-between;
  transform: rotate(var(--tilt));
  overflow: hidden;
  background:
    radial-gradient(circle at 86% 16%, rgba(255, 215, 128, 0.22), transparent 22%),
    rgba(255, 255, 255, 0.78);
}

.wish-card.done {
  background:
    radial-gradient(circle at 88% 14%, rgba(255, 215, 128, 0.38), transparent 23%),
    linear-gradient(145deg, #f1fbf7, #ffffff);
}

.wish-card::before {
  content: "";
  position: absolute;
  right: -34px;
  top: -28px;
  width: 118px;
  height: 118px;
  border-radius: 999px;
  background: rgba(169, 221, 248, 0.18);
}

.wish-star {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: #fff7dd;
  color: #c28b16;
  box-shadow: 0 10px 24px rgba(194, 139, 22, 0.14);
}

.wish-star svg {
  width: 19px;
  height: 19px;
}

.wish-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.wish-card button,
.mini-button {
  min-height: 32px;
  border: 0;
  border-radius: 999px;
  background: rgba(237, 249, 255, 0.9);
  color: var(--accent-strong);
  padding: 0 12px;
}

.empty-state {
  padding: 28px;
  border: 1px dashed rgba(74, 174, 232, 0.32);
  border-radius: 28px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.52);
  text-align: center;
}

.message-wall {
  align-items: start;
  grid-template-columns: repeat(6, 1fr);
}

.message-card {
  position: relative;
  grid-column: span 3;
  min-height: 150px;
  padding: 22px 24px;
  border-radius: 34px 34px 30px 12px;
  background:
    radial-gradient(circle at 88% 12%, rgba(169, 221, 248, 0.18), transparent 24%),
    rgba(255, 255, 255, 0.86);
}

.message-card.float-right {
  margin-top: 28px;
  border-radius: 34px 34px 12px 30px;
}

.message-card.float-left {
  transform: translateY(4px);
}

.message-card::before,
.message-card::after {
  content: "";
  position: absolute;
  border-radius: 999px;
  background: inherit;
  z-index: -1;
}

.message-card::before {
  width: 78px;
  height: 42px;
  right: 26px;
  top: -18px;
}

.message-card::after {
  width: 52px;
  height: 30px;
  left: 30px;
  bottom: -10px;
}

.message-card small {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 10px;
  border-radius: 999px;
  background: #edf9ff;
}

.message-card small span {
  color: var(--accent-strong);
  font-weight: 800;
}

.summary-strip span {
  display: block;
  font-size: 20px;
  font-weight: 800;
  line-height: 1;
}

.summary-strip small {
  color: var(--muted);
  font-size: 12px;
}

.workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 18px;
  align-items: start;
}

.map-panel,
.collection-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.map-panel {
  min-width: 0;
  overflow: hidden;
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 14px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.68);
}

.search-box {
  flex: 1 1 280px;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.search-box svg {
  width: 18px;
  height: 18px;
  color: var(--muted);
  flex: 0 0 auto;
}

.search-box input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
}

.segmented {
  flex: 0 1 auto;
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 3px;
  background: #f3efe7;
}

.segmented button {
  min-width: 54px;
  height: 32px;
  border: 0;
  border-radius: 6px;
  padding: 0 10px;
  background: transparent;
  color: var(--muted);
}

.segmented button.active {
  background: #fff;
  color: var(--accent-strong);
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(30, 24, 16, 0.08);
}

select {
  flex: 0 0 168px;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 10px;
  background: #fff;
  color: var(--ink);
}

.map-wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  min-height: 612px;
}

#chinaMap {
  width: 100%;
  min-height: 612px;
  background: linear-gradient(180deg, #fffdfa, #f8f5ee);
}

.inspector {
  border-left: 1px solid var(--line);
  background: #fffaf0;
  min-width: 0;
  padding: 18px;
  overflow: auto;
  max-height: 612px;
}

.inspector-empty {
  color: var(--muted);
  line-height: 1.7;
}

.detail-title {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.detail-title h2 {
  font-size: 22px;
  line-height: 1.25;
}

.detail-title small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  line-height: 1.3;
}

.badge-row,
.metric-row,
.link-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border-radius: 6px;
  padding: 3px 8px;
  font-size: 12px;
  font-weight: 700;
  background: #eee7dc;
  color: #4b443b;
}

.badge.tier-985 {
  background: #fde7df;
  color: #9f2b20;
}

.badge.tier-211 {
  background: #e1f0ed;
  color: #17675f;
}

.badge.tier-double {
  background: #edf2df;
  color: #4f702f;
}

.badge.tier-institute {
  background: #e9f2f8;
  color: var(--blue);
}

.institute-card {
  border-color: rgba(56, 111, 164, 0.28);
}

.metric-block {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.metric-block h3 {
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 10px;
  font-weight: 700;
}

.metric {
  flex: 1 1 92px;
  min-width: 92px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.metric strong {
  display: block;
  font-size: 22px;
  line-height: 1.1;
}

.metric span {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
}

.detail-note {
  margin-top: 14px;
  color: var(--ink);
  line-height: 1.55;
  font-size: 14px;
}

.direction-line {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 12px;
}

.direction-line span {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 5px 8px;
  background: #fff;
  color: var(--muted);
  font-size: 12px;
}

.link-row {
  margin-top: 16px;
}

.link-button,
.action-button,
.ghost-button,
.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  text-decoration: none;
}

.link-button,
.action-button,
.ghost-button {
  min-height: 36px;
  padding: 0 11px;
}

.action-button {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  font-weight: 700;
}

.action-button.secondary {
  background: var(--teal);
  border-color: var(--teal);
}

.ghost-button {
  color: var(--muted);
}

.icon-button {
  width: 34px;
  height: 34px;
  padding: 0;
}

.link-button svg,
.action-button svg,
.ghost-button svg,
.icon-button svg {
  width: 16px;
  height: 16px;
}

.list-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 18px 18px 8px;
}

.list-head h2,
.collection-head h2 {
  font-size: 20px;
}

.school-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 12px;
  padding: 10px 18px 18px;
}

.school-card,
.collection-item {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-strong);
}

.school-card {
  display: grid;
  gap: 12px;
  padding: 12px;
  cursor: grab;
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.school-card:hover,
.school-card.active {
  transform: translateY(-2px);
  border-color: rgba(185, 52, 40, 0.45);
  box-shadow: 0 10px 24px rgba(42, 33, 22, 0.1);
}

.school-card.dragging {
  opacity: 0.56;
}

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

.school-card h3 {
  font-size: 17px;
  line-height: 1.25;
}

.school-card small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
}

.card-actions {
  display: inline-flex;
  gap: 6px;
  flex: 0 0 auto;
}

.rank-pills {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 7px;
}

.rank-pill {
  min-width: 0;
  border-radius: 8px;
  padding: 8px 6px;
  background: #f5f1e8;
  text-align: center;
}

.rank-pill strong {
  display: block;
  font-size: 16px;
  line-height: 1.1;
}

.rank-pill span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
  white-space: nowrap;
}

.collection-panel {
  position: sticky;
  top: 18px;
  max-height: calc(100vh - 36px);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.collection-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 16px;
  border-bottom: 1px solid var(--line);
}

.couple-lists {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  padding: 12px;
  overflow: auto;
  flex: 1 1 auto;
  background: #fffaf0;
}

.person-list {
  min-width: 0;
  display: grid;
  grid-template-rows: auto minmax(178px, 1fr);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffdf8;
  overflow: hidden;
}

.person-title {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.person-title > svg {
  width: 20px;
  height: 20px;
  color: var(--accent);
  flex: 0 0 auto;
}

.person-title h3 {
  font-size: 16px;
  line-height: 1.2;
}

.person-title p {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
}

.collection-drop {
  min-height: 178px;
  padding: 10px;
  overflow: auto;
  flex: 1 1 auto;
  background: #fffdf8;
}

.collection-drop.drag-over {
  outline: 2px solid var(--teal);
  outline-offset: -8px;
  background: #f0faf6;
}

.drop-empty {
  min-height: 136px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 10px;
  border: 1px dashed #c8c0b3;
  border-radius: 8px;
  color: var(--muted);
}

.drop-empty svg {
  width: 30px;
  height: 30px;
}

.collection-list {
  display: grid;
  gap: 10px;
}

.collection-item {
  padding: 10px;
  display: grid;
  gap: 8px;
}

.collection-item-top {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 8px;
}

.collection-item h3 {
  font-size: 15px;
  line-height: 1.25;
}

.collection-item small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
}

.rank-pills.compact {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.rank-pills.compact .rank-pill {
  padding: 7px 5px;
}

.rank-pills.compact .rank-pill strong {
  font-size: 14px;
}

.couple-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 14px 0;
}

.collection-metrics {
  padding: 14px 16px 16px;
  border-top: 1px solid var(--line);
  background: #ffffff;
  display: grid;
  gap: 8px;
}

.collection-metrics div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
}

.collection-metrics strong {
  color: var(--ink);
  text-align: right;
}

.collection-metrics .future-note {
  display: block;
  padding: 10px;
  border: 1px solid rgba(33, 120, 111, 0.22);
  border-radius: 8px;
  background: #f0faf6;
  color: var(--teal);
}

.collection-metrics .future-note span {
  display: block;
  line-height: 1.45;
}

.source-note {
  padding: 14px 4px 0;
  font-size: 13px;
}

.source-note a {
  color: var(--accent-strong);
  text-decoration: none;
}

.source-note a:hover,
.link-button:hover {
  text-decoration: underline;
}

.planner-only {
  display: none;
}

body.section-planner .planner-only {
  display: block;
}

body.section-planner .summary-strip.planner-only {
  display: grid;
}

/* Soft visual pass: keep the tools, lose the dashboard-box feeling. */
.workspace {
  gap: 22px;
}

.map-panel,
.collection-panel {
  border: 0;
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.76);
  box-shadow: var(--float-shadow);
  backdrop-filter: blur(10px);
}

.toolbar {
  padding: 16px;
  border-bottom: 1px solid rgba(217, 234, 245, 0.72);
  background: rgba(255, 255, 255, 0.36);
}

.search-box,
select {
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: inset 0 0 0 1px rgba(217, 234, 245, 0.86);
}

.segmented {
  border: 0;
  border-radius: 999px;
  background: rgba(237, 249, 255, 0.84);
}

.segmented button {
  border-radius: 999px;
}

.segmented button.active {
  box-shadow: 0 8px 20px rgba(74, 174, 232, 0.14);
}

#chinaMap {
  background: linear-gradient(180deg, #ffffff, #f2fbff);
}

.inspector {
  border-left: 1px solid rgba(217, 234, 245, 0.76);
  background: rgba(255, 255, 255, 0.44);
}

.link-button,
.action-button,
.ghost-button,
.icon-button {
  border: 0;
  border-radius: 999px;
}

.action-button {
  background: linear-gradient(135deg, var(--accent), #76c9f2);
  box-shadow: 0 12px 26px rgba(74, 174, 232, 0.22);
}

.action-button.secondary {
  background: linear-gradient(135deg, var(--teal), #8edbd7);
}

.school-card,
.collection-item {
  border: 0;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.84);
  box-shadow: 0 12px 32px rgba(82, 154, 198, 0.08);
}

.school-card:hover,
.school-card.active {
  box-shadow: 0 18px 40px rgba(74, 174, 232, 0.14);
}

.rank-pill {
  border-radius: 16px;
  background: #f1faff;
}

.collection-head {
  border-bottom: 1px solid rgba(217, 234, 245, 0.78);
}

.couple-lists {
  background: rgba(242, 250, 255, 0.5);
}

.person-list {
  border: 0;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.7);
}

.person-title {
  border-bottom: 1px solid rgba(217, 234, 245, 0.74);
  background: rgba(255, 255, 255, 0.58);
}

.collection-drop {
  background: transparent;
}

.drop-empty {
  border: 1px dashed rgba(74, 174, 232, 0.32);
  border-radius: 22px;
}

.collection-metrics {
  border-top: 1px solid rgba(217, 234, 245, 0.78);
  background: rgba(255, 255, 255, 0.58);
}

.hidden {
  display: none !important;
}

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

  .collection-panel {
    position: static;
    max-height: none;
  }
}

@media (max-width: 980px) {
  .home-hero,
  .section-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .home-hero h2 {
    font-size: 34px;
  }

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

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

  .timeline-list::before {
    left: 13px;
  }

  .timeline-item,
  .timeline-item.left,
  .timeline-item.right {
    grid-template-columns: 28px minmax(0, 1fr);
    gap: 12px;
  }

  .timeline-item.left .timeline-date,
  .timeline-item.right .timeline-date {
    grid-column: 2;
    grid-row: 1;
    justify-self: start;
    text-align: left;
  }

  .timeline-item.left .timeline-dot,
  .timeline-item.right .timeline-dot {
    grid-column: 1;
    grid-row: 1 / span 2;
  }

  .timeline-item.left .timeline-bubble,
  .timeline-item.right .timeline-bubble {
    grid-column: 2;
    grid-row: 2;
    justify-self: stretch;
    max-width: none;
    border-radius: 22px;
  }

  .message-wall {
    grid-template-columns: 1fr;
  }

  .message-card {
    grid-column: auto;
  }

  .photo-tree {
    min-height: auto;
    padding: 24px 12px 32px;
  }

  .photo-tree::before {
    left: 28px;
    top: 32px;
    bottom: 26px;
    width: 12px;
    display: block;
  }

  .photo-tree::after {
    display: none;
  }

  .memory-tree-stage {
    gap: 22px;
  }

  .memory-time-branch,
  .memory-time-branch.right {
    grid-template-columns: 74px minmax(0, 1fr);
    min-height: 356px;
    gap: 12px;
  }

  .memory-time-branch.left::before,
  .memory-time-branch.right::before {
    left: 28px;
    right: 10px;
    background: linear-gradient(90deg, rgba(139, 189, 119, 0.78), rgba(139, 189, 119, 0.08));
  }

  .memory-time-branch.right .memory-branch-date {
    grid-column: 1;
    justify-self: end;
    text-align: right;
  }

  .memory-time-branch.right .memory-branch-track {
    grid-column: 2;
  }

  .memory-branch-date {
    min-width: 68px;
    padding: 9px 10px;
  }

  .memory-branch-date strong {
    font-size: 13px;
  }

  .memory-branch-track {
    gap: 18px;
    padding: 24px 6px 30px;
  }

  .memory-card {
    flex-basis: min(74vw, 292px);
    width: min(74vw, 292px);
  }

  .toolbar {
    display: grid;
    grid-template-columns: 1fr;
  }

  select {
    width: 100%;
  }

  .segmented {
    overflow-x: auto;
    justify-content: start;
  }

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

  .inspector {
    border-left: 0;
    border-top: 1px solid var(--line);
    max-height: none;
  }
}

@media (max-width: 680px) {
  .app-shell {
    padding: 12px;
  }

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

  h1 {
    font-size: 23px;
  }

  .home-hero {
    min-height: 250px;
    padding: 22px;
  }

  .home-hero h2 {
    font-size: 28px;
  }

  .site-nav {
    padding-bottom: 10px;
  }

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

  .list-head {
    align-items: flex-start;
    flex-direction: column;
  }

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

  #chinaMap {
    min-height: 430px;
  }

  .rank-pills {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Skyline refinement: lighter surfaces, clearer hierarchy, more room for our content. */
textarea {
  font: inherit;
}

body {
  background: linear-gradient(180deg, #ffffff 0%, #f4fbff 38%, #ffffff 100%);
}

.app-shell {
  padding-top: 18px;
}

.topbar {
  padding-top: 8px;
}

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 8px;
  background: #54b7e9;
  box-shadow: 0 10px 28px rgba(51, 160, 216, 0.18);
}

.brand h1 {
  font-size: 24px;
}

.topbar-today {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--accent-strong);
  font-size: 13px;
  font-weight: 700;
}

.topbar-today svg {
  width: 17px;
  height: 17px;
  color: #e2a72c;
}

body.section-planner .topbar-today {
  display: none;
}

.site-nav {
  padding-top: 6px;
  padding-bottom: 16px;
  background: rgba(248, 252, 255, 0.76);
  scrollbar-width: none;
}

.site-nav::-webkit-scrollbar {
  display: none;
}

.site-nav button,
.site-nav a {
  border-radius: 8px;
  background: transparent;
  box-shadow: none;
}

.site-nav button:hover,
.site-nav a:hover {
  background: rgba(255, 255, 255, 0.78);
}

.site-nav button.active {
  background: #ffffff;
  box-shadow: 0 8px 24px rgba(50, 118, 160, 0.1);
}

.home-hero {
  min-height: 500px;
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(300px, 0.65fr);
  align-items: center;
  gap: clamp(36px, 7vw, 110px);
  padding: clamp(54px, 7vw, 96px) clamp(22px, 5vw, 78px);
  border-top: 1px solid rgba(185, 224, 245, 0.72);
  border-bottom: 1px solid rgba(185, 224, 245, 0.72);
  border-radius: 0;
  background: linear-gradient(118deg, rgba(255, 255, 255, 0.96), rgba(229, 246, 255, 0.78));
  box-shadow: none;
}

.home-hero::before {
  width: 260px;
  height: 72px;
  right: 5%;
  top: 58px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 64px -20px 0 13px rgba(255, 255, 255, 0.68), 122px 4px 0 8px rgba(255, 255, 255, 0.5);
}

.home-hero::after {
  width: 150px;
  height: 42px;
  left: 47%;
  bottom: 48px;
  background: rgba(255, 255, 255, 0.62);
  box-shadow: 38px -12px 0 9px rgba(255, 255, 255, 0.62);
}

.hero-copy {
  position: relative;
  z-index: 2;
}

.hero-kicker {
  display: inline-flex !important;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px !important;
  color: var(--accent-strong);
  font-size: 14px;
}

.hero-kicker svg {
  width: 18px;
  height: 18px;
}

.hero-kicker > span,
.keep-together {
  margin: 0 !important;
  color: inherit !important;
}

.keep-together {
  display: inline !important;
  font-weight: inherit !important;
  white-space: nowrap;
}

.home-hero h2 {
  max-width: 820px;
  font-size: clamp(38px, 4.6vw, 66px);
  line-height: 1.14;
}

.home-hero p {
  max-width: 650px;
  margin-top: 20px;
  font-size: 17px;
}

.hero-actions {
  justify-content: flex-start;
  margin-top: 30px;
}

.home-status-preview {
  position: relative;
  z-index: 2;
  display: grid;
  align-self: end;
  margin-bottom: 12px;
  border-top: 1px solid rgba(74, 174, 232, 0.42);
}

.home-status-heading {
  padding: 12px 0 8px;
  color: var(--muted);
  font-size: 12px;
}

.home-status-line {
  display: grid;
  grid-template-columns: 50px minmax(0, 1fr);
  gap: 14px;
  padding: 16px 0;
  border-bottom: 1px solid rgba(185, 224, 245, 0.84);
}

.home-status-line strong {
  color: var(--accent-strong);
}

.home-status-line p {
  margin: 0;
  color: var(--ink);
  font-size: 14px;
  line-height: 1.5;
}

.home-status-line small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
}

.home-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  margin-top: 0;
  border-bottom: 1px solid rgba(185, 224, 245, 0.74);
}

.sky-card {
  min-height: 154px;
  display: grid;
  align-content: center;
  gap: 8px;
  padding: 26px clamp(18px, 3vw, 34px);
  border: 0;
  border-right: 1px solid rgba(185, 224, 245, 0.74);
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  box-shadow: none;
  text-align: left;
  transition: background 160ms ease, color 160ms ease;
}

.sky-card:last-child {
  border-right: 0;
}

.sky-card::after {
  display: none;
}

.sky-card:hover {
  background: rgba(255, 255, 255, 0.68);
}

.sky-card strong {
  font-size: 21px;
}

.sky-card span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.section-head {
  min-height: 132px;
  align-items: center;
  padding: 36px 4px 24px;
  border-bottom: 1px solid rgba(185, 224, 245, 0.7);
}

.section-head h2 {
  font-size: 32px;
}

.section-head p {
  margin-top: 7px;
}

.compose-button {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 0;
  border-radius: 8px;
  padding: 0 14px;
  background: #ffffff;
  color: var(--accent-strong);
  font-weight: 700;
  box-shadow: 0 8px 24px rgba(50, 118, 160, 0.1);
}

.compose-button svg {
  width: 17px;
  height: 17px;
}

.compose-button[aria-expanded="true"] {
  background: var(--accent);
  color: #ffffff;
}

.section-composer {
  margin: 18px 0 6px;
  padding: 18px 0 22px;
  border: 0;
  border-bottom: 1px solid rgba(185, 224, 245, 0.74);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

.section-composer[hidden] {
  display: none;
}

.section-composer input,
.section-composer select,
.section-composer textarea {
  border-radius: 8px;
}

.message-composer {
  grid-template-columns: 180px minmax(0, 1fr);
  align-items: end;
}

.message-composer label:nth-child(2) {
  grid-row: span 2;
}

.message-composer .action-button {
  align-self: end;
}

.timeline-list {
  margin-top: 8px;
  padding: 12px 0 30px;
}

.timeline-list::before {
  left: 138px;
  top: 32px;
  bottom: 32px;
  width: 2px;
  background: #c9e9f9;
}

.timeline-item,
.timeline-item.left,
.timeline-item.right {
  grid-template-columns: 112px 28px minmax(0, 1fr);
  gap: 14px;
  min-height: 128px;
  padding: 22px 0;
}

.timeline-item.left .timeline-date,
.timeline-item.right .timeline-date {
  grid-column: 1;
  grid-row: 1;
  justify-self: end;
  text-align: right;
}

.timeline-item.left .timeline-dot,
.timeline-item.right .timeline-dot {
  grid-column: 2;
  grid-row: 1;
}

.timeline-item.left .timeline-bubble,
.timeline-item.right .timeline-bubble {
  grid-column: 3;
  grid-row: 1;
  justify-self: stretch;
  max-width: 780px;
  padding: 0 0 22px;
  border-bottom: 1px solid rgba(185, 224, 245, 0.74);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.timeline-bubble strong {
  font-size: 20px;
}

.timeline-bubble p {
  margin: 8px 0 12px;
  color: var(--muted);
  line-height: 1.7;
}

.timeline-dot {
  width: 14px;
  height: 14px;
  margin-top: 4px;
  border-width: 3px;
  box-shadow: 0 0 0 4px rgba(169, 221, 248, 0.26);
}

.wish-list {
  counter-reset: wish-index;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 36px;
  margin-top: 12px;
}

.wish-card {
  counter-increment: wish-index;
  min-height: 152px;
  grid-template-columns: 48px minmax(0, 1fr);
  grid-template-rows: auto auto 1fr;
  align-content: center;
  gap: 5px 16px;
  padding: 26px 0;
  border-bottom: 1px solid rgba(185, 224, 245, 0.76);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  transform: none;
  overflow: visible;
}

.wish-card::before {
  content: counter(wish-index, decimal-leading-zero);
  position: static;
  grid-column: 1;
  grid-row: 1 / span 3;
  width: auto;
  height: auto;
  border-radius: 0;
  background: transparent;
  color: rgba(29, 121, 176, 0.35);
  font-size: 22px;
  font-weight: 800;
}

.wish-star {
  display: none;
}

.wish-card small,
.wish-card strong,
.wish-actions {
  grid-column: 2;
}

.wish-card strong {
  font-size: 19px;
}

.wish-actions {
  margin-top: 8px;
}

.wish-card.done strong {
  color: #478060;
}

.wish-card.done {
  background: transparent;
}

.message-wall {
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 18px;
  margin-top: 22px;
}

.message-card {
  grid-column: span 4;
  min-height: 180px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 22px;
  border: 1px solid rgba(185, 224, 245, 0.8);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 14px 38px rgba(66, 137, 178, 0.08);
  transform: none;
}

.message-card.has-image {
  grid-column: span 6;
}

.message-card.float-right,
.message-card.float-left {
  margin-top: 0;
  border-radius: 8px;
  transform: none;
}

.message-card::before,
.message-card::after {
  display: none;
}

.message-card img {
  aspect-ratio: 16 / 10;
  border-radius: 6px;
}

.message-card p {
  margin: 18px 0 20px;
  font-size: 17px;
  line-height: 1.75;
}

.message-card .item-actions {
  margin-top: auto;
}

.calendar-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  margin-top: 12px;
}

.anniversary-card {
  min-height: 210px;
  display: grid;
  align-content: center;
  gap: 9px;
  padding: 28px;
  border: 0;
  border-right: 1px solid rgba(185, 224, 245, 0.76);
  border-bottom: 1px solid rgba(185, 224, 245, 0.76);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.anniversary-card:nth-child(3n) {
  border-right: 0;
}

.countdown-number {
  display: flex;
  align-items: baseline;
  gap: 7px;
  color: var(--accent-strong);
}

.countdown-number b {
  font-size: 46px;
  line-height: 1;
}

.countdown-number span {
  color: var(--muted);
  font-size: 13px;
}

.item-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 12px;
}

.item-edit,
.item-delete {
  width: 32px;
  height: 32px;
  display: inline-grid;
  place-items: center;
  border: 0;
  border-radius: 8px;
  padding: 0;
  background: transparent;
  color: #8aa0ad;
}

.item-edit:hover {
  background: #eef8fd;
  color: var(--accent-strong);
}

.item-delete:hover {
  background: #eef8fd;
  color: #c45464;
}

.item-edit svg,
.item-delete svg {
  width: 16px;
  height: 16px;
}

.edit-dialog {
  width: min(560px, calc(100vw - 32px));
  max-height: min(760px, calc(100vh - 32px));
  padding: 0;
  border: 0;
  border-radius: 8px;
  color: var(--ink);
  background: #ffffff;
  box-shadow: 0 28px 90px rgba(38, 104, 143, 0.24);
}

.edit-dialog::backdrop {
  background: rgba(43, 76, 96, 0.26);
  backdrop-filter: blur(5px);
}

.edit-dialog-panel {
  display: grid;
  gap: 22px;
  padding: 26px;
}

.edit-dialog-panel header,
.edit-dialog-panel footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.edit-dialog-panel header small {
  color: var(--muted);
}

.edit-dialog-panel h2 {
  margin-top: 4px;
  font-size: 24px;
}

.edit-dialog-panel footer {
  justify-content: flex-end;
  padding-top: 2px;
}

.dialog-close {
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
}

.dialog-close:hover {
  background: #eef8fd;
  color: var(--accent-strong);
}

.dialog-close svg {
  width: 18px;
  height: 18px;
}

.edit-fields {
  display: grid;
  gap: 15px;
}

.edit-fields label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.edit-fields input,
.edit-fields textarea,
.edit-fields select {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdff;
  color: var(--ink);
  font: inherit;
}

.edit-fields input,
.edit-fields select {
  min-height: 44px;
  padding: 0 12px;
}

.edit-fields textarea {
  resize: vertical;
  min-height: 104px;
  padding: 11px 12px;
  line-height: 1.6;
}

.edit-fields input:focus,
.edit-fields textarea:focus,
.edit-fields select:focus {
  outline: 2px solid rgba(74, 174, 232, 0.24);
  border-color: #79c4ed;
}

.edit-fields .edit-check {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
}

.edit-fields .edit-check input {
  width: 18px;
  min-height: 18px;
  accent-color: var(--accent-strong);
}

.edit-hint {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.secondary-button {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 16px;
  background: #ffffff;
  color: var(--ink);
}

.status-card {
  padding: 24px 4px 24px 24px;
  border-left: 3px solid #9ed8f4;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.status-card[data-owner="dudu"] {
  border-left-color: #ef9eaa;
}

.soft-panel {
  border-radius: 8px;
}

.photo-tree {
  border-radius: 8px;
}

.memory-card {
  border-radius: 8px;
}

.memory-card img {
  border-radius: 6px;
}

.map-panel,
.collection-panel,
.school-card,
.collection-item,
.person-list,
.drop-empty {
  border-radius: 8px;
}

.segmented {
  overflow-x: auto;
  scrollbar-width: none;
}

.segmented::-webkit-scrollbar {
  display: none;
}

.segmented button {
  flex: 0 0 auto;
  white-space: nowrap;
}

.map-panel,
.collection-panel {
  border: 1px solid rgba(185, 224, 245, 0.78);
  box-shadow: 0 14px 42px rgba(66, 137, 178, 0.08);
}

.school-card,
.collection-item {
  box-shadow: none;
}

.rank-pill {
  border-radius: 8px;
}

.empty-state {
  border-radius: 8px;
  background: transparent;
}

.site-toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  z-index: 60;
  max-width: min(90vw, 420px);
  padding: 11px 16px;
  border-radius: 8px;
  background: #17364a;
  color: #ffffff;
  font-size: 14px;
  box-shadow: 0 14px 38px rgba(23, 54, 74, 0.24);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 12px);
  transition: opacity 180ms ease, transform 180ms ease;
}

.site-toast.visible {
  opacity: 1;
  transform: translate(-50%, 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;
}

@media (max-width: 980px) {
  .home-hero {
    grid-template-columns: 1fr;
    min-height: 560px;
    gap: 28px;
  }

  .home-status-preview {
    align-self: auto;
    margin-bottom: 0;
  }

  .home-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .sky-card:nth-child(2) {
    border-right: 0;
  }

  .sky-card:nth-child(-n + 2) {
    border-bottom: 1px solid rgba(185, 224, 245, 0.74);
  }

  .message-card,
  .message-card.has-image {
    grid-column: span 6;
  }

  .calendar-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .anniversary-card:nth-child(3n) {
    border-right: 1px solid rgba(185, 224, 245, 0.76);
  }

  .anniversary-card:nth-child(2n) {
    border-right: 0;
  }
}

@media (max-width: 680px) {
  .app-shell {
    padding: 10px 14px 24px;
  }

  .topbar {
    flex-direction: row;
    align-items: center;
  }

  .brand p,
  .topbar-today {
    display: none;
  }

  .brand h1 {
    font-size: 20px;
    white-space: nowrap;
  }

  .brand-mark {
    width: 38px;
    height: 38px;
  }

  .site-nav {
    margin-inline: -14px;
    padding: 8px 14px 12px;
  }

  .site-nav button,
  .site-nav a {
    min-height: 38px;
    padding: 0 11px;
  }

  .segmented button {
    min-width: 0;
    padding-inline: 8px;
  }

  body.section-planner .topbar {
    flex-direction: column;
    align-items: stretch;
  }

  body.section-planner .summary-strip div {
    border-radius: 8px;
  }

  .home-hero {
    min-height: 520px;
    margin-inline: -14px;
    padding: 50px 22px 34px;
  }

  .home-hero h2 {
    font-size: 38px;
  }

  .home-hero p {
    font-size: 15px;
  }

  .hero-actions {
    display: grid;
    justify-content: stretch;
  }

  .hero-actions > * {
    width: 100%;
  }

  .home-grid {
    margin-inline: -14px;
  }

  .sky-card {
    min-height: 148px;
    padding: 20px;
  }

  .sky-card strong {
    font-size: 18px;
  }

  .section-head {
    min-height: 154px;
    align-items: flex-start;
  }

  .compose-button {
    width: 100%;
  }

  .inline-form,
  .message-composer {
    grid-template-columns: 1fr;
  }

  .message-composer label:nth-child(2) {
    grid-row: auto;
  }

  .timeline-list::before {
    left: 8px;
  }

  .timeline-item,
  .timeline-item.left,
  .timeline-item.right {
    grid-template-columns: 22px minmax(0, 1fr);
    gap: 10px;
  }

  .timeline-item.left .timeline-date,
  .timeline-item.right .timeline-date {
    grid-column: 2;
    grid-row: 1;
    justify-self: start;
    text-align: left;
  }

  .timeline-item.left .timeline-dot,
  .timeline-item.right .timeline-dot {
    grid-column: 1;
    grid-row: 1 / span 2;
  }

  .timeline-item.left .timeline-bubble,
  .timeline-item.right .timeline-bubble {
    grid-column: 2;
    grid-row: 2;
  }

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

  .message-wall {
    grid-template-columns: 1fr;
  }

  .message-card,
  .message-card.has-image {
    grid-column: auto;
  }

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

  .anniversary-card,
  .anniversary-card:nth-child(2n),
  .anniversary-card:nth-child(3n) {
    border-right: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}
