@import url("https://fonts.googleapis.com/css2?family=Zen+Maru+Gothic:wght@400;700&display=swap");
/* Liberl palette: wood, leather, paper and the brass of orbal clocks. */
:root { color-scheme: dark; --gold: #fde08d; --brass: #d4af37; --copper: #c8814a; --panel: #33251a; --panel-2: #42301f; --ink: #f3e9d8; --muted: #bba68a; --line: #5e4631; --field: #1d1510;
    --cursor: url("/assets/img/cursor.png") 2 2, auto; --cursor-pointer: url("/assets/img/cursor-hand.png") 5 8, pointer; }
/* Only the lines page replaces the scrollbar (with its coloured progress track). */
html.entries-page { scrollbar-width: none; }
html.entries-page::-webkit-scrollbar { width: 0; height: 0; }
* { box-sizing: border-box; }
body { margin: 0; background: #1b140f; color: var(--ink); font-family: system-ui, sans-serif; }
button, input, select { font: inherit; }
button { cursor: var(--cursor-pointer); background: #527b61; color: white; border: 0; border-radius: 4px; padding: .65rem 1rem; }
.platform-header { min-height: 58px; display: flex; align-items: center; gap: 1.5rem; padding: .75rem 1.25rem; background: #271b13; border-bottom: 1px solid #5e4631; position: sticky; top: 0; z-index: 20; }
.brand { color: var(--gold); text-decoration: none; font-weight: 700; }
.platform-nav { display: flex; align-items: center; gap: .35rem; }
.platform-nav a { color: var(--muted); text-decoration: none; padding: .45rem .7rem; border-radius: 4px; }
.platform-nav a:hover, .platform-nav a.active { color: var(--ink); background: #42301f; }
.account { margin-left: auto; display: flex; align-items: center; gap: .75rem; color: var(--muted); }
.account-avatar { width: 32px; height: 32px; object-fit: cover; border-radius: 50%; border: 1px solid var(--gold); }
.account a { color: var(--gold); }
.account form { margin: 0; }
.translation-presence { position: relative; }
.translation-presence > button { padding: .4rem .65rem; background: #5a3d26; }
.translation-presence ul { display: none; position: absolute; top: calc(100% + .5rem); right: 0; width: min(360px, 80vw); margin: 0; padding: .6rem 1rem .6rem 2rem; color: var(--ink); background: #33251a; border: 1px solid #5e4631; border-radius: 6px; box-shadow: 0 8px 25px #0009; }
.translation-presence.open ul { display: block; }
.translation-presence li { margin: .35rem 0; }
.link-button { padding: 0; background: transparent; color: var(--gold); }
main { max-width: 1600px; margin: 0 auto; padding: 1rem; }
.page-title { max-width: 1600px; margin: 0 auto; padding: 1rem 1rem 0; }
.page-title h1 { margin: 0; font-size: 1.4rem; }
.home-intro { margin: .5rem 0 1.25rem; }
.home-intro h2 { margin-bottom: .25rem; }
.home-intro p { margin: 0; color: var(--muted); }
.project-picker { display: flex; justify-content: flex-end; }
.project-picker label { display: grid; gap: .35rem; color: var(--muted); }
.project-picker select { min-width: 260px; color: var(--ink); background: #1d1510; border: 1px solid #5e4631; border-radius: 4px; padding: .55rem; }
.content-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1rem; }
.content-card { display: block; min-height: 230px; padding: 1.25rem; color: var(--ink); text-decoration: none; background: var(--panel); border: 1px solid #4d3929; border-radius: 8px; }
.content-card:hover { border-color: #c09858; transform: translateY(-1px); }
.content-card h2 { margin: .35rem 0 .5rem; color: var(--gold); }
.content-card p { color: var(--muted); min-height: 3rem; }
.card-kind { color: var(--muted); font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; }
.progress { height: 8px; overflow: hidden; background: #1b140f; border-radius: 999px; margin: 1rem 0 .5rem; }
.progress span { display: block; height: 100%; background: #5fa977; }
.filters { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: .75rem; padding: 1rem; background: var(--panel); border-radius: 7px; }
.filters label { display: flex; flex-direction: column; gap: .35rem; color: var(--muted); font-size: .85rem; }
.filters input, .filters select { width: 100%; color: var(--ink); background: #1d1510; border: 1px solid #5e4631; border-radius: 4px; padding: .55rem; }
.filters .checkbox { flex-direction: row; align-items: center; align-self: end; padding-bottom: .7rem; }
.filters .checkbox input { width: auto; }
.filters button { align-self: end; }
.compact-filters { grid-template-columns: minmax(180px, .7fr) minmax(180px, .7fr) minmax(280px, 1.8fr) auto; }
.result-count { color: var(--muted); }
.entries { display: grid; gap: .8rem; }
.structural-toolbar { position: sticky; z-index: 24; top: 56px; display: flex; align-items: center; gap: .55rem; margin: .7rem 0; padding: .65rem .8rem; background: #271b13ee; border: 1px solid #7a5c3e; border-radius: 7px; box-shadow: 0 5px 18px #0008; backdrop-filter: blur(8px); }
.structural-toolbar strong { color: var(--gold); }
.structural-toolbar span { flex: 1; color: var(--muted); }
.structural-toolbar small { color: var(--muted); }
.structural-toolbar button { padding: .38rem .65rem; }
.structural-context-menu { position: fixed; z-index: 80; display: grid; min-width: 220px; padding: .35rem; background: #33251a; border: 1px solid #8a6a48; border-radius: 7px; box-shadow: 0 10px 32px #000b; }
.structural-context-menu[hidden] { display: none; }
.structural-context-menu button { width: 100%; padding: .5rem .7rem; color: var(--ink); background: transparent; text-align: left; }
.structural-context-menu button:hover { background: #4d3929; }
.structural-context-menu button.destructive { color: #ff9bad; }
.entry.link-copied { outline: 3px solid #a6e3a1; outline-offset: -3px; transition: outline-color .2s; }
.clm-scene { position: relative; display: grid; grid-template-columns: 12px 1fr; border: 1px solid #5e4631; border-radius: 9px; background: #211710; box-shadow: 0 3px 14px #0004; transition: border-color .12s, box-shadow .12s, filter .12s; }
.clm-scene:hover { border-color: #a07c50; box-shadow: 0 4px 18px #0008; }
.clm-scene.scene-selected { border-color: #f9e2af; box-shadow: 0 0 0 2px #f9e2af44, 0 5px 20px #0009; }
.scene-gutter { grid-row: 1 / span 2; width: 100%; min-width: 0; padding: 0; border: 0; border-radius: 8px 0 0 8px; background: #4d3929; cursor: var(--cursor-pointer); }
.clm-scene:hover .scene-gutter { background: #8a6a48; }
.clm-scene.scene-selected .scene-gutter { background: #f9e2af; }
.scene-header { display: flex; align-items: center; gap: 1rem; padding: .55rem .8rem; color: var(--muted); background: #33251a; border-radius: 0 8px 0 0; }
.scene-header strong { color: #7fc8d9; }
.scene-entries { display: grid; gap: .7rem; padding: .7rem; }
.scene-entries:empty::after { content: "Aucune réplique dans cette fonction"; padding: .8rem; color: var(--muted); font-style: italic; }
.scene-insertion { height: 7px; margin: -7px 0; opacity: 0; transition: height .12s, opacity .12s; }
.scene-insertion[hidden], .entry-insertion[hidden] { display: none; }
.scene-insertion:hover, .scene-insertion.insertion-selected { height: 32px; opacity: 1; }
.scene-insertion button { width: 100%; height: 100%; padding: 0; color: #1a120c; background: #f9e2af; border-radius: 4px; font-size: .75rem; }
.entry-insertion { height: 5px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; margin: -5px 0; opacity: 0; transition: height .12s, margin .12s, opacity .12s; }
.entry-insertion:hover, .entry-insertion.insertion-selected { height: 25px; margin: -5px 0; opacity: 1; }
.entry-insertion button { min-height: 0; padding: 0; color: #c4b29a; background: #4a3626; border: 0; border-radius: 3px; font-size: .68rem; }
.entry-insertion button:hover, .entry-insertion button.selected { color: #1a120c; background: #7fc8d9; }
.scene-entries .entry { margin: 0; }
.scene-entries textarea { cursor: var(--cursor-pointer); }
.entry.cell-selected { border-color: #7fc8d9; box-shadow: 0 0 0 2px #7fc8d944; }
.entry.bubble-selected { border-color: #cba6f7; box-shadow: 0 0 0 2px #cba6f755; }
.scene-entries .entry > header { cursor: var(--cursor-pointer); }
.entry.cell-selected[data-selected-language="jp"] textarea[name="source_jp"],
.entry.cell-selected[data-selected-language="en"] textarea[name="source_en"],
.entry.cell-selected[data-selected-language="fr"] textarea[name="translation_fr"] { outline: 2px solid #7fc8d9; outline-offset: 1px; cursor: text; }
.entry { background: var(--panel); border: 1px solid #4d3929; border-radius: 7px; overflow: hidden; }
.entry.reviewer-edited { border-color: #cba6f7; box-shadow: inset 3px 0 #cba6f7; }
.entry.reviewer-edited .translation-editor textarea { color: #e8d5ff; }
.entry > header { display: flex; flex-wrap: wrap; gap: 1rem; padding: .65rem 1rem; background: var(--panel-2); color: var(--muted); }
.entry > header strong, .entry-file-link { color: var(--gold); font-weight: 700; }
.entry-file-link { text-decoration: none; }
.entry-file-link:hover { text-decoration: underline; }
/* JP, EN and FR share the width equally. */
.languages { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.entry-character { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .55rem; min-width: 0; text-align: center; }
.entry-character strong { color: var(--gold); font-size: .85rem; overflow-wrap: anywhere; }
.entry-sprite { display: block; width: 108px; height: 120px; max-width: 100%; margin: 0 auto; object-fit: contain; }
.entry:has(.entry-character) .languages { grid-template-columns: 190px repeat(3, minmax(0, 1fr)); }
/* JP and EN sit inside the source form (display: contents): same box as FR, all centred vertically. */
.languages > div, .source-form > div { display: flex; flex-direction: column; justify-content: center; padding: .9rem 1rem; border-right: 1px solid #4d3929; }
.languages > div:last-child { border: 0; }
.languages b { color: var(--muted); font-size: .75rem; }
.languages p { margin: 0; white-space: normal; overflow-wrap: anywhere; }
.source-form { display: contents; }
.source-form textarea { width: 100%; min-height: 8rem; margin: 0; resize: vertical; color: var(--ink); background: #1d1510; border: 1px solid #5e4631; border-radius: 4px; padding: .65rem; font: inherit; line-height: 1.45; }
.source-save-error { display: block; clear: both; padding-top: .35rem; color: #ff8e8e; }
.translation-form, .proposal-form { display: grid; gap: .55rem; margin: 0; }
.translation-form textarea, .proposal-form textarea { width: 100%; resize: vertical; color: var(--ink); background: #1d1510; border: 1px solid #5e4631; border-radius: 4px; padding: .65rem; font: inherit; line-height: 1.45; }
.translation-form > button { justify-self: end; padding: .45rem .8rem; }
.translation-form small { color: var(--muted); }
.translation-editor { position: relative; }
.translation-editor textarea { display: block; min-height: 8rem; padding-right: 3.4rem; padding-bottom: 3rem; border: 1px solid #5e4631; background: #1a120c; border-radius: 6px; }
.translation-save { position: absolute; right: .4rem; bottom: .4rem; width: 40px; height: 40px; padding: 0; color: #1a120c; background: #a6e3a1; border: 0; border-radius: 6px; font-size: 1.5rem; font-weight: 800; line-height: 1; }
.translation-save:hover { background: #8ce189; }
.translation-save.is-empty { background: #f38ba8; }
.translation-save.is-dirty { background: #f9e2af; }
.translation-save.is-saving { background: #7fc8d9; animation: save-button-wait .7s ease-in-out infinite alternate; }
.translation-save.is-error { background: #f38ba8; }
.translation-save.is-saved { visibility: hidden; opacity: 0; pointer-events: none; }
.source-form .translation-editor textarea { border: 1px solid #5e4631; background: #1d1510; }
.translation-save.source-save,
.translation-save.source-save:hover,
.translation-save.source-save.is-empty,
.translation-save.source-save.is-dirty,
.translation-save.source-save.is-saved { color: #f3e9d8; background: #7a6550; }
.translation-save.source-save.is-saving { background: #977f66; }
.translation-save.source-save.is-error { background: #f38ba8; }
.translation-save-error { min-height: 1em; color: #ff8e8e !important; }
.translation-form.save-confirmed .translation-editor textarea { animation: translation-save-confirmed .8s ease-out; }
.translation-form.save-confirmed .translation-save.is-saved { visibility: visible; opacity: 1; animation: save-button-confirmed .8s ease-out; }
.source-form.save-confirmed textarea { animation: source-text-save-confirmed .8s ease-out; }
.source-form.save-confirmed .source-save.is-saved.recently-saved { visibility: visible; opacity: 1; animation: source-save-confirmed .8s ease-out; }
@keyframes translation-save-confirmed { from { background-color: #2d5a27; } to { background-color: #1a120c; } }
@keyframes save-button-confirmed { 0% { transform: scale(.88); box-shadow: 0 0 0 0 #a6e3a188; } 45% { transform: scale(1.12); box-shadow: 0 0 0 7px #a6e3a122; } 100% { transform: scale(1); box-shadow: 0 0 0 0 transparent; } }
@keyframes source-text-save-confirmed { from { background-color: #45342a; } to { background-color: #1d1510; } }
@keyframes source-save-confirmed { 0% { transform: scale(.88); box-shadow: 0 0 0 0 #977f6688; } 45% { transform: scale(1.12); box-shadow: 0 0 0 7px #977f6622; } 100% { transform: scale(1); box-shadow: 0 0 0 0 transparent; } }
@keyframes save-button-wait { from { opacity: .65; } to { opacity: 1; } }
.pagination { display: flex; justify-content: center; align-items: center; gap: 1rem; padding: 1rem; }
.pagination a { color: var(--link); }
.page-jump { display: flex; align-items: center; gap: .45rem; }
.page-jump label { display: flex; align-items: center; gap: .4rem; color: var(--muted); }
.page-jump input { width: 5.5rem; padding: .4rem; color: var(--ink); background: #1d1510; border: 1px solid #5e4631; border-radius: 4px; }
.page-jump button { padding: .4rem .65rem; }
.duplicate-state { color: #9fd8ae; }
.duplicate-state.detached { color: #e6b47a; }
.voice-button { padding: .25rem .55rem; background: #6b4a2b; }
.annotation-button { padding: .25rem .55rem; color: #e3d6c2; background: #4a3a2c; border: 1px solid #7a6650; }
.annotation-button.has-content { color: #effff3; background: #39714a; border-color: #69a77b; }
.entry-tracker { position: fixed; z-index: 35; top: 68px; right: 4px; bottom: 10px; width: 14px; overflow: hidden; background: #241a12; border: 1px solid #4a3626; border-radius: 7px; cursor: var(--cursor-pointer); box-shadow: 0 2px 10px #0007; transition: right .18s ease; }
.entry-tracker[hidden] { display: none; }
.entry-tracker canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.entry-tracker-viewport { position: absolute; left: 1px; right: 1px; min-height: 30px; background: #fff3dc40; border: 1px solid #fff3dc8c; border-radius: 4px; cursor: grab; touch-action: none; transition: background .12s; }
.entry-tracker-viewport:hover { background: #fff3dc66; }
.entry-tracker-viewport.dragging { background: #fff3dc80; cursor: grabbing; }
.entry-tracker-current { position: absolute; left: 0; width: 14px; height: 8px; padding: 0; background: #f9e2af; border: 1px solid #241a12; border-radius: 4px; box-shadow: 0 0 0 1px #f9e2af55; }
.entry-tracker-current:hover { background: #fff0b8; }
body.fuzzy-open .entry-tracker { right: 424px; }
.fuzzy-toggle { position: fixed; z-index: 39; right: 26px; bottom: 22px; padding: .65rem .85rem; color: #f9e2af; background: #51472f; border: 1px solid #8f7c4d; box-shadow: 0 5px 18px #0008; transition: right .18s ease; }
body.fuzzy-open .fuzzy-toggle { right: 440px; }
.fuzzy-panel { position: fixed; z-index: 40; top: 58px; right: 0; bottom: 0; width: min(420px, 100vw); display: flex; flex-direction: column; padding: 0; background: #211810; border-left: 1px solid #4a3626; box-shadow: -12px 0 35px #0008; transform: translateX(105%); transition: transform .18s ease; }
.fuzzy-panel.open { transform: translateX(0); }
.fuzzy-panel > header { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .85rem 1rem; border-bottom: 1px solid #4a3626; }
.fuzzy-panel > header div { display: grid; gap: .15rem; }
.fuzzy-panel > header strong { color: #fab387; }
.fuzzy-panel > header small { color: #a08c72; }
.fuzzy-close { padding: .1rem .55rem; color: var(--ink); background: transparent; font-size: 1.6rem; }
.fuzzy-status { margin: 0; padding: 1rem; color: #a08c72; font-style: italic; }
.fuzzy-results { flex: 1 1 auto; min-height: 110px; overflow-y: auto; background: #1a120c; }
.fuzzy-result { width: 100%; display: grid; grid-template-columns: auto 1fr; gap: .2rem .55rem; padding: .75rem; color: #efe2cc; background: transparent; border: 0; border-bottom: 1px solid #4a3626; border-radius: 0; text-align: left; }
.fuzzy-result:hover, .fuzzy-result.selected { background: #4a3626; }
.fuzzy-result.selected { box-shadow: inset 3px 0 #f38ba8; }
.fuzzy-result-jp, .fuzzy-result-fr { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fuzzy-result-fr { grid-column: 2; color: #c4b29a; }
.fuzzy-common { padding: 0; color: #a6e3a1; background: transparent; font-weight: 700; }
.fuzzy-detail { flex: 0 0 min(46vh, 430px); min-height: min(310px, 46vh); overflow-y: auto; padding: .85rem 1rem 1rem; border-top: 1px solid #5e4631; background: #211810; }
.fuzzy-detail[hidden] { display: none; }
.fuzzy-meta { display: block; margin-bottom: .65rem; color: #7fc8d9; font-weight: 700; }
.fuzzy-detail > div { margin-top: .5rem; padding: .55rem; background: #1a120cb3; border: 1px solid #5e4631; border-radius: 4px; }
.fuzzy-detail b { color: #a08c72; font-size: .72rem; }
.fuzzy-detail p { margin: .25rem 0 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.fuzzy-detail button { width: 100%; margin-top: .75rem; color: #1a120c; background: #a6e3a1; font-weight: 700; }
/* With the panel open the page drops its side margins and fills the space up to the
   panel, so the line frames keep about the same width (reversed when it closes). */
body.fuzzy-open main { max-width: none; margin: 0; padding-left: .5rem; padding-right: 428px; }
.entry-dialog { width: min(760px, calc(100vw - 2rem)); max-height: min(82vh, 900px); padding: 0; color: var(--ink); background: var(--panel); border: 1px solid #7a5c3e; border-radius: 8px; box-shadow: 0 18px 60px #000c; }
.entry-dialog::backdrop { background: #0c0805b8; }
.entry-dialog > header { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .8rem 1rem; background: var(--panel-2); border-bottom: 1px solid #5e4631; }
.dialog-close { padding: .15rem .55rem; color: var(--ink); background: transparent; font-size: 1.5rem; line-height: 1; }
.dialog-form { display: grid; gap: .7rem; padding: 1rem; }
.dialog-form textarea { width: 100%; resize: vertical; color: var(--ink); background: #1d1510; border: 1px solid #5e4631; border-radius: 4px; padding: .7rem; font: inherit; line-height: 1.45; }
.dialog-form button { justify-self: end; }
.dialog-text { padding: 1rem; white-space: normal; }
.suggestion-list { display: grid; gap: .7rem; max-height: 48vh; overflow-y: auto; padding: 1rem; }
.suggestion-item { padding: .8rem; background: #271b13; border: 1px solid #4d3929; border-radius: 6px; }
.suggestion-item.applied { border-color: #4f825e; }
.suggestion-item p { margin: 0 0 .65rem; white-space: normal; }
.suggestion-item small { color: var(--muted); }
.suggestion-item form { display: flex; justify-content: flex-end; margin-top: .65rem; }
.suggestion-item button { padding: .4rem .7rem; }
.add-suggestion-form { border-top: 1px solid #5e4631; }
.compact-empty { padding: 1rem; }
.lexicon-term { position: relative; padding: 0 .08rem; color: #ffe7a3; background: #645025; border-bottom: 1px dotted #ffe7a3; border-radius: 2px; }
.lexicon-term.untranslated { color: #d8c9b2; background: #4f3d2c; border-bottom-color: #d8c9b2; }
.item-reference { position: relative; padding: 0 .08rem; color: #b8f7c5; background: #28523a; border-bottom: 1px dotted #b8f7c5; border-radius: 2px; }
.item-reference.untranslated { color: #ddd0bc; background: #4f3d2c; border-bottom-color: #ddd0bc; }
.entry { scroll-margin-top: 82px; }
/* Bubbles off screen are neither styled nor laid out until scrolled near (long files have hundreds). */
.entry { content-visibility: auto; contain-intrinsic-size: auto 215px; }
.lexicon-term:hover::after, .item-reference:hover::after { content: attr(data-tooltip); position: absolute; left: 0; bottom: calc(100% + .45rem); z-index: 30; width: max-content; max-width: 360px; padding: .45rem .6rem; color: var(--ink); background: #1f160e; border: 1px solid #8a6a48; border-radius: 4px; white-space: pre-wrap; box-shadow: 0 4px 16px #0009; }
.summary-strip { display: flex; justify-content: space-between; gap: 1rem; margin: 1rem 0; padding: .9rem 1rem; background: var(--panel); border: 1px solid #4d3929; border-radius: 7px; color: var(--muted); }
.summary-strip strong { color: var(--ink); }
.table-wrap { overflow-x: auto; background: var(--panel); border: 1px solid #4d3929; border-radius: 7px; }
.progress-table { width: 100%; border-collapse: collapse; }
.progress-table th, .progress-table td { padding: .75rem .9rem; border-bottom: 1px solid #4d3929; text-align: left; vertical-align: middle; }
.progress-table th { color: var(--muted); font-size: .8rem; }
.progress-table a { color: var(--gold); }
.table-button { display: inline-block; padding: .35rem .55rem; border: 1px solid #7a5c3e; border-radius: 4px; text-decoration: none; white-space: nowrap; }
.progress-table tbody tr:hover { background: #3d2c1e; }
.script-contributors { min-width: 140px; color: var(--muted); }
.workflow-status-form { margin: 0; }
.workflow-status-form select { min-width: 180px; padding: .45rem; color: var(--ink); background: #1d1510; border: 1px solid #5e4631; border-radius: 4px; }
.backup-calendar { margin-top: 1rem; padding: 1rem; background: var(--panel); border: 1px solid #4d3929; border-radius: 8px; }
.backup-calendar > header { display: flex; align-items: center; justify-content: center; gap: 1.25rem; }
.backup-calendar > header h2 { min-width: 220px; margin: 0; text-align: center; text-transform: capitalize; }
.backup-calendar > header a { color: var(--gold); font-size: 1.4rem; text-decoration: none; }
.calendar-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.calendar-weekdays { margin-top: 1rem; color: var(--muted); text-align: center; }
.calendar-weekdays strong { padding: .45rem; }
.calendar-day { min-height: 118px; padding: .55rem; border: 1px solid #4d3929; background: #271b13; }
.calendar-day.outside { opacity: .38; }
.calendar-day.has-backup { background: #24382b; border-color: #4f825e; }
.calendar-day > span { display: block; color: var(--muted); font-weight: 700; }
.calendar-day small { display: block; margin-top: .45rem; color: #bcd9c4; }
.calendar-day form { margin-top: .5rem; }
.calendar-day button { padding: .35rem .55rem; }
.backup-policy { color: var(--muted); }
.build-panel { padding: 1rem; }
.build-checks { display: grid; gap: .55rem; padding: 0; list-style: none; }
.build-checks li { display: flex; justify-content: space-between; gap: 1rem; padding: .7rem .8rem; border: 1px solid #5e4631; border-radius: 5px; }
.build-checks li span { color: var(--muted); text-align: right; }
.build-checks .check-ok { border-color: #4f825e; background: #24382b; }
.build-checks .check-failed { border-color: #8b4c55; background: #3a252a; }
.build-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.build-launcher, .build-status, .build-history { margin-top: 1rem; }
.build-start-form { display: flex; align-items: end; gap: .8rem; }
.build-start-form label { display: grid; gap: .35rem; min-width: 260px; color: var(--muted); }
.build-start-form select { width: 100%; padding: .55rem; color: var(--ink); background: #1d1510; border: 1px solid #5e4631; border-radius: 4px; }
.build-start-form button:disabled { cursor: not-allowed; opacity: .45; }
.build-status > header { display: flex; align-items: start; justify-content: space-between; gap: 1rem; }
.build-status h2 { margin-bottom: .25rem; }
.build-status header p { margin: 0; color: var(--muted); }
.build-status header strong { color: var(--gold); font-size: 1.25rem; }
.build-progress { height: 12px; }
.build-status pre { max-height: 420px; overflow: auto; padding: .8rem; color: #e0d2bc; background: #150f0a; border: 1px solid #4d3929; border-radius: 5px; white-space: pre-wrap; overflow-wrap: anywhere; }
.build-history ul { display: grid; gap: .45rem; padding-left: 1.25rem; }
.build-history a { color: var(--gold); }
.table-progress { display: inline-block; width: min(220px, 70%); margin: 0 .65rem 0 0; vertical-align: middle; }
.character-name-form { display: grid; grid-template-columns: minmax(220px, 1fr) auto; gap: .5rem; }
.character-name-form input { width: 100%; color: var(--ink); background: #1d1510; border: 1px solid #5e4631; border-radius: 4px; padding: .55rem; }
.character-name-form button { padding: .45rem .7rem; }
.character-table tr { scroll-margin-top: 82px; }
.lexicon-list { display: grid; gap: .8rem; }
.lexicon-entry { background: var(--panel); border: 1px solid #4d3929; border-radius: 7px; overflow: hidden; }
.lexicon-entry > header { display: flex; flex-wrap: wrap; gap: .8rem; align-items: center; padding: .65rem 1rem; color: var(--muted); background: var(--panel-2); }
.lexicon-entry > header strong { color: var(--gold); }
.lexicon-entry code { margin-left: auto; color: var(--muted); }
.missing { color: #d99b9b; font-style: italic; }
.empty-state { padding: 2rem; text-align: center; color: var(--muted); background: var(--panel); border: 1px solid #4d3929; border-radius: 7px; }
.platform-login { min-height: 100vh; display: grid; place-items: center; }
.login-card { width: min(430px, calc(100% - 2rem)); background: var(--panel); border: 1px solid #6b5038; border-radius: 8px; text-align: center; }
.platform-logo { max-width: 220px; }
.login-card form { display: grid; gap: 1rem; text-align: left; }
.account-card { width: min(560px, calc(100vw - 2rem)); padding: 1.25rem; }
.profile-avatar { display: block; width: 112px; height: 112px; margin: 0 auto 1rem; object-fit: cover; border-radius: 50%; border: 3px solid var(--gold); }
.login-card label { display: grid; gap: .35rem; }
.login-card input { width: 100%; padding: .7rem; background: #1d1510; border: 1px solid #5e4631; color: white; }
.error { color: #ff8e8e; }
.success { color: #8ee8ad; }
.admin-grid { display: grid; grid-template-columns: minmax(280px, 420px) minmax(620px, 1fr); gap: 1rem; align-items: start; }
.panel { padding: 1rem; background: var(--panel); border: 1px solid #4d3929; border-radius: 7px; }
.import-panel { max-width: 760px; margin: 0 auto; }
.import-panel code { color: var(--gold); }
.stack-form { display: grid; gap: .8rem; }
.stack-form label { display: grid; gap: .35rem; color: var(--muted); }
.stack-form input, .stack-form select, .inline-form input, .inline-form select { width: 100%; color: var(--ink); background: #1d1510; border: 1px solid #5e4631; border-radius: 4px; padding: .55rem; }
.accounts-table { width: 100%; border-collapse: collapse; }
.accounts-table th, .accounts-table td { padding: .65rem; border-bottom: 1px solid #4d3929; text-align: left; vertical-align: top; }
.accounts-table th { color: var(--muted); font-size: .8rem; }
.inline-form { display: grid; grid-template-columns: minmax(110px, 1fr) auto auto; gap: .45rem; align-items: center; min-width: 390px; }
.inline-form .password-reset { grid-column: 1 / 3; }
.danger { background: #8c3e49; }
@media (max-width: 850px) { .languages, .entry:has(.entry-character) .languages { grid-template-columns: 1fr; } .entry-character { min-height: 150px; } .languages > div { border-right: 0; border-bottom: 1px solid #4d3929; } .pagination { flex-wrap: wrap; } }
@media (max-width: 1050px) { body.fuzzy-open main { padding-right: 1rem; } }
@media (max-width: 1050px) { body.fuzzy-open .entry-tracker { right: 4px; opacity: .25; } }
@media (max-width: 1050px) { body.fuzzy-open .fuzzy-toggle { right: 12px; bottom: 12px; } }
@media (max-width: 1050px) { .admin-grid { grid-template-columns: 1fr; } .accounts-table { display: block; overflow-x: auto; } }
@media (max-width: 900px) { .build-grid { grid-template-columns: 1fr; } .build-start-form { align-items: stretch; flex-direction: column; } }
@media (max-width: 1050px) { .platform-header { align-items: flex-start; flex-wrap: wrap; } .platform-nav { order: 3; width: 100%; overflow-x: auto; } .account { font-size: .85rem; } .compact-filters { grid-template-columns: 1fr 1fr; } }
@media (max-width: 650px) { .account span { display: none; } .compact-filters { grid-template-columns: 1fr; } }

/* Codes moteur ({wait}, {color 0}, #214F…) colorés dans le texte et les champs. */
.engine-code { color: #89dceb; }
.engine-code.engine-wait { color: #fab387; }
.code-backdrop { position: absolute; box-sizing: content-box; margin: 0; border: 0; overflow: hidden; pointer-events: none; white-space: pre; }
.translation-editor textarea.has-code-backdrop { position: relative; z-index: 1; background: transparent !important; }
.translation-editor textarea.has-code-backdrop::selection { color: transparent; background: #7fc8d955; }
.translation-editor .translation-save { z-index: 2; }

/* État du japonais dans la table des scripts. */
.jp-state { white-space: nowrap; }
.jp-badge { display: inline-block; padding: .1rem .45rem; border-radius: 4px; font-size: .8rem; }
.jp-badge.ok { color: #a6e3a1; background: #a6e3a11f; }
.jp-badge.missing { color: #f38ba8; background: #f38ba826; }
.jp-badge.split { color: #f9e2af; background: #f9e2af1f; }
.muted { color: var(--muted); }
.jp-files { display: grid; gap: .6rem; margin-bottom: 1rem; }
.jp-files label { display: grid; gap: .3rem; }
.jp-files input { width: 100%; }
.jp-files > button { justify-self: start; }
.jp-suggestions .link-button { margin-right: .6rem; }
.jp-table td { vertical-align: top; }
.jp-table td small { display: block; margin-top: .25rem; }
.jp-shift { white-space: nowrap; }
.jp-shift .link-button { padding: .1rem .35rem; }
.jp-badge.identical { color: var(--muted); }
.jp-badge.fill, .jp-badge.pauses { color: #a6e3a1; background: #a6e3a11f; }
.jp-badge.different { color: #f38ba8; background: #f38ba826; }
.jp-badge.none { color: var(--muted); background: #ffffff0f; }
.jp-row.different { background: #f38ba80d; }

/* Conflits de l'import Drive. */
.drive-conflicts { margin-top: 1rem; }
.drive-conflicts .conflict-text { vertical-align: top; white-space: normal; min-width: 18rem; }

/* Édition du CLM en texte (admins). */
.clm-form textarea { width: 100%; min-height: 60vh; font: .82rem/1.45 ui-monospace, "Cascadia Mono", Consolas, monospace; tab-size: 4; white-space: pre; color: var(--ink); background: #1a120c; border: 1px solid #5e4631; border-radius: 6px; padding: .75rem; }
.clm-actions { display: flex; gap: .75rem; margin-top: .75rem; }
.clm-apply { background: #f9e2af; color: #1a120c; }
.clm-preview { margin-bottom: 1rem; }
.clm-preview td { vertical-align: top; }
.clm-loss { background: #f38ba81a; }
.review-flag { color: #1a120c; background: #f9e2af; border-radius: 4px; padding: .1rem .45rem; font-size: .8rem; }
.review-flag button { margin-left: .4rem; padding: 0 .3rem; font-size: .75rem; }

/* Empty save messages take no room: the three language fields stay aligned. */
.translation-save-error:empty, .source-save-error:empty { display: none; }

/* Lexicon and item highlights inside editable fields (mirror layer). */
.code-backdrop .lexicon-term, .code-backdrop .item-reference { padding: 0; border-radius: 0; }
.mark-tooltip { position: fixed; z-index: 50; max-width: 360px; padding: .45rem .6rem; color: var(--ink); background: #1f160e; border: 1px solid #8a6a48; border-radius: 4px; white-space: pre-wrap; box-shadow: 0 4px 16px #0009; pointer-events: none; font-size: .85rem; }

/* Script assignments (who may modify each file). */
.script-contributors .assignee { display: inline-flex; align-items: center; gap: .15rem; margin: 0 .35rem .2rem 0; padding: .05rem .1rem .05rem .45rem; background: #3a2a1d; border: 1px solid #4d3929; border-radius: 999px; white-space: nowrap; }
.script-contributors .assignee form { display: inline; margin: 0; }
.script-contributors .assignee button { padding: 0 .35rem; min-height: 0; line-height: 1.2; color: #b5a088; background: none; border: 0; cursor: var(--cursor-pointer); }
.script-contributors .assignee button:hover { color: #ff8a8a; }
.script-contributors .assign-form { display: inline; margin: 0; }
.script-contributors .assign-form select { max-width: 9rem; padding: .1rem .3rem; font-size: .8rem; }
.progress-table tr.not-assigned td:first-child a { opacity: .6; }
.assignment-notice { margin: .8rem 0; padding: .6rem .9rem; color: #f5d27a; background: #2b2412; border: 1px solid #6b5720; border-radius: 4px; }

/* French grammar and spelling check (Grammalecte) drawn in the mirror layer. */
.code-backdrop mark.grammar-error { padding: 0; color: inherit; background: none; border-radius: 0; text-decoration-line: underline; text-decoration-style: wavy; text-decoration-thickness: 1px; text-decoration-skip-ink: none; text-underline-offset: 3px; }
.code-backdrop mark.grammar-error.grammar { text-decoration-color: #6cb6ff; }
.code-backdrop mark.grammar-error.spelling { text-decoration-color: #ff6b6b; }
.grammar-popup { position: fixed; z-index: 60; max-width: 380px; padding: .6rem .7rem; color: var(--ink); background: #1f160e; border: 1px solid #8a6a48; border-radius: 4px; box-shadow: 0 4px 16px #0009; font-size: .85rem; }
.grammar-popup p { margin: 0 0 .5rem; }
.grammar-popup div { display: flex; flex-wrap: wrap; gap: .35rem; }
.grammar-popup button { padding: .2rem .55rem; font-weight: 600; }
.grammar-popup .grammar-add-word { font-weight: normal; color: var(--muted); }
.script-contributors .self-assign-form { display: inline; margin: 0; }
.script-contributors .self-assign-form label { display: inline-flex; align-items: center; gap: .25rem; color: var(--muted); font-size: .8rem; cursor: var(--cursor-pointer); white-space: nowrap; }
.grammar-unavailable { margin: .6rem 0; padding: .5rem .8rem; color: #ffb3b3; background: #2b1414; border: 1px solid #6b2020; border-radius: 4px; font-size: .85rem; }

/* Linked duplicates: detach one occurrence, or link it back (left of the save button). */
.translation-editor .link-toggle { position: absolute; z-index: 2; right: calc(.4rem + 46px); bottom: .4rem; width: 40px; height: 40px; padding: 0; color: #9fd8ae; background: #1e2a22; border: 1px solid #3c5a44; border-radius: 6px; font-size: 1.2rem; line-height: 1; cursor: var(--cursor-pointer); }
.translation-editor .link-toggle:hover { color: #1a120c; background: #9fd8ae; }
.translation-editor .link-toggle.is-detached { color: #e6b47a; background: #2b2215; border-color: #5c4526; }
.translation-editor .link-toggle.is-detached:hover { color: #1a120c; background: #e6b47a; }
.translation-editor .link-toggle:disabled { opacity: .5; cursor: wait; }
.linked-hint { color: #9fd8ae; }

/* Languages searched by the text filter. */
.search-languages { min-width: 0; margin: 0; padding: 0; border: 0; color: var(--muted); font-size: .85rem; }
.search-languages legend { margin-bottom: .35rem; padding: 0; }
.search-languages div { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem .9rem; min-height: 2.35rem; }
.filters .search-languages label { flex-direction: row; align-items: center; gap: .3rem; color: var(--ink); }
.filters .search-languages input { width: auto; }

/* Game text keeps its own line breaks: a long line scrolls instead of wrapping. */
.translation-editor textarea { white-space: pre; overflow-x: auto; overflow-wrap: normal; }
.languages p.game-text { white-space: pre; overflow-wrap: normal; overflow-x: auto; }

/* CSV export of the file shown. */
.result-count:has(.csv-export) { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }

/* Account card shown when hovering a name. */
.user-name { cursor: help; border-bottom: 1px dotted currentColor; }
.user-card { position: fixed; z-index: 70; display: flex; align-items: center; gap: .8rem; min-width: 220px; max-width: 320px; padding: .75rem .9rem; color: var(--ink); background: #1f160e; border: 1px solid #8a6a48; border-radius: 8px; box-shadow: 0 6px 20px #000a; pointer-events: none; }
/* display: flex would otherwise override the hidden attribute. */
.user-card[hidden] { display: none; }
.user-card-avatar { display: grid; flex: none; place-items: center; width: 64px; height: 64px; overflow: hidden; color: #1a120c; background: var(--gold); border-radius: 50%; font-size: 1.8rem; font-weight: 800; }
.user-card-avatar img { width: 100%; height: 100%; object-fit: cover; }
.user-card strong { display: block; font-size: 1.35rem; line-height: 1.2; overflow-wrap: anywhere; }
.user-card-role { display: inline-block; margin-top: .3rem; padding: .1rem .5rem; color: #1a120c; background: #b5a088; border-radius: 999px; font-size: .78rem; font-weight: 700; }
.user-card-role.role-translator { background: #a6e3a1; }
.user-card-role.role-reviewer { background: #cba6f7; }
.user-card-role.role-admin { background: #f9e2af; }

/* Proposals: votes, current translation, proposal field for read-only files. */
.suggestion-item { display: flex; align-items: flex-start; gap: .8rem; }
.suggestion-item .suggestion-body { flex: 1; min-width: 0; }
.suggestion-item.current { border-color: #a6e3a1; }
.suggestion-item .game-text { margin: .2rem 0 .3rem; white-space: pre; overflow-x: auto; }
.vote-button { flex: none; min-width: 3.2rem; padding: .35rem .5rem; color: var(--muted); background: #1d1510; border: 1px solid #5e4631; border-radius: 6px; font-weight: 700; cursor: var(--cursor-pointer); }
.vote-button:hover { color: var(--ink); border-color: #c09858; }
.vote-button.voted { color: #1a120c; background: var(--gold); border-color: var(--gold); }
.current-badge { display: inline-block; padding: .05rem .5rem; color: #1a120c; background: #a6e3a1; border-radius: 999px; font-size: .75rem; font-weight: 700; }
.proposal-hint { color: #cba6f7; }

/* Notes: author of the shared note, and the discussion under it. */
.note-author { display: block; margin: -.4rem 1rem 0; color: var(--muted); }
.note-thread { margin-top: 1rem; padding: .8rem 1rem 1rem; border-top: 1px solid #4d3929; }
.note-thread h3 { margin: 0 0 .6rem; font-size: 1rem; }
.note-messages { display: grid; gap: .6rem; max-height: 45vh; overflow-y: auto; }
.note-message { padding: .55rem .7rem; background: #1d1510; border: 1px solid #4d3929; border-radius: 6px; }
.note-message header { display: flex; align-items: baseline; gap: .6rem; font-size: .85rem; }
.note-message header .user-name { font-weight: 700; color: var(--gold); }
.note-message time { color: var(--muted); }
.note-message-delete { margin-left: auto; padding: 0; color: var(--muted); background: none; border: 0; font-size: .8rem; cursor: var(--cursor-pointer); }
.note-message-delete:hover { color: #ff8a8a; }
.note-message p { margin: .35rem 0 0; }
.note-message-form { display: grid; gap: .45rem; margin-top: .7rem; }
.note-message-form textarea { width: 100%; color: var(--ink); background: #1d1510; border: 1px solid #5e4631; border-radius: 4px; padding: .55rem; font: inherit; resize: vertical; }
.note-message-form button { justify-self: end; }

/* Guests (no account): read-only. */
.guest-notice { padding: .1rem .55rem; color: #1a120c; background: #b5a088; border-radius: 999px; font-size: .78rem; font-weight: 700; }
.guest-invite { margin: .6rem 0 0; color: var(--muted); }
.vote-button:disabled { cursor: default; opacity: .75; }
.suggestion-delete { float: right; padding: 0; color: var(--muted); background: none; border: 0; font-size: .8rem; cursor: var(--cursor-pointer); }
.suggestion-delete:hover { color: #ff8a8a; }

/* Scene selection is a structural action: administrators only. */
body[data-structural-admin="0"] .scene-gutter { display: none; }

/* Scripts table: sortable headers, and rows coloured by status (red to green). */
.progress-table .sort-header { padding: 0; color: inherit; background: none; border: 0; font: inherit; font-weight: 700; cursor: var(--cursor-pointer); white-space: nowrap; }
.progress-table th[aria-sort="ascending"] .sort-header::after { content: " ▲"; font-size: .7em; }
.progress-table th[aria-sort="descending"] .sort-header::after { content: " ▼"; font-size: .7em; }
.progress-table tr.status-not_started td { background: rgba(235, 90, 110, .3); }
.progress-table tr.status-translating td { background: rgba(245, 150, 70, .3); }
.progress-table tr.status-needs_revision td { background: rgba(240, 120, 70, .32); }
.progress-table tr.status-awaiting_review td { background: rgba(235, 200, 70, .28); }
.progress-table tr.status-reviewing td { background: rgba(185, 210, 80, .28); }
.progress-table tr.status-reviewed td { background: rgba(90, 190, 100, .32); }
.progress-table tr.status-validated td { background: rgba(40, 170, 110, .42); }

/* Lexicon as a table: one row per term, as tall as its longest text. */
.lexicon-table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.lexicon-table th, .lexicon-table td { padding: .45rem .7rem; vertical-align: top; text-align: left; border-bottom: 2px solid #7a5c3e; overflow-wrap: anywhere; }
.lexicon-table thead th { position: sticky; top: 0; z-index: 1; color: var(--muted); background: var(--panel-2); font-size: .8rem; }
.lexicon-table tbody tr:hover td { background: #ffffff08; }
.lexicon-table td small { display: block; margin-top: .2rem; color: var(--muted); font-size: .78rem; }
.lexicon-table .lexicon-category { width: 9rem; }
.lexicon-table th:last-child:empty, .lexicon-table .lexicon-delete { width: 2.6rem; text-align: center; }
.lexicon-table .translation-form { gap: .25rem; }
.lexicon-table .translation-editor textarea { min-height: 0; padding: .35rem 2.4rem .35rem .5rem; overflow: hidden; resize: none; line-height: 1.4; }
.lexicon-table .translation-save { top: .2rem; bottom: auto; right: .25rem; width: 28px; height: 28px; font-size: 1rem; }
.lexicon-delete form { margin: 0; }
.lexicon-delete button { padding: .1rem .45rem; color: var(--muted); background: none; border: 1px solid transparent; border-radius: 4px; font-size: 1.1rem; line-height: 1; cursor: var(--cursor-pointer); }
.lexicon-delete button:hover { color: #ff8a8a; border-color: #6b2020; }
.lexicon-add-form { display: grid; grid-template-columns: auto 1fr 1fr 1fr auto; align-items: center; gap: .6rem; margin: .8rem 0; padding: .7rem .9rem; background: var(--panel); border: 1px solid #4d3929; border-radius: 6px; }
.lexicon-add-form input { min-width: 0; padding: .45rem .55rem; color: var(--ink); background: #1d1510; border: 1px solid #5e4631; border-radius: 4px; font: inherit; }
@media (max-width: 850px) { .lexicon-add-form { grid-template-columns: 1fr; } }

/* Another person on this French field: their colour and name. */
.translation-editor.being-edited textarea { border-color: var(--editor-colour); box-shadow: 0 0 0 1px var(--editor-colour); }
.translation-editor .editor-badge { position: absolute; z-index: 3; top: -.65rem; left: .5rem; padding: 0 .4rem; color: #1a120c; border-radius: 3px; font-size: .72rem; font-weight: 700; line-height: 1.3rem; pointer-events: none; }

.build-editing-warning { margin: .4rem 0 .8rem; padding: .5rem .8rem; color: #f5d27a; background: #2b2412; border: 1px solid #6b5720; border-radius: 4px; }

/* Bell: notifications, with the unread count in red. */
.notification-bell { position: relative; }
.bell-button { position: relative; padding: .2rem .45rem; color: var(--ink); background: none; border: 0; font-size: 1.15rem; cursor: var(--cursor-pointer); }
.bell-count { position: absolute; top: -.15rem; right: -.25rem; min-width: 1.05rem; padding: 0 .25rem; color: #fff; background: #e5484d; border-radius: 999px; font-size: .68rem; font-weight: 800; line-height: 1.05rem; text-align: center; }
.bell-panel { position: absolute; z-index: 80; top: calc(100% + .4rem); right: 0; width: min(380px, 90vw); max-height: 60vh; overflow-y: auto; padding: .4rem; background: #21170f; border: 1px solid #5e4631; border-radius: 8px; box-shadow: 0 10px 30px #000b; }
.bell-panel[hidden] { display: none; }
.bell-item { display: block; padding: .5rem .6rem; color: var(--muted); text-decoration: none; border-radius: 5px; }
.bell-item.unread { color: var(--ink); background: #e5484d1a; }
.bell-item:hover { background: #ffffff10; }
.bell-item small { display: block; margin-top: .15rem; color: var(--muted); font-size: .72rem; }
.bell-empty { margin: .5rem; color: var(--muted); }
.bell-panel form { margin: .3rem .4rem 0; text-align: right; }
/* Drive conflicts: red rows in the scripts table, both versions to choose from. */
.progress-table tr.has-conflict td { background: rgba(229, 72, 77, .42) !important; }
.conflict-button { display: block; margin-top: .3rem; padding: .1rem .45rem; color: #fff; background: #c4303a; border: 0; border-radius: 4px; font-size: .75rem; font-weight: 700; cursor: var(--cursor-pointer); white-space: nowrap; }
.drive-conflict-list { display: grid; gap: .8rem; padding: 1rem; }
.drive-conflict-item { padding: .7rem .8rem; background: #2a1517; border: 1px solid #a33a40; border-radius: 6px; }
.drive-conflict-item header { margin-bottom: .5rem; }
.drive-conflict-item.settled { background: #15241a; border-color: #3c6b46; }
.conflict-versions { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; }
.conflict-versions b { color: var(--muted); font-size: .75rem; }
.conflict-versions .game-text { margin: .2rem 0 0; white-space: pre-wrap; }
.conflict-choices { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .6rem; }
.entry-conflict { margin: .6rem .8rem 0; }
@media (max-width: 700px) { .conflict-versions { grid-template-columns: 1fr; } }

/* Compact lines: the details of a line sit above its character. */
.structural-toolbar .toolbar-count { flex: none; }
.structural-toolbar .toolbar-spacer { flex: 1; }
.structural-toolbar .toolbar-icon { padding: .3rem .55rem; font-size: 1rem; line-height: 1; }
/* The icons are stacked on the left of the cell; the character stays centred beside them. */
/* Same margin on both sides: the character stays centred, the icons sit in the left one. */
.languages > .entry-character { position: relative; padding-left: 2.7rem; padding-right: 2.7rem; }
.entry-character .entry-meta { position: absolute; top: .5rem; left: .4rem; flex-direction: column; flex-wrap: nowrap; align-items: center; justify-content: flex-start; gap: .3rem; }
.entry-meta { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: .25rem; color: var(--muted); font-size: .8rem; }
.entry-meta .entry-ordinal { color: var(--gold); font-weight: 700; }
.entry-meta .annotation-button, .entry-meta .voice-button { padding: .05rem .35rem; font-size: .78rem; line-height: 1.35; }
.entry-meta .note-button [data-message-count]:not(:empty) { margin-left: .15rem; }
.entry-meta .duplicate-state { font-size: .78rem; cursor: help; }
.entry-character .review-flag { font-size: .75rem; }
.entry-search-header { display: flex; padding: .4rem 1rem; background: var(--panel-2); }
body[data-structural-admin="1"] .scene-entries .entry .entry-character { cursor: var(--cursor-pointer); }
.search-dialog .search-filters { margin: 0; border-radius: 0; }

/* ===== Liberl look: game cursor, orbal frames, brass buttons, soft motion. ===== */
html { cursor: var(--cursor); }
a, button, select, summary, label, [role="button"], input[type="checkbox"], input[type="radio"], input[type="submit"], input[type="file"] { cursor: var(--cursor-pointer); }
textarea, input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]):not([type="button"]):not([type="file"]), [contenteditable] { cursor: text; }
button:disabled { cursor: var(--cursor); }

/* Wood and leather background, darker towards the bottom. */
body { background: linear-gradient(#1b140fd9, #140e0af2), url("/assets/img/platform/leather.png") 0 0 / 192px; background-color: #1b140f; }
.platform-header { background: linear-gradient(#3b2a1cf2, #2a1d13f2), url("/assets/img/platform/leather.png") 0 0 / 192px; border-bottom: 1px solid #8a6a48; box-shadow: 0 1px 0 #d4af3740, 0 4px 18px #0009; }
.brand { display: flex; align-items: center; flex: none; }
.brand img { display: block; height: 40px; width: auto; filter: drop-shadow(0 2px 3px #000b); transition: filter .2s; }
.brand:hover img { filter: drop-shadow(0 2px 3px #000b) drop-shadow(0 0 8px #fde08d66); }
.platform-nav a:hover, .platform-nav a.active { color: var(--gold); background: #ffe7a014; box-shadow: inset 0 -2px #d4af37; }
.page-title h1 { color: var(--gold); font-weight: 700; letter-spacing: .02em; text-shadow: 0 2px 4px #0008; }
.page-title::after { content: ""; display: block; height: 24px; margin-top: .2rem; background: url("/assets/img/platform/divider.png") left center / auto 24px no-repeat; opacity: .85; }

/* Japanese text: a rounder, more readable font. */
[lang="ja"], .fuzzy-result-jp, #fuzzy-detail-jp { font-family: "Zen Maru Gothic", "Yu Gothic UI", "Meiryo", sans-serif; }

/* Orbal frames: the game's menu window, gold edges and ornate corners. */
.panel, .login-card, .entry-dialog, .empty-state, .backup-calendar, .content-card, .summary-strip {
    background-color: var(--panel); border: 1px solid transparent; border-radius: 0;
    border-image: url("/assets/img/platform/frame.png") 24 / 22px round;
    box-shadow: 0 6px 24px #0008;
}
.entry-dialog { padding: 8px; }
.entry-dialog > header { background: linear-gradient(#4a3626, #3a2a1e); border-bottom-color: #8a6a48; }
.entry-dialog > header strong { color: var(--gold); }

/* Brass buttons with a light sweep on hover (buttons with their own colour keep it). */
button { color: #fff8e8; background-color: #8a5a2b; background-image: linear-gradient(105deg, transparent 38%, #fff4d055 50%, transparent 62%), linear-gradient(#b07a40, #7d4f27); background-size: 260% 100%, 100% 100%; background-position: 130% 0, 0 0; background-repeat: no-repeat; text-shadow: 0 1px 1px #0009; transition: background-position .6s ease, filter .15s, transform .12s; }
button:where(:not(.link-button, .dialog-close, .fuzzy-close, .bell-button, .sort-header, .note-message-delete, .suggestion-delete, .fuzzy-result, .fuzzy-common, .scene-gutter, .translation-save, .link-toggle, .entry-tracker-current, .sound-toggle)) { box-shadow: inset 0 0 0 1px #d4a35a99, inset 0 1px #ffe2a055, 0 1px 3px #0007; }
button:hover:not(:disabled) { background-position: -30% 0, 0 0; filter: brightness(1.08); }
button:active:not(:disabled) { transform: translateY(1px); }
.link-button, .dialog-close, .fuzzy-close, .bell-button, .sort-header { text-shadow: none; }
.danger { background: linear-gradient(#a8434f, #7a2e38); }
/* Icon buttons grow slightly. */
.toolbar-icon, .bell-button, .annotation-button, .voice-button, .link-toggle, .sound-toggle, .translation-save:not(.is-saved) { transition: transform .12s ease, filter .15s, background-color .15s; }
.toolbar-icon:hover, .bell-button:hover, .annotation-button:hover, .voice-button:hover, .translation-editor .link-toggle:hover, .sound-toggle:hover, .translation-save:hover { transform: scale(1.08); }
.annotation-button { background: #4a3a2c; border-color: #7a6650; }
.annotation-button.has-content { color: #fff6dc; background: #6b4a2b; border-color: #d4a35a; }

/* Fields: warm wood, gold glow on the French field being written. */
.translation-editor textarea { transition: border-color .15s, box-shadow .2s; }
.translation-editor textarea[name="translation_fr"]:focus { outline: none; border-color: #d4af37; box-shadow: 0 0 0 1px #d4af3780, 0 0 16px #fde08d2e; }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 1px solid #d4af37; outline-offset: 1px; }

/* Bubbles: light (pages hold hundreds), gold edge on hover, no motion. */
.entry { border-color: #4d3929; transition: border-color .15s; }
.entry:hover { border-color: #a07c50; }
.entry > header, .scene-header { background: linear-gradient(#42301f, #362719); }
.scene-header strong { color: #e8b77a; }
.clm-scene { background: #211710; }
/* Arriving on a bubble (link, resume): one gold pulse. */
.entry.arrival { animation: arrival-pulse 1.8s ease-out; }
@keyframes arrival-pulse { 0%, 35% { border-color: #fde08d; box-shadow: 0 0 0 2px #fde08d, 0 0 26px #fde08d66; } 100% { box-shadow: 0 0 0 0 transparent; } }

/* Autosave: a thin light line runs under the field once saved. */
.translation-form.autosaved .translation-editor::after { content: ""; position: absolute; z-index: 3; left: 8px; right: 8px; bottom: 0; height: 2px; background: linear-gradient(90deg, transparent, #fde08d, transparent); transform-origin: left; animation: autosave-line .9s ease-out forwards; pointer-events: none; }
@keyframes autosave-line { from { transform: scaleX(0); opacity: 1; } 70% { opacity: 1; } to { transform: scaleX(1); opacity: 0; } }
/* Toolbar: state of the saves (dot), shrinks on scroll, reading progress line. */
.save-indicator { display: inline-flex; align-items: center; gap: .35rem; color: var(--muted); font-size: .8rem; white-space: nowrap; }
.save-indicator::before { content: ""; width: .55rem; height: .55rem; border-radius: 50%; background: #a6e3a1; box-shadow: 0 0 6px #a6e3a1aa; }
.save-indicator[data-state="dirty"]::before { background: #f9e2af; box-shadow: 0 0 6px #f9e2afaa; }
.save-indicator[data-state="saving"]::before { background: #fde08d; animation: save-dot .7s ease-in-out infinite alternate; }
.save-indicator[data-state="error"]::before { background: #f38ba8; box-shadow: 0 0 6px #f38ba8aa; }
@keyframes save-dot { from { opacity: .35; } to { opacity: 1; } }
.structural-toolbar { background: #2a1d13ee; border-color: #8a6a48; transition: padding .2s ease, box-shadow .2s; }
.structural-toolbar.is-compact { padding-top: .3rem; padding-bottom: .3rem; box-shadow: 0 6px 18px #000a; }
.structural-toolbar::after { content: ""; position: absolute; left: 6px; right: 6px; bottom: -1px; height: 2px; background: linear-gradient(90deg, #c8814a, #fde08d); border-radius: 2px; transform: scaleX(var(--read-progress, 0)); transform-origin: left; pointer-events: none; }

/* Progress bars: copper to gold; the larger ones shimmer. */
.progress { background: #150f0a; border: 1px solid #5e4631; box-shadow: inset 0 1px 2px #000a; }
.progress span { position: relative; overflow: hidden; background: linear-gradient(90deg, #8a5a2b, #d4af37 60%, #fde08d); box-shadow: 0 0 6px #fde08d55; }
.content-card .progress span::after, .build-progress span::after { content: ""; position: absolute; inset: 0; background: linear-gradient(100deg, transparent 30%, #fff8 50%, transparent 70%); transform: translateX(-100%); animation: progress-shimmer 3s ease-in-out infinite; }
@keyframes progress-shimmer { 60%, 100% { transform: translateX(100%); } }

/* Scripts table: lit row, gold file name; status as a pill. */
.progress-table th { color: #e0c48f; background: #2a1d13; }
.progress-table tbody tr:hover td { background-image: linear-gradient(#ffe7a01c, #ffe7a01c); }
.progress-table tbody tr:hover td:first-child a { color: #fff1c2; text-shadow: 0 0 8px #fde08d99; }
.status-pill { display: inline-block; padding: .12rem .6rem; color: #1a120c; border-radius: 999px; font-size: .8rem; font-weight: 700; white-space: nowrap; box-shadow: inset 0 1px #fff6, 0 1px 2px #0006; }
.status-pill.status-not_started { background: #e88a96; }
.status-pill.status-translating { background: #f0a868; }
.status-pill.status-needs_revision { background: #ee9668; }
.status-pill.status-awaiting_review { background: #ecd078; }
.status-pill.status-reviewing { background: #c6da82; }
.status-pill.status-reviewed { background: #8fd29a; }
.status-pill.status-validated { background: #5fc99a; }
.workflow-status-form select { border-radius: 999px; padding-left: .7rem; }

/* Home: character on each card, depth on hover; emblem watermark. */
.content-card { position: relative; overflow: hidden; transition: transform .2s ease, box-shadow .2s ease; }
.content-card > *:not(.card-art) { position: relative; z-index: 1; }
.content-card .card-art { position: absolute; right: .9rem; top: .9rem; width: 96px; height: 96px; filter: drop-shadow(0 4px 6px #000a); transition: transform .25s ease; }
.content-card:hover { transform: translateY(-3px); box-shadow: 0 14px 30px #000b, 0 0 18px #fde08d1f; }
.content-card:hover .card-art { transform: translate(-4px, -3px) scale(1.07) rotate(-2deg); }
.home-page::before, .platform-login::before { content: ""; position: fixed; z-index: -1; left: 50%; top: 55%; width: min(70vmin, 620px); aspect-ratio: 1; background: url("/assets/img/platform/emblem.png") center / contain no-repeat; opacity: .07; transform: translate(-50%, -50%); pointer-events: none; }
.login-card { padding: 1.5rem 1.75rem; }
.login-card h1 { color: var(--gold); }

/* Menus and tooltips: warm, and they fade in. */
.bell-panel, .translation-presence ul, .structural-context-menu { background: #261a11; border-color: #8a6a48; }
.mark-tooltip, .user-card, .grammar-popup, .lexicon-term:hover::after, .item-reference:hover::after { background: #241910; border-color: #a07c50; box-shadow: inset 0 1px #fde08d33, 0 6px 20px #000a; }
.sound-toggle { padding: .2rem .4rem; color: var(--ink); background: none; border: 0; font-size: 1.05rem; opacity: .75; }
.sound-toggle[aria-pressed="true"] { opacity: 1; }

/* Skeleton while the close texts load. */
.fuzzy-skeleton { display: grid; gap: .55rem; padding: .75rem; }
.fuzzy-skeleton span { height: 2.6rem; border-radius: 5px; background: linear-gradient(100deg, #2e2119 30%, #463423 50%, #2e2119 70%) 0 0 / 300% 100%; animation: skeleton 1.3s linear infinite; }
@keyframes skeleton { from { background-position: 100% 0; } to { background-position: 0 0; } }

/* Sparkles when a file reaches 100 %. */
.sparkle-burst { position: fixed; z-index: 90; width: 0; height: 0; pointer-events: none; }
.sparkle-burst i { position: absolute; width: 8px; height: 8px; margin: -4px; background: radial-gradient(circle, #fff 0 20%, #fde08d 35%, transparent 70%); border-radius: 50%; animation: sparkle 1.1s ease-out forwards; }
@keyframes sparkle { from { transform: translate(0, 0) scale(1.4); opacity: 1; } to { transform: translate(var(--dx), var(--dy)) scale(.2); opacity: 0; } }

@media (prefers-reduced-motion: no-preference) {
    body { animation: page-in .15s ease-out; }
    dialog[open] { animation: dialog-in .18s ease-out; }
    dialog[open]::backdrop { animation: backdrop-in .18s ease-out; }
    .bell-panel:not([hidden]), .translation-presence.open ul, .structural-context-menu:not([hidden]) { animation: menu-in .14s ease-out; }
    .mark-tooltip, .user-card:not([hidden]), .grammar-popup, .lexicon-term:hover::after, .item-reference:hover::after { animation: tooltip-in .14s ease-out; }
}
.entry-dialog::backdrop { background: #0c0805a8; backdrop-filter: blur(3px); }
@keyframes page-in { from { opacity: 0; } }
@keyframes dialog-in { from { opacity: 0; transform: translateY(8px) scale(.96); } }
@keyframes backdrop-in { from { opacity: 0; } }
@keyframes menu-in { from { opacity: 0; transform: translateY(-5px); } }
@keyframes tooltip-in { from { opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
    .sparkle-burst { display: none; }
}



/* No second ornate frame inside a window. */
.entry-dialog .empty-state, .panel .empty-state { background: transparent; border: 1px dashed #5e4631; border-image: none; box-shadow: none; }
/* Chapter of a file, chosen by administrators in the scripts table. */
.chapter-form { margin: 0; }
.chapter-form select { max-width: 9rem; padding: .3rem .4rem; color: var(--ink); background: var(--field); border: 1px solid var(--line); border-radius: 4px; }

/* Lexicon and tables on a phone: JP, EN and FR one under the other. */
@media (max-width: 700px) {
    .lexicon-table, .lexicon-table tbody, .lexicon-table tr, .lexicon-table td,
    .lexicon-table .lexicon-category, .lexicon-table .lexicon-delete { display: block; width: auto; }
    .lexicon-table thead { display: none; }
    .lexicon-table tr { position: relative; padding: .55rem .7rem; border-bottom: 3px solid #8a6a48; }
    .lexicon-table td { padding: .25rem 0; border: 0; }
    .lexicon-table td[data-label]::before { content: attr(data-label); display: block; margin-bottom: .1rem; color: var(--muted); font-size: .72rem; font-weight: 700; }
    .lexicon-table .lexicon-delete { position: absolute; top: .35rem; right: .4rem; }
}

/* ===== Phone: navigation and account in a side panel, like the public site's sidebar. ===== */
.platform-drawer { display: contents; }
.platform-menu-toggle, .platform-drawer-overlay { display: none; }
@media (max-width: 760px) {
    .platform-header { flex-wrap: nowrap; align-items: center; min-height: 56px; padding: .5rem 1rem; }
    .platform-menu-toggle { display: flex; flex-direction: column; justify-content: center; gap: 5px; margin-left: auto; padding: 9px 9px; background: #4a2f1a; border: 2px solid #d4af37; border-radius: 5px; box-shadow: none; }
    .platform-menu-toggle span { display: block; width: 24px; height: 3px; background: #fff8e8; border-radius: 2px; transition: transform .2s, opacity .2s; }
    body.platform-drawer-open .platform-menu-toggle span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
    body.platform-drawer-open .platform-menu-toggle span:nth-child(2) { opacity: 0; }
    body.platform-drawer-open .platform-menu-toggle span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }
    .platform-drawer {
        position: fixed; z-index: 2000; top: 0; left: 0; bottom: 0; width: min(280px, 85vw);
        display: flex; flex-direction: column; gap: 1rem; padding: 1.2rem 1rem 2rem; overflow-y: auto;
        background: url("/assets/img/sidebar_bg.webp") center top / 100% auto repeat-y, #3e3024;
        border-right: 2px solid #8a6a48; transform: translateX(-100%); transition: transform .3s cubic-bezier(.4, 0, .2, 1);
    }
    body.platform-drawer-open .platform-drawer { transform: translateX(0); box-shadow: 8px 0 18px #000c; }
    .platform-drawer-overlay { display: block; position: fixed; z-index: 1990; inset: 0; background: #0008; }
    .platform-drawer-overlay[hidden] { display: none; }
    /* Inside the panel: everything in one column, full width. */
    .platform-drawer .platform-nav { order: 0; width: auto; flex-direction: column; align-items: stretch; gap: .3rem; overflow: visible; }
    .platform-drawer .platform-nav a { padding: .65rem .9rem; color: var(--ink); background: #2a1d13d9; border: 1px solid #8a6a48; border-radius: 5px; box-shadow: none; }
    .platform-drawer .platform-nav a.active { color: #1a120c; background: linear-gradient(#fde08d, #d4af37); }
    .platform-drawer .account { margin: 0; flex-direction: column; align-items: stretch; gap: .5rem; font-size: 1rem; }
    .platform-drawer .account > a, .platform-drawer .account > span, .platform-drawer .account form { display: block; padding: .45rem .9rem; background: #2a1d13d9; border-radius: 5px; }
    .platform-drawer .account span { display: inline; }
    .platform-drawer .account > a { color: var(--gold); }
    .platform-drawer .account-avatar { align-self: center; width: 56px; height: 56px; }
    .platform-drawer .guest-notice { align-self: flex-start; }
    .platform-drawer .bell-button, .platform-drawer .sound-toggle { align-self: flex-start; }
    .platform-drawer .bell-panel, .platform-drawer .translation-presence ul { position: static; width: auto; margin-top: .4rem; }
    .platform-drawer .translation-presence > button { width: 100%; }
}
@media (max-width: 760px) {
    /* The sticky header holds the panel: it must sit above the dark overlay. */
    body.platform-drawer-open .platform-header { z-index: 2001; }
    .platform-drawer .account > a, .platform-drawer .account > span, .platform-drawer .account form { background: #1f160ee6; border: 1px solid #5e4631; }
    /* The lines toolbar wraps instead of widening the page. */
    .structural-toolbar { flex-wrap: wrap; }
    .structural-toolbar .toolbar-spacer { display: none; }
}

/* Phone: the room goes to the French field. The toolbar stays at the top of the page,
   and the close texts panel (which would cover the whole screen) and the side tracker are hidden. */
@media (max-width: 760px) {
    .structural-toolbar { position: static; }
    .structural-toolbar::after { display: none; }
    #fuzzy-toggle, .fuzzy-panel, .entry-tracker { display: none !important; }
}

/* ===== "Cuir moyen" palette: one gradual scale from the page to the French field.
   page (beige) → large blocks (caramel) → bubbles and windows (sand) → fields (paper) → French field (cream).
   Dark ink everywhere inside; only the header, menus and tooltips stay dark. ===== */
:root { --link: #e8c37a; }
html { min-height: 100%; }
body { background: #d4c19b; }
main, .page-title, dialog, .fuzzy-panel, .platform-login {
    color-scheme: light;
    --ink: #24180f; --muted: #5a4632; --link: #6b3a12; --gold: #6b3a12;
    --page: #d9c7a2; --block: #a88a63; --block-head: #9b7d57; --sand: #c4a87f;
    --field: #d8c6a2; --field-fr: #e2d3b3; --field-line: #9e8160; --line: #8a6c47;
    --panel: var(--block); --panel-2: var(--block-head);
    color: var(--ink);
}
/* Dark islands: menus, tooltips and notices keep light text. */
.structural-context-menu, .mark-tooltip, .grammar-popup, .user-card, .lexicon-term:hover::after, .item-reference:hover::after {
    color-scheme: dark; --ink: #f3e9d8; --muted: #bba68a; --link: #e8c37a; --gold: #fde08d; color: var(--ink);
}
a { color: var(--link); }
a:hover { color: var(--link); filter: brightness(1.2); }
.page-title h1 { color: #4a2a10; text-shadow: none; }
main > .success, .success { color: #2f6b3c; font-weight: 600; }
main > .error, .error, .source-save-error, .translation-save-error { color: #9e2a35 !important; }
.home-page::before, .platform-login::before { opacity: .14; }

/* Large blocks: caramel, with a darker head. */
.panel, .login-card, .empty-state, .backup-calendar, .content-card, .summary-strip, .filters, .table-wrap,
.lexicon-entry, .lexicon-add-form, .clm-scene, .structural-toolbar { background-color: var(--block); border-color: var(--line); color: var(--ink); }
.panel, .login-card, .empty-state, .backup-calendar, .content-card, .summary-strip { box-shadow: 0 4px 14px #4a321a40; }
.content-card:hover { box-shadow: 0 12px 26px #4a321a59, 0 0 16px #fde08d33; }
.structural-toolbar { background: #a88a63f2; box-shadow: 0 4px 12px #4a321a40; }
.structural-toolbar.is-compact { box-shadow: 0 6px 16px #4a321a59; }
.structural-toolbar strong, .entry > header strong, .entry-file-link, .lexicon-entry > header strong { color: var(--gold); }
.scene-header, .entry > header, .lexicon-entry > header, .entry-search-header { background: var(--block-head); color: var(--muted); }
.scene-header strong { color: #4a2a10; }
.clm-scene { box-shadow: 0 2px 6px #4a321a33; }
.clm-scene:hover { border-color: #6b4f30; box-shadow: 0 3px 10px #4a321a4d; }
.clm-scene.scene-selected { border-color: #b07a1e; box-shadow: 0 0 0 2px #b07a1e55; }
.scene-gutter { background: var(--line); }
.clm-scene:hover .scene-gutter { background: #6b4f30; }
.clm-scene.scene-selected .scene-gutter { background: #b07a1e; }
.content-card h2, .login-card h1 { color: #4a2a10; }

/* Bubbles and windows: sand. */
.entry { background: var(--sand); border-color: var(--line); box-shadow: 0 1px 3px #4a321a33; }
.entry:hover { border-color: #5e3311; }
.languages > div, .source-form > div { border-right-color: var(--line); }
@media (max-width: 850px) { .languages > div { border-bottom-color: var(--line); } }
.entry-dialog { background-color: var(--sand); }
.entry-dialog > header { background: var(--block); border-bottom-color: var(--line); }
.entry-dialog > header strong { color: #4a2a10; }
.entry-dialog::backdrop { background: #2a1d1399; }
.languages p.game-text { color: var(--ink); }

/* Fields: paper, the French field one step lighter. */
:is(main, dialog, .platform-login, .fuzzy-panel) :is(input:not([type="checkbox"]):not([type="radio"]):not([type="file"]), select, textarea) {
    color: var(--ink); background-color: var(--field); border: 1px solid var(--field-line);
}
:is(main, dialog) .translation-editor textarea[name="translation_fr"] { background-color: var(--field-fr); }
:is(main, dialog) .translation-editor textarea[name="translation_fr"]:focus { border-color: #b07a1e; box-shadow: 0 0 0 1px #b07a1e80, 0 0 14px #fde08d66; }
input::placeholder, textarea::placeholder { color: #7a6448; }
@keyframes translation-save-confirmed { from { background-color: #b9d8a6; } to { background-color: #e2d3b3; } }
@keyframes source-text-save-confirmed { from { background-color: #c9b38c; } to { background-color: #d8c6a2; } }
.translation-form.autosaved .translation-editor::after { background: linear-gradient(90deg, transparent, #b07a1e, transparent); }
.entry.reviewer-edited { border-color: #7a4cb0; box-shadow: inset 3px 0 #7a4cb0; }
.entry.reviewer-edited .translation-editor textarea { color: #4f2585; }
.entry.cell-selected { border-color: #2f7f96; box-shadow: 0 0 0 2px #2f7f9655; }
.entry.bubble-selected { border-color: #7a4cb0; box-shadow: 0 0 0 2px #7a4cb055; }
.entry.cell-selected[data-selected-language="jp"] textarea[name="source_jp"],
.entry.cell-selected[data-selected-language="en"] textarea[name="source_en"],
.entry.cell-selected[data-selected-language="fr"] textarea[name="translation_fr"] { outline-color: #2f7f96; }
.translation-editor textarea.has-code-backdrop::selection { background: #2f7f9640; }

/* Codes, lexicon terms and spelling marks, redone for paper. */
.engine-code { color: #1b6a84; }
.engine-code.engine-wait { color: #a84f16; }
.lexicon-term { color: #4a3208; background: #ecd28a; border-bottom-color: #8a6a20; }
.lexicon-term.untranslated { color: #4a4038; background: #d3c5ad; border-bottom-color: #6b5e4c; }
.item-reference { color: #1f4a2c; background: #c4e3c6; border-bottom-color: #2f6b3c; }
.item-reference.untranslated { color: #4a4038; background: #d3c5ad; border-bottom-color: #6b5e4c; }
.code-backdrop mark.grammar-error.grammar { text-decoration-color: #1f62c4; }
.code-backdrop mark.grammar-error.spelling { text-decoration-color: #c42828; }
.missing { color: #9e2a35; }

/* Character column and the bubble's small buttons. */
.entry-character strong, .entry-meta .entry-ordinal { color: #5e3311; }
.annotation-button { color: #4a3220; background: var(--field); border-color: var(--field-line); }
.annotation-button.has-content { color: #fff8e8; background: #a8713a; border-color: #7d4f27; }
.duplicate-state { color: #2f6b3c; }
.duplicate-state.detached { color: #8a4f12; }
.translation-editor .link-toggle { color: #2f5a2a; background: #cfe0bf; border-color: #6f9a6a; }
.translation-editor .link-toggle:hover { color: #fff8e8; background: #4f7f49; }
.translation-editor .link-toggle.is-detached { color: #7a4410; background: #ecd2a6; border-color: #b07a3a; }
.translation-editor .link-toggle.is-detached:hover { color: #fff8e8; background: #a8713a; }
.linked-hint { color: #2f6b3c; }
.review-flag { color: #3a2608; background: #ecd078; }
.proposal-hint { color: #6b3fa0; }

/* Line icons: drawn with the text colour, sized with it. */
.icon { display: inline-block; width: 1.15em; height: 1.15em; vertical-align: -.2em; flex: none; }
.translation-save .icon { width: .75em; height: .75em; vertical-align: middle; stroke-width: 3; }
.link-toggle .icon { width: .9em; height: .9em; vertical-align: middle; }
.entry-meta .icon, .duplicate-state .icon { width: 1.05em; height: 1.05em; }
.duplicate-state { display: inline-flex; align-items: center; gap: .1rem; }
.toolbar-icon .icon { width: 1.05em; height: 1.05em; }
.bell-button .icon, .sound-toggle .icon { width: 1.2em; height: 1.2em; }
.bell-button, .sound-toggle { color: #f3e9d8; }
.conflict-button .icon { width: 1em; height: 1em; vertical-align: -.15em; }
.voice-missing { color: var(--muted); }

/* Tables. */
.progress-table th, .lexicon-table thead th { color: #3a2614; background: var(--block-head); }
.progress-table th, .progress-table td, .accounts-table th, .accounts-table td { border-bottom-color: var(--line); }
.lexicon-table th, .lexicon-table td { border-bottom-color: #7d5f3f; }
.progress-table a { color: #4a2208; }
.progress-table tbody tr:hover td { background-image: linear-gradient(#fff3d626, #fff3d626); }
.progress-table tbody tr:hover td:first-child a { color: #3a1a04; text-shadow: 0 0 8px #fde08dcc; }
.lexicon-table tbody tr:hover td { background: #fff3d61f; }
.script-contributors .assignee { background: var(--field); border-color: var(--field-line); }
.script-contributors .assignee button { color: var(--muted); }
.jp-badge.ok, .jp-badge.fill, .jp-badge.pauses { color: #2f6b3c; background: #2f6b3c1f; }
.jp-badge.missing, .jp-badge.different { color: #9e2a35; background: #9e2a351f; }
.jp-badge.split { color: #7a5408; background: #b0841e26; }
.jp-badge.none { background: #24180f12; }
.progress { background: #7a5f40; border-color: #6b5236; box-shadow: inset 0 1px 2px #2a1d1380; }

/* Windows: proposals, notes, conflicts. */
.suggestion-item, .note-message { background: var(--field); border-color: var(--field-line); }
.suggestion-item.current { border-color: #4f8a4a; }
.vote-button { color: var(--muted); background: var(--field-fr); border-color: var(--field-line); }
.vote-button:hover { color: var(--ink); border-color: #6b4f30; }
.vote-button.voted { color: #1a120c; background: #d4af37; border-color: #a8862a; }
.note-thread, .add-suggestion-form { border-top-color: var(--line); }
.drive-conflict-item { background: #e7c3b8; border-color: #a8443e; }
.drive-conflict-item.settled { background: #cfe0bf; border-color: #4f8a4a; }
.assignment-notice, .build-editing-warning { color: #4a3208; background: #ecd9a2; border-color: #b0902e; }
.grammar-unavailable { color: #7a1c1c; background: #ecc7bf; border-color: #b04a40; }

/* Calendar and build pages. */
.calendar-day { background: var(--sand); border-color: var(--line); }
.calendar-day.has-backup { background: #c3d6a8; border-color: #4f8a4a; }
.calendar-day small { color: #2f5a2a; }
.build-checks li { background: var(--sand); border-color: var(--line); }
.build-checks .check-ok { background: #c3d6a8; border-color: #4f8a4a; }
.build-checks .check-failed { background: #e7c3b8; border-color: #a8443e; }
.build-status pre { color: var(--ink); background: var(--field); border-color: var(--field-line); }

/* Close texts panel. */
.fuzzy-panel { background: var(--block); border-left-color: var(--line); box-shadow: -8px 0 24px #4a321a59; }
.fuzzy-panel > header, .fuzzy-result { border-bottom-color: var(--line); }
.fuzzy-panel > header strong { color: #4a2a10; }
.fuzzy-panel > header small, .fuzzy-status, .fuzzy-detail b { color: var(--muted); }
.fuzzy-results { background: var(--sand); }
.fuzzy-result { color: var(--ink); }
.fuzzy-result:hover, .fuzzy-result.selected { background: #b39570; }
.fuzzy-result-fr { color: var(--muted); }
.fuzzy-common { color: #2f6b3c; }
.fuzzy-detail { background: var(--block); border-top-color: var(--line); }
.fuzzy-detail > div { background: var(--field); border-color: var(--field-line); }
.fuzzy-meta { color: #1b5a70; }
.fuzzy-skeleton span { background: linear-gradient(100deg, #b39570 30%, #cdb48e 50%, #b39570 70%) 0 0 / 300% 100%; }
.entry-dialog .empty-state, .panel .empty-state { border-color: var(--line); }
/* Checkboxes and scrollbars in the same browns. */
:is(main, dialog, .fuzzy-panel) { accent-color: #8a5a2b; }
:is(main, dialog, .fuzzy-panel) :is(textarea, .table-wrap, .fuzzy-results, .suggestion-list, .note-messages, .languages p.game-text) { scrollbar-color: #8a6c47 transparent; }

/* Account names on the account's colour (the one framing the French field the person is on). */
.user-name { padding: 0 .35em; color: #1a120c; background: var(--user-colour, #bba68a); border-bottom: 0; border-radius: 4px; text-shadow: none; }
.note-message header .user-name { color: #1a120c; }

/* Scripts table: no JP column; the counts and the progress bar get the room. */
.progress-table .jp-state { display: none; }
.progress-table .translated-cell { white-space: nowrap; }
.progress-table .progress-cell { min-width: 230px; white-space: nowrap; }
.progress-table .progress-cell .table-progress { width: calc(100% - 3.6rem); min-width: 150px; }

/* Home cards: the percentage beside the count. */
.card-total { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; }
.card-percent { color: #4a2a10; font-size: 1.5rem; font-weight: 800; }

/* Lexicon and tables: rows one step lighter than the caramel frame, for the text read on them. */
.lexicon-table tbody tr, .lexicon-table tbody td { background-color: #c9b28a; }
.lexicon-table tbody tr:hover td { background-color: #d3bd96; }
/* Their fields stay one step lighter than the rows. */
.lexicon-table { --field: #e5d7b9; --field-fr: #ede2c9; }

/* Copy button: lower right corner of a field, half transparent, only while the field is hovered. */
.translation-editor, .languages > div:has(> p.game-text), .conflict-versions > div, .suggestion-body { position: relative; }
.copy-button { position: absolute; z-index: 3; right: .45rem; bottom: .45rem; display: grid; place-items: center; width: 28px; height: 28px; padding: 0; color: #3a2614; background: #fff8e8cc; border: 1px solid #9e8160; border-radius: 5px; box-shadow: none; text-shadow: none; opacity: 0; pointer-events: none; transition: opacity .15s, background-color .15s; }
:is(.translation-editor, .languages > div, .conflict-versions > div, .suggestion-body):hover > .copy-button { opacity: .55; pointer-events: auto; }
.copy-button:hover, .copy-button:focus-visible { opacity: 1 !important; background: #fff8e8; }
.copy-button.copied { color: #2f6b3c; opacity: 1; }
.copy-button .icon { width: 15px; height: 15px; vertical-align: 0; }
/* Beside the save button and the duplicates chain when they show, never over them. */
.translation-editor:has(> .translation-save:not(.is-saved)) > .copy-button { right: calc(.4rem + 46px); }
.translation-editor:has(> .link-toggle) > .copy-button { right: calc(.4rem + 92px); }
.lexicon-table .translation-editor > .copy-button { top: .25rem; bottom: auto; width: 24px; height: 24px; }
.lexicon-table .translation-editor:has(> .translation-save:not(.is-saved)) > .copy-button { right: calc(.25rem + 32px); }
@media (hover: none) { .translation-editor > .copy-button, .languages > div > .copy-button { opacity: .45; pointer-events: auto; } }

/* Proposals button: stands out when there is more than the current translation. */
.annotation-button.proposal-button.has-proposals { color: #fff8e8; background: #7a4cb0; border-color: #5b2d91; font-weight: 700; }

/* Lines toolbar: lighter, for the dark text in it. */
.structural-toolbar { background: #d5c29cf2; border-color: var(--line); }
.structural-toolbar.is-compact { background: #d5c29cf7; }

/* Selections: a thick outline, a glow and a tint, impossible to miss. */
.clm-scene.scene-selected { border-color: #b07a1e; outline: 3px solid #e0a82e; outline-offset: 3px; box-shadow: 0 0 0 8px #fde08d66, 0 0 28px #e0a82eaa; }
.clm-scene.scene-selected .scene-header { background: linear-gradient(#f2c862, #dca83c); color: #2a1a08; }
.clm-scene.scene-selected .scene-header strong { color: #2a1a08; }
.clm-scene.scene-selected .scene-gutter { background: #e0a82e; }
.entry.bubble-selected { border-color: #5b2d91; background: #cdb8d3; outline: 3px solid #8a5cc8; outline-offset: 2px; box-shadow: 0 0 0 7px #8a5cc840, 0 0 22px #8a5cc899; }
.entry.cell-selected { border-color: #1f6f86; outline: 2px solid #2f8fa8; outline-offset: 2px; box-shadow: 0 0 0 6px #2f8fa833; }
.entry.cell-selected[data-selected-language="jp"] textarea[name="source_jp"],
.entry.cell-selected[data-selected-language="en"] textarea[name="source_en"],
.entry.cell-selected[data-selected-language="fr"] textarea[name="translation_fr"] { outline: 3px solid #2f8fa8; outline-offset: 2px; box-shadow: 0 0 16px #2f8fa8aa; }

/* API tokens page. */
.api-token { display: inline-block; padding: .4rem .6rem; font-size: 1rem; user-select: all; background: var(--field-fr); border: 1px solid var(--field-line); border-radius: 4px; overflow-wrap: anywhere; }
.api-token-form { grid-template-columns: minmax(220px, 1fr) auto; min-width: 0; }

/* Branches of a scene (if / elif / else, menu choices): each variant is a
   column of bubbles behind a coloured rule, one colour per nesting level,
   shifted right at each level. */
.scene-entries { container-type: inline-size; }
.branch-group { display: grid; gap: .5rem; --branch-colour: #c08a35; }
.branch-group[style*="--branch-depth: 1"] { --branch-colour: #4f9a86; }
.branch-group[style*="--branch-depth: 2"] { --branch-colour: #8e6bb0; }
.branch-group[style*="--branch-depth: 3"] { --branch-colour: #b85f55; }
.branch-arm { display: grid; gap: .7rem; margin-left: .6rem; padding: .45rem 0 .45rem .5rem; border-left: 4px solid var(--branch-colour); border-radius: 0 6px 6px 0; background: color-mix(in srgb, var(--branch-colour) 16%, transparent); }
.branch-arm:nth-child(even) { border-left-color: color-mix(in srgb, var(--branch-colour) 55%, #6b5238); background: color-mix(in srgb, var(--branch-colour) 8%, transparent); }
/* Past three levels the bubbles stop moving right; the colour still tells. */
.branch-group[style*="--branch-depth: 3"] .branch-arm { margin-left: 0; padding-left: 0; }
/* The JP / EN / FR fields keep the width they have outside any branch (it is
   the translators' gauge for line length): the shift is taken from the
   character column only. */
@media (min-width: 851px) {
    .scene-entries .entry:has(.entry-character) .languages { grid-template-columns: minmax(0, 1fr) repeat(3, calc((100cqw - 192px) / 3)); }
}
.branch-arm .languages > .entry-character { padding-right: .5rem; }

/* Occurrences of a linked line (window opened from its link icon). */
button.duplicate-state { padding: .05rem .25rem; font: inherit; font-size: .78rem; background: transparent; border: 1px solid transparent; border-radius: 4px; cursor: var(--cursor-pointer, pointer); }
button.duplicate-state:hover { border-color: currentColor; }
.occurrences-dialog { width: min(760px, 94vw); }
.occurrence-list { display: grid; gap: .3rem; max-height: 65vh; margin: 0; padding: .6rem; overflow: auto; list-style: none; }
.occurrence-list a { display: grid; grid-template-columns: 8.5rem 9rem minmax(0, 1fr) auto; gap: .7rem; align-items: baseline; padding: .45rem .6rem; color: var(--ink); text-decoration: none; border: 1px solid var(--line, #8a6a48); border-radius: 5px; }
.occurrence-list a:hover { background: color-mix(in srgb, var(--gold, #b07a1e) 18%, transparent); }
.occurrence-list li.current a { border: 2px solid var(--gold, #b07a1e); }
.occurrence-list .occurrence-character { color: var(--muted); font-size: .85rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.occurrence-list .occurrence-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.occurrence-list small { color: #8a4f12; }
@media (max-width: 600px) { .occurrence-list a { grid-template-columns: 1fr; gap: .15rem; } }

/* Free description of a file, edited in place in the scripts table. */
.description-cell { position: relative; padding-right: 1.9rem !important; }
.description-edit { position: absolute; top: 50%; right: .3rem; transform: translateY(-50%); padding: .1rem .25rem; background: transparent; border: 0; box-shadow: none; opacity: 0; color: inherit; }
.description-cell:hover .description-edit, .description-edit:focus-visible { opacity: .7; }
.description-edit:hover { opacity: 1; }
.description-edit .icon { width: .95em; height: .95em; }
.description-input { width: 100%; min-width: 12rem; padding: .25rem .4rem; font: inherit; }
@media (hover: none) { .description-edit { opacity: .5; } }

/* Character names linked across files (same Japanese). */
.name-links { white-space: nowrap; }
.name-link-form { display: inline-block; margin-left: .3rem; }
.name-link-form .link-toggle { padding: .15rem .35rem; }

/* Names list: hovering a row lightens it (the old dark hover hid its icons). */
.character-table tbody tr:hover { background: transparent; }
.character-table .duplicate-state, .character-table .duplicate-state.detached { font-weight: 700; }
/* The name reached from a link (list of files, #character-…) stands out. */
.character-table tbody tr:target td { background: #f2c86266; box-shadow: inset 0 2px #b07a1e, inset 0 -2px #b07a1e; }
.character-table tbody tr:target td:first-child { box-shadow: inset 2px 2px #b07a1e, inset 0 -2px #b07a1e; }
.character-table tbody tr:target td:last-child { box-shadow: inset -2px 2px #b07a1e, inset 0 -2px #b07a1e; }

/* Search results: the column of small buttons (number, notes, proposals,
   voice, occurrences) is laid over the character cell; short lines keep
   room for all of it. */
.languages > .entry-character:has(.entry-meta) { min-height: 9.6rem; }
.entry-game { margin-right: .6rem; padding: .05rem .45rem; font-size: .8rem; font-weight: 700; color: #fff8ec; background: #8a5a2b; border-radius: 4px; }

/* Search: matching names of the files' name lists, above the lines. */
.name-matches { margin: 0 0 1rem; padding: .5rem .7rem; background: var(--panel); border: 1px solid var(--line, #8a6a48); border-radius: 7px; }
.name-matches summary { font-weight: 700; color: var(--gold); cursor: var(--cursor-pointer, pointer); }
.name-matches .occurrence-list { max-height: 18rem; padding: .5rem 0 0; }
.name-matches .occurrence-list a { grid-template-columns: 12rem 8rem 10rem minmax(0, 1fr); }
.lexicon-context { display: block; margin-top: .2rem; color: var(--muted); font-size: .78rem; }

/* Books: visual editor, one page at a time, drawn as in the game. */
.book-nav { margin: 0 0 .8rem; }
.book-title-bar { display: flex; flex-wrap: wrap; gap: .4rem 1rem; align-items: center; margin-bottom: .6rem; }
.book-title-bar input { width: min(32rem, 70vw); }
.book-title-bar small { color: var(--muted); }
.book-toolbar { position: sticky; top: 70px; z-index: 5; display: flex; flex-wrap: wrap; gap: .5rem .8rem; align-items: center; margin-bottom: .6rem; padding: .5rem .7rem; background: var(--panel); border: 1px solid var(--line, #8a6a48); border-radius: 8px; }
.book-toolbar .toolbar-separator { width: 1px; align-self: stretch; background: var(--line, #8a6a48); }
.book-toolbar .save-state { margin-left: auto; color: var(--muted); font-size: .85rem; }
#page-label { min-width: 11rem; text-align: center; font-weight: 700; }
.book-stage { display: grid; justify-items: center; position: relative; }
#book-canvas { width: 100%; max-width: 1169px; height: auto; border-radius: 6px; background: #222; cursor: text; box-shadow: 0 2px 14px #0005; }
#book-canvas:focus { outline: none; }
.book-raw { position: absolute; left: 0; top: 0; width: 1px; height: 1px; opacity: 0; pointer-events: none; resize: none; }
.book-raw.visible { position: static; width: 100%; max-width: 1169px; height: 16rem; margin-top: .6rem; opacity: 1; pointer-events: auto; font: .9rem/1.45 ui-monospace, Consolas, monospace; white-space: pre; }
.book-reference { max-width: 1169px; margin: 1rem auto 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1rem; }
.book-reference h2 { font-size: 1rem; margin: 0 0 .4rem; }
.book-reference pre { white-space: pre-wrap; word-break: break-word; margin: 0; max-height: 24rem; overflow: auto; font: inherit; line-height: 1.5; }
.book-warnings { max-width: 1169px; margin: .5rem auto 0; padding-left: 1.1rem; color: #a3201c; font-size: .9rem; }
.book-hint { max-width: 1169px; margin: .4rem auto 0; color: var(--muted); font-size: .85rem; }
.book-hint code { padding: 0 .25rem; background: #0000000f; border-radius: 3px; }

/* Game images: list, original beside translated, comparison slider. */
.game-image-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: .8rem; }
.game-image-card { display: grid; gap: .3rem; padding: .6rem; color: var(--ink); text-decoration: none; background: var(--panel); border: 2px solid var(--line, #8a6a48); border-radius: 8px; }
.game-image-card.status-done { border-color: #4f8a3c; }
.game-image-card.status-in_progress { border-color: #c08a35; }
.game-image-thumbs { display: grid; grid-auto-flow: column; gap: .3rem; background: repeating-conic-gradient(#9a9a9a 0 25%, #c4c4c4 0 50%) 0 0 / 14px 14px; border-radius: 4px; }
.game-image-thumbs img { width: 100%; height: 130px; object-fit: contain; }
.game-image-card small { color: var(--muted); }
.game-image-page .game-image-files { width: fit-content; margin: .4rem auto .8rem; padding-left: 1.1rem; }
.game-image-toolbar { display: flex; justify-content: center; margin-bottom: .6rem; }
.game-image-stage { display: flex; justify-content: center; }
.game-image-layers { position: relative; max-width: 100%; background: repeating-conic-gradient(#9a9a9a 0 25%, #c4c4c4 0 50%) 0 0 / 16px 16px; box-shadow: 0 0 0 1px #0004; }
.game-image-layers img { position: absolute; inset: 0; width: 100%; height: 100%; image-rendering: pixelated; }
.game-image-download { position: absolute; top: .5rem; right: .5rem; z-index: 2; display: grid; place-items: center; width: 2.4rem; height: 2.4rem; color: #fff; background: #2a1f16; border-radius: 50%; opacity: .35; transition: opacity .15s; }
.game-image-download:hover, .game-image-download:focus-visible { opacity: .9; }
.game-image-download .icon { width: 1.3rem; height: 1.3rem; }
.game-image-forms { display: grid; gap: .6rem; width: min(560px, 100%); margin: 1rem auto 0; }
.game-image-forms form { margin: 0; }
.game-image-remove { text-align: center; }
.lexicon-context .as-label { font-weight: 700; color: var(--ink); }
.lexicon-context .as-label-edit { margin-left: .25rem; padding: 0 .2rem; background: transparent; border: 0; box-shadow: none; color: inherit; opacity: .6; vertical-align: middle; }
.lexicon-context .as-label-edit:hover { opacity: 1; }
.lexicon-context .as-label-edit .icon { width: .9em; height: .9em; }
.section-note { margin: 0 0 .6rem; color: var(--muted); font-size: .9rem; }
/* AS/BS and Ennemis: one table per character or monster under a banner. */
.lexicon-group { margin: 0 0 1.25rem; }
.lexicon-group-banner { --gold: #fde08d; --muted: #d6c2a2; --line: #7a5c3e; color-scheme: dark; display: flex; flex-wrap: wrap; align-items: baseline; gap: .35rem 1rem; padding: .55rem .9rem; background: linear-gradient(90deg, #5a3d26, #42301f 70%); border: 1px solid #7a5c3e; border-bottom: 0; border-radius: 7px 7px 0 0; }
.lexicon-group-banner h2 { margin: 0; color: var(--gold); font-size: 1.05rem; }
.lexicon-group-banner h2 em { color: var(--muted); font-weight: 400; }
.lexicon-group-names { color: var(--muted); font-size: .85rem; }
.lexicon-group-files { display: flex; flex-wrap: wrap; gap: .3rem .6rem; color: var(--muted); font-size: .85rem; }
.lexicon-group-files .as-file { display: inline-flex; align-items: center; gap: .2rem; padding: .05rem .45rem; background: #1d151099; border: 1px solid var(--line); border-radius: 999px; }
.lexicon-group-files .as-label-edit { padding: 0 .15rem; background: transparent; border: 0; color: var(--gold); line-height: 1; opacity: .75; }
.lexicon-group-files .as-label-edit .icon { width: .9rem; height: .9rem; }
.lexicon-group .table-wrap { border-radius: 0 0 7px 7px; }
/* A speaker known to the lexicon (Personnages): its names and notes on hover. */
.character-info { position: relative; border-bottom: 1px dotted currentColor; cursor: help; }
.character-info:hover::after { content: attr(data-tooltip); position: absolute; left: 0; top: calc(100% + .4rem); z-index: 30; width: max-content; max-width: 420px; padding: .45rem .6rem; color: #f3e9d8; background: #241910; border: 1px solid #a07c50; border-radius: 4px; white-space: pre-wrap; font-weight: 400; box-shadow: inset 0 1px #fde08d33, 0 6px 20px #000a; }
.lexicon-add-form:has(textarea) { grid-template-columns: auto 1fr 1fr 1fr 1.6fr auto; }
.lexicon-add-form textarea { min-width: 0; padding: .45rem .55rem; color: var(--ink); background: var(--field, #1d1510); border: 1px solid var(--line); border-radius: 4px; font: inherit; resize: vertical; }
