/* Copied from service_heartbeat/public/shared/brand.css (2026-11-09, lab main a4c85f4). */
/* OByeolLab brand chrome for the lab: top bar (logo -> obyeollab.com, lab link, language, info), footer, info dialog.
   Colours come from --chrome-* so the same bar sits on the paper hub and on the night-time experiments. */
:root {
  --chrome-bg: rgba(8, 9, 15, 0.72);
  --chrome-ink: #f3efe6;
  --chrome-dim: rgba(243, 239, 230, 0.72);
  --chrome-line: rgba(243, 239, 230, 0.18);
  --chrome-panel: #15161f;
  --chrome-focus: #ffd28a;
  --bar-h: 52px;
  --tap: 44px;
}

/* the language pack is on its way: hide the text, keep the layout (shared/lang-boot.js) */
html.i18n-hold body > :not(canvas):not(.stage) { visibility: hidden; }

.skip {
  position: absolute; left: 8px; top: -60px; z-index: 200;
  padding: 10px 14px; border-radius: 10px; background: var(--chrome-panel); color: var(--chrome-ink); text-decoration: none;
}
.skip:focus { top: 8px; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

:where(a, button, select, summary, [tabindex]):focus-visible { outline: 2px solid var(--chrome-focus); outline-offset: 2px; border-radius: 8px; }

.lab-bar {
  position: fixed; left: 0; right: 0; top: 0; z-index: 70;
  height: calc(var(--bar-h) + env(safe-area-inset-top, 0px));
  padding: env(safe-area-inset-top, 0px) max(8px, env(safe-area-inset-right, 0px)) 0 max(8px, env(safe-area-inset-left, 0px));
  display: flex; align-items: center; gap: 4px;
  background: var(--chrome-bg); color: var(--chrome-ink);
  border-bottom: 1px solid var(--chrome-line);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  font-family: var(--font, system-ui, sans-serif); font-size: 14px; line-height: 1.2;
  user-select: none; -webkit-user-select: none;
}
.lab-bar a { color: inherit; text-decoration: none; }
.lab-bar__brand, .lab-bar__lab {
  display: inline-flex; align-items: center; gap: 8px; min-height: var(--tap); min-width: var(--tap); justify-content: center; padding: 0 6px; border-radius: 10px; white-space: nowrap;
}
.lab-bar__brand svg { width: 26px; height: 26px; flex: none; display: block; }
.lab-bar__brand b { font-weight: 700; letter-spacing: 0.01em; }
.lab-bar__lab { color: var(--chrome-dim); }
.lab-bar__lab::before { content: '/'; margin-right: 2px; opacity: 0.5; }
.lab-bar__lab:hover, .lab-bar__brand:hover { color: var(--chrome-ink); background: rgba(127, 127, 127, 0.12); }
.lab-bar__lab[aria-current='page'] { color: var(--chrome-ink); }
.lab-bar__tools { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.lab-lang {
  position: relative; display: inline-flex; align-items: center; min-height: var(--tap);
}
.lab-lang svg { position: absolute; left: 10px; width: 16px; height: 16px; pointer-events: none; opacity: 0.8; }
.lab-lang select {
  appearance: none; -webkit-appearance: none;
  min-height: var(--tap); max-width: 132px; padding: 0 12px 0 32px; border-radius: 999px;
  border: 1px solid var(--chrome-line); background: transparent; color: inherit;
  font: inherit; font-size: 13px; cursor: pointer; text-overflow: ellipsis;
}
.lab-lang select option { color: #1c1a16; background: #fffdf8; }
.lab-lang::after { content: ''; position: absolute; inset: 0 0 auto auto; width: 0; } /* keeps the label box 44px tall */
.lab-info {
  appearance: none; min-width: var(--tap); min-height: var(--tap); padding: 0 12px; border-radius: 999px;
  border: 0; background: transparent; color: inherit; font: inherit; font-size: 13px; cursor: pointer;
  display: inline-flex; align-items: center; gap: 6px;
}
.lab-info:hover { background: rgba(127, 127, 127, 0.14); }
.lab-info i { font-style: normal; width: 20px; height: 20px; border-radius: 50%; border: 1.5px solid currentColor; display: inline-grid; place-items: center; font-size: 12px; font-weight: 700; }
@media (max-width: 420px) {
  .lab-bar__brand b { display: none; }
  .lab-info span { display: none; }
  .lab-lang select { max-width: 112px; }
}

/* info dialog */
.lab-dialog {
  width: min(560px, calc(100vw - 24px)); max-height: min(80vh, 720px); margin: auto; padding: 0;
  border: 1px solid var(--chrome-line); border-radius: 18px;
  background: var(--chrome-panel); color: var(--chrome-ink);
  font-family: var(--font, system-ui, sans-serif); user-select: text; -webkit-user-select: text;
}
.lab-dialog::backdrop { background: rgba(0, 0, 0, 0.55); }
.lab-dialog__in { padding: 22px 22px 18px; display: flex; flex-direction: column; gap: 12px; }
.lab-dialog h2 { font-size: 18px; font-weight: 600; }
.lab-dialog p, .lab-dialog li { font-size: 14px; line-height: 1.7; color: var(--chrome-dim); word-break: keep-all; overflow-wrap: anywhere; }
.lab-dialog ul { padding-left: 1.1em; display: flex; flex-direction: column; gap: 6px; }
.lab-dialog a { color: var(--chrome-ink); }
.lab-dialog__links { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 14px; }
.lab-dialog__links a { display: inline-flex; align-items: center; min-height: var(--tap); }
.lab-dialog .btn { align-self: flex-end; min-width: 0; }

/* footer (hub) */
.lab-foot { border-top: 1px solid var(--chrome-line); padding: 24px 0 calc(28px + env(safe-area-inset-bottom, 0px)); font-size: 13px; color: var(--chrome-dim); }
.lab-foot ul { list-style: none; padding: 0; margin: 8px 0 0; display: flex; flex-wrap: wrap; gap: 0 18px; }
.lab-foot a { color: inherit; display: inline-flex; align-items: center; min-height: var(--tap); }
.lab-foot a:hover { color: var(--chrome-ink); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}

/* 소리 조절 (shared/sound-ui.js): "효과음" "배경음" 두 단추. 켜지면 점이 채워지고 테두리가 밝아짐. 어두운 밤 장면 위에 놓임 */
.snd { position: relative; display: inline-flex; align-items: center; gap: 4px; }
.snd__btn {
  display: inline-flex; align-items: center; gap: 6px; min-height: var(--tap, 44px); min-width: 44px; padding: 0 12px;
  border-radius: 999px; border: 1px solid rgba(243, 239, 230, 0.24); background: rgba(9, 10, 24, 0.66); color: #f3efe6;
  font: inherit; font-size: 12.5px; line-height: 1; cursor: pointer; white-space: nowrap;
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}
.snd__btn i { width: 8px; height: 8px; border-radius: 50%; border: 1.5px solid currentColor; opacity: 0.7; flex: none; }
.snd__btn[aria-pressed='true'] { border-color: #ffd28a; }
.snd__btn[aria-pressed='true'] i { background: #ffd28a; border-color: #ffd28a; opacity: 1; box-shadow: 0 0 6px #ffd28a; }
.snd__btn:hover { background: rgba(30, 32, 58, 0.85); }
.snd__hint {
  position: absolute; right: 0; top: calc(100% + 6px); z-index: 5; padding: 6px 10px; border-radius: 10px; white-space: nowrap;
  background: #ffd28a; color: #1c1a16; font-size: 12.5px; font-weight: 600; pointer-events: none;
}
.snd__hint::before { content: ''; position: absolute; right: 22px; top: -5px; border: 5px solid transparent; border-top: 0; border-bottom-color: #ffd28a; }
.snd__hint[hidden] { display: none; }
/* 화면 아래쪽에 놓일 때는 안내 말풍선을 위로 */
/* 말풍선은 '배경음' 단추(오른쪽)를 가리킴 */
.snd--up .snd__hint { top: auto; bottom: calc(100% + 6px); left: auto; right: 0; transform: none; }
.snd--up .snd__hint::before { top: auto; bottom: -5px; right: 34px; left: auto; border: 5px solid transparent; border-bottom: 0; border-top-color: #ffd28a; }
