/* Extracted from pages/kana/advanced/kana-calligraphy/index.html; edit the source CSS file directly. */
:root {
  --ak-accent: var(--gold);
  --ak-accent-light: var(--gold-light);
  --ak-accent-ghost: var(--gold-ghost);
}

/* Style switcher */
.cal-style-tabs {
  display: flex;
  gap: 0;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  overflow: hidden;
  width: fit-content;
  margin-bottom: var(--space-3);
}
.cal-style-tab {
  padding: 10px 20px;
  border: none;
  background: var(--ink-3);
  font-size: 13px;
  font-family: var(--font-body);
  color: var(--text-faint);
  cursor: pointer;
  border-right: 1px solid var(--border);
  transition: all var(--dur-fast) var(--ease);
}
.cal-style-tab:last-child {
  border-right: none;
}
.cal-style-tab:hover {
  color: var(--text-soft);
  background: var(--ink-4);
}
.cal-style-tab.active {
  background: var(--gold-ghost);
  color: var(--gold-light);
  font-weight: 700;
}

/* Triple comparison grid */
.cal-triple {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: var(--space-3);
}
.cal-style-col {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--ink-2);
  padding: var(--space-4);
  text-align: center;
  transition: border-color var(--dur-fast) var(--ease);
}
.cal-style-col.kaisho {
  --col-color: var(--indigo-light);
}
.cal-style-col.gyosho {
  --col-color: var(--amethyst-light);
}
.cal-style-col.sosho {
  --col-color: var(--shu-light);
}
.cal-style-col:hover {
  border-color: var(--col-color, var(--gold-light));
}
.cal-style-header {
  font-family: var(--font-display);
  font-size: 16px;
  color: var(--col-color, var(--gold-light));
  font-weight: 700;
  margin-bottom: 4px;
}
.cal-style-jp {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-ghost);
  margin-bottom: var(--space-3);
}
.cal-char-display {
  font-family: var(--font-display);
  font-size: 80px;
  line-height: 1;
  color: var(--col-color, var(--gold-light));
  margin-bottom: var(--space-2);
  transition: color var(--dur-fast) var(--ease);
}
.cal-char-desc {
  font-size: 11px;
  color: var(--text-faint);
  line-height: 1.5;
}

/* Stroke speed indicator */
.cal-speed-bar {
  display: flex;
  gap: 3px;
  justify-content: center;
  margin: 8px 0 4px;
}
.cal-speed-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--col-color, var(--gold-light));
  opacity: 0.3;
  transition: opacity var(--dur-fast) var(--ease);
}
.cal-speed-dot.active {
  opacity: 1;
}

/* "Why Hiragana Looks Like This" */
.cal-aha-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: var(--space-3);
}
.cal-aha-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--ink-2);
  padding: var(--space-3);
  cursor: pointer;
  transition: all var(--dur-fast) var(--ease);
}
.cal-aha-card:hover {
  border-color: var(--gold-light);
  transform: translateY(-2px);
}
.cal-aha-row {
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: center;
  margin-bottom: 8px;
  flex-wrap: wrap;
}
.cal-aha-kanji {
  font-family: var(--font-display);
  font-size: 40px;
  color: var(--gold-light);
  line-height: 1;
}
.cal-aha-arrow {
  color: var(--text-ghost);
  font-size: 16px;
}
.cal-aha-sosho {
  font-family: var(--font-display);
  font-size: 36px;
  color: var(--shu-light);
  opacity: 0.8;
  font-style: italic;
  line-height: 1;
}
.cal-aha-hiragana {
  font-family: var(--font-display);
  font-size: 40px;
  color: var(--jade-light);
  line-height: 1;
}
.cal-aha-label {
  text-align: center;
  font-size: 11px;
  font-family: var(--font-mono);
  color: var(--text-ghost);
}
.cal-aha-desc {
  font-size: 12px;
  color: var(--text-faint);
  line-height: 1.5;
  text-align: center;
}

/* Kana selector for triple comparison */
.cal-kana-selector {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: var(--space-3);
}
.cal-kana-btn {
  width: 44px;
  height: 44px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--ink-3);
  font-family: var(--font-display);
  font-size: 20px;
  color: var(--text-faint);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--dur-fast) var(--ease);
}
.cal-kana-btn:hover {
  border-color: var(--gold);
  color: var(--gold-light);
}
.cal-kana-btn.active {
  background: var(--gold-ghost);
  border-color: var(--gold);
  color: var(--gold-light);
  font-weight: 700;
}

/* Calligraphy tips box */
.cal-tip-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-2);
}
.cal-tip {
  background: var(--ink-3);
  border-radius: var(--radius-md);
  padding: var(--space-3);
  border-top: 3px solid var(--border);
}
.cal-tip.kaisho {
  border-top-color: var(--indigo);
}
.cal-tip.gyosho {
  border-top-color: var(--amethyst);
}
.cal-tip.sosho {
  border-top-color: var(--shu);
}
.cal-tip-title {
  font-weight: 700;
  font-size: 13px;
  margin-bottom: 6px;
}
.cal-tip-text {
  font-size: 12px;
  color: var(--text-faint);
  line-height: 1.6;
}

@media (max-width: 700px) {
  .cal-triple {
    grid-template-columns: 1fr;
  }
  .cal-tip-row {
    grid-template-columns: 1fr;
  }
}
