:root {
  color-scheme: dark;
  --bg: #1e2227;
  --panel: #262b31;
  --panel-2: #2d333b;
  --line: #3a4149;
  --text: #d8dee5;
  --muted: #9aa4ae;
  --accent: #4c8dff;
  --warn-bg: #342f21;
  --warn-line: #65582c;
  --warn-text: #d9c57d;
  font-family: "Malgun Gothic", "맑은 고딕", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { min-width: 320px; background: var(--bg); }
body { margin: 0; min-height: 100vh; color: var(--text); background: var(--bg); }
a { color: inherit; }

.legal-header {
  width: min(920px, calc(100% - 36px));
  margin: 0 auto;
  padding: 20px 0 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}
.legal-brand { display: inline-flex; width: 98px; text-decoration: none; }
.legal-brand .daydaypdfLogo { display: block; width: 100%; height: auto; overflow: visible; }
.language-link { color: var(--muted); font-size: 13px; text-decoration: none; }
.language-link:hover { color: var(--text); }

.legal-main {
  width: min(920px, calc(100% - 36px));
  margin: 0 auto;
  padding: 28px 0 64px;
}
.legal-kicker { margin: 0 0 8px; color: var(--accent); font-size: 13px; font-weight: 700; }
h1 { margin: 0; color: #fff; font-size: clamp(30px, 5vw, 44px); line-height: 1.25; }
.legal-lead { max-width: 760px; margin: 16px 0 0; color: var(--muted); font-size: 15px; line-height: 1.8; }
.legal-meta { display: flex; flex-wrap: wrap; gap: 8px 18px; margin: 20px 0 0; color: var(--muted); font-size: 13px; }

.draft-banner {
  margin: 26px 0 0;
  padding: 14px 16px;
  border: 1px solid var(--warn-line);
  border-radius: 10px;
  background: var(--warn-bg);
  color: var(--warn-text);
  font-size: 13px;
  line-height: 1.7;
}
.required-value {
  display: inline-block;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgb(217 197 125 / 12%);
  color: var(--warn-text);
  font-weight: 700;
}

.choice-panel {
  margin: 14px 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
}
.choice-panel p { margin-top: 0; }
.choice-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.choice-actions button {
  min-height: 38px;
  padding: 8px 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-2);
  color: var(--text);
  cursor: pointer;
}
.choice-actions button[aria-pressed="true"] { border-color: var(--accent); color: #fff; }
.choice-status { color: var(--muted); font-size: 13px; }

.summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 28px 0 8px;
}
.summary-card { padding: 16px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); }
.summary-card strong { display: block; margin-bottom: 6px; color: #fff; font-size: 14px; }
.summary-card span { color: var(--muted); font-size: 13px; line-height: 1.65; }

.legal-section { padding: 28px 0; border-bottom: 1px solid var(--line); }
.legal-section h2 { margin: 0 0 14px; color: #f2f5f8; font-size: 19px; line-height: 1.45; }
.legal-section h3 { margin: 22px 0 8px; color: #e6ebf0; font-size: 15px; }
.legal-section p,
.legal-section li,
.legal-section dd,
.legal-section dt { font-size: 14px; line-height: 1.85; }
.legal-section p { margin: 10px 0; color: var(--text); }
.legal-section ul,
.legal-section ol { margin: 10px 0; padding-left: 22px; }
.legal-section li + li { margin-top: 5px; }
.legal-section dl { display: grid; grid-template-columns: 150px minmax(0, 1fr); margin: 0; }
.legal-section dt,
.legal-section dd { margin: 0; padding: 10px 0; border-bottom: 1px solid rgb(58 65 73 / 65%); }
.legal-section dt { color: var(--muted); }

.table-scroll { overflow-x: auto; margin: 14px 0; }
table { width: 100%; min-width: 680px; border-collapse: collapse; }
th, td { padding: 11px 12px; border: 1px solid var(--line); font-size: 13px; line-height: 1.65; text-align: left; vertical-align: top; }
th { background: var(--panel-2); color: #f0f3f6; }
td { background: rgb(38 43 49 / 58%); }

.license-table { min-width: 820px; }
.license-table td:first-child { color: #f0f3f6; font-weight: 700; }
.license-note { color: var(--muted) !important; }
.license-download { color: #8eb6ff; font-weight: 700; text-decoration: none; }
.license-download:hover { text-decoration: underline; }
.license-texts > p { color: var(--muted); }
.license-original {
  margin: 12px 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
  overflow: hidden;
}
.license-original summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
  color: #f0f3f6;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.55;
  cursor: pointer;
}
.license-original summary::marker { color: var(--accent); }
.license-original summary a {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 12px;
  font-weight: 400;
  text-decoration: none;
}
.license-original summary a:hover { color: var(--text); }
.license-original pre {
  max-height: 620px;
  margin: 0;
  padding: 18px;
  border-top: 1px solid var(--line);
  overflow: auto;
  background: #181c20;
  color: #cdd4dc;
  font: 12px/1.65 ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.legal-footer {
  display: flex;
  width: min(920px, calc(100% - 36px));
  flex-wrap: wrap;
  gap: 10px 18px;
  margin: 0 auto;
  padding: 22px 0 34px;
  color: var(--muted);
  font-size: 13px;
}
.legal-footer a { text-decoration: none; }
.legal-footer a:hover { color: var(--text); }

@media (max-width: 680px) {
  .legal-main { padding-top: 18px; }
  .summary-grid { grid-template-columns: 1fr; }
  .legal-section dl { grid-template-columns: 1fr; }
  .legal-section dt { padding-bottom: 2px; border-bottom: 0; }
  .legal-section dd { padding-top: 2px; }
  .license-original summary { align-items: flex-start; flex-direction: column; gap: 5px; }
}
