:root {
  --bg: #121116;
  --panel: rgba(30, 27, 35, 0.82);
  --panel-strong: rgba(38, 33, 43, 0.95);
  --line: rgba(255, 255, 255, 0.09);
  --text: #f4edf1;
  --muted: #a99da5;
  --pink: #d9a7b8;
  --pink-soft: #f1d6df;
  --charcoal: #28242c;
  --success: #9dd4b5;
  --danger: #ed9caa;
  --shadow: 0 30px 80px rgba(0, 0, 0, 0.38);
}

* {
  box-sizing: border-box;
}

html {
  color-scheme: dark;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at 15% 15%, rgba(134, 90, 122, 0.18), transparent 33%),
    radial-gradient(circle at 85% 30%, rgba(70, 73, 111, 0.18), transparent 30%),
    linear-gradient(145deg, #0d0c11, #19161d 48%, #111017);
  font-family:
    Pretendard,
    "Noto Sans KR",
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    sans-serif;
  overflow-x: hidden;
}

button,
input {
  font: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

.ambient {
  position: fixed;
  z-index: -1;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.2;
  pointer-events: none;
}

.ambient-one {
  top: -180px;
  right: -100px;
  background: #9d718d;
}

.ambient-two {
  bottom: -240px;
  left: -120px;
  background: #52577b;
}

.site-header,
footer {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
}

.site-header {
  min-height: 92px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.brand-moon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--pink-soft);
  background: rgba(255, 255, 255, 0.035);
  box-shadow: inset 0 0 20px rgba(255, 255, 255, 0.025);
  font-size: 24px;
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  letter-spacing: 0.04em;
}

.brand small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
}

.status-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.025);
  font-size: 13px;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 12px rgba(157, 212, 181, 0.7);
}

.landing-shell {
  width: min(1180px, calc(100% - 40px));
  min-height: calc(100vh - 180px);
  margin: 18px auto 44px;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(340px, 0.85fr);
  gap: 36px;
  align-items: center;
}

.hero-panel {
  padding: 28px 10px 28px 0;
}

.eyebrow,
.mini-label {
  color: var(--pink);
  font-weight: 700;
  letter-spacing: 0.16em;
  font-size: 11px;
}

.hero-panel h1,
.dashboard-heading h1 {
  margin: 18px 0;
  font-size: clamp(40px, 6vw, 74px);
  line-height: 1.08;
  letter-spacing: -0.05em;
}

.hero-panel h1 span {
  color: var(--pink-soft);
}

.hero-copy {
  max-width: 570px;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.8;
}

.sayuki-card {
  max-width: 590px;
  margin-top: 34px;
  padding: 18px;
  display: flex;
  align-items: center;
  gap: 16px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.028);
  backdrop-filter: blur(18px);
}

.portrait-wrap {
  position: relative;
  flex: 0 0 66px;
  width: 66px;
  height: 66px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 20px;
  background: linear-gradient(145deg, #61505e, #28242d);
}

.portrait-fallback,
.portrait-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.portrait-fallback {
  display: grid;
  place-items: center;
  color: var(--pink-soft);
  font-size: 26px;
}

.portrait-image {
  object-fit: cover;
}

.character-name {
  margin: 0 0 5px;
  font-weight: 700;
}

.character-line {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.feature-row {
  max-width: 620px;
  margin-top: 24px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.feature-row div {
  padding: 14px;
  border-top: 1px solid var(--line);
}

.feature-row strong,
.feature-row span {
  display: block;
}

.feature-row strong {
  margin-bottom: 5px;
  font-size: 13px;
}

.feature-row span {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
}

.auth-panel {
  min-height: 600px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 30px;
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(28px);
}

.tab-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  padding: 5px;
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.19);
}

.tab-button {
  padding: 11px 12px;
  border: 0;
  border-radius: 10px;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
}

.tab-button.active {
  color: var(--text);
  background: rgba(255, 255, 255, 0.07);
}

.auth-form {
  display: none;
  margin-top: 26px;
}

.auth-form.active {
  display: block;
}

.form-heading {
  margin-bottom: 24px;
}

.form-heading h2,
.welcome-card h2,
.dashboard-card h2 {
  margin: 8px 0;
  font-size: 26px;
  letter-spacing: -0.035em;
}

.form-heading p,
.welcome-card p,
.dashboard-card p,
.dashboard-heading p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.auth-form label {
  display: block;
  margin: 15px 0;
}

.auth-form label > span {
  display: block;
  margin-bottom: 7px;
  color: #d7ccd2;
  font-size: 13px;
}

.auth-form input {
  width: 100%;
  height: 48px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  outline: none;
  color: var(--text);
  background: rgba(10, 9, 13, 0.44);
  transition:
    border-color 0.18s ease,
    box-shadow 0.18s ease;
}

.auth-form input:focus {
  border-color: rgba(217, 167, 184, 0.58);
  box-shadow: 0 0 0 3px rgba(217, 167, 184, 0.08);
}

.auth-form small {
  display: block;
  margin-top: 6px;
  color: #81767d;
  font-size: 11px;
}

.primary-button,
.ghost-button {
  width: 100%;
  min-height: 48px;
  border-radius: 12px;
  cursor: pointer;
}

.primary-button {
  margin-top: 12px;
  border: 0;
  color: #221a20;
  background: linear-gradient(135deg, var(--pink-soft), var(--pink));
  font-weight: 800;
  box-shadow: 0 14px 30px rgba(160, 103, 128, 0.17);
}

.primary-button:disabled {
  cursor: wait;
  opacity: 0.58;
}

.link-button {
  display: grid;
  place-items: center;
}

.ghost-button {
  margin-top: 10px;
  border: 1px solid var(--line);
  color: var(--muted);
  background: transparent;
}

.ghost-button.compact {
  width: auto;
  min-height: 38px;
  padding: 0 16px;
  margin: 0;
}

.form-message {
  margin-top: 18px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.035);
  font-size: 13px;
  line-height: 1.5;
}

.form-message.success {
  color: var(--success);
  border-color: rgba(157, 212, 181, 0.22);
}

.form-message.error {
  color: var(--danger);
  border-color: rgba(237, 156, 170, 0.22);
}

.welcome-card {
  padding-top: 80px;
}

.dashboard-shell {
  width: min(1040px, calc(100% - 40px));
  min-height: calc(100vh - 180px);
  margin: 42px auto;
}

.dashboard-heading h1 {
  font-size: clamp(38px, 6vw, 66px);
}

.dashboard-grid {
  margin-top: 36px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.dashboard-card {
  min-height: 230px;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.dashboard-card dl {
  margin: 24px 0 0;
}

.dashboard-card dl div {
  padding: 10px 0;
  display: flex;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}

.dashboard-card dt {
  color: var(--muted);
}

.dashboard-card dd {
  margin: 0;
}

.owner-card {
  background:
    radial-gradient(circle at 80% 20%, rgba(217, 167, 184, 0.13), transparent 35%),
    var(--panel-strong);
}

.owner-card code {
  display: inline-block;
  margin-top: 18px;
  color: var(--pink-soft);
}

footer {
  min-height: 70px;
  padding: 20px 0;
  display: flex;
  justify-content: space-between;
  color: #716970;
  font-size: 11px;
}

@media (max-width: 860px) {
  .landing-shell {
    grid-template-columns: 1fr;
  }

  .hero-panel {
    padding-right: 0;
  }

  .auth-panel {
    min-height: auto;
  }

  .feature-row,
  .dashboard-grid {
    grid-template-columns: 1fr;
  }

  .welcome-card {
    padding-top: 16px;
  }
}

@media (max-width: 520px) {
  .site-header,
  footer,
  .landing-shell,
  .dashboard-shell {
    width: min(100% - 24px, 1180px);
  }

  .site-header {
    min-height: 76px;
  }

  .status-pill {
    display: none;
  }

  .hero-panel h1 {
    font-size: 39px;
  }

  .hero-copy {
    font-size: 15px;
  }

  .auth-panel {
    padding: 19px;
    border-radius: 22px;
  }

  .sayuki-card {
    align-items: flex-start;
  }

  footer {
    display: block;
    line-height: 1.8;
  }
}
