:root {
  --th-bg: #031018;
  --th-paper: #082028;
  --th-ink: #d4f5ec;
  --th-muted: #7aa8a8;
  --th-line: #1a4450;
  --th-cash: #00e5a0;
  --th-cyan: #3ecfff;
  --th-head: 64px;
}
html, body {
  background: var(--th-bg);
  color: var(--th-ink);
  font-family: "Pretendard", "Noto Sans KR", "Apple SD Gothic Neo", sans-serif;
}
body { margin: 0; }
.th-skip {
  position: absolute;
  left: -999px;
  top: 8px;
}
.th-skip:focus { left: 12px; z-index: 80; background: #fff; color: #031018; padding: 8px 12px; }
.th-shell { min-height: 100vh; display: flex; flex-direction: column; background: var(--th-bg); }
.th-head {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(3, 16, 24, 0.94);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--th-line);
  box-shadow: inset 0 6px 0 var(--th-cash);
}
.th-head-inner {
  max-width: 1120px;
  margin: 0 auto;
  min-height: var(--th-head);
  padding: 0 16px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
}
.th-mark {
  display: flex;
  flex-direction: column;
  text-decoration: none !important;
  color: var(--th-ink) !important;
  line-height: 1.05;
}
.th-mark strong {
  font-size: 22px;
  letter-spacing: -0.06em;
  font-weight: 800;
}
.th-mark small {
  font-size: 11px;
  color: var(--th-cash);
  letter-spacing: 0.02em;
  font-weight: 700;
}
.th-burger {
  width: 44px;
  height: 44px;
  border: 0;
  background: transparent;
  display: grid;
  place-content: center;
  gap: 5px;
  cursor: pointer;
}
.th-burger span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--th-ink);
}
.th-nav { display: none; }
.th-nav ul { list-style: none; margin: 0; padding: 0; }
.th-nav a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 0 4px;
  color: var(--th-ink) !important;
  text-decoration: none !important;
  font-weight: 700;
}
.th-nav > ul > li.on > a { color: var(--th-cash) !important; }
.th-nav > ul > li > ul {
  display: none;
  padding: 0 0 8px 12px;
}
html.th-nav-open .th-nav > ul > li > ul { display: block; }
.th-tools { display: none; }
.th-search input {
  height: 36px;
  border: 1px solid var(--th-line);
  border-radius: 8px;
  padding: 0 12px;
  background: var(--th-paper);
  color: var(--th-ink);
  width: 140px;
}
.th-account { display: flex; gap: 10px; font-size: 13px; font-weight: 700; }
.th-account a { color: var(--th-ink) !important; text-decoration: none !important; }
.th-main {
  flex: 1;
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 18px 14px 40px;
  box-sizing: border-box;
}
.th-foot {
  border-top: 1px solid var(--th-line);
  background: var(--th-paper);
  padding: 28px 16px calc(88px + env(safe-area-inset-bottom, 0px));
  color: var(--th-muted);
}
.th-foot-inner {
  max-width: 1120px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.th-foot strong { color: var(--th-ink); display: block; margin-bottom: 6px; }
.th-foot p { margin: 0; font-size: 13px; line-height: 1.5; }
.th-foot nav { display: flex; gap: 14px; }
.th-foot a { color: var(--th-muted) !important; font-size: 13px; font-weight: 700; text-decoration: none !important; }

html.th-nav-open .th-nav {
  display: block;
  position: fixed;
  inset: var(--th-head) 0 0 0;
  background: var(--th-bg);
  padding: 8px 18px 24px;
  overflow: auto;
  z-index: 39;
}
html.th-nav-open, html.th-nav-open body { overflow: hidden; }

@media (min-width: 901px) {
  .th-head-inner { grid-template-columns: auto 1fr auto; }
  .th-burger { display: none; }
  .th-nav, .th-tools { display: flex; align-items: center; gap: 16px; }
  .th-nav { position: static; }
  .th-nav > ul { display: flex; gap: 4px; }
  .th-nav > ul > li { position: relative; }
  .th-nav > ul > li > a { padding: 0 10px; font-size: 14px; }
  .th-nav > ul > li > ul {
    display: none;
    position: absolute;
    top: calc(100% - 6px);
    left: 0;
    min-width: 160px;
    background: var(--th-paper);
    border: 1px solid var(--th-line);
    border-radius: 8px;
    padding: 10px 8px 8px;
  }
  .th-nav > ul > li:hover > ul,
  .th-nav > ul > li:focus-within > ul { display: block; }
  .th-main { padding: 28px 24px 64px; }
  .th-foot { padding-bottom: 36px; }
}

html.ph-obs .th-head,
html.ph-obs .th-foot,
html.ph-obs .phm-tab { display: none !important; }
html.ph-obs .th-main { max-width: none; padding: 8px; }
