/* 버블톡 사이트 — 앱과 같은 색 (lib/theme.dart BrandColors) */
:root {
  --sky: #8ECDF2;
  --sky-deep: #3E9BD4;
  --sky-ink: #256A9C;
  --cream: #FFF8EE;
  --navy: #2F3554;
  --muted: #6F7590;
  --line: #E9E1D3;
  --card: #FFFFFF;
  --notice: #E6F4FC;
  --peach: #FFB38A;
  --me: #EFE9FC;     --me-b: #B7A6EC;
  --coral: #FFE8E1;  --coral-b: #F0A08C;
  --mint: #DDF5EC;   --mint-b: #7FCFB0;
  --pink: #FCE6EF;   --pink-b: #EDA0BD;
  --amber: #FFF0D6;  --amber-b: #E9B666;
  --danger: #C8442F;
  --radius: 22px;
  --wrap: 1040px;
  --head: "Jua", "Pretendard", system-ui, sans-serif;
  --body: "Pretendard", "Gowun Dodum", system-ui, -apple-system, "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--cream);
  color: var(--navy);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.7;
  word-break: keep-all;
  overflow-wrap: anywhere;
}
a { color: var(--sky-ink); }
a:hover { color: var(--navy); }
img { max-width: 100%; display: block; }
h1, h2, h3 { font-family: var(--head); font-weight: 400; line-height: 1.3; margin: 0; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 16px; top: 16px; background: #fff; padding: 8px 12px; border-radius: 10px; z-index: 10; }

/* ── 위쪽 줄 ── */
.top {
  position: sticky; top: 0; z-index: 5;
  background: rgba(255, 248, 238, 0.92);
  backdrop-filter: saturate(1.2) blur(8px);
  border-bottom: 1px solid var(--line);
}
.top .wrap { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 12px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--navy); }
.brand img { width: 36px; height: 36px; border-radius: 10px; }
.brand span { font-family: var(--head); font-size: 24px; }
.nav { display: flex; gap: 4px; flex-wrap: wrap; justify-content: flex-end; }
.nav a {
  text-decoration: none; color: var(--navy); font-size: 15px;
  padding: 6px 12px; border-radius: 999px;
}
.nav a:hover, .nav a[aria-current="page"] { background: var(--notice); }

/* ── 첫 화면 ── */
.hero { position: relative; overflow: hidden; padding: 72px 0 88px; }
.hero .wrap { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 40px; align-items: center; position: relative; z-index: 1; }
.hero h1 { font-size: clamp(36px, 6vw, 58px); }
.hero h1 em { font-style: normal; color: var(--sky-deep); }
.hero p.lead { font-size: 19px; color: var(--muted); margin: 18px 0 28px; max-width: 30em; }
.badges { display: flex; gap: 10px; flex-wrap: wrap; }
.soon {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--sky); color: var(--navy);
  font-family: var(--head); font-size: 19px;
  padding: 12px 22px; border-radius: 999px; border: 2px solid var(--sky-deep);
}
.ghost {
  display: inline-flex; align-items: center;
  padding: 12px 20px; border-radius: 999px; border: 2px solid var(--line);
  text-decoration: none; color: var(--navy); background: var(--card); font-size: 16px;
}

/* 첫 화면 오른쪽: 대화 흉내 */
.chat {
  background: var(--card); border-radius: 28px; padding: 22px 18px 26px;
  border: 1px solid var(--line);
  box-shadow: 0 18px 40px rgba(47, 53, 84, 0.08);
  min-height: 360px; display: flex; flex-direction: column; justify-content: flex-end; gap: 10px;
}
.chat .room { font-family: var(--head); font-size: 17px; text-align: center; margin-bottom: auto; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.chat .room small { display: block; font-family: var(--body); font-size: 12px; color: var(--muted); }
.b {
  max-width: 78%; padding: 10px 16px; border-radius: 20px; border: 1.5px solid;
  font-size: 16px; line-height: 1.45; transform-origin: center;
  animation: rise .5s cubic-bezier(.2, 1.4, .4, 1) both;
}
.b.them { align-self: flex-start; background: var(--mint); border-color: var(--mint-b); border-bottom-left-radius: 6px; }
.b.them2 { align-self: flex-start; background: var(--coral); border-color: var(--coral-b); border-bottom-left-radius: 6px; }
.b.mine { align-self: flex-end; background: var(--me); border-color: var(--me-b); border-bottom-right-radius: 6px; }
.b.fade { opacity: .45; }
.b.pop { animation: pop .38s ease-in forwards; }
@keyframes rise { from { opacity: 0; transform: translateY(14px) scale(.85); } to { opacity: 1; transform: none; } }
@keyframes pop {
  40% { transform: scale(1.12); opacity: 1; }
  100% { transform: scale(.2); opacity: 0; }
}

/* 떠다니는 방울 (눌러서 터뜨릴 수 있음) */
.bubbles { position: absolute; inset: 0; z-index: 0; }
.bubble {
  position: absolute; border-radius: 50%;
  background: radial-gradient(circle at 32% 30%, rgba(255,255,255,.95) 0 14%, rgba(142,205,242,.55) 15% 100%);
  border: 2px solid rgba(62, 155, 212, .35);
  cursor: pointer; padding: 0;
  animation: drift linear infinite;
}
.bubble:focus-visible { outline: 3px solid var(--sky-deep); outline-offset: 2px; }
.bubble.popped { animation: burst .3s ease-out forwards; pointer-events: none; }
@keyframes drift {
  from { transform: translateY(40px); }
  to { transform: translateY(-120vh); }
}
@keyframes burst { to { transform: scale(1.6); opacity: 0; } }

/* ── 구역 ── */
section.block { padding: 64px 0; }
section.block.alt { background: var(--card); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.block h2 { font-size: clamp(28px, 4vw, 38px); text-align: center; }
.block p.sub { text-align: center; color: var(--muted); margin: 10px auto 36px; max-width: 34em; }

.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 24px 22px;
}
.alt .card { background: var(--cream); }
.card .dot {
  width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center;
  font-size: 24px; margin-bottom: 14px; border: 2px solid;
}
.card h3 { font-size: 22px; margin-bottom: 6px; }
.card p { margin: 0; color: var(--muted); font-size: 16px; }
.c-sky .dot { background: var(--notice); border-color: var(--sky); }
.c-mint .dot { background: var(--mint); border-color: var(--mint-b); }
.c-coral .dot { background: var(--coral); border-color: var(--coral-b); }
.c-me .dot { background: var(--me); border-color: var(--me-b); }
.c-amber .dot { background: var(--amber); border-color: var(--amber-b); }
.c-pink .dot { background: var(--pink); border-color: var(--pink-b); }

.promise { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; max-width: 820px; margin: 0 auto; }
.promise li {
  list-style: none; background: var(--card); border: 1px solid var(--line); border-radius: 18px;
  padding: 16px 18px 16px 52px; position: relative;
}
.promise li::before {
  content: "✓"; position: absolute; left: 18px; top: 15px;
  width: 24px; height: 24px; border-radius: 50%; background: var(--sky); color: var(--navy);
  display: grid; place-items: center; font-size: 14px; font-weight: 700;
}
.promise ul { padding: 0; margin: 0; display: contents; }

.cta { text-align: center; }
.cta .soon { margin-top: 8px; }

/* ── 문서 쪽 (약관·개인정보·계정 삭제) ── */
.doc { padding: 48px 0 72px; }
.doc .wrap { max-width: 820px; }
.doc h1 { font-size: clamp(30px, 5vw, 42px); }
.doc .meta { color: var(--muted); font-size: 15px; margin: 8px 0 24px; }
.doc .summary {
  background: var(--notice); border: 1.5px solid var(--sky); border-radius: var(--radius);
  padding: 16px 20px; margin-bottom: 28px;
}
.doc .draft {
  background: var(--amber); border: 1.5px solid var(--amber-b); border-radius: 16px;
  padding: 10px 16px; font-size: 15px; margin-bottom: 20px;
}
.doc h2 { font-size: 26px; margin: 40px 0 8px; padding-top: 8px; }
.doc h3 { font-family: var(--body); font-weight: 700; font-size: 18px; margin: 24px 0 6px; }
.doc p { margin: 0 0 10px; }
.doc ol, .doc ul { margin: 0 0 12px; padding-left: 1.4em; }
.doc li { margin: 4px 0; }
.toc { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 14px 20px; margin-bottom: 8px; }
.toc a { text-decoration: none; }
.steps, .doc .steps { counter-reset: s; padding: 0; }
.steps li {
  list-style: none; counter-increment: s; position: relative;
  padding: 14px 18px 14px 58px; background: var(--card); border: 1px solid var(--line);
  border-radius: 18px; margin-bottom: 10px;
}
.steps li::before {
  content: counter(s); position: absolute; left: 16px; top: 13px;
  width: 30px; height: 30px; border-radius: 50%; background: var(--sky);
  display: grid; place-items: center; font-family: var(--head); font-size: 17px;
}
.mailbtn {
  display: inline-block; margin: 6px 0 4px; padding: 12px 22px; border-radius: 999px;
  background: var(--sky); border: 2px solid var(--sky-deep); color: var(--navy);
  text-decoration: none; font-family: var(--head); font-size: 18px;
}
table.plain { width: 100%; border-collapse: collapse; margin: 8px 0 16px; font-size: 16px; }
table.plain th, table.plain td { border: 1px solid var(--line); padding: 10px 12px; text-align: left; vertical-align: top; }
table.plain th { background: var(--notice); font-weight: 700; width: 32%; }

/* ── 아래쪽 ── */
footer { border-top: 1px solid var(--line); padding: 32px 0 40px; font-size: 14px; color: var(--muted); }
footer .wrap { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
footer .links { display: flex; gap: 16px; flex-wrap: wrap; }
footer .links a { color: var(--navy); text-decoration: none; }
footer .links a:hover { text-decoration: underline; }
footer p { margin: 4px 0; }

@media (max-width: 860px) {
  .hero { padding: 40px 0 56px; }
  .hero .wrap { grid-template-columns: 1fr; }
  .chat { min-height: 300px; }
  .grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
  body { font-size: 16px; }
  .top .wrap { height: auto; padding-top: 10px; padding-bottom: 10px; flex-wrap: wrap; }
  .nav a { padding: 4px 9px; font-size: 14px; }
  .grid, .promise { grid-template-columns: 1fr; }
  section.block { padding: 48px 0; }
  table.plain th { width: 38%; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .bubbles { display: none; }
}

/* ── 게시판 (공지사항·문의) ── */
.account { display: flex; justify-content: flex-end; align-items: center; gap: 12px; min-height: 28px; font-size: 15px; color: var(--muted); }
.linkish { background: none; border: 0; padding: 0; color: var(--sky-ink); font: inherit; cursor: pointer; text-decoration: underline; }
.tag {
  display: inline-block; font-size: 12px; line-height: 1; padding: 5px 9px; border-radius: 999px;
  background: var(--amber); border: 1px solid var(--amber-b); color: var(--navy); vertical-align: middle; white-space: nowrap;
}
.tag.done { background: var(--mint); border-color: var(--mint-b); }
.list { list-style: none; padding: 0; margin: 0 0 16px; border-top: 1px solid var(--line); }
.list li { border-bottom: 1px solid var(--line); }
.list a { display: flex; align-items: center; gap: 10px; padding: 14px 6px; text-decoration: none; color: var(--navy); }
.list a:hover { background: var(--card); }
.list .t { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list .d { color: var(--muted); font-size: 14px; white-space: nowrap; }
.empty { text-align: center; color: var(--muted); padding: 36px 0; }
.small { font-size: 14px; }
.actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin: 16px 0; }
.pager { justify-content: center; }
.btn {
  display: inline-block; padding: 10px 20px; border-radius: 999px; cursor: pointer;
  background: var(--sky); border: 2px solid var(--sky-deep); color: var(--navy);
  text-decoration: none; font-family: var(--head); font-size: 17px;
}
.btn:disabled { opacity: .6; cursor: default; }
.ghost.on { background: var(--notice); border-color: var(--sky); }
.ghost.danger { color: var(--danger); cursor: pointer; font: inherit; }
.post { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 22px 18px; margin-bottom: 14px; }
.post h2 { font-size: 24px; margin: 0 0 4px; padding: 0; }
.post .meta { margin: 0 0 14px; }
.post.reply { background: var(--notice); border-color: var(--sky); }
.post-body { white-space: pre-wrap; }
.form { display: grid; gap: 14px; max-width: 640px; }
.form h2 { margin: 0; padding: 0; font-size: 26px; }
.form label { display: grid; gap: 6px; font-weight: 700; font-size: 15px; }
.form label.check { display: flex; align-items: center; gap: 8px; font-weight: 400; }
.form input:not([type="checkbox"]), .form textarea, .form select {
  font: inherit; font-weight: 400; color: var(--navy); background: #fff;
  border: 1.5px solid var(--sky); border-radius: 14px; padding: 10px 14px; width: 100%;
}
.form textarea { resize: vertical; }
.card-form { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; margin: 0 auto; max-width: 440px; }
.hint { color: var(--muted); margin: 0; font-size: 15px; }
.notice { margin: 0; padding: 10px 14px; border-radius: 12px; background: var(--notice); }
.notice.bad { background: var(--coral); border: 1px solid var(--coral-b); }
.doc .list { padding: 0; }
