/* 심야사주식당 도입부 — 골목 · 노렌 · 카운터 (index 전용)
   밖(골목)은 새벽의 남색, 안(카운터)은 텅스텐 주황. 이미지 없이 CSS/SVG만 사용. */

.scene { position: relative; overflow: hidden; }

/* ══════════ 장면 1 · 골목 ══════════ */
.s-alley {
  min-height: 92vh;
  display: flex; flex-direction: column; justify-content: flex-end;
  background:
    radial-gradient(900px 420px at 50% -60px, #232a4d 0%, rgba(35, 42, 77, 0) 62%),
    linear-gradient(180deg, #0b0e1b 0%, #10132000 40%),
    linear-gradient(180deg, #0c0f1c 0%, #131830 62%, #1a1408 125%);
  color: #ece7db;
}
.s-alley .sky i {
  position: absolute; width: 2px; height: 2px; border-radius: 50%;
  background: #cfd3ea; opacity: .65;
}
.s-alley .moon2 {
  position: absolute; top: 64px; right: 13%; width: 30px; height: 30px; border-radius: 50%;
  box-shadow: 7px 3px 0 0 #e8e3d2; transform: rotate(-18deg); opacity: .85;
}
.alley-copy { position: relative; z-index: 3; text-align: center; padding: 84px 22px 0; }
.alley-copy .eyebrow2 {
  font-size: 12px; letter-spacing: .22em; color: #f2b45c; font-weight: 700; margin: 0 0 14px;
}
.alley-copy h1 {
  font-size: clamp(28px, 6.4vw, 46px); line-height: 1.35; margin: 0 0 16px;
  font-weight: 800; letter-spacing: -0.01em; color: #f2ecdf; text-wrap: balance;
}
.alley-copy .sub2 {
  max-width: 520px; margin: 0 auto 26px; color: #a8a5ba; font-size: 15.5px; line-height: 1.75;
}
.introctas { display: flex; gap: 12px; justify-content: center; align-items: center; flex-wrap: wrap; }
.btn-go {
  appearance: none; border: 0; cursor: pointer;
  background: linear-gradient(180deg, #f2b45c, #e09a37); color: #241708;
  font-size: 16px; font-weight: 800; padding: 14px 26px; border-radius: 14px;
  box-shadow: 0 6px 24px rgba(242, 180, 92, .28); font-family: inherit;
}
.btn-go:active { transform: translateY(1px); }
.btn-skip { color: #8a879e; font-size: 13.5px; text-decoration: none; padding: 10px; }
.btn-skip:hover { color: #cfccdd; }

/* 골목 아트 */
.alleyart { position: relative; height: 300px; margin-top: 26px; z-index: 2; }
.alleyart .bld { position: absolute; bottom: 0; background: #090c16; width: 34%; }
.alleyart .bld.l { left: 0; height: 250px; border-radius: 0 8px 0 0; }
.alleyart .bld.r { right: 0; height: 205px; border-radius: 8px 0 0 0; }
.alleyart .bld .w {
  position: absolute; width: 9px; height: 12px; border-radius: 1.5px;
  background: rgba(242, 180, 92, .26);
}
.shopfront {
  position: absolute; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 190px; text-align: center;
}
.shopfront .lant {
  position: absolute; bottom: 168px; left: -18px;
  writing-mode: vertical-rl; height: 118px; white-space: nowrap;
  font-weight: 800; font-size: 15px; letter-spacing: .3em;
  color: #ffe3d6; background: linear-gradient(180deg, #e2593c, #c74830);
  border-radius: 10px; padding: 13px 7px 10px;
  box-shadow: 0 0 22px rgba(238, 109, 85, .5), 0 0 70px rgba(238, 109, 85, .16);
  text-shadow: 0 0 9px rgba(255, 227, 214, .65);
}
.noren-mini { display: flex; gap: 6px; justify-content: center; padding-top: 4px; }
.noren-mini::before {
  content: ""; position: absolute; top: 0; left: 8px; right: 8px; height: 5px;
  background: #3a3050; border-radius: 3px;
}
.noren-mini i {
  width: 52px; height: 88px; display: block;
  background: linear-gradient(180deg, #232a52, #1c2240);
  border: 1px solid #343b5c; border-top: 0; border-radius: 0 0 4px 4px;
}
.noren-mini i:nth-child(2) { height: 80px; }
.doorglow {
  height: 84px; margin: -60px auto 0; width: 150px; border-radius: 8px 8px 0 0;
  background: linear-gradient(180deg, rgba(242, 180, 92, 0), rgba(242, 180, 92, .2));
}
@media (prefers-reduced-motion: no-preference) {
  .shopfront .lant { animation: lantflick 6s infinite; }
  @keyframes lantflick {
    0%, 100% { opacity: 1; } 91% { opacity: 1; } 92% { opacity: .78; }
    93% { opacity: 1; } 96% { opacity: .88; } 97% { opacity: 1; }
  }
}

/* ══════════ 장면 2 · 노렌 ══════════ */
.s-noren {
  min-height: 86vh; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 26px; padding: 60px 20px;
  background: linear-gradient(180deg, #1a1408 -30%, #12152a 30%, #101320 100%);
}
.notepaper {
  background: #f4ecd9; color: #4a3b28; font-size: 14.5px; font-weight: 600; line-height: 1.7;
  padding: 14px 22px; border-radius: 3px; transform: rotate(-1.6deg);
  box-shadow: 0 6px 18px rgba(0, 0, 0, .4); margin: 0; text-align: center; position: relative;
}
.notepaper::before {
  content: ""; position: absolute; top: -7px; left: 50%; transform: translateX(-50%);
  width: 34px; height: 12px; background: rgba(238, 109, 85, .55); border-radius: 2px;
}
.noren-big {
  appearance: none; border: 0; background: none; cursor: pointer; position: relative;
  display: flex; gap: 10px; padding: 8px 0 0; font-family: inherit;
}
.noren-big::before {
  content: ""; position: absolute; top: 0; left: -14px; right: -14px; height: 7px;
  background: #3a3050; border-radius: 4px;
}
.noren-big .warm {
  position: absolute; inset: 7px 6px 0; z-index: 0; border-radius: 0 0 8px 8px;
  background: radial-gradient(150px 190px at 50% 82%, rgba(242, 180, 92, .55), rgba(242, 180, 92, .06) 68%);
}
.noren-big .np {
  position: relative; z-index: 1;
  width: min(24vw, 96px); height: min(52vw, 210px);
  display: flex; align-items: flex-start; justify-content: center; padding-top: 26px;
  background: linear-gradient(180deg, #232a52, #1b2140);
  border: 1px solid #3a4166; border-top: 0; border-radius: 0 0 6px 6px;
  color: #ece7db; font-size: clamp(18px, 5vw, 24px); font-weight: 800;
  writing-mode: vertical-rl; letter-spacing: .34em;
  transition: transform .7s cubic-bezier(.6, .05, .3, 1), opacity .7s;
  transform-origin: top center;
}
.noren-big:hover .np1, .noren-big:focus-visible .np1 { transform: rotate(-4deg); }
.noren-big:hover .np3, .noren-big:focus-visible .np3 { transform: rotate(4deg); }
.s-noren.open .np1 { transform: rotate(-58deg) translateY(-12px); opacity: .25; }
.s-noren.open .np2 { transform: rotate(6deg) translateY(-6px); opacity: .3; }
.s-noren.open .np3 { transform: rotate(56deg) translateY(-12px); opacity: .25; }
.norenhint { color: #8a879e; font-size: 12.5px; letter-spacing: .14em; margin: 0; }

/* ══════════ 장면 3 · 카운터 ══════════ */
.s-counter {
  background:
    radial-gradient(700px 420px at 50% 34%, rgba(242, 168, 92, .16), rgba(242, 168, 92, 0) 70%),
    linear-gradient(180deg, #17130e 0%, #1b150d 55%, #141117 100%);
  padding: 58px 0 64px; color: #f2ead9;
}
.counterroom { max-width: 720px; margin: 0 auto; padding: 0 18px; }
.roomtitle {
  text-align: center; color: #b9a488; font-size: 12px; letter-spacing: .26em; margin: 0 0 22px;
}
.hostwrap { position: relative; text-align: center; }
.hostwrap .hostsvg { width: min(74vw, 300px); height: auto; display: inline-block; vertical-align: bottom; }
.hostwrap .catsvg {
  width: min(21vw, 86px); height: auto; position: absolute; bottom: 12px; right: 6%;
}
.counterbar {
  height: 40px; margin: -14px -18px 0; position: relative; z-index: 2;
  background: linear-gradient(180deg, #8a6844 0 34%, #6d5136 34%);
  border-radius: 4px 4px 0 0;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, .35);
}
/* 선반 술병(고전 라벨) 실루엣 */
.shelfrow {
  display: flex; gap: 14px; justify-content: center; align-items: flex-end;
  margin-bottom: 8px; opacity: .9;
}
.shelfrow .bt {
  width: 26px; border-radius: 8px 8px 3px 3px; position: relative;
  box-shadow: inset 0 -6px 12px rgba(0, 0, 0, .3);
}
.shelfrow .bt::after {
  content: attr(data-l); position: absolute; left: 50%; top: 46%; transform: translate(-50%, -50%);
  writing-mode: vertical-rl; font-size: 8.5px; letter-spacing: .1em; color: #f4ecd9;
  background: rgba(20, 14, 8, .55); padding: 5px 2px; border-radius: 2px; white-space: nowrap;
}
.shelfrow small { color: #8f7c62; font-size: 10.5px; align-self: center; letter-spacing: .12em; }

/* 채팅 */
.chat { margin-top: 26px; display: flex; flex-direction: column; gap: 11px; }
.msg { display: flex; gap: 9px; align-items: flex-end; }
.msg .ava2 {
  width: 34px; height: 34px; border-radius: 50%; flex: none;
  background: #3f3428; border: 1px solid #5b4a35; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  color: #f2b45c; font-size: 13px; font-weight: 800;
}
.msg .bb2 {
  background: #f7efe2; color: #2b2118; border-radius: 4px 16px 16px 16px;
  padding: 11px 15px; font-size: 15px; line-height: 1.7; max-width: 86%;
  box-shadow: 0 3px 14px rgba(0, 0, 0, .25);
}
.msg .bb2 b { color: #b0472e; }
.msg.sys { justify-content: center; }
.msg.sys .bb2 {
  background: rgba(242, 180, 92, .12); color: #e8c896; border: 1px dashed rgba(242, 180, 92, .4);
  border-radius: 12px; font-size: 13px; box-shadow: none;
}
.choices2 { display: flex; flex-direction: column; gap: 8px; margin: 2px 0 4px 43px; }
.choices2 .ch2 {
  appearance: none; cursor: pointer; text-align: left; text-decoration: none; font-family: inherit;
  border: 1px solid rgba(242, 180, 92, .45); color: #f2cf9a;
  background: rgba(242, 180, 92, .07); border-radius: 13px; padding: 11px 15px;
  font-size: 14.5px; font-weight: 600; line-height: 1.5; display: block;
  transition: background .18s, transform .18s;
}
.choices2 .ch2:hover { background: rgba(242, 180, 92, .16); transform: translateX(3px); }
.choices2 .ch2 small { display: block; font-weight: 400; font-size: 12px; color: #b7a37f; margin-top: 2px; }
.gobtn {
  display: inline-block; margin: 4px 0 2px 43px; text-decoration: none;
  background: linear-gradient(180deg, #f2b45c, #e09a37); color: #241708;
  font-weight: 800; font-size: 15px; padding: 13px 22px; border-radius: 13px;
  box-shadow: 0 6px 22px rgba(242, 180, 92, .26);
}
.gobtn:active { transform: translateY(1px); }
.menupeek { text-align: center; margin: 26px 0 0; }
.menupeek a { color: #8f7c62; font-size: 13px; text-decoration: underline; text-underline-offset: 3px; }
.menupeek a:hover { color: #d8c5a4; }

/* 잔에서 올라오는 김 */
.steam { animation: steam 2.6s ease-in-out infinite; transform-origin: bottom center; opacity: .7; }
.steam.s2 { animation-delay: 1.2s; }
@keyframes steam {
  0% { transform: translateY(0) scaleX(1); opacity: 0; }
  30% { opacity: .7; }
  100% { transform: translateY(-9px) scaleX(1.25); opacity: 0; }
}

/* ══════════ 진행 연출 (JS 있을 때만 숨겼다 순서대로 공개) ══════════ */
.js-intro .msg, .js-intro .choices2, .js-intro .gobtn, .js-intro .menupeek { opacity: 0; transform: translateY(7px); }
.js-intro .msg.on, .js-intro .choices2.on, .js-intro .gobtn.on, .js-intro .menupeek.on {
  opacity: 1; transform: none; transition: opacity .45s ease, transform .45s ease;
}
.js-intro [data-branch] { display: none; }
.js-intro [data-branch].pick { display: flex; }
.js-intro .gobtn[data-branch].pick { display: inline-block; }
.js-intro .s-noren .postgate { visibility: hidden; }
/* 재방문: 골목·노렌 접기 */
.revisit .s-alley, .revisit .s-noren { display: none; }
.revisit .s-counter { padding-top: 74px; }

@media (prefers-reduced-motion: reduce) {
  .js-intro .msg, .js-intro .choices2, .js-intro .gobtn, .js-intro .menupeek { transition: none; }
  .noren-big .np { transition: none; }
  .steam { animation: none; }
}

@media (min-width: 760px) {
  .alleyart { height: 340px; }
  .alleyart .bld.l { height: 290px; }
  .alleyart .bld.r { height: 240px; }
  .s-counter { padding-top: 70px; }
  .hostwrap .catsvg { right: 14%; }
}
