:root {
  --primary: #5a23ce;
  --primary-dark: #351590;
  --primary-blue: #0f86c5;
  --primary-soft: #eee9ff;
  --amber: #f59e0b;
  --danger: #b42318;
  --ink: #28263d;
  --muted: #6f7288;
  --line: #d9dcf6;
  --surface: #ffffff;
  --surface-soft: #f7f7ff;
  --page: #eef1ff;
  --radius-lg: 24px;
  --radius-md: 16px;
  --shadow: 0 10px 28px rgba(67, 42, 161, 0.12);
  --main-gradient: linear-gradient(135deg, #5a23ce 0%, #3d35ce 50%, #0f86c5 100%);
  color-scheme: light;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 10% 0%, rgba(90,35,206,.08), transparent 26%),
    radial-gradient(circle at 100% 18%, rgba(15,134,197,.09), transparent 28%),
    var(--page);
  color: var(--ink);
  font-family: "Plus Jakarta Sans", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}
button, input { font: inherit; }
button { touch-action: manipulation; }
a { color: inherit; }
[hidden] { display: none !important; }

.app-shell { min-height: 100vh; display: flex; flex-direction: column; }
.site-header {
  position: relative;
  background: var(--main-gradient);
  border-bottom: 1px solid rgba(255,255,255,.18);
  border-bottom-left-radius: 30px;
  border-bottom-right-radius: 30px;
  padding: 30px 16px 27px;
  box-shadow: 0 12px 30px rgba(61, 44, 170, 0.22);
}
.home-button { position: absolute; top: 16px; left: max(16px, env(safe-area-inset-left)); z-index: 2; display: inline-flex; align-items: center; gap: 7px; min-height: 38px; padding: 7px 12px; border: 1px solid rgba(255,255,255,.55); border-radius: 999px; background: rgba(255,255,255,.15); color: #fff; text-decoration: none; font-size: .72rem; font-weight: 800; backdrop-filter: blur(7px); }
.home-button:hover, .home-button:focus-visible { background: #fff; color: var(--primary-dark); outline: none; }
.header-inner { max-width: 960px; margin: auto; text-align: center; }
.header-inner h1 {
  margin: 0 0 10px;
  color: #ffffff;
  font: 700 clamp(1.55rem, 4vw, 2.35rem)/1.25 "Lora", Georgia, serif;
  letter-spacing: -0.025em;
}
.header-inner p { margin: 0 auto; max-width: 820px; color: rgba(255,255,255,.9); font-size: clamp(.78rem, 2vw, 1rem); line-height: 1.75; }

.page-wrap { flex: 1; width: min(1280px, 100%); margin: auto; padding: 24px 28px 32px; }
.content-grid { display: grid; grid-template-columns: 384px minmax(0, 1fr); gap: 24px; align-items: start; }
.sidebar, .detail-card {
  background: var(--surface);
  border: 2px solid rgba(90, 35, 206, .28);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}
.sidebar {
  position: sticky;
  top: 18px;
  height: calc(100vh - 210px);
  min-height: 580px;
  padding: 12px;
  display: flex;
  flex-direction: column;
}
.detail-card { min-width: 0; min-height: 580px; overflow: hidden; }

.status-banner {
  margin-bottom: 16px;
  padding: 11px 13px;
  border-radius: 14px;
  border: 1px solid #fde68a;
  background: #fff8e5;
  color: #78350f;
  font-size: .78rem;
  display: flex;
  gap: 9px;
  align-items: center;
}
.status-banner.success { background: #ecfdf5; border-color: #a7f3d0; color: #065f46; }
.status-banner.loading { background: #eee9ff; border-color: #cfc2ff; color: #351590; }
.status-icon { width: 20px; height: 20px; display: inline-grid; place-items: center; border-radius: 50%; background: currentColor; color: #fff; font-weight: 700; font-size: .7rem; flex: 0 0 auto; }
.status-text { flex: 1; line-height: 1.55; }
.status-close { border: 0; background: transparent; color: inherit; font-weight: 700; cursor: pointer; padding: 4px; }

.mobile-tabs { display: none; }
.search-wrap { position: relative; margin-bottom: 12px; }
.search-wrap input {
  width: 100%; height: 43px; padding: 0 38px 0 38px;
  border: 1px solid #d6d9f3; border-radius: 15px; outline: none;
  background: #f1f2ff; color: var(--ink); font-size: .86rem;
  transition: .2s ease;
}
.search-wrap input:focus { background: #fff; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(90,35,206,.16); }
.search-symbol { position: absolute; left: 14px; top: 50%; transform: translateY(-52%); color: #78716c; font-size: 1.35rem; pointer-events: none; }
.icon-button { border: 0; background: transparent; cursor: pointer; color: #6f7288; }
.clear-search { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); font-size: 1.25rem; }
.sidebar-title-row { display: flex; justify-content: space-between; align-items: center; padding: 0 4px; margin-bottom: 8px; font-size: .75rem; }
.sidebar-title-row span { color: var(--primary); font-weight: 700; }

.view-tabs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; background: #eceaff; border-radius: 12px; padding: 4px; margin-bottom: 8px; }
.view-tab { border: 0; background: transparent; padding: 7px 4px; border-radius: 9px; color: #57534e; font-size: .67rem; font-weight: 700; cursor: pointer; white-space: nowrap; }
.view-tab.active { color: var(--primary-dark); background: linear-gradient(135deg, #ffffff 0%, #f6f3ff 100%); box-shadow: 0 2px 8px rgba(67,42,161,.12); }
.search-options { display: flex; justify-content: space-between; align-items: center; gap: 8px; min-height: 25px; padding: 0 4px; color: #57534e; font-size: .68rem; }
.search-options label { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.search-options input { accent-color: var(--primary); }
.link-button { border: 0; background: transparent; padding: 3px; color: var(--primary); font-size: .69rem; font-weight: 700; cursor: pointer; }
.link-button:hover { text-decoration: underline; }
.link-button.danger { color: #6f7288; }
.link-button.danger:hover { color: #e11d48; }

.alphabet-bar { display: flex; gap: 4px; overflow-x: auto; border-block: 1px solid #e5e6f8; padding: 6px 3px; margin-bottom: 8px; scrollbar-width: thin; }
.alphabet-button { flex: 0 0 auto; border: 0; background: transparent; color: #57534e; border-radius: 6px; padding: 3px 7px; font-size: .66rem; font-weight: 700; cursor: pointer; }
.alphabet-button:hover { background: #e3def7; }
.alphabet-button.active { color: #fff; background: var(--main-gradient); box-shadow: 0 3px 9px rgba(67,42,161,.22); }
.term-list { flex: 1; overflow-y: auto; padding: 4px 3px 4px 0; display: flex; flex-direction: column; gap: 8px; scrollbar-width: thin; }
.term-item {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  width: 100%; border: 1px solid #dde0f5; background: var(--surface-soft);
  border-radius: 15px; padding: 12px; text-align: left; cursor: pointer; transition: .17s ease;
}
.term-item:hover { background: #eee9ff; border-color: #c8b9fb; transform: translateY(-1px); }
.term-item.selected { background: linear-gradient(135deg, #f1edff 0%, #e9f6ff 100%); border: 2px solid var(--primary); color: var(--primary); }
.term-name-wrap { display: flex; align-items: center; min-width: 0; gap: 9px; }
.term-dot { width: 8px; height: 8px; flex: 0 0 auto; border-radius: 50%; background: var(--amber); }
.term-name { font-size: .82rem; line-height: 1.4; font-weight: 700; text-transform: uppercase; color: #334155; overflow-wrap: anywhere; }
.term-item.selected .term-name { color: var(--primary); }
.star-button { flex: 0 0 auto; border: 0; background: transparent; color: #c9c4bf; font-size: 1.1rem; cursor: pointer; padding: 3px; }
.star-button.active { color: #f59e0b; }
.empty-list { min-height: 190px; display: grid; place-content: center; text-align: center; color: #78716c; padding: 18px; }
.empty-list b { color: #44403c; font-size: .78rem; }
.empty-list p { margin: 6px 0 0; font-size: .68rem; line-height: 1.55; }
.clear-recent-wrap { padding-top: 7px; border-top: 1px solid #e5e6f8; text-align: center; }

.empty-detail { min-height: 580px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 32px; }
.empty-icon { width: 78px; height: 78px; border-radius: 22px; display: grid; place-items: center; background: linear-gradient(135deg, #eee9ff 0%, #e5f5ff 100%); border: 1px solid #c8b9fb; color: var(--primary); font-size: 2.2rem; }
.empty-detail h2 { margin: 18px 0 7px; font-size: 1.25rem; }
.empty-detail p { max-width: 450px; margin: 0; color: #78716c; font-size: .88rem; line-height: 1.7; }
.term-detail { min-height: 580px; display: flex; flex-direction: column; }
.detail-toolbar { padding: 15px 22px; background: rgba(247,247,255,.94); border-bottom: 1px solid var(--line); display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px; }
.detail-meta, .action-bar { display: flex; align-items: center; gap: 7px; }
.position-badge { padding: 5px 9px; border: 1px solid #c8b9fb; border-radius: 7px; background: #e9e2ff; color: #3c1d94; font-size: .72rem; font-weight: 700; }
.source-label { font-size: .66rem; color: #6f7288; }
.font-controls { display: inline-flex; align-items: center; padding: 2px; border: 1px solid var(--line); background: #fff; border-radius: 9px; }
.font-controls button { border: 0; background: transparent; padding: 6px 7px; color: #57534e; font-size: .68rem; font-weight: 700; cursor: pointer; border-radius: 6px; }
.font-controls button:hover { background: #eeecfb; }
.font-controls button:disabled { opacity: .35; cursor: not-allowed; }
.font-controls span { min-width: 38px; text-align: center; color: #78716c; font-size: .64rem; }
.action-button { border: 1px solid var(--line); background: #fff; color: #44403c; border-radius: 9px; min-height: 34px; padding: 6px 9px; display: inline-flex; align-items: center; gap: 5px; font-size: .69rem; font-weight: 600; cursor: pointer; }
.action-button:hover { background: #eeecfb; }
.action-button.active { background: #fef3c7; border-color: #fcd34d; color: #78350f; }
.action-button.speaking { background: var(--main-gradient); border-color: transparent; color: #fff; }
.action-button.icon-only { min-width: 34px; justify-content: center; font-size: 1rem; }

.detail-scroll { flex: 1; min-height: 0; overflow-y: auto; padding: 24px 30px 30px; }
.term-heading { border-bottom: 1px solid #d9dcf6; padding-bottom: 16px; margin-bottom: 22px; }
.eyebrow { color: var(--primary); font-size: .69rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.term-heading h2 { margin: 7px 0 0; color: #29195f; font: 700 clamp(1.65rem, 4vw, 2.5rem)/1.2 "Lora", Georgia, serif; overflow-wrap: anywhere; }
.definition-card { padding: 24px 27px; border: 1px solid #d9dcf6; border-radius: 16px; background: linear-gradient(180deg, #fafaff 0%, #f5f6ff 100%); color: #292524; font-family: "Lora", Georgia, serif; font-size: 18px; line-height: 1.85; overflow-wrap: anywhere; }
.definition-card p { margin: 0 0 1em; text-align: justify; text-justify: inter-word; }
.definition-card p:last-child { margin-bottom: 0; }
.definition-card i, .definition-card em { color: #44403c; }
.definition-card b, .definition-card strong { color: #1c1917; font-weight: 700; }
.definition-card ul, .definition-card ol { padding-left: 1.5em; margin: 0 0 1em; }
.definition-card li { margin-bottom: .45em; }
.definition-card blockquote { margin: 1em 0; padding-left: 1em; border-left: 3px solid #9274e8; color: #57534e; }
.sr-only { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0,0,0,0) !important; white-space: nowrap !important; border: 0 !important; }

.ai-section { margin-top: 25px; padding: 18px; border: 1px solid #cfc6f7; border-radius: 18px; background: linear-gradient(155deg, #fbfaff 0%, #f2f7ff 100%); box-shadow: 0 8px 22px rgba(67,42,161,.08); }
.ai-section-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 11px; }
.ai-kicker { margin: 0 0 4px; color: var(--primary-blue); font-size: .61rem; font-weight: 800; letter-spacing: .12em; }
.ai-section-heading h3 { margin: 0; color: #2d1d68; font: 700 1.08rem/1.35 "Lora", Georgia, serif; }
.ai-byok-badge { flex: 0 0 auto; padding: 5px 9px; border: 1px solid #b8acf0; border-radius: 999px; background: #eee9ff; color: #4a249f; font-size: .62rem; font-weight: 800; }
.ai-warning { margin-bottom: 12px; padding: 10px 12px; border: 1px solid #f5c451; border-radius: 12px; background: #fff8df; color: #714b08; font-size: .69rem; line-height: 1.55; }
.ai-key-panel { margin-bottom: 13px; border: 1px solid #d9dcf6; border-radius: 13px; background: rgba(255,255,255,.9); overflow: hidden; }
.ai-key-panel summary { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px; color: #4c485c; font-size: .7rem; font-weight: 800; cursor: pointer; list-style: none; }
.ai-key-panel summary::-webkit-details-marker { display: none; }
.ai-key-panel summary::before { content: "▸"; color: var(--primary); transition: transform .18s ease; }
.ai-key-panel[open] summary::before { transform: rotate(90deg); }
.ai-key-panel summary span { flex: 1; }
.ai-key-panel summary strong { color: var(--danger); font-size: .64rem; }
.ai-key-panel.has-key summary strong { color: #067647; }
.ai-key-content { padding: 0 12px 12px; border-top: 1px solid #ececf8; }
.ai-key-content > label { display: block; margin: 10px 0 6px; color: #57536e; font-size: .66rem; font-weight: 700; }
.ai-provider-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 9px; margin-top: 10px; }
.ai-provider-grid label, .ai-custom-model { min-width: 0; color: #57536e; font-size: .66rem; font-weight: 700; }
.ai-provider-grid label span, .ai-custom-model span { display: block; margin-bottom: 6px; }
.ai-provider-grid select, .ai-custom-model input { width: 100%; height: 40px; padding: 0 10px; border: 1px solid #cfd3ef; border-radius: 10px; background: #fff; color: var(--ink); font-size: .72rem; outline: none; }
.ai-provider-grid select:focus, .ai-custom-model input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(90,35,206,.12); }
.ai-custom-model { margin-top: 9px !important; }
.ai-key-row { display: flex; gap: 7px; }
.ai-key-row input { min-width: 0; flex: 1; height: 40px; padding: 0 11px; border: 1px solid #cfd3ef; border-radius: 10px; background: #fff; color: var(--ink); font-size: .75rem; outline: none; }
.ai-key-row input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(90,35,206,.12); }
.ai-key-row button, .ai-key-actions button { border-radius: 9px; font-size: .67rem; font-weight: 800; cursor: pointer; }
.ai-key-row button { flex: 0 0 auto; padding: 0 11px; border: 1px solid #d2d5ec; background: #fff; color: #4c485c; }
.ai-key-actions { display: flex; gap: 7px; margin-top: 8px; }
.ai-key-actions button { min-height: 34px; padding: 6px 11px; }
.ai-primary-button { border: 1px solid var(--primary); background: var(--primary); color: #fff; }
.ai-secondary-button { border: 1px solid #d2d5ec; background: #fff; color: #5b576b; }
.ai-key-note, .ai-terms-note { margin: 8px 0 0; color: #77738a; font-size: .62rem; line-height: 1.55; }
.ai-key-note a { color: var(--primary); font-weight: 800; text-underline-offset: 2px; }
.ai-terms-note { color: #8a5d14; }
.ai-suggestions { display: flex; gap: 7px; overflow-x: auto; padding: 1px 1px 9px; scrollbar-width: thin; }
.ai-suggestions button { flex: 0 0 auto; max-width: 210px; padding: 7px 10px; border: 1px solid #cfc6f7; border-radius: 999px; background: #fff; color: #4a249f; font-size: .64rem; font-weight: 700; cursor: pointer; }
.ai-suggestions button:hover:not(:disabled) { background: #eee9ff; border-color: #9d88e6; }
.ai-suggestions button:disabled { opacity: .48; cursor: not-allowed; }
.ai-chat-log { min-height: 150px; max-height: 430px; overflow-y: auto; scrollbar-gutter: stable; display: flex; flex-direction: column; gap: 9px; padding: 12px; border: 1px solid #dfe2f5; border-radius: 14px; background: #fff; }
.ai-message { max-width: 91%; padding: 10px 12px; border-radius: 13px; font-size: .75rem; line-height: 1.65; white-space: pre-wrap; overflow-wrap: anywhere; }
.ai-message.assistant { align-self: flex-start; border: 1px solid #d9dcf6; border-bottom-left-radius: 4px; background: #f3f2ff; color: #343047; }
.ai-message.user { align-self: flex-end; border-bottom-right-radius: 4px; background: var(--main-gradient); color: #fff; }
.ai-message.error { align-self: flex-start; border: 1px solid #fecaca; background: #fff1f1; color: var(--danger); }
.ai-message-meta { display: block; margin-bottom: 3px; font-size: .58rem; font-weight: 800; letter-spacing: .04em; opacity: .72; text-transform: uppercase; }
.ai-message strong { font-weight: 800; }
.ai-message.is-thinking { color: #706b81; font-style: italic; }
.ai-chat-form { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 8px; margin-top: 10px; }
.ai-chat-form textarea { width: 100%; min-height: 48px; max-height: 130px; resize: vertical; padding: 10px 11px; border: 1px solid #cfd3ef; border-radius: 12px; background: #fff; color: var(--ink); font-size: .75rem; line-height: 1.5; outline: none; }
.ai-chat-form textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(90,35,206,.12); }
.ai-chat-form textarea:disabled { background: #f4f4f8; color: #9692a3; }
.ai-chat-form button { align-self: stretch; min-width: 62px; padding: 8px 13px; border: 0; border-radius: 12px; background: var(--main-gradient); color: #fff; font-size: .7rem; font-weight: 800; cursor: pointer; }
.ai-chat-form button:disabled { opacity: .45; cursor: not-allowed; }
.ai-form-meta { display: flex; justify-content: space-between; gap: 10px; margin-top: 6px; color: #898598; font-size: .58rem; line-height: 1.45; }
.ai-form-meta span:last-child { text-align: right; }
.related-section { border-top: 1px solid var(--line); margin-top: 28px; padding-top: 19px; }
.related-section h3 { margin: 0 0 11px; color: #78716c; text-transform: uppercase; letter-spacing: .08em; font-size: .68rem; }
.related-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.related-button { border: 1px solid var(--line); border-radius: 12px; background: #f8f7ff; padding: 11px; text-align: left; cursor: pointer; min-width: 0; }
.related-button:hover { border-color: #8b6ce1; background: #f2edff; }
.related-button b { display: block; color: #292524; font-size: .72rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.related-button span { display: block; color: #78716c; font-size: .64rem; margin-top: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.detail-nav { padding: 11px 22px; border-top: 1px solid var(--line); background: #f5f4ff; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.detail-nav button { border: 1px solid #d6d9ef; background: #fff; color: #292524; border-radius: 9px; padding: 7px 10px; font-size: .7rem; font-weight: 600; cursor: pointer; }
.detail-nav button:hover:not(:disabled) { background: #eeecfb; }
.detail-nav button:disabled { opacity: .38; cursor: not-allowed; }
.keyboard-hint { color: #a8a29e; font-size: .63rem; }

.site-footer { margin-top: auto; padding: 30px 16px; background: linear-gradient(135deg, #27105f 0%, #242279 52%, #0d577b 100%); color: #d7daf2; text-align: center; }
.footer-inner { max-width: 850px; margin: auto; }
.footer-divider { width: min(320px, 80%); margin: 0 auto 17px; display: flex; align-items: center; gap: 11px; color: #fbbf24; }
.footer-divider span { height: 1px; flex: 1; background: rgba(255,255,255,.28); }
.footer-main { color: #ffffff; font-weight: 600; }
.footer-main a { color: #8de1ff; font-weight: 700; text-underline-offset: 3px; }
.site-footer p { margin: 7px 0; font-size: .78rem; line-height: 1.65; }
.site-footer a:hover { color: #ffffff; }
.copyright { border-top: 1px solid rgba(255,255,255,.16); padding-top: 10px; margin-top: 13px !important; font-size: .67rem !important; color: #c9cbea; }

::-webkit-scrollbar { width: 7px; height: 7px; }
::-webkit-scrollbar-track { background: rgba(227,228,248,.82); }
::-webkit-scrollbar-thumb { background: rgba(90,35,206,.32); border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: rgba(61,53,206,.65); }

@media (max-width: 1023px) {
  .page-wrap { padding: 18px 16px 28px; }
  .content-grid { grid-template-columns: 1fr; }
  .mobile-tabs { display: flex; gap: 4px; padding: 4px; margin-bottom: 14px; background: rgba(255,255,255,.96); border: 1px solid #d7d9f3; border-radius: 15px; box-shadow: 0 5px 16px rgba(67,42,161,.1); }
  .mobile-tab { flex: 1; border: 0; border-radius: 11px; background: transparent; color: #57534e; padding: 10px 7px; font-size: .77rem; font-weight: 700; cursor: pointer; }
  .mobile-tab.active { background: var(--main-gradient); color: #fff; box-shadow: 0 5px 14px rgba(67,42,161,.2); }
  .sidebar { position: static; height: min(720px, calc(100vh - 210px)); min-height: 520px; }
  .detail-card { min-height: 520px; }
  .panel-hidden-mobile { display: none; }
  .panel-visible { display: flex; }
  .detail-card.panel-visible { display: block; }
}

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

@media (max-width: 640px) {
  .site-header { padding: 58px 14px 19px; }
  .home-button { top: 10px; left: 10px; min-height: 34px; padding: 6px 9px; }
  .page-wrap { padding: 13px 10px 22px; }
  .sidebar, .detail-card { border-radius: 18px; }
  .sidebar { min-height: 500px; height: calc(100vh - 185px); padding: 9px; }
  .view-tab { font-size: .6rem; }
  .detail-toolbar { padding: 11px 12px; align-items: flex-start; }
  .detail-meta { width: 100%; justify-content: space-between; }
  .action-bar { width: 100%; overflow-x: auto; padding-bottom: 2px; }
  .action-button span { display: none; }
  .detail-scroll { padding: 19px 15px 24px; }
  .definition-card { padding: 18px 16px; line-height: 1.75; }
  .related-grid { grid-template-columns: 1fr; }
  .ai-section { padding: 14px 12px; border-radius: 15px; }
  .ai-provider-grid { grid-template-columns: 1fr; }
  .ai-chat-log { max-height: 360px; padding: 10px; }
  .ai-message { max-width: 96%; font-size: .72rem; }
  .ai-chat-form { grid-template-columns: 1fr; }
  .ai-chat-form button { min-height: 40px; }
  .ai-form-meta { display: block; }
  .ai-form-meta span { display: block; text-align: left !important; margin-top: 3px; }
  .detail-nav { padding: 9px 11px; }
  .detail-nav button span { display: none; }
  .keyboard-hint { display: none; }
  .source-label { display: none; }
}

@media print {
  body { background: #fff; }
  .site-header, .home-button, .sidebar, .mobile-tabs, .status-banner, .detail-toolbar, .detail-nav, .site-footer, .related-section, .ai-section { display: none !important; }
  .page-wrap { width: 100%; max-width: none; padding: 0; }
  .content-grid { display: block; }
  .detail-card { border: 0; box-shadow: none; min-height: 0; }
  .detail-scroll { overflow: visible; padding: 0; }
  .definition-card { border: 0; padding: 0; background: #fff; }
  .term-heading h2 { font-size: 24pt; }
}
