:root {
  --hg-entry-lime: #c8ff38;
  --hg-entry-cyan: #49d7ff;
}

.hg-entry-panel-handle,
.hg-entry-hero {
  display: none;
}

.hg-entry-guide {
  display: grid;
  gap: 6px;
  margin: 15px 0 9px;
}

.hg-entry-guide > small {
  color: var(--hg-entry-cyan);
  font: 850 9px/1 system-ui, sans-serif;
  letter-spacing: 0.17em;
}

.hg-entry-guide > strong {
  max-width: 20ch;
  color: #fff;
  font: 900 clamp(21px, 3vw, 32px)/0.98 system-ui, sans-serif;
  letter-spacing: -0.035em;
}

.hg-entry-guide > p {
  max-width: 43ch;
  margin: 0;
  color: rgba(238, 247, 242, 0.7);
  font: 600 12px/1.45 system-ui, sans-serif;
}

html[data-hg-entry-stage] .onboarding-actions {
  grid-template-columns: 1fr !important;
}

html[data-hg-entry-stage] .onboarding-actions .gpt-entry-command {
  grid-template-columns: minmax(0, 1fr) 24px !important;
}

html[data-hg-entry-stage] .onboarding-actions .gpt-entry-command .openai-mark {
  display: none !important;
}

html[data-hg-entry-stage] .onboarding-actions .gpt-entry-command > span:not(.openai-mark) {
  text-align: left;
}

html[data-hg-entry-stage="character"] .entry-section-label,
html[data-hg-entry-stage="ready"] .entry-section-label {
  margin-top: 5px;
}

@media (min-width: 721px) {
  .onboarding {
    align-items: center;
    background-image: url("/assets/visuals/sternschanze-keyart.webp") !important;
    background-position: center !important;
    background-size: cover !important;
  }

  .onboarding-shade {
    background:
      linear-gradient(90deg, rgba(1, 7, 5, 0.9) 0%, rgba(1, 7, 5, 0.65) 35%, rgba(1, 7, 5, 0.16) 64%, rgba(1, 7, 5, 0.32) 100%),
      linear-gradient(180deg, rgba(1, 6, 5, 0.22), transparent 56%, rgba(1, 6, 5, 0.5)) !important;
  }

  .onboarding-copy {
    position: relative;
    z-index: 7;
    width: min(430px, 38vw) !important;
    max-height: calc(100dvh - 52px);
    margin-left: clamp(26px, 3.5vw, 64px) !important;
    padding: 16px 18px 18px !important;
    overflow-y: auto;
    border-color: rgba(224, 244, 233, 0.2) !important;
    border-radius: 22px !important;
    background: linear-gradient(160deg, rgba(3, 11, 8, 0.86), rgba(3, 10, 8, 0.69)) !important;
    box-shadow: 0 30px 100px rgba(0, 0, 0, 0.5) !important;
    scrollbar-width: none;
  }

  .onboarding-copy::-webkit-scrollbar {
    display: none;
  }

  .hg-entry-panel-handle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 24px;
    margin: -3px -3px 2px;
    color: rgba(232, 245, 238, 0.42);
    cursor: grab;
    touch-action: none;
    user-select: none;
  }

  .hg-entry-panel-handle:active {
    cursor: grabbing;
  }

  .hg-entry-panel-handle > i {
    display: grid;
    grid-template-columns: repeat(3, 3px);
    gap: 3px;
  }

  .hg-entry-panel-handle b {
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: currentColor;
  }

  .hg-entry-panel-handle > span {
    font: 850 7px/1 system-ui, sans-serif;
    letter-spacing: 0.14em;
  }

  html[data-hg-entry-stage] .onboarding h1 {
    margin: 5px 0 2px;
    font-size: clamp(37px, 3.8vw, 50px);
  }

  html[data-hg-entry-stage] .onboarding .motto {
    margin: 0;
    font-size: 10px;
    letter-spacing: 0.04em;
  }

  html[data-hg-entry-stage] .onboarding .onboarding-signal {
    margin-top: 5px;
  }

  html[data-hg-entry-stage] .hg-entry-guide {
    margin: 11px 0 7px;
  }

  html[data-hg-entry-stage] .hg-entry-guide > strong {
    font-size: clamp(22px, 2.25vw, 30px);
  }

  html[data-hg-entry-stage] .hg-v2-name {
    margin: 11px 0 8px;
  }

  html[data-hg-entry-stage] .hg-v2-name input {
    min-height: 56px;
  }

  html[data-hg-entry-stage="character"] .entry-character-grid.hg-v2-entry-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  html[data-hg-entry-stage="character"] .entry-character-grid .hg-v2-starter.hg-v2-choice {
    min-height: clamp(148px, 20vh, 186px);
    border-radius: 15px;
  }

  html[data-hg-entry-stage="character"] .entry-character-grid .hg-v2-starter.hg-v2-choice::after {
    position: absolute;
    inset: 0;
    border: 1px solid transparent;
    border-radius: inherit;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.22), transparent 34%, rgba(73, 215, 255, 0.14)) border-box;
    content: "";
    pointer-events: none;
    -webkit-mask: linear-gradient(#000 0 0) padding-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
  }

  html[data-hg-entry-stage="character"] .hg-v2-choice-copy,
  html[data-hg-entry-stage="character"] .entry-character-grid .hg-v2-choice-copy {
    right: 10px;
    bottom: 10px;
    left: 10px;
  }

  html[data-hg-entry-stage="character"] .hg-v2-choice-copy > strong,
  html[data-hg-entry-stage="character"] .entry-character-grid .hg-v2-choice-copy > strong {
    font-size: clamp(14px, 1.5vw, 18px);
  }

  html[data-hg-entry-stage="character"] .hg-v2-choice-copy > em {
    font-size: 8px;
  }

  html[data-hg-entry-stage="ready"] .entry-character-grid.hg-v2-roster-grid {
    gap: 7px;
  }

  html[data-hg-entry-stage="ready"] .hg-v2-roster-card {
    min-height: 68px;
  }

  html[data-hg-entry-stage] .onboarding-actions {
    margin-top: 9px !important;
  }

  html[data-hg-entry-stage] .onboarding-actions .primary-command {
    min-height: 58px !important;
  }

  .hg-entry-hero:not([hidden]) {
    position: absolute;
    z-index: 5;
    top: 7vh;
    right: clamp(28px, 4vw, 72px);
    display: block;
    width: min(48vw, 650px);
    height: 84vh;
    min-height: 500px;
    overflow: hidden;
    pointer-events: none;
    isolation: isolate;
  }

  .hg-entry-hero::before {
    position: absolute;
    z-index: -1;
    inset: 8% 4% 4%;
    border-radius: 48% 52% 42% 58%;
    background: radial-gradient(circle at 52% 48%, rgba(73, 215, 255, 0.24), rgba(200, 255, 56, 0.08) 44%, transparent 72%);
    filter: blur(20px);
    content: "";
  }

  .hg-entry-hero-visual {
    position: absolute;
    z-index: 2;
    inset: 0;
    overflow: hidden;
    border-radius: 38px;
    -webkit-mask-image: linear-gradient(180deg, transparent 0%, #000 7%, #000 82%, transparent 100%), linear-gradient(90deg, transparent 0%, #000 9%, #000 92%, transparent 100%);
    mask-image: linear-gradient(180deg, transparent 0%, #000 7%, #000 82%, transparent 100%), linear-gradient(90deg, transparent 0%, #000 9%, #000 92%, transparent 100%);
    -webkit-mask-composite: source-in;
    mask-composite: intersect;
    background:
      linear-gradient(180deg, rgba(3, 10, 8, 0.08), rgba(3, 10, 8, 0.44)),
      url("/assets/visuals/hamburg-schanze-editor-v1.webp") center / cover;
  }

  .hg-entry-hero-visual img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    filter: saturate(1.04) contrast(1.06) drop-shadow(0 30px 70px rgba(0, 0, 0, 0.55));
    transform: scale(1.02);
    opacity: 1;
    transition: opacity 420ms ease, filter 420ms ease, transform 560ms cubic-bezier(0.2, 0.78, 0.2, 1);
  }

  .hg-entry-hero-visual canvas {
    position: absolute;
    z-index: 3;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    opacity: 0;
    pointer-events: auto;
    cursor: grab;
    touch-action: none;
    transition: opacity 420ms ease;
  }

  .hg-entry-hero-visual canvas:active,
  .hg-entry-hero.is-being-turned .hg-entry-hero-visual canvas {
    cursor: grabbing;
  }

  .hg-entry-hero.is-3d-ready .hg-entry-hero-visual img {
    opacity: 0;
    filter: saturate(0.7) blur(8px);
    transform: scale(1.07);
    animation: none !important;
  }

  .hg-entry-hero.is-3d-ready .hg-entry-hero-visual canvas {
    opacity: 1;
  }

  .hg-entry-hero-interaction {
    position: absolute;
    z-index: 7;
    top: 8%;
    right: 8%;
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 6px 7px 6px 10px;
    border: 1px solid rgba(229, 245, 236, 0.2);
    border-radius: 999px;
    background: rgba(3, 10, 8, 0.58);
    color: rgba(239, 248, 243, 0.72);
    opacity: 0;
    pointer-events: none;
    transform: translateY(-6px);
    transition: opacity 260ms ease, transform 260ms ease;
    backdrop-filter: blur(14px);
  }

  .hg-entry-hero.is-3d-ready .hg-entry-hero-interaction {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
  }

  .hg-entry-hero-interaction > span {
    font: 850 7px/1 system-ui, sans-serif;
    letter-spacing: 0.12em;
  }

  .hg-entry-hero-interaction > button {
    display: grid;
    width: 29px;
    height: 29px;
    padding: 0;
    place-items: center;
    border: 1px solid rgba(200, 255, 56, 0.3);
    border-radius: 50%;
    background: rgba(200, 255, 56, 0.09);
    color: var(--hg-entry-lime);
    cursor: pointer;
    font: 800 17px/1 system-ui, sans-serif;
  }

  .hg-entry-hero-interaction > button:hover,
  .hg-entry-hero-interaction > button:focus-visible {
    background: var(--hg-entry-lime);
    color: #071008;
  }

  .hg-entry-hero[data-kind="green"] .hg-entry-hero-visual img,
  .hg-entry-hero[data-kind="custom"] .hg-entry-hero-visual img {
    object-position: 66% center;
  }

  .hg-entry-hero.is-arriving .hg-entry-hero-visual img {
    animation: hg-entry-hero-arrive 560ms cubic-bezier(0.2, 0.78, 0.2, 1) both;
  }

  .hg-entry-hero-copy {
    position: absolute;
    z-index: 5;
    right: auto;
    bottom: 4%;
    left: 5%;
    display: grid;
    gap: 5px;
    width: min(310px, 52%);
    max-width: 310px;
    padding: 15px 17px;
    border: 1px solid rgba(229, 245, 236, 0.2);
    border-radius: 18px;
    background: rgba(3, 10, 8, 0.66);
    box-shadow: 0 22px 70px rgba(0, 0, 0, 0.46);
    backdrop-filter: blur(18px) saturate(1.1);
  }

  .hg-entry-hero-copy small {
    color: var(--hg-entry-character-accent, var(--hg-entry-cyan));
    font: 850 8px/1 system-ui, sans-serif;
    letter-spacing: 0.14em;
  }

  .hg-entry-hero-copy strong {
    overflow: hidden;
    color: #fff;
    font: 900 clamp(24px, 2.7vw, 40px)/0.92 system-ui, sans-serif;
    letter-spacing: -0.045em;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .hg-entry-hero-copy p {
    max-width: 44ch;
    margin: 0;
    color: rgba(237, 247, 242, 0.68);
    font: 600 10px/1.4 system-ui, sans-serif;
  }

  .hg-entry-hero-orbit {
    position: absolute;
    z-index: 1;
    inset: 4% 0 8%;
  }

  .hg-entry-hero-orbit i {
    position: absolute;
    inset: 8% 12%;
    border: 1px solid rgba(200, 255, 56, 0.22);
    border-radius: 50%;
    animation: hg-entry-orbit 18s linear infinite;
  }

  .hg-entry-hero-orbit i:nth-child(2) {
    inset: 17% 4%;
    border-color: rgba(73, 215, 255, 0.18);
    animation-direction: reverse;
    animation-duration: 24s;
  }

  .hg-entry-hero-orbit i:nth-child(3) {
    inset: 4% 22%;
    border-color: rgba(255, 73, 109, 0.16);
    animation-duration: 31s;
  }
}

@keyframes hg-entry-hero-arrive {
  from { opacity: 0; transform: scale(1.07) translate3d(18px, 0, 0); filter: saturate(0.72) blur(7px); }
  to { opacity: 1; transform: scale(1.02) translate3d(0, 0, 0); filter: saturate(1.04) contrast(1.06) blur(0); }
}

@keyframes hg-entry-orbit {
  to { transform: rotate(360deg); }
}

@media (max-width: 720px) {
  .hg-entry-panel-handle {
    display: none !important;
  }

  .hg-entry-hero:not([hidden]) {
    position: absolute;
    z-index: 5;
    top: max(50px, calc(env(safe-area-inset-top) + 42px));
    left: 50%;
    display: block !important;
    width: min(100vw, 520px);
    height: min(39dvh, 340px);
    min-height: 230px;
    overflow: hidden;
    pointer-events: none;
    isolation: isolate;
    transform: translateX(-50%);
  }

  .hg-entry-hero::before {
    position: absolute;
    z-index: -1;
    inset: 4% 8% 0;
    border-radius: 50%;
    background: radial-gradient(circle at 50% 48%, rgba(73, 215, 255, 0.23), rgba(200, 255, 56, 0.08) 46%, transparent 72%);
    filter: blur(18px);
    content: "";
  }

  .hg-entry-hero-visual {
    position: absolute;
    z-index: 2;
    inset: 0;
    overflow: hidden;
    -webkit-mask-image: linear-gradient(180deg, transparent 0%, #000 8%, #000 83%, transparent 100%);
    mask-image: linear-gradient(180deg, transparent 0%, #000 8%, #000 83%, transparent 100%);
    background: radial-gradient(circle at 50% 50%, rgba(8, 24, 19, 0.72), rgba(3, 10, 8, 0.08) 68%, transparent 86%);
  }

  .hg-entry-hero-visual img,
  .hg-entry-hero-visual canvas {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    transition: opacity 320ms ease;
  }

  .hg-entry-hero-visual img {
    object-fit: cover;
    object-position: 62% center;
    opacity: 1;
  }

  .hg-entry-hero-visual canvas {
    z-index: 3;
    opacity: 0;
    pointer-events: auto;
    cursor: grab;
    touch-action: none;
  }

  .hg-entry-hero.is-3d-ready .hg-entry-hero-visual img {
    opacity: 0;
  }

  .hg-entry-hero.is-3d-ready .hg-entry-hero-visual canvas {
    opacity: 1;
  }

  .hg-entry-hero-copy,
  .hg-entry-hero-interaction,
  .hg-entry-hero-orbit {
    display: none !important;
  }

  .onboarding-copy {
    position: relative;
    z-index: 7;
    width: calc(100% - 12px) !important;
    max-height: calc(100dvh - max(12px, env(safe-area-inset-top))) !important;
    margin: 0 6px max(6px, env(safe-area-inset-bottom)) !important;
    padding: 14px !important;
    overflow-x: hidden;
  }

  html[data-hg-entry-stage="name"] .onboarding-copy {
    max-height: none !important;
  }

  html[data-hg-entry-stage="character"] .onboarding-copy,
  html[data-hg-entry-stage="ready"] .onboarding-copy {
    max-height: min(61dvh, 560px) !important;
    background: linear-gradient(180deg, rgba(4, 12, 10, 0.86), rgba(3, 10, 8, 0.97)) !important;
  }

  html[data-hg-entry-stage] .onboarding h1 {
    margin: 3px 0 0;
    font-size: clamp(28px, 9vw, 36px);
  }

  html[data-hg-entry-stage] .onboarding .motto {
    margin: 2px 0 0;
  }

  html[data-hg-entry-stage="character"] .onboarding-signal,
  html[data-hg-entry-stage="character"] .onboarding .motto,
  html[data-hg-entry-stage="ready"] .onboarding-signal,
  html[data-hg-entry-stage="ready"] .onboarding .motto {
    display: none;
  }

  .hg-entry-guide {
    margin: 10px 0 8px;
  }

  .hg-entry-guide > strong {
    max-width: 19ch;
    font-size: clamp(20px, 6.8vw, 28px);
  }

  .hg-entry-guide > p {
    font-size: 11px;
  }

  html[data-hg-entry-stage="name"] .hg-v2-name {
    margin: 14px 0 9px;
  }

  html[data-hg-entry-stage="name"] .hg-v2-name input {
    min-height: 62px;
    font-size: 19px;
  }

  html[data-hg-entry-stage="character"] .entry-character-grid.hg-v2-entry-grid {
    display: grid;
    grid-auto-columns: min(76vw, 292px);
    grid-auto-flow: column;
    grid-template-columns: none;
    gap: 9px;
    overflow-x: auto;
    padding: 2px 2px 8px;
    scroll-padding-inline: 2px;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
  }

  html[data-hg-entry-stage="character"] .entry-character-grid.hg-v2-entry-grid::-webkit-scrollbar,
  html[data-hg-entry-stage="ready"] .entry-character-grid.hg-v2-roster-grid::-webkit-scrollbar {
    display: none;
  }

  html[data-hg-entry-stage="character"] .entry-character-grid .hg-v2-starter.hg-v2-choice {
    min-height: clamp(230px, 32dvh, 300px);
    border-radius: 18px;
    scroll-snap-align: start;
  }

  html[data-hg-entry-stage="character"] .hg-v2-choice-copy,
  html[data-hg-entry-stage="character"] .entry-character-grid .hg-v2-choice-copy {
    top: auto;
    right: 14px;
    bottom: 15px;
    left: 14px;
    transform: none;
  }

  html[data-hg-entry-stage="character"] .hg-v2-choice-copy > strong,
  html[data-hg-entry-stage="character"] .entry-character-grid .hg-v2-choice-copy > strong {
    font-size: clamp(18px, 5vw, 23px);
  }

  html[data-hg-entry-stage="character"] .hg-v2-choice-art img,
  html[data-hg-entry-stage="character"] .entry-character-grid .hg-v2-choice-art img {
    object-position: 58% center;
  }

  html[data-hg-entry-stage="ready"] .entry-character-grid.hg-v2-roster-grid {
    display: grid;
    grid-auto-columns: min(76vw, 292px);
    grid-auto-flow: column;
    grid-template-columns: none;
    gap: 9px;
    overflow-x: auto;
    padding: 2px 2px 8px;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
  }

  html[data-hg-entry-stage="ready"] .hg-v2-roster-card {
    grid-template-columns: minmax(120px, 46%) minmax(0, 1fr) 24px !important;
    grid-template-rows: clamp(176px, 25dvh, 220px) !important;
    min-height: clamp(176px, 25dvh, 220px) !important;
    height: auto !important;
    padding: 8px !important;
    border-radius: 18px;
    scroll-snap-align: start;
  }

  html[data-hg-entry-stage="ready"] .hg-v2-roster-visual {
    display: grid !important;
    width: 100%;
    height: 100%;
    border-radius: 13px;
  }

  html[data-hg-entry-stage="ready"] .hg-v2-roster-card strong {
    font-size: clamp(17px, 5vw, 22px);
  }

  html[data-hg-entry-stage] .onboarding-actions {
    position: sticky;
    z-index: 8;
    bottom: 0;
    margin-top: 8px !important;
    padding-top: 4px;
    background: linear-gradient(180deg, transparent, rgba(3, 10, 8, 0.97) 28%);
  }

  html[data-hg-entry-stage] .onboarding-actions .primary-command {
    min-height: 62px !important;
    border-radius: 15px !important;
  }

  html[data-hg-entry-stage] .onboarding-actions .primary-command strong {
    font-size: 13px;
  }

  html[data-hg-entry-stage] .onboarding-actions .primary-command small {
    font-size: 9px;
  }
}

@media (max-width: 390px), (max-height: 700px) and (max-width: 720px) {
  html[data-hg-entry-stage="character"] .entry-character-grid .hg-v2-starter.hg-v2-choice {
    min-height: 205px;
  }

  html[data-hg-entry-stage="ready"] .hg-v2-roster-card {
    grid-template-rows: 162px !important;
    min-height: 162px !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  html[data-hg-entry-stage] .hg-v2-starter,
  html[data-hg-entry-stage] .hg-v2-choice-art img {
    scroll-behavior: auto;
    transition: none !important;
  }

  .hg-entry-hero-visual img,
  .hg-entry-hero-visual canvas,
  .hg-entry-hero-interaction {
    transition: none !important;
  }
}

/* HG_CHATGPT_ASSISTED_ENTRY_V17
   A high-visibility AI handoff without pretending that OpenAI is the identity
   provider. The actual player identity remains Hamburg.Games-local. */
.hg-chatgpt-entry-card {
  position: relative;
  display: grid;
  gap: 10px;
  margin: 12px 0 4px;
  padding: 15px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 19px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.12), transparent 32%),
    radial-gradient(circle at 92% 8%, rgba(73, 215, 255, 0.2), transparent 31%),
    linear-gradient(155deg, rgba(9, 15, 19, 0.97), rgba(2, 7, 8, 0.98));
  box-shadow:
    0 24px 64px rgba(0, 0, 0, 0.42),
    inset 0 1px rgba(255, 255, 255, 0.1),
    inset 0 -2px #e2001a;
  isolation: isolate;
}

.hg-chatgpt-entry-card::after {
  position: absolute;
  z-index: -1;
  inset: 0;
  background: repeating-linear-gradient(180deg, transparent 0 5px, rgba(255, 255, 255, 0.018) 6px);
  content: "";
  pointer-events: none;
}

.hg-chatgpt-entry-atmosphere,
.hg-chatgpt-entry-atmosphere > b {
  position: absolute;
  z-index: -1;
  inset: 0;
  pointer-events: none;
}

.hg-chatgpt-entry-atmosphere > b {
  top: 55%;
  left: 56%;
  width: 70%;
  height: 70%;
  border: 1px solid rgba(73, 215, 255, 0.17);
  background:
    linear-gradient(rgba(73, 215, 255, 0.11) 1px, transparent 1px),
    linear-gradient(90deg, rgba(73, 215, 255, 0.11) 1px, transparent 1px);
  background-size: 18px 18px;
  opacity: 0.55;
  transform: perspective(230px) rotateX(62deg) rotateZ(-8deg);
  transform-origin: center;
}

.hg-chatgpt-entry-atmosphere > i {
  position: absolute;
  top: 18px;
  right: 22px;
  width: 96px;
  height: 96px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 50%;
  animation: hg-chatgpt-orbit 11s linear infinite;
}

.hg-chatgpt-entry-atmosphere > i:nth-child(2) {
  top: 29px;
  right: 33px;
  width: 74px;
  height: 74px;
  border-color: rgba(226, 0, 26, 0.42);
  animation-direction: reverse;
  animation-duration: 8s;
}

.hg-chatgpt-entry-atmosphere > i:nth-child(3) {
  top: 50px;
  right: 54px;
  width: 32px;
  height: 32px;
  border-color: rgba(73, 215, 255, 0.48);
  box-shadow: 0 0 26px rgba(73, 215, 255, 0.24);
  animation-duration: 5s;
}

.hg-chatgpt-entry-atmosphere > i::before {
  position: absolute;
  top: -3px;
  left: 50%;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 12px rgba(255, 255, 255, 0.8);
  content: "";
}

.hg-chatgpt-entry-head {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 43px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.hg-chatgpt-entry-head > span:nth-child(2) {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.hg-chatgpt-entry-head small {
  color: #49d7ff;
  font: 900 7px/1 system-ui, sans-serif;
  letter-spacing: 0.15em;
}

.hg-chatgpt-entry-head strong {
  max-width: 25ch;
  color: #fff;
  font: 900 16px/1.02 system-ui, sans-serif;
  letter-spacing: -0.025em;
}

.hg-chatgpt-entry-signal,
.hg-chatgpt-button-signal {
  position: relative;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.34);
  border-radius: 13px;
  background: linear-gradient(145deg, #fff, #dce8e4);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35), inset 0 -3px #e2001a;
}

.hg-chatgpt-entry-signal {
  width: 43px;
  height: 43px;
}

.hg-chatgpt-entry-signal::before,
.hg-chatgpt-button-signal::before {
  width: 19px;
  height: 19px;
  border: 2px solid #08100f;
  border-radius: 50%;
  content: "";
}

.hg-chatgpt-entry-signal > i,
.hg-chatgpt-button-signal > i {
  position: absolute;
  width: 19px;
  height: 5px;
  border-top: 2px solid #08100f;
  transform-origin: center;
}

.hg-chatgpt-entry-signal > i:nth-child(2),
.hg-chatgpt-button-signal > i:nth-child(2) { transform: rotate(60deg); }
.hg-chatgpt-entry-signal > i:nth-child(3),
.hg-chatgpt-button-signal > i:nth-child(3) { transform: rotate(120deg); }
.hg-chatgpt-entry-signal > i:nth-child(4) { transform: rotate(180deg); }

.hg-chatgpt-entry-live {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 6px 8px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  color: #fff;
  background: rgba(0, 0, 0, 0.32);
  font: 900 7px/1 system-ui, sans-serif;
  letter-spacing: 0.12em;
}

.hg-chatgpt-entry-live > i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #c8ff38;
  box-shadow: 0 0 12px rgba(200, 255, 56, 0.72);
  animation: hg-chatgpt-pulse 1.8s ease-in-out infinite;
}

.hg-chatgpt-entry-card > p {
  position: relative;
  z-index: 2;
  max-width: 41ch;
  margin: 0;
  color: rgba(239, 247, 244, 0.72);
  font: 650 10px/1.45 system-ui, sans-serif;
}

.hg-chatgpt-entry-chips {
  position: relative;
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.hg-chatgpt-entry-chips > span {
  padding: 5px 7px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.72);
  background: rgba(255, 255, 255, 0.045);
  font: 850 6px/1 system-ui, sans-serif;
  letter-spacing: 0.08em;
}

.hg-chatgpt-entry-chips > span:nth-child(2) {
  border-color: rgba(73, 215, 255, 0.3);
  color: #8fe8ff;
}

.hg-chatgpt-entry-action-slot {
  position: relative;
  z-index: 3;
}

.hg-chatgpt-entry-action-slot .hg-chatgpt-entry-command {
  width: 100%;
  min-height: 66px !important;
  display: grid !important;
  grid-template-columns: 42px minmax(0, 1fr) 20px !important;
  gap: 11px;
  align-items: center;
  padding: 8px 12px 8px 9px !important;
  border: 1px solid rgba(255, 255, 255, 0.76) !important;
  border-radius: 14px !important;
  color: #07100f !important;
  background: linear-gradient(120deg, #fff 0%, #edf3f1 66%, #dce8e4 100%) !important;
  box-shadow: 0 15px 34px rgba(0, 0, 0, 0.34), inset 0 -4px #e2001a !important;
  text-align: left;
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.hg-chatgpt-entry-action-slot .hg-chatgpt-entry-command:hover,
.hg-chatgpt-entry-action-slot .hg-chatgpt-entry-command:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 20px 42px rgba(0, 0, 0, 0.4), 0 0 0 3px rgba(73, 215, 255, 0.18), inset 0 -4px #e2001a !important;
}

.hg-chatgpt-button-signal {
  width: 42px;
  height: 48px;
  border-color: rgba(7, 16, 15, 0.18);
  background: linear-gradient(145deg, #f5faf8, #fff);
  box-shadow: inset 0 -3px #e2001a;
}

.hg-chatgpt-entry-command > span:not(.hg-chatgpt-button-signal) {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.hg-chatgpt-entry-command strong {
  color: #07100f !important;
  font-size: 11px !important;
  letter-spacing: -0.01em;
}

.hg-chatgpt-entry-command small {
  overflow: hidden;
  color: rgba(7, 16, 15, 0.61) !important;
  font-size: 7px !important;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hg-chatgpt-entry-command > svg,
.hg-chatgpt-entry-command > i:last-child {
  color: #e2001a;
}

.hg-chatgpt-entry-alternative {
  position: relative;
  z-index: 3;
  min-height: 44px;
  padding: 8px 10px;
  border: 0;
  color: rgba(255, 255, 255, 0.58);
  background: transparent;
  font: 850 7px/1.2 system-ui, sans-serif;
  letter-spacing: 0.08em;
  text-decoration: underline;
  text-decoration-color: rgba(73, 215, 255, 0.48);
  text-underline-offset: 4px;
  cursor: pointer;
}

.hg-chatgpt-entry-alternative:hover,
.hg-chatgpt-entry-alternative:focus-visible {
  color: #fff;
}

.hg-chatgpt-entry-disclosure {
  position: relative;
  z-index: 5;
  display: grid;
  gap: 7px;
  padding: 13px;
  border: 1px solid rgba(73, 215, 255, 0.4);
  border-radius: 13px;
  background: rgba(2, 7, 9, 0.96);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.42), inset 3px 0 #49d7ff;
}

.hg-chatgpt-entry-disclosure[hidden] {
  display: none !important;
}

.hg-chatgpt-entry-disclosure > small {
  color: #49d7ff;
  font: 900 7px/1 system-ui, sans-serif;
  letter-spacing: 0.14em;
}

.hg-chatgpt-entry-disclosure > strong {
  color: #fff;
  font: 850 16px/1.05 system-ui, sans-serif;
}

.hg-chatgpt-entry-disclosure > p {
  margin: 0;
  color: rgba(242, 248, 246, 0.75);
  font: 600 9px/1.46 system-ui, sans-serif;
}

.hg-chatgpt-entry-disclosure > .hg-chatgpt-entry-legal {
  padding-top: 7px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(242, 248, 246, 0.48);
  font-size: 9px;
}

.hg-chatgpt-entry-disclosure > div {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 6px;
  margin-top: 2px;
}

.hg-chatgpt-entry-disclosure button {
  min-height: 44px;
  padding: 7px 10px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 9px;
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
  font: 850 7px/1.2 system-ui, sans-serif;
  cursor: pointer;
}

.hg-chatgpt-entry-disclosure button:first-child {
  border-color: #fff;
  color: #07100f;
  background: #fff;
  box-shadow: inset 0 -3px #e2001a;
}

.hg-chatgpt-entry-card[data-mode="local"] {
  border-color: rgba(226, 0, 26, 0.5);
  background:
    linear-gradient(135deg, rgba(226, 0, 26, 0.13), transparent 38%),
    linear-gradient(155deg, rgba(15, 10, 12, 0.97), rgba(5, 6, 8, 0.98));
}

.hg-chatgpt-entry-card[data-mode="local"] .hg-chatgpt-entry-live,
.hg-chatgpt-entry-card[data-mode="ready"] .hg-chatgpt-entry-live {
  display: none;
}

.hg-chatgpt-entry-card[data-mode="ready"] .hg-chatgpt-entry-atmosphere > i {
  border-color: rgba(200, 255, 56, 0.35);
}

@keyframes hg-chatgpt-orbit {
  to { transform: rotate(360deg); }
}

@keyframes hg-chatgpt-pulse {
  50% { opacity: 0.42; transform: scale(0.72); }
}

@media (max-width: 720px) {
  html[data-hg-entry-stage="name"] .onboarding-copy {
    max-height: calc(100dvh - max(10px, env(safe-area-inset-top))) !important;
    overflow-y: auto;
  }

  /* HG_RETURNING_MOBILE_CTA_V21
     Keep the returning-player command inside the initial mobile scrollport.
     The recovery action remains in normal flow below it instead of competing
     for the same sticky bottom edge. */
  html[data-hg-entry-stage="ready"] .hg-chatgpt-entry-card {
    position: sticky;
    z-index: 10;
    bottom: 0;
    margin-bottom: 0;
    box-shadow: 0 -18px 42px rgba(0, 0, 0, 0.42);
  }

  html[data-hg-entry-stage="ready"] .onboarding-actions {
    position: static;
  }

  /* HG_BUBO_FASTPATH_MOBILE_V21
     The primary command lives inside the assisted-entry card while Back stays
     in .onboarding-actions. Keeping that second container sticky made it sit
     on top of the Bubo command after the character carousel was scrolled. */
  html[data-hg-entry-stage="character"] .onboarding-actions {
    position: static;
    z-index: auto;
    bottom: auto;
    margin-top: 10px !important;
    padding-top: 0;
    background: none;
  }

  html[data-hg-entry-stage="character"] .onboarding-actions .secondary-command {
    width: 100%;
    min-height: 58px;
  }

  .hg-chatgpt-entry-card {
    gap: 8px;
    margin-top: 9px;
    padding: 12px;
    border-radius: 16px;
  }

  .hg-chatgpt-entry-head {
    grid-template-columns: 37px minmax(0, 1fr) auto;
    gap: 8px;
  }

  .hg-chatgpt-entry-signal {
    width: 37px;
    height: 37px;
    border-radius: 11px;
  }

  .hg-chatgpt-entry-head strong {
    max-width: 23ch;
    font-size: 14px;
  }

  .hg-chatgpt-entry-card > p {
    font-size: 9px;
  }

  .hg-chatgpt-entry-chips > span {
    padding: 4px 6px;
    font-size: 7px;
  }

  .hg-chatgpt-entry-action-slot .hg-chatgpt-entry-command {
    min-height: 62px !important;
    grid-template-columns: 38px minmax(0, 1fr) 18px !important;
    gap: 8px;
  }

  .hg-chatgpt-button-signal {
    width: 38px;
    height: 43px;
  }

  .hg-chatgpt-entry-command strong {
    font-size: 10px !important;
  }

  .hg-chatgpt-entry-disclosure > div {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 390px), (max-height: 700px) and (max-width: 720px) {
  .hg-chatgpt-entry-card > p,
  .hg-chatgpt-entry-chips > span:nth-child(3) {
    display: none;
  }

  .hg-chatgpt-entry-card {
    padding: 10px;
  }

  .hg-chatgpt-entry-disclosure > p {
    display: block;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hg-chatgpt-entry-atmosphere > i,
  .hg-chatgpt-entry-live > i {
    animation: none !important;
  }

  .hg-chatgpt-entry-action-slot .hg-chatgpt-entry-command {
    transition: none !important;
  }
}
