:root {
  --paper: #f7f2e8;
  --paper-2: #f3ead9;
  --panel: #fffdf8;
  --panel-soft: rgba(255, 253, 248, .82);
  --ink: #172033;
  --muted: #667085;
  --line: #ddd3c2;
  --accent: #1f6f5f;
  --accent-2: #315f8f;
  --warm: #9f4b31;
  --soft-green: #e7f1ec;
  --soft-blue: #e8eef6;
  --soft-gold: #f3ead9;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font: 15px/1.55 Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, "Noto Sans SC", sans-serif;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

.site-header {
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, var(--paper-2) 0%, var(--paper) 100%);
  padding: 14px clamp(16px, 4vw, 48px) 12px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 390px);
  gap: 18px;
  align-items: center;
  max-width: 1360px;
  margin: 0 auto;
}

.top-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 8px;
}

.top-links a {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 253, 248, .72);
  color: var(--accent);
  text-decoration: none;
  font-size: 13px;
  font-weight: 700;
  padding: 0 12px;
}

.top-links a:hover {
  border-color: var(--accent);
}

h1,
h2,
h3 {
  letter-spacing: 0;
}

h1 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(30px, 3.8vw, 44px);
  line-height: 1.03;
  font-weight: 600;
}

.sub {
  display: none;
}

.hero-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.metric {
  min-height: 72px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
  padding: 14px;
}

.metric strong {
  display: block;
  font-size: 26px;
  line-height: 1;
}

.metric span {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
}

.layout {
  display: grid;
  grid-template-columns: minmax(300px, 380px) minmax(0, 1fr);
  gap: 18px;
  max-width: 1500px;
  margin: 0 auto;
  padding: 22px clamp(14px, 4vw, 42px) 52px;
}

.left-panel,
.right-panel {
  min-width: 0;
}

.left-panel {
  position: sticky;
  top: 12px;
  align-self: start;
  display: flex;
  flex-direction: column;
  min-height: 0;
  max-height: calc(100vh - 24px);
}

.panel-card,
.detail-card,
.mind-map-card,
.verb-card,
.phrase-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 2px 10px rgba(23, 32, 51, .035);
}

.controls {
  flex: 0 0 auto;
  z-index: 2;
  padding: 14px;
  margin-bottom: 12px;
}

.control-head {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.control-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.control-head h2 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 27px;
  line-height: 1;
  font-weight: 600;
}

.control-head p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.control-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.control-stats div {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, .58);
  padding: 8px;
}

.control-stats strong {
  display: block;
  font-size: 22px;
  line-height: 1;
}

.control-stats span {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
}

.filter-toggle {
  flex: 0 0 auto;
  min-width: 112px;
  border-color: rgba(31, 111, 95, .35);
  color: var(--accent);
  font-weight: 800;
}

.filter-summary {
  margin: 10px 0 0;
  border: 1px solid rgba(49, 95, 143, .18);
  border-radius: 8px;
  background: #f4f8fb;
  color: #445064;
  font-size: 12px;
  line-height: 1.35;
  padding: 8px 10px;
}

.sidebar-filters {
  flex: 0 0 auto;
  max-height: 430px;
  opacity: 1;
  overflow: hidden;
  padding-top: 12px;
  transition: max-height .24s ease, opacity .18s ease, padding-top .24s ease;
}

.sidebar-filters.is-collapsed {
  max-height: 0;
  opacity: 0;
  padding-top: 0;
  pointer-events: none;
}

.search-label {
  display: block;
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

#search-input {
  width: 100%;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  padding: 0 14px;
}

#search-input:focus {
  outline: 2px solid rgba(31, 111, 95, .18);
  border-color: var(--accent);
}

.filter-block {
  margin-top: 10px;
}

.filter-block p {
  margin: 0 0 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.segmented,
.tag-filter,
.pattern-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag-filter {
  max-height: 62px;
  overflow: auto;
  padding-right: 2px;
}

.segmented button,
.tag-filter button,
.command,
.speak-one,
.copy-one {
  min-height: 32px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  padding: 0 10px;
}

.segmented button.active,
.tag-filter button.active,
.command.primary {
  border-color: var(--ink);
  color: #fff;
  background: var(--ink);
}

.segmented button:hover,
.tag-filter button:hover,
.command:hover,
.speak-one:hover,
.copy-one:hover {
  border-color: var(--ink);
}

.toolbar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.visible-count {
  margin-left: auto;
  flex: none;
  color: var(--muted);
  font-size: 12px;
}

.verb-cards {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 9px;
  min-height: 360px;
  overflow-y: auto;
  padding-right: 3px;
  overscroll-behavior: contain;
}

.verb-card {
  flex: 0 0 auto;
  position: relative;
  width: 100%;
  min-height: 118px;
  overflow: hidden;
  text-align: left;
  padding: 13px 14px 12px 17px;
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.verb-card:before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: var(--accent-2);
}

.verb-card.active {
  border-color: var(--ink);
  box-shadow: 0 0 0 2px rgba(23, 32, 51, .08);
}

.verb-card.is-pulsing {
  border-color: #2f7fd3;
  box-shadow: 0 0 0 3px rgba(47, 127, 211, .13), 0 8px 20px rgba(49, 95, 143, .12);
  transform: scale(.985);
}

.verb-ripple {
  position: absolute;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: rgba(47, 127, 211, .24);
  pointer-events: none;
  transform: translate(-50%, -50%) scale(.2);
  animation: verbRipple .62s ease-out forwards;
}

@keyframes verbRipple {
  to {
    opacity: 0;
    transform: translate(-50%, -50%) scale(16);
  }
}

.verb-card-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.verb-symbol {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 27px;
  line-height: 1.08;
}

.verb-count {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.3;
}

.verb-card p {
  margin: 6px 0 0;
  color: var(--muted);
  line-height: 1.35;
}

.verb-map-status {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  margin-top: 8px;
  border: 1px solid rgba(49, 95, 143, .22);
  border-radius: 999px;
  background: #eef6ff;
  color: #245f99;
  font-size: 11px;
  font-weight: 800;
  padding: 0 8px;
}

.sample-phrases {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 8px;
}

.tag,
.sample-phrases span,
.level-pill,
.pattern-list span {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--soft-gold);
  color: var(--ink);
  font-size: 12px;
  padding: 0 9px;
}

.empty-state {
  display: none;
  margin: 16px 0 0;
  color: var(--muted);
}

.empty-state.show {
  display: block;
}

.detail-card {
  padding: clamp(16px, 3vw, 24px);
}

.mind-map-card {
  margin-bottom: 14px;
  overflow: hidden;
  padding: clamp(14px, 2.4vw, 20px);
}

.mind-map-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 12px;
}

.mind-map-head h2 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 31px;
  line-height: 1.1;
  font-weight: 600;
}

.mind-map-head p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.mind-map-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.phrase-builder {
  display: grid;
  grid-template-columns: minmax(220px, .58fr) minmax(280px, 1fr);
  gap: 14px;
  align-items: end;
  margin-bottom: 14px;
  border: 1px solid rgba(49, 95, 143, .18);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(244, 248, 251, .86), rgba(255, 253, 248, .92));
  padding: 14px;
}

.builder-copy h3 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 28px;
  line-height: 1.06;
  font-weight: 600;
}

.builder-copy p {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.builder-search {
  position: relative;
  min-width: 0;
}

#phrase-builder-input {
  width: 100%;
  height: 50px;
  border: 1px solid rgba(49, 95, 143, .28);
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  padding: 0 18px;
  box-shadow: 0 2px 9px rgba(23, 32, 51, .04);
  transition: border-color .18s ease, box-shadow .18s ease, background-color .18s ease;
}

#phrase-builder-input:focus {
  outline: none;
  border-color: #2f7fd3;
  box-shadow: 0 0 0 4px rgba(47, 127, 211, .14), 0 8px 18px rgba(49, 95, 143, .12);
}

.phrase-suggestions {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 8px);
  z-index: 8;
  display: grid;
  gap: 6px;
  max-height: min(440px, 56vh);
  overflow: auto;
  border: 1px solid rgba(49, 95, 143, .22);
  border-radius: 8px;
  background: rgba(255, 253, 248, .98);
  box-shadow: 0 18px 36px rgba(23, 32, 51, .16);
  padding: 8px;
  animation: suggestionsIn .18s ease-out both;
}

.phrase-suggestions[hidden] {
  display: none;
}

@keyframes suggestionsIn {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.suggestion-item {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  min-height: 58px;
  overflow: hidden;
  border: 1px solid transparent;
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  text-align: left;
  padding: 10px 12px;
  transition: background-color .16s ease, border-color .16s ease, transform .16s ease, box-shadow .16s ease;
}

.suggestion-item:hover,
.suggestion-item.is-active,
.suggestion-item:focus-visible {
  outline: none;
  border-color: rgba(47, 127, 211, .52);
  background: #eef6ff;
  box-shadow: 0 5px 14px rgba(49, 95, 143, .10);
}

.suggestion-item.is-picked {
  border-color: #2f7fd3;
  background: #dfefff;
  animation: suggestionPick .24s ease-out both;
}

@keyframes suggestionPick {
  45% {
    transform: scale(.985);
    box-shadow: 0 0 0 6px rgba(47, 127, 211, .14);
  }
}

.suggestion-main {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.suggestion-main strong {
  overflow-wrap: anywhere;
  font-size: 16px;
  line-height: 1.18;
}

.suggestion-main span {
  overflow-wrap: anywhere;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.2;
}

.suggestion-main mark {
  border-radius: 4px;
  background: #d9ecff;
  color: #174c80;
  padding: 0 2px;
}

.suggestion-meta {
  flex: 0 0 auto;
  max-width: 44%;
  color: #4d6478;
  font-size: 12px;
  line-height: 1.3;
  text-align: right;
}

.suggestion-empty {
  margin: 0;
  color: var(--muted);
  padding: 12px;
}

.mind-map-stage {
  position: relative;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: auto;
  height: 640px;
  min-height: 560px;
  background:
    linear-gradient(rgba(49, 95, 143, .055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(49, 95, 143, .055) 1px, transparent 1px),
    radial-gradient(circle at 22% 50%, rgba(49, 127, 211, .10), transparent 28%),
    linear-gradient(180deg, #fffdf8 0%, #fbf6eb 100%);
  background-size: 28px 28px, 28px 28px, auto, auto;
  touch-action: pan-y;
}

.mind-map-svg {
  position: absolute;
  left: 0;
  top: 0;
  z-index: 1;
  width: var(--map-content-width, 100%);
  height: var(--map-content-height, 100%);
  pointer-events: none;
}

.mind-map-layer {
  position: absolute;
  left: 0;
  top: 0;
  z-index: 3;
  width: var(--map-content-width, 100%);
  height: var(--map-content-height, 100%);
}

.map-origin-node {
  position: absolute;
  left: var(--map-root-x, 22px);
  top: var(--map-root-y, 50%);
  z-index: 2;
  display: grid;
  align-content: center;
  width: var(--map-root-width, 132px);
  height: var(--map-root-height, 78px);
  border-radius: 16px;
  background: linear-gradient(135deg, #2f7fd3 0%, #1f6fbe 100%);
  color: #fff;
  padding: 12px 14px;
  box-shadow: 0 12px 28px rgba(47, 127, 211, .24);
}

.map-origin-node:after {
  content: "";
  position: absolute;
  inset: -8px;
  border-radius: 20px;
  border: 1px solid rgba(47, 127, 211, .18);
  animation: originPulse 1.9s ease-in-out infinite;
}

.map-origin-node strong {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 32px;
  line-height: 1;
  font-weight: 600;
}

.map-origin-node span {
  margin-top: 7px;
  color: rgba(255, 255, 255, .78);
  font-size: 12px;
  line-height: 1.25;
}

@keyframes originPulse {
  50% {
    opacity: .28;
    transform: scale(1.06);
  }
}

.map-origin-node.is-pulsing {
  animation: rootClickPulse .42s ease;
}

@keyframes rootClickPulse {
  45% {
    transform: scale(.965);
    box-shadow: 0 0 0 6px rgba(47, 127, 211, .13), 0 12px 28px rgba(47, 127, 211, .24);
  }
}

.burst-connector {
  fill: none;
  stroke: #2f7fd3;
  stroke-linecap: round;
  stroke-width: 3;
  filter: drop-shadow(0 3px 5px rgba(47, 127, 211, .16));
}

.burst-connector.level-a1 {
  stroke: #1f9d72;
}

.burst-connector.level-a2 {
  stroke: #2f7fd3;
}

.burst-connector.level-b1 {
  stroke: #cc8a22;
}

.burst-connector.level-b2 {
  stroke: #8462c8;
}

.burst-connector.is-new {
  stroke-dasharray: 720;
  stroke-dashoffset: 720;
  animation: connectorDraw .42s cubic-bezier(.18, .72, .2, 1) forwards;
}

.burst-connector.is-removing {
  opacity: 0;
  transition: opacity .22s ease;
}

.burst-dot {
  fill: #2f7fd3;
  filter: drop-shadow(0 0 5px rgba(47, 127, 211, .7));
}

@keyframes connectorDraw {
  to {
    stroke-dashoffset: 0;
  }
}

.burst-card {
  position: absolute;
  left: 0;
  top: 0;
  display: grid;
  gap: 5px;
  min-height: 86px;
  border: 2px solid #2f7fd3;
  border-radius: 14px;
  background: rgba(255, 253, 248, .97);
  color: var(--ink);
  padding: 10px 12px 9px;
  box-shadow: 0 14px 28px rgba(23, 32, 51, .12);
  cursor: grab;
  user-select: none;
  touch-action: none;
  transform: translate(var(--burst-x, 0), var(--burst-y, 0));
  transition: box-shadow .16s ease, border-color .16s ease;
  will-change: transform;
}

.burst-card.is-new {
  animation: phraseBurst .2s cubic-bezier(.18, 1.35, .42, 1) both;
}

.burst-card.is-removing {
  animation: cardFadeOut .24s ease forwards;
}

.burst-card.is-dragging {
  cursor: grabbing;
  box-shadow: 0 20px 36px rgba(23, 32, 51, .18);
  z-index: 6;
}

.burst-card.is-settling {
  animation: cardSettle .24s ease-out;
}

.burst-card.is-expanded {
  z-index: 5;
  box-shadow: 0 18px 34px rgba(23, 32, 51, .16);
}

.burst-card.is-active,
.burst-card:hover,
.burst-card:focus-visible {
  outline: none;
  border-color: var(--ink);
  box-shadow: 0 0 0 3px rgba(47, 127, 211, .15), 0 16px 30px rgba(23, 32, 51, .13);
}

.burst-card.tone-green {
  border-color: #1f9d72;
}

.burst-card.tone-gold {
  border-color: #d6a23a;
}

.burst-card.tone-pink {
  border-color: #d97aa1;
}

.burst-card.tone-blue {
  border-color: #2f7fd3;
}

.burst-card.tone-purple {
  border-color: #8462c8;
}

.burst-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.burst-card strong {
  min-width: 0;
  overflow-wrap: anywhere;
  font-size: 16px;
  line-height: 1.18;
}

.burst-level,
.burst-verb {
  flex: none;
  border-radius: 999px;
  background: var(--soft-blue);
  color: var(--ink);
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
  padding: 5px 7px;
}

.burst-zh,
.burst-example {
  margin: 0;
  overflow-wrap: anywhere;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.24;
}

.burst-verb {
  justify-self: start;
  background: #eef6ff;
  color: #245f99;
}

.burst-example {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  color: #445064;
  transition: max-height .18s ease, opacity .18s ease;
}

.burst-card.is-expanded .burst-example,
.burst-card:hover .burst-example,
.burst-card:focus-visible .burst-example {
  max-height: 44px;
  opacity: 1;
}

.burst-patterns {
  display: grid;
  gap: 6px;
  margin-top: 4px;
  border-top: 1px solid rgba(49, 95, 143, .14);
  padding-top: 7px;
}

.burst-pattern-row {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  column-gap: 8px;
  row-gap: 2px;
  align-items: baseline;
}

.burst-pattern-row span {
  color: #245f99;
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.burst-pattern-row strong,
.burst-pattern-row em {
  min-width: 0;
  overflow-wrap: anywhere;
  font-size: 12px;
  line-height: 1.22;
}

.burst-pattern-row strong {
  font-weight: 800;
}

.burst-pattern-row em {
  grid-column: 2;
  color: var(--muted);
  font-style: normal;
}

.mind-map-stage.is-collapsed {
  display: none;
}

@keyframes phraseBurst {
  0% {
    opacity: 0;
    transform: translate(calc(var(--burst-x, 0) - 20px), var(--burst-y, 0)) scale(.85);
  }
  72% {
    opacity: 1;
    transform: translate(var(--burst-x, 0), var(--burst-y, 0)) scale(1.035);
  }
  100% {
    opacity: 1;
    transform: translate(var(--burst-x, 0), var(--burst-y, 0)) scale(1);
  }
}

@keyframes cardSettle {
  45% {
    transform: translate(var(--burst-x, 0), var(--burst-y, 0)) scale(1.025);
  }
  100% {
    transform: translate(var(--burst-x, 0), var(--burst-y, 0)) scale(1);
  }
}

@keyframes cardFadeOut {
  from {
    opacity: 1;
    transform: translate(var(--burst-x, 0), var(--burst-y, 0)) scale(1);
  }
  to {
    opacity: 0;
    transform: translate(var(--burst-x, 0), var(--burst-y, 0)) scale(.86);
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *:before,
  *:after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}

.detail-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.detail-label {
  margin: 0 0 6px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.detail-head h2 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(42px, 8vw, 72px);
  line-height: .95;
  font-weight: 600;
}

.meaning {
  margin: 9px 0 0;
  color: var(--muted);
  font-size: 18px;
}

.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.explanation,
.patterns {
  margin-top: 16px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, .45);
}

.explanation strong,
.patterns h3,
.phrase-list-head h3 {
  margin: 0;
  font-size: 13px;
  text-transform: uppercase;
}

.explanation p {
  margin: 7px 0 0;
  color: var(--muted);
}

.patterns h3 {
  margin-bottom: 9px;
}

.phrase-list-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 20px;
}

.phrase-list-head span {
  color: var(--muted);
  font-size: 13px;
}

.phrase-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 10px;
}

.phrase-card {
  position: relative;
  display: grid;
  gap: 8px;
  padding: 13px;
}

.phrase-card.highlight {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(31, 111, 95, .12);
}

.phrase-title {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 10px;
}

.phrase-title strong {
  font-size: 18px;
}

.phrase-title span {
  display: block;
  margin-top: 2px;
  color: var(--muted);
}

.phrase-actions {
  display: flex;
  flex: none;
  gap: 6px;
}

.phrase-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.level-pill {
  background: var(--soft-blue);
  font-weight: 800;
}

.phrase-meta .tag {
  background: var(--soft-green);
}

.example-en,
.example-zh {
  margin: 0;
}

.example-en {
  color: var(--ink);
}

.example-zh {
  color: var(--muted);
}

.speak-one,
.copy-one {
  flex: none;
  min-width: 54px;
  min-height: 32px;
  font-size: 12px;
}

.speak-one {
  border-color: rgba(31, 111, 95, .35);
  color: var(--accent);
  font-weight: 800;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 22px;
  transform: translate(-50%, 14px);
  opacity: 0;
  pointer-events: none;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  padding: 9px 14px;
  transition: opacity .18s ease, transform .18s ease;
  z-index: 10;
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

@media (max-width: 920px) {
  .hero,
  .layout {
    grid-template-columns: 1fr;
  }

  .left-panel {
    position: static;
    max-height: none;
  }

  .controls {
    position: static;
  }

  .verb-cards {
    max-height: 68vh;
    min-height: 360px;
    overflow-y: auto;
  }

  .phrase-list {
    grid-template-columns: 1fr;
  }

  .phrase-builder {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .builder-copy h3 {
    font-size: 25px;
  }

  .phrase-suggestions {
    position: relative;
    top: 8px;
    max-height: 360px;
  }

  .suggestion-item {
    align-items: flex-start;
    flex-direction: column;
    min-height: 66px;
  }

  .suggestion-meta {
    max-width: none;
    text-align: left;
  }
}

@media (max-width: 620px) {
  .site-header {
    padding-top: 22px;
  }

  .top-links {
    gap: 7px;
  }

  .top-links a {
    min-height: 30px;
    font-size: 12px;
    padding: 0 10px;
  }

  h1 {
    font-size: 36px;
  }

  .hero-metrics {
    grid-template-columns: 1fr 1fr;
  }

  .layout {
    padding-inline: 12px;
  }

  .control-title-row {
    display: grid;
  }

  .filter-toggle {
    width: 100%;
    min-height: 38px;
  }

  .sidebar-filters {
    max-height: 560px;
  }

  .verb-cards {
    max-height: 64vh;
    min-height: 320px;
  }

  .detail-head {
    display: grid;
  }

  .mind-map-head {
    display: grid;
  }

  .mind-map-actions {
    justify-content: flex-start;
  }

  .mind-map-stage {
    height: 430px;
    min-height: 380px;
  }

  .map-origin-node strong {
    font-size: 24px;
  }

  .map-origin-node span {
    font-size: 11px;
  }

  .burst-card {
    min-height: 86px;
    padding: 9px 10px;
  }

  .burst-card strong {
    font-size: 14px;
  }

  .detail-actions {
    justify-content: flex-start;
  }

  .toolbar .command {
    flex: 1 1 130px;
  }

  .visible-count {
    width: 100%;
    margin-left: 0;
  }

  .phrase-title {
    display: grid;
  }

  .phrase-actions {
    width: 100%;
  }

  .speak-one,
  .copy-one {
    width: max-content;
  }
}
