    :root {
      --bg: #f6f7fc;
      --surface: #ffffff;
      --ink: #081431;
      --muted: #4f5a7b;
      --line: #d9dff1;
      --brand: #081431;
      --accent: #d5143c;
      --radius: 14px;
      --shadow: 0 14px 28px rgba(8, 20, 49, 0.1);
      --soft-accent: #fde7ec;
      --soft-accent-strong: #f7c4cf;
      --accent-strong: #b10624;
    }

    * { box-sizing: border-box; }

    body {
      margin: 0;
      font-family: 'Space Grotesk', sans-serif;
      color: var(--ink);
      background: radial-gradient(circle at 10% 0%, rgba(8, 20, 49, 0.07), transparent 35%),
                  radial-gradient(circle at 85% 15%, rgba(213, 20, 60, 0.08), transparent 30%),
                  var(--bg);
      min-height: 100vh;
      padding: 0.9rem;
    }

    .offline-status {
      position: fixed;
      z-index: 10000;
      bottom: calc(0.65rem + env(safe-area-inset-bottom, 0px));
      left: 50%;
      width: min(calc(100% - 1.3rem), 620px);
      transform: translateX(-50%);
      border: 1px solid #c58a00;
      border-radius: 12px;
      padding: 0.55rem 0.8rem;
      background: #fff4c7;
      color: #5f4100;
      box-shadow: var(--shadow);
      text-align: center;
      font-size: 0.88rem;
      font-weight: 600;
    }

    .offline-status[hidden] {
      display: none;
    }

    .public-pass-page {
      min-height: calc(100vh - 1.8rem);
      display: grid;
      place-items: center;
    }

    .public-pass-wrap,
    .public-pass-error {
      width: min(100%, 620px);
    }

    .public-pass-launch {
      display: grid;
      justify-items: center;
      gap: 0.7rem;
      border: 1px solid var(--line);
      border-radius: 18px;
      padding: 1.35rem;
      background: var(--surface);
      box-shadow: var(--shadow);
      text-align: center;
    }

    .panel {
      max-width: 1100px;
      margin: 0 auto;
      background: var(--surface);
      border: 1px solid var(--line);
      border-radius: 18px;
      box-shadow: var(--shadow);
      padding: 1rem;
    }

    .page-route {
      min-width: 0;
    }

    h1, h2, h3 {
      margin: 0;
      font-weight: 700;
    }

    h1[tabindex="-1"]:focus,
    h2[tabindex="-1"]:focus,
    h3[tabindex="-1"]:focus {
      outline: none;
    }

    p { margin: 0; }

    .muted {
      color: var(--muted);
      font-size: 0.92rem;
    }

    .top {
      display: flex;
      justify-content: space-between;
      align-items: center;
      gap: 0.7rem;
      flex-wrap: wrap;
      margin-bottom: 0.8rem;
    }

    .btn {
      border: 1px solid transparent;
      border-radius: 10px;
      padding: 0.55rem 0.85rem;
      background: var(--brand);
      color: #fff;
      font-family: inherit;
      font-size: 0.95rem;
      font-weight: 600;
      line-height: 1.15;
      cursor: pointer;
      text-decoration: none;
    }

    .btn:disabled {
      cursor: not-allowed;
      opacity: 0.65;
    }

    .btn.active {
      outline: 2px solid var(--accent);
      outline-offset: 2px;
    }

    .btn.subtle {
      background: #eef1fb;
      color: var(--ink);
    }

    .grid {
      display: grid;
      gap: 0.65rem;
    }

    .row {
      border: 1px solid var(--line);
      border-radius: 12px;
      padding: 0.7rem;
      background: #fff;
      display: grid;
      gap: 0.4rem;
    }

    .row.is-today {
      border-color: var(--accent);
      background: var(--soft-accent);
      box-shadow: inset 0 0 0 1px var(--soft-accent-strong);
    }

    .row.is-past {
      background: #f1f3f8;
      border-color: #d3d9e8;
      color: #66708c;
    }

    .row.is-past strong,
    .row.is-past .muted {
      color: #66708c;
    }

    .calendar-list-separator {
      position: relative;
      text-align: center;
      margin: 0.15rem 0;
      color: #a7122e;
      font-size: 0.8rem;
      font-weight: 700;
      letter-spacing: 0.03em;
      text-transform: uppercase;
    }

    .calendar-list-separator::before {
      content: '';
      position: absolute;
      left: 0;
      right: 0;
      top: 50%;
      border-top: 2px solid #d3153d;
      z-index: 0;
    }

    .calendar-list-separator span {
      position: relative;
      z-index: 1;
      display: inline-block;
      padding: 0 0.5rem;
      background: var(--bg);
    }

    .row-head {
      display: flex;
      justify-content: space-between;
      align-items: flex-start;
      gap: 0.6rem;
      flex-wrap: wrap;
    }

    .notification-menu {
      position: relative;
      display: inline-flex;
    }

    .notification-bell {
      position: relative;
      display: inline-grid;
      place-items: center;
      width: 2.35rem;
      height: 2.35rem;
      border: 1px solid transparent;
      border-radius: 10px;
      background: #eef1fb;
      color: var(--ink);
      cursor: pointer;
    }

    .notification-bell svg {
      width: 1.18rem;
      height: 1.18rem;
      fill: none;
      stroke: currentColor;
      stroke-width: 2;
      stroke-linecap: round;
      stroke-linejoin: round;
    }

    .notification-badge {
      position: absolute;
      top: -0.38rem;
      right: -0.34rem;
      min-width: 1.25rem;
      height: 1.25rem;
      display: inline-grid;
      place-items: center;
      border: 2px solid var(--surface);
      border-radius: 999px;
      padding: 0 0.24rem;
      background: var(--accent);
      color: #fff;
      font-size: 0.68rem;
      font-weight: 700;
      line-height: 1;
    }

    .notification-popover {
      position: absolute;
      z-index: 40;
      top: calc(100% + 0.45rem);
      right: 0;
      width: min(380px, calc(100vw - 2rem));
      max-height: min(520px, calc(100vh - 7rem));
      overflow: auto;
      border: 1px solid #b9c6e4;
      border-radius: 12px;
      padding: 0.75rem;
      background: #f8fbff;
      box-shadow: var(--shadow);
    }

    .notification-popover[hidden] {
      display: none;
    }

    .notification-popover-head {
      display: flex;
      justify-content: space-between;
      gap: 0.7rem;
      align-items: flex-start;
      margin-bottom: 0.65rem;
    }

    .notification-popover-head > div {
      display: grid;
      gap: 0.12rem;
      min-width: 0;
    }

    .notification-list {
      display: grid;
      gap: 0.55rem;
    }

    .notification-empty {
      border: 1px dashed var(--line);
      border-radius: 10px;
      padding: 0.75rem;
      background: #fff;
    }

    .notification-row {
      display: flex;
      justify-content: space-between;
      align-items: flex-start;
      gap: 0.8rem;
      border: 1px solid var(--line);
      border-radius: 10px;
      padding: 0.65rem;
      background: #fff;
      color: inherit;
      text-decoration: none;
    }

    .notification-row.is-unread {
      border-color: var(--accent);
      background: var(--soft-accent);
      box-shadow: inset 3px 0 0 var(--accent);
    }

    .notification-row.is-read {
      background: #fff;
      color: #39435e;
    }

    .notification-row > span {
      display: grid;
      gap: 0.15rem;
      min-width: 0;
    }

    .notification-row time {
      flex: 0 0 auto;
      white-space: nowrap;
    }

    .notification-clear-button,
    .notification-push-button {
      flex: 0 0 auto;
      border: 1px solid #b9c6e4;
      border-radius: 8px;
      padding: 0.48rem 0.68rem;
      background: #fff;
      color: var(--ink);
      font: inherit;
      font-size: 0.82rem;
      font-weight: 700;
      cursor: pointer;
    }

    .notification-clear-button:disabled,
    .notification-push-button:disabled {
      cursor: not-allowed;
      opacity: 0.65;
    }

    .notification-push {
      display: flex;
      justify-content: space-between;
      align-items: center;
      gap: 0.75rem;
      margin-top: 0.65rem;
      border-top: 1px solid var(--line);
      padding-top: 0.7rem;
    }

    .notification-push > div {
      display: grid;
      gap: 0.12rem;
      min-width: 0;
    }

    .push-prompt {
      width: min(calc(100vw - 1.4rem), 440px);
      max-width: none;
      border: 0;
      padding: 0;
      background: transparent;
      color: var(--ink);
    }

    .push-prompt::backdrop {
      background: rgba(4, 9, 25, 0.5);
      backdrop-filter: blur(3px);
    }

    .push-prompt-card {
      position: relative;
      display: grid;
      gap: 0.85rem;
      border: 1px solid #b9c6e4;
      border-radius: 16px;
      padding: 1rem;
      background: #fff;
      box-shadow: 0 24px 56px rgba(8, 20, 49, 0.22);
    }

    .push-prompt-close {
      position: absolute;
      top: 0.65rem;
      right: 0.65rem;
      display: inline-grid;
      place-items: center;
      width: 2rem;
      height: 2rem;
      border: 1px solid transparent;
      border-radius: 9px;
      background: #eef1fb;
      color: var(--ink);
      cursor: pointer;
    }

    .push-prompt-close svg,
    .push-prompt-icon svg {
      fill: none;
      stroke: currentColor;
      stroke-width: 2;
      stroke-linecap: round;
      stroke-linejoin: round;
    }

    .push-prompt-close svg {
      width: 1rem;
      height: 1rem;
    }

    .push-prompt-icon {
      display: inline-grid;
      place-items: center;
      width: 2.65rem;
      height: 2.65rem;
      border-radius: 12px;
      background: var(--soft-accent);
      color: var(--accent-strong);
    }

    .push-prompt-icon svg {
      width: 1.35rem;
      height: 1.35rem;
    }

    .push-prompt-copy {
      display: grid;
      gap: 0.28rem;
      padding-right: 2.3rem;
    }

    .push-prompt-copy h3 {
      font-size: 1.15rem;
      line-height: 1.2;
    }

    .push-prompt-copy p {
      color: var(--muted);
      font-size: 0.94rem;
      line-height: 1.42;
    }

    .push-prompt-error {
      color: var(--accent-strong);
      font-weight: 600;
    }

    .push-prompt-actions {
      display: flex;
      justify-content: flex-end;
      gap: 0.55rem;
      flex-wrap: wrap;
    }

    .pass-popup-actions {
      display: flex;
      gap: 0.5rem;
      flex-wrap: wrap;
      margin-bottom: 0.9rem;
    }

    .pass-modal {
      width: min(94vw, 660px);
      max-width: none;
      max-height: 94vh;
      border: 0;
      padding: 0;
      overflow: visible;
      background: transparent;
    }

    .pass-modal::backdrop {
      background: rgba(4, 9, 25, 0.82);
      backdrop-filter: blur(7px);
    }

    .pass-modal-frame {
      position: relative;
      padding: 2.65rem 0.35rem 0.35rem;
    }

    .pass-modal-close {
      position: absolute;
      top: 0;
      right: 0.35rem;
      z-index: 5;
      border: 1px solid rgba(255, 255, 255, 0.45);
      border-radius: 999px;
      padding: 0.42rem 0.72rem;
      background: rgba(8, 20, 49, 0.9);
      color: #fff;
      font: inherit;
      font-weight: 700;
      cursor: pointer;
    }

    .virtual-pass {
      --shine-x: 50%;
      --shine-y: 50%;
      position: relative;
      isolation: isolate;
      overflow: hidden;
      border: 1px solid #26345d;
      border-radius: 22px;
      padding: 1.15rem;
      color: #fff;
      background:
        radial-gradient(circle at 100% 0%, rgba(213, 20, 60, 0.72), transparent 42%),
        linear-gradient(135deg, #081431, #152550);
      box-shadow: 0 24px 54px rgba(0, 0, 0, 0.42);
      transform: translateZ(0);
    }

    .virtual-pass-pattern,
    .virtual-pass-shine {
      position: absolute;
      border-radius: inherit;
      clip-path: inset(0 round 21px);
      pointer-events: none;
    }

    .virtual-pass-pattern {
      inset: 0;
      z-index: 0;
      overflow: hidden;
      opacity: 0.42;
      -webkit-mask-image: -webkit-radial-gradient(white, black);
    }

    .virtual-pass-pattern::before,
    .virtual-pass-pattern::after {
      content: "";
      position: absolute;
      inset: 0;
      width: 165%;
      height: 165%;
      transform-origin: 0 0;
      background:
        repeating-radial-gradient(
          circle at 0 0,
          transparent 0 26px,
          rgba(255, 255, 255, 0.2) 27px 29px,
          transparent 30px 52px
        );
      animation: pass-ripple-flow 6s linear infinite;
    }

    .virtual-pass-pattern::after {
      opacity: 0;
      animation-delay: -3s;
    }

    .virtual-pass-shine {
      inset: 0;
      z-index: 4;
      opacity: 0.48;
      mix-blend-mode: screen;
      -webkit-mask-image: -webkit-radial-gradient(white, black);
      background:
        linear-gradient(
          115deg,
          transparent 5%,
          rgba(89, 233, 255, 0.48) 22%,
          rgba(255, 112, 213, 0.42) 38%,
          rgba(255, 244, 151, 0.48) 52%,
          rgba(125, 255, 194, 0.4) 66%,
          rgba(142, 139, 255, 0.44) 82%,
          transparent 96%
        ),
        linear-gradient(
          135deg,
          transparent 20%,
          rgba(255, 255, 255, 0.45) 48%,
          transparent 76%
        );
      background-size: 180% 180%, 160% 160%;
      background-position:
        var(--shine-x) var(--shine-y),
        calc(100% - var(--shine-x)) calc(100% - var(--shine-y));
      filter: saturate(1.35) contrast(1.08);
      will-change: background-position;
    }

    .virtual-pass > :not(.virtual-pass-pattern):not(.virtual-pass-shine) {
      position: relative;
      z-index: 2;
    }

    .virtual-pass-logo {
      aspect-ratio: 2 / 1;
      overflow: hidden;
      margin-bottom: 0.9rem;
      border: 1px solid rgba(255, 255, 255, 0.24);
      border-radius: 14px;
      background: rgba(255, 255, 255, 0.92);
      box-shadow: inset 0 0 20px rgba(8, 20, 49, 0.08);
    }

    .virtual-pass-logo img {
      display: block;
      width: 100%;
      height: 100%;
      object-fit: cover;
    }

    .virtual-pass-top {
      display: flex;
      justify-content: space-between;
      align-items: flex-start;
      gap: 0.7rem;
    }

    .virtual-pass-kicker {
      margin-bottom: 0.18rem;
      color: rgba(255, 255, 255, 0.74);
      font-size: 0.72rem;
      font-weight: 700;
      letter-spacing: 0.12em;
      text-transform: uppercase;
    }

    .virtual-pass-status {
      flex: 0 0 auto;
      border: 1px solid rgba(255, 255, 255, 0.35);
      border-radius: 999px;
      padding: 0.2rem 0.48rem;
      background: rgba(255, 255, 255, 0.13);
      font-size: 0.74rem;
      font-weight: 700;
    }

    .virtual-pass-status.status-expired {
      opacity: 0.72;
    }

    .virtual-pass-grid {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 0.6rem;
      margin-top: 0.8rem;
    }

    .virtual-pass-grid div,
    .virtual-pass-code {
      display: grid;
      gap: 0.12rem;
    }

    .virtual-pass-grid span,
    .virtual-pass-code span {
      color: rgba(255, 255, 255, 0.68);
      font-size: 0.72rem;
      text-transform: uppercase;
      letter-spacing: 0.08em;
    }

    .virtual-pass-grid strong {
      overflow-wrap: anywhere;
    }

    .virtual-pass-code {
      margin-top: 0.8rem;
      border-top: 1px dashed rgba(255, 255, 255, 0.35);
      padding-top: 0.65rem;
    }

    .virtual-pass-code strong {
      font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
      font-size: clamp(1.65rem, 6vw, 2.35rem);
      letter-spacing: 0.18em;
    }

    @keyframes pass-ripple-flow {
      0% {
        opacity: 0;
        transform: scale(0.55);
      }
      12% { opacity: 0.68; }
      78% { opacity: 0.26; }
      100% {
        opacity: 0;
        transform: scale(1.15);
      }
    }

    @media (prefers-reduced-motion: reduce) {
      .virtual-pass-pattern::before,
      .virtual-pass-pattern::after {
        animation: none;
      }
    }

    .scope-toggle {
      display: inline-flex;
      align-items: center;
      gap: 0.45rem;
      margin: 0;
      color: var(--ink);
      font-weight: 600;
    }

    .scope-toggle input {
      width: auto;
      margin: 0;
    }

    .logistics-link {
      font-weight: 700;
      color: var(--brand);
      text-decoration: underline;
      text-underline-offset: 0.12rem;
      word-break: break-word;
    }

    .login {
      max-width: 430px;
      margin: 2.5rem auto 0;
      background: #fff;
      border-radius: 16px;
      border: 1px solid var(--line);
      box-shadow: var(--shadow);
      padding: 1.2rem;
      display: grid;
      gap: 0.7rem;
    }

    label {
      display: block;
      margin-bottom: 0.3rem;
      font-size: 0.9rem;
      color: var(--muted);
    }

    input {
      width: 100%;
      border: 1px solid var(--line);
      border-radius: 10px;
      padding: 0.58rem 0.7rem;
      font-family: inherit;
      font-size: 0.95rem;
    }

    .error {
      color: #b10624;
      font-size: 0.9rem;
      margin-top: 0.2rem;
    }

    .booking-hero {
      display: grid;
      grid-template-columns: minmax(180px, 260px) minmax(0, 1fr);
      gap: 0.8rem;
      align-items: start;
    }

    .booking-image-wrap {
      border-radius: 12px;
      overflow: hidden;
      border: 1px solid var(--line);
      background: #f7f9ff;
      aspect-ratio: 2 / 1;
      width: 100%;
    }

    .booking-image {
      width: 100%;
      height: 100%;
      object-fit: cover;
      display: block;
    }

    .two-col {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 0.8rem;
      margin-top: 0.8rem;
    }

    .kv {
      display: grid;
      gap: 0.45rem;
      font-size: 0.93rem;
    }

    .kv div {
      display: flex;
      justify-content: space-between;
      gap: 0.6rem;
      border-bottom: 1px dashed #d6ddef;
      padding-bottom: 0.35rem;
    }

    .toolbar {
      display: flex;
      gap: 0.45rem;
      align-items: center;
      flex-wrap: wrap;
    }

    .btn.subtle.is-active {
      background: var(--soft-accent);
      border: 1px solid var(--soft-accent-strong);
      color: var(--accent-strong);
    }

    .calendar-grid {
      display: grid;
      grid-template-columns: repeat(7, minmax(0, 1fr));
      gap: 0.55rem;
    }

    .dow {
      font-size: 0.79rem;
      text-transform: uppercase;
      color: var(--muted);
      letter-spacing: 0.08em;
      padding-top: 0.8rem;
      padding-bottom: 0.2rem;
      font-weight: 600;
      text-align: center;
    }

    .day {
      min-height: 116px;
      border: 1px solid var(--line);
      border-radius: 12px;
      padding: 0.35rem;
      display: flex;
      flex-direction: column;
      gap: 0.3rem;
      background: #fff;
      overflow: hidden;
    }

    .day.empty {
      background: #fafbff;
      border-style: dashed;
    }

    .day.is-today {
      border-color: var(--accent);
      background: var(--soft-accent);
      box-shadow: inset 0 0 0 1px var(--soft-accent-strong);
    }

    .day-number {
      font-size: 0.86rem;
      color: var(--muted);
      padding: 0.1rem;
    }

    .day.is-today .day-number {
      align-self: flex-start;
      min-width: 1.55rem;
      border-radius: 999px;
      background: var(--accent);
      color: #fff;
      font-weight: 700;
      text-align: center;
    }

    .pill {
      border: none;
      border-radius: 9px;
      color: #fff;
      padding: 0.33rem 0.4rem;
      font-size: 0.73rem;
      text-align: left;
      background: var(--pill-color, var(--brand));
      cursor: pointer;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }

    .calendar-more {
      align-self: flex-start;
      border: 0;
      padding: 0.1rem;
      background: transparent;
      color: var(--muted);
      font: inherit;
      font-size: 0.75rem;
      font-weight: 600;
      text-align: left;
      cursor: pointer;
    }

    .calendar-more:hover,
    .calendar-more:focus-visible {
      color: var(--accent-strong);
      text-decoration: underline;
    }

    .no-bookings {
      font-size: 0.75rem;
      color: var(--muted);
      padding: 0.1rem;
    }

    .global-loading {
      position: fixed;
      inset: 0;
      display: none;
      align-items: center;
      justify-content: center;
      flex-direction: column;
      gap: 0.7rem;
      background: rgba(255, 255, 255, 0.82);
      backdrop-filter: blur(3px);
      z-index: 1000;
      color: var(--ink);
      font-weight: 600;
    }

    .spinner {
      width: 34px;
      height: 34px;
      border: 3px solid #d8dced;
      border-top-color: var(--brand);
      border-radius: 50%;
      animation: spin 0.8s linear infinite;
    }

    @keyframes spin {
      from { transform: rotate(0deg); }
      to { transform: rotate(360deg); }
    }

    @media (max-width: 760px) {
      .notification-popover {
        position: fixed;
        top: calc(4.8rem + env(safe-area-inset-top, 0px));
        right: 0.65rem;
        left: 0.65rem;
        width: auto;
        max-height: calc(100vh - 6rem);
      }

      .notification-row {
        display: grid;
      }

      .notification-row time {
        white-space: normal;
      }

      .notification-push {
        align-items: flex-start;
      }

      .push-prompt-card {
        padding: 0.9rem;
      }

      .push-prompt-copy {
        padding-right: 2.15rem;
      }

      .push-prompt-actions {
        display: grid;
        grid-template-columns: 1fr;
      }

      .push-prompt-actions .btn {
        width: 100%;
      }

      .booking-hero,
      .two-col {
        grid-template-columns: 1fr;
      }

      .calendar-grid.calendar-grid-month {
        gap: 0.25rem;
      }

      .calendar-grid.calendar-grid-month .dow {
        font-size: 0.68rem;
        letter-spacing: 0.04em;
        text-align: center;
        padding-bottom: 0.05rem;
      }

      .calendar-grid.calendar-grid-month .day {
        min-height: 74px;
        border-radius: 10px;
        padding: 0.22rem;
        gap: 0.22rem;
      }

      .calendar-grid.calendar-grid-month .day-number {
        font-size: 0.72rem;
        padding: 0;
      }

      .calendar-grid.calendar-grid-month .pill {
        font-size: 0.63rem;
        line-height: 1.1;
        border-radius: 6px;
        padding: 0.2rem 0.26rem;
      }

      .calendar-grid.calendar-grid-month .no-bookings {
        display: none;
      }

      .virtual-pass-grid {
        grid-template-columns: 1fr;
      }
    }
