:root {
  --page-bg: #f4f6f8;
  --surface: #ffffff;
  --surface-soft: #f7f8fa;
  --text: #20242a;
  --text-secondary: #626b76;
  --text-tertiary: #858e99;
  --line: #e0e4e8;
  --line-strong: #cfd5dc;
  --accent: #2f6fdb;
  --accent-hover: #285fc0;
  --danger: #b43d38;
  --success: #167553;
  font-synthesis: none;
}

* { box-sizing: border-box; }
html { min-width: 320px; background: var(--page-bg); }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background: var(--page-bg);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans KR", "Apple SD Gothic Neo", Roboto, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
button, input { font: inherit; }
button { cursor: pointer; }
button:focus-visible,
input:focus-visible {
  outline: 3px solid rgba(47, 111, 219, .16);
  outline-offset: 2px;
}
.hidden { display: none !important; }

.entry-screen { min-height: 100svh; padding: 0 28px; }
.entry-shell {
  width: min(1080px, 100%);
  min-height: 100svh;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
}
.entry-header {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}
.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--text);
  font-weight: 760;
  letter-spacing: -.02em;
}
.wordmark-mark {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border: 1px solid #eadfce;
  border-radius: 6px;
  background: #fff7eb;
  font-size: 18px;
  line-height: 1;
}
.wordmark-name { font-size: 16px; }
.header-link {
  min-height: 36px;
  padding: 0 8px;
  border: 0;
  border-bottom: 1px solid transparent;
  background: transparent;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 650;
}
.header-link:hover { border-bottom-color: var(--line-strong); color: var(--text); }

.entry-grid {
  flex: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 430px);
  gap: clamp(48px, 8vw, 92px);
  align-items: center;
  padding: 72px 0 82px;
}
.entry-intro { max-width: 560px; }
.mascot-stage {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
}
.mascot-avatar {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border: 1px solid #eadfce;
  border-radius: 7px;
  background: #fff7eb;
  font-size: 29px;
  line-height: 1;
}
.mascot-copy strong {
  display: block;
  font-size: 16px;
  letter-spacing: -.025em;
}
.mascot-copy span {
  display: block;
  margin-top: 3px;
  color: var(--text-tertiary);
  font-size: 12px;
  font-weight: 560;
}
.entry-intro h1 {
  margin: 0;
  max-width: 520px;
  font-size: clamp(34px, 4vw, 46px);
  line-height: 1.2;
  letter-spacing: -.045em;
  font-weight: 760;
  word-break: keep-all;
}
.desc {
  max-width: 540px;
  margin: 19px 0 0;
  color: var(--text-secondary);
  font-size: 15px;
  line-height: 1.75;
  word-break: keep-all;
}
.intro-note {
  margin-top: 24px;
  padding-left: 12px;
  border-left: 2px solid var(--line-strong);
  color: #747d88;
  font-size: 12.5px;
  line-height: 1.6;
}
.intro-note::before { content: none; }

.entry-action-panel {
  align-self: center;
  padding: 4px 0 4px 34px;
  border-left: 1px solid var(--line-strong);
}
.entry-action-panel::before { content: none; }
.action-panel-head { margin-bottom: 18px; }
.action-panel-head h2 {
  margin: 0;
  font-size: 20px;
  line-height: 1.3;
  letter-spacing: -.03em;
}
.action-panel-head p {
  margin: 6px 0 0;
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 1.55;
}
.actions { display: grid; border-top: 1px solid var(--line); }
.entry-btn {
  width: 100%;
  min-height: 68px;
  display: grid;
  grid-template-columns: 38px 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 11px 4px;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  color: var(--text);
  text-align: left;
  transition: background-color .14s ease, color .14s ease;
}
.entry-btn:hover { background: #eef1f4; }
.entry-btn .action-icon {
  width: 34px;
  height: 28px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  background: var(--surface);
  color: #5d6672;
  font-size: 10.5px;
  font-weight: 780;
}
.entry-btn .action-copy { min-width: 0; }
.entry-btn .action-copy span { display: block; font-size: 14px; font-weight: 720; }
.entry-btn .action-copy small {
  display: block;
  margin-top: 3px;
  color: var(--text-tertiary);
  font-size: 11.5px;
  font-weight: 520;
}
.entry-btn .action-arrow { color: #8d96a1; font-size: 17px; line-height: 1; }
.entry-btn.primary { color: var(--accent); }
.entry-btn.primary .action-icon { border-color: var(--accent); background: var(--accent); color: #fff; }
.entry-btn.primary .action-copy small { color: var(--text-tertiary); }
.entry-btn.primary .action-arrow { color: var(--accent); }
.entry-btn.secondary .action-icon,
.entry-btn.tertiary .action-icon { background: var(--surface); color: #5d6672; }

.utility-actions {
  display: flex;
  gap: 18px;
  margin-top: 17px;
}
.utility-link {
  min-height: 34px;
  padding: 0;
  border: 0;
  border-bottom: 1px solid transparent;
  border-radius: 0;
  background: transparent;
  color: var(--text-secondary);
  font-size: 12.5px;
  font-weight: 650;
}
.utility-link:hover { border-bottom-color: var(--line-strong); color: var(--text); }
.existing-user-note {
  margin-top: 20px;
  padding: 12px 0 0;
  border-top: 1px solid var(--line);
  color: #747d88;
  font-size: 11.8px;
  line-height: 1.6;
  word-break: keep-all;
}
.existing-user-note strong { color: #4f5864; }
.entry-footer {
  padding: 0 0 24px;
  color: #959da7;
  font-size: 11.5px;
  text-align: left;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  overflow: auto;
  padding: 24px;
  background: rgba(32, 36, 42, .42);
}
.auth-box {
  width: min(430px, 100%);
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 18px 48px rgba(25, 30, 37, .16);
  padding: 24px;
}
.auth-mascot {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  margin-bottom: 14px;
  border: 1px solid #eadfce;
  border-radius: 6px;
  background: #fff7eb;
  font-size: 22px;
}
.auth-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 21px;
}
.auth-head h2 { margin: 0; font-size: 20px; letter-spacing: -.03em; }
.auth-head p { margin: 6px 0 0; color: var(--text-secondary); font-size: 13px; line-height: 1.5; }
.close {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  flex: 0 0 32px;
  padding: 0;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: var(--text-secondary);
  font-size: 22px;
  line-height: 1;
}
.close:hover { background: #eef1f4; color: var(--text); }
.field { display: grid; gap: 6px; margin-bottom: 14px; }
.field label { color: #4b535d; font-size: 12.5px; font-weight: 650; }
.field input {
  width: 100%;
  height: 44px;
  padding: 0 11px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: #fff;
  color: var(--text);
  outline: none;
  font-size: 14px;
}
.field input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(47,111,219,.10); }
.field input::placeholder { color: #a0a7b0; }
.message {
  margin: 4px 0 14px;
  padding: 10px 11px;
  border-left: 3px solid #d5a09c;
  background: #fff7f6;
  color: #933a35;
  font-size: 12.5px;
  line-height: 1.5;
}
.message.ok { border-left-color: #78b79d; background: #f3faf7; color: #176748; }
.auth-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 20px; }
.modal-primary,
.modal-secondary {
  min-height: 40px;
  padding: 0 14px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 700;
}
.modal-primary { border: 1px solid var(--accent); background: var(--accent); color: #fff; }
.modal-primary:hover { background: var(--accent-hover); }
.modal-secondary { border: 1px solid var(--line-strong); background: #fff; color: var(--text); }
.modal-secondary:hover { background: #eef1f4; }

.page-transition {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: center;
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  background: rgba(244, 246, 248, .97);
  transition: opacity .16s ease, visibility .16s ease;
}
.page-transition.show { visibility: visible; opacity: 1; }
.transition-box {
  width: min(330px, calc(100vw - 48px));
  display: grid;
  grid-template-columns: 38px 1fr;
  gap: 10px 12px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
}
.transition-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid #eadfce;
  border-radius: 6px;
  background: #fff7eb;
  font-size: 22px;
}
.transition-title { font-size: 13.5px; font-weight: 700; }
.transition-sub { margin-top: 2px; color: var(--text-secondary); font-size: 11.5px; }
.transition-bar {
  grid-column: 1 / -1;
  height: 2px;
  overflow: hidden;
  background: #e5e9ed;
}
.transition-bar span {
  display: block;
  width: 42%;
  height: 100%;
  background: var(--accent);
  animation: loading-bar .72s ease-in-out infinite alternate;
}
@keyframes loading-bar { from { transform: translateX(-100%); } to { transform: translateX(238%); } }
.entry-screen.leaving { pointer-events: none; }

@media (max-width: 820px) {
  .entry-screen { padding: 0 20px; }
  .entry-grid { grid-template-columns: 1fr; gap: 42px; padding: 52px 0 60px; }
  .entry-intro { max-width: 640px; }
  .entry-action-panel { width: 100%; padding: 26px 0 0; border-left: 0; border-top: 1px solid var(--line-strong); }
}

@media (max-width: 520px) {
  .entry-screen { padding: 0 15px; }
  .entry-header { min-height: 64px; }
  .entry-grid { padding-top: 36px; gap: 34px; }
  .mascot-stage { margin-bottom: 20px; }
  .entry-intro h1 { font-size: 34px; }
  .desc { font-size: 14px; }
  .entry-btn { grid-template-columns: 34px 1fr auto; }
  .utility-actions { gap: 14px; }
  .modal { padding: 14px; }
  .auth-box { padding: 20px 17px; }
}

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