/* The question is a quiet writing surface; starting the journey is a separate action. */
.j-stage[data-stage=gate].is-on {
  grid-template-columns: minmax(230px, .85fr) minmax(0, 1fr);
  gap: clamp(40px, 7vw, 104px); max-width: 1060px; padding: 20px 0;
}
.gate-visual { min-width: 0; width: 100%; text-align: center; }
.gate-visual .gate-scene { width: min(100%, 340px, 48vh); margin: 0 auto; }
.gate-visual .gate-hint { margin: 18px 0 0; font-size: 11px; letter-spacing: .16em; color: var(--text-2); opacity: .8; animation: none; }
.gate-visual .hero-quote { max-width: 24em; margin: 12px auto 0; font-size: 11px; line-height: 1.8; letter-spacing: .04em; opacity: .65; }
.gate-copy { gap: 0; }
.gate-copy .hero-title { font-size: clamp(32px, 3.4vw, 44px); line-height: 1.45; text-shadow: none; }
.gate-copy .hero-sub { font-size: 13px; line-height: 1.8; margin: 16px 0 28px; }
.gate-copy .entry-panel { padding: 0; border: 0; border-radius: 0; background: none; box-shadow: none; }
.entry-label { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.entry-label label { font-size: 14px; color: var(--text-1); }
.entry-label > span { color: var(--text-2); font-size: 10px; }
.gate-copy .entry-panel textarea { min-height: 112px; padding: 16px 18px; font-size: 14px; line-height: 1.9; resize: vertical; border-radius: 14px; background: rgba(120, 115, 155, .055); border-color: rgba(155, 142, 211, .3); transition: border-color .2s, box-shadow .2s; }
.gate-copy .entry-panel textarea:focus { border-color: rgba(var(--accent-rgb), .7); box-shadow: 0 0 0 3px rgba(var(--accent-rgb), .06); outline: none; }
.gate-copy .entry-meta { margin-top: 7px; font-size: 10px; opacity: .8; }
.gate-copy .intent-chips { gap: 5px 16px; margin: 12px 0 0; }
.gate-copy .intent-chips .ghost-btn { padding: 4px 0; min-height: 28px; font-size: 11px; border: 0; border-radius: 0; background: none; color: var(--text-2); }
.gate-copy .intent-chips .ghost-btn:hover { color: var(--accent); }
.entry-journey { width: 100%; margin-top: 25px; padding-top: 23px; border-top: 1px solid var(--line); }
.entry-journey .entry-actions { gap: 13px 22px; }
.entry-journey .entry-actions .primary-btn { min-height: 48px; padding: 13px 25px; font-size: 14px; box-shadow: 0 6px 30px rgba(var(--accent-rgb), .12); }
.entry-journey .entry-actions .ghost-btn { min-height: 40px; padding: 6px 0; font-size: 12px; border: 0; border-radius: 0; background: none; color: var(--text-2); }
.entry-journey .entry-actions .ghost-btn:hover { color: var(--text-1); }
.entry-journey .demo-note, .entry-journey .usage-note { margin: 14px 0 0; font-size: 10px; line-height: 1.8; color: var(--text-2); opacity: .7; }
.entry-journey .demo-note.is-live::before { color: var(--accent); }
html[data-theme=day] .gate-copy .entry-panel { background: none; border: 0; box-shadow: none; }
html[data-theme=day] .gate-copy .entry-panel textarea { background: rgba(255, 255, 255, .65); border-color: rgba(118, 97, 160, .24); }

/* The original gate moves from its on-page position to the viewport, then opens. */
.gate-transition { position: fixed; inset: 0; z-index: 180; pointer-events: none; overflow: hidden; opacity: 1; }
.gate-transition-scrim { position: absolute; inset: 0; background: var(--bg-0); animation: gateScrim .65s ease both; }
.gate-transition-light { position: absolute; inset: 0; background: radial-gradient(ellipse at 50% 52%, rgba(255,222,167,.65), rgba(var(--accent-rgb),.13) 42%, transparent 75%); opacity: 0; animation: gateArrival 1.3s ease .55s both; }
.gate-transition .gate-flight { position: absolute; margin: 0; animation: none; transform-origin: center; will-change: transform, opacity; pointer-events: none; }
html[data-theme] .gate-transition .gate-flight { mask-image: none; -webkit-mask-image: none; }
.gate-transition .gate-flight .gate-leaf { transition: transform 1.2s cubic-bezier(.45,.03,.24,1), opacity 1s ease .2s; }
.gate-transition .gate-flight .gate-beyond { transition: opacity .8s ease; }
body.is-entering-gate .gate-visual, body.is-entering-gate .gate-copy { opacity: 0; transition: opacity .4s; }
body.is-entering-gate #gateScene { animation-play-state: paused; }
@keyframes gateScrim { from { opacity: 0; } to { opacity: .97; } }
@keyframes gateArrival { 0% { opacity: 0; } 55% { opacity: .85; } 100% { opacity: .45; } }

/* Choosing a traveler carries their own scene forward before the six doors appear. */
.identity-transition { --arrival-rgb: 163, 157, 226; position: fixed; inset: 0; z-index: 181; overflow: hidden; pointer-events: none; }
.identity-transition[data-identity=heart] { --arrival-rgb: 209, 151, 189; }
.identity-transition[data-identity=chooser] { --arrival-rgb: 224, 183, 125; }
.identity-transition[data-identity=stargazer] { --arrival-rgb: 131, 183, 211; }
.identity-transition-light { position: absolute; inset: 0; background: radial-gradient(ellipse at 50% 44%, rgba(var(--arrival-rgb), .3), transparent 67%); animation: identityLight 1.75s ease both; }
.identity-transition .identity-flight { position: absolute; display: block; margin: 0; border: 1px solid rgba(var(--arrival-rgb), .25); border-radius: 20px; overflow: hidden; transition: none; will-change: transform, opacity; z-index: 1;
  mask-image: none;
  -webkit-mask-image: none;
}
.identity-transition .identity-flight img { width: 100%; height: 100%; object-fit: cover; filter: brightness(1.12) saturate(1.06); }
.identity-transition-stars { position: absolute; inset: 0; }
.identity-transition-stars i { position: absolute; left: 50%; top: 44%; width: 3px; height: 3px; border-radius: 50%; background: rgb(var(--arrival-rgb)); box-shadow: 0 0 10px rgba(var(--arrival-rgb), .8); animation: identityStar 1.6s ease-out var(--spark-delay) both; }
.identity-transition-caption { position: absolute; z-index: 2; left: 50%; top: calc(44% + min(40vw, 35vh) + 16px); width: min(600px, 92vw); text-align: center; animation: identityCaption 1.75s ease both; }
.identity-transition-caption b { display: block; font-size: clamp(24px, 3vw, 34px); font-weight: 500; letter-spacing: .16em; color: var(--text-1); }
.identity-transition-caption p { margin-top: 12px; font-size: 12px; line-height: 1.8; color: var(--text-2); }
body.is-entering-identity .j-stage[data-stage=identity] { animation: none; opacity: .06; transition: opacity .35s; }
.id-card:disabled { cursor: default; }
@keyframes identityLight { 0% { opacity: 0; } 40%, 75% { opacity: 1; } 100% { opacity: .3; } }
@keyframes identityStar { 0% { opacity: 0; transform: rotate(var(--spark-angle)) translateY(35px) scale(.3); } 25% { opacity: .9; } 100% { opacity: 0; transform: rotate(var(--spark-angle)) translateY(min(48vw, 48vh)) scale(.5); } }
@keyframes identityCaption { 0%, 20% { opacity: 0; transform: translate(-50%, 12px); } 45%, 74% { opacity: 1; transform: translate(-50%, 0); } 100% { opacity: 0; transform: translate(-50%, -8px); } }

/* Each of the six original gates has its own arrival scene. */
.door-transition { position: fixed; inset: 0; z-index: 182; overflow: hidden; pointer-events: none; }
.door-transition-light { position: absolute; inset: 0; background: radial-gradient(ellipse at 50% 44%, rgba(var(--door-rgb), .35), transparent 68%); animation: identityLight 1.8s ease both; }
.door-transition .door-flight { position: absolute; gap: 0; margin: 0; cursor: default; pointer-events: none; transform-origin: center; transition: none; will-change: transform, opacity; }
.door-transition .door-flight .door-arch { height: 100%; aspect-ratio: auto; border-color: rgba(var(--door-rgb), .65); box-shadow: 0 0 55px rgba(var(--door-rgb), .2), inset 0 0 30px #0005; }
.door-transition .door-flight .door-leaf { transition: transform 1s cubic-bezier(.4,.02,.2,1), opacity .8s ease .1s; }
.door-transition .door-flight.is-open .door-leaf-l { transform: translateX(-88%) rotateY(50deg); opacity: .04; }
.door-transition .door-flight.is-open .door-leaf-r { transform: translateX(88%) rotateY(-50deg); opacity: .04; }
.door-transition-orbit { position: absolute; left: 50%; top: 44%; width: min(70vw, 75vh); aspect-ratio: 1; transform: translate(-50%, -50%); border: 1px solid rgba(var(--door-rgb), .2); border-radius: 50%; opacity: 0; animation: doorOrbit 1.8s ease both; }
.door-transition-orbit::before, .door-transition-orbit::after { content: ""; position: absolute; inset: 10%; border: 1px dashed rgba(var(--door-rgb), .16); border-radius: 50%; }
.door-transition-orbit::after { inset: -12%; border-style: solid; opacity: .35; }
.door-transition-caption { position: absolute; z-index: 2; left: 50%; bottom: max(4vh, 18px); width: min(520px, 90vw); padding: 16px 22px 10px; text-align: center; border-radius: 20px; background: var(--bg-0); box-shadow: 0 0 50px 20px var(--bg-0); animation: doorCaption 1.8s ease both; }
.door-transition-caption small { color: rgb(var(--door-rgb)); font-size: 10px; letter-spacing: .22em; }
.door-transition-caption h2 { margin: 6px 0 9px; font-size: clamp(26px, 3vw, 37px); font-weight: 500; letter-spacing: .1em; }
.door-transition-caption p { font-size: 12px; line-height: 1.8; color: var(--text-2); }
.door-transition-caption > i { display: block; width: min(220px, 70%); height: 1px; margin: 18px auto 0; background: linear-gradient(90deg, transparent, rgba(var(--door-rgb), .7), transparent); animation: doorThread 1.8s ease both; }
body.is-entering-door .path-stage.is-on { opacity: .05; animation: none; transition: opacity .35s; }
@keyframes doorOrbit { 0% { opacity: 0; scale: .65; } 45%, 70% { opacity: 1; scale: 1; } 100% { opacity: 0; scale: 1.3; } }
@keyframes doorCaption { 0%, 12% { opacity: 0; transform: translate(-50%, 12px); } 35%, 85% { opacity: 1; transform: translate(-50%, 0); } 100% { opacity: .8; transform: translate(-50%, 0); } }
@keyframes doorThread { from { transform: scaleX(0); opacity: 0; } 40% { opacity: 1; } to { transform: scaleX(1); opacity: .7; } }
html[data-theme=day] .door-transition-caption small { color: var(--text-2); }
@media (max-height: 560px) {
  .identity-transition-caption { top: calc(44% + min(40vw, 35vh) + 8px); }
  .identity-transition-caption b { font-size: 24px; }
  .identity-transition-caption p { display: none; }
  .door-transition-caption { bottom: 10px; padding: 10px 16px 4px; }
  .door-transition-caption h2 { font-size: 23px; margin: 3px 0; }
  .door-transition-caption p { font-size: 10px; }
  .door-transition-caption > i { margin-top: 9px; }
}
@media (max-width: 980px) {
  .j-stage[data-stage=gate].is-on { grid-template-columns: minmax(180px, .75fr) minmax(0, 1fr); gap: 36px; }
  .gate-copy .hero-title { font-size: 33px; }
}
@media (max-width: 680px) {
  .j-stage[data-stage=gate].is-on { display: flex; gap: 20px; padding: 8px 0 20px; }
  .gate-visual { display: grid; grid-template-columns: 78px minmax(0, 1fr); gap: 0 16px; align-items: center; width: min(100%, 340px); text-align: left; }
  .j-stage[data-stage=gate] .gate-visual .gate-scene { width: 78px; margin: 0; grid-row: 1 / 3; }
  .gate-visual .gate-hint { margin: 0; font-size: 10px; align-self: end; }
  .gate-visual .hero-quote { margin: 6px 0 0; font-size: 10px; align-self: start; }
  .gate-copy .hero-title { font-size: 29px; text-align: left; line-height: 1.4; }
  .gate-copy .hero-sub { text-align: left; font-size: 12px; margin: 12px 0 24px; }
  .gate-copy .entry-panel textarea { min-height: 104px; }
  .entry-journey { margin-top: 20px; padding-top: 20px; }
  .entry-journey .entry-actions { flex-direction: row; align-items: center; gap: 10px 16px; }
  .entry-journey .entry-actions .primary-btn { width: auto; padding: 12px 20px; font-size: 13px; }
  .entry-journey .entry-actions .ghost-btn { font-size: 11px; }
  .entry-journey .demo-note { text-align: left; }
}
@media (prefers-reduced-motion: reduce) {
  .gate-transition, .identity-transition, .door-transition { display: none; }
  body.is-entering-gate .gate-visual, body.is-entering-gate .gate-copy { opacity: 1; }
}
