/* J2 — single-layer narrative UI. One interaction surface at a time. */
[data-scene^="j2-"] .scene-vignette{
  background:linear-gradient(180deg,rgba(2,12,15,.22),transparent 24%,transparent 58%,rgba(2,13,17,.5));
}

.j2-panel{
  position:absolute;z-index:24;left:clamp(18px,4.5vw,68px);bottom:clamp(22px,4.5vh,58px);
  width:min(480px,42vw);padding:18px 19px 17px;border:1px solid rgba(255,255,255,.2);border-radius:22px;
  background:linear-gradient(150deg,rgba(9,35,40,.88),rgba(7,27,33,.76));
  box-shadow:0 22px 60px rgba(0,0,0,.26);backdrop-filter:blur(18px);text-shadow:none;
  animation:j2PanelIn .35s ease both;
}
.j2-panel small{display:block;margin-bottom:7px;color:#efc2a9;font-size:10px;font-weight:850;letter-spacing:.16em;text-transform:uppercase}
.j2-panel h2{margin:0;color:#fffaf0;font:500 clamp(23px,2.45vw,36px)/1.08 Georgia,serif;letter-spacing:-.018em;text-wrap:balance}
.j2-panel p{margin:10px 0 0;color:rgba(255,250,240,.86);font-size:14px;line-height:1.5}
.j2-actions{display:flex;flex-wrap:wrap;gap:8px;margin-top:15px}
.j2-action,.j2-pay-method,.j2-coin,.j2-hold-action{
  min-height:44px;border:1px solid rgba(255,255,255,.24);border-radius:999px;background:rgba(250,241,225,.96);color:#17363d;
  box-shadow:0 8px 20px rgba(0,0,0,.12);font-size:12px;font-weight:800;line-height:1.25;transition:transform .18s ease,background .18s ease,border-color .18s ease;
}
.j2-action{padding:10px 16px}
.j2-action:hover,.j2-pay-method:hover,.j2-coin:hover{transform:translateY(-1px);background:#fff9ee;border-color:rgba(255,255,255,.48)}
.j2-action--quiet{background:rgba(7,29,35,.5);color:#fffaf0;box-shadow:none}
.j2-language-note{display:block;margin-top:8px;padding-top:8px;border-top:1px solid rgba(255,255,255,.15);color:rgba(255,250,240,.76);font-size:12px;line-height:1.4}
.j2-language-note b{color:#fffaf0;font-family:Georgia,serif;font-size:15px}

.j2-eyelids{position:absolute;z-index:18;inset:0;overflow:hidden;pointer-events:none}
.j2-eyelids i{position:absolute;left:-4%;width:108%;height:52%;background:#020607;animation:j2EyesOpen 1.45s cubic-bezier(.25,.7,.2,1) forwards}
.j2-eyelids i:first-child{top:-2%;transform-origin:top center}.j2-eyelids i:last-child{bottom:-2%;transform-origin:bottom center}
.j2-morning-breath,.j2-walk-caption{
  position:absolute;z-index:20;left:50%;bottom:clamp(28px,5vh,60px);transform:translateX(-50%);margin:0;padding:8px 12px;border-radius:999px;
  background:rgba(7,29,35,.38);color:rgba(255,250,240,.88);font:500 12px/1.4 Georgia,serif;backdrop-filter:blur(10px);white-space:nowrap;max-width:calc(100% - 32px);overflow:hidden;text-overflow:ellipsis
}
.scene--morning-awake .world img{animation:j2SitUp .8s ease both}.scene--breakfast-eating .world img{animation:j2BreakfastBreath 7s ease-out both}

/* Aoi walk: image carries the movement; dialogue stays clear of her face. */
.scene--street-walking .world img,.scene--street-stroll .world img{animation:j2WalkDrift 5.2s ease-out both}
.scene--street-glance .j2-panel--walk-aoi{left:auto;right:clamp(18px,4.5vw,68px);width:min(390px,34vw)}
.j2-walk-caption--aoi{max-width:min(680px,74vw);white-space:normal;text-align:center}

/* Konbini shelf: the shelf is the only active UI layer. */
.j2-shop-dock{
  position:absolute;z-index:24;left:clamp(16px,3vw,42px);right:clamp(16px,3vw,42px);bottom:clamp(18px,3.5vh,42px);
  padding:14px 15px 13px;border:1px solid rgba(255,255,255,.18);border-radius:22px;background:rgba(7,28,34,.88);box-shadow:0 22px 64px rgba(0,0,0,.28);backdrop-filter:blur(18px)
}
.j2-shop-head{display:flex;align-items:end;justify-content:space-between;gap:16px;margin-bottom:10px}
.j2-shop-head>div small,.j2-shop-head>div b{display:block}.j2-shop-head>div small{color:#efc2a9;font-size:10px;font-weight:850;letter-spacing:.14em;text-transform:uppercase}.j2-shop-head>div b{margin-top:3px;font:500 18px Georgia,serif}
.j2-shop-head nav{display:flex;gap:6px}
.j2-shop-tab{display:flex;align-items:center;gap:6px;min-height:38px;padding:7px 11px;border:1px solid rgba(255,255,255,.16);border-radius:999px;background:rgba(255,255,255,.06);color:#fffaf0;font-size:11px;font-weight:760}
.j2-shop-tab svg,.j2-pay-method svg,.j2-action svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round;flex:0 0 auto}
.j2-shop-tab.is-active{background:#f2eadc;color:#17363d;border-color:#f2eadc}
.j2-shop-products{display:flex;gap:12px;overflow-x:auto;padding:3px 1px 8px;scroll-snap-type:x proximity;scrollbar-width:none}.j2-shop-products::-webkit-scrollbar{display:none}
.j2-product{position:relative;flex:0 0 118px;scroll-snap-align:start;padding:7px 7px 9px;border:1px solid rgba(255,255,255,.13);border-radius:16px;background:rgba(255,255,255,.05);color:#fffaf0;text-align:left}
.j2-product img{display:block;width:100%;height:80px;object-fit:contain;filter:drop-shadow(0 10px 12px rgba(0,0,0,.28))}.j2-product span,.j2-product small{display:block}.j2-product span{margin-top:5px;font-size:10px;font-weight:800}.j2-product small{margin-top:2px;color:#efc2a9;font-size:10px}.j2-product.is-picked{border-color:#efc2a9;background:rgba(239,194,169,.13)}.j2-product.is-picked::after{content:'✓';position:absolute;top:7px;right:7px;display:grid;place-items:center;width:20px;height:20px;border-radius:50%;background:#f2eadc;color:#17363d;font-size:11px;font-weight:900}
.j2-shop-checkout{display:flex;justify-content:flex-end;margin-top:6px}.j2-shop-checkout .j2-action{min-height:42px}

/* Checkout: compact terminal card, never a floating object over another card. */
.j2-panel--checkout{left:auto;right:clamp(18px,4.5vw,68px);width:min(420px,38vw)}
.j2-panel--checkout .j2-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}
.j2-pay-method{display:flex;align-items:center;justify-content:flex-start;gap:9px;padding:9px 12px;text-align:left}
.j2-coin{width:52px;height:52px;border-radius:50%}.j2-coin b,.j2-coin span{display:block;line-height:1}.j2-coin b{font-size:18px}.j2-coin span{font-size:9px;margin-top:2px}

/* Shrine gestures */
.j2-panel--temizu,.j2-panel--shrine{width:min(430px,39vw)}
.j2-panel--offering .j2-actions{align-items:center}.j2-hold-action{position:relative;overflow:hidden;padding:10px 17px;min-width:190px}.j2-hold-action span{position:relative;z-index:2}.j2-hold-action i{position:absolute;z-index:1;left:0;bottom:0;width:0;height:100%;background:rgba(198,154,84,.38)}
.j2-hold-action.is-holding i{animation:j2Hold var(--hold-duration,1s) linear forwards}

/* Day end is intentionally isolated from other interface. */
.j2-day-end{position:absolute;z-index:24;left:50%;bottom:clamp(28px,6vh,70px);transform:translateX(-50%);display:grid;justify-items:center;width:min(420px,88vw);padding:18px;border-radius:24px;background:rgba(7,29,35,.82);border:1px solid rgba(255,255,255,.18);backdrop-filter:blur(18px);text-align:center}
.j2-day-end small{color:#efc2a9;font-size:10px;font-weight:850;letter-spacing:.18em}.j2-day-end img{width:94px;margin:10px 0;filter:drop-shadow(0 10px 18px rgba(0,0,0,.22))}.j2-day-end p{margin:0 0 12px;color:rgba(255,250,240,.82);font:500 13px/1.45 Georgia,serif}

@keyframes j2PanelIn{from{opacity:0;transform:translateY(10px)}to{opacity:1;transform:none}}
@keyframes j2EyesOpen{0%,12%{transform:scaleY(1)}100%{transform:scaleY(0)}}
@keyframes j2SitUp{from{transform:scale(1.045) translateY(1.8%)}to{transform:scale(1) translateY(0)}}
@keyframes j2BreakfastBreath{from{transform:scale(1.015)}to{transform:scale(1.035)}}
@keyframes j2WalkDrift{from{transform:scale(1.018) translateX(-.35%)}to{transform:scale(1.035) translateX(.15%)}}
@keyframes j2Hold{from{width:0}to{width:100%}}

@media(max-width:800px){
  [data-scene^="j2-"] .chrome{padding-top:var(--safe-top);padding-bottom:18px}
  [data-scene^="j2-"] .identity{font-size:9px;letter-spacing:.1em}
  [data-scene^="j2-"] .identity span{display:none}
  [data-scene^="j2-"] .brand-logo{width:50px;height:38px}
  [data-scene^="j2-"] .place strong{font-size:18px}
  [data-scene^="j2-"] .place span{max-width:54vw;font-size:8px}
  [data-scene^="j2-"] .tool{width:39px;height:39px}

  .j2-panel{left:12px;right:12px;bottom:calc(var(--safe-bottom) + 12px);width:auto;max-height:44dvh;overflow:auto;padding:14px 14px 13px;border-radius:19px}
  .j2-panel h2{font-size:clamp(20px,6vw,27px)}.j2-panel p{font-size:12px;line-height:1.46}.j2-panel small{font-size:9px}
  .j2-actions{display:grid;grid-template-columns:1fr;gap:7px;margin-top:12px}.j2-action,.j2-pay-method{width:100%;min-height:44px;justify-content:center;text-align:center}
  .j2-language-note{font-size:11px}
  .j2-morning-breath,.j2-walk-caption{bottom:calc(var(--safe-bottom) + 20px);font-size:11px;white-space:normal;text-align:center}
  .scene--street-glance .j2-panel--walk-aoi{left:12px;right:12px;width:auto;max-height:34dvh}
  .scene--street-walking .world img,.scene--street-glance .world img,.scene--street-stroll .world img{object-position:center 42%}
  .scene--morning .world img{object-position:center 56%}.scene--breakfast .world img{object-position:center 57%}

  .j2-shop-dock{left:10px;right:10px;bottom:calc(var(--safe-bottom) + 10px);max-height:48dvh;padding:11px 11px 10px;border-radius:18px;overflow:hidden}
  .j2-shop-head{align-items:flex-start;flex-direction:column;gap:8px}.j2-shop-head nav{width:100%;overflow-x:auto;scrollbar-width:none}.j2-shop-head nav::-webkit-scrollbar{display:none}.j2-shop-tab{flex:0 0 auto;min-height:36px;padding:6px 9px}
  .j2-shop-products{gap:8px}.j2-product{flex-basis:96px;border-radius:14px}.j2-product img{height:68px}.j2-product span,.j2-product small{font-size:9px}.j2-shop-checkout .j2-action{width:100%}

  .j2-panel--checkout{left:12px;right:12px;width:auto}.j2-panel--checkout .j2-actions{grid-template-columns:1fr}
  .j2-panel--offering .j2-actions{grid-template-columns:64px 64px 1fr}.j2-panel--offering .j2-action--quiet{width:auto}
  .j2-day-end{bottom:calc(var(--safe-bottom) + 14px)}
}

@media(max-width:390px){
  .j2-panel{max-height:47dvh;padding:12px}.j2-panel h2{font-size:20px}.j2-panel p{font-size:11.5px}
  .j2-shop-dock{max-height:51dvh}.j2-product{flex-basis:88px}.j2-product img{height:62px}
  .j2-panel--offering .j2-actions{grid-template-columns:58px 58px 1fr}.j2-coin{width:50px;height:50px}
}
