
    :root {
      /* refreshed palette, kept original variable names for compatibility */
      --brand-navy: #1f3b4d;  /* indigo primary */
      --brand-amber: #4a7c59; /* coral accent */
      --brand-teal: #1ea896;  /* mint accent */
      --brand-deep-green: #0a4f46;
      --ink-900: #1f3b4d;    /* slate-900 fallback */
  --logo-start: #1f3b4d; /* deep navy */
  --logo-end:   #4a7c59; /* muted green */
    }

html, body { overflow-x: hidden; }

    html { scroll-behavior: smooth; }
    body { font-family: Roboto, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji"; }
    h1, h2, h3, h4, h5 { font-family: Montserrat, Roboto, ui-sans-serif, system-ui; letter-spacing: -0.01em; }

    /* ------------------ */
    /* Signature backdrop */
    /* ------------------ */
    .backdrop {
      position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none;
      background:
        radial-gradient(1200px 600px at 10% -10%, color-mix(in oklab, var(--brand-teal), white 80%) 0%, transparent 50%),
        radial-gradient(900px 480px at 110% 10%, color-mix(in oklab, var(--brand-amber), white 80%) 0%, transparent 55%),
        linear-gradient(180deg, #f8fafc 0%, #eef2ff 100%);
    }
    .backdrop::after { /* soft noise */
      content: ""; position: absolute; inset: 0; opacity: 0.18; mix-blend-mode: soft-light;
      background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140' viewBox='0 0 140 140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.2'/%3E%3C/svg%3E");
    }

    /* Subtle grid */
    .gridliner {
      position: fixed; inset: -40px; z-index: -1; pointer-events: none;
      background-image: linear-gradient(to right, rgba(2,6,23,0.06) 1px, transparent 1px),
                        linear-gradient(to bottom, rgba(2,6,23,0.06) 1px, transparent 1px);
      background-size: 40px 40px; mask-image: radial-gradient(60% 60% at 50% 20%, black, transparent 70%);
    }


    /* Remove old aurora */
    .aurora { display: none; }

    /* Card chrome */
    .glass {
      background: rgba(255,255,255,0.72);
      backdrop-filter: saturate(1.2) blur(10px);
      -webkit-backdrop-filter: saturate(1.2) blur(10px);
    }
    .ring-gradient { position: relative; }
    .ring-gradient::before {
      content: ""; position: absolute; inset: -1px; border-radius: 16px; padding: 1px;
      background: linear-gradient(90deg, var(--brand-teal), var(--brand-amber)); -webkit-mask:
        linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude;
      pointer-events: none;
    }

    /* Animated sheen on buttons */
    .sheen { position: relative; overflow: hidden; }
    .sheen::after { content: ""; position: absolute; inset: -100% -40%; transform: rotate(20deg); background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.6) 50%, transparent 100%); animation: sweep 4.2s ease-in-out infinite; }
    @keyframes sweep { 0% { transform: translateX(-120%) rotate(20deg); } 60% { transform: translateX(120%) rotate(20deg); } 100% { transform: translateX(120%) rotate(20deg); } }

    /* Spotlight hover for cards */
    .spotlight {
      position: relative; isolation: isolate; overflow: hidden;
    }
    .spotlight::after {
      content: ""; position: absolute; inset: -60px; background: radial-gradient(240px 140px at var(--mx, 50%) var(--my, 50%), rgba(52, 211, 153, 0.12), transparent 60%);
      z-index: -1; transition: 120ms ease-in;
    }

    .sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

    /* Prevent background scroll while modal is open */
    .no-scroll { overflow: hidden; }

    /* Modal image uses small viewport height units for mobile stability */
    #genModalImg { width: 100%; height: 15svh; max-height: 15svh; object-fit: cover; border-radius: 0.75rem; }

    /* Suggestions */
/* Suggestions should visually match the input */
.suggestion-box {
  position: absolute;
  top: calc(100% + 0.35rem);
  left: 0;
  z-index: 50;

  width: 100%;
  background: #fff;

  /* match input border + rounding */
  border: 1px solid rgb(203 213 225); /* slate-300 */
  border-radius: 0.5rem; /* same as rounded-lg */

  /* match typography */
  font-family: inherit;
  font-size: 1rem; /* matches text-base */
  line-height: 1.5rem;

  /* optional: match the “field” feel */
  box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);

  max-height: 14rem;
  overflow-y: auto;
}

/* Each row should feel like part of the same control */
.suggestion-item {
  padding: 0.75rem 1rem; /* roughly py-3 px-4 */
  cursor: pointer;

  font-family: inherit;
  font-size: 1rem; /* text-base */
  line-height: 1.5rem;

  color: rgb(15 23 42); /* slate-900 */
}

/* Hover should match your UI language */
.suggestion-item:hover {
  background: rgb(241 245 249); /* slate-100-ish */
}


    /* Pills */
    .pill-row { display: flex; flex-wrap: wrap; gap: 0.375rem; }
    .pill { display: inline-flex; align-items: center; gap: 0.375rem; border-radius: 0.5rem; padding: 0.25rem 0.5rem; font-size: 0.75rem; line-height: 1rem; }
    .pill .icon { width: 14px; height: 14px; }
    .pill-std { background: rgb(227 242 255); color: rgb(3 105 161); border: 1px solid rgb(191 219 254); }
    .pill-work { background: rgb(222 247 236); color: rgb(6 78 59); border: 1px solid rgb(167 243 208); }
    .pill-crit { background: rgb(255 251 235); color: rgb(133 77 14); border: 1px solid rgb(253 230 138); }

    /* Modal meta grid */
    .meta-grid { display: grid; grid-template-columns: 9.5rem 1fr; gap: 0.25rem 0.75rem; font-size: 0.875rem; }
    .meta-grid dt { color: rgb(71 85 105); }
    .meta-grid dd { color: rgb(15 23 42); }
    @media (max-width: 420px) { .meta-grid { grid-template-columns: 1fr; } .meta-grid dt { font-weight: 600; margin-top: 0.35rem; } }

    .meta-scroll { max-height: 28vh; overflow-y: auto; scrollbar-gutter: stable; }
    .meta-scroll::-webkit-scrollbar { width: 10px; }
    .meta-scroll::-webkit-scrollbar-thumb { background: rgb(203 213 225); border-radius: 8px; }
    .meta-scroll::-webkit-scrollbar-thumb:hover { background: rgb(148 163 184); }

    /* Criteria marquee inside pill */
    .pill-crit { overflow: hidden; max-width: 100%; flex-shrink: 1; display: inline-flex; align-items: center; gap: 0.375rem; }
    .pill-crit .crit-icon { flex: 0 0 auto; display: inline-flex; }
    .pill-crit .crit-viewport { position: relative; flex: 1 1 auto; min-width: 0; overflow: hidden; }
    .pill-crit .crit-marquee { display: inline-flex; gap: 2rem; white-space: nowrap; will-change: transform; }
    .pill-crit .crit-copy { white-space: nowrap; }
    article[data-act="card"]:hover .pill-crit .crit-marquee { animation: crit-scroll-left 20s linear infinite; }
    @keyframes crit-scroll-left { from { transform: translateX(0); } to { transform: translateX(-50%); } }
    @media (prefers-reduced-motion: reduce) { article[data-act="card"]:hover .pill-crit .crit-marquee { animation: none; } }

    /* Card content clamp */
    .crit-box { background: rgb(248 250 252); border: 1px solid rgb(226 232 240); border-radius: 0.75rem; padding: 0.5rem 0.625rem; }
    .crit-head { display: inline-flex; align-items: center; gap: 0.375rem; font-size: 0.75rem; color: rgb(71 85 105); }
    .crit-text { margin-top: 0.25rem; font-size: 0.8125rem; color: rgb(15 23 42); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

    /* =============================== */
    /* Epic generate, animated control */
    /* =============================== */

    @property --angle {
      syntax: '<angle>';
      inherits: false;
      initial-value: 0deg;
    }

/* Full screen sidebar on phones and tablets */
@media (max-width: 767px) {
  #sidebar {
    width: 100vw !important;
    max-width: 100vw !important;
    height: 100svh !important; /* stable mobile viewport */
    top: 0;
    left: 0;
    border-right: 0 !important;
    border-radius: 0 !important;
  }
}

@media (max-width: 767px) {
  #sidebar {
    top: 0;
    bottom: 0;
    height: auto !important;     /* override h-full / 100svh rules */
    min-height: 0 !important;
  }
}

    .generate-epic {
      position: relative;
      border: 2px solid transparent;
      border-radius: 1rem; /* matches rounded-2xl */
      background:
        linear-gradient(255, 255, 255, 0.82) padding-box,
        conic-gradient(from var(--angle),
          var(--brand-teal),
          var(--brand-amber),
          var(--brand-navy),
          var(--brand-teal)
        ) border-box;
      animation: spin-border 8s linear infinite paused; /* idle by default */
      transition: box-shadow 200ms ease, filter 200ms ease;
      box-shadow: 0 10px 24px rgba(0,0,0,0.05);
      isolation: isolate;
    }

    .generate-epic:focus-within {
      animation-play-state: running; /* animate only when interacting */
      filter: saturate(1.05);
      box-shadow: 0 14px 30px rgba(0,0,0,0.08);
    }

    @keyframes spin-border {
      to { --angle: 360deg; }
    }

    /* Individual control glow on focus */
    .control-glow {
      position: relative;
      border-radius: 0.75rem;
      transition: box-shadow 150ms ease, background-color 150ms ease, border-color 150ms ease;
    }

    .control-glow:focus,
    .control-glow:focus-visible {
      outline: none;
      box-shadow:
        0 0 0 2px rgba(255,255,255,0.9),
        0 0 0 5px rgba(52, 211, 153, 0.25),
        0 0 0 10px rgba(249, 115, 22, 0.14);
      border-color: var(--brand-navy);
      background-color: rgba(255,255,255,0.92);
    }

.btn-gradient {
  background: linear-gradient(90deg, var(--brand-navy), var(--brand-amber));
  color: white;
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.btn-gradient:hover {
  opacity: 0.95;
  transform: translateY(-1px);
}

    /* Quiet the existing button sheen inside generate only */
    [data-view="generate"] .sheen::after { display: none; }

    /* Primary CTA micro pulse on press only */
    .gen-cta { position: relative; }
    .gen-cta:active::after {
      content: "";
      position: absolute;
      inset: -4px;
      border-radius: 0.9rem;
      box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.35);
      animation: pulse-out 480ms ease-out;
      pointer-events: none;
    }
    @keyframes pulse-out {
      from { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.35); }
      to   { box-shadow: 0 0 0 18px rgba(52, 211, 153, 0); }
    }

    @media (prefers-reduced-motion: reduce) {
      .generate-epic { animation: none; }
      .gen-cta:active::after { animation: none; }
    }


.nav-item svg {
  position: relative;
  top: -1px;
  flex-shrink: 0;
}

#sidebar {
  background-color: var(--brand-navy) !important;
  color: white;
}

#sidebar .nav-item.active-nav {
  background-color: rgba(255,255,255,0.12) !important;
  color: white !important;
}

.card {
  background: #ffffff;
  border: 1px solid rgb(226 232 240);
  border-radius: 1rem;
  box-shadow: 0 4px 14px rgba(0,0,0,0.06);
  overflow: hidden;
  transition: box-shadow 0.2s ease, transform 0.15s ease;
}

.card:hover {
  box-shadow: 0 8px 22px rgba(0,0,0,0.1);
  transform: translateY(-2px);
}

.criteria-text {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.time-pill,
.style-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.25rem 0.55rem;
  border-radius: 0.5rem;
  font-size: 0.75rem;
  font-weight: 500;
}

.time-pill {
  background: rgb(241 245 249);
  color: rgb(30 41 59);
  border: 1px solid rgb(226 232 240);
}

.style-pill {
  background: rgb(219 234 254);
  color: rgb(30 58 138);
  border: 1px solid rgb(191 219 254);
}

.stat-tile {
  background: rgb(248 250 252);
  border: 1px dashed rgb(226 232 240);
  box-shadow: none;
}


.filters-panel {
  background: rgb(241 245 249);
  border: 1px solid rgb(203 213 225);
}

@media (max-width: 767px) {
  #sidebar {
    position: fixed;
    top: 0;
    bottom: 0;
    height: 100svh;
    min-height: 100svh;
  }
}

/* =============================== */
/* Hero that holds the generate form (stacked, match filters panel) */
/* =============================== */
.hero.hero-holds-form.hero-navy {
  position: relative;
  overflow: hidden;
  border-radius: 1.5rem;
  padding: 2.4rem 2rem 1.6rem;

  /* Match filters panel */
  background: rgb(241 245 249);
  border: 1px solid rgb(203 213 225);
  box-shadow: none;

  /* Text colour requested */
  color: rgb(71 85 105 / var(--tw-text-opacity, 1));
}

/* Remove the decorative circles */
.hero.hero-holds-form.hero-navy::before,
.hero.hero-holds-form.hero-navy::after {
  content: none !important;
}

/* Remove the gridliner overlay */
.hero.hero-holds-form.hero-navy .hero-gridliner {
  display: none !important;
}

/* Keep hero content normal stacking */
.hero-inner.hero-inner-stacked {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}

.hero.hero-holds-form.hero-navy h1 {
  margin: 0;
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.02em;
  font-size: clamp(1.9rem, 2.8vw, 2.6rem);
  color: rgb(71 85 105 / var(--tw-text-opacity, 1));
}

.hero.hero-holds-form.hero-navy .hero-sub {
  margin-top: 0.8rem;
  font-size: 1rem;
  font-weight: 500;
  max-width: 48rem;
  color: rgb(71 85 105 / var(--tw-text-opacity, 1));
}

@media (max-width: 640px) {
  .hero.hero-holds-form.hero-navy { padding: 1.8rem 1.25rem 1.25rem; }
  .hero.hero-holds-form.hero-navy .hero-form { padding: 0.75rem; }
}

/* Form container */
.hero.hero-holds-form.hero-navy .hero-form {
  padding: 0;
  background: transparent;
  border: 0;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

/* The form “card” inside the hero */
.hero.hero-holds-form.hero-navy .hero-form .generate-epic {
  background: transparent !important;
  border: 1px solid rgb(203 213 225) !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  animation: none !important;
}

/* Labels and helper text */
.hero.hero-holds-form.hero-navy .hero-form label {
  color: rgb(71 85 105 / var(--tw-text-opacity, 1)) !important;
}

.hero.hero-holds-form.hero-navy .hero-form .text-slate-600,
.hero.hero-holds-form.hero-navy .hero-form .text-slate-700,
.hero.hero-holds-form.hero-navy .hero-form a {
  color: rgb(71 85 105 / var(--tw-text-opacity, 1)) !important;
}

/* Inputs */
.hero.hero-holds-form.hero-navy .hero-form input,
.hero.hero-holds-form.hero-navy .hero-form select,
.hero.hero-holds-form.hero-navy .hero-form textarea {
  background: #fff !important;
  border-color: rgb(203 213 225) !important;
  color: rgb(15 23 42) !important; /* slate-900 */
  caret-color: rgb(15 23 42) !important;
}

/* Placeholder text */
.hero.hero-holds-form.hero-navy .hero-form input::placeholder,
.hero.hero-holds-form.hero-navy .hero-form textarea::placeholder {
  color: rgb(100 116 139) !important; /* slate-500 */
}

/* Dropdown options */
.hero.hero-holds-form.hero-navy .hero-form select option {
  color: rgb(15 23 42);
}

/* Button border (optional, keeps it consistent on light background) */
.hero.hero-holds-form.hero-navy #generateButton {
  border: 1px solid rgb(203 213 225);
}


/* =============================== */
/* Newly generated highlight       */
/* =============================== */

.new-idea,
.new-idea-modal {
  /* Make a border area we can paint into */
  border: 2px solid transparent;

  /* Two backgrounds:
     1) solid fill on the padding box
     2) animated conic gradient on the border box
  */
  background:
    linear-gradient(#ffffff, #ffffff) padding-box,
    conic-gradient(
      from var(--angle),
      var(--brand-teal),
      var(--brand-amber),
      var(--brand-navy),
      var(--brand-teal)
    ) border-box;

  animation: spin-border 2.8s linear infinite;
}

/* Slightly softer for the modal */
.new-idea-modal {
  border-width: 3px;
  animation-duration: 3.2s;
}

@media (prefers-reduced-motion: reduce) {
  .new-idea,
  .new-idea-modal {
    animation: none;
  }
}

#generateButton {
  position: relative; /* belt and braces, even if you added Tailwind relative */
  overflow: hidden;
}

#buttonProgress {
  position: absolute;
  inset: 0;
  width: 0%;
  border-radius: inherit; /* matches the rounded button */
  pointer-events: none;
  z-index: 0;
}

#generateButton span {
  position: relative;
  z-index: 1; /* keep text above the bar */
}

    .gridliner {
      position: absolute;
      inset: -40px;
      pointer-events: none;
      background-image:
        linear-gradient(to right, rgba(255,255,255,0.25) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(255,255,255,0.25) 1px, transparent 1px);
      background-size: 40px 40px;
      mask-image: radial-gradient(60% 60% at 50% 20%, black, transparent 70%);
    }

.suggestion-item {
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
  cursor: pointer;
  color: rgb(15 23 42); /* slate-900 */
}

.suggestion-item:hover {
  background: rgb(248 250 252);
  color: rgb(15 23 42);
}

/* Sidebar buttons match the rest of the button style, but tuned for dark sidebar */
/* Sidebar nav buttons */
#sidebar .nav-item {
  width: 100%;
  justify-content: flex-start;

  border: 1px solid transparent;
  background: transparent;
  color: rgba(255,255,255,0.92);

  transition:
    background-color 140ms ease,
    border-color 140ms ease,
    transform 100ms ease;
}

/* Hover: very subtle lift, not a colour jump */
#sidebar .nav-item:hover {
  background: rgba(255,255,255,0.10);
  border-color: rgba(255,255,255,0.16);
}

/* Active section (current view) */
#sidebar .nav-item.active-nav {
  background: rgba(255,255,255,0.16);
  border-color: rgba(255,255,255,0.28);
  color: #fff;
}

/* Keyboard focus: visible but calm */
#sidebar .nav-item:focus {
  outline: none;
}

#sidebar .nav-item:focus-visible {
  background: rgba(255,255,255,0.14);
  border-color: rgba(30,168,150,0.55);
  box-shadow: 0 0 0 3px rgba(30,168,150,0.35);
}

/* Press feedback */
#sidebar .nav-item:active {
  transform: translateY(1px);
}

.hero.hero-holds-form.hero-navy .library-hero-title {
  margin: 0;
  color: #ffffff;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
  font-size: clamp(1.4rem, 2.1vw, 2rem);
}


/* Delete confirm modal polish */
#deleteConfirmModal[aria-hidden="false"] { display: block; }

/* Small “pop” animation when opening */
#deleteConfirmPanel {
  transform: translateY(6px) scale(0.985);
  opacity: 0;
  transition: transform 160ms ease, opacity 160ms ease;
}

#deleteConfirmModal.is-open #deleteConfirmPanel {
  transform: translateY(0) scale(1);
  opacity: 1;
}

/* Focus ring consistent with your UI */
#deleteConfirmPanel button:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(30, 168, 150, 0.35);
}

/* Make sure confirm modal sits above the main modal cleanly */
#deleteConfirmModal { z-index: 60; }

html, body {
  overflow-x: clip; /* better than hidden when supported */
}

/* Fallback for browsers that don't support clip */
@supports not (overflow-x: clip) {
  html, body { overflow-x: hidden; }
}

/* Avoid 100vw causing overflow */
@media (max-width: 767px) {
  #sidebar {
    width: 100% !important;
    max-width: 100% !important;
  }
}

/* Ensure the decorative grid never creates layout overflow */
.gridliner {
  position: fixed !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
}

.subgate.hidden { display: none; }

.subgate {
  position: fixed;
  inset: 0;
  z-index: 9999;
}

.subgate-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

/* Bigger, more “main modal” sized */
.subgate-panel {
  position: relative;
  width: min(760px, calc(100vw - 32px));
  margin: 10vh auto 0;
  border-radius: 1.25rem;
  overflow: hidden;

  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgb(226 232 240);
  box-shadow: 0 22px 70px rgba(0,0,0,0.22);

  padding: 0; /* header/body/footer handle their own spacing */
}

/* Header bar (matches credits + delete confirm styling language) */
.subgate-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;

  padding: 18px 20px;
  background: var(--brand-navy);
  color: white;
  border-bottom: 1px solid rgba(255,255,255,0.10);
}

.subgate-head h2 {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  font-family: Montserrat, Roboto, ui-sans-serif, system-ui;
}

.subgate-close {
  border-radius: 0.75rem;
  padding: 0.5rem;
  background: transparent;
  border: 1px solid rgba(255,255,255,0.18);
  transition: background-color 140ms ease, border-color 140ms ease, transform 100ms ease;
}

.subgate-close:hover {
  background: rgba(255,255,255,0.10);
  border-color: rgba(255,255,255,0.24);
}

.subgate-close:active { transform: translateY(1px); }

.subgate-close:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(30, 168, 150, 0.35);
}

/* Body */
.subgate-body {
  padding: 18px 20px 8px;
}

.subgate-body p {
  margin: 0;
  color: rgb(51 65 85);
  line-height: 1.55;
  font-size: 1rem;
}

/* Footer actions */
.subgate-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;

  padding: 14px 20px 18px;
  background: rgba(241, 245, 249, 0.7);
  border-top: 1px solid rgb(226 232 240);
}

/* Buttons that match your existing visual language */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;

  border-radius: 0.75rem;
  padding: 0.6rem 0.9rem;
  font-size: 0.875rem;
  font-weight: 600;

  background: var(--brand-navy);
  color: white;
  border: 1px solid rgba(255,255,255,0.0);
  transition: opacity 140ms ease, transform 100ms ease, box-shadow 140ms ease;
}

.btn-primary:hover { opacity: 0.95; }
.btn-primary:active { transform: translateY(1px); }

.btn-primary:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(30, 168, 150, 0.35);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;

  border-radius: 0.75rem;
  padding: 0.6rem 0.9rem;
  font-size: 0.875rem;
  font-weight: 600;

  background: rgba(255,255,255,0.85);
  color: rgb(51 65 85);
  border: 1px solid rgb(203 213 225);
  transition: background-color 140ms ease, transform 100ms ease, box-shadow 140ms ease;
}

.btn-secondary:hover { background: #fff; }
.btn-secondary:active { transform: translateY(1px); }

.btn-secondary:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(30, 168, 150, 0.35);
}

@media (max-width: 520px) {
  .subgate-actions {
    flex-direction: column;
    align-items: stretch;
  }
  .btn-primary, .btn-secondary { width: 100%; justify-content: center; }
}

/* Notice modal */
#noticeModal[aria-hidden="false"] { display: block; }

#noticePanel {
  transform: translateY(6px) scale(0.985);
  opacity: 0;
  transition: transform 160ms ease, opacity 160ms ease;
}

#noticeModal.is-open #noticePanel {
  transform: translateY(0) scale(1);
  opacity: 1;
}

#noticePanel button:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(30, 168, 150, 0.35);
}
