:root {
  --rg-bg: #f4f0e8;
  --rg-paper: #fffdf8;
  --rg-paper-strong: #fffaf1;
  --rg-ink: #1d1e1a;
  --rg-muted: #65685f;
  --rg-line: rgba(29, 30, 26, 0.12);
  --rg-accent: #254f3d;
  --rg-accent-soft: #dfe9e3;
  --rg-warm: #b78452;
  --rg-shadow: 0 18px 50px rgba(17, 23, 18, 0.08);
  --rg-shadow-soft: 0 10px 30px rgba(17, 23, 18, 0.06);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Noto Sans KR", sans-serif;
  color: var(--rg-ink);
  background:
    radial-gradient(circle at top left, rgba(183, 132, 82, 0.12), transparent 28%),
    radial-gradient(circle at top right, rgba(37, 79, 61, 0.11), transparent 24%),
    linear-gradient(180deg, #f6f1e9 0%, #f1ece3 100%);
}

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

button,
input {
  font: inherit;
}

.rg-shell {
  min-height: 100vh;
}

.rg-topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.5rem;
  backdrop-filter: blur(18px);
  background: rgba(244, 240, 232, 0.92);
  border-bottom: 1px solid var(--rg-line);
}

.rg-brand {
  font-size: 1.125rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.rg-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: 100%;
}

.rg-nav-links,
.rg-nav-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.rg-nav form {
  margin: 0;
}

.rg-topbar-link,
.rg-topbar-action,
.rg-topbar-tab,
.rg-primary-button,
.rg-secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 0;
  padding: 0.1rem 0;
  background: transparent;
  color: var(--rg-muted);
  cursor: pointer;
  box-shadow: none;
  appearance: none;
  -webkit-appearance: none;
  font-size: 0.88rem;
  font-weight: 500;
}

.rg-topbar-action {
  font: inherit;
}

.rg-primary-button {
  border-radius: 14px;
  border: 1px solid var(--rg-accent);
  padding: 0.7rem 1rem;
  background: var(--rg-accent);
  color: white;
  font-size: inherit;
  font-weight: inherit;
}

.rg-secondary-button {
  border-radius: 14px;
  border: 1px solid var(--rg-line);
  padding: 0.7rem 1rem;
  background: rgba(255, 253, 248, 0.9);
  color: var(--rg-ink);
  font-size: inherit;
  font-weight: inherit;
}

.rg-home,
.rg-auth-page {
  width: min(1200px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 2rem 0 3rem;
}

.rg-dashboard {
  width: 100%;
  margin: 0;
  padding: 0 0 1rem;
}

.rg-dashboard-panel {
  width: 100%;
}

.rg-dashboard-message-card {
  width: min(760px, calc(100% - 2rem));
  margin: 2rem auto;
  border: 1px solid var(--rg-line);
  border-radius: 28px;
  background: rgba(255, 253, 248, 0.94);
  box-shadow: var(--rg-shadow);
  padding: 2rem;
}

.rg-dashboard-message-card h2 {
  margin: 0.35rem 0 0.7rem;
  font-size: clamp(1.5rem, 2.8vw, 2.2rem);
  line-height: 1.25;
}

.rg-home-card,
.rg-auth-card {
  border: 1px solid var(--rg-line);
  border-radius: 28px;
  background: rgba(255, 253, 248, 0.92);
  box-shadow: var(--rg-shadow);
}

.rg-home-card,
.rg-auth-card {
  padding: 2rem;
}

.rg-home-card h1,
.rg-auth-card h1 {
  margin: 0.25rem 0 0.75rem;
  line-height: 1.15;
  font-size: clamp(2rem, 4vw, 3.5rem);
}

.rg-kicker,
.rg-card-kicker {
  margin: 0;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--rg-accent);
}

.rg-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1rem;
}

.rg-home-card h2,
.rg-auth-card h2 {
  margin: 0.35rem 0 0.6rem;
}

.rg-home-card p,
.rg-auth-copy {
  color: var(--rg-muted);
  line-height: 1.7;
}

.rg-home {
  display: grid;
  place-items: center;
  min-height: calc(100vh - 92px);
}

.rg-home-card--compact {
  width: min(520px, 100%);
}

.rg-home-copy,
.rg-home-status {
  margin: 0;
}

.rg-home-status {
  margin-top: 0.75rem;
}

.rg-inline-form {
  margin: 0;
}

.rg-auth-page {
  display: grid;
  align-content: center;
  min-height: calc(100vh - 92px);
}

.rg-auth-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(360px, 0.85fr);
  gap: 1rem;
}

.rg-auth-card {
  width: 100%;
}

.rg-auth-card--intro {
  background:
    linear-gradient(135deg, rgba(255, 250, 241, 0.97), rgba(240, 232, 222, 0.92)),
    var(--rg-paper);
}

.rg-auth-card--form {
  align-self: center;
}

.rg-auth-points {
  display: grid;
  gap: 0.9rem;
  margin-top: 1.25rem;
}

.rg-auth-point {
  display: grid;
  gap: 0.25rem;
  padding: 1rem 1.1rem;
  border: 1px solid var(--rg-line);
  border-radius: 18px;
  background: rgba(255, 253, 248, 0.76);
  box-shadow: var(--rg-shadow-soft);
}

.rg-auth-point strong {
  font-size: 0.98rem;
}

.rg-auth-point span {
  color: var(--rg-muted);
  line-height: 1.6;
}

.rg-auth-form {
  display: grid;
  gap: 1rem;
  margin-top: 1.25rem;
}

.rg-auth-form label {
  display: grid;
  gap: 0.45rem;
  font-weight: 600;
}

.rg-auth-form input {
  width: 100%;
  border: 1px solid var(--rg-line);
  border-radius: 16px;
  padding: 0.9rem 1rem;
  background: var(--rg-paper-strong);
}

.rg-alert {
  margin-top: 1rem;
  border: 1px solid rgba(185, 52, 52, 0.18);
  background: rgba(185, 52, 52, 0.08);
  color: #812727;
  border-radius: 16px;
  padding: 0.9rem 1rem;
}

.rg-app-frame {
  width: 100%;
  min-height: calc(100vh - 4.75rem);
  border: 0;
  border-radius: 0;
  background: white;
}

.rg-dashboard-nav {
  gap: 1rem;
}

.rg-dashboard-tabs {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
}

.rg-topbar-tab {
  min-height: auto;
}

.rg-topbar-link,
.rg-topbar-action,
.rg-topbar-tab {
  color: var(--rg-muted);
}

.rg-topbar-action {
  color: var(--rg-ink);
}

.rg-topbar-tab.is-active {
  border: 0;
  color: var(--rg-accent);
  border-bottom: 1px solid var(--rg-accent);
  background: transparent;
  box-shadow: none;
}

.rg-topbar-link:focus-visible,
.rg-topbar-action:focus-visible,
.rg-topbar-tab:focus-visible {
  outline: 2px solid rgba(37, 79, 61, 0.28);
  outline-offset: 3px;
}

.rg-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: center;
  padding: 1rem;
  background: rgba(21, 26, 22, 0.34);
  backdrop-filter: blur(8px);
}

.rg-modal-backdrop.hidden {
  display: none;
}

.rg-modal {
  width: min(460px, 100%);
  border: 1px solid var(--rg-line);
  border-radius: 18px;
  background: rgba(255, 253, 248, 0.98);
  box-shadow: var(--rg-shadow);
  padding: 1.4rem;
}

.rg-modal h2 {
  margin: 0 0 0.65rem;
  font-size: 1.15rem;
  line-height: 1.35;
}

.rg-modal p {
  margin: 0;
  color: var(--rg-muted);
  line-height: 1.7;
}

.rg-modal-check {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  margin-top: 1rem;
  color: var(--rg-muted);
  font-size: 0.92rem;
}

.rg-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  margin-top: 1.2rem;
}

@media (max-width: 920px) {
  .rg-topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .rg-nav {
    width: 100%;
    flex-wrap: wrap;
  }

  .rg-nav-links,
  .rg-nav-actions {
    flex-wrap: wrap;
  }

  .rg-auth-layout {
    grid-template-columns: 1fr;
  }

  .rg-app-frame {
    min-height: calc(100vh - 8rem);
  }
}
