:root {
  --bg-deep:    #0a0c12;
  --bg-mid:     #10141f;
  --bg-card:    #141824;
  --border:     #2a3050;
  --gold:       #c9a84c;
  --gold-light: #f0d080;
  --blue-mana:  #4a7fc1;
  --blue-glow:  #6ea8f0;
  --white-mana: #e8e0d0;
  --text-main:  #d4cfc8;
  --text-muted: #7a8099;
  --red-mana:   #c0392b;
  --green-mana: #27ae60;
  --black-mana: #8e44ad;
  --radius:     8px;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  background: var(--bg-deep);
  color: var(--text-main);
  font-family: 'Noto Sans JP', sans-serif;
  font-weight: 300;
  min-height: 100vh;
  line-height: 1.6;
}

/* ── Top Bar ── */
.topbar {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-mid);
  flex-wrap: wrap;
}
.topbar-group { display: flex; align-items: center; gap: 6px; }
.topbar-label { font-size: 10px; color: var(--text-muted); letter-spacing: .08em; text-transform: uppercase; }
.toggle-switch {
  display: flex;
  background: var(--bg-deep);
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
}
.toggle-switch button {
  background: none; border: none; color: var(--text-muted);
  padding: 4px 12px; font-size: 11px; font-family: 'Noto Sans JP', sans-serif;
  cursor: pointer; transition: all .18s; letter-spacing: .04em;
}
.toggle-switch button.active { background: rgba(201,168,76,.15); color: var(--gold); }
.tz-select {
  background: var(--bg-deep); border: 1px solid var(--border);
  color: var(--text-main); font-size: 11px; font-family: 'Noto Sans JP', sans-serif;
  padding: 4px 10px; border-radius: 6px; cursor: pointer; outline: none;
  appearance: none; -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%237a8099'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 8px center; padding-right: 24px;
}
.tz-select option { background: #141824; }
.topbar-sep { width: 1px; height: 18px; background: var(--border); margin: 0 4px; }

/* ── Hero ── */
.hero {
  position: relative; overflow: hidden;
  padding: 64px 24px 48px; text-align: center;
  background: radial-gradient(ellipse 80% 60% at 50% 0%, #1a2040 0%, var(--bg-deep) 70%);
}
.hero-eyebrow {
  font-family: 'Cinzel', serif; font-size: 11px; letter-spacing: .25em;
  color: var(--gold); text-transform: uppercase; margin-bottom: 14px;
}
.hero h1 {
  font-family: 'Cinzel', serif; font-size: clamp(26px, 5vw, 52px);
  font-weight: 900; line-height: 1.1;
  color: #f0d080;
  text-shadow: 0 0 40px rgba(240,208,128,.4), 0 2px 8px rgba(0,0,0,.6);
  margin-bottom: 10px;
}
.mana-divider { display: flex; align-items: center; justify-content: center; gap: 10px; margin: 0 auto 36px; }
.mana-pip {
  width: 16px; height: 16px; border-radius: 50%; border: 2px solid;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 8px; font-weight: 700;
}
.pip-w { border-color: var(--white-mana); color: var(--white-mana); background: rgba(232,224,208,.08); }
.pip-u { border-color: var(--blue-mana);  color: var(--blue-mana);  background: rgba(74,127,193,.1); }
.pip-b { border-color: var(--black-mana); color: var(--black-mana); background: rgba(142,68,173,.1); }
.pip-r { border-color: var(--red-mana);   color: var(--red-mana);   background: rgba(192,57,43,.1); }
.pip-g { border-color: var(--green-mana); color: var(--green-mana); background: rgba(39,174,96,.1); }
.divider-line { flex: 1; max-width: 80px; height: 1px; background: linear-gradient(90deg, transparent, var(--border)); }
.divider-line.right { background: linear-gradient(90deg, var(--border), transparent); }

/* ── Filters ── */
.filters-wrap { max-width: 920px; margin: 0 auto 28px; padding: 0 16px; }
.filter-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.filter-label { font-size: 10px; letter-spacing: .1em; color: var(--text-muted); text-transform: uppercase; margin-right: 2px; }
.filter-btn {
  background: var(--bg-card); border: 1px solid var(--border); color: var(--text-muted);
  padding: 5px 14px; border-radius: 20px; font-size: 12px;
  font-family: 'Noto Sans JP', sans-serif; cursor: pointer; transition: all .2s;
}
.filter-btn:hover, .filter-btn.active { border-color: var(--gold); color: var(--gold); background: rgba(201,168,76,.08); }
.filter-btn.active { box-shadow: 0 0 10px rgba(201,168,76,.2); }

/* ── Section header ── */
.section-header {
  max-width: 920px; margin: 0 auto 18px; padding: 0 16px;
  display: flex; align-items: baseline; gap: 12px;
}
.section-header h2 { font-family: 'Cinzel', serif; font-size: 12px; letter-spacing: .15em; color: var(--gold); text-transform: uppercase; }
.event-count { font-size: 11px; color: var(--text-muted); }

/* ── Event Grid ── */
.events-grid {
  max-width: 920px; margin: 0 auto 44px; padding: 0 16px;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px;
}

/* ── Event Card ── */
.event-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden; position: relative;
  cursor: pointer; transition: border-color .25s, transform .2s;
  display: flex; flex-direction: column;
}
.event-card::after {
  content: ''; position: absolute; inset: 0;
  border-radius: var(--radius); opacity: 0; transition: opacity .3s; pointer-events: none;
}
.event-card:hover { border-color: var(--gold); transform: translateY(-2px); }
.event-card:hover::after { opacity: 1; box-shadow: inset 0 0 30px rgba(201,168,76,.06), 0 4px 24px rgba(0,0,0,.5); }
.card-banner { height: 6px; }
.banner-limited  { background: linear-gradient(90deg, #c9a84c, #f0d080); }
.banner-draft    { background: linear-gradient(90deg, #4a7fc1, #6ea8f0); }
.banner-sealed   { background: linear-gradient(90deg, #27ae60, #4fd07e); }
.banner-standard { background: linear-gradient(90deg, #c0392b, #e74c3c); }
.banner-special  { background: linear-gradient(90deg, #8e44ad, #b05cdd); }

.card-body { padding: 14px 16px; flex: 1; display: flex; flex-direction: column; }
.card-top { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 10px; }
.event-type-badge {
  font-size: 10px; font-weight: 500; letter-spacing: .05em;
  text-transform: uppercase; padding: 3px 8px; border-radius: 3px;
}
.badge-limited  { background: rgba(201,168,76,.12); color: var(--gold);     border: 1px solid rgba(201,168,76,.25); }
.badge-draft    { background: rgba(74,127,193,.12); color: var(--blue-glow); border: 1px solid rgba(74,127,193,.25); }
.badge-sealed   { background: rgba(39,174,96,.12);  color: #4fd07e;          border: 1px solid rgba(39,174,96,.25); }
.badge-standard { background: rgba(192,57,43,.12);  color: #e74c3c;          border: 1px solid rgba(192,57,43,.25); }
.badge-special  { background: rgba(142,68,173,.12); color: #b05cdd;          border: 1px solid rgba(142,68,173,.25); }

.entry-cost { font-size: 11px; color: var(--text-muted); text-align: right; }
.entry-cost strong { display: block; color: var(--text-main); font-size: 13px; }
.card-title { font-size: 15px; font-weight: 500; color: var(--white-mana); margin-bottom: 4px; line-height: 1.35; }
.card-set   { font-size: 11px; color: var(--text-muted); margin-bottom: 12px; }
.card-meta  { margin-top: auto; display: flex; flex-direction: column; gap: 5px; }
.meta-row   { display: flex; align-items: flex-start; gap: 6px; font-size: 12px; color: var(--text-muted); }
.meta-icon  { font-size: 12px; margin-top: 1px; flex-shrink: 0; }
.meta-row span { color: var(--text-main); }
.meta-time-block { display: flex; flex-direction: column; gap: 1px; }
.meta-time-main { color: var(--text-main); font-size: 12px; }
.meta-time-sub  { color: var(--text-muted); font-size: 10px; }

.card-footer {
  padding: 10px 16px; border-top: 1px solid var(--border);
  display: flex; justify-content: space-between; align-items: center;
}
.prizes-label { font-size: 10px; color: var(--text-muted); text-transform: uppercase; letter-spacing: .06em; }
.prizes-val   { font-size: 12px; color: var(--gold); }
.status-badge { font-size: 10px; font-weight: 500; padding: 3px 8px; border-radius: 10px; }
.status-active { background: rgba(39,174,96,.15);   color: #4fd07e;           border: 1px solid rgba(39,174,96,.3); }
.status-soon   { background: rgba(201,168,76,.15);  color: var(--gold);       border: 1px solid rgba(201,168,76,.3); }
.status-ended  { background: rgba(122,128,153,.1);  color: var(--text-muted); border: 1px solid rgba(122,128,153,.2); }

/* ── Source link ── */
.source-link {
  display: inline-flex; align-items: center; gap: 4px; font-size: 10px;
  color: var(--text-muted); text-decoration: none; padding: 3px 8px;
  border: 1px solid var(--border); border-radius: 4px; transition: all .18s; white-space: nowrap;
}
.source-link:hover { color: var(--blue-glow); border-color: var(--blue-mana); background: rgba(74,127,193,.08); }
.source-link svg { flex-shrink: 0; }

/* ── Upcoming slim list ── */
.slim-list { max-width: 920px; margin: 0 auto 56px; padding: 0 16px; display: flex; flex-direction: column; gap: 10px; }
.slim-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 12px 16px;
  display: flex; align-items: center; gap: 14px; transition: border-color .2s;
}
.slim-card:hover { border-color: rgba(201,168,76,.4); }
.slim-date { text-align: center; min-width: 42px; }
.slim-date .month { font-size: 10px; text-transform: uppercase; letter-spacing: .08em; color: var(--text-muted); }
.slim-date .day   { font-size: 22px; font-family: 'Cinzel', serif; font-weight: 700; color: var(--gold); line-height: 1; }
.slim-divider { width: 1px; height: 36px; background: var(--border); flex-shrink: 0; }
.slim-info  { flex: 1; min-width: 0; }
.slim-title { font-size: 13px; color: var(--white-mana); margin-bottom: 2px; }
.slim-sub   { font-size: 11px; color: var(--text-muted); }
.slim-time  { font-size: 10px; color: var(--text-muted); margin-top: 2px; }
.slim-right { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; flex-shrink: 0; }

/* ── Footer ── */
footer {
  text-align: center; padding: 28px 16px; border-top: 1px solid var(--border);
  font-size: 11px; color: var(--text-muted); letter-spacing: .04em;
}
footer a { color: var(--gold); text-decoration: none; }

@media (max-width: 540px) {
  .events-grid { grid-template-columns: 1fr; }
  .topbar { gap: 6px; }
  .topbar-sep { display: none; }
}

/* ── Cookie Consent Banner ── */
.consent-banner {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 9999;
  background: var(--bg-mid);
  border-top: 2px solid var(--gold);
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.consent-text { font-size: 0.85rem; color: var(--text-main); line-height: 1.5; }
.consent-en   { color: var(--text-muted); }
.consent-link { color: var(--gold); font-size: 0.8rem; display: block; margin-top: 4px; text-decoration: none; }
.consent-link:hover { color: var(--gold-light); }
.consent-buttons { display: flex; gap: 8px; flex-shrink: 0; }
.consent-btn {
  padding: 8px 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 0.85rem;
  font-family: 'Noto Sans JP', sans-serif;
}
.consent-btn-accept { background: var(--gold); color: #0a0c12; border-color: var(--gold); font-weight: 500; }
.consent-btn-accept:hover { background: var(--gold-light); }
.consent-btn-decline { background: transparent; color: var(--text-muted); }
.consent-btn-decline:hover { color: var(--text-main); }
