:root {
  color-scheme: dark;
  --ink: #f8f6f2;
  --muted: #aaa5b1;
  --bg: #0d0c11;
  --panel: #17151d;
  --panel-2: #211e29;
  --line: #37323f;
  --accent: #ff5c35;
  --accent-2: #ff2f78;
  --yellow: #f7d154;
  font-family: Inter, "Noto Sans TC", "PingFang TC", system-ui, sans-serif;
}
* { box-sizing: border-box; }
html { font-size: 16px; }
body { margin: 0; background: var(--bg); color: var(--ink); min-height: 100vh; line-height: 1.6; }
body::before { content: ""; position: fixed; inset: 0; pointer-events: none; opacity: .16; background-image: linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px); background-size: 48px 48px; mask-image: linear-gradient(to bottom, black, transparent 65%); }
a { color: inherit; }
button, input, select { font: inherit; }
button, .primary-link, .primary-button, .interest-button, .ticket-link { min-height: 44px; }
.skip-link { position: fixed; top: -100px; left: 1rem; z-index: 100; padding: .7rem 1rem; background: var(--ink); color: var(--bg); }
.skip-link:focus { top: 1rem; }
.site-header { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; padding: 1rem clamp(1rem, 4vw, 4rem); border-bottom: 1px solid rgba(255,255,255,.12); background: rgba(13,12,17,.9); backdrop-filter: blur(16px); }
.brand { display: flex; gap: .7rem; align-items: center; text-decoration: none; font-weight: 800; letter-spacing: -.03em; }
.brand small { color: var(--muted); font-size: .75rem; letter-spacing: .08em; text-transform: uppercase; }
.brand-mark { display: grid; place-items: center; width: 2rem; height: 2rem; color: var(--bg); background: var(--accent); border-radius: 50%; font-size: .7rem; }
nav { display: flex; gap: .4rem; align-items: center; }
nav a, .nav-button { padding: .55rem .8rem; border: 0; border-radius: .4rem; background: transparent; color: var(--muted); text-decoration: none; cursor: pointer; }
nav a:hover, .nav-button:hover { color: var(--ink); background: var(--panel-2); }
.nav-login { border: 1px solid var(--line); }
.inline-form { display: inline; }
main { position: relative; width: min(1240px, calc(100% - 2rem)); margin: 0 auto; padding: clamp(2rem, 6vw, 5rem) 0; min-height: 76vh; }
footer { padding: 2rem; border-top: 1px solid var(--line); color: var(--muted); text-align: center; font-size: .85rem; }
.messages { position: relative; z-index: 5; width: min(720px, calc(100% - 2rem)); margin: 1rem auto 0; }
.message { padding: .8rem 1rem; border-left: 3px solid var(--accent); background: var(--panel); }
.eyebrow { margin: 0 0 .5rem; color: var(--accent); font: 700 .78rem/1.2 ui-monospace, monospace; letter-spacing: .16em; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 1rem; font-size: clamp(2.5rem, 7vw, 5.8rem); line-height: .94; letter-spacing: -.065em; }
h2 { line-height: 1.1; letter-spacing: -.035em; }
.directory-head { display: grid; grid-template-columns: 1fr minmax(320px, 520px); align-items: end; gap: 2rem; margin-bottom: 3rem; }
.search-panel { display: grid; grid-template-columns: minmax(160px, 1fr) 120px 120px auto; align-items: end; gap: .65rem; padding: .8rem; border: 1px solid var(--line); background: var(--panel); }
.search-panel label span, .secret-panel label { display: block; margin-bottom: .3rem; color: var(--muted); font-size: .78rem; }
input, select { width: 100%; min-height: 44px; padding: .65rem .75rem; border: 1px solid var(--line); border-radius: .25rem; background: var(--bg); color: var(--ink); }
button { padding: .65rem 1rem; border: 1px solid var(--line); border-radius: .3rem; background: var(--panel-2); color: var(--ink); cursor: pointer; font-weight: 700; }
button:hover { border-color: var(--accent); }
.search-panel button, .primary-button, .primary-link { border-color: var(--accent); background: var(--accent); color: #180905; }
.event-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.event-card { min-height: 350px; background: var(--panel); }
.event-card > a { display: flex; flex-direction: column; height: 100%; padding: 1.3rem; text-decoration: none; transition: background .2s, transform .2s; }
.event-card > a:hover { background: var(--panel-2); transform: translateY(-3px); }
.card-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 2.4rem; }
.status { padding: .25rem .45rem; border: 1px solid var(--line); color: var(--muted); font-size: .72rem; }
.status-cancelled { color: #ff8797; border-color: #8b3340; }
.status-postponed { color: var(--yellow); border-color: #665823; }
.card-index { font: 400 1rem ui-monospace, monospace; color: #625d69; }
.event-card h2 { margin-bottom: .45rem; font-size: clamp(1.45rem, 2.5vw, 2.2rem); }
.artists { color: var(--accent); }
.show-lines { margin-top: auto; padding-top: 1.5rem; border-top: 1px solid var(--line); }
.show-lines p { display: flex; justify-content: space-between; gap: 1rem; margin-bottom: .45rem; font-size: .86rem; }
.show-lines span { color: var(--muted); text-align: right; }
.card-link { margin-top: 1rem; font-size: .85rem; }
.empty-state { grid-column: 1 / -1; padding: 5rem 2rem; background: var(--panel); text-align: center; }
.empty-state.compact { padding: 2rem; border: 1px solid var(--line); }
.back-link { display: inline-block; margin-bottom: 2rem; color: var(--muted); text-decoration: none; }
.detail-head { display: flex; justify-content: space-between; align-items: end; gap: 2rem; padding-bottom: 2.5rem; border-bottom: 1px solid var(--line); }
.detail-head h1 { max-width: 900px; }
.detail-artists { color: var(--accent); font-size: 1.25rem; }
.interest-button { display: inline-flex; align-items: center; justify-content: center; white-space: nowrap; padding: .8rem 1.1rem; border: 1px solid var(--accent); background: transparent; color: var(--ink); text-decoration: none; }
.interest-button.active { background: var(--accent); color: var(--bg); }
.description { max-width: 760px; margin: 2.5rem 0; color: #d8d4dc; }
.shows { margin-top: 4rem; }
.section-title { margin-bottom: 1.5rem; }
.show-card { display: grid; grid-template-columns: minmax(180px, 1.1fr) 2fr 1.2fr; gap: 2rem; align-items: center; padding: 1.4rem 0; border-top: 1px solid var(--line); }
.show-date strong { display: block; font-size: 1.45rem; }
.show-date span, .muted { color: var(--muted); }
dl { margin: 0; }
dl div { display: grid; grid-template-columns: 70px 1fr; gap: 1rem; }
dt { color: var(--muted); }
dd { margin: 0; }
.show-actions { display: flex; flex-direction: column; align-items: stretch; gap: .6rem; }
.ticket-link, .primary-link { display: inline-flex; align-items: center; justify-content: center; padding: .65rem 1rem; text-decoration: none; font-weight: 700; }
.attendance-button { width: 100%; }
.attendance-button.active { border-color: var(--yellow); color: var(--yellow); }
.dashboard-head { margin-bottom: 3rem; }
.dashboard-head h1 { margin-bottom: .4rem; }
.dashboard-head > p:last-child { color: var(--muted); }
.dashboard-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.dashboard-panel { padding: 1.4rem; border: 1px solid var(--line); background: var(--panel); }
.dashboard-panel.full { grid-column: 1 / -1; }
.dashboard-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1rem 0; border-top: 1px solid var(--line); text-decoration: none; }
.dashboard-row small { display: block; color: var(--muted); }
.dashboard-row time { color: var(--accent); text-align: right; }
.settings-page { max-width: 760px; }
.lead { max-width: 620px; color: var(--muted); font-size: 1.05rem; }
.secret-panel, .settings-card { margin: 2rem 0; padding: 1.3rem; border: 1px solid var(--line); background: var(--panel); }
.secret-panel { border-color: var(--yellow); }
.secret-panel input { margin: .5rem 0 1rem; font-family: ui-monospace, monospace; }
.check-row { display: flex; gap: .8rem; align-items: flex-start; margin-bottom: 1rem; }
.check-row input { width: 1.2rem; min-height: 1.2rem; margin-top: .2rem; }
.check-row small { display: block; color: var(--muted); }
.button-row { display: flex; gap: .7rem; }
.danger { color: #ff8797; border-color: #8b3340; }
.auth-card { width: min(520px, 100%); margin: 2rem auto; padding: clamp(1.5rem, 5vw, 3rem); border: 1px solid var(--line); background: var(--panel); }
.auth-card h1 { font-size: clamp(2.3rem, 6vw, 4rem); }
.auth-card form p { margin-bottom: 1rem; }
.auth-card label { display: block; margin-bottom: .3rem; }
.auth-card button { width: 100%; }
.discord-button { background: #5865f2; border-color: #7781f5; color: white; }
.divider { display: flex; align-items: center; gap: .7rem; margin: 1.2rem 0; color: var(--muted); }
.divider::before, .divider::after { content: ""; flex: 1; border-top: 1px solid var(--line); }

@media (max-width: 900px) {
  .directory-head { grid-template-columns: 1fr; }
  .event-grid { grid-template-columns: 1fr 1fr; }
  .show-card { grid-template-columns: 1fr 1.5fr; }
  .show-actions { grid-column: 1 / -1; flex-direction: row; }
}
@media (max-width: 640px) {
  .site-header { align-items: flex-start; gap: .8rem; }
  .brand small { display: none; }
  nav { flex-wrap: wrap; justify-content: flex-end; }
  nav a, .nav-button { padding: .4rem .55rem; font-size: .86rem; }
  main { width: min(100% - 1.2rem, 1240px); padding-top: 2.5rem; }
  .search-panel { grid-template-columns: 1fr; }
  .event-grid { grid-template-columns: 1fr; }
  .event-card { min-height: 300px; }
  .detail-head { align-items: flex-start; flex-direction: column; }
  .show-card { grid-template-columns: 1fr; gap: 1rem; }
  .show-actions { grid-column: auto; flex-direction: column; }
  .dashboard-grid { grid-template-columns: 1fr; }
  .dashboard-panel.full { grid-column: auto; }
  .button-row { flex-direction: column; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
