/* english.why — design system */

@import url('https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.9/dist/web/static/pretendard.css');
@import url('https://fonts.googleapis.com/css2?family=Newsreader:ital,opsz,wght@1,6..72,300;1,6..72,400&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  /* default = Calm Green tone */
  --bg: #f6f8f3;
  --paper: #ffffff;
  --paper-2: #fbfcf9;
  --ink: #0f1a13;
  --ink-2: #2c382f;
  --muted: #6c7568;
  --muted-2: #97a094;
  --line: #e4eadd;
  --line-2: #eef2e8;
  --accent: #2f8a4d;
  --accent-soft: #d9ecd9;
  --accent-ink: #163d24;
  --warn: #b7641c;
  --bad: #b14a3a;

  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 18px;
  --r-xl: 28px;

  --shadow-sm: 0 1px 0 rgba(15, 26, 19, 0.04), 0 1px 2px rgba(15, 26, 19, 0.04);
  --shadow-md: 0 1px 0 rgba(15, 26, 19, 0.04), 0 8px 24px -12px rgba(15, 26, 19, 0.18);
  --shadow-lg: 0 1px 0 rgba(15, 26, 19, 0.04), 0 24px 60px -24px rgba(15, 26, 19, 0.28);

  --serif: 'Newsreader', 'Pretendard', serif;
  --sans: 'Pretendard', ui-sans-serif, system-ui, -apple-system, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, monospace;
}

/* === Paper Warm tone === */
[data-tone='paper'] {
  --bg: #f6f1e7;
  --paper: #fcf8ee;
  --paper-2: #f8f2e3;
  --ink: #2a2218;
  --ink-2: #443628;
  --muted: #786857;
  --muted-2: #a3927d;
  --line: #e8dec8;
  --line-2: #efe7d4;
  --accent: #b5562a;
  --accent-soft: #f1d7c2;
  --accent-ink: #5a2611;
}

/* === Mono Sharp tone === */
[data-tone='mono'] {
  --bg: #f1f1ef;
  --paper: #ffffff;
  --paper-2: #fafaf8;
  --ink: #08090a;
  --ink-2: #1a1c1f;
  --muted: #6d7177;
  --muted-2: #a3a7ad;
  --line: #e4e5e2;
  --line-2: #eeefec;
  --accent: #0d0e10;
  --accent-soft: #e6e7e4;
  --accent-ink: #08090a;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  font-feature-settings: 'ss01', 'cv11';
  text-wrap: pretty;
}

button { font-family: inherit; cursor: pointer; }
input, textarea { font-family: inherit; }

.serif { font-family: var(--serif); font-style: italic; font-weight: 400; }
.mono { font-family: var(--mono); }

.brand {
  font-family: var(--sans);
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--ink);
  display: inline-flex;
  align-items: baseline;
  gap: 1px;
}
.brand .dot { color: var(--accent); }
.brand .why {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  color: var(--accent);
}
.brand .q {
  font-family: var(--serif);
  font-style: italic;
  color: var(--accent);
  margin-left: 1px;
}

/* core layout primitives */
.app-shell {
  min-height: 100vh;
  background: #ffffff;
  display: flex;
  flex-direction: column;
}

/* centered max-width column — bg flanks it on wide screens */
.app-frame {
  width: 100%;
  max-width: 600px;
  margin-inline: auto;
  flex: 1;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  box-shadow: 0 0 0 1px var(--line), 0 18px 50px -28px rgba(15, 26, 19, 0.22);
}

.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
}

.btn {
  appearance: none;
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink);
  padding: 10px 16px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -0.005em;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  transition: background 120ms ease, transform 120ms ease, border-color 120ms ease;
}
.btn:hover { background: var(--paper-2); border-color: var(--ink-2); }
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
}
.btn-primary:hover { background: var(--accent-ink); border-color: var(--accent-ink); }
.btn-ghost {
  background: transparent;
  border-color: transparent;
}
.btn-ghost:hover { background: var(--line-2); }
.btn-lg { padding: 14px 22px; font-size: 15px; }
.btn-sm { padding: 6px 12px; font-size: 13px; }

.input {
  width: 100%;
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink);
  padding: 12px 14px;
  border-radius: var(--r-md);
  font-size: 14px;
  outline: none;
  transition: border-color 120ms ease, box-shadow 120ms ease;
}
.input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--line-2);
  color: var(--ink-2);
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
}
.chip-accent { background: var(--accent-soft); color: var(--accent-ink); }

.divider { height: 1px; background: var(--line); margin: 0; border: 0; }

.kbd {
  font-family: var(--mono);
  font-size: 11px;
  padding: 2px 6px;
  border: 1px solid var(--line);
  border-bottom-width: 2px;
  border-radius: 5px;
  background: var(--paper);
  color: var(--muted);
}

.muted { color: var(--muted); }
.dim { color: var(--muted-2); }

.scroll-hide::-webkit-scrollbar { display: none; }
.scroll-hide { scrollbar-width: none; }

/* placeholder image bg */
.ph-img {
  background:
    repeating-linear-gradient(135deg,
      transparent 0 6px,
      rgba(0,0,0,0.04) 6px 7px),
    var(--line-2);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 8px;
}

/* nav */
.topnav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 28px;
  border-bottom: 1px solid var(--line);
  background: var(--paper);
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(8px);
}

.tab-row {
  display: inline-flex;
  background: var(--line-2);
  border-radius: 999px;
  padding: 4px;
  gap: 2px;
}
.tab-row button {
  appearance: none;
  border: 0;
  background: transparent;
  padding: 7px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
}
.tab-row button.active {
  background: var(--paper);
  color: var(--ink);
  box-shadow: var(--shadow-sm);
}

/* small util */
.h-stack { display: flex; align-items: center; gap: 12px; }
.v-stack { display: flex; flex-direction: column; gap: 12px; }

@keyframes flipIn {
  0% { transform: rotateY(90deg); opacity: 0; }
  100% { transform: rotateY(0deg); opacity: 1; }
}
@keyframes slideUp {
  0% { transform: translateY(12px); opacity: 0; }
  100% { transform: translateY(0); opacity: 1; }
}
@keyframes pop {
  0% { transform: scale(0.92); opacity: 0; }
  60% { transform: scale(1.04); opacity: 1; }
  100% { transform: scale(1); opacity: 1; }
}
@keyframes adIn {
  0% { transform: translateY(9px); }
  100% { transform: translateY(0); }
}
.ad-cta:hover { background: var(--accent-ink); transform: translate(-50%, calc(-50% - 1px)); }
.ad-cta:active { transform: translate(-50%, -50%); }
.hero-ad-cta:hover { background: var(--accent-ink); border-color: var(--accent-ink); transform: translateY(-1px); }
.hero-ad-cta:active { transform: translateY(0); }
.ad-banner { transition: border-color 160ms ease; }
.ad-banner:hover { border-color: var(--ink-2); }
@media (prefers-reduced-motion: reduce) {
  .ad-banner [style*="adIn"] { animation: none !important; }
}

/* === Mobile bottom tab bar (hidden on desktop) === */
.bottom-nav { display: none; }

/* === Site footer === */
.site-footer {
  border-top: 1px solid var(--line);
  background: var(--paper-2);
  padding: 28px 28px 20px;
  margin-top: auto;
}
#ad-banner-bottom { margin-top: auto; }
.site-footer-inner {
  max-width: 1180px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 10px;
}
.site-footer-links {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
}
.site-footer-link {
  font-size: 13px;
  color: var(--muted);
  text-decoration: none;
}
.site-footer-link:hover { color: var(--ink); }
.site-footer-sep {
  font-size: 13px;
  color: var(--line);
}
.site-footer-copy {
  font-size: 13px;
  color: var(--muted);
  font-family: var(--mono);
}
.site-footer-contact {
  display: flex;
  align-items: center;
  gap: 16px;
}
.site-footer-icon-btn {
  position: relative;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 50%;
  width: 48px;
  height: 48px;
  cursor: pointer;
  color: var(--muted);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 120ms ease, color 120ms ease;
}
.site-footer-icon-btn:hover { color: var(--ink); border-color: var(--ink-2); }
.site-footer-copied {
  position: absolute;
  bottom: calc(100% + 4px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--ink);
  color: var(--paper);
  font-size: 11px;
  padding: 3px 7px;
  border-radius: 4px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 150ms ease;
}
.site-footer-copied-show { opacity: 1; }

@media (min-width: 0px) {
  .quick-links { grid-template-columns: repeat(3, 1fr) !important; }
}

/* === Wordbook toggle (단어장 / 내 단어장) === */.wb-toggle {
  display: inline-flex;
  gap: 4px;
  padding: 5px;
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: 14px;
  margin-bottom: 28px;
}
.wb-toggle button, .wb-toggle a {
  appearance: none;
  border: 0;
  text-decoration: none;
  background: transparent;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--muted);
  transition: background 120ms ease, color 120ms ease, box-shadow 120ms ease;
}
.wb-toggle button:hover, .wb-toggle a:hover { color: var(--ink-2); }
.wb-toggle button.active, .wb-toggle a.active {
  background: var(--ink);
  color: #fff;
  box-shadow: var(--shadow-sm);
}
.wb-count {
  font-size: 12px;
  font-weight: 600;
  padding: 1px 8px;
  border-radius: 999px;
  background: var(--line-2);
  color: var(--muted);
}
.wb-toggle button.active .wb-count, .wb-toggle a.active .wb-count { background: rgba(255, 255, 255, 0.22); color: #fff; }

/* full-width variant */
.wb-toggle--full {
  display: flex;
  width: 100%;
  margin-bottom: 24px;
}
.wb-toggle--full button, .wb-toggle--full a { flex: 1; justify-content: center; padding: 13px 16px; }

@media (min-width: 0px) {
  .wb-toggle { display: flex; width: 100%; }
  .wb-toggle button, .wb-toggle a { flex: 1; justify-content: center; padding: 11px 8px; }
}

/* === Landing portal (grid home) === */.lp {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--paper);
}
.lp-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 26px clamp(20px, 5vw, 64px) 18px;
}
.lp-menu-wrap { position: relative; }
.lp-menu-btn {
  appearance: none;
  border: 0;
  background: transparent;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  padding: 6px 4px;
  transition: color 140ms ease;
}
.lp-divider {
  height: 1px;
  background: var(--line);
  margin: 0 clamp(20px, 5vw, 64px);
}
.lp-tagline {
  text-align: center;
  padding: clamp(26px, 5vw, 46px) 20px clamp(20px, 4vw, 34px);
  font-size: clamp(17px, 2.4vw, 21px);
  line-height: 1.7;
  color: var(--ink-2);
  letter-spacing: -0.01em;
}
.lp-tagline strong { color: var(--ink); font-weight: 700; }

.lp-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  max-width: 960px;
  width: 100%;
  margin: 0 auto;
  padding: 0 clamp(20px, 5vw, 64px);
  flex: 1;
  align-content: center;
}
.lp-cell {
  appearance: none;
  background: transparent;
  cursor: pointer;
  position: relative;
  min-height: clamp(110px, 17vw, 186px);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  transition: background 160ms ease;
  font-family: inherit;
}
.lp-grid .lp-cell:nth-child(3n) { border-right: 0; }
.lp-grid .lp-cell:nth-child(n+7) { border-bottom: 0; }
.lp-cell--empty { cursor: default; }

.lp-cell-label {
  font-size: clamp(18px, 2.6vw, 24px);
  font-weight: 600;
  letter-spacing: -0.01em;
  white-space: nowrap;
}
.lp-cell--ghost .lp-cell-label { color: var(--muted-2); transition: color 160ms ease; }
.lp-cell--ghost:hover { background: var(--paper-2); }
.lp-cell--ghost:hover .lp-cell-label { color: var(--ink); }

.lp-cell--solid .lp-cell-label { color: var(--ink); font-weight: 700; }
.lp-cell--solid:hover { background: var(--accent-soft); }
.lp-cell--solid:hover .lp-cell-label { color: var(--accent-ink); }

/* ? badge */
.lp-why-badge {
  width: clamp(64px, 9vw, 88px);
  height: clamp(64px, 9vw, 88px);
  border-radius: 50%;
  background: oklch(0.83 0.085 65);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: clamp(26px, 3.4vw, 34px);
  font-weight: 600;
  transition: transform 180ms cubic-bezier(.2,.7,.2,1);
}
.lp-cell--why:hover .lp-why-badge { transform: scale(1.08); }

/* WHY center block */
.lp-why-block {
  width: clamp(96px, 14vw, 150px);
  height: clamp(96px, 14vw, 150px);
  background: var(--ink);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: clamp(22px, 3vw, 30px);
  font-weight: 700;
  letter-spacing: 0.02em;
  transition: transform 180ms cubic-bezier(.2,.7,.2,1);
}
.lp-cell--dark:hover .lp-why-block { transform: scale(1.05); }

@media (min-width: 0px) {
  .lp-grid { padding: 0 16px; }
  .lp-cell { min-height: 96px; }
}/* === Top nav prev/menu/next === */
.nav-step {
  appearance: none; border: 0; background: transparent;
  display: inline-flex; align-items: center; gap: 4px; white-space: nowrap;
  padding: 7px 12px; border-radius: 9px;
  font-size: 13.5px; font-weight: 500; color: var(--muted);
  transition: background 120ms ease, color 120ms ease;
}
.nav-step:not(:disabled):hover { background: var(--line-2); color: var(--ink-2); }
.nav-step:disabled { cursor: default; }
.nav-menu {
  appearance: none; border: 0; background: transparent;
  display: inline-flex; align-items: center; gap: 7px; white-space: nowrap;
  padding: 7px 14px; border-radius: 9px;
  font-size: 14px; font-weight: 700; letter-spacing: 0.04em; color: var(--ink);
  transition: background 120ms ease, color 120ms ease;
}
.nav-menu:hover { background: var(--line-2); }
.nav-dd-item {
  appearance: none; border: 0; background: transparent; width: 100%;
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: 10px;
  font-size: 13.5px; font-weight: 500; color: var(--ink); text-decoration: none;
  transition: background 120ms ease;
}
.nav-dd-item:hover { background: var(--line-2); }
.nav-dd-item:visited { color: var(--ink); }
.topnav-3 {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
}
.nav-user-btn {
  appearance: none; background: var(--paper);
  border: 1px solid var(--line); border-radius: 999px;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 4px 10px 4px 4px;
  transition: border-color 120ms ease, background 120ms ease;
}
.nav-user-btn:hover { background: var(--paper-2); }
.nav-user-btn .nav-username { font-size: 13.5px; font-weight: 500; white-space: nowrap; }

/* inline nav tabs (center) */
.nav-tab {
  appearance: none; border: 0; background: transparent;
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 14px; border-radius: 10px;
  font-size: 13.5px; font-weight: 500; white-space: nowrap;
  color: var(--muted); cursor: pointer;
  transition: background 120ms ease, color 120ms ease;
}
.nav-tab:hover { background: var(--line-2); color: var(--ink-2); }
.nav-tab.active { background: var(--accent-soft); color: var(--accent-ink); }

/* === A-Z dictionary bar (horizontal, tappable) === */
.az-bar {
  display: grid;
  grid-template-columns: repeat(9, 1fr);
  gap: 4px;
  padding: 6px;
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: 16px;
}
.az-bar-letter {
  appearance: none;
  border: 0;
  background: transparent;
  height: 40px;
  border-radius: 10px;
  font-family: var(--mono);
  font-size: 15px;
  font-weight: 600;
  color: var(--ink-2);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 100ms ease, color 100ms ease, transform 80ms ease;
}
.az-bar-letter:not(:disabled):hover { background: var(--accent-soft); color: var(--accent-ink); }
.az-bar-letter:not(:disabled):active { transform: scale(0.94); }
.az-bar-letter.active { background: var(--accent); color: #fff; }

/* etymology morpheme chips */
.etym-chip {
  display: inline-flex; align-items: center;
  padding: 5px 14px; border-radius: 999px;
  font-family: var(--mono); font-size: 13px; font-weight: 600;
  color: #fff;
}
.etym-chip[data-c="sand"]  { background: #b5772e; }
.etym-chip[data-c="green"] { background: var(--accent); }
.etym-chip[data-c="sky"]   { background: #3f72b0; }
.etym-chip[data-c="pink"]  { background: #b1556a; }
.etym-chip[data-c="purple"]{ background: #7a5bb0; }

/* etymology reference chips (어근 사전) */
.etym-ref {
  appearance: none; cursor: pointer;
  display: inline-flex; align-items: baseline; gap: 7px;
  padding: 10px 18px; border-radius: 16px;
  border: 1px solid var(--line); background: var(--paper);
  font-size: 14px; font-weight: 600; color: var(--accent);
  transition: border-color 100ms ease, background 100ms ease;
}
.etym-ref:hover { border-color: var(--accent); background: var(--accent-soft); }

/* multi-select dropdown option */
.ms-opt {
  appearance: none; border: 0; background: transparent; width: 100%;
  display: flex; align-items: center; gap: 10px;
  padding: 9px 11px; border-radius: 9px;
  font-size: 13.5px; font-weight: 500; cursor: pointer;
  transition: background 100ms ease;
}
.ms-opt:hover { background: var(--line-2); }
.ms-box {
  width: 17px; height: 17px; border-radius: 5px; flex-shrink: 0;
  border: 1.5px solid var(--line);
  display: inline-flex; align-items: center; justify-content: center;
}
.ms-box[data-on="1"] { background: var(--accent); border-color: var(--accent); }

@media (min-width: 0px) {
  .az-bar { gap: 5px; padding: 7px; }
  .az-bar-letter { height: 46px; font-size: 17px; }
}

/* === Responsive ============================================ */

/* Tablet */
@media (min-width: 0px) {
  .dash-row { grid-template-columns: 1fr !important; }
  .result-stats { grid-template-columns: 1fr 1fr !important; }
  .assign-row { grid-template-columns: 1fr !important; gap: 16px !important; }
  .assign-row > * { text-align: left !important; }
}

/* Phone */
@media (min-width: 0px) {
  .topnav { padding: 12px 16px; }
  .nav-items { display: none !important; }
  .nav-tabs { display: none !important; }
  /* library rows: drop the progress+% block so the title has room */
  .lib-row-prog { display: none !important; }
  .nav-username { display: none !important; }
  .dash-banner { padding: 24px 20px !important; }
  .banner-ring { display: none; }

  /* banner heading scale */
  .dash-banner h1 { font-size: 25px !important; }

  /* stat strip → 2 columns */
  .stat-strip { grid-template-columns: 1fr 1fr !important; }

  /* result stats stack, scorecard full width */
  .result-stats { grid-template-columns: 1fr !important; }

  /* wordlist detail header: keep title + actions on one row, actions right */
  .wl-head { align-items: center !important; }
  .wl-head h1 { font-size: 26px !important; }

  /* teacher header stacks */
  .t-header { flex-direction: column; align-items: flex-start !important; }

  /* data tables scroll horizontally instead of squishing */
  .t-table { overflow-x: auto !important; -webkit-overflow-scrolling: touch; }
  .t-table-inner { min-width: 680px; }

  /* leave room for bottom nav */
  .app-shell { padding-bottom: 64px; }

  /* show bottom tab bar */
  .bottom-nav {
    display: flex;
    position: fixed;
    left: 50%; right: auto; bottom: 0;
    transform: translateX(-50%);
    width: 100%; max-width: 600px;
    z-index: 40;
    background: var(--paper);
    border-top: 1px solid var(--line);
    padding: 6px 8px calc(6px + env(safe-area-inset-bottom));
  }
  .bottom-nav-item {
    flex: 1;
    appearance: none; border: 0; background: transparent;
    display: flex; flex-direction: column; align-items: center; gap: 3px;
    padding: 6px 0;
    color: var(--muted);
    font-size: 11px; font-weight: 500;
    border-radius: 10px;
  }
  .bottom-nav-item.active { color: var(--accent); }
  .bottom-nav-item span { white-space: nowrap; }
}

/* Small phone — wordlist rows reflow to a compact card-like layout */
@media (min-width: 0px) {
  .wl-table-head { display: none !important; }
  .wl-row {
    grid-template-columns: 1fr auto !important;
    grid-template-areas:
      "word pos"
      "mean mean" !important;
    row-gap: 8px !important;
    padding: 16px !important;
  }
  .wl-row > :nth-child(1) { display: none !important; }       /* index */
  .wl-row > :nth-child(2) { grid-area: word; }                /* word */
  .wl-row > :nth-child(3) { grid-area: mean; }                /* meaning */
  .wl-row > :nth-child(4) { grid-area: pos; text-align: right !important; }
  .wl-row > :nth-child(5) { display: none !important; }       /* bookmark */

  .stat-strip { grid-template-columns: 1fr !important; }

  /* auth: hide decorative left panel, show only the form full-width */
  .auth-grid { grid-template-columns: 1fr !important; }
  .auth-left { display: none !important; }
  .auth-right { padding: 32px 24px !important; }
}
/* pages.css — static legal / info pages for english.why
   Load AFTER theme.css. Uses the same design tokens. */

.page-topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: center;
  height: 58px; padding: 0 20px;
  background: color-mix(in oklch, var(--paper) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--line);
}
.page-topbar .brand { font-size: 19px; }

.legal-wrap { max-width: 640px; width: 100%; margin: 0 auto; padding: 32px 24px 90px; }

.legal-back { margin-bottom: 22px; }
.word-back-link { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; color: var(--muted); text-decoration: none; font-weight: 500; }
.word-back-link:hover { color: var(--ink); }

.legal-head { margin-bottom: 30px; }
.legal-eyebrow {
  font-family: var(--mono); font-size: 11px; color: var(--muted);
  letter-spacing: 0.12em; text-transform: uppercase; margin-bottom: 8px;
}
.legal-head h1 {
  margin: 0; font-size: 30px; font-weight: 600;
  letter-spacing: -0.025em; word-break: keep-all;
}
.legal-lead { font-size: 14.5px; color: var(--muted); margin-top: 6px; line-height: 1.5; }
.legal-date { margin-top: 8px; }

.legal-body { display: flex; flex-direction: column; gap: 26px; }
.legal-intro {
  margin: 0 0 30px; font-size: 14.5px; line-height: 1.72; color: var(--ink-2);
  padding-bottom: 22px; border-bottom: 1px solid var(--line);
}

.art { display: flex; flex-direction: column; gap: 11px; }
.art h2 {
  margin: 0; font-size: 17px; font-weight: 600; letter-spacing: -0.01em;
  display: flex; align-items: baseline; gap: 9px; word-break: keep-all;
}
.art h2 .art-no {
  font-family: var(--mono); font-size: 12.5px; color: var(--accent);
  font-weight: 600; flex-shrink: 0;
}
.art p { margin: 0; font-size: 14.5px; line-height: 1.72; color: var(--ink-2); }

.b-list, .b-ol {
  margin: 2px 0; padding-left: 0; list-style: none;
  display: flex; flex-direction: column; gap: 7px;
}
.b-list li {
  display: flex; gap: 10px; font-size: 14.5px; line-height: 1.6; color: var(--ink-2);
}
.b-list li::before { content: '·'; color: var(--accent); flex-shrink: 0; margin-top: 1px; }
.b-ol { counter-reset: bol; gap: 8px; }
.b-ol li {
  display: flex; gap: 11px; font-size: 14.5px; line-height: 1.6; color: var(--ink-2);
  counter-increment: bol;
}
.b-ol li::before {
  content: counter(bol); font-family: var(--mono); flex-shrink: 0;
  color: var(--muted-2); font-size: 12.5px; margin-top: 2px; min-width: 14px;
}

/* grouped sub-list card (privacy §1) */
.b-group {
  display: flex; flex-direction: column; gap: 7px;
  padding: 12px 16px; border-radius: 12px;
  background: var(--paper-2); border: 1px solid var(--line);
}
.b-group .b-group-t {
  font-family: var(--mono); font-size: 11px; color: var(--muted);
  letter-spacing: 0.06em; text-transform: uppercase;
}

/* condition → response card (refund §4) */
.cond {
  padding: 13px 16px; border-radius: 12px;
  background: var(--paper-2); border: 1px solid var(--line);
}
.cond .cond-c { font-size: 14px; font-weight: 600; color: var(--ink); margin-bottom: 5px; word-break: keep-all; }
.cond .cond-r { font-size: 14px; line-height: 1.6; color: var(--ink-2); }

/* highlighted contact box (privacy §9) */
.contact-box {
  display: flex; flex-direction: column; gap: 6px;
  padding: 14px 18px; border-radius: 12px;
  background: var(--accent-soft); border: 1px solid var(--line);
}
.contact-box .row { display: flex; gap: 8px; font-size: 14px; color: var(--ink-2); }
.contact-box .row .lbl { color: var(--muted); min-width: 52px; }
.contact-box a, .legal-foot a, .art a, .legal-intro a { color: var(--accent-ink); }

.legal-foot { font-size: 12.5px; line-height: 1.6; color: var(--muted); }
.legal-hr { margin: 34px 0 20px; }

/* business info table */
.info-table { padding: 0; overflow: hidden; }
.info-table .info-row {
  display: grid; grid-template-columns: 132px 1fr; gap: 14px;
  padding: 15px 20px; border-bottom: 1px solid var(--line-2); align-items: baseline;
}
.info-table .info-row:last-child { border-bottom: 0; }
.info-table .info-k {
  font-family: var(--mono); font-size: 12px; color: var(--muted);
  letter-spacing: 0.02em; line-height: 1.5;
}
.info-table .info-v { font-size: 14.5px; color: var(--ink-2); line-height: 1.5; word-break: keep-all; }
.svc-feat { margin: 0; padding-left: 0; list-style: none; display: flex; flex-direction: column; gap: 8px; }
.svc-feat li { display: flex; gap: 10px; font-size: 14.5px; line-height: 1.55; color: var(--ink-2); }
.svc-feat li svg { width: 15px; height: 15px; flex-shrink: 0; margin-top: 2px; color: var(--accent); }

/* guide (이용안내) */
.tier {
  position: relative; border: 1px solid var(--line); background: var(--paper);
  border-radius: var(--r-xl); padding: 22px 24px;
}
.tier.featured { border: 1.5px solid var(--accent); background: var(--accent-soft); box-shadow: var(--shadow-md); }
.tier-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin-bottom: 16px; }
.tier-head > div:last-child { display: flex; flex-direction: column; align-items: flex-end; }
.tier-step { font-family: var(--mono); font-size: 10.5px; color: var(--muted); letter-spacing: 0.08em; margin-bottom: 6px; }
.tier-name { font-size: 18px; font-weight: 600; letter-spacing: -0.015em; line-height: 1.3; word-break: keep-all; }
.tier-badge {
  display: inline-flex; align-items: center; gap: 5px; white-space: nowrap;
  font-size: 14px; font-weight: 700; padding: 5px 13px; border-radius: 999px;
  background: var(--paper-2); color: var(--ink-2); border: 1px solid var(--line);
}
.tier-badge.support { background: var(--accent); color: #fff; border: 0; }
.tier-badge.support svg { width: 13px; height: 13px; }
.tier-note { font-family: var(--mono); font-size: 10.5px; color: var(--muted); margin-top: 6px; white-space: nowrap; text-align: right; }
.tier-feats { display: flex; flex-direction: column; gap: 9px; }
.feat { display: flex; align-items: center; gap: 10px; }
.feat .dot {
  flex-shrink: 0; width: 20px; height: 20px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
}
.feat .dot svg { width: 12px; height: 12px; }
.feat.on .dot { background: var(--accent-soft); color: var(--accent-ink); }
.tier.featured .feat.on .dot { background: var(--accent); color: #fff; }
.feat.off .dot { border: 1px solid var(--line); color: var(--muted-2); }
.feat .lbl { font-size: 14.5px; word-break: keep-all; color: var(--ink); font-weight: 500; }
.feat.off .lbl { color: var(--muted-2); font-weight: 400; }

.guide-ctas { display: flex; flex-direction: column; gap: 12px; margin-bottom: 46px; }
.guide-ctas .btn { width: 100%; justify-content: center; }
.guide-ctas .btn svg { width: 16px; height: 16px; }

.coffee {
  border: 1px solid var(--line); border-radius: var(--r-xl);
  background: linear-gradient(160deg, var(--paper) 0%, var(--paper) 55%, var(--accent-soft) 150%);
  padding: 34px 28px 30px; text-align: center; overflow: hidden;
}
.coffee-eyebrow { font-family: var(--mono); font-size: 10.5px; color: var(--muted); letter-spacing: 0.1em; text-transform: uppercase; margin-bottom: 10px; }
.coffee h2 { margin: 0 0 8px; font-size: 25px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.25; }
.coffee h2 .hl { color: var(--accent); font-weight: 400; font-family: var(--serif); }
.coffee-lead { margin: 0 auto 26px; font-size: 14px; line-height: 1.55; color: var(--muted); max-width: 420px; }
.coffee-choice {
  background: var(--paper); border: 1px solid var(--line);
  border-radius: 20px; padding: 18px 30px 20px; display: inline-flex; flex-direction: column;
  align-items: center; gap: 12px; width: 200px; cursor: pointer;
  text-decoration: none; color: inherit;
  transition: border-color 140ms ease, transform 140ms ease, box-shadow 140ms ease;
}
.coffee-choice:hover { border-color: var(--accent); transform: translateY(-2px); box-shadow: var(--shadow-md); }
.coffee-choice img { height: 150px; width: auto; display: block; filter: drop-shadow(0 6px 10px rgba(0,0,0,0.12)); }
.coffee-choice .cc-label { font-size: 15px; font-weight: 600; white-space: nowrap; }
.coffee-choice .cc-amount { font-size: 14px; font-weight: 700; color: var(--accent-ink); background: var(--accent-soft); padding: 4px 14px; border-radius: 999px; }
.coffee-note { font-size: 14px; color: var(--muted); margin-top: 22px; line-height: 1.55; }

/* contact form */
.form-field { display: flex; flex-direction: column; gap: 7px; }
.form-field > label { font-family: var(--mono); font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; }
.topic-chips { display: flex; flex-wrap: nowrap; gap: 6px; }
.topic-chips label {
  display: inline-flex; align-items: center; gap: 5px; cursor: pointer;
  border: 1px solid var(--line); background: var(--paper); color: var(--ink-2);
  border-radius: 999px; padding: 6px 10px; font-size: 13px; font-weight: 500;
  white-space: nowrap;
}
.topic-chips input { accent-color: var(--accent); }
.contact-meta { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.contact-meta .to { font-size: 12px; color: var(--muted); display: inline-flex; align-items: center; gap: 6px; }
.contact-meta .to svg { width: 14px; height: 14px; }

/* === iPhone SE / small phone overrides (≤480px) === */
@media (max-width: 480px) {
  .quick-links { grid-template-columns: 1fr !important; }
}

/* === Contact topic chips wrap at ≤520px === */
@media (max-width: 520px) {
  .topic-chips { flex-wrap: wrap; }
}
