:root {
  --gold: #c5a059;
  --gold-bright: #f2d68d;
  --blood-red: #8b0000;
  --red-hot: #d32f2f;
  --dark-bg: #0a0a0a;
  --panel-bg: #121212;
  --card-bg: #181818;
  --line: #2a2a2a;
  --text-main: #e8e0d0;
  --text-muted: #9a9184;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.55);
  --smooth-ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Montserrat", Helvetica, Arial, sans-serif;
  color: var(--text-main);
  background:
    radial-gradient(circle at 50% -10%, rgba(139, 0, 0, 0.42) 0, transparent 38rem),
    linear-gradient(135deg, rgba(197, 160, 89, 0.10), transparent 28rem),
    var(--dark-bg);
}

body.is-account-dialog-open {
  overflow: hidden;
}

button,
select,
input {
  font: inherit;
}

button,
select,
.set-card,
.personal-item,
.toggle {
  transition:
    transform 160ms ease,
    border-color 160ms ease,
    background-color 160ms ease,
    box-shadow 160ms ease,
    color 160ms ease,
    filter 160ms ease;
}

.app-shell {
  width: min(1500px, calc(100% - 28px));
  margin: 0 auto;
  padding: 246px 0 34px;
}

.hero {
  position: fixed;
  top: 20px;
  left: 50%;
  width: min(1500px, calc(100% - 28px));
  transform: translateX(-50%);
  z-index: 40;
  min-height: 190px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  padding: 28px;
  border: 1px solid #302820;
  border-top: 3px solid var(--blood-red);
  border-bottom: 3px solid var(--gold);
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.90), rgba(0, 0, 0, 0.54)),
    radial-gradient(circle at 78% 12%, rgba(197, 160, 89, 0.28), transparent 20rem),
    #111;
  box-shadow: var(--shadow);
  transition:
    min-height 420ms var(--smooth-ease),
    padding 420ms var(--smooth-ease),
    border-color 420ms var(--smooth-ease),
    background 420ms var(--smooth-ease),
    box-shadow 420ms var(--smooth-ease);
}

.kicker,
.subtitle,
.section-title {
  margin: 0;
}

.kicker {
  font-family: "Oswald", Helvetica, Arial, sans-serif;
  color: var(--text-main);
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.82rem;
  font-weight: 700;
}

h1 {
  margin: 6px 0 8px;
  font-family: "Oswald", Helvetica, Arial, sans-serif;
  font-size: clamp(2.6rem, 8vw, 5.8rem);
  line-height: 0.95;
  letter-spacing: 0;
  color: #fff;
  text-transform: uppercase;
  text-shadow: 0 0 22px rgba(197, 160, 89, 0.42);
}

.subtitle {
  max-width: 690px;
  color: var(--text-main);
  line-height: 1.55;
}

.hero__content {
  max-height: 170px;
  transition:
    opacity 300ms var(--smooth-ease),
    transform 420ms var(--smooth-ease),
    max-height 420ms var(--smooth-ease);
}

.hero__compact-title {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center start;
  padding: 0 94px 0 24px;
  color: #fff;
  font-family: "Oswald", Helvetica, Arial, sans-serif;
  font-size: clamp(1.08rem, 4vw, 1.5rem);
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition:
    opacity 320ms var(--smooth-ease) 90ms,
    transform 420ms var(--smooth-ease) 70ms;
}

body.is-header-compact .hero {
  min-height: 62px;
  align-items: center;
  padding: 10px 18px;
  border-top-width: 2px;
  border-bottom-width: 2px;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.96), rgba(18, 12, 8, 0.92)),
    #0b0b0b;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.55);
}

body.is-header-compact .hero__content {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transform: translateY(-6px);
}

body.is-header-compact .hero__compact-title {
  opacity: 1;
  transform: translateY(0);
}

.hero-account {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 3;
  width: 44px;
  height: 44px;
  display: block;
  border: 1px solid #3a342c;
  background: #101010;
  color: #fff;
  padding: 0;
  font-family: "Oswald", Helvetica, Arial, sans-serif;
  font-weight: 700;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.34);
}

.hero-account:hover,
.hero-account:focus-visible {
  transform: translateY(-1px);
  border-color: var(--gold);
  outline: none;
  box-shadow: 0 0 0 1px rgba(197, 160, 89, 0.22), 0 10px 24px rgba(0, 0, 0, 0.36);
}

.hero-account__avatar {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  border: 0;
  background:
    linear-gradient(145deg, rgba(139, 0, 0, 0.82), rgba(197, 160, 89, 0.32)),
    #161616;
  color: #fff;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1;
  overflow: hidden;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.hero-account__text {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.hero-account.is-logged-in .hero-account__avatar {
  background:
    linear-gradient(145deg, rgba(197, 160, 89, 0.95), rgba(139, 0, 0, 0.48)),
    #17110a;
}

.hero-account .hero-account__avatar.has-image {
  background-color: #101010;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

body.is-header-compact .hero-account {
  top: 9px;
  right: 12px;
  width: 40px;
  height: 40px;
}

.controls {
  position: relative;
  top: auto;
  z-index: 20;
  display: grid;
  gap: 10px;
  margin: 18px 0;
  padding: 14px;
  border: 1px solid var(--line);
  background: rgba(13, 13, 13, 0.94);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.38);
  backdrop-filter: blur(12px);
}

body.is-header-compact .controls {
  top: auto;
}

.filters-primary,
.filters-advanced {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, auto);
  gap: 12px;
  align-items: end;
}

.filters-advanced {
  grid-template-columns: minmax(0, 1fr) minmax(260px, 0.8fr);
  overflow: hidden;
  animation: filtersReveal 180ms ease both;
}

.search-control {
  grid-column: 1 / -1;
  min-width: 0;
}

.filters-advanced[hidden] {
  display: none;
}

.more-filters-toggle {
  width: 100%;
  min-height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid #292723;
  border-radius: 0;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.015);
  font-family: "Montserrat", Helvetica, Arial, sans-serif;
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  cursor: pointer;
}

.more-filters-toggle:hover {
  color: var(--text-main);
  border-color: #3a342c;
  background: rgba(255, 255, 255, 0.035);
}

.more-filters-toggle[aria-expanded="true"] span:last-child {
  transform: rotate(180deg);
}

.more-filters-toggle span:last-child {
  transition: transform 160ms ease;
}

.account-dialog {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 18px;
}

.account-dialog[hidden] {
  display: none;
}

.account-dialog__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(8px);
}

.account-panel {
  position: relative;
  z-index: 1;
  width: min(430px, 100%);
  display: grid;
  gap: 14px;
  border: 1px solid #3a342c;
  border-top: 3px solid var(--blood-red);
  border-bottom: 3px solid var(--gold);
  background:
    linear-gradient(180deg, rgba(18, 18, 18, 0.98), rgba(8, 8, 8, 0.98)),
    #111;
  padding: 18px;
  box-shadow: var(--shadow);
  animation: modalEnter 220ms var(--smooth-ease) both;
}

.account-dialog__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.account-dialog__eyebrow {
  margin: 0 0 4px;
  color: var(--text-muted);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.account-dialog h2 {
  margin: 0;
  color: #fff;
  font-family: "Oswald", Helvetica, Arial, sans-serif;
  font-size: 1.6rem;
  line-height: 1;
  text-transform: uppercase;
}

.account-dialog__close {
  width: 34px;
  height: 34px;
  border: 1px solid #3a342c;
  background: #111;
  color: #fff;
  font-family: "Oswald", Helvetica, Arial, sans-serif;
  font-weight: 700;
  cursor: pointer;
}

.account-dialog__close:hover,
.account-dialog__close:focus-visible {
  border-color: var(--gold);
  outline: none;
}

.auth-mode-toggle {
  display: grid;
  grid-template-columns: 1fr 1fr;
  height: 42px;
  border: 1px solid #3a342c;
  background: #111;
}

.auth-mode-toggle button {
  border: 0;
  border-right: 1px solid #3a342c;
  color: var(--text-main);
  background: transparent;
  font-family: "Oswald", Helvetica, Arial, sans-serif;
  font-weight: 700;
  text-transform: uppercase;
  cursor: pointer;
}

.auth-mode-toggle button:last-child {
  border-right: 0;
}

.auth-mode-toggle button:hover {
  color: #fff;
  background: rgba(197, 160, 89, 0.14);
}

.auth-mode-toggle button.is-active {
  color: #111;
  background: var(--gold);
}

.account-panel__fields {
  display: grid;
  gap: 10px;
}

.account-field {
  display: grid;
  gap: 6px;
  min-width: 0;
  color: var(--text-main);
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.account-field input {
  width: 100%;
  min-width: 0;
  height: 42px;
  border: 1px solid #3a342c;
  border-radius: 2px;
  color: var(--text-main);
  background: #111;
  padding: 0 12px;
}

.account-field input:hover,
.account-field input:focus-visible {
  border-color: var(--gold);
  outline: none;
  box-shadow: 0 0 0 1px rgba(197, 160, 89, 0.2), 0 0 14px rgba(197, 160, 89, 0.12);
}

.account-panel__actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

.account-panel__actions button {
  width: 100%;
  height: 42px;
  border: 1px solid #49361d;
  border-radius: 2px;
  color: #111;
  background: var(--gold);
  padding: 0 14px;
  font-family: "Oswald", Helvetica, Arial, sans-serif;
  font-weight: 700;
  text-transform: uppercase;
  cursor: pointer;
}

.account-panel__actions button:hover {
  transform: translateY(-1px);
  filter: brightness(1.08);
  box-shadow: 0 0 18px rgba(197, 160, 89, 0.16);
}

.account-panel__actions button[hidden] {
  display: none;
}

.account-panel.is-logged-in .auth-mode-toggle,
.account-panel.is-logged-in .account-panel__fields,
.account-panel.is-logged-in #accountSubmit {
  display: none;
}

.profile-section {
  display: grid;
  gap: 12px;
  padding-top: 4px;
}

.profile-section[hidden] {
  display: none;
}

.profile-preview {
  display: grid;
  grid-template-columns: 58px 1fr;
  gap: 12px;
  align-items: center;
  padding: 0;
  border: 0;
  background: transparent;
}

.profile-preview__avatar {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border: 1px solid #3a342c;
  background:
    linear-gradient(145deg, rgba(139, 0, 0, 0.82), rgba(197, 160, 89, 0.32)),
    #161616;
  background-size: cover;
  background-position: center;
  color: #fff;
  font-family: "Oswald", Helvetica, Arial, sans-serif;
  font-size: 1.4rem;
  font-weight: 700;
  overflow: hidden;
  background-repeat: no-repeat;
}

.profile-preview__avatar.has-image {
  background-color: #101010;
  border-color: var(--gold);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.profile-preview strong,
.profile-preview span {
  display: block;
}

.profile-preview strong {
  color: #fff;
  font-family: "Oswald", Helvetica, Arial, sans-serif;
  text-transform: uppercase;
}

.profile-preview span {
  margin-top: 3px;
  color: var(--text-muted);
  font-size: 0.78rem;
  line-height: 1.35;
}

.profile-file {
  display: grid;
  gap: 7px;
  color: var(--text-main);
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.profile-file input {
  width: 100%;
  color: var(--text-muted);
}

.profile-file input::file-selector-button {
  height: 36px;
  margin-right: 10px;
  border: 1px solid #49361d;
  border-radius: 2px;
  color: var(--text-main);
  background: #111;
  padding: 0 12px;
  font-family: "Oswald", Helvetica, Arial, sans-serif;
  font-weight: 700;
  text-transform: uppercase;
  cursor: pointer;
}

.profile-file input::file-selector-button:hover {
  border-color: var(--gold);
}

.profile-save {
  height: 42px;
  border: 1px solid #49361d;
  border-radius: 2px;
  color: #111;
  background: var(--gold);
  padding: 0 14px;
  font-family: "Oswald", Helvetica, Arial, sans-serif;
  font-weight: 700;
  text-transform: uppercase;
  cursor: pointer;
}

.profile-save:hover {
  transform: translateY(-1px);
  filter: brightness(1.08);
  box-shadow: 0 0 18px rgba(197, 160, 89, 0.16);
}

.party-section {
  display: grid;
  gap: 10px;
  padding-top: 12px;
  border-top: 1px solid #28241e;
}

.party-section[hidden] {
  display: none;
}

.party-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.party-header strong,
.party-header span {
  display: block;
}

.party-header strong {
  color: #fff;
  font-family: "Oswald", Helvetica, Arial, sans-serif;
  text-transform: uppercase;
}

.party-header span {
  margin-top: 3px;
  color: var(--text-muted);
  font-size: 0.78rem;
  line-height: 1.35;
}

.party-header button,
.party-join button,
.party-leave {
  height: 38px;
  border: 1px solid #49361d;
  border-radius: 2px;
  color: #111;
  background: var(--gold);
  padding: 0 12px;
  font-family: "Oswald", Helvetica, Arial, sans-serif;
  font-weight: 700;
  text-transform: uppercase;
  cursor: pointer;
}

.party-header button:hover,
.party-join button:hover,
.party-leave:hover {
  transform: translateY(-1px);
  filter: brightness(1.08);
}

.party-join {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.party-join input {
  min-width: 0;
  height: 38px;
  border: 1px solid #3a342c;
  border-radius: 2px;
  color: var(--text-main);
  background: #111;
  padding: 0 10px;
  text-transform: uppercase;
}

.party-members {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-height: 0;
}

.party-member-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  max-width: 100%;
  min-height: 30px;
  border: 1px solid #302b24;
  background: rgba(255, 255, 255, 0.025);
  color: var(--text-main);
  padding: 3px 8px 3px 3px;
  font-size: 0.75rem;
  font-weight: 700;
}

.party-member-chip__avatar,
.party-avatar {
  display: grid;
  place-items: center;
  overflow: hidden;
  background:
    linear-gradient(145deg, rgba(139, 0, 0, 0.82), rgba(197, 160, 89, 0.32)),
    #161616;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  color: #fff;
  font-family: "Oswald", Helvetica, Arial, sans-serif;
  font-weight: 700;
  line-height: 1;
}

.party-member-chip__avatar {
  width: 24px;
  height: 24px;
  border: 1px solid #49361d;
  font-size: 0.72rem;
}

.party-leave {
  width: 100%;
  color: var(--text-main);
  background: #111;
}

#accountLogout {
  color: var(--text-main);
  background: #111;
}

.account-status {
  margin: -2px 0 0;
  color: var(--text-muted);
  font-size: 0.78rem;
  line-height: 1.35;
}

@keyframes modalEnter {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.98);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.account-status.is-ok {
  color: #fff;
}

.account-status.is-error {
  color: #ffb4a8;
}

@keyframes filtersReveal {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.control-group {
  display: grid;
  gap: 6px;
  width: 100%;
  flex: 0 1 190px;
  min-width: 190px;
}

.control-label,
label,
.toggle {
  color: var(--text-main);
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

select {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  height: 42px;
  border: 1px solid #3a342c;
  border-radius: 2px;
  color: var(--text-main);
  background: #111;
  padding: 0 34px 0 12px;
}

select:hover,
select:focus-visible {
  border-color: var(--gold);
  box-shadow: 0 0 0 1px rgba(197, 160, 89, 0.2), 0 0 14px rgba(197, 160, 89, 0.12);
}

.view-control {
  flex-basis: 310px;
  min-width: 310px;
}

.view-toggle {
  display: grid;
  grid-template-columns: 1fr 1fr;
  height: 42px;
  border: 1px solid #3a342c;
  background: #111;
}

.view-toggle__button {
  border: 0;
  border-right: 1px solid #3a342c;
  color: var(--text-main);
  background: transparent;
  padding: 0 12px;
  font-family: "Oswald", Helvetica, Arial, sans-serif;
  font-weight: 700;
  text-transform: uppercase;
  cursor: pointer;
}

.view-toggle__button:last-child {
  border-right: 0;
}

.view-toggle__button.is-active {
  color: #111;
  background: var(--gold);
}

.view-toggle__button:hover {
  color: #fff;
  background: rgba(197, 160, 89, 0.14);
}

.view-toggle__button.is-active:hover {
  color: #111;
  filter: brightness(1.08);
}

.toggle {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 0 12px;
  border: 1px solid #3a342c;
  background: #111;
  cursor: pointer;
}

.toggle:hover {
  transform: translateY(-1px);
  border-color: var(--gold);
  box-shadow: 0 0 14px rgba(197, 160, 89, 0.12);
}

.toggle input {
  width: 18px;
  height: 18px;
  accent-color: var(--gold);
}

.ghost-button {
  height: 42px;
  border: 1px solid #49361d;
  border-radius: 2px;
  color: var(--text-main);
  background: rgba(197, 160, 89, 0.08);
  padding: 0 14px;
  font-weight: 700;
  cursor: pointer;
}

.ghost-button:hover {
  transform: translateY(-1px);
  border-color: var(--gold);
  background: rgba(197, 160, 89, 0.16);
  box-shadow: 0 0 18px rgba(197, 160, 89, 0.14);
}

.layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 18px;
}

.timetable-panel,
.personal-panel {
  min-width: 0;
  border: 1px solid var(--line);
  background: rgba(18, 18, 18, 0.94);
  box-shadow: var(--shadow);
}

.section-title {
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  color: #fff;
  font-family: "Oswald", Helvetica, Arial, sans-serif;
  font-weight: 700;
  text-transform: uppercase;
}

.timeline-scroll {
  overflow-x: auto;
  overflow-y: hidden;
  max-height: none;
  min-height: 480px;
  overscroll-behavior-x: contain;
  touch-action: pan-x pan-y;
}

input[type="search"] {
  width: 100%;
  min-width: 0;
  height: 42px;
  border: 1px solid #3a342c;
  border-radius: 2px;
  color: var(--text-main);
  background: #111;
  padding: 0 12px;
  font-family: "Montserrat", Helvetica, Arial, sans-serif;
  font-size: 0.9rem;
  outline: none;
}

input[type="search"]::placeholder {
  color: var(--text-muted);
}

input[type="search"]:hover,
input[type="search"]:focus-visible {
  border-color: var(--gold);
  box-shadow: 0 0 0 1px rgba(197, 160, 89, 0.2), 0 0 14px rgba(197, 160, 89, 0.12);
}

.timeline {
  display: grid;
  min-width: max-content;
  position: relative;
}

.timeline--search {
  display: block;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  padding: 12px;
  box-sizing: border-box;
  overflow: hidden;
}

.search-results {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
  width: 100%;
  min-width: 0;
}

.timeline--search .search-result-card {
  position: relative;
  inset: auto;
  left: auto;
  right: auto;
  top: auto;
  width: min(100%, 860px);
  max-width: 100%;
  min-height: 108px;
  margin: 0 auto;
  padding: 13px 42px 13px 14px;
  border-color: var(--stage-color);
  border-left-width: 4px;
  box-sizing: border-box;
}

.search-result-card__content {
  display: grid;
  gap: 5px;
}

.search-result-card__stage {
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
}

.timeline--search .search-result-card.is-selected .search-result-card__stage {
  color: rgba(255, 255, 255, 0.9);
}

.search-empty {
  min-height: 420px;
}

.timeline.is-changing,
.personal-list.is-changing {
  opacity: 0;
  transform: translateY(10px) scale(0.992);
  transition: opacity 150ms ease, transform 150ms ease;
}

.timeline.is-entering,
.personal-list.is-entering {
  animation: contentEnter 280ms ease both;
}

@keyframes contentEnter {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.992);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.timeline--vertical {
  --hour-height: 118px;
  grid-template-columns: 76px repeat(var(--stage-count), 260px);
}

.time-rail,
.stage-lane {
  position: relative;
  min-height: var(--timeline-height);
  background:
    repeating-linear-gradient(
      to bottom,
      rgba(255, 255, 255, 0.035) 0,
      rgba(255, 255, 255, 0.035) 1px,
      transparent 1px,
      transparent calc(var(--hour-height) / 2)
    );
}

.time-rail {
  position: sticky;
  left: 0;
  z-index: 8;
  background-color: #0d0d0d;
  border-right: 1px solid var(--line);
}

.time-label {
  position: absolute;
  left: 12px;
  transform: translateY(-50%);
  color: #fff;
  font-family: "Oswald", Helvetica, Arial, sans-serif;
  font-weight: 700;
  font-size: 0.82rem;
}

.current-time-marker {
  position: absolute;
  z-index: 14;
  pointer-events: none;
}

.current-time-marker::before {
  content: "";
  position: absolute;
  background: #e11919;
  box-shadow: 0 0 12px rgba(225, 25, 25, 0.72);
}

.current-time-marker span {
  position: absolute;
  color: #fff;
  background: #e11919;
  border: 1px solid rgba(255, 255, 255, 0.28);
  font-family: "Oswald", Helvetica, Arial, sans-serif;
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 1;
  padding: 4px 6px;
  white-space: nowrap;
}

.current-time-marker--vertical {
  left: 0;
  width: calc(76px + (var(--stage-count) * 260px));
  height: 0;
}

.current-time-marker--vertical::before {
  left: 0;
  right: 0;
  top: -1px;
  height: 2px;
}

.current-time-marker--vertical span {
  left: 8px;
  top: -12px;
}

.timeline--horizontal {
  --hour-width: 150px;
  grid-template-columns: 180px var(--timeline-width);
}

.horizontal-corner,
.horizontal-time-rail {
  position: sticky;
  top: 0;
  z-index: 9;
  height: 48px;
  background-color: #0d0d0d;
  border-bottom: 1px solid var(--line);
}

.horizontal-corner {
  left: 0;
  z-index: 12;
  display: grid;
  place-items: center start;
  padding-left: 12px;
  color: #fff;
  font-family: "Oswald", Helvetica, Arial, sans-serif;
  font-weight: 700;
  text-transform: uppercase;
  border-right: 1px solid var(--line);
}

.horizontal-time-rail {
  position: sticky;
  top: 0;
  min-width: var(--timeline-width);
  background:
    repeating-linear-gradient(
      to right,
      rgba(255, 255, 255, 0.055) 0,
      rgba(255, 255, 255, 0.055) 1px,
      transparent 1px,
      transparent calc(var(--hour-width) / 2)
    ),
    #0d0d0d;
}

.horizontal-time-label {
  position: absolute;
  top: 14px;
  transform: translateX(-50%);
  color: #fff;
  font-family: "Oswald", Helvetica, Arial, sans-serif;
  font-weight: 700;
  font-size: 0.82rem;
}

.horizontal-time-label.is-first {
  transform: translateX(0);
  padding-left: 10px;
}

.current-time-marker--horizontal {
  top: 0;
  height: calc(48px + (var(--stage-count) * 116px));
  width: 0;
}

.current-time-marker--horizontal::before {
  top: 0;
  bottom: 0;
  left: -1px;
  width: 2px;
}

.current-time-marker--horizontal span {
  top: 10px;
  left: 7px;
}

.horizontal-stage-label {
  position: sticky;
  left: 0;
  z-index: 7;
  height: 116px;
  display: grid;
  align-content: center;
  gap: 3px;
  padding: 12px;
  color: #fff;
  background: var(--stage-color);
  border-right: 1px solid rgba(0, 0, 0, 0.55);
  border-bottom: 1px solid var(--line);
  box-shadow: inset -18px 0 24px rgba(0, 0, 0, 0.24);
  text-transform: uppercase;
}

.horizontal-stage-label strong {
  font-family: "Oswald", Helvetica, Arial, sans-serif;
  font-size: 1rem;
}

.horizontal-stage-label span {
  color: rgba(255, 255, 255, 0.74);
  font-size: 0.68rem;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.horizontal-stage-row {
  position: relative;
  height: 116px;
  min-width: var(--timeline-width);
  border-bottom: 1px solid var(--line);
  background:
    repeating-linear-gradient(
      to right,
      rgba(255, 255, 255, 0.035) 0,
      rgba(255, 255, 255, 0.035) 1px,
      transparent 1px,
      transparent calc(var(--hour-width) / 2)
    );
}

.stage-lane {
  border-right: 1px solid var(--line);
  padding-top: 0;
}

.timeline.is-entering .horizontal-stage-label,
.timeline.is-entering .horizontal-stage-row {
  animation: rowEnter 280ms ease both;
  animation-delay: calc(min(var(--lane-index, 0), 8) * 22ms);
}

.timeline.is-entering .stage-lane {
  animation: laneEnter 280ms ease both;
  animation-delay: calc(min(var(--lane-index, 0), 8) * 22ms);
}

@keyframes laneEnter {
  from {
    opacity: 0;
    transform: translateY(14px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes rowEnter {
  from {
    opacity: 0;
    transform: translateX(18px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.stage-heading {
  position: relative;
  top: 0;
  z-index: 6;
  height: 58px;
  display: grid;
  align-content: center;
  gap: 2px;
  padding: 8px 10px;
  color: #fff;
  border-bottom: 1px solid rgba(0, 0, 0, 0.55);
  background: var(--stage-color);
  box-shadow: inset 0 -18px 24px rgba(0, 0, 0, 0.28);
  text-transform: uppercase;
}

.stage-heading strong {
  font-family: "Oswald", Helvetica, Arial, sans-serif;
  font-size: 1rem;
}

.stage-heading span {
  color: rgba(255, 255, 255, 0.74);
  font-size: 0.68rem;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.set-card {
  position: absolute;
  left: 10px;
  right: 10px;
  min-height: 44px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  align-content: start;
  padding: 10px;
  border: 1px solid #2e2e2e;
  border-left: 4px solid var(--stage-color);
  background: rgba(22, 22, 22, 0.96);
  box-shadow: inset 0 0 18px rgba(0, 0, 0, 0.45);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.set-card:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

.set-card:focus:not(:focus-visible) {
  outline: none;
}

.set-card.is-selected {
  background:
    linear-gradient(0deg, rgba(0, 0, 0, 0.22), rgba(0, 0, 0, 0.22)),
    var(--stage-color);
  color: #fff;
}

.set-card.is-selected .set-time {
  color: #fff;
}

.set-card.is-important {
  border-color: rgba(242, 214, 141, 0.92);
  box-shadow: 0 0 0 1px rgba(197, 160, 89, 0.32), 0 0 22px rgba(197, 160, 89, 0.24);
}

.set-card.is-clicked {
  animation: setClick 220ms ease both;
}

.party-avatar-stack {
  position: absolute;
  right: 8px;
  bottom: 8px;
  display: flex;
  flex-direction: row-reverse;
  align-items: center;
  z-index: 3;
}

.party-avatar {
  width: 22px;
  height: 22px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  font-size: 0.66rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.55);
}

.party-avatar + .party-avatar {
  margin-right: -6px;
}

.party-avatar-count {
  min-width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  margin-right: -6px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  background: #111;
  color: #fff;
  font-family: "Oswald", Helvetica, Arial, sans-serif;
  font-size: 0.66rem;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.55);
}

@keyframes setClick {
  0% {
    transform: scale(1);
  }

  45% {
    transform: scale(1.018);
  }

  100% {
    transform: scale(1);
  }
}

.favorite-star {
  position: absolute;
  top: 7px;
  right: 9px;
  z-index: 2;
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  border: 0;
  color: rgba(232, 224, 208, 0.58);
  background: transparent;
  line-height: 1;
  font-family: "Oswald", Helvetica, Arial, sans-serif;
  font-size: 1.05rem;
  font-weight: 700;
  cursor: pointer;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.72);
  -webkit-tap-highlight-color: transparent;
}

.favorite-star:focus-visible {
  transform: scale(1.12) rotate(12deg);
  color: #fff;
  background: transparent;
  box-shadow: none;
  outline: none;
}

.favorite-star.is-active {
  color: var(--gold);
  background: transparent;
  text-shadow: 0 0 12px rgba(197, 160, 89, 0.72);
}

.favorite-star.is-clicked {
  animation: starClick 220ms ease both;
}

@media (hover: hover) and (pointer: fine) {
  .set-card:hover {
    transform: translateY(-2px);
    border-color: rgba(242, 214, 141, 0.62);
    background: rgba(28, 28, 28, 0.98);
    box-shadow: 0 10px 22px rgba(0, 0, 0, 0.34), inset 0 0 18px rgba(0, 0, 0, 0.42);
  }

  .set-card.is-selected:hover {
    background:
      linear-gradient(0deg, rgba(0, 0, 0, 0.12), rgba(0, 0, 0, 0.12)),
      var(--stage-color);
  }

  .favorite-star:hover {
    transform: scale(1.12) rotate(12deg);
    color: #fff;
    background: transparent;
    box-shadow: none;
    outline: none;
  }
}

@media (hover: none) {
  .set-card:hover {
    transform: none;
  }

  .set-card.is-selected:hover {
    background:
      linear-gradient(0deg, rgba(0, 0, 0, 0.22), rgba(0, 0, 0, 0.22)),
      var(--stage-color);
  }

  .favorite-star:hover {
    transform: none;
  }
}

@keyframes starClick {
  0% {
    transform: scale(1) rotate(0);
  }

  45% {
    transform: scale(1.28) rotate(18deg);
  }

  100% {
    transform: scale(1) rotate(0);
  }
}

.set-time {
  color: #fff;
  font-family: "Oswald", Helvetica, Arial, sans-serif;
  font-size: 0.78rem;
  font-weight: 700;
}

.set-artist {
  margin-top: 3px;
  font-weight: 700;
  line-height: 1.25;
}

.timeline--horizontal .horizontal-set-card {
  top: 10px;
  right: auto;
  height: 96px;
  min-height: 0;
  overflow: hidden;
}

.timeline--horizontal .horizontal-set-card .set-time {
  white-space: nowrap;
  padding-right: 24px;
}

.timeline--horizontal .horizontal-set-card .set-artist {
  display: -webkit-box;
  max-height: 2.5em;
  overflow: hidden;
  font-size: 0.92rem;
  line-height: 1.25;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.personal-panel {
  align-self: start;
  position: sticky;
  top: 92px;
  max-height: calc(100vh - 114px);
  overflow: hidden;
}

.personal-list {
  display: grid;
  gap: 10px;
  padding: 12px;
  overflow: auto;
  max-height: calc(100vh - 170px);
}

.personal-item {
  position: relative;
  width: 100%;
  border: 1px solid #322b20;
  border-left: 4px solid var(--stage-color);
  background: var(--card-bg);
  color: var(--text-main);
  padding: 10px 28px 10px 10px;
  text-align: left;
}

.personal-item.is-important {
  border-color: rgba(242, 214, 141, 0.92);
  box-shadow: 0 0 0 1px rgba(197, 160, 89, 0.32), 0 0 18px rgba(197, 160, 89, 0.18);
}

.live-dot {
  position: absolute;
  top: 50%;
  right: 10px;
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: #e11919;
  box-shadow: 0 0 0 0 rgba(225, 25, 25, 0.72), 0 0 12px rgba(225, 25, 25, 0.74);
  transform: translateY(-50%);
  animation: livePulse 1.15s ease-out infinite;
}

@keyframes livePulse {
  0% {
    box-shadow: 0 0 0 0 rgba(225, 25, 25, 0.72), 0 0 12px rgba(225, 25, 25, 0.74);
  }

  70% {
    box-shadow: 0 0 0 8px rgba(225, 25, 25, 0), 0 0 12px rgba(225, 25, 25, 0.74);
  }

  100% {
    box-shadow: 0 0 0 0 rgba(225, 25, 25, 0), 0 0 12px rgba(225, 25, 25, 0.74);
  }
}

.personal-item strong,
.personal-item span {
  display: block;
}

.personal-item strong {
  margin: 2px 0 4px;
}

.personal-item span {
  color: var(--text-muted);
  font-size: 0.78rem;
  line-height: 1.35;
}

.empty-state,
.error-state {
  display: grid;
  gap: 7px;
  padding: 18px;
  color: var(--text-muted);
  line-height: 1.45;
}

.empty-state strong,
.error-state strong {
  color: #fff;
}

@media (max-width: 980px) {
  .hero {
    align-items: flex-start;
    flex-direction: column;
  }

  .layout {
    grid-template-columns: 1fr;
  }

  .timetable-panel {
    order: 1;
  }

  .personal-panel {
    order: 2;
    position: static;
    max-height: none;
  }

  .personal-list {
    max-height: none;
  }
}

@media (max-width: 680px) {
  .app-shell {
    width: min(100% - 12px, 1500px);
    padding-top: 202px;
  }

  .hero {
    top: 8px;
    width: min(100% - 12px, 1500px);
    min-height: 132px;
    padding: 16px;
  }

  body.is-header-compact .hero {
    min-height: 56px;
    padding: 8px 14px;
  }

  body.is-header-compact .hero__compact-title {
    padding: 0 14px;
  }

  h1 {
    font-size: clamp(2.15rem, 16vw, 3.4rem);
  }

  .subtitle {
    font-size: 0.92rem;
  }

  .controls {
    position: static;
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 12px;
  }

  .filters-primary {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 10px;
  }

  .filters-advanced {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .hero-account {
    top: 10px;
    right: 10px;
  }

  .hero-account__text {
    display: none;
  }

  .account-dialog {
    align-items: end;
    padding: 10px;
  }

  .account-panel {
    width: 100%;
    padding: 16px;
  }

  .control-group,
  .toggle,
  .view-control,
  .ghost-button {
    width: 100%;
    min-width: 0;
  }

  .toggle {
    justify-content: center;
    padding: 0 10px;
    font-size: 0.68rem;
  }

  select,
  .toggle,
  .ghost-button,
  .view-toggle {
    width: 100%;
    min-height: 44px;
  }

  .layout {
    gap: 12px;
  }

  .timetable-panel,
  .personal-panel {
    width: 100%;
    overflow: hidden;
  }

  .section-title {
    padding: 12px;
    font-size: 0.96rem;
  }

  .timeline-scroll {
    width: 100%;
    min-height: 360px;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
    touch-action: pan-x pan-y;
  }

  .timeline {
    grid-template-columns: 58px repeat(var(--stage-count), 210px);
  }

  .current-time-marker--vertical {
    width: calc(58px + (var(--stage-count) * 210px));
  }

  .timeline--horizontal {
    grid-template-columns: 54px var(--timeline-width);
  }

  .horizontal-stage-label,
  .horizontal-corner {
    width: 54px;
  }

  .horizontal-corner {
    color: transparent;
    padding-left: 0;
  }

  .horizontal-stage-label {
    justify-items: center;
    align-content: center;
    padding: 7px 4px;
  }

  .horizontal-stage-label strong {
    writing-mode: vertical-rl;
    text-orientation: mixed;
    transform: rotate(180deg);
    font-size: 0.8rem;
    line-height: 1;
    max-height: 88px;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .horizontal-stage-label span {
    display: none;
  }

  .stage-heading strong {
    font-size: 0.82rem;
  }

  .set-card {
    left: 7px;
    right: 7px;
    padding: 9px;
  }

  .search-results {
    grid-template-columns: 1fr;
  }

  .timeline--search .search-result-card {
    left: auto;
    right: auto;
    min-height: 104px;
    padding: 12px 40px 12px 12px;
  }

  .timeline--horizontal .horizontal-set-card {
    height: 92px;
  }

  .set-artist {
    font-size: 0.95rem;
  }

  .personal-list {
    padding: 10px;
  }
}

@media (max-width: 430px) and (orientation: portrait) {
  .view-control {
    min-width: 0;
  }

  .filters-primary {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  }

  .toggle {
    gap: 7px;
    padding: 0 8px;
    font-size: 0.62rem;
  }

  .view-toggle__button {
    padding: 0 8px;
    font-size: 0.78rem;
  }

  .timeline--horizontal {
    grid-template-columns: 46px var(--timeline-width);
  }

  .horizontal-stage-label,
  .horizontal-corner {
    width: 46px;
  }

  .horizontal-stage-label {
    padding: 6px 3px;
  }

  .horizontal-stage-label strong {
    font-size: 0.74rem;
  }
}
