:root {
  color-scheme: light;
  --ink: #111111;
  --muted: #686868;
  --soft: #929292;
  --line: #e5e5e5;
  --line-strong: #d2d2d2;
  --paper: #ffffff;
  --wash: #f7f7f6;
  --wash-dark: #efefee;
  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 24px;
  --shadow: 0 12px 36px rgba(0,0,0,.055);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans Thai", Tahoma, sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
* { box-sizing: border-box; }
html { min-width: 320px; scroll-behavior: smooth; background: var(--paper); }
body { margin: 0; color: var(--ink); background: var(--paper); font-size: 15px; line-height: 1.65; }
button, input, textarea, select { font: inherit; }
.icon { width: 16px; height: 16px; display: inline-block; flex: 0 0 auto; vertical-align: middle; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }
button { color: inherit; }
button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible, a:focus-visible { outline: 3px solid #888; outline-offset: 3px; }
.skip-link { position: absolute; z-index: 80; left: 12px; top: -60px; padding: 10px 14px; border-radius: 8px; background: var(--ink); color: #fff; }
.skip-link:focus { top: 12px; }
.site-header { position: sticky; z-index: 30; top: 0; background: rgba(255,255,255,.94); border-bottom: 1px solid var(--line); backdrop-filter: blur(16px); }
.header-inner { width: min(1200px, calc(100% - 48px)); height: 78px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: inline-flex; align-items: center; gap: 11px; flex: 0 0 auto; }
.brand-mark { width: 43px; height: 43px; display: grid; place-items: center; background: #111; color: #fff; border-radius: 13px; }
.brand-mark svg { width: 31px; height: 31px; }
.brand-type { display: flex; align-items: baseline; gap: 0; font-size: 25px; letter-spacing: -.075em; line-height: 1; font-weight: 760; }
.brand-period, .footer-brand span { color: #7c7c7c; }
.brand-type small { margin-left: 10px; font-size: 8px; letter-spacing: .15em; line-height: 1.2; font-weight: 700; color: #777; align-self: center; }
.main-nav { display: flex; align-items: center; gap: 28px; }
.nav-link { color: #555; font-weight: 550; font-size: 13px; transition: color .15s ease; }
.nav-link:hover { color: #000; }
.nav-cta { display: inline-flex; align-items: center; gap: 16px; min-height: 42px; padding: 0 16px; color: #fff; background: var(--ink); border: 1px solid var(--ink); border-radius: 999px; font-size: 13px; font-weight: 600; transition: transform .16s ease, background .16s ease; }
.nav-cta:hover { background: #333; transform: translateY(-1px); }
.site-main { min-height: 68vh; }
.app-shell { width: min(1200px, calc(100% - 48px)); margin: 0 auto; min-height: 540px; padding: 0 0 76px; }
.page-loading { min-height: 55vh; display: grid; align-content: center; justify-items: center; color: var(--muted); }
.loading-mark { width: 38px; height: 38px; background: var(--ink); color: #fff; display: grid; place-items: center; border-radius: 12px; font-size: 20px; font-weight: 750; animation: breathe 1.2s ease-in-out infinite alternate; }
.page-loading p { margin-top: 14px; font-size: 13px; }
@keyframes breathe { to { transform: translateY(-3px); opacity: .7; } }
.home-hero { position: relative; padding: 82px 0 57px; border-bottom: 1px solid var(--line); }
.eyebrow { display: flex; align-items: center; gap: 9px; color: #5e5e5e; text-transform: uppercase; letter-spacing: .13em; font-size: 10px; font-weight: 750; }
.eyebrow::before { content: ""; width: 21px; height: 1px; background: currentColor; }
.home-title { max-width: 850px; margin: 19px 0 18px; font-size: clamp(38px, 6.5vw, 72px); line-height: 1.08; letter-spacing: -.065em; font-weight: 760; }
.home-title .quiet { color: #909090; }
.home-intro { max-width: 620px; color: #626262; font-size: 16px; line-height: 1.9; margin: 0; }
.hero-bottom { margin-top: 37px; display: flex; align-items: end; justify-content: space-between; gap: 26px; }
.search-form { display: flex; align-items: center; width: min(550px, 100%); padding: 6px; border: 1px solid #dcdcdc; border-radius: 14px; background: #fff; box-shadow: 0 2px 8px rgba(0,0,0,.025); transition: border-color .15s ease, box-shadow .15s ease; }
.search-form:focus-within { border-color: #999; box-shadow: 0 0 0 3px rgba(0,0,0,.035); }
.search-icon { flex: 0 0 auto; width: 20px; height: 20px; margin: 0 10px 0 12px; color: #777; }
.search-form input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; padding: 12px 5px; color: var(--ink); font-size: 14px; }
.search-form input:focus { outline: 0; }
.search-form input::placeholder { color: #999; }
.search-form button { border: 0; border-radius: 10px; padding: 12px 19px; background: var(--ink); color: #fff; font-size: 13px; font-weight: 600; cursor: pointer; }
.hero-note { display: flex; flex-direction: column; text-align: right; align-items: flex-end; gap: 2px; color: #777; font-size: 11px; }
.hero-note strong { color: #191919; font-size: 13px; font-weight: 650; }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 20px; margin: 38px 0 19px; }
.section-head h2 { margin: 0; font-size: 22px; letter-spacing: -.045em; line-height: 1.3; }
.section-head p { margin: 6px 0 0; color: #777; font-size: 12px; }
.count-label { flex: 0 0 auto; color: #777; font-variant-numeric: tabular-nums; font-size: 12px; }
.dictionary-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.dictionary-card { position: relative; display: flex; flex-direction: column; min-height: 208px; padding: 22px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; overflow: hidden; transition: border-color .18s ease, transform .18s ease, box-shadow .18s ease; }
.dictionary-card:hover { border-color: #bdbdbd; transform: translateY(-2px); box-shadow: var(--shadow); }
.dict-card-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.dict-monogram { display: grid; place-items: center; width: 38px; height: 38px; background: #f0f0ef; border: 1px solid #e8e8e7; color: #222; border-radius: 12px; font-size: 16px; font-weight: 750; letter-spacing: -.06em; }
.card-open { color: #777; font-size: 18px; line-height: 1; }
.dict-card-title { margin: 18px 0 4px; font-size: 18px; letter-spacing: -.035em; line-height: 1.35; overflow-wrap: anywhere; }
.dict-card-language { margin: 0; font-size: 11px; color: #666; font-weight: 600; }
.dict-card-description { margin: 12px 0 17px; font-size: 12px; line-height: 1.7; color: #717171; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.dict-card-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; border-top: 1px solid #efefef; padding-top: 12px; margin-top: auto; color: #888; font-size: 10px; }
.dict-card-foot strong { color: #3e3e3e; font-weight: 650; }
.empty-state { text-align: center; border: 1px dashed #d7d7d7; background: #fbfbfa; border-radius: 20px; padding: 53px 22px; margin-top: 7px; }
.empty-symbol { width: 54px; height: 54px; margin: 0 auto 17px; border: 1px solid #dedede; background: #fff; border-radius: 17px; display: grid; place-items: center; }
.empty-symbol svg { width: 27px; height: 27px; }
.empty-state h3 { margin: 0 0 8px; font-size: 19px; letter-spacing: -.03em; }
.empty-state p { max-width: 490px; margin: 0 auto; color: #777; font-size: 13px; line-height: 1.85; }
.empty-state .button { margin-top: 20px; }
.info-strip { margin-top: 46px; padding: 23px 25px; border-radius: 16px; background: #f7f7f6; display: flex; align-items: center; justify-content: space-between; gap: 25px; }
.info-strip h3 { margin: 0; font-size: 14px; letter-spacing: -.02em; }
.info-strip p { margin: 5px 0 0; color: #777; font-size: 12px; }
.info-strip .text-link { flex: 0 0 auto; }
.text-link { display: inline-flex; align-items: center; gap: 7px; color: #242424; text-decoration: none; font-size: 12px; font-weight: 650; }
.text-link:hover { text-decoration: underline; text-underline-offset: 4px; }
.button { min-height: 43px; padding: 11px 16px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; border-radius: 11px; border: 1px solid #111; background: #111; color: #fff; cursor: pointer; font-size: 13px; line-height: 1.25; font-weight: 650; transition: background .15s ease, color .15s ease, transform .15s ease; }
.button:hover { background: #333; border-color: #333; }
.button:active { transform: translateY(1px); }
.button:disabled { opacity: .55; cursor: not-allowed; transform: none; }
.button-secondary { background: #fff; color: #161616; border-color: #d6d6d6; }
.button-secondary:hover { background: #f7f7f7; border-color: #bdbdbd; }
.button-quiet { background: transparent; border-color: transparent; color: #555; }
.button-quiet:hover { background: #f1f1f1; border-color: #f1f1f1; }
.button-danger { background: #fff; border-color: #d8bbbb; color: #8f2020; }
.button-danger:hover { background: #fff6f6; border-color: #bb7777; }
.button-small { min-height: 33px; padding: 7px 10px; border-radius: 9px; font-size: 11px; }
.button-block { width: 100%; }
.form-page { width: min(760px, 100%); margin: 0 auto; padding: 53px 0 10px; }
.page-kicker { color: #707070; font-size: 10px; text-transform: uppercase; letter-spacing: .14em; font-weight: 750; }
.page-title { margin: 8px 0 10px; font-size: clamp(29px, 4.4vw, 42px); line-height: 1.2; letter-spacing: -.055em; font-weight: 760; }
.page-lead { max-width: 650px; color: #686868; margin: 0; line-height: 1.85; font-size: 14px; }
.panel { background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 25px; }
.panel + .panel { margin-top: 15px; }
.panel-title { font-size: 16px; font-weight: 700; margin: 0 0 5px; letter-spacing: -.025em; }
.panel-subtitle { color: #777; font-size: 12px; margin: 0 0 19px; }
.form-stack { display: grid; gap: 16px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px; }
.field { min-width: 0; display: flex; flex-direction: column; gap: 7px; }
.field label, .field-label { font-size: 12px; color: #353535; font-weight: 650; }
.field .hint { margin-top: -3px; color: #888; font-size: 10px; line-height: 1.65; font-weight: 400; }
.field input, .field textarea, .field select, .control-input { width: 100%; min-width: 0; border: 1px solid #dcdcdc; border-radius: 10px; background: #fff; color: #111; outline: 0; padding: 11px 12px; font-size: 13px; transition: border-color .15s ease, box-shadow .15s ease; }
.field input, .field select, .control-input { min-height: 44px; }
.field textarea { min-height: 108px; resize: vertical; line-height: 1.7; }
.field input:focus, .field textarea:focus, .field select:focus, .control-input:focus { border-color: #858585; box-shadow: 0 0 0 3px rgba(0,0,0,.045); }
.field input::placeholder, .field textarea::placeholder { color: #aaa; }
.field input[type="color"] { height: 43px; padding: 4px; cursor: pointer; }
.field input[type="checkbox"] { width: 16px; height: 16px; min-height: auto; padding: 0; accent-color: #111; }
.checkbox-row { display: flex; align-items: flex-start; gap: 10px; color: #555; font-size: 12px; line-height: 1.8; }
.checkbox-row input { flex: 0 0 auto; margin: 5px 0 0; }
.form-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 3px; }
.form-error { margin: 0; padding: 11px 13px; background: #fff5f5; border: 1px solid #efd4d4; color: #8a2525; border-radius: 10px; font-size: 12px; }
.form-success { margin: 0; padding: 11px 13px; background: #f6f6f4; border: 1px solid #dfdfdc; color: #333; border-radius: 10px; font-size: 12px; }
.inline-note { font-size: 11px; color: #777; line-height: 1.7; }
.auth-layout { width: min(930px, 100%); margin: 0 auto; display: grid; grid-template-columns: .9fr 1.1fr; gap: 28px; align-items: stretch; padding-top: 58px; }
.auth-aside { min-height: 430px; border-radius: 22px; background: #111; color: #fff; padding: 30px; display: flex; flex-direction: column; justify-content: space-between; overflow: hidden; position: relative; }
.auth-aside::after { content: "AD"; position: absolute; right: -24px; bottom: -115px; font-size: 270px; font-weight: 800; line-height: 1; letter-spacing: -.1em; color: rgba(255,255,255,.055); pointer-events: none; }
.auth-aside .eyebrow { color: #c5c5c5; }
.auth-aside h1 { position: relative; z-index: 1; max-width: 330px; margin: 32px 0 13px; font-size: 35px; line-height: 1.2; letter-spacing: -.065em; }
.auth-aside p { position: relative; z-index: 1; max-width: 320px; color: #b5b5b5; margin: 0; font-size: 13px; line-height: 1.9; }
.auth-aside small { position: relative; z-index: 1; color: #aaa; font-size: 10px; letter-spacing: .05em; }
.auth-main { padding: 25px 0; }
.auth-switch { display: inline-flex; gap: 4px; padding: 4px; background: #f3f3f2; border-radius: 11px; margin: 20px 0; }
.auth-switch button { border: 0; background: transparent; color: #696969; padding: 9px 13px; border-radius: 8px; cursor: pointer; font-size: 12px; }
.auth-switch button[aria-pressed="true"] { background: #fff; color: #111; box-shadow: 0 1px 4px rgba(0,0,0,.08); font-weight: 700; }
.account-summary { display: flex; align-items: center; gap: 13px; padding: 16px; border: 1px solid var(--line); border-radius: 13px; }
.avatar { width: 43px; height: 43px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 13px; background: #111; color: #fff; font-size: 17px; font-weight: 750; }
.account-summary h3 { margin: 0; font-size: 14px; overflow-wrap: anywhere; }
.account-summary p { margin: 3px 0 0; color: #777; font-size: 11px; }
.page-toolbar { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; padding: 46px 0 23px; border-bottom: 1px solid var(--line); margin-bottom: 25px; }
.page-toolbar .page-title { margin-bottom: 8px; }
.toolbar-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.dashboard-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 12px; margin: 21px 0 31px; }
.stat-card { border: 1px solid var(--line); border-radius: 15px; padding: 19px; background: #fff; }
.stat-label { color: #777; font-size: 11px; }
.stat-number { margin-top: 6px; font-size: 28px; font-weight: 750; letter-spacing: -.06em; font-variant-numeric: tabular-nums; line-height: 1.2; }
.stat-detail { margin-top: 7px; color: #999; font-size: 10px; }
.stack-list { display: grid; gap: 10px; }
.list-row { min-width: 0; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 17px; border: 1px solid var(--line); border-radius: 13px; background: #fff; }
.list-row-main { min-width: 0; }
.list-row h3 { margin: 0; font-size: 14px; line-height: 1.5; overflow-wrap: anywhere; }
.list-row p { margin: 4px 0 0; color: #777; font-size: 11px; line-height: 1.7; overflow-wrap: anywhere; }
.list-row-actions { display: flex; flex: 0 0 auto; align-items: center; gap: 7px; flex-wrap: wrap; justify-content: flex-end; }
.status { display: inline-flex; align-items: center; gap: 6px; padding: 4px 8px; border-radius: 999px; font-size: 10px; line-height: 1.25; font-weight: 650; white-space: nowrap; background: #f1f1f0; color: #555; }
.status::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.status-published, .status-approved, .status-active, .status-resolved { background: #f0f0ee; color: #262626; }
.status-pending, .status-open, .status-reviewing { background: #f8f5ed; color: #6c582f; }
.status-rejected, .status-suspended, .status-archived, .status-dismissed { background: #f8eeee; color: #8b3939; }
.subsection { margin: 31px 0 12px; display: flex; align-items: end; justify-content: space-between; gap: 12px; }
.subsection h2 { font-size: 17px; margin: 0; letter-spacing: -.04em; }
.subsection p { font-size: 11px; color: #777; margin: 4px 0 0; }
.entry-list { border-top: 1px solid var(--line); }
.entry-row { padding: 17px 2px; display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 15px; border-bottom: 1px solid var(--line); }
.entry-term { font-size: 18px; line-height: 1.4; letter-spacing: -.025em; overflow-wrap: anywhere; }
.entry-meta { color: #838383; font-size: 10px; margin: 4px 0 7px; }
.entry-definition { color: #424242; font-size: 13px; line-height: 1.85; white-space: pre-wrap; overflow-wrap: anywhere; }
.entry-example { margin-top: 7px; color: #777; border-left: 2px solid #ddd; padding-left: 10px; font-size: 11px; white-space: pre-wrap; }
.entry-actions { display: flex; align-items: flex-start; gap: 5px; }
.tabs { display: flex; align-items: center; gap: 5px; overflow-x: auto; padding: 5px; background: #f3f3f2; border-radius: 12px; max-width: 100%; }
.tabs button { flex: 0 0 auto; border: 0; background: transparent; border-radius: 8px; color: #686868; padding: 9px 13px; font-size: 11px; font-weight: 650; cursor: pointer; }
.tabs button[aria-selected="true"] { background: #fff; color: #111; box-shadow: 0 1px 4px rgba(0,0,0,.07); }
.admin-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 15px; margin-bottom: 20px; }
.table-wrap { width: 100%; overflow-x: auto; border: 1px solid var(--line); border-radius: 13px; }
table { width: 100%; border-collapse: collapse; font-size: 12px; min-width: 680px; }
th, td { padding: 13px 14px; border-bottom: 1px solid #ededec; text-align: left; vertical-align: top; }
th { background: #f7f7f6; color: #6a6a6a; font-size: 10px; font-weight: 700; white-space: nowrap; }
tbody tr:last-child td { border-bottom: 0; }
td p { margin: 4px 0 0; color: #777; font-size: 10px; line-height: 1.6; max-width: 420px; }
.dictionary-page { --dict-bg: #fff; --dict-text: #111; --dict-accent: #111; color: var(--dict-text); background: var(--dict-bg); border-radius: 18px; padding: 0 22px 28px; overflow: hidden; }
.dictionary-page .dict-title, .dictionary-page .entry-term, .dictionary-page .entry-definition, .dictionary-page .entry-example { font-family: var(--dict-font, inherit); }
.dictionary-page .dict-search-block .search-form button { background: var(--dict-accent); border-color: var(--dict-accent); }
.dictionary-page .dict-actions > .button:not(.button-quiet) { border-color: var(--dict-accent); }
.dictionary-page .dict-actions > .button:not(.button-secondary):not(.button-quiet) { background: var(--dict-accent); }
.dict-header { padding: 39px 0 27px; border-bottom: 1px solid var(--line); }
.breadcrumb { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; color: #888; font-size: 11px; margin-bottom: 20px; }
.breadcrumb a:hover { color: #111; }
.dict-header-main { display: flex; justify-content: space-between; align-items: flex-end; gap: 25px; }
.dict-title { margin: 0; font-size: clamp(34px, 5.2vw, 58px); line-height: 1.1; letter-spacing: -.065em; overflow-wrap: anywhere; }
.dict-language { margin: 9px 0 0; color: #6e6e6e; font-size: 12px; font-weight: 600; }
.dict-description { max-width: 700px; color: #777; font-size: 13px; line-height: 1.85; margin: 14px 0 0; white-space: pre-wrap; }
.dict-actions { display: flex; justify-content: flex-end; gap: 7px; flex-wrap: wrap; flex: 0 0 auto; }
.dict-search-block { padding: 29px 0 0; }
.dict-search-block .search-form { width: 100%; max-width: 720px; }
.dict-results-head { display: flex; align-items: baseline; justify-content: space-between; gap: 14px; margin: 28px 0 12px; }
.dict-results-head h2 { font-size: 17px; letter-spacing: -.035em; margin: 0; }
.dict-results-head span { color: #858585; font-size: 11px; }
.dict-template-editorial .entry-row { padding: 23px 0; }
.dict-template-editorial .entry-term { font-family: var(--dict-font, inherit); font-size: 23px; }
.dict-template-compact .entry-row { padding: 11px 2px; }
.dict-template-compact .entry-term { font-size: 15px; }
.dict-template-compact .entry-definition { font-size: 12px; }
.custom-html-frame { width: 100%; height: 260px; display: block; border: 1px solid var(--line); border-radius: 16px; margin: 25px 0 0; background: #fff; }
.dictionary-empty { padding: 40px 10px; text-align: center; color: #777; font-size: 12px; }
.dictionary-empty strong { display: block; color: #292929; font-size: 14px; margin-bottom: 5px; }
.notice-bar { margin-top: 19px; border: 1px solid #e6e6e6; border-radius: 12px; padding: 12px 15px; color: #666; background: #fafafa; font-size: 11px; }
.rule-panel { display: grid; gap: 12px; margin: 20px 0 0; }
.rule-item { padding: 13px 0; border-top: 1px solid #ededed; }
.rule-item h3 { margin: 0 0 5px; font-size: 13px; }
.rule-item p { margin: 0; font-size: 12px; color: #686868; line-height: 1.8; }
.terms-content { margin-top: 25px; }
.terms-content h2 { margin: 29px 0 8px; font-size: 18px; letter-spacing: -.04em; }
.terms-content h3 { font-size: 14px; margin: 19px 0 5px; }
.terms-content p, .terms-content li { color: #555; font-size: 13px; line-height: 1.95; }
.terms-content ol, .terms-content ul { padding-left: 23px; }
.legal-date { margin-top: 18px; padding: 14px; background: #f7f7f6; border-radius: 10px; color: #666; font-size: 11px; }
.site-footer { background: #f8f8f7; border-top: 1px solid var(--line); }
.footer-inner { width: min(1200px, calc(100% - 48px)); margin: 0 auto; padding: 29px 0 24px; display: grid; grid-template-columns: auto 1fr auto; grid-template-rows: auto auto; align-items: center; gap: 13px 25px; }
.footer-brand { font-size: 17px; font-weight: 800; letter-spacing: -.07em; }
.footer-inner p { margin: 0; color: #858585; font-size: 10px; }
.footer-inner nav { display: flex; gap: 15px; flex-wrap: wrap; font-size: 10px; color: #676767; }
.footer-inner nav a:hover { color: #111; }
.footer-inner small { grid-column: 1 / -1; border-top: 1px solid #e7e7e6; padding-top: 14px; color: #929292; font-size: 9px; }
.toast-region { position: fixed; z-index: 100; bottom: max(20px, env(safe-area-inset-bottom)); right: max(20px, env(safe-area-inset-right)); width: min(360px, calc(100% - 32px)); display: grid; gap: 8px; pointer-events: none; }
.toast { padding: 13px 15px; background: #111; border: 1px solid #333; color: #fff; border-radius: 12px; box-shadow: 0 10px 40px rgba(0,0,0,.17); font-size: 12px; line-height: 1.6; animation: toast-in .18s ease-out; }
.toast.error { background: #fff; color: #842626; border-color: #e6caca; }
@keyframes toast-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }
.modal-backdrop { position: fixed; z-index: 90; inset: 0; padding: 20px; background: rgba(0,0,0,.42); display: grid; place-items: center; }
.modal { width: min(520px, 100%); max-height: min(85vh, 720px); overflow-y: auto; border-radius: 18px; border: 1px solid #ddd; background: #fff; box-shadow: 0 20px 70px rgba(0,0,0,.2); padding: 23px; }
.modal-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 15px; margin-bottom: 18px; }
.modal-head h2 { margin: 0; font-size: 20px; letter-spacing: -.04em; }
.modal-close { width: 32px; height: 32px; flex: 0 0 auto; border: 1px solid #ddd; background: #fff; border-radius: 9px; cursor: pointer; font-size: 18px; line-height: 1; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.hidden { display: none !important; }
@media (max-width: 900px) {
  .dictionary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .auth-layout { width: min(740px,100%); grid-template-columns: .8fr 1.2fr; gap: 20px; }
  .auth-aside { padding: 24px; }
  .auth-aside h1 { font-size: 29px; }
  .dict-header-main { align-items: flex-start; flex-direction: column; }
  .dict-actions { justify-content: flex-start; }
  .footer-inner { grid-template-columns: auto 1fr; }
  .footer-inner nav { grid-column: 1/-1; }
  .footer-inner small { grid-column: 1/-1; }
}
@media (max-width: 640px) {
  .header-inner { width: calc(100% - 30px); height: 66px; gap: 10px; }
  .brand { gap: 8px; }
  .brand-mark { width: 36px; height: 36px; border-radius: 11px; }
  .brand-mark svg { width: 27px; height: 27px; }
  .brand-type { font-size: 22px; }
  .brand-type small { display: none; }
  .main-nav { gap: 10px; }
  .main-nav .nav-link { display: none; }
  .nav-cta { padding: 0 12px; min-height: 38px; font-size: 11px; gap: 8px; }
  .app-shell { width: calc(100% - 30px); padding-bottom: 53px; }
  .home-hero { padding: 53px 0 31px; }
  .home-title { font-size: clamp(38px, 11vw, 56px); margin-top: 15px; }
  .home-intro { font-size: 13px; line-height: 1.9; }
  .hero-bottom { margin-top: 25px; align-items: stretch; flex-direction: column; gap: 13px; }
  .hero-note { align-items: flex-start; text-align: left; }
  .search-form { border-radius: 12px; }
  .search-form input { padding: 10px 2px; font-size: 12px; }
  .search-form button { padding: 11px 12px; font-size: 11px; }
  .section-head { margin: 29px 0 14px; align-items: flex-start; }
  .section-head h2 { font-size: 19px; }
  .dictionary-grid { grid-template-columns: 1fr; gap: 10px; }
  .dictionary-card { min-height: 180px; padding: 18px; }
  .dict-card-title { margin-top: 14px; }
  .empty-state { padding: 38px 17px; }
  .info-strip { padding: 19px; align-items: flex-start; flex-direction: column; gap: 12px; margin-top: 29px; }
  .form-page { padding-top: 35px; }
  .page-title { font-size: 32px; }
  .page-lead { font-size: 12px; }
  .panel { padding: 19px; border-radius: 15px; }
  .form-grid { grid-template-columns: 1fr; gap: 14px; }
  .auth-layout { display: flex; flex-direction: column; padding-top: 28px; gap: 12px; }
  .auth-aside { min-height: 245px; padding: 22px; border-radius: 18px; }
  .auth-aside h1 { font-size: 27px; margin: 21px 0 8px; }
  .auth-aside p { font-size: 11px; }
  .auth-aside small { margin-top: 22px; }
  .auth-aside::after { font-size: 180px; right: -14px; bottom: -75px; }
  .auth-main { padding: 14px 0 0; }
  .page-toolbar { padding-top: 33px; flex-direction: column; align-items: stretch; gap: 14px; }
  .toolbar-actions { justify-content: flex-start; }
  .dashboard-grid { grid-template-columns: repeat(2, minmax(0,1fr)); gap: 8px; margin: 16px 0 25px; }
  .stat-card { padding: 14px; }
  .stat-number { font-size: 25px; }
  .list-row { padding: 14px; align-items: flex-start; flex-direction: column; gap: 10px; }
  .list-row-actions { justify-content: flex-start; width: 100%; }
  .entry-row { grid-template-columns: 1fr; gap: 9px; }
  .entry-actions { justify-content: flex-start; }
  .dictionary-page { padding: 0 13px 22px; border-radius: 14px; }
  .dict-header { padding-top: 28px; }
  .dict-title { font-size: 39px; }
  .dict-actions .button { flex: 1 1 auto; }
  .dict-search-block { padding-top: 22px; }
  .custom-html-frame { height: 220px; }
  .footer-inner { width: calc(100% - 30px); padding: 23px 0 19px; display: flex; flex-wrap: wrap; gap: 10px 16px; }
  .footer-inner p { flex-basis: calc(100% - 100px); }
  .footer-inner nav { width: 100%; gap: 14px; }
  .footer-inner small { width: 100%; }
  .toast-region { bottom: max(12px,env(safe-area-inset-bottom)); right: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}


/* AniDic refined interface — calm system typography, clearer hierarchy and more generous spacing. */
:root {
  --ink:#1d1d1f; --muted:#6e6e73; --soft:#86868b; --line:#e5e5ea; --line-strong:#d2d2d7;
  --paper:#f5f5f7; --wash:#f5f5f7; --wash-dark:#ebebf0; --radius-sm:12px; --radius:20px; --radius-lg:28px;
  --shadow:0 8px 30px rgba(0,0,0,.045);
  font-family:-apple-system,BlinkMacSystemFont,"SF Pro Text","SF Pro Display","Segoe UI","Noto Sans Thai",Tahoma,sans-serif;
  -webkit-font-smoothing:antialiased; text-rendering:optimizeLegibility;
}
body { background:var(--paper); color:var(--ink); font-size:15px; line-height:1.7; }
.site-header { background:rgba(255,255,255,.86); border-bottom-color:rgba(0,0,0,.075); }
.header-inner { width:min(1160px,calc(100% - 64px)); height:72px; }
.brand-mark { background:#1d1d1f; border-radius:14px; }
.brand-type { letter-spacing:-.055em; }
.main-nav { gap:25px; }
.nav-link { font-size:14px; color:#5c5c60; }
.nav-cta { background:#1d1d1f; border-color:#1d1d1f; border-radius:14px; min-height:43px; padding:0 17px; }
.app-shell { width:min(1160px,calc(100% - 64px)); padding-bottom:88px; }
.home-hero { padding:88px 0 64px; }
.home-title { letter-spacing:-.055em; line-height:1.08; }
.search-form { border-radius:16px; padding:6px; border-color:#dedee3; box-shadow:0 2px 6px rgba(0,0,0,.02); }
.search-form button { border-radius:12px; }
.dictionary-grid { gap:18px; }
.dictionary-card { border:1px solid rgba(0,0,0,.055); border-radius:23px; padding:26px; box-shadow:0 3px 12px rgba(0,0,0,.018); }
.dictionary-card:hover { border-color:#d0d0d5; transform:translateY(-2px); box-shadow:0 12px 30px rgba(0,0,0,.055); }
.dict-monogram { border-radius:14px; border:0; background:#f0f0f4; }
.empty-state { background:#fff; border:1px solid #e8e8ed; border-radius:24px; padding:60px 25px; }
.button { min-height:46px; padding:12px 18px; border-radius:14px; border-color:#1d1d1f; background:#1d1d1f; font-size:14px; font-weight:600; }
.button:hover { background:#3a3a3c; border-color:#3a3a3c; }
.button-secondary { color:#1d1d1f; border-color:#dedee3; background:#fff; }
.button-secondary:hover { background:#f5f5f7; border-color:#ceced3; }
.button-quiet { background:transparent; border-color:transparent; color:#626267; }
.button-small { min-height:36px; padding:8px 12px; border-radius:11px; font-size:12px; }
.panel { border:1px solid rgba(0,0,0,.055); border-radius:24px; padding:clamp(22px,3vw,32px); box-shadow:0 4px 20px rgba(0,0,0,.025); }
.panel + .panel { margin-top:20px; }
.panel-title { font-size:20px; letter-spacing:-.035em; font-weight:680; line-height:1.35; }
.panel-subtitle { color:var(--muted); font-size:13px; line-height:1.7; margin-top:7px; margin-bottom:24px; }
.form-stack { gap:22px; }
.form-grid { gap:20px; }
.field label { display:block; font-size:13px; font-weight:640; color:#36363a; margin-bottom:9px; }
.field input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="color"]):not([type="hidden"]), .field textarea, .field select,
input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="color"]):not([type="hidden"]), textarea, select { border-radius:14px; border-color:#d8d8df; background:#fff; padding:13px 15px; font-size:14px; line-height:1.6; }
.field input:focus, .field textarea:focus, .field select:focus, input:focus-visible, textarea:focus-visible, select:focus-visible { outline:3px solid rgba(0,122,255,.17); border-color:#007aff; }
.field textarea { min-height:115px; resize:vertical; }
.hint, .inline-note { color:#77777d; font-size:12px; line-height:1.75; }
.page-toolbar { padding:55px 0 28px; gap:28px; }
.page-kicker { color:#77777d; font-size:11px; letter-spacing:.09em; text-transform:uppercase; }
.page-title { letter-spacing:-.055em; line-height:1.14; font-size:clamp(32px,4vw,46px); }
.page-lead { font-size:14px; color:#67676c; line-height:1.8; }
.subsection { margin:48px 0 20px; }
.subsection h2 { font-size:23px; letter-spacing:-.035em; }
.list-row { padding:18px 20px; border-radius:16px; border-color:#e8e8ed; }
.stat-card { border-radius:21px; padding:24px; border-color:rgba(0,0,0,.055); box-shadow:0 3px 16px rgba(0,0,0,.025); }
.entry-row { grid-template-columns:minmax(0,1fr) auto; gap:20px; padding:23px 0; }
.entry-term { font-size:20px; letter-spacing:-.025em; }
.entry-definition { font-size:14px; line-height:1.85; overflow-wrap:anywhere; }
.entry-meta { font-size:12px; }
.dictionary-page { border:1px solid rgba(0,0,0,.045); border-radius:24px; padding:0 clamp(18px,4vw,44px) 32px; }
.dict-header { padding:46px 0 32px; }
.dict-title { letter-spacing:-.055em; line-height:1.12; }
.dict-description { color:#626267; font-size:14px; }
.dict-results-head { margin:36px 0 15px; }
.dict-results-head h2 { font-size:21px; }
.notice-bar { border-radius:15px; padding:14px 17px; font-size:12px; line-height:1.7; }
.site-footer { background:#f5f5f7; border-top-color:#e4e4e9; }
.footer-inner { width:min(1160px,calc(100% - 64px)); padding:34px 0 25px; }

.import-section-head { display:flex; align-items:flex-start; justify-content:space-between; gap:18px; margin-bottom:22px; }
.import-section-head .panel-subtitle { margin-bottom:0; max-width:650px; }
.section-eyebrow { display:block; margin-bottom:9px; color:#86868b; font-size:10px; font-weight:750; letter-spacing:.14em; }
.import-icon { display:grid; place-items:center; width:46px; height:46px; flex:0 0 auto; color:#1d1d1f; background:#f1f1f5; border-radius:16px; }
.import-icon .icon { width:21px; height:21px; }
.bulk-entry-panel, .csv-import-panel { margin-top:20px !important; }
.bulk-entry-panel textarea { min-height:260px; font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace; font-size:13px; line-height:1.9; }
.bulk-entry-panel .form-actions, .csv-import-panel .form-actions { margin-top:20px; }
.bulk-preview-card { margin-top:20px; padding:18px; border:1px solid #e7e7ed; border-radius:18px; background:#fbfbfd; }
.import-preview-head { display:flex; align-items:flex-start; justify-content:space-between; gap:15px; margin-bottom:15px; }
.import-preview-head strong { display:block; font-size:14px; font-weight:680; }
.import-preview-head span { display:block; margin-top:4px; color:#77777d; font-size:12px; line-height:1.7; }
.preview-count { flex:0 0 auto; padding:5px 9px; border-radius:999px; background:#ececf1; color:#515157 !important; font-size:11px !important; }
.bulk-preview-list { display:grid; gap:0; }
.bulk-preview-item { display:grid; grid-template-columns:30px minmax(0,1fr); gap:11px; padding:13px 0; border-top:1px solid #e8e8ed; }
.bulk-index { display:grid; place-items:center; height:26px; width:26px; border-radius:9px; background:#eeeef3; color:#65656c; font-size:11px; font-weight:700; }
.bulk-preview-item strong { font-size:14px; overflow-wrap:anywhere; }
.bulk-preview-item p { margin:4px 0 0; font-size:13px; color:#626267; white-space:pre-wrap; overflow-wrap:anywhere; }
.pos-tag { display:inline-block; margin:0 4px 3px 0; padding:2px 7px; border-radius:6px; background:#e8f2ff; color:#1256a0; font-size:11px; }
.import-issues { margin-top:14px; padding:13px 15px; border-radius:13px; background:#fff4e8; color:#7a4a18; font-size:12px; }
.import-issues p { margin:5px 0 0; }
.csv-mapping-intro { margin:20px 0 12px; padding:16px 18px; border:1px solid #e8e8ed; border-radius:16px; background:#fbfbfd; }
.csv-mapping-intro strong { display:block; font-size:14px; font-weight:680; }
.csv-mapping-intro p,.csv-mapping-footnote p { margin:6px 0 0; color:#66666d; font-size:12px; line-height:1.75; }
.csv-map-table-wrap { max-width:100%; overflow:auto; border:1px solid #e8e8ed; border-radius:16px; background:#fff; }
.csv-map-table { width:100%; min-width:640px; border-collapse:separate; border-spacing:0; font-size:13px; }
.csv-map-table th { padding:12px 14px; background:#f6f6f8; color:#6a6a72; font-size:11px; font-weight:650; text-align:left; white-space:nowrap; }
.csv-map-table td { padding:12px 14px; border-top:1px solid #ededf1; vertical-align:middle; }
.csv-map-table td:first-child { min-width:150px; }
.csv-map-table td:first-child strong { display:block; max-width:220px; overflow-wrap:anywhere; font-size:13px; }
.csv-map-table td:first-child span { display:block; margin-top:3px; color:#8a8a92; font-size:11px; }
.csv-map-table select { width:100%; min-width:190px; min-height:42px; }
.csv-cell-sample { max-width:280px; color:#606067; overflow-wrap:anywhere; font-size:12px; line-height:1.6; }
.csv-mapping-footnote { margin:12px 0 18px; padding:14px 16px; border-radius:14px; background:#f7f7fa; }
.csv-mapping-footnote strong { font-size:12px; font-weight:680; }
.csv-preview-table-wrap { overflow:auto; max-width:100%; border:1px solid #e8e8ed; border-radius:14px; background:#fff; }
.csv-preview-table-wrap { overflow:auto; max-width:100%; border:1px solid #e8e8ed; border-radius:14px; background:#fff; }
.csv-preview-table { min-width:560px; font-size:12px; }
.csv-preview-table th { background:#f5f5f7; font-size:11px; }
.csv-preview-table td { font-size:12px; color:#55555b; max-width:280px; overflow-wrap:anywhere; }
#csv-file { width:100%; min-height:48px; padding:10px; border:1px dashed #c9c9d2; border-radius:14px; background:#fbfbfd; }

@media (max-width:900px) {
 .header-inner,.app-shell,.footer-inner { width:calc(100% - 40px); }
 .home-hero { padding-top:64px; }
 .dictionary-card { padding:22px; }
 .page-toolbar { padding-top:42px; }
}
@media (max-width:640px) {
 .header-inner,.app-shell,.footer-inner { width:calc(100% - 30px); }
 .home-hero { padding:48px 0 35px; }
 .home-title { letter-spacing:-.045em; }
 .panel { padding:20px; border-radius:21px; }
 .panel-title { font-size:19px; }
 .panel-subtitle { margin-bottom:19px; }
 .subsection { margin-top:36px; }
 .page-toolbar { padding-top:31px; }
 .page-title { font-size:32px; }
 .toolbar-actions { gap:8px; }
 .toolbar-actions .button { flex:0 1 auto; }
 .entry-row { grid-template-columns:1fr; gap:10px; }
 .entry-actions { justify-content:flex-start; }
 .dictionary-page { padding:0 15px 22px; border-radius:19px; }
 .dict-header { padding-top:30px; }
 .dict-title { font-size:clamp(32px,9vw,42px); }
 .import-section-head { gap:12px; }
 .import-icon { width:40px; height:40px; border-radius:14px; }
 .csv-map-table { min-width:600px; }
 .csv-map-table td,.csv-map-table th { padding:10px 11px; }
 .csv-mapping-intro { padding:14px; }
 .bulk-entry-panel textarea { min-height:230px; }
 .bulk-entry-panel .form-actions, .csv-import-panel .form-actions { display:grid; grid-template-columns:1fr; }
 .bulk-entry-panel .form-actions .button, .csv-import-panel .form-actions .button { width:100%; }
 .bulk-preview-card { padding:14px; }
 .import-preview-head { align-items:flex-start; }
 .preview-count { white-space:nowrap; }
}

/* AniDic 1.3 — application-first visual system: quiet, spacious, readable. */
:root {
  --ink: #202124;
  --muted: #6b7077;
  --soft: #8a9098;
  --line: #e6e8eb;
  --line-strong: #d5d9de;
  --paper: #f7f8fa;
  --wash: #f3f5f7;
  --wash-dark: #e9edf1;
  --accent: #16785a;
  --accent-hover: #116749;
  --accent-wash: #eaf5ef;
  --radius-sm: 12px;
  --radius: 18px;
  --radius-lg: 24px;
  --shadow: 0 10px 32px rgba(28, 38, 33, .055);
  font-family: 'Kanit', -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Segoe UI', 'Leelawadee UI', Tahoma, sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
html { background: var(--paper); }
body { color: var(--ink); background: var(--paper); font-size: 15px; line-height: 1.72; font-weight: 400; }
button, input, textarea, select { font-family: inherit; }
a { text-decoration-thickness: 1px; text-underline-offset: 3px; }
button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible, a:focus-visible { outline: 3px solid rgba(22,120,90,.3); outline-offset: 3px; }
.site-header { background: rgba(255,255,255,.9); border-bottom: 1px solid rgba(222,226,231,.9); backdrop-filter: blur(22px) saturate(170%); -webkit-backdrop-filter: blur(22px) saturate(170%); }
.header-inner { width: min(1120px, calc(100% - 56px)); height: 70px; gap: 20px; }
.brand { gap: 10px; }
.brand-mark { width: 37px; height: 37px; border-radius: 12px; background: var(--accent); color: #fff; }
.brand-mark svg { width: 27px; height: 27px; }
.brand-type { font-size: 23px; font-weight: 600; letter-spacing: -.04em; }
.brand-period, .footer-brand span { color: var(--accent); }
.brand-type small { color: #8a9098; font-size: 8px; letter-spacing: .12em; font-weight: 500; }
.main-nav { gap: 24px; }
.nav-link { color: #5e646b; font-size: 13px; font-weight: 400; }
.nav-link:hover { color: var(--accent); }
.nav-cta { min-height: 40px; padding: 0 16px; gap: 9px; border: 1px solid var(--accent); background: var(--accent); border-radius: 999px; font-size: 13px; font-weight: 500; }
.nav-cta:hover { background: var(--accent-hover); border-color: var(--accent-hover); transform: none; }
.site-main { min-height: 65vh; }
.app-shell { width: min(1040px, calc(100% - 56px)); min-height: 56vh; padding: 0 0 76px; }
.page-loading { min-height: 34vh; color: var(--muted); }
.loading-mark { width: 38px; height: 38px; border-radius: 13px; background: var(--accent); font-size: 17px; font-weight: 500; }
.page-loading p { margin-top: 12px; font-size: 13px; }

/* Home behaves like a dictionary app, not a promotional landing page. */
.home-hero.app-home-hero { display: grid; grid-template-columns: minmax(0, .85fr) minmax(340px, 1.15fr); align-items: center; gap: clamp(24px, 4vw, 56px); padding: 50px 0 33px; border-bottom: 1px solid var(--line); }
.home-heading { min-width: 0; }
.eyebrow { display: flex; align-items: center; gap: 8px; color: #858b92; font-size: 10px; font-weight: 500; letter-spacing: .12em; }
.eyebrow::before { display: none; }
.home-title { max-width: 650px; margin: 9px 0 9px; color: var(--ink); font-size: clamp(32px, 4vw, 43px); font-weight: 500; line-height: 1.25; letter-spacing: -.025em; }
.home-title .quiet { color: var(--muted); }
.home-intro { max-width: 420px; margin: 0; color: var(--muted); font-size: 14px; line-height: 1.85; }
.home-hero .home-search { width: 100%; max-width: 620px; min-height: 58px; align-self: center; margin: 0; padding: 6px; border: 1px solid #dfe3e7; border-radius: 17px; background: #fff; box-shadow: 0 4px 14px rgba(31,45,38,.035); }
.search-form:focus-within { border-color: #9dbcae; box-shadow: 0 0 0 4px rgba(22,120,90,.09); }
.search-form .icon { width: 19px; height: 19px; margin: 0 11px 0 13px; color: #80878e; }
.search-form input { font-size: 14px; padding: 12px 4px; font-weight: 400; }
.search-form input::placeholder { color: #9a9fa5; }
.search-form button { min-height: 43px; padding: 10px 19px; border-radius: 12px; background: var(--accent); font-size: 13px; font-weight: 500; }
.search-form button:hover { background: var(--accent-hover); }
.dictionary-discover { padding-top: 5px; }
.section-head { align-items: center; margin: 31px 0 18px; gap: 20px; }
.section-head h2 { color: var(--ink); font-size: 21px; font-weight: 500; letter-spacing: -.015em; line-height: 1.4; }
.section-head p { margin: 4px 0 0; color: var(--muted); font-size: 12px; line-height: 1.7; }
.count-label { color: #858b92; font-size: 12px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.dictionary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px; }
.dictionary-card { min-height: 180px; padding: 22px 23px 19px; border: 1px solid #e6e9ec; border-radius: 19px; background: #fff; box-shadow: none; }
.dictionary-card:hover { transform: translateY(-1px); border-color: #c8d8d0; box-shadow: 0 8px 22px rgba(36,68,53,.055); }
.dict-card-top { gap: 12px; }
.dict-monogram { width: 38px; height: 38px; border: 1px solid #dcebe3; background: var(--accent-wash); color: var(--accent); border-radius: 13px; font-size: 15px; font-weight: 500; }
.card-open { color: #9aa0a6; font-size: 16px; }
.dict-card-title { margin: 15px 0 3px; font-size: 18px; font-weight: 500; letter-spacing: -.015em; line-height: 1.42; }
.dict-card-language { font-size: 12px; color: #747a81; font-weight: 400; }
.dict-card-description { margin: 10px 0 15px; font-size: 13px; line-height: 1.8; color: #666d74; -webkit-line-clamp: 2; }
.dict-card-foot { padding-top: 12px; border-top: 1px solid #edf0f2; color: #878d94; font-size: 11px; }
.dict-card-foot strong { color: #3f4744; font-weight: 500; }
.empty-state { margin-top: 8px; padding: 48px 24px; border: 1px solid #e6e9ec; border-radius: 22px; background: #fff; }
.empty-symbol { width: 48px; height: 48px; margin-bottom: 15px; border-color: #dcebe3; background: var(--accent-wash); color: var(--accent); border-radius: 15px; }
.empty-symbol .icon { width: 23px; height: 23px; }
.empty-state h3 { margin-bottom: 7px; font-size: 18px; font-weight: 500; letter-spacing: -.01em; }
.empty-state p { color: var(--muted); font-size: 13px; line-height: 1.9; }
.pagination-actions { justify-content: center; margin: 24px 0 0 !important; }

/* Shared application components */
.button { min-height: 44px; padding: 11px 17px; gap: 8px; border-radius: 13px; border-color: var(--accent); background: var(--accent); font-size: 13px; font-weight: 500; box-shadow: none; }
.button:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.button:active { transform: scale(.99); }
.button-secondary { border-color: #dce1e5; background: #fff; color: #30363b; }
.button-secondary:hover { border-color: #c8d6ce; background: #f5faf7; color: var(--accent); }
.button-quiet { color: #5f666d; background: transparent; border-color: transparent; }
.button-quiet:hover { color: var(--accent); background: var(--accent-wash); border-color: var(--accent-wash); }
.button-danger { color: #9b3131; border-color: #efd7d7; background: #fff; }
.button-danger:hover { color: #8c2525; border-color: #e7c3c3; background: #fff7f7; }
.button-small { min-height: 36px; padding: 8px 12px; border-radius: 11px; font-size: 12px; }
.panel { border: 1px solid #e4e8eb; border-radius: 22px; padding: clamp(22px, 3vw, 31px); background: #fff; box-shadow: 0 2px 8px rgba(31,45,38,.018); }
.panel + .panel { margin-top: 18px; }
.panel-title { font-size: 21px; font-weight: 500; line-height: 1.4; letter-spacing: -.018em; }
.panel-subtitle { margin-top: 7px; margin-bottom: 23px; color: var(--muted); font-size: 13px; line-height: 1.85; }
.form-stack { gap: 23px; }
.form-grid { gap: 19px; }
.field label { margin-bottom: 8px; color: #333a3f; font-size: 13px; font-weight: 500; }
.field input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="color"]):not([type="hidden"]),
.field textarea, .field select,
input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="color"]):not([type="hidden"]), textarea, select {
  border: 1px solid #dce1e5; border-radius: 13px; background: #fff; color: var(--ink); padding: 13px 15px; font-size: 14px; line-height: 1.65;
}
.field input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="color"]):not([type="hidden"]),
.field select, input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="color"]):not([type="hidden"]), select { min-height: 48px; }
.field textarea, textarea { min-height: 120px; resize: vertical; }
.field input:focus, .field textarea:focus, .field select:focus, input:focus-visible, textarea:focus-visible, select:focus-visible { outline: 3px solid rgba(22,120,90,.12); border-color: #72a68f; }
.hint, .inline-note { color: #737b82; font-size: 12px; line-height: 1.85; }
.page-kicker { color: #818890; font-size: 10px; font-weight: 500; letter-spacing: .11em; }
.page-title { margin: 7px 0 11px; font-size: clamp(29px, 4vw, 42px); font-weight: 500; line-height: 1.27; letter-spacing: -.025em; }
.page-lead { color: #697179; font-size: 14px; line-height: 1.95; }
.page-toolbar { padding: 43px 0 25px; gap: 24px; }
.subsection { margin: 39px 0 17px; }
.subsection h2 { font-size: 21px; font-weight: 500; letter-spacing: -.012em; }
.subsection p { font-size: 12px; color: var(--muted); line-height: 1.75; }
.stack-list { gap: 12px; }
.list-row { align-items: center; gap: 18px; padding: 19px 21px; border: 1px solid #e5e9ec; border-radius: 17px; background: #fff; }
.list-row h3 { font-size: 14px; font-weight: 500; line-height: 1.6; }
.list-row p { font-size: 12px; color: #747b82; line-height: 1.8; }
.status { padding: 5px 9px; font-size: 11px; font-weight: 400; background: #f0f3f1; }
.status::before { width: 6px; height: 6px; }
.dashboard-grid { gap: 14px; margin: 20px 0 26px; }
.stat-card { padding: 22px; border: 1px solid #e5e9ec; border-radius: 19px; background: #fff; box-shadow: none; }
.stat-label { font-size: 12px; color: #6e767c; }
.stat-number { margin-top: 7px; color: var(--ink); font-size: 29px; font-weight: 500; letter-spacing: -.025em; }
.stat-detail { margin-top: 6px; color: #8a9096; font-size: 11px; }
.entry-list { border-top: 1px solid var(--line); }
.entry-row { gap: 18px; padding: 24px 4px; border-bottom: 1px solid #e9ecef; }
.entry-term { color: #202724; font-size: 21px; line-height: 1.5; letter-spacing: -.015em; font-weight: 500; }
.entry-meta { color: #818990; font-size: 12px; line-height: 1.7; }
.entry-definition { color: #424a50; font-size: 14px; line-height: 1.95; }
.entry-example { color: #6e777e; border-left: 2px solid #cbded3; padding-left: 13px; font-size: 13px; line-height: 1.85; }
.tabs { padding: 5px; gap: 5px; border-radius: 15px; background: #eef1f3; }
.tabs button { padding: 10px 14px; border-radius: 11px; font-size: 12px; font-weight: 400; }
.tabs button[aria-selected="true"] { color: var(--accent); background: #fff; box-shadow: 0 1px 3px rgba(30,45,38,.08); }
.table-wrap, .csv-map-table-wrap, .csv-preview-table-wrap { border-color: #e4e8eb; border-radius: 16px; background: #fff; }
table { font-size: 13px; }
th, td { padding: 14px 15px; border-bottom-color: #edf0f2; }
th { background: #f7f9fa; color: #687078; font-size: 11px; font-weight: 500; }

/* Dictionary reading is the core product: give entries room to breathe. */
.dictionary-page { max-width: 100%; margin: 25px auto 0; padding: 0 clamp(18px, 3.4vw, 36px) 32px; border: 1px solid #e5e9ec; border-radius: 23px; background: #fff; box-shadow: 0 3px 18px rgba(31,45,38,.02); }
.dict-header { padding: 35px 0 25px; border-bottom: 1px solid #e9ecef; }
.breadcrumb { margin-bottom: 17px; color: #899098; font-size: 12px; }
.breadcrumb a:hover { color: var(--accent); }
.dict-header-main { align-items: flex-end; gap: 22px; }
.dict-title { color: var(--dict-text); font-size: clamp(32px, 4vw, 49px); line-height: 1.2; font-weight: 500; letter-spacing: -.025em; }
.dict-language { margin-top: 8px; color: #737b82; font-size: 13px; font-weight: 400; }
.dict-description { margin-top: 13px; color: #5f686f; font-size: 14px; line-height: 1.9; }
.dict-actions { gap: 8px; }
.dict-actions .button { min-height: 40px; }
.dict-search-block { padding-top: 25px; }
.dict-search-block .search-form { max-width: 760px; }
.dict-results-head { margin: 31px 0 13px; }
.dict-results-head h2 { font-size: 21px; font-weight: 500; }
.dict-results-head span { color: #858c93; font-size: 12px; }
.dict-template-editorial .entry-row { padding: 26px 0; }
.dict-template-editorial .entry-term { font-size: 24px; }
.dict-template-compact .entry-row { padding: 17px 2px; }
.dict-template-compact .entry-term { font-size: 17px; }
.dict-template-compact .entry-definition { font-size: 13px; }
.dictionary-empty { padding: 42px 10px; color: #737b82; font-size: 13px; line-height: 1.85; }
.dictionary-empty strong { margin-bottom: 7px; color: #323a3f; font-size: 16px; font-weight: 500; }
.notice-bar { margin-top: 22px; padding: 13px 16px; border: 1px solid #e5e9ec; border-radius: 14px; background: #f8faf9; color: #6e777d; font-size: 12px; line-height: 1.8; }

/* Bulk tools should feel like focused workflows, with one clear step at a time. */
.import-section-head { gap: 20px; margin-bottom: 24px; }
.import-section-head .panel-subtitle { margin-bottom: 0; max-width: 650px; }
.section-eyebrow { margin-bottom: 7px; color: #879088; font-size: 10px; font-weight: 500; letter-spacing: .12em; }
.import-icon { width: 44px; height: 44px; border-radius: 15px; color: var(--accent); background: var(--accent-wash); }
.import-icon .icon { width: 21px; height: 21px; }
.bulk-entry-panel, .csv-import-panel { margin-top: 19px !important; }
.bulk-entry-panel textarea { min-height: 250px; border-radius: 15px; font-family: 'Kanit', ui-sans-serif, sans-serif; font-size: 14px; line-height: 1.9; }
.bulk-entry-panel .form-actions, .csv-import-panel .form-actions { margin-top: 21px; }
.bulk-preview-card { margin-top: 20px; padding: 20px; border: 1px solid #e5e9ec; border-radius: 18px; background: #fbfcfc; }
.import-preview-head { margin-bottom: 17px; gap: 18px; }
.import-preview-head strong { font-size: 15px; font-weight: 500; }
.import-preview-head span { color: #737b82; font-size: 12px; line-height: 1.8; }
.preview-count { padding: 5px 10px; border-radius: 999px; background: var(--accent-wash); color: var(--accent) !important; font-size: 11px !important; }
.bulk-preview-item { grid-template-columns: 30px minmax(0,1fr); gap: 13px; padding: 15px 0; border-top-color: #e8ecef; }
.bulk-index { width: 28px; height: 28px; border-radius: 10px; background: #eef4f0; color: var(--accent); font-size: 11px; font-weight: 500; }
.bulk-preview-item strong { font-size: 15px; font-weight: 500; }
.bulk-preview-item p { margin-top: 5px; color: #606971; font-size: 13px; line-height: 1.85; }
.pos-tag { padding: 3px 8px; border-radius: 7px; background: #eef4f0; color: #326c56; font-size: 11px; }
.import-issues { padding: 15px 17px; border-radius: 14px; background: #fff8eb; color: #77572b; font-size: 12px; line-height: 1.8; }
.csv-mapping-intro { margin: 22px 0 15px; padding: 18px 20px; border-color: #e5e9ec; border-radius: 17px; background: #f8faf9; }
.csv-mapping-intro strong { font-size: 15px; font-weight: 500; }
.csv-mapping-intro p, .csv-mapping-footnote p { color: #6d757c; font-size: 12px; line-height: 1.85; }
.csv-map-table { min-width: 640px; border-spacing: 0; font-size: 13px; }
.csv-map-table th { padding: 14px 15px; background: #f7f9fa; color: #667078; font-size: 11px; font-weight: 500; }
.csv-map-table td { padding: 15px; border-top-color: #edf0f2; }
.csv-map-table td:first-child strong { font-size: 14px; font-weight: 500; }
.csv-map-table td:first-child span { color: #858c93; font-size: 11px; }
.csv-map-table select { min-height: 44px; border-radius: 12px; }
.csv-cell-sample { color: #667078; font-size: 12px; line-height: 1.75; }
.csv-mapping-footnote { padding: 15px 17px; border: 1px solid #e5e9ec; border-radius: 14px; background: #f8faf9; }
.csv-mapping-footnote strong { font-size: 13px; font-weight: 500; }
.csv-preview-table { min-width: 560px; font-size: 13px; }
.csv-preview-table th { background: #f7f9fa; font-size: 11px; }
.csv-preview-table td { color: #515a61; font-size: 12px; line-height: 1.8; }
#csv-file { min-height: 54px; padding: 12px; border: 1px dashed #c9d4ce; border-radius: 14px; background: #f9fbfa; }

/* Legal pages: comfortable measure, obvious headings, links that look like links. */
.form-page { width: min(760px, 100%); padding: 47px 0 50px; }
.terms-content { margin-top: 28px; }
.terms-content h2 { margin: 34px 0 10px; color: #28312d; font-size: 20px; font-weight: 500; line-height: 1.45; letter-spacing: -.012em; }
.terms-content h3 { margin: 22px 0 7px; color: #303936; font-size: 15px; font-weight: 500; line-height: 1.55; }
.terms-content p, .terms-content li { color: #555f65; font-size: 14px; line-height: 2; }
.terms-content li + li { margin-top: 5px; }
.terms-content ol, .terms-content ul { padding-left: 25px; }
.legal-date { margin-top: 18px; padding: 15px 17px; border: 1px solid #e5e9ec; border-radius: 14px; background: #f8faf9; color: #687179; font-size: 12px; line-height: 1.8; }
.terms-content a:not(.button), .footer-inner nav a { color: var(--accent); }
.terms-content a:not(.button):hover, .footer-inner nav a:hover { text-decoration: underline; }
.site-footer { background: #fff; border-top: 1px solid #e5e9ec; }
.footer-inner { width: min(1040px, calc(100% - 56px)); padding: 26px 0 22px; grid-template-columns: auto 1fr auto; gap: 12px 24px; }
.footer-brand { color: #2b3832; font-size: 18px; font-weight: 500; letter-spacing: -.025em; }
.footer-inner p { color: #8a9096; font-size: 11px; }
.footer-inner nav { gap: 18px; color: #687179; font-size: 12px; }
.footer-inner small { padding-top: 15px; border-top-color: #edf0f2; color: #92999f; font-size: 10px; }
.modal-backdrop { padding: 18px; background: rgba(17,28,22,.36); backdrop-filter: blur(5px); }
.modal { max-height: min(88vh,760px); border-color: #e4e8eb; border-radius: 22px; padding: clamp(20px,4vw,28px); box-shadow: 0 24px 80px rgba(15,30,22,.18); }
.modal-head h2 { font-size: 21px; font-weight: 500; }
.modal-close { width: 38px; height: 38px; border-color: #e0e4e7; border-radius: 12px; color: #6c7379; font-size: 21px; }
.toast { background: #22352d; border-color: #22352d; border-radius: 14px; font-size: 13px; }
.toast.error { background: #fff; color: #8b2f2f; border-color: #ead0d0; }

@media (max-width: 900px) {
  .header-inner, .footer-inner { width: calc(100% - 40px); }
  .app-shell { width: calc(100% - 40px); }
  .home-hero.app-home-hero { grid-template-columns: minmax(0,1fr); gap: 22px; padding: 39px 0 28px; }
  .home-heading { max-width: 650px; }
  .home-hero .home-search { max-width: 100%; }
  .dictionary-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .auth-layout { gap: 24px; }
  .dict-header-main { align-items: flex-start; flex-direction: column; }
  .dict-actions { justify-content: flex-start; }
}
@media (max-width: 640px) {
  body { font-size: 15px; }
  .header-inner, .footer-inner { width: calc(100% - 32px); }
  .header-inner { height: 64px; gap: 10px; }
  .brand { gap: 8px; }
  .brand-mark { width: 35px; height: 35px; border-radius: 11px; }
  .brand-type { font-size: 21px; }
  .brand-type small { display: none; }
  .main-nav { gap: 8px; }
  .main-nav .nav-link { display: none; }
  .nav-cta { min-height: 38px; padding: 0 12px; font-size: 12px; }
  .app-shell { width: calc(100% - 32px); padding-bottom: 48px; }
  .home-hero.app-home-hero { gap: 20px; padding: 32px 0 24px; }
  .home-title { margin: 7px 0 6px; font-size: 32px; letter-spacing: -.02em; }
  .home-intro { font-size: 13px; line-height: 1.85; }
  .home-hero .home-search { min-height: 54px; border-radius: 15px; }
  .search-form input { min-width: 0; padding: 10px 2px; font-size: 13px; }
  .search-form .icon { margin-left: 9px; margin-right: 8px; }
  .search-form button { min-height: 40px; padding: 9px 13px; border-radius: 11px; font-size: 12px; }
  .section-head { margin: 25px 0 14px; align-items: flex-start; }
  .section-head h2 { font-size: 19px; }
  .section-head p { font-size: 12px; }
  .dictionary-grid { grid-template-columns: 1fr; gap: 10px; }
  .dictionary-card { min-height: 0; padding: 18px 18px 16px; border-radius: 17px; }
  .dict-card-title { margin-top: 12px; font-size: 17px; }
  .dict-card-description { margin: 8px 0 12px; }
  .empty-state { padding: 37px 17px; border-radius: 19px; }
  .page-toolbar { padding: 32px 0 20px; align-items: stretch; gap: 17px; }
  .page-title { font-size: 30px; }
  .page-lead { font-size: 13px; }
  .toolbar-actions { justify-content: flex-start; gap: 8px; flex-wrap: wrap; }
  .toolbar-actions .button { flex: 0 1 auto; }
  .form-page { padding: 31px 0 39px; }
  .panel { padding: 19px; border-radius: 19px; }
  .panel-title { font-size: 19px; }
  .panel-subtitle { margin-bottom: 18px; font-size: 12px; }
  .form-stack { gap: 20px; }
  .form-grid { grid-template-columns: 1fr; gap: 16px; }
  .field label { margin-bottom: 7px; }
  .dashboard-grid { grid-template-columns: 1fr; gap: 9px; margin: 15px 0 22px; }
  .stat-card { padding: 17px 18px; border-radius: 16px; }
  .stat-number { font-size: 26px; }
  .list-row { padding: 16px; align-items: flex-start; flex-direction: column; gap: 12px; }
  .list-row-actions { width: 100%; justify-content: flex-start; flex-wrap: wrap; }
  .entry-row { grid-template-columns: 1fr; gap: 10px; padding: 20px 2px; }
  .entry-term { font-size: 19px; }
  .entry-definition { font-size: 14px; }
  .entry-actions { justify-content: flex-start; }
  .dictionary-page { margin-top: 15px; padding: 0 15px 22px; border-radius: 19px; }
  .dict-header { padding: 27px 0 22px; }
  .dict-title { font-size: clamp(30px,8.4vw,40px); }
  .dict-description { font-size: 13px; }
  .dict-actions { width: 100%; }
  .dict-actions .button { flex: 0 1 auto; min-height: 39px; }
  .dict-search-block { padding-top: 20px; }
  .dict-results-head { margin: 25px 0 10px; }
  .dict-results-head h2 { font-size: 19px; }
  .import-section-head { gap: 12px; margin-bottom: 20px; }
  .import-icon { width: 38px; height: 38px; border-radius: 13px; }
  .bulk-entry-panel textarea { min-height: 220px; font-size: 13px; }
  .bulk-entry-panel .form-actions, .csv-import-panel .form-actions { display: grid; grid-template-columns: 1fr; }
  .bulk-entry-panel .form-actions .button, .csv-import-panel .form-actions .button { width: 100%; }
  .bulk-preview-card { padding: 14px; }
  .import-preview-head { align-items: flex-start; gap: 10px; }
  .preview-count { white-space: nowrap; }
  .csv-map-table { min-width: 620px; }
  .csv-map-table td, .csv-map-table th { padding: 11px 12px; }
  .csv-mapping-intro { padding: 15px; }
  .csv-preview-table { min-width: 540px; }
  .form-actions { gap: 9px; flex-wrap: wrap; }
  .form-actions .button { max-width: 100%; }
  .footer-inner { display: grid; grid-template-columns: 1fr; padding: 22px 0 18px; gap: 7px; }
  .footer-inner p { margin: 0; }
  .footer-inner nav { grid-column: auto; display: flex; flex-wrap: wrap; gap: 9px 16px; padding: 11px 0 5px; font-size: 12px; }
  .footer-inner small { grid-column: auto; margin-top: 3px; }
  .terms-content h2 { margin-top: 29px; font-size: 18px; }
  .terms-content p, .terms-content li { font-size: 13px; line-height: 1.95; }
  .modal-backdrop { padding: 10px; }
  .modal { border-radius: 19px; padding: 18px; }
  .toast-region { bottom: max(12px,env(safe-area-inset-bottom)); right: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}


/* v1.3.1 dictionary-entry hierarchy: headword → pronunciation → meaning → details */
.dictionary-page .entry-row {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: clamp(16px, 2.8vw, 28px);
  padding: clamp(22px, 3.4vw, 34px) 0;
  border-bottom: 1px solid #e7e9e8;
}
.dictionary-page .entry-content { min-width: 0; }
.dictionary-page .entry-term {
  display: block;
  color: var(--dict-text, #17211d);
  font-size: clamp(30px, 4.2vw, 42px);
  line-height: 1.18;
  font-weight: 600;
  letter-spacing: -.035em;
  overflow-wrap: anywhere;
  margin: 0 0 8px;
}
.dictionary-page .entry-pronunciation {
  color: #727b77;
  font-size: clamp(14px, 1.5vw, 16px);
  line-height: 1.55;
  font-weight: 400;
  margin: 0 0 13px;
  overflow-wrap: anywhere;
}
.dictionary-page .entry-definition {
  color: #28332e;
  font-size: clamp(16px, 1.65vw, 18px);
  line-height: 1.8;
  font-weight: 400;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  margin: 0 0 12px;
}
.dictionary-page .entry-pos {
  display: inline-flex;
  align-items: center;
  min-height: 27px;
  margin: 0 0 10px;
  padding: 4px 10px;
  border-radius: 999px;
  background: #f2f5f3;
  color: #5b6961;
  font-size: 12px;
  line-height: 1.4;
}
.dictionary-page .entry-example {
  margin-top: 10px;
  color: #626e67;
  border-left: 2px solid color-mix(in srgb, var(--dict-accent, #13865b) 32%, #ffffff);
  padding: 3px 0 3px 13px;
  font-size: 14px;
  line-height: 1.8;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.dictionary-page .entry-notes {
  margin-top: 11px;
  color: #7a837e;
  font-size: 12px;
  line-height: 1.75;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.dictionary-page .entry-actions { display: flex; gap: 8px; align-items: start; }
.dict-template-editorial .entry-term { font-size: clamp(32px, 4.5vw, 46px); }
.dict-template-compact .entry-row { padding: 20px 0; }
.dict-template-compact .entry-term { font-size: clamp(27px, 3.5vw, 34px); }
.dict-template-compact .entry-definition { font-size: 15px; }
@media (max-width: 600px) {
  .dictionary-page .entry-row { grid-template-columns: minmax(0,1fr); gap: 12px; padding: 24px 0; }
  .dictionary-page .entry-term { font-size: clamp(29px, 8vw, 38px); margin-bottom: 7px; }
  .dictionary-page .entry-pronunciation { font-size: 14px; margin-bottom: 12px; }
  .dictionary-page .entry-definition { font-size: 16px; line-height: 1.8; }
  .dictionary-page .entry-actions { order: 2; }
}


/* Shared AD brand asset and normalized local SVG icon sizing (v1.3.2). */
.brand-mark { display:block; width:37px; height:37px; flex:0 0 auto; object-fit:cover; background:#1d1d1f !important; border-radius:11px; overflow:hidden; }
.brand-mark svg { display:none; }
.loading-mark { display:block; width:38px; height:38px; object-fit:cover; border-radius:11px; background:#1d1d1f !important; color:transparent; }
.icon { width:1.125rem; height:1.125rem; min-width:1.125rem; min-height:1.125rem; display:inline-block; flex:0 0 1.125rem; vertical-align:-0.2em; overflow:visible; }
.footer-brand { display:inline-flex; align-items:center; gap:9px; }
.footer-brand img { display:block; width:26px; height:26px; border-radius:7px; flex:0 0 auto; }
.footer-brand strong { color:#2b3832; font:inherit; font-weight:600; }
.footer-brand span { color:inherit; }
@media (max-width:640px) { .brand-mark { width:35px; height:35px; border-radius:10px; } .icon { width:1.125rem; height:1.125rem; } }
