/* ==========================================================================
   H — ARCADE
   --------------------------------------------------------------------------
   리눅스 콘솔 위에 8비트 게임을 얹는다. 글자는 픽셀 서체, 색은 인광 녹색에
   몇 가지 원색만. 화면 아래에서 두 사람이 계속 달리고, 스크롤을 내리면
   세상이 왼쪽으로 흘러가며 우리가 같이 한 것들이 지나간다.

   폰트와 무대는 js/arcade.js 가 이 테마일 때만 붙인다.
   ========================================================================== */
[data-theme='arcade'] {
  --paper: #0a0e0a;
  --ink:   #b8f5c0;        /* 인광 녹색 */
  --ink-2: #7fc78c;
  --ink-3: #4b7a55;
  --rule:  #1d2a1f;
  --fill:  #101a12;
  --amber: #f2c744;

  --font-body: 'Galmuri11', 'Galmuri9', 'D2Coding', monospace;
  --font-display: 'Galmuri11', 'Galmuri9', monospace;
  --font-label: 'Press Start 2P', 'Galmuri11', monospace;
  --font-num: 'Galmuri11', 'Press Start 2P', monospace;

  --fs-body: 0.875rem;
  --lh-body: 1.9;          /* 픽셀 서체는 촘촘해서 행간을 더 준다 */
  --fs-title: 1.0625rem;
  --fs-date: 1.75rem;
  --fs-count: 1.125rem;
  --fs-meta: 0.75rem;
  --ls-label: 0.08em;      /* 픽셀 서체에 넓은 자간을 주면 글자가 흩어진다 */
  --sec: 3rem;
  --stage: 5.5rem;         /* 아래 무대가 차지하는 높이 */
}
[data-theme='arcade'] body {
  background: var(--paper);
  /* 주사선 — 아주 옅게. 진하면 글자를 읽을 수 없다. */
  background-image: repeating-linear-gradient(
    to bottom, rgba(255, 255, 255, 0.022) 0 1px, transparent 1px 3px);
  padding-bottom: var(--stage);
}
[data-theme='arcade'] .sec, [data-theme='arcade'] .foot { text-align: left; }
[data-theme='arcade'] .sec + .sec { border-color: var(--rule); }
[data-theme='arcade'] .sec + .sec[data-reveal='rule']::before { background: var(--rule); }

[data-theme='arcade'] .label { color: var(--ink-3); font-size: 0.5rem; }
[data-theme='arcade'] .title { color: var(--amber); letter-spacing: 0; }
[data-theme='arcade'] .invite { color: var(--ink-2); }
[data-theme='arcade'] .names__row { justify-content: flex-start; }
[data-theme='arcade'] .names__name { color: var(--amber); font-size: 1rem; }
[data-theme='arcade'] .date__big { color: var(--amber); letter-spacing: 0; }
[data-theme='arcade'] .cal { margin-left: 0; max-width: 100%; border-color: var(--rule); }
[data-theme='arcade'] .cal__cell { color: var(--ink-2); }
[data-theme='arcade'] .cal__cell--day { color: var(--amber); }
[data-theme='arcade'] .cal__heart path { stroke: var(--amber); }
[data-theme='arcade'] .count { justify-content: flex-start; }
[data-theme='arcade'] .count__num { color: var(--amber); }
[data-theme='arcade'] .cue span { background: var(--ink-3); }

/* 셸 프롬프트 */
.arc__cmd {
  font-family: var(--font-body);
  font-size: 0.75rem;
  color: var(--ink-3);
  margin-bottom: 0.5rem;
  word-break: break-all;
}
.arc__user { color: var(--ink-2); }
.arc__path { color: var(--ink-3); }
.arc__in { color: var(--ink); }
.arc__in::after {
  content: '_';
  color: var(--amber);
  animation: arc-blink 1.1s steps(1) infinite;
}
@keyframes arc-blink { 0%, 50% { opacity: 1; } 50.01%, 100% { opacity: 0; } }

/* 약도는 검은 바탕에서 타 버린다. 뒤집고 녹색으로 물들인다. */
[data-theme='arcade'] .map img { filter: invert(1) sepia(1) hue-rotate(60deg) saturate(2.2) brightness(0.85); }
[data-theme='arcade'] .gal__item, [data-theme='arcade'] .gal__thumb { background: var(--fill); }
[data-theme='arcade'] .gal__arrow { mix-blend-mode: normal; color: var(--amber); }
[data-theme='arcade'] .btn, [data-theme='arcade'] .tab, [data-theme='arcade'] .acct__copy {
  border-radius: 0;
  border-color: var(--ink-3);
  color: var(--ink);
}
[data-theme='arcade'] .btn:hover,
[data-theme='arcade'] .tab[aria-selected='true'],
[data-theme='arcade'] .acct__copy[data-done='true'] {
  background: var(--ink); color: var(--paper); border-color: var(--ink);
}
[data-theme='arcade'] .acct__card {
  border-color: var(--rule); background: var(--fill); text-align: left;
}
[data-theme='arcade'] .acct__who, [data-theme='arcade'] .acct__line { justify-content: flex-start; }
[data-theme='arcade'] .acct__copy { margin-left: auto; }
[data-theme='arcade'] .acct__num { color: var(--amber); }
[data-theme='arcade'] .tabs { margin-left: 0; border-radius: 0; border-color: var(--ink-3); }

/* --------------------------------------------------------------------------
   아래 무대 — 카메라는 고정, 세상이 흐른다
   -------------------------------------------------------------------------- */
.arc {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  height: var(--stage);
  z-index: 40;
  overflow: hidden;
  /* 위쪽만 살짝 녹이고 나머지는 꽉 막는다. 얇게 두면 본문 글자가
     소품 뒤로 비쳐서 무대가 지저분해진다. */
  background: linear-gradient(to bottom, rgba(10, 14, 10, 0) 0, var(--paper) 22%);
  pointer-events: none;
}
.arc__ground {
  position: absolute;
  left: 0; right: 0; bottom: 1.125rem;
  height: 2px;
  background: var(--ink-3);
}
.arc__world {
  position: absolute;
  left: 0; bottom: 1.375rem;
  width: 360%;
  height: 3rem;
  /* 스크롤 위치를 JS 가 translateX 로 넣는다. 관성을 조금 준다. */
  transition: transform 180ms linear;
}
.arc__prop {
  position: absolute;
  bottom: 0;
  display: grid;
  justify-items: center;
  gap: 0.25rem;
}
.arc__tag {
  font-family: var(--font-body);
  font-size: 0.5rem;
  color: var(--ink-3);
  white-space: nowrap;
}
.arc__runners {
  position: absolute;
  left: 2rem; bottom: 1.375rem;
  display: flex;
  gap: 0.375rem;
  align-items: flex-end;
}
.arc__who { line-height: 0; }

/* --------------------------------------------------------------------------
   부팅 화면
   -------------------------------------------------------------------------- */
.is-booting { overflow: hidden; }
.boot {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: #060806;
  color: #b8f5c0;
  font-family: 'Galmuri11', monospace;
  font-size: 0.6875rem;
  line-height: 1.7;
  padding: 1.25rem 1rem calc(1.25rem + env(safe-area-inset-bottom));
  display: grid;
  grid-template-rows: 1fr auto;
  gap: 1rem;
  transition: opacity 400ms ease-out;
}
.boot.is-gone { opacity: 0; pointer-events: none; }
.boot__out {
  margin: 0;
  overflow: hidden;
  white-space: pre-wrap;
  word-break: break-all;
  align-self: end;
}
.boot__skip {
  font: inherit;
  color: #4b7a55;
  justify-self: start;
  padding: 0.5rem 0;
  animation: arc-blink 1.4s steps(1) infinite;
}

@media (prefers-reduced-motion: reduce) {
  .arc__in::after, .boot__skip { animation: none; }
  .arc__world { transition: none; }
  .boot { display: none; }
}
