:root {
  --ink: #eef2f6; --muted: #8b95a3; --cyan: #00e5ff; --gold: #d4af37;
  --focus-glow: rgba(0,229,255,0.4); --radius-md: 12px; --radius-lg: 16px;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; background: #000; color: var(--ink); width: 600px; height: 600px; overflow: hidden; }
#app { width: 600px; height: 600px; position: relative; }

.screen { position: absolute; inset: 0; display: flex; flex-direction: column; }
.screen.hidden { display: none !important; }

.header { display: flex; align-items: center; gap: 12px; padding: 16px 20px; background: #0a0e14; flex-shrink: 0; border-radius: var(--radius-md); margin: 8px; }
.header h1 { font-size: 24px; font-weight: 700; flex: 1; }
.header-meta { font-size: 14px; color: var(--muted); font-variant-numeric: tabular-nums; }
.back-btn { background: #14141f; color: var(--ink); font-size: 22px; padding: 6px 14px; border-radius: 8px; border: 2px solid transparent; }
.hint { text-align: center; font-size: 14px; color: var(--muted); padding: 10px; }

/* loading / error */
#loading, #error { align-items: center; justify-content: center; gap: 16px; text-align: center; padding: 40px; }
.spinner { width: 48px; height: 48px; border: 5px solid #1a2230; border-top-color: var(--cyan); border-radius: 50%; animation: spin .9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.state-text { font-size: 18px; color: var(--muted); }
.state-icon { font-size: 48px; color: #ff4466; }
.cta { min-height: 88px; padding: 0 36px; background: var(--cyan); color: #04222b; border: 3px solid transparent; border-radius: var(--radius-lg); font-size: 20px; font-weight: 700; cursor: pointer; }
.cta:focus { outline: none; box-shadow: 0 0 26px var(--focus-glow); transform: scale(1.04); }

/* portal carousel */
.carousel { flex: 1; display: flex; align-items: center; justify-content: center; gap: 18px; padding: 0 30px; }
.pcard {
  flex: 0 0 300px; height: 360px; border-radius: 22px; padding: 26px;
  display: flex; flex-direction: column; justify-content: flex-end; gap: 8px;
  background: #10141c; border: 2px solid transparent; cursor: pointer;
  transition: transform .3s cubic-bezier(.6,0,.4,1), box-shadow .3s ease, border-color .3s ease;
  transform: scale(0.9); opacity: 0.5;
}
.pcard.active { transform: scale(1); opacity: 1; border-color: var(--pc); box-shadow: 0 0 34px var(--pcg); }
.pcard-icon { font-size: 40px; }
.pcard-label { font-size: 30px; font-weight: 800; color: #fff; }
.pcard-tag { font-size: 16px; color: var(--muted); line-height: 1.35; }
.pcard-bar { height: 5px; border-radius: 3px; background: var(--pc); width: 60px; box-shadow: 0 0 12px var(--pc); }

/* experience list */
.scroll-region { position: relative; flex: 1; min-height: 0; margin: 0 8px 8px; }
.scroll-body { height: 100%; overflow-y: auto; padding: 8px; display: flex; flex-direction: column; gap: 10px; scrollbar-width: none; }
.scroll-body::-webkit-scrollbar { display: none; }
.scrim { position: absolute; left: 0; right: 0; height: 48px; pointer-events: none; z-index: 5; opacity: 0; transition: opacity .25s; }
.scrim-top { top: 0; background: linear-gradient(to bottom, #000, transparent); }
.scrim-bottom { bottom: 0; background: linear-gradient(to top, #000, transparent); }
.scrim.show { opacity: 1; }
.exp-row { min-height: 88px; padding: 14px 18px; background: #14141f; border: 2px solid transparent; border-radius: var(--radius-md); cursor: pointer; display: flex; flex-direction: column; justify-content: center; gap: 4px; flex-shrink: 0; transition: all .15s; }
.exp-row:focus { outline: none; border-color: var(--cyan); box-shadow: 0 0 22px var(--focus-glow); background: #1a1a2e; }
.exp-row-title { font-size: 19px; font-weight: 600; }
.exp-row-loc { font-size: 14px; color: var(--muted); }

/* experience video (feathered floating panel + D-pad pan) */
#experience { overflow: hidden; }
#clip-wrap {
  position: absolute; inset: 0; overflow: hidden;
  -webkit-mask-image: radial-gradient(ellipse 66% 64% at 50% 50%, #000 50%, transparent 100%);
  mask-image: radial-gradient(ellipse 66% 64% at 50% 50%, #000 50%, transparent 100%);
}
#clip {
  position: absolute; top: 0; left: -150px; width: 900px; height: 600px; object-fit: cover;
  transition: transform .28s ease;
}
.clip-loading { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; z-index: 3; }
.exp-overlay { position: absolute; left: 0; right: 0; bottom: 0; padding: 20px 24px 16px; z-index: 4;
  background: linear-gradient(to top, rgba(0,0,0,0.85), transparent); }
.exp-title { font-size: 26px; font-weight: 800; text-shadow: 0 2px 8px #000; }
.exp-loc { font-size: 16px; color: var(--cyan); margin-top: 2px; }
.exp-overlay .hint { text-align: left; padding: 8px 0 0; }
