:root {
  color-scheme: light;
  --paper: #f6f5f7;
  --white: #fff;
  --ink: #211d25;
  --muted: #625b66;
  --pink: #982d59;
  --rose: #f8eaf0;
  --line: #ebe7ed;
  --radius: 24px;
  --shadow: 0 12px 34px -22px #31223738;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 16px/1.55 -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  -webkit-text-size-adjust: 100%;
}
button, a, input { touch-action: manipulation; }
button, input { color: inherit; font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; }
a { color: inherit; text-decoration: none; }
:focus-visible { outline: 2px solid var(--pink); outline-offset: 3px; }
h1, h2, h3, p { margin: 0; }
.wrap { width: min(calc(100% - 40px), 960px); margin-inline: auto; }

.top {
  background: #ffffffeb;
  border-bottom: 1px solid var(--line);
}
.top .wrap {
  min-height: 62px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.brand { display: flex; align-items: center; gap: 9px; font-size: .9375rem; font-weight: 650; }
.brand-mark {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 9px;
  background: var(--rose);
  color: var(--pink);
}
.view-form { display: flex; align-items: center; border-radius: 12px; background: var(--paper); }
.view-form input { width: 82px; height: 44px; padding: 0 0 0 10px; border: 0; background: transparent; }
.view-form input::placeholder { font-size: .875rem; color: var(--muted); }
.view-form button { width: 44px; height: 44px; padding: 0; border: 0; background: transparent; color: var(--pink); }
.view-status { padding-top: 14px; color: var(--pink); text-align: right; font-size: .875rem; }

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-height: 232px;
  margin-top: 22px;
  padding: 22px clamp(24px, 5vw, 58px);
  border: 1px solid #ede0ea;
  border-radius: 32px;
  background: radial-gradient(ellipse at 83% 50%, #f2d9e7, transparent 52%),
              linear-gradient(120deg, #fff, #f9eff5);
  overflow: hidden;
}
.hero h1 { font-size: clamp(2.15rem, 5.3vw, 3.7rem); font-weight: 700; line-height: 1.15; letter-spacing: -.06em; }
.hero em { color: var(--pink); font-family: Georgia, serif; font-weight: 400; }
.hero-date { margin-top: 10px; color: var(--muted); font-weight: 550; font-variant-numeric: tabular-nums; }
.hero-date span { margin-inline: 3px; }
.plush {
  display: block;
  width: clamp(135px, 25vw, 220px);
  height: auto;
  filter: drop-shadow(0 12px 15px #7f305326);
}
.countdown {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0 8px;
  margin-top: 14px;
  padding: 6px 11px;
  border-radius: 12px;
  background: #ffffffbd;
  color: var(--pink);
  font-size: .875rem;
}
.countdown [role=timer] { font-weight: 700; font-variant-numeric: tabular-nums; }

section { margin-top: 28px; }
.section-head { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 6px 12px; margin-bottom: 13px; }
h2 { font-size: clamp(1.65rem, 3vw, 2.15rem); line-height: 1.25; letter-spacing: -.045em; }
h3 { font-size: 1.0625rem; font-weight: 650; }
.tag { color: var(--muted); font-size: .875rem; }

.switch { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; margin-bottom: 14px; border-radius: 16px; background: #ece9ee; }
.switch button { min-height: 49px; padding: 5px 6px; border: 0; border-radius: 12px; background: transparent; color: var(--muted); font-size: .875rem; }
.switch strong { margin-right: .3em; font-size: 1rem; font-variant-numeric: tabular-nums; }
.switch [aria-pressed=true] { background: var(--white); color: var(--pink); box-shadow: 0 2px 7px #33203515; }

details, .card, .progress-card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
details { margin-bottom: 10px; }
summary { position: relative; padding: 15px 43px 15px 18px; min-height: 55px; list-style: none; cursor: pointer; font-weight: 650; }
summary::-webkit-details-marker { display: none; }
summary::after {
  content: "";
  position: absolute;
  top: 21px;
  right: 20px;
  width: 8px;
  height: 8px;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: rotate(45deg);
}
details[open] > summary::after { transform: translateY(3px) rotate(225deg); }
.events, .items { margin: 0; padding: 0 18px; list-style: none; }
.event { display: grid; grid-template-columns: minmax(82px, 108px) minmax(0, 1fr); gap: 12px; padding: 13px 0; border-top: 1px solid var(--line); }
.event-time { align-self: start; color: var(--pink); font-size: .875rem; font-weight: 650; font-variant-numeric: tabular-nums; }
.event strong { font-weight: 650; }
.event p { margin-top: 2px; }
.event p, .card p, .progress-card p, .notice { color: var(--muted); font-size: .9rem; }
.notice { margin: 0 0 4px; padding: 9px 12px; border-radius: 10px; background: var(--rose); }

.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.quick-venues { margin-top: 14px; }
.card, .progress-card { padding: 17px 18px; }
.card h3 { margin-bottom: 7px; }
.card ul { margin: 0; padding-left: 1.2em; }
.card li + li { margin-top: 7px; }
.progress-card { margin-bottom: 12px; }
progress { display: block; width: 100%; height: 7px; margin-bottom: 8px; overflow: hidden; border: 0; border-radius: 8px; background: var(--rose); accent-color: var(--pink); }
progress::-webkit-progress-bar { background: var(--rose); }
progress::-webkit-progress-value { background: var(--pink); }
.task-filter { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.task-filter button, .task-edit { min-height: 44px; padding: 0 12px; border: 0; border-radius: 12px; background: var(--white); font-size: .875rem; }
.task-filter [aria-pressed=true], .task-edit { background: var(--rose); color: var(--pink); font-weight: 650; }
.task { display: flex; align-items: center; gap: 8px; border-top: 1px solid var(--line); }
.task label { display: flex; flex: 1; min-width: 0; min-height: 48px; gap: 10px; padding: 11px 0; overflow-wrap: anywhere; }
.task input { flex: none; width: 20px; height: 20px; margin: 3px 0 0; accent-color: var(--pink); }
.task input:checked + span { color: var(--muted); text-decoration: line-through; }
.task-edit { flex: none; }
.task-edit:disabled { opacity: .6; }

.team-card { margin-bottom: 12px; }
.team-card table { width: 100%; border-collapse: collapse; text-align: left; table-layout: fixed; }
.team-card th, .team-card td { padding: 9px 5px; overflow-wrap: anywhere; }
.team-card thead th { color: var(--muted); font-size: .875rem; font-weight: 550; }
.team-card tbody tr { border-top: 1px solid var(--line); }
.team-card th:first-child { width: 33%; }
.team-card th:last-child { width: 28%; }

.nav {
  position: fixed;
  z-index: 3;
  display: flex;
  flex-direction: column;
  gap: 3px;
  top: 84px;
  left: max(20px, calc((100% - 1150px) / 2));
  width: 150px;
  padding: 7px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--white);
  box-shadow: var(--shadow);
}
.nav a { display: flex; align-items: center; min-height: 46px; gap: 9px; padding: 0 10px; border-radius: 13px; color: var(--muted); font-size: .875rem; font-weight: 600; }
.nav span { font-size: 1.125rem; line-height: 1; }
.nav a[aria-current=page] { background: var(--rose); color: var(--pink); }
@media (hover: hover) { .nav a:hover:not([aria-current]) { background: var(--paper); } }
footer { padding: 34px 0; text-align: center; color: var(--muted); font-size: .875rem; }
footer span { color: var(--pink); margin-inline: 4px; }

@media (min-width: 901px) {
  .wrap { width: min(calc(100% - 215px), 960px); margin-left: max(190px, calc((100% - 810px) / 2)); }
}
@media (max-width: 900px) {
  .nav {
    inset: auto 0 0;
    width: min(100%, 580px);
    margin-inline: auto;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 4px;
    padding: 5px 12px calc(5px + env(safe-area-inset-bottom));
    border-radius: 22px 22px 0 0;
  }
  @supports (backdrop-filter: blur(12px)) or (-webkit-backdrop-filter: blur(12px)) {
    .nav { background: #ffffffdf; -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px); }
  }
  .nav.expanded { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .nav a { flex-direction: column; justify-content: center; min-height: 51px; gap: 4px; padding: 3px 1px; text-align: center; }
  footer { padding-bottom: calc(83px + env(safe-area-inset-bottom)); }
}
@media (max-width: 560px) {
  .wrap { width: calc(100% - 28px); }
  .top .wrap { min-height: 54px; }
  .hero { min-height: 160px; margin-top: 14px; padding: 15px; border-radius: 25px; gap: 6px; }
  .hero h1 { font-size: clamp(1.55rem, 6vw, 2.1rem); line-height: 1.2; }
  .hero-date { margin-top: 7px; font-size: .875rem; }
  .plush { width: clamp(84px, 25vw, 124px); }
  .countdown { margin-top: 9px; padding: 4px 7px; }
  section { margin-top: 21px; }
  details, .card, .progress-card { border-radius: 19px; }
  .event { grid-template-columns: minmax(73px, 25%) minmax(0, 1fr); gap: 9px; }
  summary, .card, .progress-card { padding-left: 14px; }
  .events, .items { padding-inline: 14px; }
  .grid { grid-template-columns: 1fr; }
}
@media (max-width: 350px) {
  .nav { padding-inline: 6px; }
  .nav a { font-size: .8125rem; }
}

.hero { position: relative; isolation: isolate; background: radial-gradient(ellipse at 90% 78%, #e9c6d8, transparent 54%), linear-gradient(110deg, #fffdfd, #faedf4); }
.hero-copy { z-index: 1; }
.hero-date { margin: 0 0 12px; color: #765564; font-size: .875rem; letter-spacing: .09em; }
.hero h1 span { display: inline-block; }
.hero em { font-weight: 400; }
.countdown { background: transparent; padding: 0; margin-top: 18px; }
.event-time { letter-spacing: -.02em; }
@media (max-width: 900px) {
  .nav { bottom: max(10px, env(safe-area-inset-bottom)); width: max-content; max-width: calc(100% - 24px); grid-template-columns: repeat(2, minmax(110px,1fr)); padding: 5px; border-radius: 23px; box-shadow: 0 5px 22px #33203820; }
  .nav.expanded { width: min(410px, calc(100% - 24px)); }
  .nav a { border-radius: 17px; }
}
@media (max-width: 560px) {
  .hero { min-height: 196px; padding: 18px; grid-template-columns: minmax(0, 1fr) 33%; }
  .hero h1 { font-size: clamp(1.65rem, 6.7vw, 2.2rem); line-height: 1.22; }
  .hero-date { font-size: .8125rem; margin-bottom: 9px; }
  .plush { width: 134%; max-width: 178px; justify-self: center; }
  .countdown { margin-top: 13px; }
  .countdown [role=timer] { white-space: nowrap; }
}

#material-form { display:grid; gap:12px; padding:0 16px 16px; }
#material-form label { display:grid; gap:4px; font-size:.9rem; }
#material-form input, #material-form textarea { width:100%; padding:10px; border:1px solid var(--line); border-radius:10px; background:white; font:inherit; }
#material-form button, #material-detail button { min-height:44px; border:0; border-radius:12px; background:var(--rose); color:var(--pink); padding-inline:15px; }
#material-status { font-size:.9rem; color:var(--muted); margin:10px 0; }
.material-row { display:flex; align-items:center; gap:12px; margin-bottom:8px; padding:8px 14px; }
.material-row input { width:22px; height:22px; flex:none; accent-color:var(--pink); }
.material-row button { display:flex; flex:1; align-items:center; gap:12px; min-height:48px; text-align:left; overflow-wrap:anywhere; min-width:0; background:transparent; border:0; }
.material-row button::after { content:'›'; color:var(--muted); margin-left:auto; }
.material-row input:checked + button { color:var(--muted); text-decoration:line-through; }
.material-row img { width:48px; height:48px; object-fit:cover; border-radius:9px; }
#material-detail { width:min(90vw,560px); max-height:82vh; overflow:auto; border:0; border-radius:18px; padding:20px; color:var(--ink); overflow-wrap:anywhere; }
#material-detail::backdrop { background:#28172275; }
#material-detail form { text-align:right; }
#material-detail p { white-space:pre-wrap; margin:8px 0; }

@media(max-width:900px){ .nav.expanded { grid-template-columns:repeat(5,minmax(0,1fr)); width:min(540px,calc(100% - 12px)); } }

body.at-entry > :not(#entry) { display:none !important; }
#entry { min-height:100vh; min-height:100svh; display:grid; place-items:center; padding:24px 16px; background:radial-gradient(ellipse at 64% 30%,#f6dfe9,transparent 62%),#faf7f9; }
.entry-card { width:min(100%,430px); padding:clamp(20px,5vw,38px); text-align:center; border:1px solid white; border-radius:32px; background:#fffcfded; box-shadow:0 24px 70px -32px #90567466; }
.entry-kitty { width:clamp(115px,28vw,168px); height:auto; }
.entry-date { margin:8px 0; letter-spacing:.12em; font-size:.875rem; color:var(--muted); }
.entry-card h1 { font-size:clamp(1.8rem,6vw,2.6rem); }
.entry-card em { color:var(--pink); font-family:Georgia,serif; font-weight:400; }
#entry-label { margin-top:22px; color:var(--muted); }
.entry-clock { display:grid; grid-template-columns:repeat(4,1fr); gap:6px; margin:12px 0 24px; }
.entry-clock span { padding:8px 0; border-radius:14px; background:var(--rose); color:var(--pink); font-size:.8125rem; }
.entry-clock b { display:block; font-size:clamp(1.35rem,5vw,2rem); font-variant-numeric:tabular-nums; }
#entry-form { display:grid; gap:8px; }
#entry-form input,#entry-form button { min-height:46px; border:1px solid var(--line); border-radius:14px; padding:8px 12px; text-align:center; }
#entry-form button { border:0; background:var(--pink); color:white; font-weight:650; }

#material-list h3 { display:flex; justify-content:space-between; align-items:center; margin:20px 0 8px; }
#material-list h3 span { color:var(--muted); font-size:.875rem; font-weight:500; }
#material-list > div { color:var(--muted); }
#material-form select, #material-move select { min-height:44px; background:white; border:1px solid var(--line); border-radius:10px; color:var(--ink); font:inherit; padding:6px 10px; }
#material-move select { margin-left:8px; }

/* Sunset courtyard */
:root {
  --paper:#fff4e7; --ink:#352039; --muted:#715369; --pink:#84345b;
  --rose:#ffe0db; --line:#eaced1; --white:#fffaf4; --radius:17px;
  --shadow:0 4px 0 #60366617;
}
#entry {
  background:#f6b777 url('wedding-boxster-crest.jpg') center center / cover no-repeat;
  align-items:end; overflow:hidden; padding:30vh 16px max(5vh,env(safe-area-inset-bottom));
}
.entry-card { width:min(100%,980px); background:none; box-shadow:none; border:0; padding:0; }
.entry-date,#entry-label { display:inline-block; background:#fff3dfec; color:#57334b; margin:0; padding:4px 8px; font-size:.85rem; font-weight:700; }
.entry-date { border-radius:8px 0 0 8px; }
#entry-label { border-radius:0 8px 8px 0; }
.entry-clock { display:flex; justify-content:center; gap:clamp(8px,2.3vw,26px); margin:12px 0 2px; }
.entry-clock span { padding:0; background:none; color:#fff4d9; font-weight:900; text-shadow:1px 2px #603455,0 0 3px #603455; }
.entry-clock b,#entry-title {
  font-family:"Arial Black","Helvetica Neue",-apple-system,sans-serif; font-weight:1000;
  color:#ffd2dc; -webkit-text-stroke:1px #77365c; paint-order:stroke fill;
  text-shadow:1px 1px #924b99,2px 2px #924b99,3px 3px #824489,4px 4px #713977,5px 5px #623467,6px 7px 4px #51344855;
}
.entry-clock b { font-size:clamp(1.8rem,4vw,3.8rem); line-height:1.12; margin-bottom:3px; }
#entry-title { font-size:clamp(2.8rem,10.5vw,8.2rem); line-height:1.08; letter-spacing:-.055em; transform:skewY(-3deg); margin:0 auto .3em; }
#entry-form { max-width:370px; margin:26px auto 0; grid-template-columns:minmax(0,1fr) auto; }
#entry-form input,#entry-form button { min-width:0; border-radius:10px; box-shadow:0 4px 0 #63334e70; }
#entry-form input { background:#fff8ecef; }
#entry-form button { background:#613256; color:white; }
#mobile-install { margin:6px auto 0; max-width:320px; }
#install-button { min-height:44px; padding:0 14px; border:0; border-radius:9px; background:#fff3dff2; color:#593249; font:inherit; font-size:.85rem; font-weight:650; cursor:pointer; }
#install-help { margin:4px 0 0; padding:10px 14px; border-radius:9px; background:#fff8ef; color:#472b39; text-align:left; font-size:.9rem; line-height:1.6; }
.top,.nav { background:#fff8efef; }
.hero { background:linear-gradient(90deg,#fff1e3 4%,#ffebdbe8 38%,#ffd7c43d 80%),url('wedding-boxster-crest.jpg') center 39%/cover; border-color:#e9bcac; }
.hero h1 { text-shadow:2px 3px #ecb7bf; }
.switch { background:#f0d8ce; }
.switch [aria-pressed=true],.nav a[aria-current=page] { background:#ffded7; color:#652752; }
details,.card,.progress-card { border-color:#eac8bc; }
summary::after { border-color:#8a4a73; }
@media(max-width:560px) {
  #entry { padding-bottom:max(8svh,env(safe-area-inset-bottom)); background-position:50% center; }
  .entry-card { max-width:430px; }
  .entry-clock { gap:17px; }
  #entry-form { max-width:320px; }
}

#material-gallery { display:flex; overflow-x:auto; scroll-snap-type:x mandatory; overscroll-behavior-x:contain; }
#material-gallery figure { margin:0; flex:0 0 100%; min-width:0; scroll-snap-align:start; }
#material-gallery figcaption { margin:6px 0; text-align:center; color:var(--muted); }
#material-gallery img { display:block; width:100%; height:48vh; height:48svh; object-fit:contain; border-radius:10px; background:var(--paper); }
#gallery-controls { display:flex; align-items:center; justify-content:space-between; gap:8px; padding-top:6px; }
#gallery-controls output { font-variant-numeric:tabular-nums; }
#gallery-controls button:disabled { opacity:.4; }
