/* 잇다 rs — accounts 화면 공통. Realty Lab(realty.rs.itda.work)과 같은 팔레트를 쓴다(밝은 테마만, 앱과 같음). */
:root {
  --ink: #17302a;
  --muted: #5b6b62;
  --faint: #8a978f;
  --line: #dfe6da;
  --paper: #f5f5ef;
  --card: #ffffff;
  --brand: #204e40;
  --brand-2: #2f7a5f;
  --brand-ink: #ffffff;
  --accent: #f2b84b;
  --mint: #e3f0e8;
  --danger: #b4412f;
  --radius: 16px;
  --shadow: 0 1px 2px #17302a0d, 0 12px 32px #17302a14;
  font-family: Pretendard, Inter, -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Segoe UI", sans-serif;
  font-size: 16px;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); line-height: 1.6; word-break: keep-all; overflow-wrap: anywhere; }
a { color: inherit; }
a:focus-visible, button:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
img { max-width: 100%; }
.skip { position: absolute; left: 16px; top: -80px; z-index: 20; padding: 12px; background: #fff; }
.skip:focus { top: 12px; }

/* --- 머리말 --- */
.top { position: sticky; top: 0; z-index: 10; backdrop-filter: saturate(1.4) blur(12px); background: #f5f5efd9; border-bottom: 1px solid transparent; }
.top.scrolled, .page .top { border-bottom-color: var(--line); }
.top-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; max-width: 1160px; margin: 0 auto; padding: 14px 24px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 800; font-size: 17px; letter-spacing: -0.2px; white-space: nowrap; }
.mark { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: linear-gradient(135deg, var(--brand), var(--brand-2)); color: var(--brand-ink); font-size: 14px; font-weight: 800; letter-spacing: -0.5px; box-shadow: inset 0 -2px 0 #0002; }
.nav { display: flex; align-items: center; gap: 6px; font-size: 14px; }
.nav a:not(.btn) { padding: 6px 10px; border-radius: 8px; text-decoration: none; color: var(--muted); }
.nav a:not(.btn):hover { color: var(--ink); background: #17302a0a; }
.nav form { margin: 0; }
.who { color: var(--muted); padding: 0 6px; }

/* --- 버튼 --- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 10px 18px; border: 1px solid transparent; border-radius: 12px; font: inherit; font-weight: 700; text-decoration: none; cursor: pointer; transition: transform .15s ease, box-shadow .15s ease, background .15s ease; }
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--brand); color: var(--brand-ink); box-shadow: 0 8px 20px #204e4033; }
.btn-primary:hover { background: #173f34; }
.btn-ghost { background: var(--card); border-color: var(--line); color: var(--ink); }
.btn-ghost:hover { border-color: var(--brand); }
.btn-sm { min-height: 36px; padding: 6px 14px; border-radius: 10px; font-size: 14px; }
.btn-danger { background: var(--card); border-color: #e7c6bf; color: var(--danger); }
.btn-google { background: var(--card); border-color: var(--line); color: var(--ink); width: 100%; min-height: 52px; font-size: 16px; }
.btn-google:hover { border-color: var(--brand); box-shadow: var(--shadow); }
.btn-google svg { width: 20px; height: 20px; }

/* --- 공통 배지·카드 --- */
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; background: var(--mint); color: var(--brand); white-space: nowrap; }
.badge.soon { background: #f6ecd6; color: #86601a; }
.badge.wait { background: #f6ecd6; color: #86601a; }
.badge.no { background: #f6e3df; color: var(--danger); }
.badge.dot::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.muted { color: var(--muted); }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 18px; font-size: 13px; font-weight: 700; color: var(--brand); }

/* --- 일반 화면(로그인·서비스·승인·동의·약관) --- */
.page main { max-width: 720px; margin: 0 auto; padding: 40px 24px 72px; }
.page.wide main { max-width: 960px; }
.page h1 { margin: 0 0 8px; font-size: clamp(26px, 3.2vw, 32px); letter-spacing: -0.6px; line-height: 1.3; }
.page .lead { margin: 0 0 28px; color: var(--muted); }
.panel { padding: 28px; }
.messages { list-style: none; margin: 0 0 20px; padding: 0; }
.messages li { padding: 10px 14px; border-radius: 10px; background: var(--mint); color: var(--brand); font-size: 14px; }
.messages li + li { margin-top: 8px; }
.alert { margin: 16px 0; padding: 12px 14px; border: 1px solid #ecd39b; border-radius: 12px; background: #fdf6e6; color: #6b4d12; font-size: 14px; }
code { padding: 1px 6px; border-radius: 6px; background: #17302a0d; font-size: 0.9em; }

.service-list { display: grid; gap: 14px; margin: 0; padding: 0; list-style: none; }
.service-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 20px 22px; }
.service-row strong { font-size: 17px; }
.service-row p { margin: 2px 0 0; font-size: 14px; color: var(--muted); }
.service-row form { margin: 0; }

.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; font-weight: 600; color: var(--muted); font-size: 13px; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.table td { padding: 14px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.table tr:last-child td { border-bottom: 0; }
.table .actions { display: flex; gap: 6px; justify-content: flex-end; flex-wrap: wrap; }
.table form { margin: 0; }
.tabs { display: inline-flex; gap: 4px; padding: 4px; margin: 0 0 16px; border-radius: 12px; background: #17302a0d; }
.tabs a { padding: 6px 14px; border-radius: 9px; font-size: 14px; text-decoration: none; color: var(--muted); }
.tabs a[aria-current] { background: var(--card); color: var(--ink); font-weight: 700; box-shadow: 0 1px 2px #0001; }

.scopes { margin: 16px 0; padding: 0; list-style: none; }
.scopes li { display: flex; gap: 10px; align-items: center; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; font-weight: 600; }
.scopes li::before { content: "✓"; display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--mint); color: var(--brand); font-size: 12px; }
.consent-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 24px; }

.legal { padding: 36px 40px; }
.legal h1 { margin-top: 0; }
.legal h2 { margin: 32px 0 8px; font-size: 18px; }
.legal p, .legal li { color: #2c443d; }
.legal table { width: 100%; border-collapse: collapse; font-size: 14px; }
.legal th, .legal td { text-align: left; padding: 8px 10px; border: 1px solid var(--line); }

/* allauth 기본 화면(로그인 등)을 카드 안으로 */
.auth-card { max-width: 440px; margin: 24px auto 0; padding: 36px 32px; text-align: center; }
.auth-card h1 { font-size: 26px; }
.auth-card ul { list-style: none; margin: 24px 0 0; padding: 0; }
.auth-card p { color: var(--muted); }
.auth-card .fine { margin-top: 20px; font-size: 13px; color: var(--faint); }

/* --- 꼬리말 --- */
.foot { border-top: 1px solid var(--line); }
.foot-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 24px; max-width: 1160px; margin: 0 auto; padding: 28px 24px 40px; font-size: 13px; color: var(--muted); }
.foot nav { display: flex; gap: 16px; }
.foot a { text-decoration: none; }
.foot a:hover { text-decoration: underline; }

/* ===== 랜딩 ===== */
.landing main { overflow: hidden; }
.wrap { max-width: 1160px; margin: 0 auto; padding: 0 24px; }
.hero { position: relative; padding: 72px 0 96px; }
.hero::before { content: ""; position: absolute; inset: -20% -10% auto auto; width: 720px; height: 720px; border-radius: 50%; background: radial-gradient(circle at 30% 30%, #b9dcc7 0%, #b9dcc700 62%); filter: blur(10px); z-index: -1; }
.hero::after { content: ""; position: absolute; left: -200px; bottom: -120px; width: 520px; height: 520px; border-radius: 50%; background: radial-gradient(circle, #f6dca480 0%, #f6dca400 65%); z-index: -1; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 56px; align-items: center; }
.hero h1 { margin: 0 0 22px; font-size: clamp(36px, 5.2vw, 60px); line-height: 1.12; letter-spacing: -1.8px; font-weight: 800; }
.hero h1 em { font-style: normal; background: linear-gradient(120deg, var(--brand) 10%, var(--brand-2) 90%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero .lead { margin: 0 0 32px; max-width: 30em; font-size: 18px; color: var(--muted); }
.cta { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.cta-note { margin: 16px 0 0; font-size: 13px; color: var(--faint); }

.device { position: relative; margin: 0; }
.device-frame { overflow: hidden; border-radius: 18px; border: 1px solid #d3ddd0; background: var(--card); box-shadow: 0 30px 80px #17302a2e, 0 2px 6px #17302a14; transform: perspective(1600px) rotateY(-6deg) rotateX(2deg); transition: transform .6s ease; }
.device:hover .device-frame { transform: perspective(1600px) rotateY(-2deg) rotateX(1deg); }
.device-bar { display: flex; align-items: center; gap: 6px; padding: 10px 14px; border-bottom: 1px solid var(--line); background: #fafaf6; }
.device-bar i { width: 10px; height: 10px; border-radius: 50%; background: #dfe3dc; }
.device-bar span { margin-left: 10px; padding: 3px 12px; border-radius: 8px; background: #17302a0a; font-size: 12px; color: var(--muted); }
.device img { display: block; width: 100%; height: auto; }
.chip { position: absolute; display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 14px; background: #ffffffeb; backdrop-filter: blur(8px); border: 1px solid var(--line); box-shadow: var(--shadow); font-size: 13px; font-weight: 700; animation: float 6s ease-in-out infinite; }
.chip small { display: block; font-weight: 500; color: var(--muted); }
.chip .ico { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 9px; background: var(--mint); color: var(--brand); font-size: 15px; }
.chip.c1 { left: -28px; bottom: 18%; }
.chip.c2 { right: -18px; top: 12%; animation-delay: -3s; }
@keyframes float { 50% { transform: translateY(-8px); } }

.section { padding: 88px 0; }
.section-head { max-width: 640px; margin: 0 0 40px; }
.section-head h2 { margin: 0 0 12px; font-size: clamp(28px, 3.4vw, 40px); line-height: 1.2; letter-spacing: -1px; }
.section-head p { margin: 0; color: var(--muted); font-size: 17px; }

.services { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 20px; }
.svc { position: relative; display: flex; flex-direction: column; overflow: hidden; text-decoration: none; transition: transform .2s ease, box-shadow .2s ease; }
a.svc:hover { transform: translateY(-3px); box-shadow: 0 24px 60px #17302a24; }
.svc-media { aspect-ratio: 16 / 9; overflow: hidden; border-bottom: 1px solid var(--line); background: #eef1ea; }
.svc-media img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: left top; transition: transform .6s ease; }
a.svc:hover .svc-media img { transform: scale(1.03); }
.svc-body { padding: 24px 26px 26px; }
.svc-body h3 { display: flex; align-items: center; gap: 10px; margin: 0 0 6px; font-size: 22px; letter-spacing: -0.4px; }
.svc-body p { margin: 0; color: var(--muted); }
.svc-tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 16px 0 0; padding: 0; list-style: none; }
.svc-tags li { padding: 4px 10px; border-radius: 8px; background: #17302a0a; font-size: 13px; color: var(--muted); }
.svc-go { margin-top: 18px; font-weight: 700; color: var(--brand); }
.svc.next { justify-content: center; align-items: center; min-height: 280px; padding: 32px; border-style: dashed; box-shadow: none; background: #ffffff80; text-align: center; color: var(--muted); }
.svc.next strong { display: block; margin-bottom: 6px; color: var(--ink); font-size: 18px; }

.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; margin: 0; padding: 0; list-style: none; counter-reset: step; }
.steps li { position: relative; padding: 28px; counter-increment: step; }
.steps li::before { content: counter(step, decimal-leading-zero); display: block; margin-bottom: 18px; font-size: 14px; font-weight: 800; color: var(--brand-2); letter-spacing: 1px; }
.steps strong { display: block; margin-bottom: 6px; font-size: 18px; }
.steps p { margin: 0; color: var(--muted); font-size: 15px; }

.ai { position: relative; overflow: hidden; padding: 56px; border-radius: 28px; background: radial-gradient(circle at 85% 20%, #2f7a5f 0%, #204e40 45%, #12302a 100%); color: #eaf3ee; }
.ai::after { content: ""; position: absolute; inset: 0; background-image: radial-gradient(#ffffff14 1px, transparent 1px); background-size: 22px 22px; mask-image: linear-gradient(90deg, transparent, #000 60%); pointer-events: none; }
.ai-grid { position: relative; z-index: 1; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 48px; align-items: center; }
.ai h2 { margin: 12px 0 14px; font-size: clamp(28px, 3.4vw, 40px); line-height: 1.2; letter-spacing: -1px; color: #fff; }
.ai p { margin: 0; color: #c9ddd2; }
.ai .badge { background: #ffffff1f; color: #fff; }
.chat { display: grid; gap: 12px; }
.bubble { max-width: 88%; padding: 14px 16px; border-radius: 16px; font-size: 15px; line-height: 1.5; }
.bubble.me { justify-self: end; background: #fff; color: var(--ink); border-bottom-right-radius: 6px; }
.bubble.bot { background: #ffffff1a; border: 1px solid #ffffff26; color: #eaf3ee; border-bottom-left-radius: 6px; }
.bubble.bot b { color: #fff; }
.clients { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.clients span { padding: 6px 12px; border-radius: 999px; border: 1px solid #ffffff33; font-size: 13px; color: #eaf3ee; }

.trust { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; margin: 0; padding: 0; list-style: none; }
.trust li { padding: 26px; }
.trust .ico { display: grid; place-items: center; width: 40px; height: 40px; margin-bottom: 16px; border-radius: 12px; background: var(--mint); color: var(--brand); font-size: 18px; }
.trust strong { display: block; margin-bottom: 6px; font-size: 17px; }
.trust p { margin: 0; color: var(--muted); font-size: 15px; }

.closing { padding: 24px 0 96px; text-align: center; }
.closing h2 { margin: 0 0 12px; font-size: clamp(28px, 3.4vw, 40px); letter-spacing: -1px; }
.closing p { margin: 0 auto 28px; max-width: 34em; color: var(--muted); }
.closing .cta { justify-content: center; }

@media (max-width: 900px) {
  .hero { padding: 40px 0 64px; }
  .hero-grid, .ai-grid { grid-template-columns: 1fr; gap: 40px; }
  .device-frame { transform: none; }
  .chip.c1 { left: 8px; bottom: -18px; }
  .chip.c2 { right: 8px; top: -18px; }
  .services, .steps, .trust { grid-template-columns: 1fr; }
  .section { padding: 64px 0; }
  .ai { padding: 36px 24px; border-radius: 22px; }
  .nav .hide-sm { display: none; }
  .legal { padding: 28px 22px; }
  .service-row { flex-direction: column; align-items: flex-start; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* 초대 코드(#5) */
.invite { display: flex; gap: 14px; align-items: flex-start; margin: 0 0 22px; padding: 16px 18px; border-color: #b9dcc7; background: linear-gradient(135deg, #ffffff, #eef7f1); }
.invite.bad { border-color: #ecd39b; background: #fdf8ec; }
.invite strong { display: block; font-size: 15px; }
.invite p { margin: 2px 0 0; font-size: 14px; color: var(--muted); }
.invite-ico { display: grid; place-items: center; flex: none; width: 36px; height: 36px; border-radius: 10px; background: var(--mint); font-size: 18px; font-weight: 800; color: var(--brand); }
.batch { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 0 0 18px; padding: 14px 18px; font-size: 14px; }
.batch select, .batch input { font: inherit; padding: 6px 10px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.batch input { width: 80px; }
.messages li.warning, .messages li.error { background: #fdf6e6; color: #6b4d12; }

/* 인라인 style 대신(CSP style-src 'self') */
.foot-note { margin: 0; }
.service-row.compact { padding: 12px 0; }
.spaced { margin-top: 20px; }
.small { font-size: 14px; }
.mark-lg { margin: 0 auto 18px; width: 48px; height: 48px; font-size: 18px; }
.scroll-x { overflow-x: auto; }
.table td.empty { text-align: center; padding: 32px; }
.btn-block { width: 100%; }

/* 관리자 대시보드 */
.dash main { max-width: 1160px; }
.dash h2 { margin: 0 0 16px; font-size: 17px; letter-spacing: -0.2px; }
.dash-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 20px; }
.dash-head .lead { margin: 0; }
.dash-links { display: flex; flex-wrap: wrap; gap: 8px; }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; margin-bottom: 18px; }
.tile { display: flex; flex-direction: column; gap: 2px; padding: 18px 20px; }
.tile-label { font-size: 13px; color: var(--muted); }
.tile-value { font-size: 32px; font-weight: 800; letter-spacing: -1px; line-height: 1.2; font-variant-numeric: tabular-nums; }
.tile-sub { font-size: 13px; color: var(--muted); }
.dash-grid { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 18px; margin-bottom: 18px; }
.dash-grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.dash .panel { margin-bottom: 18px; }
.dash-grid .panel { margin-bottom: 0; }
.chart { display: block; width: 100%; height: auto; overflow: visible; }
.chart .axis { stroke: var(--line); stroke-width: 1; }
.chart .bar { fill: #1f8a5f; }
.chart .hit { fill: transparent; }
.chart .bar-g:hover .bar { fill: #17704c; }
.chart .bar-g:hover .hit { fill: #17302a08; }
.chart text { font-size: 11px; text-anchor: middle; fill: var(--muted); font-variant-numeric: tabular-nums; }
.chart .val { fill: var(--ink); font-weight: 700; }
.table-view { margin-top: 12px; font-size: 14px; }
.table-view summary { cursor: pointer; color: var(--muted); }
.meter { display: block; width: 120px; height: 8px; margin-bottom: 4px; }
.meter .track { fill: #17302a12; }
.meter .fill { fill: #1f8a5f; }
.meter-cell { white-space: nowrap; }
.switches { list-style: none; margin: 0 0 12px; padding: 0; }
.switches li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.switches li:last-child { border-bottom: 0; }
.btn[disabled] { opacity: .45; cursor: not-allowed; transform: none; box-shadow: none; }
.kv { list-style: none; display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 12px; margin: 0 0 16px; padding: 0; }
.kv li { display: flex; flex-direction: column; gap: 2px; }
.kv strong { font-size: 24px; font-variant-numeric: tabular-nums; }
.dash .sub-title { margin: 18px 0 8px; font-size: 15px; }
.people { list-style: none; margin: 0; padding: 0; }
.people li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.people li:last-child { border-bottom: 0; }
@media (max-width: 900px) {
  .dash-grid, .dash-grid.three { grid-template-columns: 1fr; }
}
