:root {
  /* Eye-Comfort Natural Sage Green Theme */
  --bg-primary: #eef4f0;
  --bg-surface: #f7faf8;
  --bg-card: #ffffff;
  --text-primary: #192e22;
  --text-secondary: #486352;
  --text-muted: #748e7f;
  --border-color: #c2d6c8;
  --border-light: #dbe7df;
  --accent-color: #2b7750;
  --accent-hover: #215c3d;
  --accent-light: rgba(43, 119, 80, 0.1);
  --accent-glow: rgba(43, 119, 80, 0.25);
  --danger-color: #e04545;
  --warning-color: #d97706;
  --success-color: #16a34a;

  --shadow-sm: 0 1px 2px 0 rgb(25 46 34 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(25 46 34 / 0.07), 0 2px 4px -2px rgb(25 46 34 / 0.04);
  --shadow-lg: 0 12px 24px -4px rgb(25 46 34 / 0.12), 0 4px 8px -3px rgb(25 46 34 / 0.06);
  --shadow-float: 0 20px 35px -8px rgb(25 46 34 / 0.16);

  /* 8 Tasteful Rich Note Colors */
  --note-yellow-bg: #fef08a;
  --note-yellow-border: #eab308;
  --note-yellow-text: #713f12;
  --note-yellow-line: rgba(161, 98, 7, 0.22);

  --note-blue-bg: #bae6fd;
  --note-blue-border: #38bdf8;
  --note-blue-text: #0369a1;
  --note-blue-line: rgba(3, 105, 161, 0.22);

  --note-green-bg: #bbf7d0;
  --note-green-border: #4ade80;
  --note-green-text: #15803d;
  --note-green-line: rgba(21, 128, 61, 0.22);

  --note-pink-bg: #fbcfe8;
  --note-pink-border: #f472b6;
  --note-pink-text: #9d174d;
  --note-pink-line: rgba(157, 23, 77, 0.22);

  --note-orange-bg: #fed7aa;
  --note-orange-border: #fb923c;
  --note-orange-text: #9a3412;
  --note-orange-line: rgba(154, 52, 18, 0.22);

  --note-purple-bg: #e9d5ff;
  --note-purple-border: #c084fc;
  --note-purple-text: #581c87;
  --note-purple-line: rgba(88, 28, 135, 0.22);

  --note-gray-bg: #e2e8f0;
  --note-gray-border: #94a3b8;
  --note-gray-text: #1e293b;
  --note-gray-line: rgba(30, 41, 59, 0.22);

  --note-white-bg: #ffffff;
  --note-white-border: #cbd5e1;
  --note-white-text: #0f172a;
  --note-white-line: rgba(15, 23, 42, 0.15);

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;
  --font-family: 'Pretendard Variable', -apple-system, BlinkMacSystemFont, system-ui, Roboto, 'Helvetica Neue', 'Segoe UI', 'Hiragino Sans', 'Hiragino Kaku Gothic ProN', 'Yu Gothic UI', 'Yu Gothic', Meiryo, 'Noto Sans JP', 'Apple SD Gothic Neo', 'Noto Sans KR', 'Malgun Gothic', sans-serif;
  --transition: all 0.24s cubic-bezier(0.16, 1, 0.3, 1);
}

[data-theme='dark'] {
  --bg-primary: #0b0f19;
  --bg-surface: #111827;
  --bg-card: #1e293b;
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --border-color: #334155;
  --border-light: #1e293b;
  --accent-color: #34d399;
  --accent-hover: #10b981;
  --accent-light: rgba(52, 211, 153, 0.15);
  --accent-glow: rgba(52, 211, 153, 0.3);

  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.5);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.6);
  --shadow-lg: 0 12px 24px -4px rgb(0 0 0 / 0.7);
  --shadow-float: 0 20px 35px -8px rgb(0 0 0 / 0.85);

  /* Note cards in Dark Mode */
  --note-yellow-bg: #3f3513;
  --note-yellow-border: #a16207;
  --note-yellow-text: #fef08a;
  --note-yellow-line: rgba(254, 240, 138, 0.22);

  --note-blue-bg: #143554;
  --note-blue-border: #0284c7;
  --note-blue-text: #bae6fd;
  --note-blue-line: rgba(186, 230, 253, 0.22);

  --note-green-bg: #163e26;
  --note-green-border: #16a34a;
  --note-green-text: #bbf7d0;
  --note-green-line: rgba(187, 247, 208, 0.22);

  --note-pink-bg: #411933;
  --note-pink-border: #db2777;
  --note-pink-text: #fbcfe8;
  --note-pink-line: rgba(251, 207, 232, 0.22);

  --note-orange-bg: #432412;
  --note-orange-border: #ea580c;
  --note-orange-text: #fed7aa;
  --note-orange-line: rgba(254, 215, 170, 0.22);

  --note-purple-bg: #351a4f;
  --note-purple-border: #9333ea;
  --note-purple-text: #e9d5ff;
  --note-purple-line: rgba(233, 213, 255, 0.22);

  --note-gray-bg: #242f42;
  --note-gray-border: #475569;
  --note-gray-text: #f1f5f9;
  --note-gray-line: rgba(241, 245, 249, 0.22);

  --note-white-bg: #1e293b;
  --note-white-border: #475569;
  --note-white-text: #f8fafc;
  --note-white-line: rgba(248, 250, 252, 0.2);
}

/* Base Reset & Typography */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  overflow-x: hidden;
  max-width: 100%;
}

body {
  font-family: var(--font-family);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  transition: background-color 0.3s ease, color 0.3s ease;
  overflow-x: hidden;
  max-width: 100%;
  -webkit-font-smoothing: antialiased;
  word-break: normal;
  overflow-wrap: anywhere;
  line-break: strict;
}

h1, h2, h3, h4, h5, h6, p, span, a, button, li {
  word-break: normal;
  overflow-wrap: anywhere;
}

/* keep-all is for Korean syllable grouping; breaks Japanese/CJK wrapping on mobile */
html[lang="ko"] body,
html[lang="ko"] h1,
html[lang="ko"] h2,
html[lang="ko"] h3,
html[lang="ko"] h4,
html[lang="ko"] h5,
html[lang="ko"] h6,
html[lang="ko"] p,
html[lang="ko"] span,
html[lang="ko"] a,
html[lang="ko"] button,
html[lang="ko"] li {
  word-break: keep-all;
  overflow-wrap: break-word;
  line-break: auto;
}

/* CJK titles: negative tracking crowds glyphs and worsens overflow */
html[lang="ja"] .brand-name,
html[lang="ja"] .hero-title,
html[lang="ja"] .section-title,
html[lang="zh-TW"] .brand-name,
html[lang="zh-TW"] .hero-title,
html[lang="zh-TW"] .section-title {
  letter-spacing: normal;
}

/* Container */
.container {
  width: 100%;
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 24px;
  min-width: 0;
}

/* Header & Nav */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: rgba(238, 244, 240, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-color);
  transition: var(--transition);
}

[data-theme='dark'] .header {
  background-color: rgba(11, 15, 25, 0.85);
  border-bottom-color: var(--border-color);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--text-primary);
  min-width: 0;
}

.brand-icon {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
  object-fit: cover;
}

.brand-info {
  display: flex;
  flex-direction: column;
}

.brand-name {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 6px;
}

.brand-badge {
  font-size: 0.68rem;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: var(--radius-full);
  background: var(--accent-light);
  color: var(--accent-color);
  letter-spacing: normal;
}

.brand-studio {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 500;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.theme-toggle-btn {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.1rem;
  transition: var(--transition);
  flex-shrink: 0;
}

.theme-toggle-btn:hover {
  background: var(--border-light);
  transform: scale(1.05);
}

.nav-download-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--accent-color);
  color: #ffffff;
  padding: 8px 18px;
  border-radius: var(--radius-full);
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
  flex-shrink: 0;
}

.nav-download-btn:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.nav-download-text {
  display: inline;
}

.nav-download-icon {
  display: none;
  pointer-events: none;
}

/* Language Switcher Dropdown */
.lang-dropdown-wrapper {
  position: relative;
}

.lang-dropdown-btn {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: 8px 12px;
  border-radius: var(--radius-full);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  font-size: 0.84rem;
  font-weight: 600;
  transition: var(--transition);
  flex-shrink: 0;
}

.lang-dropdown-btn:hover {
  background: var(--border-light);
  border-color: var(--accent-color);
}

.globe-line-icon {
  display: none;
  pointer-events: none;
  stroke: var(--text-primary);
}

.desktop-lang-label {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  pointer-events: none;
}

.lang-chevron {
  display: block;
  pointer-events: none;
}

.lang-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  padding: 6px;
  min-width: 145px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
  z-index: 100;
}

.lang-menu.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.lang-option {
  background: transparent;
  border: none;
  text-align: left;
  padding: 7px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.84rem;
  font-weight: 500;
  color: var(--text-primary);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: var(--transition);
  white-space: nowrap;
}

.lang-option:hover {
  background: var(--accent-light);
  color: var(--accent-color);
}

.lang-option.active {
  background: var(--accent-light);
  color: var(--accent-color);
  font-weight: 700;
}


/* Hero Section */
.hero {
  padding: 70px 0 50px;
  position: relative;
  overflow-x: hidden;
}

.hero-glow {
  position: absolute;
  top: 10%;
  left: 50%;
  transform: translateX(-50%);
  width: min(600px, 100%);
  height: 350px;
  background: radial-gradient(circle, var(--accent-light) 0%, rgba(0,0,0,0) 70%);
  filter: blur(50px);
  z-index: -1;
  pointer-events: none;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}

.hero-content {
  display: flex;
  flex-direction: column;
  gap: 20px;
  min-width: 0;
  max-width: 100%;
}

.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--accent-color);
  width: fit-content;
  max-width: 100%;
  box-shadow: var(--shadow-sm);
  white-space: normal;
}

.hero-title {
  font-size: 2.8rem;
  font-weight: 850;
  line-height: 1.25;
  letter-spacing: -0.035em;
  color: var(--text-primary);
}

.hero-title span.highlight {
  color: var(--accent-color);
  position: relative;
}

.hero-desc {
  font-size: 1.1rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* Download CTA Area */
.cta-box {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 10px;
}

.cta-primary-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  background: var(--accent-color);
  color: #ffffff;
  padding: 16px 28px;
  border-radius: var(--radius-md);
  font-size: 1.15rem;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 8px 20px -3px var(--accent-glow);
  transition: var(--transition);
  border: none;
  cursor: pointer;
  max-width: 100%;
}

.cta-primary-btn:hover {
  background: var(--accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 12px 25px -2px var(--accent-glow);
}

.cta-primary-btn svg {
  width: 26px;
  height: 26px;
  fill: currentColor;
  flex-shrink: 0;
}

.cta-btn-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  min-width: 0;
  flex: 1;
}

.cta-btn-title {
  font-size: 1.1rem;
  line-height: 1.25;
}

.cta-btn-sub {
  font-size: 0.76rem;
  font-weight: 400;
  opacity: 0.9;
  line-height: 1.35;
}

.cta-store-group {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  width: 100%;
}

.store-badge-btn {
  flex: 1 1 160px;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  padding: 12px 16px;
  border-radius: var(--radius-md);
  text-decoration: none;
  color: var(--text-primary);
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
}

.store-badge-btn:hover {
  background: var(--bg-card);
  border-color: var(--accent-color);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.store-badge-btn svg {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  fill: currentColor;
}

.store-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1;
}

.store-label {
  font-size: 0.68rem;
  color: var(--text-muted);
  text-transform: uppercase;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.store-name {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text-primary);
}

.store-status {
  font-size: 0.68rem;
  color: var(--accent-color);
  font-weight: 500;
}

.compatibility-note {
  font-size: 0.8rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  max-width: 100%;
}

/* App Mockup — static visual replica of real NaMemo home */
.mockup-container {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  max-width: 100%;
  overflow: hidden;
  padding: 0;
}

.mockup-window {
  width: min(100%, 320px);
  max-width: 320px;
  aspect-ratio: 9 / 19.5; /* iPhone 14/15 portrait */
  height: auto;
  border-radius: 36px;
  box-shadow: var(--shadow-float);
  overflow: hidden;
  border: 1px solid var(--border-color);
}

.mockup-app {
  display: flex;
  flex-direction: column;
  background-color: var(--bg-surface);
  width: 100%;
  height: 100%;
  pointer-events: none;
  user-select: none;
}

/* Header (matches real .app-header) */
.mock-app-header {
  height: 56px;
  min-height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 12px 0 14px;
  border-bottom: 1px solid var(--border-color);
  background-color: var(--bg-surface);
  flex-shrink: 0;
}

.mock-header-left,
.mock-header-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.mock-header-title-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.mock-header-title {
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

.mock-sync-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--success-color);
  flex-shrink: 0;
}

.mock-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  color: var(--text-primary);
  position: relative;
  flex-shrink: 0;
}

.mock-new-note {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  border: 1.5px solid var(--text-primary);
}

.mock-header-right {
  gap: 2px;
}

/* Content + grid */
.mock-app-content {
  flex: 1;
  overflow: hidden;
  padding: 6px;
  background-color: var(--bg-surface);
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.notes-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 5px;
  width: 100%;
  flex-shrink: 0;
}

/* Badges sit in the empty gap under the notes, above bottom nav */
.mock-badge-slot {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 8px;
  padding: 10px 8px;
  min-height: 0;
}

.floating-badge {
  position: relative;
  z-index: 2;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  padding: 7px 12px;
  border-radius: var(--radius-full);
  box-shadow: 0 8px 20px -4px rgba(0, 0, 0, 0.12), 0 4px 10px -4px rgba(0, 0, 0, 0.06);
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-primary);
  animation: float 4s ease-in-out infinite;
  white-space: nowrap;
  max-width: 100%;
}

.floating-badge-sub {
  font-size: 0.64rem;
  color: var(--text-muted);
  font-weight: 500;
}

.badge-security {
  animation-delay: 0s;
}

.badge-sync {
  animation-delay: 2s;
}

@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-6px); }
}

.note-card {
  aspect-ratio: 1 / 1;
  border-radius: 8px;
  border-width: 1px;
  border-style: solid;
  padding: 8px 7px;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 4px;
  margin-bottom: 4px;
  flex-shrink: 0;
}

.card-title {
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.25;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: break-all;
  margin: 0;
}

.card-badges {
  display: flex;
  gap: 2px;
  align-items: center;
  flex-shrink: 0;
}

.card-pin-icon,
.card-favorite-icon {
  width: 11px;
  height: 11px;
  flex-shrink: 0;
}

.card-body {
  font-size: 0.66rem;
  line-height: 1.35rem;
  opacity: 0.92;
  overflow: hidden;
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.card-text-line {
  height: 1.25rem;
  line-height: 1.25rem;
  border-bottom: 1px solid color-mix(in srgb, currentColor 18%, transparent);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding-top: 1px;
  box-sizing: border-box;
}

.card-text-line.card-divider-line {
  height: 7px;
  min-height: 7px;
  margin: 4px 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border: none;
  padding: 0;
}

.card-text-line.card-divider-line::before,
.card-text-line.card-divider-line::after {
  content: '';
  display: block;
  width: 100%;
  border-bottom: 1.5px dashed currentColor;
  opacity: 0.55;
}

.card-footer {
  margin-top: auto;
  font-size: 0.58rem;
  opacity: 0.9;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
  padding-top: 2px;
  gap: 4px;
}

.card-category-tag {
  font-size: 0.55rem;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 4px;
  flex-shrink: 1;
  line-height: 1.2;
  display: inline-block;
  max-width: 70%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.card-date {
  opacity: 0.65;
  font-size: 0.58rem;
  flex-shrink: 0;
}

/* Category badge colors (matches tab-service defaults) */
.cat-home {
  background-color: color-mix(in srgb, var(--note-green-border) 22%, transparent);
  color: var(--note-green-border);
  border: 1px solid color-mix(in srgb, var(--note-green-border) 45%, transparent);
}
.cat-account {
  background-color: color-mix(in srgb, var(--note-orange-border) 22%, transparent);
  color: var(--note-orange-border);
  border: 1px solid color-mix(in srgb, var(--note-orange-border) 45%, transparent);
}
.cat-memo {
  background-color: color-mix(in srgb, var(--note-blue-border) 22%, transparent);
  color: var(--note-blue-border);
  border: 1px solid color-mix(in srgb, var(--note-blue-border) 45%, transparent);
}
.cat-other {
  background-color: color-mix(in srgb, var(--note-purple-border) 22%, transparent);
  color: var(--note-purple-border);
  border: 1px solid color-mix(in srgb, var(--note-purple-border) 45%, transparent);
}
.cat-info {
  background-color: color-mix(in srgb, var(--note-yellow-border) 22%, transparent);
  color: var(--note-yellow-border);
  border: 1px solid color-mix(in srgb, var(--note-yellow-border) 45%, transparent);
}

/* Note color fills */
.memo-yellow {
  background-color: var(--note-yellow-bg);
  border-color: var(--note-yellow-border);
  color: var(--note-yellow-text);
}
.memo-blue {
  background-color: var(--note-blue-bg);
  border-color: var(--note-blue-border);
  color: var(--note-blue-text);
}
.memo-green {
  background-color: var(--note-green-bg);
  border-color: var(--note-green-border);
  color: var(--note-green-text);
}
.memo-pink {
  background-color: var(--note-pink-bg);
  border-color: var(--note-pink-border);
  color: var(--note-pink-text);
}
.memo-orange {
  background-color: var(--note-orange-bg);
  border-color: var(--note-orange-border);
  color: var(--note-orange-text);
}
.memo-purple {
  background-color: var(--note-purple-bg);
  border-color: var(--note-purple-border);
  color: var(--note-purple-text);
}
.memo-gray {
  background-color: var(--note-gray-bg);
  border-color: var(--note-gray-border);
  color: var(--note-gray-text);
}
.memo-white {
  background-color: var(--note-white-bg);
  border-color: var(--note-white-border);
  color: var(--note-white-text);
}

/* Bottom nav */
.mock-bottom-nav {
  height: 58px;
  min-height: 58px;
  border-top: 1px solid var(--border-color);
  background-color: var(--bg-surface);
  display: flex;
  align-items: center;
  justify-content: space-around;
  flex-shrink: 0;
}

.mock-nav-tab {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  height: 58px;
  padding: 4px 2px;
  color: var(--text-muted);
}

.mock-nav-tab.active {
  color: var(--accent-color);
}

.mock-nav-label {
  font-size: 0.64rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

/* Section Header */
.section {
  padding: 80px 0;
}

.section-header {
  text-align: center;
  max-width: 680px;
  margin: 0 auto 50px;
  width: 100%;
  min-width: 0;
}

.feature-card-highlight-row {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  min-width: 0;
}

.feature-card-highlight-row > div:last-child {
  min-width: 0;
  flex: 1;
}

.section-badge {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--accent-color);
  background: var(--accent-light);
  padding: 4px 12px;
  border-radius: var(--radius-full);
  margin-bottom: 12px;
}

.section-title {
  font-size: 2.2rem;
  font-weight: 800;
  letter-spacing: -0.025em;
  color: var(--text-primary);
  line-height: 1.3;
  margin-bottom: 14px;
}

.section-desc {
  font-size: 1.05rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* Features Grid */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 32px 26px;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
  max-width: 100%;
}

.feature-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent-color);
  box-shadow: var(--shadow-md);
}

.feature-icon-wrapper {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-sm);
  background: var(--accent-light);
  color: var(--accent-color);
  display: flex;
  align-items: center;
  justify-content: center;
}

.feature-icon-wrapper svg {
  width: 28px;
  height: 28px;
  fill: currentColor;
}

.feature-card-title {
  font-size: 1.2rem;
  font-weight: 750;
  color: var(--text-primary);
}

.feature-card-desc {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.lang-badge-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}

.lang-badge-tag {
  font-size: 0.76rem;
  padding: 3px 8px;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--text-secondary);
  font-weight: 500;
}


/* Cross-Platform Specs & Security Banner */
.security-banner {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 40px;
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 40px;
  align-items: center;
  box-shadow: var(--shadow-md);
  min-width: 0;
  max-width: 100%;
}

.security-text {
  min-width: 0;
}

.security-text h3 {
  font-size: 1.7rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 14px;
}

.security-text p {
  font-size: 0.98rem;
  color: var(--text-secondary);
  line-height: 1.65;
  margin-bottom: 20px;
}

.security-checklist {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.security-checklist li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.5;
}

.security-checklist svg {
  width: 18px;
  height: 18px;
  fill: var(--accent-color);
  flex-shrink: 0;
  margin-top: 3px;
}

.security-diagram {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.diag-step {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 12px;
  background: var(--bg-surface);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-light);
  min-width: 0;
}

.diag-icon {
  font-size: 1.3rem;
  flex-shrink: 0;
}

.diag-info {
  min-width: 0;
  flex: 1;
}

.diag-info h4 {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-primary);
}

.diag-info p {
  font-size: 0.76rem;
  color: var(--text-muted);
  margin: 0;
}

/* FAQ Accordion */
.faq-list {
  max-width: 800px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.faq-item {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: var(--transition);
}

.faq-question {
  width: 100%;
  padding: 20px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  background: none;
  border: none;
  text-align: left;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
  cursor: pointer;
  line-height: 1.4;
}

.faq-question > span {
  min-width: 0;
  flex: 1;
}

.faq-arrow {
  transition: transform 0.25s ease;
  width: 18px;
  height: 18px;
  fill: var(--text-muted);
  flex-shrink: 0;
}

.faq-item.active .faq-arrow {
  transform: rotate(180deg);
  fill: var(--accent-color);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  padding: 0 24px;
  transition: max-height 0.3s ease, padding 0.3s ease;
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.6;
  overflow-wrap: anywhere;
}

.faq-item.active .faq-answer {
  max-height: 800px;
  padding: 0 24px 20px 24px;
}

/* CTA Bottom Section */
.cta-bottom {
  background: linear-gradient(180deg, var(--bg-primary) 0%, var(--bg-surface) 100%);
  text-align: center;
  padding: 80px 0 100px;
  border-top: 1px solid var(--border-color);
}

.cta-bottom-box {
  max-width: 680px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}

/* Navigation Links (Desktop) */
.nav-links {
  display: flex;
  align-items: center;
  gap: 24px;
}

.nav-text-link {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 500;
  transition: var(--transition);
}

.nav-text-link:hover {
  color: var(--accent-color);
}

@media (max-width: 820px) {
  .nav-links {
    display: none;
  }
}

/* Mobile Free Notice Chip (Hero) */
.mobile-free-notice-wrap {
  margin-top: 14px;
  display: flex;
  justify-content: flex-start;
}

@media (max-width: 960px) {
  .mobile-free-notice-wrap {
    justify-content: center;
  }
}

.mobile-free-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--accent-light);
  color: var(--accent-color);
  font-size: 0.82rem;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  border: 1px solid rgba(45, 90, 69, 0.18);
  box-shadow: var(--shadow-sm);
}

[data-theme='dark'] .mobile-free-pill {
  border-color: rgba(74, 154, 116, 0.35);
}

.mobile-free-pill .pill-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background-color: var(--accent-color);
  animation: pulseDot 2s infinite ease-in-out;
}

@keyframes pulseDot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.85); }
}

/* Pricing Section */
.pricing-section {
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, var(--bg-surface) 0%, var(--bg-primary) 100%);
}

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px;
  max-width: 920px;
  margin: 0 auto 32px;
  align-items: stretch;
}

.pricing-card {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 36px 32px 32px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: var(--shadow-md);
  transition: var(--transition);
}

.pricing-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.pricing-card.pro-card {
  border: 2px solid var(--accent-color);
  background: linear-gradient(180deg, var(--bg-card) 0%, var(--bg-surface) 100%);
}

.pricing-popular-tag {
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--accent-color);
  color: #ffffff;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 4px 16px;
  border-radius: var(--radius-full);
  box-shadow: 0 4px 14px rgba(45, 90, 69, 0.3);
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.pricing-card-header {
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 22px;
  margin-bottom: 24px;
}

.pricing-plan-badge {
  display: inline-block;
  font-size: 0.76rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  background: var(--border-light);
  color: var(--text-secondary);
  margin-bottom: 10px;
}

.pricing-plan-badge.pro-badge {
  background: var(--accent-light);
  color: var(--accent-color);
}

.pricing-plan-name {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.pricing-plan-target {
  font-size: 0.88rem;
  color: var(--text-muted);
  min-height: 22px;
  margin-bottom: 16px;
}

.pricing-price-wrap {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.pricing-price {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1;
}

.pricing-price.highlight {
  color: var(--accent-color);
}

.pricing-period {
  font-size: 0.92rem;
  color: var(--text-muted);
  font-weight: 600;
}

.pricing-feature-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 13px;
  margin-bottom: 30px;
  flex-grow: 1;
}

.pricing-feature-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 1.45;
}

.pricing-feature-item strong {
  color: var(--text-primary);
}

.pricing-feature-item .check-icon {
  width: 18px;
  height: 18px;
  min-width: 18px;
  fill: var(--text-muted);
  margin-top: 2px;
}

.pricing-feature-item.highlight .check-icon,
.pricing-feature-item .check-icon.highlight {
  fill: var(--accent-color);
}

.pricing-card-footer {
  margin-top: auto;
}

.pricing-btn {
  display: block;
  width: 100%;
  padding: 13px;
  border-radius: var(--radius-md);
  font-size: 0.95rem;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
  transition: var(--transition);
  cursor: pointer;
}

.pricing-btn.secondary {
  background: var(--bg-surface);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
}

.pricing-btn.secondary:hover {
  background: var(--border-light);
  border-color: var(--text-muted);
}

.pricing-btn.primary {
  background: var(--accent-color);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(45, 90, 69, 0.28);
}

.pricing-btn.primary:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(45, 90, 69, 0.35);
}

.pricing-sub-caption {
  margin-top: 10px;
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.45;
  text-align: center;
}

/* Pricing Clear Notice Banner */
.pricing-notice-card {
  max-width: 920px;
  margin: 0 auto;
  background: var(--accent-light);
  border: 1px solid rgba(45, 90, 69, 0.2);
  border-radius: var(--radius-md);
  padding: 18px 24px;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: var(--shadow-sm);
}

[data-theme='dark'] .pricing-notice-card {
  border-color: rgba(74, 154, 116, 0.35);
}

.pricing-notice-icon {
  font-size: 1.6rem;
  flex-shrink: 0;
}

.pricing-notice-content strong {
  display: block;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--accent-color);
  margin-bottom: 4px;
}

.pricing-notice-content p {
  font-size: 0.88rem;
  color: var(--text-secondary);
  margin: 0;
  line-height: 1.55;
}

@media (max-width: 768px) {
  .pricing-grid {
    grid-template-columns: 1fr;
    max-width: 440px;
  }
  .pricing-notice-card {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
}

/* Footer */
.footer {
  border-top: 1px solid var(--border-color);
  background: var(--bg-surface);
  padding: 40px 0;
  font-size: 0.86rem;
  color: var(--text-secondary);
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.footer-links {
  display: flex;
  gap: 24px;
}

.footer-link {
  color: var(--text-secondary);
  text-decoration: none;
  transition: var(--transition);
}

.footer-link:hover {
  color: var(--accent-color);
}

/* Responsive Media Queries */

/* Tablet & Smaller Laptops (<= 960px) */
@media (max-width: 960px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 36px;
  }
  .hero-content {
    text-align: center;
    align-items: center;
  }
  .hero-tag {
    align-self: center;
  }
  .hero-title {
    font-size: 2.2rem;
    line-height: 1.3;
  }
  .hero-desc {
    max-width: 600px;
    margin: 0 auto;
  }
  .cta-box {
    max-width: 480px;
    width: 100%;
    margin: 10px auto 0;
  }
  .compatibility-note {
    justify-content: center;
    text-align: center;
  }
  .features-grid {
    grid-template-columns: 1fr 1fr;
    gap: 18px;
  }
  .security-banner {
    grid-template-columns: 1fr;
    gap: 28px;
    padding: 32px;
  }
}

/* Tablets & Large Phones (<= 768px) */
@media (max-width: 768px) {
  .section {
    padding: 60px 0;
  }
  .section-header {
    margin-bottom: 36px;
  }
  .section-title {
    font-size: 1.8rem;
  }
  .cta-bottom {
    padding: 60px 0 80px;
  }
}

/* Standard Mobile Phones (<= 640px) */
@media (max-width: 640px) {
  .container {
    padding: 0 16px;
  }
  .header .nav {
    height: 62px;
  }
  .brand-name {
    font-size: 1.12rem;
  }
  .brand-studio {
    display: none;
  }
  .brand-badge {
    display: none;
  }
  .nav-actions {
    gap: 8px;
    flex-shrink: 0;
  }
  .lang-dropdown-btn {
    width: 38px;
    height: 38px;
    min-width: 38px;
    padding: 0;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .globe-line-icon {
    display: block;
  }
  .desktop-lang-label,
  .lang-chevron {
    display: none !important;
  }
  .theme-toggle-btn {
    width: 38px;
    height: 38px;
    min-width: 38px;
    font-size: 1.05rem;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .nav-download-btn {
    width: 38px;
    height: 38px;
    min-width: 38px;
    padding: 0;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .nav-download-text {
    display: none !important;
  }
  .nav-download-icon {
    display: block;
  }
  
  .hero {
    padding: 40px 0 30px;
  }
  .hero-title {
    font-size: 1.68rem;
    line-height: 1.32;
  }
  .hero-desc {
    font-size: 0.96rem;
    line-height: 1.6;
  }
  .cta-primary-btn {
    padding: 14px 18px;
    width: 100%;
    gap: 12px;
  }
  .cta-btn-title {
    font-size: 1rem;
  }
  .cta-btn-sub {
    font-size: 0.72rem;
    line-height: 1.35;
  }
  .cta-store-group {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    width: 100%;
  }
  .store-badge-btn {
    min-width: 0;
    width: 100%;
    padding: 10px 12px;
    gap: 8px;
  }
  .store-name {
    font-size: 0.86rem;
  }
  .store-status {
    font-size: 0.68rem;
  }

  /* Features Grid single column */
  .features-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .feature-card {
    padding: 22px 18px;
    gap: 12px;
  }
  .feature-card-title {
    font-size: 1.1rem;
  }
  .feature-card-desc {
    font-size: 0.9rem;
  }

  /* Security Section */
  .security-banner {
    padding: 22px 18px;
    gap: 22px;
    border-radius: var(--radius-md);
  }
  .security-text h3 {
    font-size: 1.35rem;
    line-height: 1.35;
  }
  .security-text p {
    font-size: 0.9rem;
    margin-bottom: 16px;
  }
  .security-checklist li {
    font-size: 0.86rem;
    gap: 8px;
  }
  .security-diagram {
    padding: 16px 14px;
    gap: 10px;
  }
  .diag-step {
    padding: 10px 12px;
    gap: 10px;
  }
  .diag-info h4 {
    font-size: 0.85rem;
  }
  .diag-info p {
    font-size: 0.74rem;
  }

  /* FAQ Accordion */
  .faq-question {
    padding: 16px 18px;
    font-size: 0.95rem;
    gap: 10px;
    align-items: flex-start;
  }
  .faq-arrow {
    margin-top: 3px;
  }
  .faq-answer {
    font-size: 0.88rem;
    padding: 0 18px;
  }
  .faq-item.active .faq-answer {
    padding: 0 18px 18px;
  }

  /* CTA Bottom */
  .cta-bottom {
    padding: 50px 0 65px;
  }
  .cta-bottom-box {
    gap: 16px;
  }
  .cta-bottom-box .section-title {
    font-size: 1.5rem;
  }

  /* Footer */
  .footer {
    padding: 30px 0;
  }
  .footer-content {
    flex-direction: column;
    text-align: center;
    gap: 18px;
  }
  .footer-links {
    flex-wrap: wrap;
    justify-content: center;
    gap: 16px;
  }
}

/* Compact Mobile Devices (<= 480px) */
@media (max-width: 480px) {
  .container {
    padding: 0 14px;
  }
  .header .nav {
    height: 56px;
  }
  .brand-name {
    font-size: 1.05rem;
  }
  .brand-icon {
    width: 32px;
    height: 32px;
  }
  .nav-actions {
    gap: 7px;
  }
  .lang-dropdown-btn,
  .theme-toggle-btn,
  .nav-download-btn {
    width: 36px;
    height: 36px;
    min-width: 36px;
  }
  .globe-line-icon {
    width: 18px;
    height: 18px;
  }
  .nav-download-icon {
    width: 16px;
    height: 16px;
  }
  
  .hero-title {
    font-size: 1.5rem;
    line-height: 1.34;
  }
  .hero-tag {
    font-size: 0.74rem;
    padding: 4px 10px;
  }
  
  /* Store buttons stack vertically to prevent text cramming */
  .cta-store-group {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  
  /* Mockup fine adjustments */
  .mockup-window {
    width: min(100%, 300px);
    max-width: 300px;
  }
  .mock-header-title {
    font-size: 1rem;
  }
  .card-title {
    font-size: 0.72rem;
  }
  .card-body {
    font-size: 0.6rem;
  }
  
  .section-title {
    font-size: 1.45rem;
  }
}

/* Ultra-Compact Screens (<= 360px - Galaxy Fold cover, iPhone SE) */
@media (max-width: 360px) {
  .container {
    padding: 0 10px;
  }
  .brand-name {
    font-size: 0.95rem;
  }
  .brand-icon {
    width: 28px;
    height: 28px;
  }
  .nav-actions {
    gap: 5px;
  }
  .lang-dropdown-btn,
  .theme-toggle-btn,
  .nav-download-btn {
    width: 33px;
    height: 33px;
    min-width: 33px;
  }
  .globe-line-icon {
    width: 16px;
    height: 16px;
  }
  .nav-download-icon {
    width: 15px;
    height: 15px;
  }
  .theme-toggle-btn {
    font-size: 0.95rem;
  }
  .hero-title {
    font-size: 1.36rem;
  }
  .cta-primary-btn {
    padding: 12px 14px;
  }
  .cta-btn-title {
    font-size: 0.94rem;
  }
  .cta-btn-sub {
    font-size: 0.68rem;
  }
}

/* Japanese / CJK mobile: denser glyphs need a bit more line height and room to wrap */
@media (max-width: 640px) {
  html[lang="ja"] .hero-title,
  html[lang="zh-TW"] .hero-title {
    font-size: 1.42rem;
    line-height: 1.45;
  }

  html[lang="ja"] .section-title,
  html[lang="zh-TW"] .section-title {
    font-size: 1.45rem;
    line-height: 1.4;
  }

  html[lang="ja"] .cta-btn-title,
  html[lang="ja"] .cta-btn-sub,
  html[lang="zh-TW"] .cta-btn-title,
  html[lang="zh-TW"] .cta-btn-sub {
    line-height: 1.4;
  }

  html[lang="ja"] .faq-question,
  html[lang="zh-TW"] .faq-question {
    font-size: 0.9rem;
    line-height: 1.45;
  }
}

/* ==========================================================================
   Legal & Policy Pages Layout (Privacy, Terms, Refund)
   ========================================================================== */

.legal-body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-family);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.legal-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(238, 244, 240, 0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-color);
  transition: var(--transition);
}

[data-theme='dark'] .legal-header {
  background: rgba(11, 15, 25, 0.88);
  border-bottom-color: var(--border-color);
}

.legal-header-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
  gap: 16px;
}

.legal-back-home {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-decoration: none;
  padding: 8px 14px;
  border-radius: var(--radius-full);
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  transition: var(--transition);
}

.legal-back-home:hover {
  color: var(--accent-color);
  border-color: var(--accent-color);
  background: var(--accent-light);
  transform: translateX(-2px);
}

.legal-main {
  flex: 1;
  padding: 48px 0 80px;
}

.legal-container {
  max-width: 920px;
  margin: 0 auto;
  padding: 0 20px;
}

.legal-hero {
  text-align: center;
  margin-bottom: 32px;
}

.legal-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 14px;
  font-size: 0.82rem;
  font-weight: 700;
  border-radius: var(--radius-full);
  background: var(--accent-light);
  color: var(--accent-color);
  border: 1px solid var(--border-color);
  margin-bottom: 14px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.legal-title {
  font-size: clamp(1.5rem, 3.5vw, 2.2rem);
  font-weight: 800;
  color: var(--text-primary);
  margin: 0 0 12px;
  letter-spacing: -0.03em;
  line-height: 1.25;
  word-break: normal;
  overflow-wrap: break-word;
  hyphens: auto;
}

.legal-subtitle {
  font-size: clamp(0.92rem, 1.5vw, 1.05rem);
  color: var(--text-secondary);
  max-width: 680px;
  margin: 0 auto 20px;
  line-height: 1.65;
  word-break: normal;
  overflow-wrap: break-word;
}

.legal-meta-row {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px 18px;
  font-size: 0.86rem;
  color: var(--text-muted);
}

.legal-meta-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.legal-meta-item strong {
  color: var(--text-secondary);
}

/* Document Navigation Tabs */
.legal-tabs-wrapper {
  margin-bottom: 32px;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
}

.legal-nav-tabs {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: var(--bg-surface);
  padding: 6px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-color);
  width: fit-content;
  max-width: 100%;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.legal-tab-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 10px clamp(14px, 1.8vw, 24px);
  font-size: clamp(0.85rem, 1.1vw, 0.94rem);
  font-weight: 600;
  border-radius: var(--radius-full);
  text-decoration: none;
  color: var(--text-secondary);
  transition: var(--transition);
  white-space: nowrap;
  flex: 0 0 auto;
}

.legal-tab-btn:hover {
  color: var(--accent-color);
  background: var(--accent-light);
}

.legal-tab-btn.active {
  background: var(--accent-color);
  color: #ffffff;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(43, 119, 80, 0.35);
}

[data-theme='dark'] .legal-tab-btn.active {
  background: var(--accent-color);
  color: #0b0f19;
  box-shadow: 0 2px 8px rgba(52, 211, 153, 0.4);
}

/* Document Card & Content */
.legal-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 48px 52px;
  box-shadow: var(--shadow-md);
  line-height: 1.8;
  font-size: 0.98rem;
  overflow: hidden;
  box-sizing: border-box;
  width: 100%;
}

/* Table of Contents Box */
.legal-toc {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 24px 28px;
  margin-bottom: 40px;
}

.legal-toc-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.legal-toc-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr));
  gap: 8px 20px;
}

.legal-toc-link {
  color: var(--accent-color);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: var(--transition);
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  word-break: normal;
  overflow-wrap: break-word;
  line-height: 1.45;
}

.legal-toc-link:hover {
  text-decoration: underline;
  color: var(--accent-hover);
}

/* Typography Inside Legal Card */
.legal-section {
  margin-bottom: 40px;
  scroll-margin-top: 100px;
}

.legal-section-title {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text-primary);
  margin: 0 0 16px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--border-light);
  display: flex;
  align-items: center;
  gap: 10px;
}

.legal-section-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: var(--accent-light);
  color: var(--accent-color);
  font-size: 0.88rem;
  font-weight: 800;
}

.legal-subheading {
  font-size: 1.08rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 22px 0 10px;
}

.legal-p {
  color: var(--text-secondary);
  margin: 0 0 14px;
  word-break: normal;
  overflow-wrap: break-word;
  line-height: 1.75;
}

.legal-p strong {
  color: var(--text-primary);
}

.legal-list {
  padding-left: 22px;
  margin: 0 0 16px;
  color: var(--text-secondary);
}

.legal-list li {
  margin-bottom: 8px;
  word-break: normal;
  overflow-wrap: break-word;
}

html[lang="ko"] .legal-p,
html[lang="ko"] .legal-list li {
  word-break: keep-all;
}

.legal-list li strong {
  color: var(--text-primary);
}

/* Callout Boxes */
.legal-callout {
  border-radius: var(--radius-md);
  padding: 18px 22px;
  margin: 20px 0;
  border-left: 4px solid var(--accent-color);
  background: var(--bg-surface);
  border-top: 1px solid var(--border-light);
  border-right: 1px solid var(--border-light);
  border-bottom: 1px solid var(--border-light);
}

.legal-callout-title {
  font-size: 0.96rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.legal-callout-text {
  font-size: 0.92rem;
  color: var(--text-secondary);
  margin: 0;
  line-height: 1.65;
}

.legal-callout-warning {
  border-left-color: var(--warning-color);
  background: rgba(217, 119, 6, 0.06);
}

.legal-callout-warning .legal-callout-title {
  color: #b45309;
}

[data-theme='dark'] .legal-callout-warning .legal-callout-title {
  color: #fbbf24;
}

.legal-callout-danger {
  border-left-color: var(--danger-color);
  background: rgba(224, 69, 69, 0.06);
}

.legal-callout-danger .legal-callout-title {
  color: #b91c1c;
}

[data-theme='dark'] .legal-callout-danger .legal-callout-title {
  color: #f87171;
}

/* Legal Tables */
.legal-table-wrapper {
  width: 100%;
  overflow-x: auto;
  margin: 20px 0;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
}

.legal-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  text-align: left;
}

.legal-table th {
  background: var(--bg-surface);
  color: var(--text-primary);
  font-weight: 700;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-color);
  white-space: nowrap;
}

.legal-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-light);
  color: var(--text-secondary);
  vertical-align: top;
  line-height: 1.6;
}

.legal-table tr:last-child td {
  border-bottom: none;
}

.legal-table tr:hover td {
  background: var(--accent-light);
}

/* Contact / Inquiries Box */
.legal-contact-box {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 24px 28px;
  margin-top: 36px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.legal-contact-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
}

.legal-contact-desc {
  font-size: 0.92rem;
  color: var(--text-secondary);
  margin: 0;
}

.legal-contact-links {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 6px;
}

.legal-contact-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--accent-color);
  text-decoration: none;
}

.legal-contact-link:hover {
  text-decoration: underline;
  color: var(--accent-hover);
}

/* Tablet & Mobile Responsiveness for Legal Pages */
@media (max-width: 860px) {
  .legal-container {
    padding: 0 16px;
  }

  .legal-hero {
    margin-bottom: 24px;
  }

  .legal-title {
    font-size: clamp(1.45rem, 5vw, 1.85rem);
    word-break: normal;
    overflow-wrap: break-word;
    hyphens: auto;
  }

  .legal-subtitle {
    font-size: 0.95rem;
    padding: 0 6px;
    word-break: normal;
    overflow-wrap: break-word;
  }

  .legal-meta-row {
    gap: 8px 14px;
    font-size: 0.82rem;
  }

  .legal-meta-item {
    word-break: break-all;
    overflow-wrap: anywhere;
  }

  .legal-tabs-wrapper {
    margin-bottom: 24px;
    padding: 0 4px;
  }

  .legal-nav-tabs {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 480px;
    margin: 0 auto;
    border-radius: var(--radius-lg);
    padding: 6px;
    gap: 6px;
    box-sizing: border-box;
  }

  .legal-tab-btn {
    width: 100%;
    padding: 12px 16px;
    font-size: 0.92rem;
    font-weight: 600;
    border-radius: var(--radius-md);
    white-space: normal;
    word-break: keep-all;
    overflow-wrap: break-word;
    text-align: center;
    line-height: 1.35;
    box-sizing: border-box;
  }

  .legal-card {
    padding: 26px 18px;
    border-radius: var(--radius-md);
    font-size: 0.94rem;
  }

  .legal-toc {
    padding: 18px 16px;
    margin-bottom: 30px;
  }

  .legal-toc-list {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .legal-toc-link {
    font-size: 0.88rem;
    word-break: normal;
    overflow-wrap: break-word;
  }

  .legal-section-title {
    font-size: 1.18rem;
    word-break: normal;
    overflow-wrap: break-word;
  }

  .legal-subheading {
    font-size: 1.02rem;
    word-break: normal;
    overflow-wrap: break-word;
  }

  .legal-p {
    font-size: 0.92rem;
  }

  .legal-list li {
    font-size: 0.92rem;
  }

  .legal-callout {
    padding: 14px 16px;
    margin: 16px 0;
  }

  .legal-callout-title {
    font-size: 0.92rem;
    flex-wrap: wrap;
    word-break: normal;
    overflow-wrap: break-word;
  }

  .legal-callout-text {
    font-size: 0.88rem;
  }

  .legal-table th,
  .legal-table td {
    padding: 10px 12px;
    font-size: 0.82rem;
  }
}

/* Compact Mobile Screens (<= 480px) */
@media (max-width: 480px) {
  .legal-main {
    padding: 28px 0 50px;
  }

  .legal-container {
    padding: 0 12px;
  }

  .legal-hero {
    margin-bottom: 20px;
  }

  .legal-badge {
    font-size: 0.74rem;
    padding: 4px 10px;
  }

  .legal-title {
    font-size: 1.38rem;
  }

  .legal-subtitle {
    font-size: 0.88rem;
    line-height: 1.55;
  }

  .legal-meta-row {
    flex-direction: column;
    gap: 5px;
    font-size: 0.78rem;
  }

  .legal-nav-tabs {
    max-width: 100%;
    padding: 5px;
    gap: 5px;
  }

  .legal-tab-btn {
    padding: 11px 12px;
    font-size: 0.88rem;
  }

  .legal-card {
    padding: 20px 14px;
    border-radius: var(--radius-sm);
  }

  .legal-toc {
    padding: 14px 12px;
  }

  .legal-contact-box {
    padding: 16px 14px;
  }
}


