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

/* Ligature showcase card */
.lig-showcase {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: var(--space-3);
}
.lig-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--ink-2);
  padding: var(--space-4);
  cursor: pointer;
  transition: all var(--dur-fast) var(--ease);
  position: relative;
  overflow: hidden;
}
.lig-card::before {
  content: attr(data-char);
  position: absolute;
  right: -10px;
  top: -20px;
  font-family: var(--font-display);
  font-size: 100px;
  color: var(--jade);
  opacity: 0.05;
  pointer-events: none;
  line-height: 1;
}
.lig-card:hover,
.lig-card.active {
  border-color: var(--jade-light);
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}
.lig-card.active {
  background: var(--jade-ghost);
}
.lig-char-big {
  font-family: var(--font-display);
  font-size: 72px;
  line-height: 1;
  color: var(--jade-light);
  margin-bottom: 8px;
}
.lig-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
}
.lig-jp {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-ghost);
  margin: 2px 0 8px;
}
.lig-components {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 8px;
}
.lig-comp-box {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  background: var(--ink-3);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 22px;
  color: var(--text-soft);
  transition: all var(--dur-fast) var(--ease);
}
.lig-comp-plus {
  color: var(--text-ghost);
  font-size: 14px;
}
.lig-comp-eq {
  color: var(--jade-light);
  font-size: 16px;
  font-weight: 700;
}
.lig-comp-result {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  background: var(--jade-ghost);
  border: 1px solid var(--jade);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 24px;
  color: var(--jade-light);
}

/* Ligature Builder */
.lig-builder {
  background: var(--ink-2);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
}
.lig-builder-stage {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-4);
  flex-wrap: wrap;
  min-height: 160px;
  padding: var(--space-4);
  background: var(--ink-3);
  border-radius: var(--radius-md);
  border: 2px dashed var(--border);
  margin-bottom: var(--space-3);
  transition: border-color var(--dur-fast) var(--ease);
}
.lig-builder-stage.drop-active {
  border-color: var(--jade);
  background: var(--jade-ghost);
}
.lig-piece {
  width: 72px;
  height: 72px;
  border: 2px solid var(--jade);
  border-radius: var(--radius-md);
  background: var(--jade-ghost);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 40px;
  color: var(--jade-light);
  cursor: grab;
  user-select: none;
  transition: transform var(--dur-fast) var(--ease);
}
.lig-piece:active {
  cursor: grabbing;
  transform: scale(1.1);
}
.lig-piece-slot {
  width: 72px;
  height: 72px;
  border: 2px dashed var(--border);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  color: var(--text-ghost);
  transition: all var(--dur-fast) var(--ease);
}
.lig-piece-slot.has-piece {
  border-color: var(--jade);
  background: var(--jade-ghost);
  font-family: var(--font-display);
  color: var(--jade-light);
  font-size: 36px;
}
.lig-reveal {
  text-align: center;
  padding: var(--space-3);
  animation: lig-pop 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
@keyframes lig-pop {
  0% {
    opacity: 0;
    transform: scale(0.5);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}
.lig-reveal-char {
  font-family: var(--font-display);
  font-size: 80px;
  color: var(--jade-light);
  line-height: 1;
}
.lig-puzzle-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-bottom: var(--space-2);
}
.lig-puzzle-piece {
  padding: 8px 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--jade);
  background: var(--jade-ghost);
  font-family: var(--font-display);
  font-size: 28px;
  color: var(--jade-light);
  cursor: pointer;
  transition: all var(--dur-fast) var(--ease);
}
.lig-puzzle-piece:hover {
  transform: scale(1.08);
  background: var(--jade);
  color: #fff;
}
.lig-puzzle-piece.used {
  opacity: 0.3;
  pointer-events: none;
}

/* Context banner (shop sign etc) */
.lig-context-banner {
  background: linear-gradient(135deg, #1a0a00, var(--ink-3));
  border: 1px solid var(--gold-dim);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  text-align: center;
  position: relative;
  overflow: hidden;
}
.lig-context-banner::before {
  content: "老舗";
  position: absolute;
  right: 20px;
  top: 10px;
  font-family: var(--font-display);
  font-size: 60px;
  color: var(--gold);
  opacity: 0.08;
}
.lig-shop-sign {
  font-family: var(--font-display);
  font-size: 48px;
  color: var(--gold-light);
  letter-spacing: 0.15em;
  line-height: 1.5;
}
.lig-sign-label {
  font-size: 12px;
  color: var(--text-faint);
  margin-top: 8px;
}

/* Unicode block badge */
.lig-unicode-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}
.lig-unicode-badge {
  font-family: var(--font-mono);
  font-size: 11px;
  background: var(--jade-ghost);
  border: 1px solid var(--jade-dim);
  color: var(--jade-light);
  border-radius: var(--radius-sm);
  padding: 3px 8px;
}
