/* Homepage hero and sections */
.hero { display: grid; grid-template-columns: 1.12fr .88fr; gap: 70px; align-items: center; min-height: 700px; padding-block: 80px 96px; }
.flag-dot { width: 26px; height: 5px; border-radius: 99px; background: linear-gradient(90deg, #161616 0 33%, var(--accent) 33% 66%, var(--accent-2) 66%); }
.hero-text { max-width: 620px; margin: 0; color: var(--muted); font-size: 18px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.hero-note { margin-top: 17px; color: var(--muted); font-size: 13px; }
.hero-panel { padding: 14px; border: 1px solid var(--line); border-radius: 28px; background: var(--surface); box-shadow: var(--shadow); transform: rotate(1.2deg); }
.preview-bar { display: flex; gap: 7px; padding: 6px 6px 15px; }
.preview-bar span { width: 8px; height: 8px; border-radius: 50%; background: var(--line); }
.preview-card { padding: 30px; border-radius: 20px; background: var(--surface-2); }
.preview-kicker, .feature-number { color: var(--muted); font-size: 11px; font-weight: 850; letter-spacing: .12em; }
.preview-word { margin-top: 22px; font-size: 58px; font-weight: 850; letter-spacing: -.05em; }
.preview-meta { margin-top: 4px; color: var(--muted); }
.preview-meaning { margin-top: 25px; font-size: 24px; font-weight: 700; }
.preview-example { margin-top: 18px; padding: 14px 16px; border-left: 3px solid var(--accent); border-radius: 10px; background: var(--surface); color: var(--muted); }
.preview-actions { display: flex; gap: 10px; margin-top: 18px; color: var(--accent); font-size: 13px; font-weight: 800; }
.section { padding-block: 92px; }
.section-muted { background: var(--surface-2); border-block: 1px solid var(--line); }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 30px; margin-bottom: 30px; }
.section-heading > p { max-width: 440px; margin: 0; color: var(--muted); }
.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.feature-card { padding: 28px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.feature-card:hover { border-color: color-mix(in srgb, var(--accent) 35%, var(--line)); }
.feature-card p { margin-bottom: 0; color: var(--muted); }
.level-strip { display: grid; grid-template-columns: .9fr 1.1fr; gap: 60px; align-items: center; }
.level-strip p { color: var(--muted); }
.level-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.level-grid a { display: grid; min-height: 92px; place-items: center; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); font-size: 24px; font-weight: 850; }
.level-grid a:hover { border-color: var(--accent); color: var(--accent); }
.cta-section { text-align: center; }
.cta-section h2 { max-width: 720px; margin: 10px auto 28px; }

/* Dictionary API/public result components */
.dictionary-stack { display:grid; gap:18px; }
.dictionary-source-panel { padding:22px; border:1px solid var(--line); border-radius:22px; background:var(--surface); box-shadow:0 4px 18px rgba(20,30,23,.035); }
.dictionary-source-head { display:flex; align-items:flex-end; justify-content:space-between; gap:20px; margin-bottom:18px; }
.dictionary-source-head h2 { margin:5px 0 0; font-size:20px; }
.dictionary-source-head > span { color:var(--muted); font-size:12px; }
.external-dictionary-results { display:grid; gap:12px; }
.external-word-banner { display:flex; justify-content:space-between; gap:15px; padding:12px 14px; border-radius:12px; background:var(--surface-2); }
.api-entry-card { padding:18px; border:1px solid var(--line); border-radius:16px; background:var(--surface-2); }
.api-entry-title { display:flex; align-items:center; justify-content:space-between; gap:14px; }
.api-entry-title > div { display:flex; align-items:baseline; gap:10px; }
.api-entry-title strong { font-size:20px; }
.api-pos-badge { padding:4px 8px; border-radius:999px; background:var(--accent-soft); color:var(--accent); font-size:10px; font-weight:800; text-transform:uppercase; }
.api-pronunciation { margin-top:8px; color:var(--muted); font-size:12px; }
.dict-relation-row { display:flex; flex-wrap:wrap; align-items:center; gap:8px; margin-top:14px; }
.dict-relation-row b { color:var(--text); font-size:11px; }
.dict-relation-chip { display:inline-flex; padding:5px 8px; border:1px solid var(--line); border-radius:999px; background:var(--surface); font-size:11px; }
.dict-relation-chip.synonym { border-color:color-mix(in srgb,var(--accent) 30%,var(--line)); }
.dict-relation-chip.antonym { border-color:#a78088; }
.api-sense-stack { display:grid; gap:8px; margin-top:15px; }
.api-public-sense { display:grid; grid-template-columns:25px 1fr; gap:10px; padding-top:10px; border-top:1px solid var(--line); }
.api-public-sense > span { display:grid; width:24px; height:24px; place-items:center; border-radius:7px; background:var(--accent); color:#fff; font-size:11px; }
.api-public-sense p { margin:7px 0 0; color:var(--muted); font-size:13px; }
.api-entry-card details { margin-top:12px; }
.api-form-list { display:flex; flex-wrap:wrap; gap:7px; padding-top:9px; }
.api-form-list span { padding:5px 8px; border:1px solid var(--line); border-radius:999px; font-size:11px; }

/* Public discovery and detail pages */
.hero-search, .dictionary-search { display:flex; gap:10px; margin-top:26px; padding:6px; border:1px solid var(--line); border-radius:18px; background:var(--surface); box-shadow:0 12px 35px rgba(26,31,28,.07); }
.hero-search input, .dictionary-search input { min-width:0; flex:1; border:0; outline:0; background:transparent; color:var(--text); padding:13px 14px; font:inherit; }
.hero-search input::placeholder, .dictionary-search input::placeholder { color:var(--muted); }
.stat-strip { display:grid; grid-template-columns:repeat(4,1fr); gap:1px; background:var(--line); border:1px solid var(--line); border-radius:22px; overflow:hidden; }
.stat-strip > div { display:flex; flex-direction:column; gap:4px; padding:22px; background:var(--surface); }
.stat-strip strong { font-size:30px; letter-spacing:-.04em; }
.stat-strip span { color:var(--muted); font-size:13px; }
.level-grid-large { grid-template-columns:repeat(3,1fr); }
.level-card { display:flex; min-height:145px; flex-direction:column; justify-content:space-between; padding:24px; border:1px solid var(--line); border-radius:20px; background:var(--surface); transition:transform .16s ease,border-color .16s ease,box-shadow .16s ease; }
.level-card:hover { transform:translateY(-2px); border-color:var(--accent); box-shadow:var(--shadow); }
.level-card strong { font-size:34px; letter-spacing:-.04em; }
.level-card span { color:var(--muted); font-size:13px; }
.level-card span:last-child { color:var(--accent); font-weight:800; }
.source-grid, .book-grid, .results-grid, .related-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:14px; }
.source-grid-large { grid-template-columns:repeat(3,1fr); }
.source-card, .book-card, .word-card, .related-card { display:flex; flex-direction:column; gap:8px; padding:22px; border:1px solid var(--line); border-radius:18px; background:var(--surface); }
.source-card:hover, .book-card:hover, .word-card:hover, .related-card:hover { border-color:color-mix(in srgb,var(--accent) 42%,var(--line)); }
.source-card .source-name { font-weight:800; font-size:17px; }
.source-card span:last-of-type, .source-card small, .book-card span, .book-card small, .word-source, .related-card span { color:var(--muted); font-size:13px; }
.source-card-large { min-height:150px; }
.book-card strong { font-size:18px; }
.page-heading { max-width:800px; margin:20px 0 36px; }
.page-heading h1 { margin-bottom:14px; }
.page-heading p { margin:0; color:var(--muted); font-size:17px; }
.dictionary-search { max-width:900px; margin:0 0 34px; }
.dictionary-intro-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:14px; }
.empty-state { padding:48px; border:1px solid var(--line); border-radius:24px; background:var(--surface); }
.empty-state h1, .empty-state h2 { max-width:760px; margin:12px 0; }
.empty-state p { max-width:700px; color:var(--muted); }
.word-card { min-height:190px; }
.word-card-actions { display:flex; justify-content:flex-start; margin-top:auto; padding-top:12px; }
.button-small { min-height:34px; padding:0 12px; font-size:13px; }
.search-suggestion { display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:stretch; gap:8px; width:100%; padding:0; border-bottom:1px solid var(--line); background:var(--surface); }
.search-suggestion:last-child { border-bottom:0; }
.search-suggestion-main { min-width:0; border:0; background:transparent; text-align:left; padding:12px 10px 12px 14px; cursor:pointer; color:inherit; font:inherit; }
.search-suggestion-main:hover { background:var(--accent-wash); }
.search-suggestion-detail { display:inline-flex; align-items:center; justify-content:center; margin:8px; padding:7px 9px; border:1px solid var(--line); border-radius:8px; color:var(--accent-strong); font-size:12px; white-space:nowrap; text-decoration:none; }
.search-suggestion-detail:hover { background:var(--accent-wash); }
.word-link { font-size:25px; font-weight:850; letter-spacing:-.03em; }
.word-card-main { display:flex; align-items:flex-start; justify-content:space-between; gap:10px; }
.word-card p { margin:7px 0 0; color:var(--muted); }
.word-meta { display:flex; flex-wrap:wrap; gap:7px 10px; align-items:center; margin-top:8px; color:var(--muted); font-size:13px; }
.level-pill { display:inline-flex; padding:4px 8px; border:1px solid color-mix(in srgb,var(--accent) 35%,var(--line)); border-radius:999px; background:var(--accent-soft); color:var(--accent); font-weight:800; }
.breadcrumbs { display:flex; flex-wrap:wrap; gap:9px; align-items:center; color:var(--muted); font-size:13px; margin-bottom:24px; }
.breadcrumbs a:hover { color:var(--text); }
.word-hero { display:flex; justify-content:space-between; align-items:end; gap:30px; margin-bottom:30px; }
.word-hero h1 { margin-bottom:8px; }
.word-subtitle { margin:0; max-width:680px; color:var(--muted); font-size:17px; }
.share-row { display:flex; flex-wrap:wrap; gap:8px; justify-content:flex-end; }
.share-chip { display:inline-flex; align-items:center; justify-content:center; min-height:38px; padding:0 13px; border:1px solid var(--line); border-radius:999px; background:var(--surface); color:var(--text); font-size:13px; cursor:pointer; }
.share-chip:hover { border-color:var(--accent); color:var(--accent); }
.variant-strip { margin-bottom:24px; padding:18px 20px; border:1px solid var(--line); border-radius:18px; background:var(--surface-2); }
.variant-list { display:flex; flex-wrap:wrap; gap:8px; margin-top:10px; }
.variant-list a { padding:6px 10px; border:1px solid var(--line); border-radius:999px; background:var(--surface); font-size:13px; }
.public-entry { padding:30px; border:1px solid var(--line); border-radius:24px; background:var(--surface); margin-bottom:18px; }
.variant-heading { margin-top:0; margin-bottom:18px; font-size:25px; }
.entry-detail-grid { display:grid; grid-template-columns:minmax(0,1fr) 300px; gap:28px; }
.sense-block { display:grid; grid-template-columns:28px 1fr; gap:14px; padding:18px 0; border-bottom:1px solid var(--line); }
.sense-index { display:grid; width:28px; height:28px; place-items:center; border-radius:9px; background:var(--accent-soft); color:var(--accent); font-size:12px; font-weight:850; }
.sense-title { margin:1px 0 14px; font-size:22px; }
.example-block { padding:14px 16px; margin-top:10px; border-left:3px solid var(--accent); border-radius:10px; background:var(--surface-2); }
.example-de { font-size:17px; }
.example-en { margin-top:4px; color:var(--muted); font-size:14px; }
.detail-section { padding-top:24px; }
.detail-section h2 { font-size:21px; margin-bottom:13px; }
.tag-list { display:flex; flex-wrap:wrap; gap:8px; }
.tag { display:inline-flex; padding:7px 10px; border:1px solid var(--line); border-radius:999px; color:var(--muted); background:var(--surface-2); font-size:13px; }
.entry-sidebar { display:flex; flex-direction:column; gap:14px; }
.side-card, .source-detail-card, .side-by-side-cta, .chapter-list { padding:22px; border:1px solid var(--line); border-radius:20px; background:var(--surface-2); }
.side-card { display:flex; flex-direction:column; gap:10px; }
.side-card p { margin:0; color:var(--muted); font-size:14px; }
.text-link { color:var(--accent); font-weight:800; }
.text-link:hover { text-decoration:underline; }
.related-grid { grid-template-columns:repeat(2,1fr); }
.related-card strong { font-size:16px; }
.side-by-side-cta { display:flex; justify-content:space-between; align-items:center; gap:24px; }
.side-by-side-cta h2 { max-width:720px; margin-top:8px; }
.section-inner { margin-top:28px; }
.level-stat-row { display:flex; align-items:center; justify-content:space-between; gap:18px; margin-bottom:26px; padding:18px 20px; border:1px solid var(--line); border-radius:18px; background:var(--surface-2); }
.level-stat-row > div { display:flex; flex-direction:column; gap:2px; }
.level-stat-row strong { font-size:30px; }
.level-stat-row span { color:var(--muted); font-size:13px; }
.center-action { display:flex; justify-content:center; margin-top:28px; }
.source-detail-card { display:flex; align-items:center; justify-content:space-between; gap:20px; margin-bottom:24px; }
.source-detail-card p { max-width:760px; margin:8px 0 0; color:var(--muted); }
.chapter-list { margin-bottom:24px; padding:0; overflow:hidden; }
.chapter-row { display:grid; grid-template-columns:90px 1fr auto; gap:18px; align-items:center; padding:16px 18px; border-bottom:1px solid var(--line); }
.chapter-row:last-child { border-bottom:0; }
.chapter-row span, .chapter-row small { color:var(--muted); font-size:13px; }
.chapter-row strong { font-size:15px; }

/* Prose and grammar components */
.prose-content { max-width: 860px; display: grid; gap: 18px; }
.prose-content p { margin: 0; max-width: 76ch; color: var(--muted); font-size: 1.02rem; line-height: 1.75; }
.prose-content h2 { margin: 0 0 8px; }
.prose-content a { text-underline-offset: 3px; }

.api-language-panel { display:grid; gap:10px; }
.empty-state.compact { padding:24px; }

.grammar-detail { display:grid; gap:14px; }
.grammar-card { padding:16px; border:1px solid var(--border); border-radius:16px; background:var(--surface); }
.grammar-card h3 { margin:0 0 12px; font-size:14px; }
.grammar-table { display:grid; gap:0; border:1px solid var(--border); border-radius:12px; overflow:hidden; }
.grammar-row { display:grid; grid-template-columns:minmax(140px, .8fr) minmax(0, 1.5fr); gap:14px; padding:10px 12px; border-bottom:1px solid var(--border); }
.grammar-row:last-child { border-bottom:0; }
.grammar-row > span { color:var(--muted); font-size:12px; }
.grammar-row > strong { font-size:13px; }
.grammar-nested-item { margin-top:6px; }
.translation-row { display:flex; flex-wrap:wrap; gap:8px; margin:10px 0 14px; }
.translation-chip { display:inline-flex; gap:7px; align-items:baseline; padding:7px 10px; border:1px solid var(--border); border-radius:999px; background:var(--surface-2); }
.translation-chip small { color:var(--muted); font-weight:700; letter-spacing:.04em; }
.usage-badge { display:inline-block; margin-bottom:10px; padding:5px 8px; border-radius:999px; background:var(--surface-2); color:var(--muted); font-size:12px; }
.pronunciation-inline { font-family:ui-monospace,SFMono-Regular,Menlo,monospace; color:var(--muted); }
@media (max-width: 700px) { .grammar-row { grid-template-columns:1fr; gap:5px; } }



@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; gap: 40px; min-height: auto; padding-block: 58px 70px; }
  .feature-grid, .level-strip, .dictionary-intro-grid { grid-template-columns: 1fr; }
  .level-grid, .level-grid-large { grid-template-columns: repeat(3, 1fr); }
  .source-grid, .source-grid-large, .book-grid, .results-grid { grid-template-columns: repeat(2, 1fr); }
  .entry-detail-grid { grid-template-columns: 1fr; }
  .word-hero { align-items: flex-start; flex-direction: column; }
  .share-row { justify-content: flex-start; }
  .stat-strip { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 620px) {
  h1 { font-size: clamp(40px, 13vw, 58px); }
  .hero-panel { transform: none; }
  .level-grid, .level-grid-large, .source-grid, .source-grid-large, .book-grid, .results-grid { grid-template-columns: 1fr; }
  .hero-actions { align-items: stretch; flex-direction: column; }
  .button-large { width: 100%; }
  .hero-search, .dictionary-search { flex-direction: column; }
  .hero-search .button, .dictionary-search .button { width: 100%; }
  .stat-strip { grid-template-columns: 1fr 1fr; }
  .word-card-main { flex-direction: column; }
  .public-entry { padding: 21px; }
  .related-grid { grid-template-columns: 1fr; }
  .side-by-side-cta, .source-detail-card, .level-stat-row { align-items: flex-start; flex-direction: column; }
  .chapter-row { grid-template-columns: 60px 1fr; }
  .chapter-row small { grid-column: 2; }
}

/* Account/authentication */
.account-layout{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:1.5rem;align-items:start;max-width:980px;margin-inline:auto}
.account-card{background:var(--surface-card);border:1px solid var(--border);border-radius:var(--radius-lg,22px);box-shadow:var(--shadow-sm);padding:clamp(1.25rem,3vw,2rem)}
.account-main{min-height:100%}
.account-card h1{margin:.2rem 0 .5rem;font-size:clamp(2rem,5vw,3rem);line-height:1.05}
.account-card h2{margin:.2rem 0 .5rem;font-size:1.35rem}
.account-form{display:grid;gap:1rem;margin-top:1.25rem}
.account-form label{display:grid;gap:.45rem;font-weight:650;color:var(--text)}
.account-form input{width:100%;min-height:46px;padding:.72rem .85rem;border:1px solid var(--border-strong,var(--border));border-radius:12px;background:var(--surface-input,var(--surface));color:var(--text);font:inherit}
.account-form input:focus-visible{outline:3px solid color-mix(in srgb,var(--accent) 28%,transparent);outline-offset:1px;border-color:var(--accent)}
.account-form small{color:var(--text-muted);font-weight:500;margin-top:-.25rem}
.account-actions{display:flex;flex-wrap:wrap;gap:.75rem;margin-top:1.25rem;align-items:center}
.notice-error{max-width:980px;margin:0 auto 1rem;padding:1rem 1.1rem;border:1px solid color-mix(in srgb,#b42318 32%,var(--border));border-radius:12px;background:color-mix(in srgb,#b42318 8%,var(--surface));color:var(--text)}
.account-chip,.account-link{display:inline-flex;align-items:center;justify-content:center;min-height:40px;padding:.45rem .8rem;border-radius:999px;border:1px solid var(--border);color:var(--text);background:var(--surface-soft);text-decoration:none;font-weight:700;white-space:nowrap}
.account-chip:hover,.account-link:hover{border-color:var(--accent);color:var(--accent);text-decoration:none}
@media (max-width:720px){.account-layout{grid-template-columns:1fr;gap:1rem}.account-card{padding:1rem}.account-actions,.account-actions .button,.account-actions form{width:100%}.account-actions .button,.account-actions form .button{justify-content:center;width:100%}}


/* Informational and error pages */
.faq-list { display: grid; gap: 12px; max-width: 920px; }
.faq-list details { border: 1px solid var(--border); border-radius: var(--radius-lg, 18px); background: var(--surface-card); box-shadow: var(--shadow-sm); overflow: hidden; }
.faq-list summary { min-height: 56px; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 18px; cursor: pointer; list-style: none; font-weight: 800; color: var(--text); }
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after { content: '+'; flex: 0 0 auto; color: var(--muted); font-size: 22px; line-height: 1; }
.faq-list details[open] summary::after { content: '−'; color: var(--accent); }
.faq-list details > p { margin: 0; padding: 0 18px 18px; color: var(--muted); line-height: 1.7; }
.error-page { min-height: 62vh; display: grid; place-items: center; padding-block: clamp(44px, 8vw, 90px); }
.error-panel { width: min(760px, 100%); padding: clamp(28px, 5vw, 56px); border: 1px solid var(--border); border-radius: clamp(22px, 4vw, 32px); background: var(--surface-card); box-shadow: var(--shadow); text-align: center; }
.error-panel h1 { margin-inline: auto; font-size: clamp(34px, 6vw, 64px); }
.error-panel p { max-width: 58ch; margin: 0 auto; color: var(--muted); }
.error-code { display: block; margin-bottom: 10px; color: var(--accent); font-size: clamp(56px, 13vw, 120px); font-weight: 900; letter-spacing: -.07em; line-height: .85; }
@media (max-width: 620px) { .error-panel { padding: 28px 20px; } .faq-list summary { padding: 14px 15px; } .faq-list details > p { padding-inline: 15px; } }

/* ===== Account experience ===== */
.account-shell{display:grid;grid-template-columns:minmax(0,1.02fr) minmax(360px,.98fr);gap:clamp(1.25rem,4vw,3rem);align-items:center;max-width:1080px;margin:0 auto;padding-block:clamp(1rem,4vw,3rem)}
.account-intro{padding:clamp(.5rem,3vw,1.5rem) 0}
.account-intro h1{margin:.45rem 0 .9rem;max-width:10ch;font-size:clamp(2.7rem,6vw,5.4rem);line-height:.96;letter-spacing:-.055em}
.account-intro>p{max-width:52ch;font-size:1.05rem;line-height:1.7;color:var(--text-muted);margin:0}
.account-benefits{display:grid;gap:.75rem;margin-top:clamp(1.25rem,4vw,2rem);max-width:560px}
.account-benefit{display:grid;grid-template-columns:38px minmax(0,1fr);gap:.8rem;align-items:center}
.account-benefit-icon{display:grid;place-items:center;width:38px;height:38px;border-radius:10px;background:color-mix(in srgb,var(--accent) 10%,var(--surface));border:1px solid color-mix(in srgb,var(--accent) 22%,var(--border));color:var(--accent);font-weight:900}
.account-benefit strong{display:block;font-size:.92rem;line-height:1.2}
.account-benefit small{display:block;margin-top:.18rem;color:var(--text-muted);font-size:.8rem;line-height:1.45}
.account-auth-card{width:100%;background:var(--surface-card);border:1px solid var(--border);border-radius:24px;box-shadow:var(--shadow-md,var(--shadow-sm));padding:clamp(1rem,3vw,1.5rem);overflow:hidden}
.account-mode-switch{display:grid;grid-template-columns:1fr 1fr;gap:.35rem;padding:.35rem;background:var(--surface-subtle,var(--surface));border:1px solid var(--border);border-radius:14px;margin-bottom:1.35rem}
.account-mode-tab{min-height:44px;border:0;border-radius:10px;background:transparent;color:var(--text-muted);font:inherit;font-weight:780;cursor:pointer;transition:background .18s ease,color .18s ease,box-shadow .18s ease,transform .18s ease}
.account-mode-tab:hover{color:var(--text)}
.account-mode-tab:active{transform:translateY(1px)}
.account-mode-tab.is-active{background:var(--surface-card);color:var(--text);box-shadow:0 2px 9px rgba(0,0,0,.06)}
.account-auth-panel[hidden]{display:none}
.account-auth-heading{margin-bottom:1rem}
.account-auth-heading h2{margin:.32rem 0 .35rem;font-size:clamp(1.7rem,4vw,2.15rem);letter-spacing:-.025em}
.account-auth-heading p{margin:0;color:var(--text-muted)}
.account-form{display:grid;gap:1rem;margin-top:1.25rem}
.account-form label{display:grid;gap:.44rem;font-size:.9rem;font-weight:700;color:var(--text)}
.account-form input{width:100%;min-height:50px;padding:.8rem .9rem;border:1px solid var(--border-strong,var(--border));border-radius:12px;background:var(--surface-input,var(--surface));color:var(--text);font:inherit;transition:border-color .18s ease,box-shadow .18s ease}
.account-form input:focus-visible{outline:none;border-color:var(--accent);box-shadow:0 0 0 3px color-mix(in srgb,var(--accent) 16%,transparent)}
.account-form small{color:var(--text-muted);font-weight:500;margin-top:-.25rem}
.account-submit{width:100%;justify-content:center;min-height:50px;margin-top:.15rem;gap:.5rem}
.account-switch-copy{margin:1.1rem 0 .1rem;text-align:center;color:var(--text-muted);font-size:.88rem}
.account-inline-switch{border:0;background:transparent;color:var(--accent);font:inherit;font-weight:800;text-decoration:underline;text-underline-offset:2px;cursor:pointer;padding:.15rem .2rem}
@media (max-width:860px){.account-shell{grid-template-columns:1fr;max-width:680px}.account-intro{text-align:center}.account-intro h1{max-width:none;font-size:clamp(2.4rem,11vw,4rem)}.account-intro>p{margin-inline:auto}.account-benefits{margin-inline:auto;text-align:left}}
@media (max-width:520px){.account-shell{padding-block:.5rem}.account-intro{padding-inline:.15rem}.account-auth-card{border-radius:18px;padding:1rem}.account-mode-switch{margin-bottom:1rem}.account-benefit{grid-template-columns:34px minmax(0,1fr)}.account-benefit-icon{width:34px;height:34px;border-radius:9px}}

/* ========================================================================
   Vocabulary cards / word pages v3 — shared entity hierarchy
   ======================================================================== */
.word-card {
  display: flex;
  min-width: 0;
  min-height: 0;
  flex-direction: column;
  gap: 14px;
  padding: 19px;
  border: 1px solid var(--line);
  border-radius: 17px;
  background: var(--surface);
  box-shadow: 0 6px 22px rgba(26,35,29,.035);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.word-card:hover { transform: translateY(-2px); border-color: var(--line-strong); box-shadow: 0 14px 30px rgba(26,35,29,.07); }
.word-card-topline { display:flex; align-items:flex-start; justify-content:space-between; gap:12px; }
.word-card-word { min-width:0; }
.word-link { display:block; font-size:clamp(23px, 2vw, 30px); font-weight:850; letter-spacing:-.04em; line-height:1.08; overflow-wrap:anywhere; }
.word-link .entity-article { color:var(--entity-article); font-weight:850; }
.word-link .entity-word { color:var(--entity-word); font-weight:900; }
.word-card-arrow { display:grid; width:30px; height:30px; flex:0 0 30px; place-items:center; border:1px solid var(--line); border-radius:9px; color:var(--muted); background:var(--surface-2); transition:transform .16s ease, color .16s ease, background .16s ease; }
.word-card:hover .word-card-arrow { transform:translate(2px,-2px); color:var(--accent); background:var(--accent-soft); }
.word-meta { display:flex; flex-wrap:wrap; align-items:center; gap:6px 8px; margin-top:8px; color:var(--muted); font-size:12px; }
.entity-pos { color:var(--entity-pos); font-weight:800; }
.entity-level { color:var(--entity-level) !important; border-color:color-mix(in srgb,var(--entity-level) 28%,var(--line)) !important; background:color-mix(in srgb,var(--entity-level) 8%,var(--surface)) !important; }
.entity-pronunciation { color:var(--entity-pronunciation); font-family:ui-monospace,SFMono-Regular,Menlo,monospace; font-size:11px; }
.word-definition { display:grid; gap:5px; padding:13px 14px; border:1px solid var(--line); border-radius:12px; background:var(--surface-quiet); }
.word-definition .definition-label { color:var(--entity-meaning); font-size:9px; font-weight:850; letter-spacing:.1em; text-transform:uppercase; }
.word-definition strong { color:var(--entity-meaning); font-size:14px; line-height:1.4; }
.entity-relations { display:grid; gap:6px; }
.entity-relation { display:grid; grid-template-columns:68px minmax(0,1fr); gap:9px; align-items:start; padding:8px 0; border-top:1px solid var(--border-subtle); }
.entity-relation span { font-size:9px; font-weight:800; text-transform:uppercase; letter-spacing:.05em; }
.entity-relation strong { min-width:0; color:var(--text-strong); font-size:11px; line-height:1.4; overflow-wrap:anywhere; }
.entity-relation-synonym span { color:var(--entity-synonym); }
.entity-relation-antonym span { color:var(--entity-antonym); }
.entity-relation-related span { color:var(--entity-related); }
.word-source { display:flex; align-items:center; justify-content:space-between; gap:10px; padding-top:4px; color:var(--muted); font-size:10px; }
.word-source > span { color:var(--entity-source); font-weight:800; text-transform:uppercase; letter-spacing:.06em; }
.word-source strong { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-weight:700; }
.search-suggestions { position:absolute; top:calc(100% + 8px); right:0; left:0; z-index:900; overflow:hidden; border:1px solid var(--line-strong); border-radius:16px; background:var(--surface); box-shadow:0 22px 50px rgba(18,29,21,.15); }
.search-suggestions-head { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:10px 13px; border-bottom:1px solid var(--line); color:var(--muted); background:var(--surface-quiet); font-size:9px; font-weight:850; letter-spacing:.06em; text-transform:uppercase; }
.search-suggestion-card { border-bottom:1px solid var(--border-subtle); }
.search-suggestion-card:last-child { border-bottom:0; }
.search-suggestion-main { display:block; min-width:0; padding:12px 14px; transition:background .14s ease; }
.search-suggestion-main:hover, .search-suggestion-main:focus-visible { background:var(--accent-wash); outline:0; }
.search-suggestion-headword { display:flex; align-items:center; justify-content:space-between; gap:12px; }
.search-suggestion-headword strong { color:var(--entity-word); font-size:17px; font-weight:900; letter-spacing:-.02em; }
.search-suggestion-headword .suggestion-article { color:var(--entity-article); font-weight:900; font-size:14px; }
.search-suggestion-arrow { color:var(--muted); font-size:17px; }
.search-suggestion-meta { margin-top:4px; color:var(--muted); font-size:10px; }
.search-suggestion-definition { display:grid; gap:2px; margin-top:8px; }
.search-suggestion-definition span { color:var(--entity-meaning); font-size:8px; font-weight:850; letter-spacing:.08em; text-transform:uppercase; }
.search-suggestion-definition strong { color:var(--entity-meaning); font-size:11px; line-height:1.35; overflow-wrap:anywhere; }
.search-suggestion-relations { display:flex; flex-wrap:wrap; gap:5px; margin-top:8px; }
.suggestion-relation { display:inline-flex; align-items:center; gap:4px; max-width:100%; padding:4px 7px; border:1px solid var(--line); border-radius:999px; background:var(--surface-2); color:var(--text-strong); font-size:9px; }
.suggestion-relation small { font-weight:850; text-transform:uppercase; }
.suggestion-relation.is-synonym small { color:var(--entity-synonym); }
.suggestion-relation.is-antonym small { color:var(--entity-antonym); }
.suggestion-relation.is-related small { color:var(--entity-related); }
.search-suggestion-source { margin-top:8px; color:var(--entity-source); font-size:9px; font-weight:750; }
.word-hero-pro { display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:end; gap:24px; margin-bottom:22px; padding:24px; border:1px solid var(--line); border-radius:20px; background:linear-gradient(135deg,var(--surface),var(--surface-quiet)); box-shadow:0 8px 28px rgba(26,35,29,.035); }
.word-hero-copy { min-width:0; }
.word-display { display:flex; align-items:baseline; gap:9px; margin-top:8px; flex-wrap:wrap; }
.word-display h1 { margin:0; color:var(--entity-word); font-size:clamp(40px,6vw,68px); }
.word-hero-article { color:var(--entity-article); font-size:clamp(24px,3vw,38px); font-weight:900; }
.word-hero-meta { display:flex; flex-wrap:wrap; gap:7px 9px; margin-top:12px; }
.word-hero-meaning { display:grid; gap:4px; max-width:720px; margin-top:16px; padding:13px 15px; border:1px solid var(--line); border-radius:13px; background:var(--surface); }
.word-hero-meaning span { color:var(--entity-meaning); font-size:9px; font-weight:850; letter-spacing:.1em; text-transform:uppercase; }
.word-hero-meaning strong { color:var(--entity-meaning); font-size:17px; line-height:1.4; }
.word-hero-share { align-self:start; }
.public-entry { padding:24px; border-radius:20px; }
.sense-title { color:var(--entity-meaning); }
.translation-chip { color:var(--entity-meaning); }
.example-block { border-left-color:var(--accent); }
@media (max-width: 780px) {
  .word-hero-pro { grid-template-columns:1fr; align-items:start; }
  .word-hero-share { justify-self:start; }
  .search-suggestion-main { padding:11px 12px; }
}
@media (max-width: 560px) {
  .word-card { padding:16px; border-radius:15px; }
  .word-card-topline { gap:8px; }
  .word-link { font-size:24px; }
  .word-definition strong { font-size:13px; }
  .entity-relation { grid-template-columns:1fr; gap:2px; }
  .word-source { align-items:flex-start; flex-direction:column; gap:2px; }
  .search-suggestions-head { padding:9px 11px; }
  .word-hero-pro { padding:18px; border-radius:17px; }
  .word-display h1 { font-size:42px; }
  .word-hero-article { font-size:24px; }
  .word-hero-meaning strong { font-size:15px; }
  .public-entry { padding:17px; border-radius:17px; }
  .share-row { justify-content:flex-start; }
  .share-chip { min-height:36px; font-size:12px; }
}
