:root {
  color-scheme: light;
  --paper: #ffffff;
  --paper-soft: #f7faf5;
  --ink: #17342b;
  --muted: #607269;
  --line: #dce8dc;
  --green: #165b49;
  --green-strong: #0d4b3c;
  --pale: #e8f1da;
  --yellow: #f4c975;
  --danger: #a84248;
  font: 15px/1.6 "Microsoft YaHei UI", "Microsoft YaHei", "PingFang SC", system-ui, sans-serif;
  color: var(--ink);
  background: var(--paper-soft);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { min-width: 320px; margin: 0; background: var(--paper-soft); }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button:disabled { cursor: default; opacity: .56; }
a { color: inherit; }
.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; }
.site-shell { width: min(1180px, calc(100% - 40px)); margin: 0 auto; }
.site-header { display: flex; min-height: 78px; align-items: center; gap: 36px; }
.brand { display: flex; gap: 11px; align-items: center; text-decoration: none; }
.brand-mark { display: grid; width: 43px; height: 43px; place-items: center; border-radius: 15px; background: var(--pale); color: var(--green); font-size: 22px; font-weight: 850; }
.brand strong { display: block; font-size: 20px; letter-spacing: .06em; line-height: 1.2; }
.brand small { display: block; margin-top: 4px; color: var(--muted); font-size: 11px; }
.main-nav { display: flex; align-items: center; gap: 7px; }
.main-nav a { padding: 8px 13px; border-radius: 999px; color: var(--muted); text-decoration: none; }
.main-nav a:hover, .main-nav a[aria-current="page"] { background: var(--pale); color: var(--green); font-weight: 750; }
.header-actions { display: flex; align-items: center; gap: 12px; margin-left: auto; }
.admin-link { color: var(--muted); font-size: 13px; text-decoration: none; }
.admin-link:hover { color: var(--green); }
.account-button, .button { display: inline-flex; min-height: 42px; align-items: center; justify-content: center; border: 1px solid transparent; border-radius: 999px; padding: 8px 17px; font-weight: 750; text-decoration: none; transition: transform .15s ease, background .15s ease, border-color .15s ease; }
.account-button { background: var(--green); color: #fff; }
.account-button:hover, .button:hover { transform: translateY(-1px); }
.hero { display: grid; grid-template-columns: minmax(0, 1fr) 280px; align-items: end; gap: 40px; min-height: 330px; padding: 58px 42px 46px; border: 1px solid var(--line); border-radius: 30px; background: linear-gradient(120deg, #edf5df, #fbfcf8 68%); }
.eyebrow { margin: 0 0 10px; color: var(--green); font-size: 12px; font-weight: 800; letter-spacing: .15em; text-transform: uppercase; }
h1, h2, h3, p { margin-top: 0; }
h1 { max-width: 690px; margin-bottom: 14px; font-size: clamp(38px, 7vw, 74px); letter-spacing: -.06em; line-height: 1.05; }
h2 { margin-bottom: 0; font-size: clamp(26px, 3vw, 36px); letter-spacing: -.04em; line-height: 1.2; }
h3 { margin-bottom: 8px; font-size: 20px; line-height: 1.3; }
.hero-lead { max-width: 560px; margin-bottom: 27px; color: var(--muted); font-size: 17px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.button-primary { background: var(--green); color: #fff; }
.button-quiet { border-color: var(--line); background: #fff9; color: var(--green); }
.button-secondary { border-color: var(--line); background: var(--paper); color: var(--green); }
.hero-note { display: flex; gap: 13px; align-items: flex-start; padding: 17px; border: 1px solid #d5e2c9; border-radius: 19px; background: #ffffffa8; }
.hero-note p { margin: 0; color: var(--muted); font-size: 13px; }
.hero-note strong { color: var(--ink); font-size: 15px; }
.hero-dot { flex: 0 0 auto; width: 11px; height: 11px; margin-top: 6px; border-radius: 50%; background: var(--yellow); box-shadow: 0 0 0 6px #f4c97533; }
.content-section { padding: 70px 0 90px; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 18px; margin-bottom: 24px; }
.text-button { border: 0; background: none; color: var(--green); font-weight: 750; }
.filters { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 21px; }
.filters label { display: block; min-width: 140px; }
.filters .search-box { flex: 1 1 280px; }
input, select, textarea { width: 100%; min-height: 44px; padding: 9px 12px; border: 1px solid #cbdacb; border-radius: 13px; outline: 0; background: #fff; color: var(--ink); }
textarea { min-height: 100px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--green); box-shadow: 0 0 0 3px #165b4920; }
.status-message { margin-bottom: 17px; padding: 11px 14px; border-radius: 13px; background: var(--pale); color: var(--green); white-space: pre-line; }
.status-message[data-error="true"] { background: #faeaea; color: var(--danger); }
.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 15px; }
.card { display: flex; min-height: 250px; flex-direction: column; padding: 20px; border: 1px solid var(--line); border-radius: 22px; background: var(--paper); transition: box-shadow .16s ease, transform .16s ease; }
.card-body { display: flex; flex: 1; flex-direction: column; min-width: 0; }
.event-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.event-card { flex-direction: row; gap: 17px; min-height: 188px; padding: 14px; }
.event-cover { display: grid; flex: 0 0 38%; min-height: 158px; overflow: hidden; place-items: center; border-radius: 15px; background: linear-gradient(135deg, #dcead4, #f5eccd); color: var(--green); font-weight: 800; letter-spacing: .04em; text-align: center; }
.event-cover img { width: 100%; height: 100%; object-fit: cover; }
.event-card .card-kicker { margin-bottom: 8px; }
.event-card h3 { font-size: 18px; }
.event-card .card-info { margin-bottom: 10px; }
.card:hover { box-shadow: 0 12px 28px #17342b12; transform: translateY(-2px); }
.card-kicker { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 23px; color: var(--muted); font-size: 13px; }
.card-category, .tag { display: inline-flex; width: fit-content; align-items: center; min-height: 25px; padding: 3px 9px; border-radius: 999px; background: var(--pale); color: var(--green); font-size: 12px; font-weight: 750; }
.favorite-button { width: 31px; height: 31px; border: 1px solid var(--line); border-radius: 50%; background: #fff; color: var(--muted); font-size: 17px; line-height: 1; }
.favorite-button[data-active="true"] { border-color: #e8cd86; background: #fff7e3; color: #9a6a12; }
.card h3 { max-width: 95%; margin-bottom: 5px; }
.card-company { margin-bottom: 17px; color: var(--muted); }
.card-info { display: grid; gap: 6px; margin: auto 0 18px; color: var(--muted); font-size: 13px; }
.card-info span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.card-price { color: var(--green); font-size: 16px; font-weight: 800; }
.card-link { border: 0; background: none; color: var(--green); font-weight: 750; }
.empty-state { grid-column: 1 / -1; padding: 55px 20px; border: 1px dashed var(--line); border-radius: 20px; color: var(--muted); text-align: center; }
.load-more { display: block; margin: 23px auto 0; }
.site-footer { display: flex; flex-wrap: wrap; gap: 16px; padding: 20px 0 34px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; }
.site-footer span:first-child { color: var(--ink); font-weight: 800; }
.site-footer a { margin-left: auto; color: var(--green); text-decoration: none; }
.modal { position: fixed; z-index: 10; inset: 0; display: grid; place-items: center; padding: 18px; }
.modal-backdrop { position: absolute; inset: 0; background: #122c2380; backdrop-filter: blur(4px); }
.modal-card { position: relative; z-index: 1; width: min(680px, 100%); max-height: min(880px, calc(100dvh - 28px)); overflow: auto; padding: 31px; border: 1px solid var(--line); border-radius: 26px; background: var(--paper); box-shadow: 0 28px 80px #10231e33; }
.detail-card { width: min(760px, 100%); }
.modal-close { position: absolute; top: 17px; right: 18px; width: 34px; height: 34px; border: 0; border-radius: 50%; background: var(--paper-soft); color: var(--muted); font-size: 24px; line-height: 1; }
.modal-close:hover { background: var(--pale); color: var(--green); }
.detail-title-row { display: flex; justify-content: space-between; gap: 18px; padding-right: 38px; }
.detail-title-row h2 { margin-bottom: 7px; }
.detail-company { color: var(--muted); }
.detail-meta { display: flex; flex-wrap: wrap; gap: 8px; margin: 24px 0; }
.detail-meta span { padding: 8px 11px; border-radius: 12px; background: var(--paper-soft); color: var(--muted); font-size: 13px; }
.detail-block { padding: 18px 0; border-top: 1px solid var(--line); }
.detail-block h3 { font-size: 15px; }
.detail-block p { margin: 0; color: var(--muted); white-space: pre-wrap; }
.detail-actions { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 22px; }
.account-card { width: min(570px, 100%); }
.account-tabs { display: flex; gap: 6px; margin: 24px 0 18px; padding: 4px; border-radius: 14px; background: var(--paper-soft); }
.account-tabs button { flex: 1; min-height: 38px; border: 0; border-radius: 10px; background: transparent; color: var(--muted); }
.account-tabs button[aria-selected="true"] { background: var(--paper); color: var(--green); font-weight: 750; box-shadow: 0 2px 8px #17342b0e; }
.auth-form { display: grid; gap: 13px; }
.auth-form label, .profile-form label { display: grid; gap: 5px; color: var(--ink); font-weight: 750; }
.auth-form label span, .profile-form label span { font-size: 13px; }
.form-row { display: grid; grid-template-columns: 1fr auto; gap: 9px; align-items: end; }
.small-button { min-height: 44px; padding-inline: 13px; border: 1px solid var(--line); border-radius: 13px; background: var(--paper-soft); color: var(--green); font-weight: 750; white-space: nowrap; }
.auth-note { margin: 0; color: var(--muted); font-size: 13px; }
.auth-error { margin: 0; color: var(--danger); white-space: pre-line; }
.qr-login { display: grid; gap: 9px; margin-top: 17px; padding-top: 17px; border-top: 1px solid var(--line); }
.qr-login h3 { margin-bottom: 0; font-size: 15px; }
.qr-buttons { display: flex; flex-wrap: wrap; gap: 8px; }
.qr-button { flex: 1 1 170px; min-height: 44px; border: 1px solid var(--line); border-radius: 13px; background: var(--paper); color: var(--ink); font-weight: 750; }
.qr-button:hover { border-color: var(--green); color: var(--green); }
.account-head { display: flex; align-items: start; justify-content: space-between; gap: 12px; padding-right: 36px; }
.account-head p { margin: 5px 0 0; color: var(--muted); }
.account-panel { display: grid; gap: 15px; margin-top: 24px; }
.account-menu { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.account-menu button { min-height: 58px; border: 1px solid var(--line); border-radius: 15px; background: var(--paper-soft); color: var(--ink); text-align: left; }
.account-menu button:hover { border-color: var(--green); color: var(--green); }
.account-section { display: grid; gap: 12px; padding-top: 17px; border-top: 1px solid var(--line); }
.account-section h3 { margin-bottom: 0; font-size: 17px; }
.record-list { display: grid; gap: 8px; }
.record { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 13px; border-radius: 13px; background: var(--paper-soft); }
.record strong, .record small { display: block; }
.record small { color: var(--muted); }
.record .tag { flex: 0 0 auto; }
.profile-form { display: grid; gap: 12px; }
.profile-form .form-actions { display: flex; justify-content: flex-end; gap: 8px; }
.message-list { display: grid; gap: 10px; max-height: 300px; overflow: auto; padding: 4px; }
.message-bubble { max-width: 85%; padding: 9px 12px; border-radius: 13px; background: var(--paper-soft); color: var(--ink); }
.message-bubble.own { justify-self: end; background: var(--pale); }
.message-bubble small { display: block; margin-bottom: 4px; color: var(--muted); font-size: 11px; }
.message-compose { display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: end; }
.message-compose textarea { min-height: 46px; }
.toast { position: fixed; z-index: 20; right: 22px; bottom: 22px; max-width: min(400px, calc(100% - 44px)); padding: 12px 15px; border: 1px solid #ccdfc7; border-radius: 13px; background: var(--green); color: #fff; box-shadow: 0 12px 30px #17342b2b; }
.modal[hidden], .toast[hidden], .load-more[hidden], .status-message[hidden] { display: none; }
@media (max-width: 850px) {
  .site-shell { width: min(100% - 28px, 700px); }
  .site-header { flex-wrap: wrap; gap: 12px 20px; padding: 12px 0; }
  .main-nav { order: 3; width: 100%; overflow: auto; }
  .main-nav a { flex: 0 0 auto; }
  .header-actions { margin-left: auto; }
  .admin-link { display: none; }
  .hero { grid-template-columns: 1fr; min-height: 0; padding: 38px 25px 28px; }
  h1 { font-size: clamp(38px, 12vw, 62px); }
  .hero-note { max-width: 400px; }
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .event-cards { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .site-shell { width: min(100% - 22px, 430px); }
  .site-header { min-height: 70px; }
  .brand strong { font-size: 18px; }
  .account-button { min-height: 38px; padding: 7px 13px; }
  .hero { border-radius: 23px; padding: 31px 20px 23px; }
  .hero-lead { font-size: 15px; }
  .content-section { padding: 50px 0 60px; }
  .section-heading { align-items: start; flex-direction: column; }
  .filters { display: grid; grid-template-columns: 1fr 1fr; }
  .filters .search-box { grid-column: 1 / -1; }
  .filters label { min-width: 0; }
  .cards { grid-template-columns: 1fr; }
  .card { min-height: 220px; }
  .event-card { min-height: 162px; }
  .event-cover { flex-basis: 37%; min-height: 138px; }
  .modal { padding: 10px; }
  .modal-card { padding: 24px 17px; border-radius: 20px; }
  .account-menu { grid-template-columns: 1fr; }
  .message-compose { grid-template-columns: 1fr; }
  .message-compose .button { justify-self: end; }
  .site-footer a { width: 100%; margin-left: 0; }
}
