:root {
  color-scheme: dark;
  --owner-ink: #101b2d;
  --owner-ink-deep: #0a1322;
  --owner-ink-soft: #1d3049;
  --owner-paper: #f4f0e7;
  --owner-muted: #aebbc9;
  --owner-muted-strong: #d7e0e7;
  --owner-line: rgba(215, 224, 231, 0.16);
  --owner-line-strong: rgba(215, 224, 231, 0.28);
  --owner-mint: #8fe4c0;
  --owner-coral: #ff8f75;
  --owner-gold: #f4c77c;
  --owner-danger: #ffd0c5;
  --owner-shadow: 0 2rem 6rem rgba(3, 10, 20, 0.32);
  font-family: "Pretendard", "Apple SD Gothic Neo", "Noto Sans KR", system-ui, -apple-system, sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--owner-ink-deep);
}

body {
  min-width: 320px;
  min-height: 100vh;
  min-height: 100svh;
  margin: 0;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 82% 12%, rgba(89, 147, 181, 0.18), transparent 28rem),
    radial-gradient(circle at 8% 88%, rgba(255, 143, 117, 0.08), transparent 24rem),
    var(--owner-ink);
  color: var(--owner-paper);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  content: "";
  opacity: 0.25;
  background-image: radial-gradient(rgba(244, 240, 231, 0.18) 0.75px, transparent 0.75px);
  background-size: 1.25rem 1.25rem;
  mask-image: linear-gradient(to bottom, black, transparent 82%);
}

a {
  color: inherit;
}

button,
input {
  font: inherit;
}

button {
  touch-action: manipulation;
}

:focus-visible {
  outline: 3px solid rgba(143, 228, 192, 0.78);
  outline-offset: 3px;
}

.owner-auth-skip-link {
  position: fixed;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 10;
  padding: 0.65rem 0.9rem;
  border-radius: 0.7rem;
  background: var(--owner-mint);
  color: var(--owner-ink-deep);
  font-size: 0.8rem;
  font-weight: 800;
  text-decoration: none;
  transform: translateY(-180%);
  transition: transform 160ms ease;
}

.owner-auth-skip-link:focus {
  transform: translateY(0);
}

.owner-auth-shell {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-rows: auto 1fr auto;
  width: min(100%, 90rem);
  min-height: 100svh;
  margin: 0 auto;
  padding: clamp(1.25rem, 3.2vw, 3rem) clamp(1.25rem, 5vw, 5.5rem) clamp(1.25rem, 2.8vw, 2.5rem);
}

.owner-auth-topbar,
.owner-auth-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
}

.owner-auth-topbar {
  min-height: 2.5rem;
}

.owner-auth-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--owner-paper);
  font-size: 0.78rem;
  font-weight: 750;
  letter-spacing: 0.1em;
  text-decoration: none;
  text-transform: uppercase;
}

.owner-auth-brand-mark {
  display: grid;
  width: 2.25rem;
  height: 2.25rem;
  place-items: center;
  border: 1px solid rgba(143, 228, 192, 0.65);
  border-radius: 0.7rem;
  color: var(--owner-ink);
  background: var(--owner-mint);
  box-shadow: 0 0 0 0.3rem rgba(143, 228, 192, 0.08);
  font-size: 0.7rem;
  letter-spacing: -0.04em;
}

.owner-auth-context,
.owner-auth-footer-label {
  color: var(--owner-muted);
  font-size: 0.68rem;
  font-weight: 650;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.owner-auth-context {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.owner-auth-context::before {
  width: 0.42rem;
  height: 0.42rem;
  border-radius: 50%;
  background: var(--owner-mint);
  box-shadow: 0 0 0 0.28rem rgba(143, 228, 192, 0.12);
  content: "";
}

.owner-auth-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(20rem, 0.95fr);
  align-items: center;
  gap: clamp(2.5rem, 7vw, 8rem);
  padding: clamp(2rem, 5vw, 5rem) 0 clamp(2rem, 4vw, 4.5rem);
}

.owner-auth-layout[hidden] {
  display: none;
}

.owner-auth-login-layout {
  grid-template-columns: minmax(0, 31rem);
  justify-content: center;
  gap: 0;
}

.owner-auth-intro {
  max-width: 40rem;
}

.owner-auth-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  margin: 0 0 1.3rem;
  color: var(--owner-mint);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.17em;
  line-height: 1.4;
  text-transform: uppercase;
}

.owner-auth-eyebrow::before {
  width: 2.2rem;
  height: 1px;
  background: var(--owner-mint);
  content: "";
}

.owner-auth-intro h1,
.owner-auth-card h1,
.owner-auth-card h2,
.owner-auth-card p {
  margin-top: 0;
}

.owner-auth-intro h1 {
  max-width: 13ch;
  margin-bottom: 1.6rem;
  color: var(--owner-paper);
  font-size: clamp(3rem, 6.3vw, 6rem);
  font-weight: 760;
  letter-spacing: -0.085em;
  line-height: 0.98;
  text-wrap: balance;
}

.owner-auth-intro h1::after {
  display: inline-block;
  width: clamp(0.7rem, 1.5vw, 1.15rem);
  height: clamp(0.7rem, 1.5vw, 1.15rem);
  margin: 0 0 0.12em 0.18em;
  border-radius: 50%;
  background: var(--owner-coral);
  box-shadow: 0 0 0 0.55rem rgba(255, 143, 117, 0.1);
  content: "";
  vertical-align: 0.18em;
}

.owner-auth-lede {
  max-width: 35rem;
  margin-bottom: 2rem;
  color: var(--owner-muted-strong);
  font-size: clamp(1rem, 1.5vw, 1.22rem);
  font-weight: 480;
  letter-spacing: -0.035em;
  line-height: 1.75;
  word-break: keep-all;
}

.owner-auth-points {
  display: grid;
  gap: 0.9rem;
  max-width: 31rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.owner-auth-point {
  display: grid;
  grid-template-columns: 1.7rem minmax(0, 1fr);
  gap: 0.7rem;
  align-items: start;
  color: var(--owner-muted);
  font-size: 0.86rem;
  line-height: 1.65;
}

.owner-auth-point::before {
  display: grid;
  width: 1.25rem;
  height: 1.25rem;
  margin-top: 0.12rem;
  place-items: center;
  border: 1px solid rgba(143, 228, 192, 0.55);
  border-radius: 50%;
  color: var(--owner-mint);
  content: "✓";
  font-size: 0.68rem;
  font-weight: 800;
}

.owner-auth-card {
  width: min(100%, 31rem);
  justify-self: end;
  padding: clamp(1.35rem, 3vw, 2.3rem);
  border: 1px solid var(--owner-line-strong);
  border-radius: 1.5rem;
  background: linear-gradient(145deg, rgba(35, 53, 76, 0.94), rgba(15, 27, 45, 0.96));
  box-shadow: var(--owner-shadow);
}

.owner-auth-card-heading {
  margin-bottom: 1.7rem;
}

.owner-auth-card-heading .owner-auth-eyebrow {
  margin-bottom: 0.65rem;
}

.owner-auth-card h2 {
  margin-bottom: 0.65rem;
  color: var(--owner-paper);
  font-size: clamp(1.6rem, 3vw, 2.05rem);
  font-weight: 760;
  letter-spacing: -0.065em;
  line-height: 1.15;
}

.owner-auth-card h1 {
  margin-bottom: 0.65rem;
  color: var(--owner-paper);
  font-size: clamp(1.6rem, 3vw, 2.05rem);
  font-weight: 760;
  letter-spacing: -0.065em;
  line-height: 1.15;
}

.owner-auth-description {
  margin-bottom: 0;
  color: var(--owner-muted);
  font-size: 0.84rem;
  line-height: 1.65;
  word-break: keep-all;
}

.owner-auth-form {
  display: grid;
  gap: 0.95rem;
}

.owner-auth-field {
  display: grid;
  gap: 0.45rem;
}

.owner-auth-field label {
  color: var(--owner-muted-strong);
  font-size: 0.78rem;
  font-weight: 750;
}

.owner-auth-input,
.owner-auth-password-wrap {
  width: 100%;
}

.owner-auth-input {
  min-height: 3rem;
  padding: 0.72rem 0.85rem;
  border: 1px solid var(--owner-line-strong);
  border-radius: 0.75rem;
  outline: none;
  background: rgba(7, 17, 31, 0.46);
  color: var(--owner-paper);
  font-size: 0.95rem;
  line-height: 1.4;
  text-transform: none;
  transition: border-color 140ms ease, background-color 140ms ease, box-shadow 140ms ease;
}

.owner-auth-input::placeholder {
  color: rgba(174, 187, 201, 0.65);
}

.owner-auth-input:hover {
  border-color: rgba(215, 224, 231, 0.42);
}

.owner-auth-input:focus {
  border-color: var(--owner-mint);
  background: rgba(7, 17, 31, 0.68);
  box-shadow: 0 0 0 3px rgba(143, 228, 192, 0.13);
}

.owner-auth-input[aria-invalid="true"] {
  border-color: var(--owner-coral);
}

.owner-auth-password-wrap {
  position: relative;
}

.owner-auth-password-wrap .owner-auth-input {
  padding-right: 5rem;
}

.owner-auth-password-toggle {
  position: absolute;
  top: 50%;
  right: 0.45rem;
  min-width: 3.8rem;
  min-height: 2.1rem;
  padding: 0.35rem 0.5rem;
  transform: translateY(-50%);
  border: 1px solid transparent;
  border-radius: 0.55rem;
  background: transparent;
  color: var(--owner-mint);
  cursor: pointer;
  font-size: 0.72rem;
  font-weight: 800;
}

.owner-auth-password-toggle:hover {
  background: rgba(143, 228, 192, 0.1);
}

.owner-auth-help {
  margin-top: 1.25rem;
  border-top: 1px solid var(--owner-line);
}

.owner-auth-help summary {
  padding: 1.1rem 0 0;
  color: var(--owner-muted-strong);
  cursor: pointer;
  font-size: 0.8rem;
  font-weight: 750;
  list-style-position: inside;
}

.owner-auth-help summary::marker {
  color: var(--owner-mint);
}

.owner-auth-help[open] summary {
  margin-bottom: 1rem;
}

.owner-auth-help-description {
  margin: 0 0 1rem;
  color: var(--owner-muted);
  font-size: 0.78rem;
  line-height: 1.6;
  word-break: keep-all;
}

.owner-auth-feedback {
  margin: 0;
  padding: 0.72rem 0.82rem;
  border: 1px solid transparent;
  border-radius: 0.75rem;
  font-size: 0.78rem;
  line-height: 1.55;
  word-break: keep-all;
}

.owner-auth-feedback[hidden] {
  display: none;
}

.owner-auth-feedback.is-error {
  border-color: rgba(255, 143, 117, 0.36);
  background: rgba(255, 143, 117, 0.11);
  color: var(--owner-danger);
}

.owner-auth-feedback.is-success {
  border-color: rgba(143, 228, 192, 0.35);
  background: rgba(143, 228, 192, 0.1);
  color: var(--owner-mint);
}

.owner-auth-feedback.is-pending {
  border-color: rgba(244, 199, 124, 0.34);
  background: rgba(244, 199, 124, 0.1);
  color: var(--owner-gold);
}

.owner-auth-primary,
.owner-auth-secondary {
  min-height: 3rem;
  padding: 0.7rem 1rem;
  border-radius: 0.75rem;
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 800;
  transition: transform 140ms ease, background-color 140ms ease, border-color 140ms ease, opacity 140ms ease;
}

.owner-auth-primary {
  border: 1px solid var(--owner-mint);
  background: var(--owner-mint);
  color: var(--owner-ink-deep);
}

.owner-auth-primary:hover {
  background: #b2f0d8;
}

.owner-auth-secondary {
  border: 1px solid var(--owner-line-strong);
  background: transparent;
  color: var(--owner-muted-strong);
}

.owner-auth-secondary:hover {
  border-color: var(--owner-mint);
  color: var(--owner-mint);
}

.owner-auth-primary:active,
.owner-auth-secondary:active,
.owner-auth-password-toggle:active {
  transform: scale(0.98);
}

.owner-auth-primary:disabled,
.owner-auth-secondary:disabled,
.owner-auth-password-toggle:disabled,
.owner-auth-input:disabled {
  cursor: wait;
  opacity: 0.62;
}

.owner-auth-footnote {
  margin: 1.25rem 0 0;
  padding-top: 1.1rem;
  border-top: 1px solid var(--owner-line);
  color: var(--owner-muted);
  font-size: 0.72rem;
  line-height: 1.55;
  word-break: keep-all;
}

.owner-auth-success {
  padding: 1rem;
  border: 1px solid rgba(143, 228, 192, 0.35);
  border-radius: 0.85rem;
  background: rgba(143, 228, 192, 0.08);
}

.owner-auth-success[hidden] {
  display: none;
}

.owner-auth-success h3 {
  margin: 0 0 0.45rem;
  color: var(--owner-mint);
  font-size: 1rem;
  letter-spacing: -0.03em;
}

.owner-auth-success p {
  margin: 0 0 0.9rem;
  color: var(--owner-muted-strong);
  font-size: 0.8rem;
  line-height: 1.6;
  word-break: keep-all;
}

.owner-auth-login-link {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  padding: 0.6rem 0.85rem;
  border: 1px solid rgba(143, 228, 192, 0.55);
  border-radius: 0.65rem;
  color: var(--owner-mint);
  font-size: 0.8rem;
  font-weight: 800;
  text-decoration: none;
}

.owner-auth-login-link:hover {
  background: rgba(143, 228, 192, 0.1);
}

.owner-auth-footer {
  padding-top: 1.25rem;
  border-top: 1px solid var(--owner-line);
}

.owner-auth-footer-label:last-child {
  color: rgba(174, 187, 201, 0.62);
  font-weight: 500;
  letter-spacing: 0.08em;
}

@media (max-width: 760px) {
  .owner-auth-shell {
    padding-top: 1.1rem;
  }

  .owner-auth-layout {
    grid-template-columns: 1fr;
    gap: 2.25rem;
    padding-top: clamp(3rem, 12vw, 6rem);
    padding-bottom: 3rem;
  }

  .owner-auth-intro {
    max-width: 33rem;
  }

  .owner-auth-intro h1 {
    max-width: none;
    font-size: clamp(2.8rem, 13vw, 4.5rem);
    word-break: keep-all;
  }

  .owner-auth-card {
    width: 100%;
    max-width: 38rem;
    justify-self: start;
  }

  .owner-auth-login-layout .owner-auth-card {
    justify-self: center;
  }
}

@media (max-width: 460px) {
  .owner-auth-shell {
    padding-top: 0.9rem;
  }

  .owner-auth-context {
    font-size: 0;
  }

  .owner-auth-context::after {
    color: var(--owner-muted);
    content: "안전한 입구";
    font-size: 0.68rem;
  }

  .owner-auth-layout {
    gap: 1rem;
    padding-top: 1.35rem;
    padding-bottom: 1.25rem;
  }

  .owner-auth-intro .owner-auth-eyebrow,
  .owner-auth-intro .owner-auth-lede,
  .owner-auth-intro .owner-auth-points {
    display: none;
  }

  .owner-auth-intro h1 {
    margin-bottom: 0;
    font-size: 1.4rem;
    line-height: 1.3;
    letter-spacing: -0.055em;
  }

  .owner-auth-intro h1 br {
    display: none;
  }

  .owner-auth-intro h1::after {
    width: 0.45rem;
    height: 0.45rem;
    margin-bottom: 0.03em;
    box-shadow: 0 0 0 0.3rem rgba(255, 143, 117, 0.1);
  }

  .owner-auth-card {
    border-radius: 1.15rem;
    padding: 1.15rem;
  }

  .owner-auth-footer {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.55rem;
  }
}

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

@media (forced-colors: active) {
  .owner-auth-card,
  .owner-auth-brand-mark,
  .owner-auth-success,
  .owner-auth-input,
  .owner-auth-primary,
  .owner-auth-secondary {
    border: 1px solid CanvasText;
  }
}
