:root {
  --bg: #f3f3ef;
  --surface: #fbfbf8;
  --surface-2: #e8e9e5;
  --ink: #1b2024;
  --muted: #657078;
  --faint: #98a1a4;
  --line: #d7dbd8;
  --primary: #b84d45;
  --primary-deep: #8f332f;
  --primary-soft: #f3e4e1;
  --gold: #a67d43;
  --gold-soft: #f0e9da;
  --green: #54806b;
  --green-soft: #e4ede8;
  --char: #9a5e43;
  --char-soft: #f0e5e0;
  --shadow: 0 18px 50px rgba(27, 32, 36, .08);
  --serif: "Songti SC", "STSong", "Noto Serif SC", "SimSun", serif;
  --sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--bg); }
body { margin: 0; color: var(--ink); background: var(--bg); font: 15px/1.55 var(--sans); -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
a { color: inherit; }
.app { min-height: 100vh; }
.shell { width: min(1160px, calc(100% - 36px)); margin: 0 auto; padding: 24px 0 88px; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 10px 0 24px; border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 12px; border: 0; background: transparent; padding: 0; color: var(--ink); text-align: left; }
.brand__mark { position: relative; width: 38px; height: 38px; border-radius: 50%; overflow: hidden; background: var(--ink); }
.brand__mark::after { content: ""; position: absolute; width: 33px; height: 33px; top: -6px; right: -10px; border-radius: 50%; background: var(--bg); }
.brand__name { display: block; font: 600 22px/1.1 var(--serif); letter-spacing: 3px; }
.brand__tag { display: block; margin-top: 3px; color: var(--muted); font-size: 12px; }
.topnav { display: flex; align-items: center; gap: 6px; }
.navlink { border: 0; background: transparent; color: var(--muted); padding: 9px 12px; border-radius: 999px; font-size: 13px; }
.navlink:hover, .navlink.is-active { background: var(--surface); color: var(--ink); }
.navlink--admin { color: var(--primary-deep); }
.main { padding-top: 28px; }
.view-title { display: flex; align-items: end; justify-content: space-between; gap: 18px; margin: 0 0 18px; }
.view-title h1 { margin: 0; font: 600 clamp(27px, 5vw, 43px)/1.08 var(--serif); letter-spacing: -1px; }
.view-title p { margin: 8px 0 0; color: var(--muted); font-size: 14px; }
.view-title__actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.layout { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(290px, .8fr); gap: 18px; align-items: start; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 20px; box-shadow: var(--shadow); }
.panel + .panel { margin-top: 16px; }
.panel__head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.panel__title { margin: 0; font: 600 19px/1.2 var(--serif); }
.panel__hint { color: var(--muted); font-size: 12px; }
.next { position: relative; min-height: 310px; display: flex; flex-direction: column; justify-content: space-between; overflow: hidden; padding: 26px; border-radius: 18px; color: #fff; background: var(--ink); }
.next::after { content: ""; position: absolute; width: 260px; height: 260px; right: -70px; top: -96px; border-radius: 50%; border: 1px solid rgba(255,255,255,.17); box-shadow: 0 0 0 26px rgba(255,255,255,.04), 0 0 0 52px rgba(255,255,255,.03); }
.next__top, .next__body, .next__foot { position: relative; z-index: 1; }
.next__top { display: flex; justify-content: space-between; gap: 10px; color: rgba(255,255,255,.65); font-size: 12px; }
.next__type { color: #eacb8d; letter-spacing: 1.5px; }
.next h2 { margin: auto 0 8px; font: 600 clamp(30px, 6vw, 49px)/1.05 var(--serif); letter-spacing: -1px; }
.next__meta { display: grid; gap: 3px; color: rgba(255,255,255,.72); font-size: 13px; }
.next__foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 24px; }
.next__foot strong { color: #fff; font-size: 14px; }
.next__foot span { color: rgba(255,255,255,.62); font-size: 12px; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.stat { min-height: 104px; display: flex; flex-direction: column; justify-content: space-between; padding: 16px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); }
.stat__label { color: var(--muted); font-size: 12px; }
.stat__value { font: 600 33px/1 var(--serif); }
.stat--primary .stat__value { color: var(--primary); }
.stat--gold .stat__value { color: var(--gold); }
.stat--green .stat__value { color: var(--green); }
.type-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 9px; }
.type-card { min-height: 107px; display: flex; flex-direction: column; justify-content: space-between; align-items: flex-start; border: 1px solid transparent; border-radius: 13px; padding: 14px; text-align: left; }
.type-card:hover { transform: translateY(-2px); box-shadow: 0 8px 18px rgba(27,32,36,.08); }
.type-card strong { font: 600 17px/1.2 var(--serif); }
.type-card small { color: var(--muted); font-size: 11px; line-height: 1.35; }
.type-card--meal { background: var(--gold-soft); color: var(--gold); }
.type-card--bbq { background: var(--char-soft); color: var(--char); }
.type-card--newyear { background: var(--primary-soft); color: var(--primary); }
.type-card--other { background: var(--green-soft); color: var(--green); }
.event-list { display: grid; gap: 0; }
.event-row { display: flex; align-items: center; gap: 15px; padding: 14px 0; border-bottom: 1px solid var(--line); text-align: left; }
.event-row:last-child { border-bottom: 0; padding-bottom: 0; }
.event-row:first-child { padding-top: 0; }
.event-row__date { width: 48px; flex: 0 0 48px; display: grid; justify-items: center; gap: 1px; padding-right: 13px; border-right: 1px solid var(--line); }
.event-row__date small { color: var(--faint); font-size: 10px; }
.event-row__date strong { font: 600 26px/1 var(--serif); }
.event-row__body { min-width: 0; flex: 1; }
.event-row__title { display: flex; align-items: center; gap: 8px; min-width: 0; }
.event-row__title b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 15px; }
.event-row__meta { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); font-size: 12px; }
.event-row__stats { display: block; color: var(--faint); font-size: 11px; }
.event-row__arrow { color: var(--faint); font-size: 20px; }
.tag { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 6px; font-size: 11px; font-weight: 600; white-space: nowrap; }
.tag--meal { background: var(--gold-soft); color: var(--gold); }
.tag--bbq { background: var(--char-soft); color: var(--char); }
.tag--newyear { background: var(--primary-soft); color: var(--primary-deep); }
.tag--other { background: var(--green-soft); color: var(--green); }
.tag--muted { background: var(--surface-2); color: var(--muted); }
.btn { min-height: 40px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 0 16px; border: 1px solid transparent; border-radius: 11px; font-weight: 600; font-size: 13px; transition: .16s ease; }
.btn:hover { transform: translateY(-1px); }
.btn--primary { background: var(--primary); color: #fff; }
.btn--primary:hover { background: var(--primary-deep); }
.btn--soft { background: var(--primary-soft); color: var(--primary-deep); }
.btn--line { background: transparent; border-color: var(--line); color: var(--ink); }
.btn--line:hover { border-color: var(--muted); }
.btn--green { background: var(--green-soft); color: var(--green); }
.btn--danger { background: var(--primary-soft); color: var(--primary-deep); }
.btn--small { min-height: 32px; padding: 0 11px; font-size: 12px; border-radius: 8px; }
.btn:disabled { opacity: .5; transform: none; cursor: not-allowed; }
.empty { padding: 24px 4px; color: var(--muted); text-align: center; }
.detail-hero { position: relative; overflow: hidden; padding: 24px; border-radius: 18px; color: #fff; background: var(--ink); }
.detail-hero::after { content: ""; position: absolute; right: -90px; top: -120px; width: 300px; height: 300px; border-radius: 50%; border: 1px solid rgba(255,255,255,.18); box-shadow: 0 0 0 28px rgba(255,255,255,.04), 0 0 0 56px rgba(255,255,255,.03); }
.detail-hero > * { position: relative; z-index: 1; }
.back { margin-bottom: 17px; border: 0; background: transparent; color: rgba(255,255,255,.7); padding: 0; font-size: 13px; }
.detail-hero__type { color: #eacb8d; letter-spacing: 1.6px; font-size: 12px; }
.detail-hero h1 { margin: 7px 0 17px; font: 600 clamp(32px, 7vw, 56px)/1 var(--serif); letter-spacing: -1px; }
.detail-hero__meta { display: flex; flex-wrap: wrap; gap: 7px 18px; color: rgba(255,255,255,.73); font-size: 13px; }
.detail-hero__actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 23px; }
.detail-hero .btn--line { border-color: rgba(255,255,255,.25); color: #fff; }
.detail-grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 16px; margin-top: -8px; position: relative; z-index: 2; }
.tabs { display: flex; gap: 4px; padding: 4px; border-radius: 999px; background: var(--surface-2); }
.tab { flex: 1; min-height: 38px; border: 0; border-radius: 999px; background: transparent; color: var(--muted); font-size: 13px; }
.tab.is-active { background: var(--surface); color: var(--ink); font-weight: 700; box-shadow: 0 2px 7px rgba(27,32,36,.08); }
.signup-list, .item-list { display: grid; gap: 0; }
.signup-row, .item-row { display: flex; align-items: center; gap: 11px; padding: 13px 0; border-bottom: 1px solid var(--line); }
.signup-row:last-child, .item-row:last-child { border-bottom: 0; padding-bottom: 0; }
.avatar { width: 35px; height: 35px; display: grid; place-items: center; flex: 0 0 35px; border-radius: 50%; color: #fff; font-weight: 700; font-size: 13px; }
.row-main { min-width: 0; flex: 1; }
.row-main strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; }
.row-main small { display: block; color: var(--muted); font-size: 12px; }
.vote { min-width: 49px; display: grid; justify-items: center; gap: 1px; padding: 6px 8px; border: 0; border-radius: 9px; background: var(--primary-soft); color: var(--primary-deep); }
.vote.is-voted { background: var(--primary); color: #fff; }
.vote strong { font: 600 18px/1 var(--serif); }
.vote small { font-size: 10px; }
.category-tabs { display: flex; gap: 7px; margin: 15px 0 11px; }
.category-tabs button { flex: 1; min-height: 38px; border: 1px solid var(--line); border-radius: 10px; background: transparent; color: var(--muted); font-size: 12px; }
.category-tabs button.is-active { border-color: var(--primary); background: var(--primary-soft); color: var(--primary-deep); font-weight: 700; }
.quick { display: flex; flex-wrap: wrap; gap: 7px; margin: 11px 0 14px; }
.quick button { min-height: 33px; padding: 0 11px; border: 0; border-radius: 999px; background: var(--primary-soft); color: var(--primary-deep); font-size: 12px; }
.composer { display: flex; gap: 8px; }
.input, .select, .textarea { width: 100%; min-height: 42px; padding: 9px 12px; border: 1px solid var(--line); border-radius: 10px; outline: none; background: var(--surface); color: var(--ink); }
.textarea { min-height: 90px; resize: vertical; }
.input:focus, .select:focus, .textarea:focus { border-color: var(--primary); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px; }
.field { display: grid; gap: 6px; }
.field--full { grid-column: 1 / -1; }
.field label { color: var(--muted); font-size: 12px; }
.form-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 18px; }
.info-list { display: grid; gap: 0; }
.info-row { display: flex; gap: 18px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.info-row:last-child { border-bottom: 0; }
.info-row__label { width: 58px; flex: 0 0 58px; color: var(--muted); font-size: 12px; }
.info-row__value { min-width: 0; flex: 1; font-size: 14px; font-weight: 600; }
.note { margin: 15px 0 0; padding: 13px 14px; border-radius: 10px; background: var(--gold-soft); color: #735325; font-size: 13px; }
.calendar-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; }
.calendar-grid__label { padding: 6px 0; color: var(--muted); text-align: center; font-size: 11px; }
.calendar-day { min-height: 78px; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 9px 4px; border: 1px solid transparent; border-radius: 10px; background: var(--surface); color: var(--muted); }
.calendar-day.has-event { border-color: var(--primary-soft); color: var(--ink); }
.calendar-day button { border: 0; background: transparent; color: inherit; font: 600 17px/1 var(--serif); }
.calendar-day small { width: 5px; height: 5px; border-radius: 50%; background: var(--primary); }
.calendar-day.is-today { box-shadow: inset 0 -3px 0 var(--primary); }
.month-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.month-head strong { font: 600 24px/1 var(--serif); }
.month-head__actions { display: flex; gap: 6px; }
.circle-btn { width: 34px; height: 34px; border: 1px solid var(--line); border-radius: 50%; background: var(--surface); }
.profile-card { display: flex; align-items: center; gap: 14px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.profile-card .avatar { width: 54px; height: 54px; flex-basis: 54px; font-size: 18px; }
.profile-card h2 { margin: 0; font: 600 22px/1.2 var(--serif); }
.profile-card p { margin: 4px 0 0; color: var(--muted); font-size: 12px; }
.notice { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; margin-bottom: 16px; border-radius: 10px; background: var(--gold-soft); color: #735325; font-size: 12px; }
.notice > span:first-child { flex: 0 0 auto; font-weight: 700; white-space: nowrap; }
.notice > span:last-child { min-width: 0; }
.toast { position: fixed; left: 50%; bottom: 22px; z-index: 20; max-width: min(92vw, 440px); padding: 10px 15px; border-radius: 999px; background: var(--ink); color: #fff; font-size: 13px; transform: translate(-50%, 20px); opacity: 0; pointer-events: none; transition: .2s ease; }
.toast.is-show { transform: translate(-50%, 0); opacity: 1; }
.loading { min-height: 180px; display: grid; place-items: center; color: var(--muted); }
.footer { margin-top: 28px; color: var(--faint); font-size: 11px; text-align: center; }

@media (max-width: 800px) {
  .shell { width: min(680px, calc(100% - 28px)); padding-top: 14px; }
  .topbar { padding-bottom: 15px; }
  .brand__name { font-size: 19px; }
  .brand__tag { display: none; }
  .topnav { gap: 0; }
  .navlink { padding: 8px 9px; font-size: 12px; }
  .navlink--admin { display: none; }
  .layout, .detail-grid { grid-template-columns: 1fr; }
  .detail-grid { margin-top: 14px; }
  .next { min-height: 270px; }
}
@media (max-width: 520px) {
  body { font-size: 14px; }
  .shell { width: calc(100% - 22px); padding-bottom: 34px; }
  .main { padding-top: 19px; }
  .topbar { gap: 6px; }
  .brand { min-width: 0; }
  .brand__mark { width: 34px; height: 34px; }
  .brand__mark::after { width: 29px; height: 29px; }
  .brand__name { font-size: 18px; letter-spacing: 2px; }
  .topnav { flex: 1; justify-content: flex-end; }
  .navlink { padding: 7px 8px; }
  .view-title { align-items: flex-start; flex-direction: column; gap: 12px; }
  .view-title h1 { font-size: 34px; }
  .view-title__actions { justify-content: flex-start; }
  .panel { padding: 16px; border-radius: 15px; }
  .stats { gap: 7px; }
  .stat { min-height: 88px; padding: 12px; }
  .stat__value { font-size: 28px; }
  .type-grid { gap: 7px; }
  .type-card { min-height: 91px; padding: 11px; }
  .type-card strong { font-size: 15px; }
  .type-card small { display: none; }
  .form-grid { grid-template-columns: 1fr; gap: 12px; }
  .field--full { grid-column: auto; }
  .detail-hero { padding: 19px; border-radius: 15px; }
  .detail-hero h1 { font-size: 37px; }
  .detail-hero__meta { display: grid; gap: 4px; }
  .category-tabs button { padding: 0 4px; }
  .composer { align-items: stretch; }
  .composer .btn { padding: 0 12px; }
  .calendar-day { min-height: 62px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
