/* DOSA — v2 "Mystic night" theme */
:root {
  --ink: #0D0C11; --ink-deep: #08070B; --panel: #131119; --panel-2: #1A1720; --panel-3: #1D1A23;
  --line: #2C2833; --line-2: #24212A; --line-gold: #5A4C36; --line-warm: #3A3226;
  --text: #EDE3CF; --text-2: #CFC5B3; --text-3: #ABA190; --text-4: #8E8573; --text-5: #9C9282;
  --gold: #C9A86A; --gold-hi: #E6CB8F; --seal: #9E3526; --seal-text: #F9F4EA;
  --wood: #6E9A64; --fire: #C8573F; --earth: #C49A52; --metal: #A3A39B; --water: #4F7FA6;
  --serif: 'Cormorant Garamond', Georgia, serif; --hanja: 'Nanum Myeongjo', serif; --sans: Inter, system-ui, sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; font-family: var(--sans); color: var(--text); -webkit-font-smoothing: antialiased;
  background: radial-gradient(1000px 520px at 85% 0%, rgba(201,168,106,0.10), rgba(201,168,106,0) 70%),
              radial-gradient(800px 700px at 0% 40%, rgba(79,127,166,0.08), rgba(79,127,166,0) 70%), var(--ink);
}
a { color: var(--gold); } a:hover { color: var(--gold-hi); }
img { max-width: 100%; height: auto; display: block; }
[hidden] { display: none !important; }
button, input, select { font: inherit; }
.wrap { max-width: 1200px; margin: 0 auto; }
.narrow { max-width: 800px; margin: 0 auto; }
.eyebrow { margin: 0; font-size: 13px; letter-spacing: 0.24em; text-transform: uppercase; color: var(--gold); }
.h1 { margin: 0; font-family: var(--serif); font-weight: 500; font-size: clamp(44px, 6vw, 76px); line-height: 1.02; letter-spacing: -0.01em; }
.h2 { margin: 0; font-family: var(--serif); font-weight: 500; font-size: clamp(34px, 4.2vw, 52px); line-height: 1.08; }
.h3 { margin: 0; font-family: var(--serif); font-weight: 600; font-size: 28px; }
.lead { margin: 0; font-size: 17px; line-height: 1.7; color: var(--text-3); }
.hanja { font-family: var(--hanja); }
.muted { color: var(--text-4); }
.section { padding: 112px 32px; }
.section-tight { padding: 72px 32px 0; }
.stack { display: flex; flex-direction: column; }
.row { display: flex; flex-wrap: wrap; }
.grid-2, .grid-4, .grid-5 { display: grid; gap: 12px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.grid-3 { display: grid; gap: 12px; grid-template-columns: repeat(3, minmax(0, 1fr)); }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 17px 28px; border-radius: 2px; text-decoration: none; font-weight: 600; font-size: 16px; cursor: pointer; border: 1px solid transparent; min-height: 48px; }
.btn-seal { background: var(--seal); color: var(--seal-text); }
.btn-seal:hover { background: #B23F2E; color: var(--seal-text); }
.btn-gold { background: var(--gold); color: var(--ink); }
.btn-gold:hover { background: var(--gold-hi); color: var(--ink); }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--gold); }
.btn-ghost:hover { background: rgba(201,168,106,0.08); color: var(--text); }
.btn-small { padding: 11px 18px; font-size: 14px; min-height: 44px; }

/* nav */
.nav { background: var(--ink-deep); }
.nav-inner { max-width: 1200px; margin: 0 auto; padding: 18px 32px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; }
.logo { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--text); }
.logo { gap: 14px; }
.logo-mark { width: 42px; height: 42px; flex-shrink: 0; }
.logo-type { height: 19px; width: auto; color: var(--text); }
.logo:hover .logo-type { color: var(--gold-hi); }
.nav-links { display: flex; flex-wrap: wrap; align-items: center; gap: 28px; font-size: 14px; }
.nav-links a.plain { color: var(--text-2); text-decoration: none; }

/* hero */
.hero { position: relative; overflow: hidden; padding: 72px 32px 128px; color: #EDE5D6;
  background: radial-gradient(900px 600px at 78% 30%, rgba(201,168,106,0.14), rgba(201,168,106,0) 70%), var(--ink-deep); }
.wm { position: absolute; font-family: var(--hanja); line-height: 1; color: rgba(201,168,106,0.05); pointer-events: none; user-select: none; }
.vertical { position: absolute; writing-mode: vertical-rl; font-family: var(--hanja); font-size: 15px; letter-spacing: 0.6em; color: rgba(201,168,106,0.55); pointer-events: none; }
.hero-grid { position: relative; display: flex; flex-wrap: wrap; gap: 64px; align-items: center; }
.hero-copy { flex: 1 1 480px; min-width: 0; display: flex; flex-direction: column; gap: 28px; }
.hero-art { flex: 1 1 420px; min-width: 0; position: relative; padding: 14px; border: 1px solid var(--line-gold); }
.moon { position: absolute; border-radius: 50%; background: radial-gradient(circle at 40% 40%, #F3E2B8, #C9A86A 55%, #8A6E3E); box-shadow: 0 0 90px rgba(201,168,106,0.45); }
.hero-img { position: relative; width: 100%; height: auto; aspect-ratio: 1 / 1; object-fit: cover; object-position: 40% 50%; border: 1px solid var(--gold); filter: brightness(0.88) contrast(1.06) sepia(0.12); }
.dm-float { position: absolute; left: -24px; bottom: -32px; border: 1px solid var(--gold); background: var(--ink); padding: 20px 24px; width: 240px; box-shadow: 0 20px 40px rgba(0,0,0,0.35); }

/* cards */
.card { background: var(--panel); border: 1px solid var(--line); padding: 32px; }
.card-dark { background: var(--panel-2); border: 1px solid var(--line-warm); padding: 32px; }
.card-gold { background: var(--panel-2); border: 1px solid var(--gold); padding: 36px 32px; }
.pillar { background: var(--panel-3); padding: 24px 16px; display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; min-width: 0; border: 1px solid transparent; }
.pillar.me { background: var(--panel-2); border-color: var(--gold); }
.pillar .label { font-size: 12px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--text-4); }
.pillar.me .label { color: var(--gold); }
.pillar .ch { font-family: var(--hanja); font-size: 52px; line-height: 1.1; }
.pillar .ch.unknown { color: var(--text-4); font-family: var(--serif); font-size: 40px; }
.badge { font-size: 12px; padding: 3px 10px; border-radius: 20px; color: var(--ink); }
.el-wood { background: var(--wood); } .el-fire { background: var(--fire); } .el-earth { background: var(--earth); } .el-metal { background: var(--metal); } .el-water { background: var(--water); }
.bar-row { display: flex; align-items: center; gap: 14px; }
.bar-track { flex-grow: 1; height: 12px; background: var(--panel-3); }
.bar-fill { height: 12px; }
.chip { font-size: 13px; border: 1px solid var(--line-gold); padding: 6px 12px; }

/* forms */
.form { background: var(--panel); border: 1px solid var(--line); padding: 40px; display: flex; flex-direction: column; gap: 20px; }
.field { display: flex; flex-direction: column; gap: 8px; font-size: 13px; font-weight: 600; color: var(--text-3); border: 0; margin: 0; padding: 0; min-width: 0; }
.field legend { padding: 0 0 8px; }
.input { width: 100%; padding: 14px 12px; border: 1px solid #3A3442; background: var(--ink); color: var(--text); border-radius: 2px; font-size: 16px; font-weight: 400; min-width: 0; }
.input:focus { outline: 2px solid var(--gold); outline-offset: 1px; }
.input:disabled { opacity: 0.45; }
.input::placeholder { color: var(--text-4); }
select.input { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--text-4) 50%), linear-gradient(135deg, var(--text-4) 50%, transparent 50%); background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 30px; }
.check { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--text-3); font-weight: 400; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--gold); }
.err { color: #E8907A; font-size: 13px; font-weight: 500; min-height: 18px; margin: 0; }
.hint { font-size: 12px; font-weight: 400; color: var(--text-4); line-height: 1.5; }
.suggest { position: absolute; left: 0; right: 0; top: 100%; z-index: 20; background: var(--panel-2); border: 1px solid var(--line-gold); max-height: 260px; overflow-y: auto; margin: 4px 0 0; padding: 0; list-style: none; }
.suggest li button { width: 100%; text-align: left; background: none; border: 0; color: var(--text); padding: 12px 14px; cursor: pointer; font-size: 15px; }
.suggest li button:hover, .suggest li button:focus { background: rgba(201,168,106,0.12); outline: none; }

/* misc */
.divider { display: flex; align-items: center; justify-content: center; gap: 0; padding: 0 32px; }
.divider span { flex: 0 1 260px; height: 1.2px; margin: 0 -1px; }
.divider span:first-child { background: linear-gradient(90deg, rgba(201,168,106,0), rgba(201,168,106,0.9)); }
.divider span:last-child { background: linear-gradient(90deg, rgba(201,168,106,0.9), rgba(201,168,106,0)); }
.divider svg { flex-shrink: 0; display: block; }
details { border-bottom: 1px solid var(--line); padding: 0 0 22px; }
summary { cursor: pointer; font-family: var(--serif); font-size: 24px; font-weight: 600; padding: 6px 0; }
.table-scroll { overflow-x: auto; }
table.compare { width: 100%; border-collapse: collapse; font-size: 15px; min-width: 560px; }
table.compare th { text-align: left; padding: 14px 12px; border-bottom: 1px solid var(--line-warm); color: var(--gold); font-size: 12px; letter-spacing: 0.16em; text-transform: uppercase; }
table.compare td { padding: 18px 12px; border-bottom: 1px solid #26222C; }
table.compare td:first-child { color: var(--text-5); }
.footer { background: var(--ink-deep); color: var(--text-5); padding: 48px 32px; }
.footer-inner { max-width: 1200px; margin: 0 auto; display: flex; flex-wrap: wrap; gap: 24px; justify-content: space-between; font-size: 13px; line-height: 1.6; }
.footer a { color: var(--text-2); }
.blur { filter: blur(5px); user-select: none; }
.toast { position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%); background: var(--panel-2); border: 1px solid var(--gold); color: var(--text); padding: 14px 20px; font-size: 14px; z-index: 50; }
.notice { border: 1px solid var(--line-gold); background: rgba(201,168,106,0.06); padding: 14px 18px; font-size: 14px; line-height: 1.6; color: var(--text-2); }

/* modal */
dialog.modal { background: var(--panel); color: var(--text); border: 1px solid var(--gold); padding: 36px; max-width: 460px; width: calc(100% - 32px); }
dialog.modal::backdrop { background: rgba(4,4,8,0.75); }

/* responsive */
@media (max-width: 1400px) { .vertical { display: none; } }
@media (max-width: 760px) {
  .section { padding: 80px 20px; }
  .section-tight { padding: 56px 20px 0; }
  .hero { padding: 48px 20px 96px; }
  .nav-inner { padding: 14px 20px; }
  .nav-links { gap: 16px; }
  .nav-links a.plain { display: none; }
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-5 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-2, .grid-3 { grid-template-columns: minmax(0, 1fr); }
  .form, .card, .card-dark { padding: 24px; }
  .dm-float { left: 12px; bottom: -28px; width: 220px; }
  .vertical { display: none; }
  .pillar .ch { font-size: 44px; }
  .hero-art { margin-right: 12px; }
}
