:root {
      color-scheme: light;
      --bg: #fafafa;
      --text: #0f1419;
      --muted: #6b7280;
      --line: #e5e7eb;
      --line-strong: #d1d5db;
      --accent: #0891b2;
      --accent-deep: #0e7490;
      --accent-soft: #ecfeff;
      --surface: #fff;
      --surface-soft: #fcfcfc;
      --focus-ring: rgba(8, 145, 178, 0.2);
      --ring-1: #0891b2;
      --ring-2: #06b6d4;
      --ring-3: #9ca3af;
      --edge: #d1d5db;
      --shadow-soft: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
      --shadow-strong: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
    }

    body.product-shell[data-accessibility-theme="dark"] {
      color-scheme: dark;
      --bg: #0b1120;
      --text: #f9fafb;
      --muted: #d1d5db;
      --line: rgba(255, 255, 255, 0.16);
      --line-strong: rgba(255, 255, 255, 0.26);
      --accent: #67e8f9;
      --accent-deep: #a5f3fc;
      --accent-soft: rgba(103, 232, 249, 0.14);
      --surface: #111827;
      --surface-soft: #172033;
      --focus-ring: rgba(103, 232, 249, 0.36);
      --ring-1: #67e8f9;
      --ring-2: #93c5fd;
      --ring-3: #9ca3af;
      --edge: rgba(255, 255, 255, 0.26);
      --shadow-soft: 0 8px 18px rgba(0, 0, 0, 0.28);
      --shadow-strong: 0 16px 28px rgba(0, 0, 0, 0.34);
    }

    body.product-shell[data-accessibility-theme="dark"],
    body.product-shell[data-accessibility-theme="dark"] .embedded-product-shell {
      color: var(--text);
      background: var(--bg);
    }

    body.product-shell[data-accessibility-theme="dark"] .dictionary-public-page,
    body.product-shell[data-accessibility-theme="dark"] .main,
    body.product-shell[data-accessibility-theme="dark"] .dictionary-hero,
    body.product-shell[data-accessibility-theme="dark"] .dictionary-flow-card,
    body.product-shell[data-accessibility-theme="dark"] .dictionary-feedback,
    body.product-shell[data-accessibility-theme="dark"] .dictionary-attribution,
    body.product-shell[data-accessibility-theme="dark"] .graphbar {
      color: var(--text);
      border-color: var(--line);
      background: var(--surface);
    }

    body.product-shell[data-accessibility-theme="dark"] .dictionary-hero-chips > span,
    body.product-shell[data-accessibility-theme="dark"] .dictionary-attribution-links a,
    body.product-shell[data-accessibility-theme="dark"] .dictionary-attribution-note,
    body.product-shell[data-accessibility-theme="dark"] .dictionary-feedback-lemma,
    body.product-shell[data-accessibility-theme="dark"] .dictionary-feedback textarea,
    body.product-shell[data-accessibility-theme="dark"] .lang-btn,
    body.product-shell[data-accessibility-theme="dark"] .pair-select,
    body.product-shell[data-accessibility-theme="dark"] #q,
    body.product-shell[data-accessibility-theme="dark"] .icon-btn,
    body.product-shell[data-accessibility-theme="dark"] .suggestions,
    body.product-shell[data-accessibility-theme="dark"] .graph-tool-btn,
    body.product-shell[data-accessibility-theme="dark"] .graph-wrap,
    body.product-shell[data-accessibility-theme="dark"] .graph-explorer {
      color: var(--text);
      border-color: var(--line-strong);
      background: var(--surface-soft);
    }

    body.product-shell[data-accessibility-theme="dark"] .toolbar {
      background: linear-gradient(to bottom, var(--surface) 84%, rgba(17, 24, 39, 0));
    }

    body.product-shell[data-accessibility-theme="dark"] .dictionary-home-link,
    body.product-shell[data-accessibility-theme="dark"] .search-clear-btn {
      color: var(--accent-deep);
      border-color: var(--line-strong);
      background: var(--surface-soft);
    }

    body.product-shell[data-accessibility-theme="dark"] .lang-btn.is-active,
    body.product-shell[data-accessibility-theme="dark"] .entry-match,
    body.product-shell[data-accessibility-theme="dark"] .suggestion-btn.is-active,
    body.product-shell[data-accessibility-theme="dark"] .suggestion-btn:hover {
      color: var(--text);
      border-color: var(--accent);
      background: rgba(103, 232, 249, 0.18);
    }

    body.product-shell[data-accessibility-theme="dark"] .entry-block,
    body.product-shell[data-accessibility-theme="dark"] .results {
      border-color: var(--line);
    }

    body.product-shell[data-accessibility-theme="dark"] .entry-block.is-synonym {
      border-left-color: var(--accent);
      background: linear-gradient(to right, rgba(103, 232, 249, 0.12), rgba(17, 24, 39, 0.92) 32%);
    }

    body.product-shell[data-accessibility-theme="dark"] .entry-tail,
    body.product-shell[data-accessibility-theme="dark"] .entry-example,
    body.product-shell[data-accessibility-theme="dark"] .entry-example-source,
    body.product-shell[data-accessibility-theme="dark"] .entry-sense-number,
    body.product-shell[data-accessibility-theme="dark"] .entry-label,
    body.product-shell[data-accessibility-theme="dark"] .graph-explorer-copy strong,
    body.product-shell[data-accessibility-theme="dark"] .dictionary-attribution h2,
    body.product-shell[data-accessibility-theme="dark"] .dictionary-title {
      color: var(--text);
    }

    body.product-shell[data-accessibility-theme="dark"] .dictionary-subtitle,
    body.product-shell[data-accessibility-theme="dark"] .synonym-row,
    body.product-shell[data-accessibility-theme="dark"] .entry-example-arrow,
    body.product-shell[data-accessibility-theme="dark"] .entry-example-target,
    body.product-shell[data-accessibility-theme="dark"] .entry-category,
    body.product-shell[data-accessibility-theme="dark"] .status,
    body.product-shell[data-accessibility-theme="dark"] .empty,
    body.product-shell[data-accessibility-theme="dark"] .page-footer,
    body.product-shell[data-accessibility-theme="dark"] .graph-meta,
    body.product-shell[data-accessibility-theme="dark"] .graph-empty,
    body.product-shell[data-accessibility-theme="dark"] .graph-explorer-copy span {
      color: var(--muted);
    }

    body.product-shell[data-accessibility-theme="dark"] .graph-node-label {
      stroke: rgba(15, 23, 42, 0.88);
      fill: var(--text);
    }

    body.product-shell[data-accessibility-theme="dark"] .graph-node-badge {
      fill: var(--surface-soft);
      stroke: var(--accent);
    }

    body.product-shell[data-accessibility-theme="dark"] .dictionary-feedback-icon {
      color: var(--accent-deep);
      background: rgba(103, 232, 249, 0.16);
    }

    body.product-shell[data-accessibility-theme="dark"] .dictionary-feedback textarea::placeholder {
      color: #9ca3af;
    }

    body.product-shell[data-accessibility-theme="dark"] .dictionary-feedback-status[data-tone="success"] {
      color: #86efac;
    }

    body.product-shell[data-accessibility-theme="dark"] .dictionary-feedback-status[data-tone="error"] {
      color: #fca5a5;
    }

    * { box-sizing: border-box; }

    body.no-scroll {
      overflow: hidden;
    }

    .page {
      min-height: 100svh;
      width: 100%;
      max-width: none;
      margin: 0;
      padding: 12px 14px 18px;
      display: flex;
      flex-direction: column;
      gap: 12px;
    }

    .dictionary-hero {
      position: relative;
      display: grid;
      grid-template-columns: minmax(0, 1fr) minmax(250px, 360px);
      gap: clamp(16px, 2.4vw, 28px);
      align-items: stretch;
      overflow: hidden;
      border: 1px solid var(--line);
      border-radius: 20px;
      background: var(--surface);
      box-shadow: var(--shadow-soft);
      padding: clamp(18px, 2.6vw, 30px);
    }

    .dictionary-hero::before {
      content: "";
      position: absolute;
      inset: 14px auto auto 50%;
      width: min(42vw, 520px);
      height: min(42vw, 520px);
      border: 1px solid rgba(8, 145, 178, 0.06);
      border-radius: 999px;
      background: radial-gradient(circle, rgba(8, 145, 178, 0.04), transparent 62%);
      pointer-events: none;
      transform: translateY(-48%);
    }

    .dictionary-hero-copy,
    .dictionary-hero-aside {
      position: relative;
      z-index: 1;
    }

    .dictionary-hero-copy {
      display: grid;
      align-content: center;
      min-width: 0;
    }

    .dictionary-eyebrow {
      margin: 0 0 6px;
      color: var(--accent);
      font-size: 0.74rem;
      font-weight: 800;
      letter-spacing: 0.12em;
      text-transform: uppercase;
    }

    .dictionary-title {
      margin: 0;
      color: var(--text);
      font-size: clamp(1.65rem, 4vw, 3.4rem);
      line-height: 0.98;
      letter-spacing: -0.06em;
    }

    .dictionary-subtitle {
      max-width: 720px;
      margin: 12px 0 0;
      color: var(--muted);
      font-size: clamp(0.98rem, 1.4vw, 1.08rem);
      line-height: 1.6;
    }

    .dictionary-hero-chips {
      display: flex;
      flex-wrap: wrap;
      gap: 8px;
      margin-top: 16px;
    }

    .dictionary-hero-chips span,
    .dictionary-flow-card span {
      display: inline-flex;
      gap: 8px;
      align-items: center;
    }

    .dictionary-hero-chips > span {
      min-height: 38px;
      padding: 7px 11px;
      border: 1px solid var(--line);
      border-radius: 999px;
      color: var(--text);
      background: var(--surface-soft);
      font-size: 0.82rem;
      font-weight: 800;
      box-shadow: var(--shadow-soft);
    }

    .dictionary-hero-chips i {
      color: var(--accent);
    }

    .dictionary-hero-aside {
      display: grid;
      gap: 10px;
      align-content: stretch;
      min-width: 0;
    }

    .dictionary-flow-card {
      display: grid;
      gap: 8px;
      min-height: 100%;
      padding: 14px;
      border: 1px solid var(--line);
      border-radius: 14px;
      background: var(--surface-soft);
      box-shadow: var(--shadow-soft);
    }
      border-radius: 22px;
      color: #f8fbff;
      background:
        linear-gradient(135deg, rgba(23, 32, 51, 0.93), rgba(12, 111, 189, 0.82)),
        radial-gradient(circle at right top, rgba(255, 255, 255, 0.18), transparent 13rem);
      box-shadow: 0 18px 38px rgba(23, 32, 51, 0.14);
    }

    .dictionary-flow-card span {
      min-height: 38px;
      color: rgba(255, 255, 255, 0.86);
      font-size: 0.86rem;
      font-weight: 760;
      line-height: 1.35;
    }

    .dictionary-flow-card i {
      display: grid;
      place-items: center;
      flex: 0 0 auto;
      width: 34px;
      height: 34px;
      border-radius: 12px;
      color: #fff;
      background: rgba(255, 255, 255, 0.12);
    }

    .dictionary-home-link {
      display: inline-flex;
      justify-content: center;
      align-items: center;
      border: 1px solid var(--line-strong);
      border-radius: 999px;
      padding: 10px 14px;
      color: var(--accent-deep);
      background: #fff;
      text-decoration: none;
      font-size: 0.88rem;
      font-weight: 700;
      box-shadow: 0 6px 18px rgba(23, 32, 51, 0.06);
    }

    .dictionary-home-link:hover {
      border-color: var(--accent);
      background: var(--accent-soft);
    }

    .pair-select {
      width: 100%;
      border: 1px solid var(--line-strong);
      border-radius: 14px;
      padding: 10px 10px;
      font-size: 0.9rem;
      background: #fff;
      color: var(--text);
      min-height: 40px;
      font-weight: 650;
    }

    .pair-select:focus-visible {
      outline: none;
      border-color: var(--accent);
      box-shadow: 0 0 0 3px var(--focus-ring);
    }

    .lang-switch {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 6px;
      margin-top: 6px;
    }

    .lang-btn {
      border: 1px solid var(--line-strong);
      border-radius: 999px;
      background: var(--surface-soft);
      color: var(--text);
      padding: 9px 8px;
      font-size: 0.82rem;
      cursor: pointer;
      min-height: 40px;
      transition: background-color 0.12s ease, border-color 0.12s ease, color 0.12s ease;
    }

    .lang-btn.is-active {
      border-color: var(--accent);
      color: var(--accent-deep);
      font-weight: 600;
      background: var(--accent-soft);
    }

    .lang-btn:focus-visible {
      outline: none;
      box-shadow: 0 0 0 3px var(--focus-ring);
    }

    .main {
      min-width: 0;
      border: 1px solid var(--line);
      border-radius: 22px;
      background: var(--surface);
      padding: 14px 16px 12px;
      flex: 1;
      box-shadow: var(--shadow-strong);
    }

    .toolbar {
      display: grid;
      grid-template-columns: minmax(170px, 240px) minmax(190px, 290px) minmax(0, 1fr);
      gap: 10px;
      align-items: center;
      margin: -2px -2px 8px;
      padding: 6px 2px 10px;
      position: sticky;
      top: 0;
      z-index: 25;
      background: linear-gradient(to bottom, var(--surface) 84%, rgba(255, 255, 255, 0));
    }

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

    .search-row {
      display: flex;
      align-items: stretch;
      gap: 6px;
    }

    #q {
      width: 100%;
      min-width: 0;
      border: 1px solid var(--line-strong);
      border-radius: 15px;
      padding: 11px 12px;
      font-size: 1rem;
      background: #fff;
      color: var(--text);
      outline: none;
      flex: 1;
      min-height: 42px;
      font-weight: 650;
    }

    #q:focus {
      border-color: var(--accent);
      box-shadow: 0 0 0 3px var(--focus-ring);
    }

    #q::placeholder {
      color: #82878f;
    }

    #q:disabled {
      cursor: wait;
      color: var(--muted);
      background: var(--surface-soft);
      border-color: var(--line);
    }

    #q:disabled::placeholder {
      color: var(--muted);
    }

    .icon-btn {
      width: 44px;
      min-width: 44px;
      border: 1px solid var(--line-strong);
      background: var(--surface-soft);
      border-radius: 15px;
      color: #2c3b56;
      cursor: pointer;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      padding: 0;
      min-height: 42px;
      transition: background-color 0.12s ease, border-color 0.12s ease, color 0.12s ease;
    }

    .icon-btn:hover {
      border-color: var(--accent);
      color: var(--accent);
      background: #f7faff;
    }

    .icon-btn:focus-visible {
      outline: none;
      box-shadow: 0 0 0 3px var(--focus-ring);
    }

    .icon-btn svg {
      width: 19px;
      height: 19px;
      display: block;
    }

    .search-clear-btn {
      color: var(--muted);
      background: #fff;
    }

    .search-clear-btn:hover {
      color: #a23131;
      border-color: #e5c0c0;
      background: #fff8f8;
    }

    .search-clear-btn[hidden] {
      display: none !important;
    }

    .suggestions {
      list-style: none;
      margin: 6px 0 0;
      padding: 4px;
      position: absolute;
      left: 0;
      right: 0;
      border: 1px solid var(--line-strong);
      border-radius: 10px;
      background: #fff;
      max-height: 300px;
      overflow: auto;
      z-index: 30;
      box-shadow: 0 14px 34px rgba(15, 22, 35, 0.16);
    }

    .suggestion-btn {
      width: 100%;
      text-align: left;
      border: 0;
      background: transparent;
      border-radius: 8px;
      padding: 8px 9px;
      font-size: 0.95rem;
      cursor: pointer;
    }

    .suggestion-btn.is-active,
    .suggestion-btn:hover {
      background: #eff3fb;
    }

    .status {
      margin: 0 0 8px;
      min-height: 1.1rem;
      color: var(--muted);
      font-size: 0.84rem;
      letter-spacing: 0;
    }

    .offline-loading {
      display: inline-flex;
      align-items: flex-start;
      gap: 8px;
      margin: 0 0 8px;
      color: #3f5e9c;
      font-size: 0.84rem;
      min-height: 1.1rem;
    }

    .offline-loading > span:last-child {
      display: grid;
      gap: 2px;
    }

    .offline-loading[hidden] {
      display: none !important;
    }

    .offline-search-disabled {
      display: block;
      color: var(--muted);
      font-size: 0.78rem;
      line-height: 1.25;
    }

    .offline-search-disabled[hidden] {
      display: none !important;
    }

    .offline-spinner {
      width: 14px;
      height: 14px;
      border-radius: 50%;
      border: 2px solid #c9d8f7;
      border-top-color: #3267d6;
      animation: offline-spin 0.7s linear infinite;
      flex: 0 0 auto;
    }

    @keyframes offline-spin {
      to { transform: rotate(360deg); }
    }

    .results {
      border-top: 1px solid var(--line);
      padding-top: 12px;
    }

    .dictionary-feedback[hidden] {
      display: none !important;
    }

    .dictionary-feedback {
      display: grid;
      grid-template-columns: auto minmax(0, 1fr);
      gap: 14px;
      margin-top: 18px;
      padding: 16px;
      border: 1px solid var(--line);
      border-radius: 18px;
      background: linear-gradient(135deg, #ffffff 0%, #f7fcff 100%);
      box-shadow: var(--shadow-soft);
    }

    .dictionary-feedback-icon {
      display: grid;
      width: 42px;
      height: 42px;
      place-items: center;
      border-radius: 14px;
      color: var(--accent-deep);
      background: var(--accent-soft);
      font-size: 1.05rem;
    }

    .dictionary-feedback-body {
      min-width: 0;
    }

    .dictionary-feedback-head {
      display: flex;
      gap: 12px;
      align-items: flex-start;
      justify-content: space-between;
      margin-bottom: 10px;
    }

    .dictionary-feedback-eyebrow {
      display: block;
      color: var(--accent-deep);
      font-size: 0.72rem;
      font-weight: 800;
      letter-spacing: 0.06em;
      text-transform: uppercase;
    }

    .dictionary-feedback h2 {
      margin: 2px 0 0;
      color: var(--text);
      font-size: 1rem;
      line-height: 1.25;
    }

    .dictionary-feedback-lemma {
      display: inline-flex;
      gap: 6px;
      align-items: center;
      max-width: 100%;
      padding: 6px 10px;
      border: 1px solid var(--line);
      border-radius: 999px;
      color: var(--text);
      background: #fff;
      font-size: 0.82rem;
      white-space: nowrap;
    }

    .dictionary-feedback-lemma strong {
      overflow: hidden;
      max-width: min(220px, 44vw);
      color: var(--accent-deep);
      text-overflow: ellipsis;
    }

    .dictionary-feedback label {
      display: block;
      margin-bottom: 6px;
      color: var(--text);
      font-size: 0.86rem;
      font-weight: 700;
    }

    .dictionary-feedback textarea {
      width: 100%;
      min-height: 92px;
      resize: vertical;
      border: 1px solid var(--line-strong);
      border-radius: 14px;
      padding: 10px 12px;
      color: var(--text);
      background: #fff;
      font: inherit;
      line-height: 1.45;
      outline: none;
    }

    .dictionary-feedback textarea:focus {
      border-color: var(--accent);
      box-shadow: 0 0 0 4px var(--focus-ring);
    }

    .dictionary-feedback-actions {
      display: flex;
      gap: 12px;
      align-items: center;
      justify-content: space-between;
      margin-top: 10px;
    }

    .dictionary-feedback-status {
      min-height: 1.3em;
      margin: 0;
      color: var(--muted);
      font-size: 0.84rem;
      line-height: 1.35;
    }

    .dictionary-feedback-status[data-tone="success"] {
      color: #047857;
      font-weight: 700;
    }

    .dictionary-feedback-status[data-tone="error"] {
      color: #b91c1c;
      font-weight: 700;
    }

    .dictionary-feedback-status[data-tone="pending"] {
      color: var(--accent-deep);
      font-weight: 700;
    }

    .empty {
      color: var(--muted);
      padding: 14px 0;
      font-size: 0.92rem;
    }

    .synonym-row {
      color: var(--muted);
      font-size: 0.84rem;
      margin: 0 0 8px;
      line-height: 1.45;
    }

    .entry-block {
      margin: 0;
      padding: 12px 0;
      border-bottom: 1px solid var(--line);
      content-visibility: auto;
      contain-intrinsic-size: auto 72px;
    }

    .entry-block.is-synonym {
      background: linear-gradient(to right, #f4f8ff 0%, #ffffff 28%);
      border-left: 3px solid #b8d5f4;
      padding-left: 10px;
      border-bottom-style: solid;
    }

    .entry-line {
      margin: 0;
      font-size: 0.98rem;
      line-height: 1.58;
      word-break: break-word;
    }

    .entry-lemma {
      font-weight: 700;
      color: var(--text);
    }

    .entry-category {
      color: var(--muted);
      font-style: italic;
      margin-left: 4px;
      margin-right: 8px;
      font-size: 0.86rem;
    }

    .entry-match {
      color: var(--accent-deep);
      background: var(--accent-soft);
      border: 1px solid #cce3fb;
      border-radius: 999px;
      font-size: 0.74rem;
      margin-right: 6px;
      padding: 1px 6px;
      vertical-align: middle;
    }

    .entry-tail {
      color: #222;
    }

    .entry-sense-number {
      color: var(--text);
      font-weight: 800;
    }

    .entry-example {
      color: var(--text);
    }

    .entry-example-source {
      color: var(--text);
      font-weight: 800;
    }

    .entry-example-arrow,
    .entry-example-target {
      color: var(--muted);
    }

    .entry-label {
      color: #3f3f3f;
      font-weight: 600;
    }

    .entry-word {
      border: 0;
      background: transparent;
      padding: 0;
      margin: 0;
      color: var(--accent-deep);
      text-decoration: underline;
      text-decoration-thickness: 1px;
      text-underline-offset: 1.5px;
      cursor: pointer;
      font: inherit;
      line-height: inherit;
    }

    .entry-word:hover {
      color: var(--accent);
    }

    .entry-word:focus-visible {
      outline: 1px solid #7aa4ea;
      outline-offset: 1px;
      border-radius: 2px;
    }

    .graph-overlay {
      position: fixed;
      inset: 0;
      z-index: 1000;
      background: rgba(10, 14, 22, 0.22);
      display: none;
      padding: 8px;
    }

    .graph-overlay.is-open {
      display: block;
    }

    .graphbar {
      border: 1px solid var(--line);
      border-radius: 12px;
      background: var(--surface);
      padding: 10px;
      height: 100%;
      width: 100%;
      box-shadow: 0 10px 30px rgba(0, 0, 0, 0.16);
      display: flex;
      flex-direction: column;
    }

    .graph-head {
      display: flex;
      justify-content: space-between;
      align-items: center;
      gap: 8px;
      margin-bottom: 8px;
    }

    .graph-title-wrap {
      display: flex;
      align-items: baseline;
      gap: 8px;
      min-width: 0;
    }

    .graph-title {
      margin: 0;
      font-size: 0.94rem;
      font-weight: 600;
    }

    .graph-meta {
      color: var(--muted);
      font-size: 0.78rem;
      white-space: nowrap;
    }

    .graph-tools {
      display: flex;
      gap: 6px;
    }

    .graph-tool-btn {
      border: 1px solid var(--line-strong);
      background: #fff;
      color: var(--text);
      border-radius: 7px;
      padding: 6px 8px;
      font-size: 0.76rem;
      cursor: pointer;
      line-height: 1;
      min-height: 30px;
    }

    .graph-wrap {
      border: 1px solid var(--line);
      border-radius: 8px;
      overflow: hidden;
      background: #fbfcff;
      display: flex;
      align-items: stretch;
      min-height: 0;
      flex: 1;
    }

    .graph {
      width: 100%;
      height: 100%;
      display: block;
      touch-action: none;
      cursor: grab;
      user-select: none;
    }

    .graph.is-dragging {
      cursor: grabbing;
    }

    .graph.is-moving-node {
      cursor: grabbing;
    }

    .graph-edge {
      stroke-linecap: round;
      opacity: 0.78;
    }

    .graph-node {
      cursor: grab;
      outline: none;
    }

    .graph-node:active {
      cursor: grabbing;
    }

    .graph-node-dot {
      stroke: rgba(255, 255, 255, 0.96);
      stroke-width: 1.8;
      filter: drop-shadow(0 5px 10px rgba(23, 32, 51, 0.12));
      transition: stroke 0.14s ease, stroke-width 0.14s ease, filter 0.14s ease;
    }

    .graph-node:hover .graph-node-dot,
    .graph-node:focus .graph-node-dot {
      stroke: var(--accent-deep);
      stroke-width: 2.6;
      filter: drop-shadow(0 8px 16px rgba(12, 111, 189, 0.22));
    }

    .graph-node.is-expanded .graph-node-dot {
      stroke: #172033;
      stroke-width: 2.4;
    }

    .graph-node.is-selected .graph-node-dot {
      stroke: #f59e0b;
      stroke-width: 3;
      filter: drop-shadow(0 9px 18px rgba(245, 158, 11, 0.25));
    }

    .graph-node-label {
      paint-order: stroke;
      stroke: rgba(255, 255, 255, 0.82);
      stroke-width: 2.8px;
      stroke-linejoin: round;
      user-select: none;
    }

    .graph-node-badge {
      fill: #fff;
      stroke: var(--accent);
      stroke-width: 1.25;
      filter: drop-shadow(0 3px 8px rgba(23, 32, 51, 0.14));
    }

    .graph-node-plus {
      fill: var(--accent-deep);
      font-size: 7px;
      font-weight: 900;
      pointer-events: none;
      user-select: none;
    }

    .graph-explorer {
      display: flex;
      justify-content: space-between;
      gap: 12px;
      align-items: center;
      margin-top: 10px;
      padding: 10px;
      border: 1px solid var(--line);
      border-radius: 12px;
      background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(248, 251, 255, 0.9)),
        radial-gradient(circle at 0% 0%, rgba(12, 111, 189, 0.08), transparent 14rem);
    }

    .graph-explorer-copy {
      display: grid;
      gap: 2px;
      min-width: 0;
    }

    .graph-explorer-copy strong {
      color: var(--text);
      font-size: 0.88rem;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }

    .graph-explorer-copy span {
      color: var(--muted);
      font-size: 0.78rem;
      line-height: 1.35;
    }

    .graph-explorer-actions {
      display: flex;
      gap: 6px;
      flex: 0 0 auto;
    }

    .graph-tool-btn:disabled {
      cursor: not-allowed;
      opacity: 0.5;
    }

    .graph-empty {
      margin: 8px 2px 0;
      font-size: 0.84rem;
      color: var(--muted);
      min-height: 1.05rem;
    }

    .page-footer {
      display: flex;
      justify-content: center;
      gap: 14px;
      align-items: center;
      padding: 2px 2px 0;
      color: var(--muted);
      font-size: 0.82rem;
    }

    .page-footer a {
      color: inherit;
      text-decoration: none;
      border-bottom: 1px solid transparent;
    }

    .page-footer a:hover {
      color: #333;
      border-bottom-color: #bbb;
    }

    .dictionary-attribution {
      display: grid;
      gap: 12px;
      padding: 16px;
      border: 1px solid rgba(203, 214, 228, 0.82);
      border-radius: 22px;
      color: var(--muted);
      background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(248, 251, 255, 0.82)),
        radial-gradient(circle at right top, rgba(12, 111, 189, 0.09), transparent 18rem);
      box-shadow: 0 10px 26px rgba(23, 32, 51, 0.055);
    }

    .dictionary-attribution-head {
      display: flex;
      gap: 10px 18px;
      align-items: baseline;
      justify-content: space-between;
      flex-wrap: wrap;
    }

    .dictionary-attribution-head .dictionary-eyebrow {
      margin: 0;
    }

    .dictionary-attribution h2 {
      margin: 0;
      color: var(--text);
      font-size: clamp(1.05rem, 1.8vw, 1.35rem);
      letter-spacing: -0.025em;
    }

    .dictionary-attribution-links {
      display: grid;
      grid-template-columns: repeat(3, minmax(0, 1fr));
      gap: 8px;
    }

    .dictionary-attribution-links a {
      display: grid;
      gap: 3px;
      min-width: 0;
      padding: 11px 12px;
      border: 1px solid rgba(203, 214, 228, 0.82);
      border-radius: 16px;
      color: var(--text);
      background: rgba(255, 255, 255, 0.72);
      text-decoration: none;
      transition: border-color 0.12s ease, background 0.12s ease, transform 0.12s ease;
    }

    .dictionary-attribution-links a:hover {
      border-color: rgba(12, 111, 189, 0.28);
      background: #fff;
      transform: translateY(-1px);
    }

    .dictionary-attribution-links span {
      font-size: 0.86rem;
      font-weight: 800;
      line-height: 1.25;
    }

    .dictionary-attribution-links small {
      color: var(--accent-deep);
      font-size: 0.75rem;
      overflow-wrap: anywhere;
    }

    .dictionary-attribution-note {
      display: flex;
      gap: 8px;
      align-items: flex-start;
      margin: 0;
      padding: 11px 12px;
      border: 1px solid rgba(12, 111, 189, 0.12);
      border-radius: 16px;
      color: #405064;
      background: rgba(232, 243, 255, 0.58);
      font-size: 0.84rem;
      line-height: 1.5;
    }

    .dictionary-attribution-note i {
      color: var(--accent);
      margin-top: 0.15rem;
    }

    .embedded-product-shell {
      margin: 0;
      background: var(--bg);
    }

    .embedded-product-shell .dictionary-public-page {
      min-height: 100dvh;
      padding: 8px;
      gap: 8px;
    }

    .embedded-product-shell .main {
      min-height: calc(100dvh - 16px);
      border-radius: 16px;
      box-shadow: none;
    }

    .embedded-product-shell .toolbar {
      display: grid;
      grid-template-columns: 1fr;
      position: static;
      margin: 0 0 8px;
      padding: 0 0 8px;
      background: transparent;
    }

    .embedded-product-shell .pair-select {
      display: none !important;
    }

    .embedded-product-shell .lang-switch {
      display: grid !important;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 6px;
      margin: 0 0 8px;
    }

    .embedded-product-shell .lang-btn {
      min-height: 34px;
      padding: 6px 8px;
      font-size: 0.76rem;
    }

    .embedded-product-shell .search-wrap {
      grid-column: 1 / -1;
    }

    @media (max-width: 980px) {
      .dictionary-hero {
        grid-template-columns: 1fr;
      }
      .toolbar {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
        position: static;
        background: transparent;
        margin-bottom: 6px;
        padding-bottom: 6px;
      }
      .search-wrap {
        grid-column: 1 / -1;
      }
    }

    @media (max-width: 680px) {
      .toolbar {
        grid-template-columns: minmax(0, 1fr);
      }
      .lang-switch {
        grid-template-columns: repeat(2, minmax(0, 1fr));
      }
      .dictionary-attribution-links {
        grid-template-columns: 1fr;
      }
    }

    @media (max-width: 560px) {
      .page {
        padding: 8px;
      }
      .dictionary-feedback {
        grid-template-columns: 1fr;
        padding: 14px;
      }
      .dictionary-feedback-head,
      .dictionary-feedback-actions {
        align-items: stretch;
        flex-direction: column;
      }
      .dictionary-feedback-lemma {
        width: fit-content;
        max-width: 100%;
      }
      .dictionary-hero {
        border-radius: 16px;
        padding: 14px;
      }
      .dictionary-title {
        font-size: 1.85rem;
      }
      .dictionary-hero-chips,
      .dictionary-hero-chips > span {
        width: 100%;
      }
      .main {
        border-radius: 16px;
        padding: 8px 9px 7px;
      }
      .graph-overlay {
        padding: 4px;
      }
      .graph-tools {
        flex-wrap: wrap;
      }
      .graph-explorer {
        align-items: stretch;
        flex-direction: column;
      }
      .graph-explorer-actions {
        width: 100%;
      }
      .graph-explorer-actions .graph-tool-btn {
        flex: 1;
      }
      .graph-tool-btn {
        font-size: 0.72rem;
      }
    }
