:root {
  --bg: #f5f7fb;
  --surface: #fff;
  --text: #17243b;
  --muted: #6d7a90;
  --line: #e6ebf3;
  --brand: #3e63e8;
  --brand-dark: #3153ce;
  --ok: #16855b;
  --maybe: #b67512;
  --no: #cc5353;
  --shadow: 0 16px 48px rgba(33, 54, 99, .065);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  min-height: 100vh;
  background: radial-gradient(circle at 12% 0%, #ebf1ff 0, transparent 32%), var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased;
}
button, input, textarea { font: inherit; }
button { cursor: pointer; }
button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 3px solid rgba(62, 99, 232, .35);
  outline-offset: 3px;
}
a { color: inherit; text-decoration: none; }
.wrap { width: min(100%, 1240px); margin: 0 auto; padding: 30px 26px 64px; }
.page-header { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 30px; }
.header-actions { display: flex; align-items: center; gap: 8px; }
.language-picker { display: inline-flex; align-items: center; gap: 4px; min-height: 46px; padding: 0 11px; border-radius: 999px; background: #fff; border: 1px solid var(--line); color: var(--text); white-space: nowrap; }
.language-picker select { width: auto; min-width: 72px; padding: 0 16px 0 0; border: 0; border-radius: 0; background: transparent; color: inherit; box-shadow: none; font-size: 14px; font-weight: 700; cursor: pointer; }
.language-picker select:focus { border: 0; box-shadow: none; }
.brand { display: inline-block; font-size: 28px; font-weight: 800; letter-spacing: -.055em; line-height: 1.2; }
.sub { margin-top: 6px; color: var(--muted); font-size: 14px; }
.btn-link, button:not(.cell-btn):not(.choice-close):not(.choice-clear) {
  border: 0;
  border-radius: 999px;
  min-height: 46px;
  padding: 11px 18px;
  font-size: 14px;
  font-weight: 700;
  transition: background .18s, transform .18s, box-shadow .18s;
}
button:disabled { cursor: not-allowed; }
button:not(:disabled):active { transform: scale(.97); }
.btn-link { display: inline-flex; align-items: center; justify-content: center; background: #eaf0ff; color: var(--brand-dark); white-space: nowrap; }
.btn-primary { background: var(--brand); color: white; box-shadow: 0 6px 16px rgba(62, 99, 232, .2); }
.btn-primary:hover { background: var(--brand-dark); }
.btn-secondary { background: #eaf0ff; color: var(--brand-dark); }
.btn-muted { background: #f0f3f8; color: #4f5d73; }
.btn-danger { background: #ffebeb; color: #a83f3f; }
.card { min-width: 0; padding: 26px; border: 1px solid var(--line); border-radius: 28px; background: var(--surface); box-shadow: var(--shadow); }
.event-layout { display: grid; grid-template-columns: 350px minmax(0, 1fr); gap: 22px; align-items: start; }
.eyebrow { display: block; color: var(--brand); font-size: 12px; font-weight: 800; letter-spacing: .08em; }
.event-heading { margin: 11px 0 6px; font-size: clamp(26px, 3vw, 34px); letter-spacing: -.04em; line-height: 1.3; overflow-wrap: anywhere; }
.event-description { margin: 9px 0 0; color: var(--muted); line-height: 1.7; white-space: pre-wrap; overflow-wrap: anywhere; }
.event-actions { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 25px; }
.event-actions button { flex: 1 1 130px; }
.owner-quick { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 14px; padding: 13px; border-radius: 17px; background: #f3f6ff; color: #465a87; font-size: 13px; font-weight: 700; }
.owner-quick button { min-height: 40px !important; padding: 8px 12px !important; white-space: nowrap; }
.progress-box { margin-top: 27px; padding-top: 23px; border-top: 1px solid var(--line); }
.progress-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; font-size: 15px; }
.progress-head span { color: var(--brand); font-weight: 800; }
.progress-track { height: 9px; margin-top: 12px; overflow: hidden; border-radius: 999px; background: #eaf0fb; }
.progress-track span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #7092ff, var(--brand)); transition: width .25s; }
.small { margin: 11px 0 0; color: var(--muted); font-size: 13px; line-height: 1.6; overflow-wrap: anywhere; }
.claim-section { margin-top: 25px; }
.claim-heading { margin: 0 0 12px; font-size: 16px; }
.claim-list { display: grid; gap: 9px; }
.claim-btn { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; text-align: left; border: 1px solid var(--line) !important; border-radius: 16px !important; background: #fff; color: var(--text); }
.claim-btn:hover:not(:disabled) { border-color: #9bb1ff !important; background: #f7f9ff; }
.claim-btn small { color: var(--brand); font-size: 12px; white-space: nowrap; }
.claim-btn:disabled { background: #f7f8fa; color: #9ca7b7; }
.claim-btn:disabled small { color: #9ca7b7; }
.identity-banner { display: flex; align-items: center; gap: 12px; margin-top: 25px; padding: 13px; border-radius: 19px; background: #edf3ff; }
.identity-mark { display: grid; place-items: center; width: 36px; height: 36px; flex: 0 0 auto; border-radius: 50%; background: var(--brand); color: white; font-weight: 800; }
.identity-banner > div { display: grid; gap: 2px; min-width: 0; flex: 1; }
.identity-caption { color: #65779c; font-size: 12px; }
.identity-banner strong { overflow-wrap: anywhere; }
.identity-change { min-height: 38px !important; padding: 7px 11px !important; background: #fff; color: var(--brand-dark); white-space: nowrap; }
.availability-heading { display: flex; align-items: end; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.section-title { margin: 5px 0 0; font-size: 22px; letter-spacing: -.035em; }
.scroll-hint { color: #9ca8ba; font-size: 12px; white-space: nowrap; }
.table-wrap { max-width: 100%; overflow: auto; border: 1px solid var(--line); border-radius: 20px; scrollbar-color: #b9c5db transparent; }
.table-wrap table { width: max-content; min-width: 100%; border-collapse: separate; border-spacing: 0; }
.table-wrap th, .table-wrap td { min-width: 138px; padding: 13px 10px; border-bottom: 1px solid var(--line); text-align: center; }
.table-wrap tbody tr:last-child td { border-bottom: 0; }
.table-wrap thead th { background: #f7f9fd; color: #55657f; font-size: 13px; font-weight: 700; }
.table-wrap th:first-child, .table-wrap td:first-child { position: sticky; left: 0; z-index: 2; min-width: 118px; width: 118px; max-width: 118px; border-right: 1px solid var(--line); text-align: left; font-weight: 700; overflow-wrap: anywhere; }
.table-wrap thead th:first-child { z-index: 3; }
.table-wrap td:first-child { background: #fff; }
.table-wrap td.member-mine { background: #edf3ff; color: var(--brand-dark); }
.table-wrap td:first-child small { display: block; margin-top: 3px; font-size: 11px; font-weight: 600; }
.slot-date, .slot-time { display: block; white-space: nowrap; }
.slot-date { color: var(--text); font-weight: 800; }
.slot-date small { color: var(--muted); font-weight: 500; }
.slot-time { margin-top: 4px; color: var(--muted); font-size: 12px; font-weight: 500; }
.cell-btn { display: inline-grid; place-items: center; width: 48px; height: 48px; padding: 0; border: 1px solid transparent; border-radius: 16px; font-size: 24px; font-weight: 700; line-height: 1; }
.cell-btn:disabled { cursor: default; }
.cell-btn.is-editable:hover { box-shadow: 0 0 0 3px rgba(62, 99, 232, .12); }
.s-blank { background: #f4f6fa; color: #a9b4c5; }
.s-blank.is-editable { background: #edf3ff; color: var(--brand); }
.s-yes { background: #e8f8f0; color: var(--ok); }
.s-maybe { background: #fff5e1; color: var(--maybe); }
.s-no { background: #ffeded; color: var(--no); }
.best { display: flex; align-items: center; gap: 14px; margin-top: 20px; padding: 17px 18px; border-radius: 20px; background: #edf3ff; color: #2849b6; }
.best.is-waiting { background: #f5f7fb; color: #52627e; }
.best-symbol { display: grid; place-items: center; width: 42px; height: 42px; flex: 0 0 auto; border-radius: 14px; background: #dce7ff; font-size: 23px; }
.is-waiting .best-symbol { background: #e9eef5; }
.best > div { display: grid; gap: 3px; min-width: 0; }
.best-caption { font-size: 12px; font-weight: 700; opacity: .8; }
.best strong { line-height: 1.5; overflow-wrap: anywhere; }
.form-card { max-width: 720px; margin: 0 auto; }
.my-events { max-width: 800px; margin: 0 auto; }
.list-heading, .event-list-item, .event-list-actions { display: flex; align-items: center; gap: 12px; }
.list-heading, .event-list-item { justify-content: space-between; }
.list-heading .section-title { margin-top: 5px; font-size: 28px; }
.list-intro { margin: 12px 0 22px; color: var(--muted); line-height: 1.6; }
.owner-link-box { margin: 20px 0 24px; padding: 19px; border-radius: 20px; background: #edf3ff; }
.owner-link-box strong { font-size: 16px; }
.owner-link-box p { margin: 7px 0 14px; color: #52658b; font-size: 13px; line-height: 1.6; }
.my-events-list { display: grid; gap: 10px; }
.event-list-item { padding: 17px; border: 1px solid var(--line); border-radius: 19px; background: #fbfcff; }
.event-list-info { min-width: 0; }
.event-list-info h2 { margin: 0 0 5px; font-size: 17px; overflow-wrap: anywhere; }
.event-list-info h2 a:hover { color: var(--brand); }
.event-list-info p { margin: 0; color: var(--muted); font-size: 13px; }
.event-list-actions { flex-wrap: wrap; flex: 0 0 auto; }
.event-list-actions .btn-link { background: #f0f3f8; color: #4f5d73; }
.import-box { margin-top: 24px; padding: 17px; border: 1px solid var(--line); border-radius: 18px; }
.import-box summary { cursor: pointer; font-weight: 700; }
.import-box .field { margin-top: 16px; margin-bottom: 0; }
.import-box button { margin-top: 17px; }
.form-card .section-title { margin: 0 0 24px; font-size: 26px; }
.field { margin-bottom: 22px; }
.label { display: block; margin-bottom: 9px; font-size: 14px; font-weight: 700; }
input, textarea { width: 100%; padding: 13px 15px; border: 1px solid #dce4f0; border-radius: 15px; background: #fcfdff; color: var(--text); outline: none; }
input:focus, textarea:focus { border-color: #8aa5ff; box-shadow: 0 0 0 3px rgba(62, 99, 232, .1); }
textarea { min-height: 112px; resize: vertical; }
.slot-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; padding: 12px; border: 1px solid var(--line); border-radius: 18px; background: #f9fbff; }
.slot-row input[type=date] { width: 175px; }
.slot-row input[type=time] { width: 112px; }
.slot-row button { min-height: 43px !important; padding: 9px 13px !important; }
.btns { display: flex; gap: 10px; flex-wrap: wrap; }
.tips, .footer-note { color: var(--muted); font-size: 13px; line-height: 1.7; }
.notice { margin-bottom: 18px; padding: 13px 16px; border-radius: 16px; line-height: 1.6; }
.notice-info { background: #eaf1ff; color: #3153ce; }
.notice-danger { background: #ffeded; color: #a83f3f; }
.notice-warning { background: #fff5e1; color: #8a610f; }
.empty { padding: 28px; border: 1px dashed var(--line); border-radius: 20px; background: #fff; text-align: center; color: var(--muted); }
.choice-shade { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 18px; background: rgba(19, 32, 59, .45); }
.choice-sheet { width: min(100%, 430px); padding: 22px; border-radius: 26px; background: #fff; box-shadow: 0 24px 80px rgba(12, 25, 53, .22); }
.choice-handle { display: none; }
.choice-head { display: flex; justify-content: space-between; align-items: start; gap: 12px; }
.choice-head h3 { margin: 9px 0 0; font-size: 21px; }
.choice-head .slot-date, .choice-head .slot-time { display: inline; }
.choice-head .slot-time { margin-left: 8px; }
.choice-close { width: 36px; height: 36px; flex: 0 0 auto; border: 0; border-radius: 50%; background: #f0f3f8; color: #5c6880; font-size: 25px; }
.choice-member { margin: 15px 0; color: var(--muted); font-size: 13px; }
.choice-options { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; }
.choice-option { display: grid; place-items: center; gap: 5px; min-height: 95px !important; padding: 10px !important; border-radius: 18px !important; font-size: 13px !important; }
.choice-symbol { font-size: 28px; line-height: 1; }
.choice-yes { background: #e8f8f0; color: var(--ok); }
.choice-maybe { background: #fff5e1; color: var(--maybe); }
.choice-no { background: #ffeded; color: var(--no); }
.choice-option.selected { box-shadow: inset 0 0 0 2px currentColor; }
.choice-clear { display: block; width: 100%; margin-top: 12px; padding: 11px; border: 0; background: transparent; color: var(--muted); }
@media (max-width: 900px) {
  .event-layout { grid-template-columns: 1fr; }
  .scroll-hint { display: inline; }
}
@media (min-width: 901px) { .scroll-hint { display: none; } }
@media (max-width: 600px) {
  .wrap { padding: 19px 14px 42px; }
  .page-header { flex-wrap: wrap; margin-bottom: 20px; }
  .brand { font-size: 24px; }
  .sub { font-size: 12px; }
  .btn-link { min-height: 40px; padding: 9px 13px; font-size: 13px; }
  .header-actions { width: 100%; justify-content: space-between; gap: 5px; }
  .header-actions .btn-link { padding-inline: 10px; font-size: 12px; }
  .language-picker { min-height: 40px; padding-inline: 8px; }
  .language-picker select { min-width: 64px; font-size: 12px; }
  .event-list-item { align-items: stretch; flex-direction: column; }
  .event-list-actions > * { flex: 1; text-align: center; }
  .owner-quick { align-items: stretch; flex-direction: column; }
  .card { padding: 20px; border-radius: 24px; }
  .event-layout { gap: 15px; }
  .event-heading { font-size: 28px; }
  .table-wrap th, .table-wrap td { min-width: 114px; padding: 10px 8px; }
  .table-wrap th:first-child, .table-wrap td:first-child { min-width: 90px; width: 90px; max-width: 90px; }
  .slot-row input[type=date] { width: 100%; }
  .slot-row input[type=time] { flex: 1 1 96px; width: 96px; }
  .choice-shade { align-items: end; padding: 0; }
  .choice-sheet { width: 100%; padding: 11px 20px calc(20px + env(safe-area-inset-bottom)); border-radius: 26px 26px 0 0; }
  .choice-handle { display: block; width: 36px; height: 4px; margin: 0 auto 20px; border-radius: 999px; background: #d4dbe7; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
