:root {
  --primary: #2D3E50;
  --primary-light: #3D5268;
  --accent: #E87A5D;
  --accent-light: #F09B84;
  --bg: #F8F6F3;
  --bg-card: #FFFFFF;
  --text: #2C2C2C;
  --text-muted: #6B7280;
  --border: #E5E7EB;
  --radius: 12px;
  --shadow: 0 2px 8px rgba(0,0,0,0.06);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 16px; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  padding: 0 16px;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.container {
  max-width: 640px;
  margin: 0 auto;
  padding: 24px 0;
}

.card {
  background: var(--bg-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px;
  margin-bottom: 20px;
}

h1, h2, h3 { line-height: 1.3; color: var(--primary); }
h1 { font-size: 1.75rem; margin-bottom: 8px; }
h2 { font-size: 1.35rem; margin-bottom: 12px; }
h3 { font-size: 1.1rem; margin-bottom: 8px; }

p { margin-bottom: 12px; }
.text-muted { color: var(--text-muted); font-size: 0.9rem; }

.btn {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  padding: 12px 24px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.95rem;
  border: none;
  cursor: pointer;
  transition: background 0.2s;
}
.btn:hover { background: var(--accent-light); text-decoration: none; }
.btn-outline {
  background: transparent;
  color: var(--accent);
  border: 2px solid var(--accent);
}
.btn-outline:hover { background: var(--accent); color: #fff; }

header {
  text-align: center;
  padding: 40px 0 24px;
}
header .logo {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--primary);
  letter-spacing: -0.5px;
}
header .logo span { color: var(--accent); }
header .tagline {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-top: 4px;
}

.steps { counter-reset: step; }
.step {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 20px;
}
.step-num {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9rem;
}
.step-body h3 { margin-bottom: 2px; }
.step-body p { margin-bottom: 0; font-size: 0.92rem; color: var(--text-muted); }

.braille-text {
  font-size: 2.5rem;
  line-height: 1.4;
  letter-spacing: 0.1em;
  text-align: center;
  padding: 12px;
  color: var(--primary);
  word-break: break-word;
}

.transliteration {
  text-align: center;
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--primary);
  margin: 8px 0;
}

.context-badge {
  display: inline-block;
  background: var(--primary);
  color: #fff;
  padding: 4px 14px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 12px;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 16px;
}
th, td {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
th {
  background: var(--primary);
  color: #fff;
  font-weight: 600;
  font-size: 0.85rem;
}
tr:last-child td { border-bottom: none; }
td { text-align: center; }
td:first-child { text-align: center; font-weight: 600; }

.kamus-section { margin-bottom: 28px; }

.dot-diagram {
  display: grid;
  grid-template-columns: 24px 24px;
  grid-template-rows: 24px 24px 24px;
  gap: 4px;
  justify-content: center;
  margin: 16px auto;
  width: fit-content;
}
.dot-diagram .d {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  color: var(--text-muted);
  font-weight: 700;
}
.dot-diagram .d.filled { background: var(--accent); color: #fff; }

footer {
  text-align: center;
  padding: 32px 0 24px;
  color: var(--text-muted);
  font-size: 0.82rem;
}

.nav-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 16px;
}

.kamus-letter {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}
.kamus-letter .braille-text {
  font-size: 2rem;
  padding: 4px 8px;
}

@media (min-width: 768px) {
  body { padding: 0 32px; }
  h1 { font-size: 2rem; }
}
