:root {
  --bg: #0b0d12;
  --bg-grad: radial-gradient(circle at 20% -10%, #1a2a22 0%, #0b0d12 45%);
  --card: #151923;
  --card-hover: #1b202c;
  --border: #262c3a;
  --text: #eef1f6;
  --muted: #8b93a7;
  --accent: #5eead4;
  --accent2: #fbbf24;
  --danger: #f87171;
  --ok: #4ade80;
  --radius: 16px;
  /* 어두운 사이트임을 브라우저에 알려서 Windows에서 페이지 스크롤바·날짜/시간 선택 아이콘·드롭다운 목록도 어둡게 그리게 함 */
  color-scheme: dark;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg) var(--bg-grad);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Pretendard, sans-serif;
  padding: 0 0 70px;
  /* 한글은 음절 단위로 아무데서나 줄바꿈되기 쉬워서("보기"가 "보"/"기"로 쪼개지는 것처럼),
     단어(공백) 단위로만 줄바꿈되게 강제 - 정말 안 들어가는 긴 단어만 예외적으로 줄바꿈. */
  word-break: keep-all;
  overflow-wrap: break-word;
}
a { color: var(--accent); }

/* 네이버 카페 스타일 왼쪽 사이드바 레이아웃 */
.layout { display: flex; align-items: flex-start; max-width: 1200px; margin: 0 auto; }
.sidebar {
  width: 220px;
  flex-shrink: 0;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  background: var(--card);
  border-right: 1px solid var(--border);
  padding: 20px 0;
  /* 관리자 메뉴가 화면보다 길 때 생기는 스크롤바: Windows 기본(밝고 두꺼운) 막대 대신
     평소엔 숨기고, 메뉴에 마우스를 올렸을 때만 얇고 어두운 막대로 보인다. 스크롤 자체는 그대로 된다. */
  scrollbar-width: thin;
  scrollbar-color: transparent transparent;
}
.sidebar:hover { scrollbar-color: #3a4252 transparent; }
.sidebar::-webkit-scrollbar { width: 6px; height: 6px; }
.sidebar::-webkit-scrollbar-track { background: transparent; }
.sidebar::-webkit-scrollbar-thumb { background: transparent; border-radius: 3px; }
.sidebar:hover::-webkit-scrollbar-thumb { background: #3a4252; }
.sidebar .brand {
  padding: 0 20px 18px;
  font-weight: 800;
  font-size: 1.05rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 14px;
}
.sidebar .menu a {
  display: block;
  padding: 12px 20px;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 600;
  border-left: 3px solid transparent;
}
.sidebar .menu a:hover { background: var(--card-hover); color: var(--text); }
.sidebar .menu a.active { color: var(--accent); border-left-color: var(--accent); background: var(--card-hover); }
.sidebar .user-box {
  margin-top: 16px;
  padding: 14px 20px 0;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
}
.sidebar .user-box img { width: 28px; height: 28px; border-radius: 50%; }

.avatar, .avatar-placeholder {
  border-radius: 50%;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  vertical-align: middle;
  object-fit: cover;
  background: var(--border);
}
.avatar-sm, .avatar-placeholder.avatar-sm { width: 20px; height: 20px; font-size: 0.7rem; }
.avatar-md, .avatar-placeholder.avatar-md { width: 32px; height: 32px; font-size: 0.9rem; }
.avatar-lg, .avatar-placeholder.avatar-lg { width: 48px; height: 48px; font-size: 1.3rem; }
.avatar-flag { display: inline-block; margin-right: 3px; vertical-align: middle; }

/* 언어 버튼 4개를 한 줄에 균등하게 (예전엔 "中文"만 둘째 줄로 밀려 사이드바가 화면보다 길어지고 스크롤바가 생겼음).
   글꼴이 넓은 PC에서 그래도 안 들어가면 예전처럼 줄바꿈된다. */
.lang-switch { display: flex; gap: 3px; padding: 10px 20px 0; flex-wrap: wrap; }
.lang-switch a {
  flex: 1 0 auto;
  text-align: center;
  font-size: 0.75rem;
  color: var(--muted);
  text-decoration: none;
  padding: 4px 2px;
  border-radius: 6px;
  border: 1px solid var(--border);
}
.lang-switch a.active { color: var(--accent); border-color: var(--accent); }
.lang-switch a:hover { background: var(--card-hover); }

.notif-wrap { position: relative; padding: 14px 20px 0; }
.notif-bell {
  position: relative;
  background: none;
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  font-size: 1.05rem;
  padding: 8px 12px;
  cursor: pointer;
}
.notif-bell:hover { background: var(--card-hover); }
.notif-badge {
  position: absolute;
  top: -6px;
  right: -6px;
  background: var(--danger);
  color: #2a0a0a;
  border-radius: 999px;
  font-size: 0.65rem;
  font-weight: 800;
  min-width: 16px;
  height: 16px;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
}
.notif-dropdown {
  display: none;
  position: fixed;
  width: 300px;
  max-width: calc(100vw - 20px);
  max-height: 380px;
  overflow-y: auto;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 12px 30px rgba(0,0,0,0.45);
  z-index: 1000;
}
.notif-dropdown.open { display: block; }
.notif-dropdown-header { padding: 12px 14px; font-weight: 700; font-size: 0.85rem; border-bottom: 1px solid var(--border); }
.notif-item {
  display: block;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  text-decoration: none;
  font-size: 0.85rem;
  line-height: 1.5;
}
.notif-item:last-child { border-bottom: none; }
.notif-item:hover { background: var(--card-hover); }
.notif-item.unread { background: rgba(94, 234, 212, 0.08); position: relative; }
.notif-item.unread::before {
  content: "";
  position: absolute;
  left: 5px;
  top: 18px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}
.notif-item.unread { padding-left: 22px; }
.notif-item .meta { font-size: 0.72rem; color: var(--muted); margin-top: 4px; }

.main { flex: 1; min-width: 0; padding: 24px; }
.wrap { max-width: 900px; }

/* 모바일: 사이드바를 위쪽 가로 스크롤 메뉴로 전환 */
@media (max-width: 800px) {
  .layout { flex-direction: column; }
  .sidebar {
    width: 100%;
    height: auto;
    position: sticky;
    top: 0;
    z-index: 10;
    padding: 10px 0;
    display: flex;
    align-items: center;
    overflow-x: auto;
  }
  .sidebar .brand { display: none; }
  .sidebar .menu { display: flex; gap: 4px; padding: 0 10px; }
  .sidebar .menu a { padding: 10px 14px; border-left: none; border-bottom: 3px solid transparent; white-space: nowrap; }
  .sidebar .menu a.active { border-left-color: transparent; border-bottom-color: var(--accent); }
  .notif-wrap { padding: 0 10px; }
  .lang-switch { padding: 0 10px; flex-wrap: nowrap; }  /* 휴대폰 상단 메뉴줄에서 언어 버튼이 4줄로 쌓여 메뉴바가 두꺼워지던 것 */
  .sidebar .user-box { margin-top: 0; padding: 0 14px; border-top: none; }
  .main { padding: 16px; }
}

h1 { font-size: 1.5rem; margin: 0 0 16px; }
h2 { font-size: 1.15rem; margin: 24px 0 12px; }

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 22px;
  margin-bottom: 14px;
  line-height: 1.6;
}
.card:hover { background: var(--card-hover); }
.card-section { margin-top: 14px; }
.content-box {
  background: #0f1219;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px 18px;
  margin-top: 14px;
  line-height: 1.75;
  color: #dbe1ec;
  white-space: pre-line;
}
.md-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 6px;
}
.md-toolbar button {
  min-width: 34px;
  padding: 6px 8px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text);
  font-size: 0.85rem;
  cursor: pointer;
}
.md-toolbar button:hover { background: var(--card-hover); }

.md-editor {
  min-height: 180px;
  outline: none;
  cursor: text;
}
.md-editor:focus { border-color: var(--accent); }
.md-editor:empty:before {
  content: attr(data-placeholder);
  color: var(--muted);
}

.md-body { line-height: 1.75; color: #dbe1ec; white-space: pre-line; }
.md-body :first-child { margin-top: 0; }
.md-body :last-child { margin-bottom: 0; }
.md-body h1, .md-body h2, .md-body h3, .md-body h4, .md-body h5, .md-body h6 {
  color: var(--text);
  margin: 18px 0 8px;
  line-height: 1.4;
}
.md-body h1 { font-size: 1.3rem; }
.md-body h2 { font-size: 1.18rem; }
.md-body h3, .md-body h4, .md-body h5, .md-body h6 { font-size: 1.05rem; }
.md-body p { margin: 0 0 12px; }
.md-body ul, .md-body ol { margin: 0 0 12px; padding-left: 22px; }
.md-body li { margin: 4px 0; }
.md-body blockquote {
  margin: 0 0 12px;
  padding: 4px 14px;
  border-left: 3px solid var(--accent);
  color: var(--muted);
}
.md-body code {
  background: #0f1219;
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 1px 6px;
  font-size: 0.88em;
}
.md-body pre {
  background: #0f1219;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
  overflow-x: auto;
  margin: 0 0 12px;
}
.md-body pre code { background: none; border: none; padding: 0; }
.md-body img { max-width: 100%; border-radius: 8px; }
.md-body a { color: var(--accent); }
.md-body hr { border: none; border-top: 1px solid var(--border); margin: 16px 0; }

.list-item { display: block; text-decoration: none; color: inherit; }
.list-item .meta { color: var(--muted); font-size: 0.8rem; margin-top: 6px; }

.rules {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  line-height: 1.7;
  font-size: 0.9rem;
  color: #cfd4de;
}
.rules summary {
  cursor: pointer;
  font-weight: 700;
  color: var(--text);
  list-style: none;
}
.rules summary::-webkit-details-marker { display: none; }
.rules summary:before { content: "▸ "; color: var(--accent); }
.rules[open] summary:before { content: "▾ "; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text);
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  vertical-align: middle;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
  appearance: none;
  -webkit-appearance: none;
  margin: 0;
}
.btn:hover { background: var(--card-hover); }
.btn:active { transform: scale(0.97); }
.btn.primary { background: var(--accent); color: #05231e; border-color: var(--accent); }
.btn.danger { background: var(--danger); color: #2a0a0a; border-color: var(--danger); }
.btn.small { padding: 6px 12px; font-size: 0.8rem; }

.event-tabs { display: flex; gap: 8px; margin-bottom: 16px; border-bottom: 1px solid var(--border); }
.event-tab-btn {
  padding: 10px 18px;
  border: none;
  background: none;
  color: var(--muted);
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}
.event-tab-btn:hover { color: var(--text); }
.event-tab-btn.active { color: var(--accent); border-bottom-color: var(--accent); }
.event-tab-dot {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  margin-left: 7px;
  vertical-align: middle;
}
.event-tab-dot-running { background: var(--ok); }
.event-tab-dot-pending { background: var(--accent2); }

form.stack > button.btn {
  align-self: stretch;
  justify-content: center;
  padding: 13px 20px;
  font-size: 0.98rem;
  margin-top: 4px;
}

.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  background: #262c3a;
  color: var(--muted);
  border: 1px solid var(--border);
}
.badge.pending { color: var(--accent2); border-color: var(--accent2); }
.badge.banned { color: var(--danger); border-color: var(--danger); }
.badge.dismissed { color: var(--muted); }
.badge.ok { color: var(--ok); border-color: var(--ok); margin-left: 8px; }

.card.in-party {
  background: rgba(74, 222, 128, 0.12);
  border-color: var(--ok);
}
.card.in-party:hover { background: rgba(74, 222, 128, 0.18); }

.form-card { max-width: 680px; padding: 26px 28px; }
form.stack { display: flex; flex-direction: column; gap: 18px; max-width: 100%; }
form.stack > div { display: flex; flex-direction: column; gap: 6px; }
label { font-size: 0.85rem; color: var(--muted); font-weight: 600; }
input[type=text], input[type=number], input[type=date], input[type=time], textarea, select {
  background: #0f1219;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
  color: var(--text);
  font-size: 0.95rem;
  font-family: inherit;
  width: 100%;
  line-height: 1.5;
}
textarea { resize: vertical; min-height: 140px; }
.checkbox-row { display: flex; align-items: center; gap: 8px; font-size: 0.9rem; color: var(--text); }
.checkbox-row input { width: auto; }

/* 상점 아이템 수량/확률처럼 좁은 한 줄짜리 숫자칸 - 기본 input 패딩(14px)+스피너 화살표 때문에
   숫자가 잘려 보이던 문제라, 패딩을 줄이고 화살표를 없애서 숫자가 온전히 보이게 한다. */
.sel-amount, .sel-weight {
  width: 32px;
  padding: 6px 2px;
  font-size: 0.8rem;
  text-align: center;
  appearance: textfield;
  -moz-appearance: textfield;
}
.sel-amount::-webkit-inner-spin-button, .sel-amount::-webkit-outer-spin-button,
.sel-weight::-webkit-inner-spin-button, .sel-weight::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.gacha-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--card-hover);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 4px 10px;
  font-size: 0.82rem;
  color: var(--muted);
}

.qty-badge {
  display: inline-block;
  margin-left: 3px;
  padding: 0 5px;
  border-radius: 4px;
  background: var(--accent2);
  color: #0b0d12;
  font-weight: 700;
  font-size: 0.78em;
}

table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
table th, table td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--border); }
table th { color: var(--muted); font-weight: 600; font-size: 0.8rem; }

.empty { color: var(--muted); text-align: center; padding: 30px 0; }

.pagination { display: flex; align-items: center; justify-content: center; gap: 6px; flex-wrap: wrap; }
.pg-ellipsis { color: var(--muted); padding: 0 4px; }
.pagination-bar { display: flex; align-items: center; justify-content: center; gap: 12px; flex-wrap: wrap; margin-top: 20px; }
.per-page-select { width: auto; padding: 6px 10px; font-size: 0.85rem; }

.comment { margin-bottom: 10px; }
.comment-card { margin-bottom: 0; }
.reply-form textarea { max-width: 480px; }

.picker-box, .item-picker {
  background: #0f1219;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
}
.picker-selected, .item-selected {
  font-size: 0.8rem;
  color: var(--muted);
  margin-bottom: 8px;
}
.picker-list, .item-list, .item-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  max-height: 180px;
  overflow-y: auto;
}
.item-tabs { max-height: none; margin-bottom: 8px; }
.picker-item.primary, .item-btn.primary { background: var(--accent); color: #05231e; border-color: var(--accent); }

.alert { background: rgba(251,191,36,0.1); border: 1px solid var(--accent2); color: var(--accent2); padding: 10px 14px; border-radius: 10px; font-size: 0.85rem; margin-bottom: 14px; white-space: pre-line; }

.flash-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: rgba(248,113,113,0.12);
  border: 1px solid var(--danger);
  color: #fecaca;
  padding: 12px 16px;
  border-radius: 12px;
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 16px;
}
.flash-banner button {
  background: none;
  border: none;
  color: inherit;
  font-size: 1.1rem;
  cursor: pointer;
  line-height: 1;
  padding: 0 4px;
}

.evidence-thumb { max-width: 220px; border-radius: 8px; margin: 6px 6px 0 0; }

footer.pagefoot { text-align: center; color: var(--muted); font-size: 0.75rem; margin-top: 28px; }

/* ---- 이벤트 이용 방법 애니메이션 (이벤트 페이지 각 탭 상단) ----
   장면 4개가 3.5초씩 돌아가며(14초 한 바퀴) 보이고, 오른쪽 단계 설명도 같은 박자로 강조된다.
   장면 안의 움직임(이동/말풍선/클릭)도 같은 14초 주기 + 장면별 지연(ht-d1~4)으로 장면 시작에 맞춰 재생된다. */
.howto { display: flex; gap: 18px; align-items: center; background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 16px; margin: 12px 0 20px; }
.howto-scene { flex: 0 0 auto; width: 320px; max-width: 100%; }
.howto-scene svg { display: block; width: 100%; height: auto; border-radius: 12px; }
.howto-body { flex: 1; min-width: 0; }
.howto-title { font-weight: 700; margin: 0 0 8px; font-size: 0.95rem; }
.howto-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; counter-reset: ht; }
.howto-steps li { counter-increment: ht; display: flex; gap: 10px; align-items: flex-start; padding: 7px 10px;
  border-radius: 10px; border: 1px solid transparent; color: var(--muted); font-size: 0.88rem; line-height: 1.45;
  animation: ht-step 14s infinite; }
.howto-steps li::before { content: counter(ht); flex: 0 0 22px; height: 22px; border-radius: 50%; background: var(--border);
  color: var(--text); font-size: 0.75rem; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }
.howto-steps li:nth-child(2) { animation-delay: 3.5s; }
.howto-steps li:nth-child(3) { animation-delay: 7s; }
.howto-steps li:nth-child(4) { animation-delay: 10.5s; }
@keyframes ht-step {
  0%, 24% { color: var(--text); background: rgba(94, 234, 212, 0.10); border-color: rgba(94, 234, 212, 0.45); }
  25%, 100% { color: var(--muted); background: transparent; border-color: transparent; }
}

.ht-s { opacity: 0; animation: ht-scene 14s infinite; }
.ht-s2 { animation-delay: 3.5s; }
.ht-s3 { animation-delay: 7s; }
.ht-s4 { animation-delay: 10.5s; }
@keyframes ht-scene { 0% { opacity: 0; } 2% { opacity: 1; } 23% { opacity: 1; } 25%, 100% { opacity: 0; } }

/* 장면 안 움직임 (14초 주기 중 앞 25%가 그 장면이 보이는 구간) */
.ht-slide, .ht-walk, .ht-walk2, .ht-walk3, .ht-cursor, .ht-click, .ht-burst,
.ht-pop-early, .ht-pop-mid, .ht-pop-late, .ht-pop-late2, .ht-pop-a, .ht-pop-b, .ht-pop-c, .ht-pop-d,
.ht-out-a, .ht-out-b, .ht-out-c { animation-duration: 14s; animation-iteration-count: infinite; animation-timing-function: ease-out;
  transform-box: fill-box; transform-origin: center; }
.ht-d1 { animation-delay: 0s; }
.ht-d2 { animation-delay: 3.5s; }
.ht-d3 { animation-delay: 7s; }
.ht-d4 { animation-delay: 10.5s; }
.ht-slide { animation-name: ht-slide; }
@keyframes ht-slide { 0% { opacity: 0; transform: translateY(10px); } 5%, 100% { opacity: 1; transform: none; } }
.ht-walk { animation-name: ht-walk; animation-timing-function: ease-in-out; }
@keyframes ht-walk { 0%, 3% { transform: translate(-105px, 60px); } 18%, 100% { transform: translate(0, 0); } }
.ht-walk2 { animation-name: ht-walk2; animation-timing-function: ease-in-out; }
@keyframes ht-walk2 { 0%, 3% { transform: translate(-90px, 45px); } 12%, 100% { transform: translate(0, 0); } }
.ht-walk3 { animation-name: ht-walk3; animation-timing-function: ease-in-out; }
@keyframes ht-walk3 { 0%, 3% { transform: translate(-100px, 45px); } 18%, 100% { transform: translate(0, 0); } }
.ht-cursor { animation-name: ht-cursor; animation-timing-function: ease-in-out; }
@keyframes ht-cursor { 0%, 2% { transform: translate(60px, 32px); } 9%, 100% { transform: translate(0, 0); } }
.ht-click { animation-name: ht-click; }
@keyframes ht-click { 0%, 9% { opacity: 0; transform: scale(0.3); } 10% { opacity: 0.9; } 14%, 100% { opacity: 0; transform: scale(1.8); } }
.ht-burst { animation-name: ht-burst; }
@keyframes ht-burst { 0%, 12% { opacity: 0; transform: scale(0.3); } 13% { opacity: 1; } 18%, 100% { opacity: 0; transform: scale(2.2); } }
.ht-pop-early { animation-name: ht-pop-early; }
@keyframes ht-pop-early { 0%, 2% { opacity: 0; transform: scale(0.6); } 5%, 100% { opacity: 1; transform: scale(1); } }
.ht-pop-mid { animation-name: ht-pop-mid; }
@keyframes ht-pop-mid { 0%, 6% { opacity: 0; transform: scale(0.6); } 9%, 100% { opacity: 1; transform: scale(1); } }
.ht-pop-late { animation-name: ht-pop-late; }
@keyframes ht-pop-late { 0%, 10% { opacity: 0; transform: scale(0.6); } 13%, 100% { opacity: 1; transform: scale(1); } }
.ht-pop-late2 { animation-name: ht-pop-late2; }
@keyframes ht-pop-late2 { 0%, 14% { opacity: 0; transform: scale(0.6); } 17%, 100% { opacity: 1; transform: scale(1); } }
.ht-pop-a { animation-name: ht-pop-a; }
.ht-pop-b { animation-name: ht-pop-b; }
.ht-pop-c { animation-name: ht-pop-c; }
.ht-pop-d { animation-name: ht-pop-d; }
@keyframes ht-pop-a { 0%, 3% { opacity: 0; transform: scale(0.3); } 5%, 100% { opacity: 1; transform: scale(1); } }
@keyframes ht-pop-b { 0%, 6% { opacity: 0; transform: scale(0.3); } 8%, 100% { opacity: 1; transform: scale(1); } }
@keyframes ht-pop-c { 0%, 9% { opacity: 0; transform: scale(0.3); } 11%, 100% { opacity: 1; transform: scale(1); } }
@keyframes ht-pop-d { 0%, 12% { opacity: 0; transform: scale(0.3); } 14%, 100% { opacity: 1; transform: scale(1); } }
.ht-out-a { animation-name: ht-out-a; }
.ht-out-b { animation-name: ht-out-b; }
.ht-out-c { animation-name: ht-out-c; }
@keyframes ht-out-a { 0%, 5% { opacity: 1; } 8%, 100% { opacity: 0.12; } }
@keyframes ht-out-b { 0%, 8% { opacity: 1; } 11%, 100% { opacity: 0.12; } }
@keyframes ht-out-c { 0%, 11% { opacity: 1; } 14%, 100% { opacity: 0.12; } }
/* 장면이 보이는 동안 계속 반복되는 짧은 효과 */
.ht-pulse { animation: ht-pulse 1.4s infinite ease-out; transform-box: fill-box; transform-origin: center; }
@keyframes ht-pulse { 0% { transform: scale(0.5); opacity: 0.9; } 100% { transform: scale(2.2); opacity: 0; } }
.ht-blink { animation: ht-blink 0.9s infinite alternate; }
@keyframes ht-blink { from { opacity: 0.35; } to { opacity: 0.9; } }

@media (max-width: 700px) {
  .howto { flex-direction: column; align-items: stretch; }
  .howto-scene { width: 100%; }
}
/* Windows "애니메이션 효과" 끄기 등 움직임 줄이기 설정을 켠 PC: 그림은 그대로 보여주되 이동/확대 없이
   장면 전환(페이드)과 단계 강조만 남긴다. (예전엔 그림을 숨겼더니 "애니메이션이 안 보인다"로 보였음) */
@media (prefers-reduced-motion: reduce) {
  .ht-slide, .ht-walk, .ht-walk2, .ht-walk3, .ht-cursor, .ht-pop-early, .ht-pop-mid, .ht-pop-late, .ht-pop-late2,
  .ht-pop-a, .ht-pop-b, .ht-pop-c, .ht-pop-d, .ht-out-a, .ht-out-b, .ht-out-c, .ht-blink { animation: none; }
  .ht-click, .ht-burst, .ht-pulse { display: none; }
}

/* 같은 페이지로 돌아왔을 때 화면 밖에 있는 결과 안내를 위쪽에 잠깐 띄움 (static/scroll_keep.js, 누르면 닫힘) */
.keep-scroll-toast {
  position: fixed; top: 12px; left: 50%; transform: translateX(-50%); z-index: 2000;
  width: min(92vw, 640px); margin: 0; background-color: var(--card); box-shadow: 0 8px 28px rgba(0,0,0,0.5); cursor: pointer;
}

/* 이벤트 시간표 탭 (events_list.html) - 시간 | 이벤트·메모 | 진행 중/다음 표시 */
.event-tabs { overflow-x: auto; scrollbar-width: thin; }
.event-tab-btn { white-space: nowrap; flex-shrink: 0; }
.tt-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.tt-switch { display: flex; gap: 6px; }
.tt-list { padding: 4px 0; }
.tt-row {
  display: grid; grid-template-columns: 7.4em 1fr auto; gap: 10px; align-items: center;
  padding: 9px 14px; border-bottom: 1px solid var(--border); cursor: pointer;
}
.tt-row:last-child { border-bottom: none; }
.tt-row:hover { background: var(--card-hover); }
.tt-row.now { background: rgba(74, 222, 128, 0.08); box-shadow: inset 3px 0 0 var(--ok); }
.tt-row.next { box-shadow: inset 3px 0 0 var(--accent2); }
.tt-time { font-variant-numeric: tabular-nums; color: var(--muted); font-size: 0.85rem; white-space: nowrap; }
.tt-name { font-size: 0.92rem; }
.tt-days { color: var(--accent2); font-size: 0.78rem; }
.tt-note { display: block; color: var(--muted); font-size: 0.78rem; margin-top: 2px; }
@media (max-width: 520px) {
  .tt-row { grid-template-columns: 6.4em 1fr; padding: 9px 10px; }
  .tt-row .badge { grid-column: 2; justify-self: start; }
}
