.event-card__link {
  margin-top: 18px;
  color: var(--red);
  font-size: 14px;
  font-weight: 700;
}

.event-page {
  min-height: 100vh;
  background: var(--paper);
  overflow-x: hidden;
}

.event-hero {
  padding: 72px max(24px, calc((100vw - var(--max)) / 2));
  background: var(--ink);
  color: var(--white);
}

.event-hero__back {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin-bottom: 48px;
  color: #c5c7cc;
  font-size: 14px;
  font-weight: 700;
}

.event-hero__back:hover {
  color: var(--white);
}

.event-hero h1 {
  max-width: 960px;
  margin: 18px 0 28px;
  font-size: clamp(42px, 6vw, 78px);
  line-height: 1.08;
  letter-spacing: -.045em;
}

.event-hero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.event-hero__meta span {
  padding: 10px 14px;
  border: 1px solid #555a64;
  color: #d9dbe0;
  font-size: 14px;
}

.event-detail {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(300px, .65fr);
  gap: 24px;
  max-width: var(--max);
  margin: 0 auto;
  padding: 64px 24px 100px;
}

.event-detail__main,
.event-detail__side {
  display: grid;
  align-content: start;
  gap: 24px;
}

.event-panel {
  padding: 32px;
  background: var(--white);
  border-top: 4px solid var(--ink);
}

.event-panel--price {
  border-top-color: var(--red);
}

.event-panel h2 {
  margin: 0 0 22px;
  font-size: 24px;
}

.event-panel h3 {
  margin: 26px 0 10px;
  font-size: 17px;
}

.event-panel p,
.event-panel li {
  color: #50545c;
  line-height: 1.8;
}

.event-panel ul {
  margin: 0;
  padding-left: 20px;
}

.event-price {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.event-price strong {
  color: var(--red);
  font: 900 28px/1 Arial;
}

.event-notice {
  white-space: pre-line;
}

.notice-dialog-trigger {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin-top: 22px;
  padding: 0;
  border: 0;
  border-bottom: 1px solid currentColor;
  background: transparent;
  color: var(--red-dark);
  font-family: inherit;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.4;
  cursor: pointer;
}

.notice-dialog-trigger:hover {
  color: var(--red);
}

.notice-dialog-trigger:focus-visible,
.safety-notice-dialog button:focus-visible,
.safety-notice-dialog__body:focus-visible {
  outline: 3px solid rgba(24,103,192,.34);
  outline-offset: 3px;
}

.notice-dialog-trigger--form {
  justify-self: start;
  margin-top: 2px;
}

body.has-modal {
  overflow: hidden;
}

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

.safety-notice-dialog {
  position: fixed;
  z-index: 1000;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 20px;
}

.safety-notice-dialog__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15,17,23,.68);
}

.safety-notice-dialog__panel {
  position: relative;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  width: min(720px, 100%);
  max-height: min(86vh, 780px);
  background: var(--white);
  box-shadow: 0 28px 90px rgba(13,16,25,.34);
}

.safety-notice-dialog__head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 20px;
  padding: 26px 28px 20px;
  border-top: 4px solid var(--red);
  border-bottom: 1px solid var(--line);
}

.safety-notice-dialog__head .kicker {
  margin: 0 0 5px;
  color: var(--red-dark);
}

.safety-notice-dialog__head h2 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(22px, 4vw, 30px);
}

.safety-notice-dialog__close {
  min-width: 56px;
  min-height: 44px;
  padding: 0 10px;
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink);
  font-family: inherit;
  font-size: 14px;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
}

.safety-notice-dialog__body {
  overflow-y: auto;
  padding: 26px 28px;
  color: #41454d;
  font-size: 15px;
  line-height: 1.9;
  white-space: pre-wrap;
}

.safety-notice-dialog__foot {
  display: flex;
  justify-content: flex-end;
  padding: 16px 28px calc(16px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  background: var(--white);
}

.safety-notice-dialog__foot .button {
  min-width: 150px;
}

.event-status {
  margin-top: 20px;
  padding: 14px 16px;
  background: #f7eee9;
  color: #8a271f;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.6;
}

.event-contact a {
  color: var(--red-dark);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.event-error {
  grid-column: 1 / -1;
  padding: 48px;
  background: var(--white);
  color: var(--muted);
}

.h5-form { display: grid; gap: 14px; }
.h5-form label { display: grid; gap: 6px; color: #50545c; font-size: 14px; font-weight: 700; }
.h5-form input, .h5-form select { width: 100%; min-height: 44px; padding: 0 12px; border: 1px solid var(--line); background: var(--paper); color: var(--ink); font: inherit; }
.h5-form input:focus, .h5-form select:focus { outline: 3px solid rgba(24,103,192,.24); border-color: var(--focus); }
.h5-form__check { display: flex !important; grid-template-columns: auto 1fr; align-items: flex-start; flex-direction: row; gap: 8px !important; font-weight: 500 !important; line-height: 1.6; }
.h5-form__check input { width: 18px; min-height: 18px; margin-top: 2px; }
.h5-form__error { margin: 0; padding: 10px 12px; background: #f7eee9; color: #8a271f; font-weight: 700; }

@media (max-width: 800px) {
  .event-hero {
    padding-top: 48px;
  }

  .event-hero__back {
    margin-bottom: 32px;
  }

  .event-detail {
    grid-template-columns: 1fr;
    padding: 36px 20px 72px;
  }

  .event-panel {
    padding: 24px;
  }

  .event-hero h1 {
    overflow-wrap: anywhere;
    word-break: break-all;
    max-width: 100%;
  }

  .event-hero__meta span {
    max-width: 100%;
    overflow-wrap: anywhere;
  }
}

@media (max-width: 560px) {
  .event-page .header-cta {
    display: none;
  }

  .safety-notice-dialog {
    align-items: end;
    padding: 0;
  }

  .safety-notice-dialog__panel {
    width: 100%;
    max-height: 88vh;
  }

  .safety-notice-dialog__head,
  .safety-notice-dialog__body {
    padding-right: 20px;
    padding-left: 20px;
  }

  .safety-notice-dialog__foot {
    padding-right: 20px;
    padding-left: 20px;
  }

  .safety-notice-dialog__foot .button {
    width: 100%;
  }
}
