/* dodaldodal.co.kr의 소개 · 개인정보 · 미성년자 안내(앱 밖 정적 페이지) — 앱의 토큰처럼 흑백 틀, 라이트 · 다크. */
:root {
  --ink: #1d1d1f; --muted: #6e6e73; --line: rgba(0, 0, 0, .1); --fill: #f2f2f7; --bg: #ffffff; --card: #f5f5f7;
  --today: #ff3b30;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root { --ink: #f5f5f7; --muted: #a1a1a6; --line: rgba(255, 255, 255, .14); --fill: #1c1c1e; --bg: #000000; --card: #111113; }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 17px/1.65 -apple-system, BlinkMacSystemFont, 'Apple SD Gothic Neo', 'Pretendard', 'Noto Sans KR', sans-serif;
  word-break: keep-all; overflow-wrap: anywhere;
}
main { max-width: 760px; margin: 0 auto; padding: 32px 20px 96px; }
header.top { display: flex; align-items: center; gap: 10px; margin-bottom: 28px; }
header.top img { width: 36px; height: 36px; border-radius: 9px; }
header.top a { color: inherit; text-decoration: none; font-weight: 700; font-size: 18px; }
header.top nav { margin-left: auto; display: flex; gap: 14px; font-size: 15px; }
header.top nav a { font-weight: 500; color: var(--muted); }
h1 { font-size: 32px; line-height: 1.25; margin: 0 0 8px; letter-spacing: -.01em; }
h2 { font-size: 21px; margin: 40px 0 10px; }
h3 { font-size: 17px; margin: 24px 0 6px; }
p, li { color: var(--ink); text-wrap: pretty; }
h1, h2, h3, .lead { text-wrap: balance; }
.lead { font-size: 19px; color: var(--muted); margin: 0 0 24px; }
.muted { color: var(--muted); font-size: 15px; }
a { color: inherit; text-underline-offset: 3px; }
ul, ol { padding-left: 22px; }
li { margin: 4px 0; }
.card { background: var(--card); border-radius: 18px; padding: 18px 20px; margin: 14px 0; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 12px; }
.grid .card { margin: 0; }
.card h3 { margin-top: 0; }
table { width: 100%; border-collapse: collapse; font-size: 15px; margin: 10px 0; }
th, td { text-align: left; vertical-align: top; padding: 9px 8px; border-bottom: 1px solid var(--line); }
th { color: var(--muted); font-weight: 600; white-space: nowrap; }
.pill { display: inline-block; padding: 9px 18px; border-radius: 999px; background: var(--ink); color: var(--bg); text-decoration: none; font-weight: 600; font-size: 15px; }
.pill.gray { background: var(--fill); color: var(--ink); }
footer { margin-top: 56px; padding-top: 20px; border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; display: flex; flex-wrap: wrap; gap: 14px; }
footer a { color: var(--muted); }
.pots { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-end; margin: 18px 0 6px; }
.pots img { width: min(56px, 13vw); height: min(56px, 13vw); object-fit: contain; }
@media (max-width: 520px) { h1 { font-size: 27px; } header.top nav { gap: 10px; font-size: 14px; } table { font-size: 14px; } }

/* dodaldodal.co.kr/@아이디 안내(at.html) */
.at-card { text-align: center; padding: 24px 0 8px; }
.at-pot { width: 88px; height: 88px; }
.at-handle { margin-top: 12px; overflow-wrap: anywhere; }

/* ── 소개(about.html, body.ab) ── 넓은 칼럼 · 큰 제목 · 폰 화면 · 굽는 도자기 · 스크롤하면 살짝 떠오름 */
main.wide { max-width: 1040px; }
.ab-hero { text-align: center; padding: 28px 0 12px; }
.ab-hero h1 { font-size: clamp(34px, 6vw, 56px); line-height: 1.12; letter-spacing: -.02em; margin: 18px 0 14px; }
.ab-hero .lead { max-width: 620px; margin: 0 auto 26px; }
.ab-kiln { position: relative; width: 132px; height: 132px; margin: 0 auto; }
.ab-kiln img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; animation: ab-bake 7.5s ease-in-out infinite; }
.ab-kiln .k0 { animation-delay: 0s; }
.ab-kiln .k1 { animation-delay: -5s; }
.ab-kiln .k2 { animation-delay: -2.5s; }
@keyframes ab-bake {
  0% { opacity: 0; transform: translateY(6px) scale(.94); }
  8%, 30% { opacity: 1; transform: none; }
  38%, 100% { opacity: 0; transform: translateY(-4px) scale(1.03); }
}
.ab-seasons { display: flex; justify-content: center; gap: clamp(8px, 2vw, 18px); margin: 8px 0 4px; }
.ab-seasons img { width: clamp(40px, 9vw, 64px); height: clamp(40px, 9vw, 64px); object-fit: contain; animation: ab-float 4.8s ease-in-out infinite; }
.ab-seasons img:nth-child(2n) { animation-delay: -1.6s; }
.ab-seasons img:nth-child(3n) { animation-delay: -3.1s; }
@keyframes ab-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-7px); } }

.ab-row { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(24px, 5vw, 64px); align-items: center; margin: 88px 0; }
.ab-row.flip .ab-text { order: 2; }
.ab-text h2 { font-size: clamp(26px, 3.6vw, 36px); line-height: 1.2; margin: 10px 0 12px; letter-spacing: -.01em; }
.ab-text p { color: var(--muted); font-size: 18px; }
.ab-tag { display: inline-block; padding: 5px 12px; border-radius: 999px; background: var(--ink); color: var(--bg); font-size: 14px; font-weight: 700; }
.ab-list { list-style: none; padding: 0; margin: 16px 0 0; }
.ab-list li { position: relative; padding-left: 22px; margin: 8px 0; }
.ab-list li::before { content: ''; position: absolute; left: 4px; top: .62em; width: 8px; height: 8px; border-radius: 50%; background: var(--ink); opacity: .55; }
.ab-phone { margin: 0; justify-self: center; width: min(300px, 100%); border-radius: 38px; padding: 8px; background: #1d1d1f;
  box-shadow: 0 30px 60px rgba(0, 0, 0, .18), 0 6px 14px rgba(0, 0, 0, .1); }
/* 폰 테두리는 늘 검정(다크에서 --ink를 따르면 하얀 테두리가 됐어요) — 다크에선 가는 빛 테두리로 바탕과 갈라요 */
@media (prefers-color-scheme: dark) { .ab-phone { box-shadow: 0 0 0 1px rgba(255, 255, 255, .16), 0 30px 60px rgba(0, 0, 0, .5); } }
.ab-phone img { display: block; width: 100%; border-radius: 31px; }
.ab-pair { display: grid; grid-template-columns: 1fr .82fr; gap: 16px; align-items: end; }
.ab-phone.small { width: 100%; transform: translateY(-36px); }
/* 다이어리 회전판: 천 표지들이 원을 그리며 천천히 돌아요(앱의 회전판처럼 늘 앞을 보고). 각도 --spin을 @property로 돌리고,
   책마다 제자리 각(--i × 45°)을 더해 원 위로 보낸 뒤 그만큼 되돌려 정면을 봐요. @property가 없는 브라우저에선 멈춘 원. */
@property --spin { syntax: '<angle>'; inherits: true; initial-value: 0deg; }
.ab-ring { --r: clamp(116px, 16vw, 205px); --w: clamp(80px, 9vw, 116px); position: relative; justify-self: center; width: 100%;
  height: calc(var(--w) * 3); perspective: 900px; overflow: clip; overflow-clip-margin: 60px; min-width: 0; }
.ab-ring::after { content: ''; position: absolute; left: 12%; right: 12%; bottom: 4%; height: 18%; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(0, 0, 0, .14), transparent); }
.ab-ring-in { position: absolute; inset: 0; transform-style: preserve-3d; transform: rotateX(-20deg); animation: ab-spin 40s linear infinite; }
.ab-ring img { position: absolute; left: 50%; top: 50%; width: var(--w); margin: calc(var(--w) * -.67) 0 0 calc(var(--w) * -.5);
  --a: calc(var(--spin) + var(--i) * 45deg);
  transform: rotateY(var(--a)) translateZ(var(--r)) rotateY(calc(-1 * var(--a))) rotateX(20deg);
  filter: drop-shadow(0 10px 14px rgba(0, 0, 0, .18)); }
@keyframes ab-spin { to { --spin: -360deg; } }
/* AI 연결: 첫 화면 아래 알약 + 대화 모양(말풍선 — 내 말은 오른쪽 잉크, 답은 왼쪽 회색 + 쓴 도구 이름) */
.ab-badge { display: inline-flex; align-items: center; gap: 6px; margin-top: 18px; padding: 9px 16px; border-radius: 999px;
  background: var(--card); color: var(--ink); font-weight: 700; font-size: 15px; text-decoration: none; }
.ab-badge::after { content: '›'; font-size: 18px; line-height: 1; opacity: .5; }
.ab-more { margin-top: 14px; font-weight: 700; }
.ab-chat { justify-self: center; width: min(400px, 100%); display: flex; flex-direction: column; gap: 10px; padding: 18px;
  border-radius: 28px; background: var(--bg); box-shadow: 0 24px 60px rgba(0, 0, 0, .12), 0 0 0 1px var(--line); }
.ab-chat-top { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; color: var(--muted); padding-bottom: 6px; }
.ab-chat-top img { width: 22px; height: 22px; border-radius: 6px; }
.ab-chat .me { align-self: flex-end; max-width: 82%; margin: 0; padding: 10px 14px; border-radius: 18px 18px 4px 18px;
  background: var(--ink); color: var(--bg); font-size: 15px; }
.ab-chat .ai { align-self: flex-start; max-width: 88%; padding: 10px 14px; border-radius: 18px 18px 18px 4px; background: var(--card); }
.ab-chat .ai p { margin: 4px 0 0; font-size: 15px; color: var(--ink); }
.ab-chat .tool { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 700; color: var(--muted); }
.ab-chat .tool::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: #34C759; }
.ab-center { text-align: center; font-size: clamp(26px, 3.6vw, 34px); }
/* 교환일기: 공책 세 권이 부채처럼 겹쳐 살랑이고, 아래로 그 공책을 돌려 쓰는 친구 셋(도자기 얼굴) — 앞 얼굴이 차례로 톡 */
.ab-pass { justify-self: center; display: flex; flex-direction: column; align-items: center; gap: 26px; width: 100%; }
.ab-pass-books { position: relative; width: clamp(150px, 17vw, 200px); aspect-ratio: 3 / 4; }
.ab-pass-books img { position: absolute; inset: 0; width: 100%; filter: drop-shadow(0 14px 18px rgba(0, 0, 0, .16));
  transform-origin: 50% 92%; animation: ab-sway 6s ease-in-out infinite; }
.ab-pass-books img:nth-child(1) { --t: -15deg; --x: -34%; }
.ab-pass-books img:nth-child(2) { --t: 13deg; --x: 34%; animation-delay: -2s; }
.ab-pass-books img:nth-child(3) { --t: -1deg; --x: 0%; animation-delay: -4s; }
@keyframes ab-sway { 0%, 100% { transform: translateX(var(--x)) rotate(var(--t)); } 50% { transform: translateX(var(--x)) rotate(calc(var(--t) + 4deg)) translateY(-6px); } }
.ab-pass-faces { display: flex; gap: clamp(18px, 3vw, 30px); }
.ab-pass-faces span { width: 58px; height: 58px; border-radius: 50%; background: var(--card); display: grid; place-items: center; animation: ab-turn 4.5s ease-in-out infinite; }
.ab-pass-faces span:nth-child(2) { animation-delay: 1.5s; }
.ab-pass-faces span:nth-child(3) { animation-delay: 3s; }
.ab-pass-faces img { width: 40px; height: 40px; object-fit: contain; }
@keyframes ab-turn { 0%, 30%, 100% { transform: none; box-shadow: none; } 12% { transform: translateY(-8px) scale(1.08); box-shadow: 0 0 0 3px var(--ink); } }
.ab .grid { margin-top: 18px; }
.ab .card { padding: 22px 22px 18px; }
.ab .card p { color: var(--muted); font-size: 16px; margin: 0; }
.ab-promise { margin: 96px 0 0; padding: clamp(24px, 4vw, 40px); border-radius: 28px; background: var(--card); }
.ab-promise h2 { margin-top: 0; font-size: clamp(24px, 3.2vw, 32px); }
.ab-promises { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr)); gap: 18px; margin: 18px 0; }
.ab-promises div { display: flex; flex-direction: column; gap: 4px; }
.ab-promises b { font-size: 17px; }
.ab-promises span { color: var(--muted); font-size: 15px; }
.ab-help { margin-top: 56px; }
.ab-mail { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; margin: 12px 0 6px; }
.ab-mail span { color: var(--muted); }
.ab-mail a { overflow-wrap: anywhere; }
.nw { white-space: nowrap; }

/* 스크롤하면 살짝 떠오름(스크립트가 html.js를 붙인 때만 — 없으면 그냥 보여요) */
html.js .ab-reveal { opacity: 0; transform: translateY(26px); transition: opacity .8s ease, transform .8s cubic-bezier(.2, .8, .2, 1); }
html.js .ab-reveal.in { opacity: 1; transform: none; }

@media (max-width: 760px) {
  .ab-row { grid-template-columns: 1fr; margin: 64px 0; }
  .ab-row.flip .ab-text { order: 0; }
  .ab-phone { width: min(280px, 82vw); }
  .ab-pair { grid-template-columns: 1fr .8fr; }
  .ab-phone.small { transform: translateY(-20px); }
}

/* ── 약관 · 정책 · 미성년자(legal.js가 목차를 만들어요) ── */
.doc-head { padding: 28px 0 8px; }
.doc-head h1 { font-size: clamp(30px, 5vw, 42px); letter-spacing: -.015em; }
.doc-badge { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; background: var(--fill); color: var(--muted); font-size: 14px; }
.toc { margin: 22px 0 8px; padding: 16px 18px; border-radius: 18px; background: var(--card); }
.toc b { display: block; font-size: 14px; color: var(--muted); margin-bottom: 6px; }
.toc ol { margin: 0; padding-left: 20px; columns: 2 240px; column-gap: 28px; }
.toc li { margin: 3px 0; break-inside: avoid; font-size: 15px; }
.toc a { text-decoration: none; }
.toc a:hover { text-decoration: underline; }
body.doc h2 { scroll-margin-top: 20px; padding-top: 22px; border-top: 1px solid var(--line); }
body.doc table { border-radius: 14px; overflow: hidden; background: var(--card); }
body.doc th { background: var(--fill); }
body.doc th, body.doc td { padding: 11px 12px; }
body.doc td code { font-size: 13px; white-space: nowrap; }
.to-top { position: fixed; right: 18px; bottom: 18px; width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--ink); color: var(--bg);
  font-size: 18px; cursor: pointer; opacity: 0; pointer-events: none; transition: opacity .25s; box-shadow: 0 6px 16px rgba(0, 0, 0, .2); }
.to-top.on { opacity: .85; pointer-events: auto; }

@media (prefers-reduced-motion: reduce) {
  .ab-kiln img, .ab-seasons img, .ab-ring-in, .ab-pass-books img, .ab-pass-faces span { animation: none; }
  .ab-kiln .k0, .ab-kiln .k1 { display: none; }
  .ab-kiln .k2 { opacity: 1; }
  html.js .ab-reveal { opacity: 1; transform: none; transition: none; }
}
