/* =========================================================
   Wacken Planner — metalowy redesign
   ========================================================= */
:root {
  --bg: #050507;
  --bg2: #0d0d12;
  --bg3: #15151c;
  --bg4: #1e1e28;
  --line: #2a2a35;
  --line2: #3a3a48;
  --text: #f0f0f4;
  --muted: #7a7a88;
  --muted2: #aaa;
  --accent: #e10600;
  --accent2: #ff2a1f;
  --gold: #d4a017;
  --silver: #c0c0c8;
  --conflict: #ff1010;

  /* Stage colors */
  --stage-4:  #c81313;
  --stage-5:  #7a2dd8;
  --stage-6:  #2057d9;
  --stage-7:  #0a8c5e;
  --stage-8:  #b8278d;
  --stage-10: #c97a0c;
  --stage-11: #4a5468;

  --font-display: 'Bebas Neue', Impact, sans-serif;
  --font-body: 'Oswald', system-ui, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  color: var(--text);
  font: 14px/1.4 var(--font-body);
  font-weight: 400;
  background: #000;
  background-image:
    radial-gradient(circle at 20% -10%, rgba(225, 6, 0, 0.18) 0%, transparent 40%),
    radial-gradient(circle at 90% 0%, rgba(122, 45, 216, 0.10) 0%, transparent 50%),
    radial-gradient(circle at 50% 110%, rgba(212, 160, 23, 0.06) 0%, transparent 50%),
    linear-gradient(180deg, #050507 0%, #0a0a0e 100%);
  background-attachment: fixed;
  min-height: 100vh;
}
body::before {
  /* Subtle noise overlay */
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: .04;
  z-index: 1;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence baseFrequency='0.9' numOctaves='2'/></filter><rect width='180' height='180' filter='url(%23n)'/></svg>");
}

/* ====== Header (hero) =================================== */
header {
  position: sticky;
  top: 0;
  z-index: 30;
  background:
    linear-gradient(180deg, rgba(225,6,0,.08) 0%, transparent 60%),
    linear-gradient(180deg, #14141c 0%, #050507 100%);
  border-bottom: 2px solid var(--accent);
  box-shadow:
    0 0 0 1px rgba(255,255,255,.04),
    0 8px 24px rgba(0,0,0,.7),
    0 0 40px rgba(225,6,0,.15);
  padding: 14px 24px 12px;
}
header::after {
  /* spike divider line */
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: -2px;
  height: 2px;
  background: linear-gradient(90deg, transparent 0%, var(--accent) 20%, var(--accent2) 50%, var(--accent) 80%, transparent 100%);
  filter: blur(0.5px);
}

.h-row { display: flex; align-items: center; gap: 18px; margin-bottom: 12px; }
.h-logo {
  height: 64px;
  width: auto;
  filter:
    drop-shadow(0 0 12px rgba(225,6,0,.55))
    drop-shadow(0 2px 4px rgba(0,0,0,.8));
}
.h-title { flex: 1; line-height: 1; }
h1 {
  font-family: var(--font-display);
  font-size: 38px;
  letter-spacing: 4px;
  font-weight: 400;
  text-transform: uppercase;
  color: #fff;
  text-shadow:
    0 0 12px rgba(225,6,0,.5),
    0 0 24px rgba(225,6,0,.3),
    0 2px 0 #000;
}
h1 .year {
  color: var(--accent);
  text-shadow:
    0 0 20px var(--accent2),
    0 0 8px var(--accent2);
}
.h-sub {
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 3px;
  color: var(--gold);
  text-transform: uppercase;
  margin-top: 6px;
  text-shadow: 0 1px 0 #000;
}

.lang-switch {
  display: flex;
  gap: 2px;
  margin-left: auto;
  background: var(--bg3);
  border: 1px solid var(--line2);
  border-radius: 4px;
  padding: 2px;
}
.lang-switch button {
  background: transparent;
  border: none;
  color: var(--muted2);
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 1px;
  padding: 4px 10px;
  border-radius: 3px;
  cursor: pointer;
  transition: all .12s;
}
.lang-switch button:hover { color: #fff; }
.lang-switch button.active {
  background: var(--accent);
  color: #fff;
  text-shadow: 0 1px 1px rgba(0,0,0,.5);
}

#syncBadge {
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  padding: 5px 12px;
  margin-left: 8px;
  border-radius: 16px;
  background: rgba(0,0,0,.5);
  border: 1px solid var(--line2);
  letter-spacing: 1px;
  text-transform: uppercase;
}
#syncBadge.ok {
  color: #34d399;
  border-color: rgba(52,211,153,.4);
  box-shadow: 0 0 12px rgba(52,211,153,.2);
}
#syncBadge.off {
  color: #fbbf24;
  border-color: rgba(251,191,36,.4);
}

/* ====== Toolbar ========================================= */
.toolbar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.day-tabs { display: flex; gap: 6px; }

.tab {
  background: linear-gradient(180deg, var(--bg3) 0%, var(--bg2) 100%);
  color: var(--text);
  border: 1px solid var(--line2);
  padding: 8px 16px;
  font-size: 13px;
  font-family: var(--font-body);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  border-radius: 4px;
  cursor: pointer;
  transition: all .15s ease;
}
.tab:hover {
  border-color: var(--accent2);
  color: #fff;
  box-shadow: 0 0 8px rgba(225,6,0,.3);
}
.tab.active {
  background: linear-gradient(180deg, var(--accent2) 0%, var(--accent) 100%);
  border-color: rgba(255,255,255,.3);
  color: #fff;
  text-shadow: 0 1px 2px rgba(0,0,0,.5);
  box-shadow:
    0 0 16px rgba(225,6,0,.5),
    inset 0 1px 0 rgba(255,255,255,.25);
}

.search {
  margin-left: auto;
  background: var(--bg3);
  border: 1px solid var(--line2);
  color: var(--text);
  padding: 8px 14px;
  border-radius: 4px;
  width: 200px;
  font: inherit;
}
.search:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 12px rgba(225,6,0,.25); }
.search::placeholder { color: var(--muted); }

.btn {
  background: linear-gradient(180deg, var(--bg3) 0%, var(--bg2) 100%);
  color: var(--text);
  border: 1px solid var(--line2);
  padding: 8px 14px;
  border-radius: 4px;
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .5px;
  transition: all .15s ease;
}
.btn:hover {
  border-color: var(--accent2);
  box-shadow: 0 0 8px rgba(225,6,0,.3);
}
.btn-mini { padding: 3px 8px; font-size: 11px; }
.btn-block { display: block; width: 100%; text-align: center; }
.btn-primary { background: linear-gradient(180deg, var(--accent2) 0%, var(--accent) 100%); border-color: rgba(255,255,255,.2); color: #fff; }
.btn-danger {
  background: linear-gradient(180deg, #ff3a1f 0%, #b00400 100%);
  border-color: rgba(255,80,60,.5);
  color: #fff;
  text-shadow: 0 1px 2px rgba(0,0,0,.5);
}
.btn-danger:hover { box-shadow: 0 0 14px rgba(225,6,0,.5); }

/* ====== Viewer banner =================================== */
.viewer-banner {
  margin-top: 10px;
  padding: 10px 14px;
  background: linear-gradient(90deg, rgba(245,158,11,.18), rgba(245,158,11,.05));
  border: 1px solid #f59e0b;
  border-radius: 4px;
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 12px;
}
[hidden] { display: none !important; }

/* ====== Main layout ===================================== */
main {
  display: grid;
  grid-template-columns: 1fr 360px;
  position: relative;
  z-index: 2;
}
.timeline-wrap {
  overflow: auto;
  background:
    linear-gradient(180deg, transparent 0%, rgba(0,0,0,.3) 100%);
}
.grid {
  display: grid;
  grid-template-columns: 200px 1fr;
}

/* Stage column */
.stage-cell {
  display: flex; align-items: center;
  padding: 8px 14px;
  font-family: var(--font-display);
  font-size: 17px;
  letter-spacing: 2px;
  text-transform: uppercase;
  border-bottom: 1px solid var(--line);
  height: 96px;
  position: sticky; left: 0;
  background: linear-gradient(90deg, #0d0d12 0%, rgba(13,13,18,.95) 100%);
  z-index: 5;
  border-right: 1px solid var(--line2);
}
.stage-cell::before {
  content: '';
  width: 5px; height: 50px;
  margin-right: 12px;
  border-radius: 3px;
  background: var(--c, var(--accent));
  box-shadow: 0 0 12px var(--c, var(--accent));
}
.stage-cell.head {
  height: 38px;
  background: linear-gradient(180deg, #1a1a22 0%, #0d0d12 100%);
  color: var(--gold);
  font-size: 12px;
  letter-spacing: 3px;
  border-bottom: 1px solid var(--line2);
}
.stage-cell.head::before { display: none; }

/* Time axis */
.time-axis {
  position: sticky; top: 0; z-index: 4;
  height: 38px;
  background: linear-gradient(180deg, #1a1a22 0%, #0d0d12 100%);
  border-bottom: 1px solid var(--line2);
}
.hour-tick {
  position: absolute;
  top: 0; height: 100%;
  display: flex; align-items: center;
  padding-left: 6px;
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  border-left: 1px solid var(--line);
}
.hour-tick.major {
  color: var(--gold);
  border-left-color: var(--line2);
}

.lane {
  position: relative;
  height: 96px;
  border-bottom: 1px solid var(--line);
}
.lane:nth-child(even) { background: rgba(255,255,255,.012); }
.hour-line {
  position: absolute;
  top: 0; bottom: 0;
  width: 1px;
  background: var(--line);
  pointer-events: none;
}
.hour-line.major { background: var(--line2); }

/* ====== Band block ====================================== */
.band {
  position: absolute;
  top: 7px; bottom: 7px;
  border-radius: 4px;
  padding: 5px 8px;
  overflow: hidden;
  cursor: pointer;
  color: #fff;
  font-family: var(--font-body);
  font-size: 12px;
  line-height: 1.15;
  background:
    linear-gradient(180deg, rgba(255,255,255,.22) 0%, transparent 35%, rgba(0,0,0,.35) 100%),
    var(--c, var(--accent));
  border: 1px solid rgba(0,0,0,.55);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.2),
    0 2px 4px rgba(0,0,0,.45);
  user-select: none;
  transition: box-shadow .15s, transform .15s;
}
.band .name {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 15px;
  letter-spacing: 1px;
  text-transform: uppercase;
  word-break: normal;
  overflow-wrap: break-word;
  hyphens: auto;
  margin-right: 28px;
  text-shadow: 0 1px 2px rgba(0,0,0,.65);
  line-height: 1.05;
}
.band .time {
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 600;
  opacity: .92;
  margin-top: 4px;
  text-shadow: 0 1px 2px rgba(0,0,0,.5);
}
.band .marks {
  position: absolute;
  top: 4px; right: 4px;
  display: flex; gap: 2px; flex-wrap: wrap;
  max-width: 70px;
  justify-content: flex-end;
}
.band .mark {
  display: inline-flex;
  align-items: center; justify-content: center;
  width: 20px; height: 20px;
  border-radius: 50%;
  background: var(--m, #fff);
  color: #111;
  font-size: 11px;
  font-weight: 800;
  font-family: var(--font-body);
  border: 2px solid #000;
  box-shadow: 0 0 0 1px rgba(255,255,255,.7), 0 2px 4px rgba(0,0,0,.5);
}
.band .links {
  position: absolute;
  bottom: 3px; right: 4px;
  display: flex; gap: 3px;
  opacity: 0.65;
  transition: opacity .15s;
}
.band:hover .links { opacity: 1; }
.band .links a {
  display: inline-flex;
  align-items: center; justify-content: center;
  width: 18px; height: 18px;
  border-radius: 3px;
  background: rgba(0,0,0,.65);
  color: #fff;
  text-decoration: none;
  font-size: 11px;
  border: 1px solid rgba(255,255,255,.18);
}
.band .links a:hover {
  background: var(--accent);
  border-color: #fff;
  box-shadow: 0 0 6px var(--accent2);
}

.band.has-me {
  box-shadow:
    inset 0 0 0 2px #fff,
    0 0 12px var(--c, var(--accent)),
    0 4px 10px rgba(0,0,0,.5);
}
.band.conflict {
  outline: 3px solid var(--conflict);
  outline-offset: -2px;
  animation: pulse 1.4s ease-in-out infinite;
}
@keyframes pulse {
  0%,100% { outline-color: var(--conflict); box-shadow: inset 0 0 0 1px var(--conflict), 0 0 12px rgba(255,16,16,.5); }
  50% { outline-color: rgba(255,16,16,.4); box-shadow: inset 0 0 0 1px rgba(255,16,16,.4); }
}
.band:hover {
  z-index: 20;
  transform: translateY(-1px);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.3),
    0 8px 24px rgba(0,0,0,.7),
    0 0 16px var(--c, var(--accent));
  min-width: 180px;
}
.band.dim { opacity: 0.15; filter: grayscale(.6); }
.band.match {
  box-shadow:
    inset 0 0 0 2px var(--gold),
    0 0 16px var(--gold);
}
.band.disabled { cursor: not-allowed; }

/* ====== Sidebar ========================================= */
aside {
  background:
    linear-gradient(180deg, rgba(225,6,0,.04) 0%, transparent 100%),
    linear-gradient(180deg, var(--bg2) 0%, #08080c 100%);
  border-left: 1px solid var(--line2);
  padding: 14px 16px;
  overflow-y: auto;
  overflow-x: hidden;
  max-height: calc(100vh - 130px);
  position: sticky;
  top: 130px;
  box-shadow: -8px 0 24px rgba(0,0,0,.5) inset;
}
aside h2 {
  margin: 18px 0 10px;
  font-family: var(--font-display);
  font-size: 15px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--gold);
  border-bottom: 1px solid var(--line);
  padding-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
}
aside h2 .ic { font-size: 14px; }
aside section:first-child h2 { margin-top: 0; }
aside section:first-child > h2:first-child,
.me-box ~ section h2 { margin-top: 14px; }

/* "You are" box */
.me-box {
  background: linear-gradient(135deg, rgba(225,6,0,.12) 0%, rgba(0,0,0,.4) 100%);
  border: 1px solid var(--accent2);
  border-radius: 6px;
  padding: 12px;
  box-shadow:
    0 0 16px rgba(225,6,0,.15),
    inset 0 1px 0 rgba(255,255,255,.05);
}
.me-label {
  font-family: var(--font-display);
  font-size: 12px;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 2px;
}
.me-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 5px;
}
.swatch {
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--c, #888);
  border: 2px solid #000;
  box-shadow: 0 0 0 2px rgba(255,255,255,.7), 0 0 8px var(--c);
  flex-shrink: 0;
}
.me-name {
  font-family: var(--font-display);
  font-size: 19px;
  letter-spacing: 1px;
  flex: 1;
  color: #fff;
}

.share-row { margin: 8px 0 14px; }
.share-row small.hint {
  display: block;
  font-size: 11px;
  color: var(--muted2);
  margin-top: 4px;
  line-height: 1.45;
  font-weight: 400;
}
.btn-emphasis {
  background: linear-gradient(180deg, rgba(225,6,0,.3) 0%, rgba(225,6,0,.1) 100%);
  border-color: var(--accent);
  color: #fff;
}
.btn-emphasis:hover {
  background: linear-gradient(180deg, var(--accent2) 0%, var(--accent) 100%);
  box-shadow: 0 0 14px rgba(225,6,0,.5);
}

/* Email section */
.email-box .hint {
  font-size: 12px;
  color: var(--muted2);
  margin: 4px 0 8px;
  line-height: 1.4;
}
.email-form { display: flex; gap: 6px; }
.email-form input {
  flex: 1;
  background: var(--bg3);
  border: 1px solid var(--line2);
  color: var(--text);
  padding: 7px 11px;
  border-radius: 4px;
  font: inherit;
  font-size: 12px;
  min-width: 0;
}
.email-form input:focus { outline: none; border-color: var(--accent); }
.email-form .btn { padding: 7px 14px; font-size: 12px; }

/* Members list */
.members-list { list-style: none; display: flex; flex-direction: column; gap: 4px; }
.member-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 10px;
  border-radius: 4px;
  font-family: var(--font-display);
  font-size: 16px;
  letter-spacing: .5px;
  font-weight: 400;
  background: var(--bg3);
  border: 1px solid var(--line);
}
.member-item:hover { border-color: var(--accent2); }
.member-item .count {
  margin-left: auto;
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 700;
  color: var(--gold);
  background: rgba(0,0,0,.4);
  padding: 2px 9px;
  border-radius: 10px;
  border: 1px solid var(--line2);
  letter-spacing: 1px;
}

/* Plan box */
.summary {
  background: linear-gradient(180deg, var(--bg3) 0%, var(--bg2) 100%);
  border: 1px solid var(--line2);
  border-radius: 6px;
  padding: 10px 12px;
  margin-bottom: 12px;
  font-size: 13px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px 12px;
}
.summary .stat {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}
.summary .label {
  color: var(--muted2);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
}
.summary .value {
  font-family: var(--font-display);
  font-size: 20px;
  color: #fff;
  letter-spacing: 1px;
}
.summary .value.conflict { color: var(--conflict); }
.summary .value.gold { color: var(--gold); }

.plan-list { list-style: none; display: flex; flex-direction: column; gap: 7px; }
.plan-item {
  background: linear-gradient(180deg, var(--bg3) 0%, var(--bg2) 100%);
  border: 1px solid var(--line2);
  border-left: 4px solid var(--c, var(--accent));
  border-radius: 5px;
  padding: 9px 12px;
  font-size: 13px;
  transition: border-color .12s, background .12s;
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-rows: auto auto auto;
  grid-template-areas:
    "time stage"
    "name name"
    "who  who";
  column-gap: 8px;
  row-gap: 3px;
}
.plan-item:hover {
  border-color: var(--accent2);
  background: linear-gradient(180deg, var(--bg4) 0%, var(--bg3) 100%);
}
.plan-item.has-conflict {
  border-color: var(--conflict) !important;
  background: linear-gradient(90deg, rgba(255,16,16,.15), var(--bg3) 60%);
  box-shadow: inset 3px 0 0 var(--conflict);
}
.plan-item .pi-time {
  grid-area: time;
  font-family: var(--font-body);
  font-size: 12px;
  color: #fff;
  font-weight: 700;
  letter-spacing: .5px;
  white-space: nowrap;
}
.plan-item .pi-stage {
  grid-area: stage;
  font-family: var(--font-body);
  font-size: 10px;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  padding: 2px 8px;
  border-radius: 10px;
  background: var(--c, #555);
  border: 1px solid rgba(0,0,0,.5);
  font-weight: 700;
  text-shadow: 0 1px 1px rgba(0,0,0,.4);
  align-self: center;
}
.plan-item .pi-name {
  grid-area: name;
  font-family: var(--font-display);
  font-size: 19px;
  letter-spacing: .8px;
  color: #fff;
  text-transform: uppercase;
  line-height: 1.05;
  margin-top: 4px;
}
.plan-item .pi-who {
  grid-area: who;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 5px;
}
.tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  border-radius: 3px;
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .8px;
  text-transform: uppercase;
  background: var(--c, #888);
  color: #0a0a0a;
  border: 1px solid rgba(0,0,0,.45);
  box-shadow: 0 1px 0 rgba(255,255,255,.18) inset;
}
.tag.me {
  outline: 2px solid #fff;
  outline-offset: -1px;
  box-shadow: 0 0 8px var(--c, #fff), 0 1px 0 rgba(255,255,255,.25) inset;
}
.pi-conflict {
  grid-column: 1 / -1;
  margin-top: 4px;
  font-size: 11px;
  color: #ff9999;
  font-weight: 600;
  border-top: 1px dashed rgba(255,16,16,.3);
  padding-top: 4px;
}
.empty {
  color: var(--muted);
  font-style: italic;
  padding: 12px 0;
  text-align: center;
  font-size: 13px;
}

/* ====== Footer ========================================== */
.footer-note {
  color: var(--muted2);
  font-size: 11px;
  padding: 10px 24px;
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, var(--bg2) 0%, #050507 100%);
  position: relative;
  z-index: 2;
}
.footer-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  padding-bottom: 6px;
  border-bottom: 1px dashed var(--line);
  margin-bottom: 6px;
}
.hosted-by {
  color: var(--muted2);
  font-size: 12px;
  letter-spacing: .5px;
}
.hosted-by a {
  color: var(--gold);
  text-decoration: none;
  font-weight: 700;
  letter-spacing: 1px;
}
.hosted-by a:hover { color: var(--accent2); text-shadow: 0 0 6px var(--accent2); }
.footer-bottom {
  font-size: 10.5px;
  color: var(--muted);
  line-height: 1.5;
}
.footer-links {
  font-size: 11px;
}
.footer-links a {
  color: var(--muted2);
  text-decoration: none;
  margin-left: 10px;
  text-transform: uppercase;
  letter-spacing: 1px;
}
.footer-links a:hover { color: var(--accent2); }
.footer-version {
  float: right;
  font-family: ui-monospace, 'Courier New', monospace;
  font-size: 10px;
  color: var(--muted);
  letter-spacing: .5px;
  opacity: .7;
}
.footer-version:hover { opacity: 1; color: var(--gold); }

/* ====== Modal =========================================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.78);
  backdrop-filter: blur(4px);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fadeIn .15s ease-out;
}
@keyframes fadeIn { from { opacity: 0 } to { opacity: 1 } }
.modal {
  background: linear-gradient(180deg, var(--bg3) 0%, var(--bg2) 100%);
  border: 1px solid var(--accent);
  border-radius: 8px;
  box-shadow:
    0 0 0 1px rgba(255,255,255,.04),
    0 24px 60px rgba(0,0,0,.8),
    0 0 32px rgba(225,6,0,.2);
  max-width: 520px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  animation: slideIn .2s ease-out;
}
@keyframes slideIn {
  from { transform: translateY(12px) scale(.98); opacity: 0 }
  to { transform: translateY(0) scale(1); opacity: 1 }
}
.modal-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 22px 12px;
  border-bottom: 1px solid var(--line);
}
.modal-header .icon { font-size: 22px; line-height: 1; }
.modal-header h3 {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: #fff;
  flex: 1;
}
.modal-close {
  background: transparent;
  border: none;
  color: var(--muted);
  font-size: 22px;
  cursor: pointer;
  padding: 0 4px;
}
.modal-close:hover { color: var(--accent2); }
.modal-body {
  padding: 16px 22px;
  font-size: 14px;
  line-height: 1.5;
  color: var(--text);
}
.modal-body p { margin: 0 0 10px; }
.modal-body p:last-child { margin-bottom: 0; }
.modal-body .warning {
  background: rgba(245, 158, 11, .12);
  border-left: 3px solid #f59e0b;
  padding: 8px 12px;
  border-radius: 4px;
  font-size: 13px;
  margin: 10px 0;
}
.modal-body .danger {
  background: linear-gradient(90deg, rgba(225,6,0,.18), rgba(225,6,0,.04));
  border-left: 3px solid var(--accent);
  padding: 8px 12px;
  border-radius: 4px;
  font-size: 13px;
  margin: 10px 0;
}
.modal-body label {
  display: block;
  font-family: var(--font-display);
  font-size: 12px;
  color: var(--gold);
  margin-bottom: 5px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
}
.modal-body input[type="text"],
.modal-body input[type="email"],
.modal-body textarea {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--line2);
  color: var(--text);
  padding: 10px 12px;
  border-radius: 4px;
  font: inherit;
  font-size: 14px;
  margin-bottom: 4px;
}
.modal-body input:focus,
.modal-body textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 12px rgba(225,6,0,.25);
}
.modal-body textarea { resize: vertical; min-height: 64px; }
.modal-body .url-box { display: flex; gap: 6px; }
.modal-body .url-box input {
  flex: 1;
  font-family: ui-monospace, monospace;
  font-size: 12px;
  margin: 0;
}
.modal-footer {
  padding: 14px 22px 18px;
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  border-top: 1px solid var(--line);
}
.modal-footer .btn { padding: 9px 18px; font-size: 13px; }
.btn-confirm {
  background: linear-gradient(180deg, var(--accent2) 0%, var(--accent) 100%);
  border-color: rgba(255,255,255,.25);
  color: #fff;
  text-shadow: 0 1px 2px rgba(0,0,0,.5);
}
.btn-confirm:hover { box-shadow: 0 0 14px rgba(225,6,0,.5); }
.btn-danger {
  background: linear-gradient(180deg, #b91c1c 0%, #6b0000 100%);
  border-color: rgba(255,80,60,.5);
  color: #fff;
}

/* Mobile */
@media (max-width: 900px) {
  main { grid-template-columns: 1fr; }
  aside {
    position: static;
    max-height: none;
    border-left: none;
    border-top: 1px solid var(--accent);
  }
  .search { width: 140px; }
  h1 { font-size: 28px; letter-spacing: 2px; }
  .h-logo { height: 48px; }
}

/* ====== Print =========================================== */
.print-only { display: none; }
@media print {
  @page { size: A4 landscape; margin: 12mm; }
  body { background: #fff; color: #000; font-family: system-ui, sans-serif; }
  body::before { display: none; }
  header, .timeline-wrap, aside, .footer-note { display: none !important; }
  .print-only { display: block; }
  .print-day { page-break-after: always; }
  .print-day:last-child { page-break-after: auto; }
  .print-day h2 {
    margin: 0 0 8px;
    font-size: 18px;
    border-bottom: 2px solid #000;
    padding-bottom: 4px;
  }
  .print-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 11px;
  }
  .print-table th, .print-table td {
    border: 1px solid #555;
    padding: 5px 7px;
    text-align: left;
    vertical-align: top;
  }
  .print-table th { background: #ddd; font-size: 10px; text-transform: uppercase; }
  .print-meta { font-size: 10px; color: #555; margin-bottom: 8px; }
  .print-conf { color: #c00; font-size: 10px; margin-top: 2px; }
  .print-stage-tag {
    display: inline-block;
    padding: 1px 4px;
    border-radius: 3px;
    background: #eee;
    border: 1px solid #aaa;
    font-size: 10px;
  }
  .print-who-tag {
    display: inline-block;
    padding: 1px 5px;
    border-radius: 3px;
    margin-right: 3px;
    font-weight: 700;
    font-size: 10px;
    border: 1px solid #000;
  }
}
