/* Whiskey extensions, 2026-09-10. GPL-3.0-or-later. */
@font-face{font-family:Charis;src:url('../media/CharisSIL-R.ttf?v=e47ec6c29ae7')}*{box-sizing:border-box}body{margin:0;background:#f4f4f5;color:#262626;font:16px/1.55 system-ui,-apple-system,'Segoe UI',sans-serif}button,input,select{font:inherit}button,select{border:1px solid #d4d4d8;background:white;color:#303034;border-radius:7px;padding:7px 12px}button{cursor:pointer}button:hover{border-color:#990000;background:#fff1f1}button:disabled{opacity:.45;cursor:default}button:focus-visible,input:focus-visible,select:focus-visible,a:focus-visible,.table-scroll:focus-visible{outline:3px solid #b45a00;outline-offset:3px}a{color:#990000}header{max-width:1760px;margin:auto;padding:26px 28px 18px;display:flex;align-items:center;justify-content:space-between;gap:24px}.brand{font-family:Charis,serif;font-size:34px;font-weight:bold;text-decoration:none;color:#202024;display:flex;gap:18px;align-items:baseline}.brand span{font:500 16px system-ui;color:#66666e}header p{margin:4px 0 0;color:#66666e}.primary{background:#990000;color:white;border-color:#990000;font-weight:600;white-space:nowrap}.primary:hover{background:#760000;color:white}#inventory-count{font-size:14px;margin-left:8px;opacity:.85}main{max-width:1760px;margin:auto;padding:0 28px;display:grid;grid-template-columns:minmax(0,1fr) 330px;align-items:start;gap:22px}.workspace,.panel{background:white;border:1px solid #dedee2;border-radius:12px;padding:20px}.section-head{display:flex;align-items:center;justify-content:space-between;gap:12px}h1,h2,p{margin-top:0}h1{font-size:23px;margin-bottom:0}h2{font-size:18px;margin-bottom:12px}.section-head h2{margin:0}.section-head>span{font-size:14px;color:#66666e}.hint{font-size:14px;color:#62626b;line-height:1.65;margin:10px 0 14px}.selection-bar{display:flex;align-items:center;gap:12px;flex-wrap:wrap;background:#f6f3f3;border-radius:8px;padding:12px;margin-top:18px}.selection-bar strong{font-size:14px;white-space:nowrap}#selection-chips{display:flex;gap:6px;flex:1;flex-wrap:wrap}.chip{font:19px Charis,serif;background:#990000;color:white;padding:2px 9px;border-color:#990000}.chip:hover{background:#760000;color:white}#clear-selection{font-size:14px}.table-scroll{overflow:auto;border:1px solid #dedee2;border-radius:8px}table{border-collapse:collapse;width:100%;text-align:center}th,td{border-bottom:1px solid #e7e7ea;border-right:1px solid #efeff1;padding:7px 4px;vertical-align:middle}th{font-size:14px;font-weight:500;color:#55555e;background:#f8f8f9}thead th{background:#eeeef0}tbody tr:last-child>*{border-bottom:0}.class-button{border:0;background:transparent;border-radius:4px;padding:5px;font-size:14px;color:inherit;line-height:1.4}.class-button:hover{background:#f6e1e1;color:#760000}#consonants{min-width:1030px}#consonants td{white-space:nowrap}#consonants th:first-child{min-width:106px;text-align:left}#consonants .class-button{max-width:105px;overflow-wrap:normal}#consonants tbody th{position:sticky;left:0;z-index:1}button.phone{font-family:Charis,serif;font-size:23px;line-height:1.5;min-width:33px;min-height:39px;border:1px solid transparent;border-radius:5px;padding:0 5px;margin:1px;background:transparent;color:#303034}button.phone.match{background:#fcf0f0;border-color:#eed2d2;color:#880000}button.phone.selected{background:#990000;border-color:#990000;color:#fff;box-shadow:inset 0 -3px 0 #f3b1b1}button.phone.dimmed{color:#797980;background:#fff}button.phone:hover{border-color:#990000;box-shadow:0 0 0 1px #990000}[hidden]{display:none!important}.vowel-heading{margin-top:26px}#vowels{min-width:660px}#vowels td{height:49px;min-width:77px}#vowels .height-start>*{border-top:2px solid #d6c5c5}#vowels th:first-child{min-width:90px}.atr-label{font-size:14px;white-space:nowrap}.atr-positive{background:#e3f2ed;color:#12604e}.atr-negative{background:#fff0df;color:#864300}.panel{margin-bottom:18px;padding:17px}.panel .section-head button{font-size:14px;padding:4px 7px}.legend{display:flex;flex-wrap:wrap;gap:6px;margin:12px 0}.legend span{font-size:13px;padding:3px 7px;border-radius:4px}.positive{background:#e3f2ed;color:#12604e}.negative{background:#fff0df;color:#864300}.mixed{background:#ebe8fa;color:#57438e}.unknown,.unspecified{background:#eef1f5;color:#546173}.checkline{display:flex;align-items:center;gap:7px;font-size:14px;margin-bottom:12px}input[type=checkbox]{width:18px;height:18px;accent-color:#990000;flex-shrink:0}.common-row{display:flex;justify-content:space-between;gap:8px;margin:5px 0;padding:7px 9px;border-radius:5px;font-size:14px}.common-row strong{font-size:13px;white-space:nowrap;font-weight:600}.filter-row{display:flex;justify-content:space-between;align-items:center;gap:6px;border-bottom:1px solid #efeff1;padding:6px 0;font-size:14px}.radios{display:flex;flex-shrink:0}.radios label{position:relative;cursor:pointer}.radios input{position:absolute;opacity:0;width:100%;height:100%;margin:0;cursor:pointer}.radios span{display:block;text-align:center;width:30px;height:30px;border:1px solid #d4d4d9;background:#f7f7f8}.radios input:checked+span{background:#990000;color:#fff;border-color:#990000}.radios input:focus-visible+span{outline:3px solid #b45a00;outline-offset:1px}.radios label:first-child span{border-radius:5px 0 0 5px}.radios label:last-child span{border-radius:0 5px 5px 0}footer{max-width:1760px;margin:auto;padding:24px 28px 32px;font-size:14px;color:#686870}.empty{border:1px dashed #c3b8b8;padding:18px;border-radius:8px;margin-bottom:16px}dialog{width:min(950px,94vw);max-height:90vh;padding:0;border:1px solid #d4d4d9;border-radius:12px;color:#262626;background:#fff}dialog::backdrop{background:#18181ba6}.dialog-head{display:flex;justify-content:space-between;align-items:start;gap:20px;padding:22px 24px 8px}.dialog-head h2{font-size:22px;margin-bottom:4px}.dialog-head p{margin:6px 0}.inventory-tools{display:flex;flex-wrap:wrap;gap:10px;align-items:center;padding:12px 24px;background:#f6f3f3}.inventory-tools label,.inventory-tools button,.inventory-tools span{font-size:14px}.inventory-tools select{margin-left:5px}#inventory-options{padding:12px 24px;max-height:55vh;overflow:auto}fieldset{margin:10px 0 18px;border:1px solid #e0e0e4;border-radius:8px;padding:10px 12px}legend{font-size:14px;padding:0 7px;color:#62626b}.inventory-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(77px,1fr));gap:7px}.inventory-item{display:flex;align-items:center;gap:7px;border:1px solid #e1dada;border-radius:5px;padding:5px;cursor:pointer}.inventory-item:has(input:checked){background:#fcf0f0;border-color:#cc9999}.inventory-item span{font:24px/1.6 Charis,serif}.dialog-foot{display:flex;justify-content:space-between;align-items:center;gap:15px;padding:14px 24px;border-top:1px solid #e0e0e4}.dialog-foot .hint{margin:0}@media(min-width:1550px){main{grid-template-columns:minmax(0,1fr) 370px}}@media(max-width:1100px){main{grid-template-columns:minmax(0,1fr)}aside{display:grid;grid-template-columns:1fr 1fr;gap:18px}.panel{margin:0}.workspace{padding:16px}}@media(max-width:640px){header{padding:18px 14px;align-items:flex-start;flex-direction:column;gap:12px}.brand{font-size:29px;gap:12px}main{padding:0 12px;gap:14px}.workspace,.panel{padding:12px}aside{grid-template-columns:minmax(0,1fr)}.section-head{flex-wrap:wrap}.selection-bar{gap:8px}.vowel-heading{align-items:start}.dialog-head,.inventory-tools,.dialog-foot{padding:14px}.dialog-foot{flex-direction:column;align-items:stretch}#inventory-options{padding:8px 14px}.dialog-head button{white-space:nowrap}footer{padding:20px 14px}.brand span{font-size:14px}}

/* Stony Brook inspired red, charcoal and white interface. */
:root{--sbu-red:#990000;--sbu-ink:#202024;--sbu-rule:#dedee2}
body{border-top:5px solid var(--sbu-red)}
header{padding-top:22px;padding-bottom:22px}
.brand{letter-spacing:-.025em}.brand span{letter-spacing:0}
.header-actions{display:flex;align-items:center;gap:18px;flex-shrink:0}
.about-link{font-size:14px;font-weight:600;text-decoration:none;white-space:nowrap}.about-link:hover{text-decoration:underline}
.workspace{border-top:3px solid var(--sbu-red)}
.panel{box-shadow:0 2px 10px #20202404}
button.phone.selected{font-weight:bold}
.selection-bar{border:1px solid #eee1e1}
.about-layout{display:block;max-width:900px;margin:0 auto;padding:0 28px 28px}
.about-article{padding:32px 36px;border-top:3px solid var(--sbu-red);background:white;border-radius:10px;border-left:1px solid var(--sbu-rule);border-right:1px solid var(--sbu-rule);border-bottom:1px solid var(--sbu-rule)}
.about-article h1{font-size:28px;margin-bottom:20px}.about-article h2{font-size:18px;margin:26px 0 10px}.about-article p{margin-bottom:14px;line-height:1.85}.about-article ul{padding-left:22px;margin:10px 0}.about-article li{margin:9px 0;line-height:1.75}.about-article .license-note{border-top:1px solid var(--sbu-rule);margin-top:26px;padding-top:18px;font-size:14px;color:#62626b}.about-footer{max-width:900px;padding-top:0}.about-article a{text-underline-offset:3px}
@media(max-width:640px){.header-actions{width:100%;justify-content:space-between;gap:12px}.about-layout{padding:0 12px 20px}.about-article{padding:22px 18px}.about-article h1{font-size:24px}}
/* Compact bilingual workspace; fit mode scales the complete page, never clips it. */
body{border:0;padding:10px}#page-frame{margin:0 auto;border-top:4px solid #990000;background:#f4f4f5}header{max-width:none;padding:10px 16px;gap:14px}.brand{font-size:27px;gap:12px}.brand span{font-size:14px}header p{font-size:14px;margin:0}.header-actions{gap:10px;flex-wrap:wrap;justify-content:flex-end}.header-actions label{font-size:14px;white-space:nowrap}.header-actions select{padding:4px;font-size:14px}.header-actions .primary{padding:5px 9px;font-size:14px}main{max-width:none;padding:0 14px;grid-template-columns:minmax(0,1fr) 415px;gap:12px}.workspace,.panel{padding:10px 12px;border-radius:7px}.panel{margin:0}.section-head h1{font-size:18px}.section-head h2,h2{font-size:16px}.section-head>span{font-size:14px}.workspace>h2{margin:5px 0}.hint{font-size:14px;line-height:1.4;margin:6px 0}.selection-bar{padding:5px 8px;margin-top:7px;gap:8px}.selection-bar button{padding:2px 7px}.selection-bar .chip{font-size:18px;line-height:1.2}#selection-chips{gap:3px}.chart-hint{margin:5px 0;line-height:1.35}.table-scroll{overflow:visible;border-radius:4px}#consonants{min-width:0;table-layout:fixed}#consonants th:first-child{width:105px;min-width:0}#consonants tbody th{position:static}th,td{padding:1px 2px}.class-button{font-size:14px;padding:2px 0;max-width:none!important;overflow-wrap:anywhere;line-height:1.1}#consonants td{white-space:normal}button.phone{font-size:21px;min-width:26px;min-height:27px;line-height:1.25;padding:0 2px;margin:0;border-radius:3px}.vowel-heading{margin-top:7px}.vowel-heading .hint{margin:0}#vowels{min-width:0;table-layout:fixed}#vowels th:first-child{min-width:0;width:105px}#vowels th:nth-child(2){width:60px}#vowels td{height:27px;min-width:0}#vowels .height-start>*{border-top-width:1px}.vowel-slot{display:inline-flex;width:29px;min-height:27px;vertical-align:middle;justify-content:center}.atr-label{font-size:14px}.legend{gap:4px;margin:6px 0}.legend span{font-size:12px;padding:2px 5px}#feature-table{width:100%;table-layout:fixed;font-size:14px}#feature-table thead th:first-child{width:53%}#feature-table thead th:nth-child(2){width:20%}#feature-table thead th:last-child{width:27%}#feature-table th,#feature-table td{padding:1px 4px}#feature-table .feature-row th{text-align:left;background:white;font-weight:400;font-size:14px;line-height:1.2}.feature-group th{text-align:left;background:#eee9e9;color:#760000;font-weight:650;font-size:13px;line-height:1.25;border-top:1px solid #dccaca;padding:3px 5px!important}.shared-badge{display:inline-block;font-size:16px;font-weight:650;line-height:22px;min-width:33px;border-radius:4px}.empty-value{color:#8a8a91}.radios{justify-content:center}.radios span{width:27px;height:23px;line-height:21px}footer{padding:8px 16px;font-size:13px}.about-layout{max-width:1200px;padding:0 14px 10px}.about-article{padding:18px 24px}.about-columns{display:grid;grid-template-columns:1fr 1fr;gap:32px}.about-article h1{margin:0 0 8px;font-size:24px}.about-article h2{margin:14px 0 8px}.about-article p,.about-article li{line-height:1.6}.about-article .license-note{margin-top:18px;padding-top:12px}.fit-mode main{grid-template-columns:minmax(0,1fr) 415px}.fit-mode aside{display:block}.fit-mode header{flex-direction:row;align-items:center}.fit-mode .header-actions{width:auto}.fit-mode .about-layout{display:block}.fit-mode .section-head{flex-wrap:nowrap}.fit-mode .about-columns{grid-template-columns:1fr 1fr}.fit-mode .inventory-tools{flex-wrap:wrap}#inventory-options{max-height:50vh}.preset-editor{display:flex;align-items:center;flex-wrap:wrap;gap:8px;padding:10px 24px;border-bottom:1px solid #ddd}.preset-editor label{font-size:14px}.preset-editor input{font-size:14px;border:1px solid #ccc;border-radius:5px;padding:6px;max-width:210px}.preset-editor button{font-size:14px;padding:5px 8px}.preset-meta{font-size:14px;line-height:1.4;padding:0 24px;margin:8px 0}.preset-meta:empty{display:none}#preset-message{color:#760000}.danger{color:#990000}#preset-delete-confirm{padding:8px 24px;background:#fff0f0}#preset-delete-confirm button{font-size:14px;margin-left:6px}@media(max-width:1100px){body:not(.fit-mode) main{grid-template-columns:minmax(0,1fr)}body:not(.fit-mode) aside{display:block}body:not(.fit-mode) .table-scroll{overflow:auto}body:not(.fit-mode) #consonants{min-width:950px}body:not(.fit-mode) #vowels{min-width:600px}body:not(.fit-mode) .about-columns{grid-template-columns:1fr}body:not(.fit-mode) .header-actions{justify-content:flex-start}body:not(.fit-mode) header{flex-wrap:wrap}}
/* CDE / Motif-inspired desktop theme. Overrides the earlier red theme. */
:root{--desktop:#526c79;--panel:#b5b7ba;--surface:#e8e7e2;--ink:#171b22;--title:#465572;--light:#f4f4f0;--shadow:#5d626a;--deep:#303a4c}
body{background:var(--desktop);color:var(--ink);font-family:Arial,Helvetica,sans-serif;padding:10px}
#page-frame{background:var(--panel);border:2px solid;border-color:var(--light) var(--deep) var(--deep) var(--light);box-shadow:3px 3px 0 #24374180}
header{background:var(--title);color:#fff;margin:4px 4px 8px;padding:8px 10px;border:2px solid;border-color:#9aa7c0 #293449 #293449 #9aa7c0;gap:12px}
.brand{color:#fff;font-family:'Courier New',monospace;font-size:25px;font-weight:bold;letter-spacing:-1px}.brand span{font-family:Arial,Helvetica,sans-serif;color:#fff;font-size:14px;letter-spacing:0;font-weight:400}
header p{color:#e1e5ee;font-size:14px}header .about-link{color:#fff}header .header-actions label{color:#fff}.header-actions{gap:9px}header select{min-height:28px}
button,select{border:2px solid;border-color:var(--light) var(--shadow) var(--shadow) var(--light);border-radius:0;background:var(--panel);color:var(--ink);box-shadow:1px 1px 0 #85878b;font-size:14px}
button:hover,select:hover{background:#c7c9cc;border-color:#fff #535861 #535861 #fff}
button:active{border-color:var(--shadow) var(--light) var(--light) var(--shadow);box-shadow:none}
button:disabled{opacity:.5;cursor:default}button:focus-visible,input:focus-visible,select:focus-visible,a:focus-visible{outline:2px dotted #142c50;outline-offset:2px}
.primary,.primary:hover{background:#c4c6cb;color:#101620;border-color:#fff #394353 #394353 #fff;box-shadow:inset 0 0 0 1px #9da4af,1px 1px 0 #202b3d}
main{gap:9px;padding:0 8px}.workspace,.panel{background:var(--panel);border:2px solid;border-color:var(--light) var(--shadow) var(--shadow) var(--light);border-radius:0;box-shadow:none;padding:8px 9px}
.workspace>.section-head:first-child,.panel>.section-head{background:var(--title);color:#fff;margin:-4px -5px 6px;padding:4px 7px;border:1px solid;border-color:#8291ad #28384e #28384e #8291ad}
.section-head h1,.section-head h2{font-weight:bold}.section-head>span{color:#343e4e}.workspace>.section-head:first-child>span{color:#f2f3f7;font-size:13px}
.panel .section-head button{font-size:13px;padding:1px 6px}.section-head h2{font-size:15px}.workspace>h2{font-size:14px;padding:2px 5px;background:#cbcdd0;border:1px solid;border-color:#e9eaec #777c86 #777c86 #e9eaec;margin:6px 0 4px}
.hint{color:#2e3847}.selection-bar{background:#cbcdd0;border:2px solid;border-color:#747983 #f0f0ec #f0f0ec #747983;border-radius:0;padding:4px 6px;margin-top:3px}.selection-bar strong{font-size:14px}#selection-chips .chip{background:#465572;color:white;border-color:#8795ad #253046 #253046 #8795ad;border-radius:0;font-size:17px}.chip:hover{background:#354764;color:white}
.table-scroll{border:2px solid;border-color:#666e7c #f3f3ef #f3f3ef #666e7c;border-radius:0;background:var(--surface)}table{background:var(--surface);color:#151b24}thead th{background:#c4c7cd;color:#192333;border-bottom:1px solid #7c8594}th,td{border-right:1px solid #bcc1c9;border-bottom:1px solid #c7cad0}tbody th{background:#d5d7dc;color:#1d2839}.class-button{border:0;border-radius:0;box-shadow:none;background:transparent;color:inherit;font-family:Arial,Helvetica,sans-serif}.class-button:hover{background:#bac6d9;border:0;color:#172d4c;box-shadow:none}
button.phone{border-radius:0;border:1px solid transparent;box-shadow:none;color:#1d293c;background:transparent;font-size:21px}
button.phone.match{color:#223b66;background:#d8e0ed;border-color:#c3cedf}
button.phone.selected{color:#fff;background:#465572;border-color:#a5b1c6 #253047 #253047 #a5b1c6;box-shadow:none;font-weight:bold}
button.phone.dimmed{color:#737d8b;background:#e8e7e2;border-color:transparent}
button.phone:hover{border-color:#263e62;box-shadow:inset 0 0 0 1px #263e62}
.vowel-heading{background:#cbcdd0;border:1px solid;border-color:#e9eaec #777c86 #777c86 #e9eaec;padding:2px 5px;margin:6px 0 4px}.vowel-heading .hint{font-size:13px;color:#293648}.vowel-heading h2{font-size:14px}#vowels .height-start>*{border-top-color:#8993a2}.atr-positive{background:#dbe8e1;color:#214c3b}.atr-negative{background:#eee1cb;color:#674315}
#feature-table{border:2px solid;border-color:#666e7c #f3f3ef #f3f3ef #666e7c}#feature-table .feature-row th{background:var(--surface);color:#162135;font-size:14px}.feature-group th{background:#c8cbd2;color:#283e62;border-top:1px solid #6c778b;border-bottom:1px solid #969eab;font-size:13px;padding:3px 5px!important}
.shared-badge{border-radius:0;border:1px solid #979fa9}.empty-value{color:#6c7684;border-color:transparent}
.positive{background:#d4e6d9;color:#24503b}.negative{background:#efddbd;color:#69410d}.mixed{background:#ded8ee;color:#4c396f}.unknown,.unspecified{background:#dce0e6;color:#3d485a}.legend span{border-radius:0;border:1px solid #87909d;padding:1px 4px}
.radios span{background:#bfc3ca;color:#1b2535;border:2px solid;border-color:#fff #697587 #697587 #fff;width:28px;height:23px;line-height:19px;border-radius:0!important}.radios input:checked+span{background:#465572;color:white;border-color:#24354c #a9b3c4 #a9b3c4 #24354c}.radios input:focus-visible+span{outline:2px dotted #20355b;outline-offset:1px}
a{color:#213e78}footer{color:#303d52;padding:6px 10px;font-size:13px}footer a{color:#213e78}.empty{background:#ece8dc;border:1px solid #7c8596;border-radius:0;color:#2e3a4c}
dialog{background:var(--panel);color:var(--ink);border:3px solid;border-color:#f0f0ec #3c485c #3c485c #f0f0ec;border-radius:0;box-shadow:5px 5px 0 #22334890}dialog::backdrop{background:#20394a88}.dialog-head{margin:4px;background:var(--title);color:white;padding:8px 10px}.dialog-head h2{font-size:19px}.dialog-head .hint{color:#ecedf4}.inventory-tools{background:#c5c8ce;border:1px solid;border-color:#f0f1f3 #7b8696 #7b8696 #f0f1f3;margin:5px 8px;padding:7px 9px}.preset-editor{padding:8px 16px;border-color:#838d9a}.preset-editor input{background:#eeefeb;border:2px solid;border-color:#637084 #f2f3f1 #f2f3f1 #637084;border-radius:0;color:#142238}.preset-meta{color:#303d52;margin:5px 0;padding:0 16px;font-size:14px}#preset-message{color:#6a271c}#preset-delete-confirm{background:#dfc8bf;color:#5c2115}#inventory-options{padding:5px 14px}fieldset{background:#d9dbdf;border:2px solid;border-color:#f6f6f3 #7a8697 #7a8697 #f6f6f3;border-radius:0;margin:5px 0 10px}legend{color:#283e60;font-weight:bold}.inventory-grid{gap:5px}.inventory-item{background:#c8ccd3;border:1px solid #8691a2;border-radius:0;padding:3px}.inventory-item:has(input:checked){background:#e1e7f1;border-color:#506384}.inventory-item span{font-size:22px}.dialog-foot{background:#b5b7ba;border-top:2px solid #798595;padding:10px 16px}input[type=checkbox]{accent-color:#465572}.danger{color:#6c251e}
.about-article{background:var(--surface);border:2px solid;border-color:#fff #606e84 #606e84 #fff;border-radius:0;padding:16px 22px}.about-article h1{background:var(--title);color:white;padding:5px 9px;font-size:22px;margin:-9px -15px 13px}.about-article h2{color:#2b4065;border-bottom:1px solid #9ea8b7;padding-bottom:4px;font-size:16px}.about-article .license-note{color:#39455b;border-color:#a5acb8}
/* Editable inventories, September 2026. Keep the existing CDE/Motif theme. */
.ipa-text,input.ipa-text,select.ipa-text,textarea.ipa-text{font-family:Charis,'Charis SIL','Doulos SIL','DejaVu Sans','Bourbon Han',serif;font-size:21px;line-height:1.65;font-variant:normal;font-feature-settings:normal}
.phone-pair{display:grid;grid-template-columns:repeat(2,minmax(30px,1fr));gap:2px;align-items:start;justify-items:stretch}
.phone-side{display:flex;flex-direction:column;align-items:center;gap:2px;min-width:0}.base-group{display:flex;flex-direction:column;align-items:center;gap:2px;max-width:100%}
button.phone{font-family:Charis,'Charis SIL','Doulos SIL','DejaVu Sans','Bourbon Han',serif;line-height:1.65;min-height:34px;padding:1px 3px;white-space:nowrap;max-width:100%;overflow-x:auto;overflow-y:hidden}.preset-number{font:9px Arial,sans-serif;vertical-align:super;padding-left:2px}
.table-scroll{overflow:auto}#consonants{min-width:1090px}#vowels{min-width:600px}#consonants td{vertical-align:middle}#vowels td{height:auto}.vowel-slot{width:auto;min-width:30px}
.active-presets{display:flex;flex-wrap:wrap;gap:4px;margin:4px 0}.inventory-chip{font-size:12px;padding:2px 5px}.modifier-fieldset{margin:7px 0 0;padding:4px 7px;background:var(--panel)}#modifier-controls,#phone-modifiers{display:flex;flex-wrap:wrap;gap:5px 12px}#modifier-controls label,#phone-modifiers label{display:inline-flex;align-items:center;gap:4px;font-size:13px}.modifier-fieldset p:empty{display:none}.modifier-fieldset legend{font-size:13px}
#inventory-dialog{width:min(1250px,97vw);max-height:94vh;overflow:auto}#inventory-dialog .dialog-head{position:sticky;top:0;z-index:4}.inventory-workbench{display:grid;grid-template-columns:minmax(0,1fr) minmax(320px,1fr);gap:12px;padding:6px 14px}.inventory-workbench>section{min-width:0}#inventory-options{padding:0;max-height:57vh;overflow:auto;margin-top:5px}.inventory-grid{grid-template-columns:repeat(auto-fill,minmax(105px,1fr));gap:4px}.inventory-item{display:flex;justify-content:space-between;gap:2px;min-width:0}.inventory-item>label{display:flex;align-items:center;gap:4px;min-width:0}.inventory-item span{font:21px/1.8 Charis,'Charis SIL','DejaVu Sans','Bourbon Han',serif;overflow-x:auto}.inventory-item>button{padding:2px 5px;flex-shrink:0}.inventory-item:has(input:checked){background:#e1e7f1}
#segment-editor{background:#d1d4da;border:1px solid #8590a1;padding:7px;max-height:65vh;overflow:auto}#segment-editor h3{font-size:15px;margin:2px 0 7px}.segment-fields{display:grid;grid-template-columns:1fr 1fr;gap:6px}.segment-fields>div{display:contents}.segment-fields label,.editor-details>label{display:flex;flex-direction:column;gap:3px;font-size:13px;min-width:0}.segment-fields input,.segment-fields select,.segment-fields textarea,.editor-details input,.editor-details textarea{width:100%;min-width:0;max-width:100%;box-sizing:border-box}.segment-fields textarea,.editor-details textarea{min-height:48px;background:#eeefeb;color:#142238}#phone-notes{font-family:Charis,'Charis SIL','DejaVu Sans','Bourbon Han',serif}
.matrix-table th{text-align:left;font-size:13px}.matrix-table th,.matrix-table td{padding:3px 6px}.matrix-table select{width:100%;font-size:13px}.changed-value{outline:1px solid #83600f}.editor-actions{display:flex;gap:6px;flex-wrap:wrap;margin:6px 0}.editor-actions button{font-size:13px;padding:4px 7px}.feature-details{margin-top:12px}.feature-details summary,.editor-details summary{cursor:pointer;font-weight:bold;font-size:14px;margin:5px 0}.feature-details .segment-fields{margin:7px 0}.editor-details{margin:8px 14px;padding:5px 8px;border:1px solid #7b8798;background:#c8ccd3}.editor-details>label{margin:6px 0}.editor-details>label:has(input[type=checkbox]){flex-direction:row;align-items:center}.editor-details input[type=checkbox]{width:18px}#import-preview{overflow:auto;max-height:260px}#import-preview table{font-size:12px;white-space:nowrap}#import-preview th,#import-preview td{padding:3px 6px}#import-preview .ipa-text{font-size:19px}
.dialog-foot{position:sticky;bottom:0;z-index:3;flex-wrap:wrap}#preset-info p{margin:5px 0}#preset-info .ipa-text{font-size:18px}#app-status:empty,#preset-message:empty{display:none}#feature-table .feature-row{height:auto}#feature-table .feature-row th{overflow-wrap:anywhere}.selection-bar .chip{font-family:Charis,'Charis SIL','DejaVu Sans','Bourbon Han',serif;line-height:1.6!important}
@media(max-width:800px){.inventory-workbench{grid-template-columns:1fr}#inventory-options{max-height:32vh}#segment-editor{max-height:none}.segment-fields{grid-template-columns:1fr 1fr}.dialog-foot{position:static}.about-article{overflow-wrap:anywhere}}

/* Transform scaling preserves the measured row geometry, including small screens. */
body.fit-mode{height:100vh;overflow:hidden}.fit-mode #page-frame{position:absolute;left:10px;top:10px;margin:0;transform-origin:top left}

/* Local Chinese UI fallback for systems without CJK fonts; IPA continues to use Charis. */
@font-face{font-family:'Bourbon Han';font-style:normal;font-weight:400;font-display:swap;src:url('../media/NotoSansSC-Regular.woff?v=dc20a86875ff') format('woff')}
body,.brand span,.class-button{font-family:Arial,'Bourbon Han',sans-serif}

@font-face{font-family:'Bourbon Han';font-style:normal;font-weight:400;font-display:swap;src:url('../media/BourbonHan-Extra.woff?v=7dbad99b8062') format('woff');unicode-range:U+549D}
/* CSV import placement controls stay within the scrolling preview. */
#import-preview fieldset{display:flex;flex-wrap:wrap;gap:8px;min-width:0;margin:8px 0}#import-preview fieldset label{display:flex;flex-direction:column;gap:3px;min-width:0}#import-preview fieldset select{max-width:100%;font-size:13px}
/* Feature management and local dependency diagrams. */
.feature-management-scroll{max-height:290px;overflow:auto}.feature-management-scroll th{text-align:left}.feature-management-scroll input[type=checkbox]{width:18px;height:18px}.feature-management-scroll button{font-size:12px;padding:3px 8px}#feature-tree-details{margin:12px 0}#feature-tree h4{margin:12px 0 4px}.feature-group-tree{display:grid;grid-template-columns:repeat(auto-fit,minmax(190px,1fr));gap:12px;list-style:none;padding:0;max-height:340px;overflow:auto}.feature-group-tree>li{padding:8px;border:1px solid #8791a3;background:#d8dbe1}.feature-group-tree ul{list-style:none;margin:7px 0 0 6px;padding:0 0 0 14px;border-left:1px solid #8791a3}.feature-group-tree ul li{position:relative;padding:3px 0;overflow-wrap:anywhere}.feature-group-tree ul li:before{content:'';position:absolute;left:-14px;top:13px;width:10px;border-top:1px solid #8791a3}.dependency-viewport{max-height:470px;overflow:auto;border:1px solid #8791a3;background:#e3e5e9}.dependency-canvas{position:relative}.dependency-canvas svg{position:absolute;inset:0}.dependency-node{position:absolute;width:190px;height:66px;padding:6px 9px;background:#d0d6e2;border:1px solid #465876;display:flex;flex-direction:column;justify-content:center;gap:4px;overflow:hidden}.dependency-node strong,.dependency-node small{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.dependency-node small{font-size:11px}.dependency-fields{display:flex;flex-wrap:wrap;gap:10px;margin:8px 0}.dependency-fields label{display:flex;flex-direction:column;gap:4px;min-width:0}.dependency-fields select{max-width:100%}#dependency-rules{max-height:240px;overflow:auto;padding-left:22px}#dependency-rules li{margin:6px 0;overflow-wrap:anywhere}#dependency-rules button{font-size:12px;margin-left:8px}.dependency-text{max-height:220px;overflow:auto;overflow-wrap:anywhere}#restore-feature-controls[hidden]{display:none}#feature-management button:disabled{cursor:default}
/* Table/tree observation controls and independent draft editor. */
.feature-view-controls{display:flex;gap:5px;flex-wrap:wrap;margin:5px 0}.feature-view-controls label{display:flex;align-items:center;gap:4px;max-width:100%}.feature-view-controls select{max-width:100%}#feature-table th:last-child,#feature-table td:last-child{width:42px}#feature-table [data-feature-hide]{font-size:11px;padding:1px 3px}.hidden-feature-row{color:#60636a;background:#d2d3d5}#hidden-filters .feature-group th{background:#b7bbc5}.tree-dimmed{opacity:.42;filter:grayscale(1)}#main-feature-tree table{width:100%;font-size:12px}#main-feature-tree .dependency-viewport{max-height:520px}#tree-editor-dialog{width:min(1100px,96vw);max-height:94vh;overflow:auto}#tree-live-preview{border:1px solid #8994a7;padding:8px;margin:8px 0}#tree-node-list{display:grid;gap:7px}.tree-node-edit{display:flex;flex-wrap:wrap;align-items:center;gap:7px;border-bottom:1px solid #a5adba;padding:6px}.tree-node-edit strong{min-width:110px}.tree-node-edit label{display:flex;flex-direction:column}.tree-node-edit select{min-width:180px;max-width:100%}#tree-editor-message{white-space:pre-wrap;color:#9b2424}#tree-template-report{white-space:pre-wrap}.dependency-node{box-sizing:border-box}.dependency-node strong{white-space:normal;line-height:1.15;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}.dependency-node small{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;display:block}.dependency-text{font-size:12px;padding-left:22px}#main-feature-tree h4{margin:8px 0}#tree-editor-dialog .dialog-foot{position:static}@media(max-width:650px){.tree-node-edit{display:block}.tree-node-edit>*{margin:4px 0}.tree-node-edit select{width:100%}#tree-editor-dialog input{max-width:100%;box-sizing:border-box}}
/* Reserve real space for all four columns, so radio hit areas cannot cover Hide. */
#feature-table thead th:first-child{width:auto}#feature-table thead th:nth-child(2){width:38px}#feature-table thead th:nth-child(3){width:92px}#feature-table thead th:last-child{width:50px}.radios input{inset:0}#feature-table td:last-child{width:50px}

/* Shared state badges remain visible in both tree nodes and unlinked rows. */
.tree-node-state{display:flex;align-items:center;gap:6px;min-width:0}.tree-node-state .shared-badge{flex:0 0 auto;min-width:22px;font-size:14px;line-height:20px;padding:0 3px;text-align:center}.tree-node-state small{min-width:0;flex:1}.dependency-node strong{flex-shrink:0}.dependency-node .tree-node-state{flex-shrink:0}#add-feature-details{margin-top:12px;border-top:1px solid #929baa;padding-top:8px}#feature-management .feature-details{max-width:100%}
.feature-management-scroll table{table-layout:fixed}.feature-management-scroll th{overflow-wrap:anywhere}.feature-management-scroll thead th:last-child{width:150px;text-align:center}.feature-management-scroll td:last-child{text-align:center}
/* Dialog actions remain outside the scroll area on desktop and touch screens. */
#inventory-dialog[open],#tree-editor-dialog[open]{display:flex;flex-direction:column;overflow:hidden;height:min(940px,94dvh);max-height:94dvh;padding:0}
#inventory-dialog>.dialog-head,#tree-editor-dialog>.dialog-head{position:static;flex:0 0 auto;margin:0;padding:10px 14px;align-items:center;min-width:0}
.dialog-head>div{min-width:0}.dialog-head h2{overflow-wrap:anywhere}#tree-editor-owner{margin:2px 0 0;font-size:13px;overflow-wrap:anywhere}
.dialog-body{flex:1 1 auto;min-height:0;min-width:0;overflow:auto;overscroll-behavior:contain;scrollbar-gutter:stable;scroll-padding:12px}
#tree-editor-body{padding:12px 16px}
#inventory-dialog>.dialog-foot,#tree-editor-dialog>.dialog-foot{position:static;flex:0 0 auto;min-width:0;display:flex;flex-direction:row;justify-content:space-between;align-items:center;gap:8px;padding:10px 14px;margin:0;box-shadow:0 -2px 5px #26334822}
.dialog-foot>div{min-width:0}.dialog-foot .hint{font-size:12px;line-height:1.4}.dialog-foot>span{flex:1 1 240px}.dialog-foot>div:last-child{display:flex;flex-wrap:wrap;gap:5px}
#tree-editor-dialog>.dialog-foot>div{display:block;flex:1}#tree-editor-message{margin:4px 0 0;font-size:13px;max-height:72px;overflow:auto;overflow-wrap:anywhere}#tree-editor-message:empty{display:none}
.tree-start{display:flex;align-items:center;justify-content:space-between;gap:14px;border:1px solid #8994a7;background:#e3e7ee;padding:12px}.tree-start>div{min-width:0}.tree-start .hint{margin:4px 0 0}.tree-start button{flex:0 0 auto}#tree-editor-body>h3{font-size:16px;margin:16px 0 0}
.advanced-settings{margin:12px 0;padding:10px 12px;border:1px solid #8994a7;background:#d9dbdf}.advanced-settings>summary{cursor:pointer;font-weight:bold;color:#283e60}.advanced-settings>label{display:flex;flex-direction:column;gap:4px;max-width:460px}.advanced-settings input{max-width:100%;min-width:0}.advanced-settings .hint{overflow-wrap:anywhere}#feature-id-settings{margin-top:4px}#feature-id-settings input{font-family:monospace}#add-feature-details>.hint{margin-bottom:8px}
#tree-node-list{display:block}.tree-node-edit{display:block;padding:0;border:1px solid #a5adba;background:#e5e7eb;margin:6px 0}.tree-node-edit>summary{padding:9px 10px;cursor:pointer;overflow-wrap:anywhere}.node-parent-summary{display:block;margin:3px 0 0 18px;font-size:12px;font-weight:normal;color:#4e5a6e}.tree-node-edit strong{min-width:0}.node-edit-content{padding:0 10px 10px}.node-edit-content .hint{margin:4px 0 8px}.tree-node-edit .node-parent-options{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:5px;max-height:190px;overflow:auto;padding:4px}.tree-node-edit .node-parent-options label{display:flex;flex-direction:row;align-items:center;gap:7px;min-width:0;font-size:13px;overflow-wrap:anywhere}.node-parent-options input{flex:0 0 auto}.node-add-section{margin-top:16px;border-top:1px solid #a5adba;padding-top:10px}.node-add-section h4{margin:0 0 8px}#tree-template-select{max-width:100%}.editor-actions{min-width:0;flex-wrap:wrap}#tree-editor-body input,#tree-editor-body select{max-width:100%;min-width:0}.node-edit-content .segment-fields{padding:8px 0}
@media(max-width:650px){#inventory-dialog[open],#tree-editor-dialog[open]{width:98vw;height:96dvh;max-height:96dvh}#tree-editor-body{padding:10px}.tree-start{flex-direction:column;align-items:stretch;gap:8px}.tree-start button{align-self:flex-start}.tree-node-edit .node-parent-options{grid-template-columns:repeat(2,minmax(0,1fr))}.tree-node-edit>*{margin:0}.tree-node-edit>summary{padding:8px}.node-parent-summary{margin-left:14px}.dialog-head h2{font-size:17px}.dialog-head .hint{font-size:12px;line-height:1.35}#inventory-dialog>.dialog-foot,#tree-editor-dialog>.dialog-foot{padding:8px;gap:6px}.dialog-foot .hint{font-size:11px}.dialog-foot>div:last-child{flex:1;justify-content:flex-end}#tree-editor-dialog>.dialog-foot>div{flex:1 1 160px}#tree-editor-message{max-height:55px}}

#tree-editor-message[data-kind=info]{color:#283e60}#tree-editor-message[data-kind=error]{color:#9b2424}

#inventory-dialog>.dialog-foot>div{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:6px}#inventory-dialog>.dialog-foot button{white-space:nowrap}
@media(max-width:650px){#inventory-dialog>.dialog-foot>span{flex:1 0 100%}#inventory-dialog>.dialog-foot>div{flex:1 0 100%;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px}#inventory-dialog>.dialog-foot button{padding:6px 4px;font-size:12px;min-width:0}#save-phone-footer{grid-column:1 / -1}}
#add-feature-details>.segment-fields>label:last-child{grid-column:1 / -1}
.inventory-tools>label{display:flex;flex-wrap:wrap;align-items:center;gap:5px;min-width:0;max-width:100%}.inventory-tools select{min-width:0;max-width:100%;margin-left:0}
/* Zoom has a bounded scroll surface; the page columns keep their geometry. */
.tree-zoom-tools{display:flex;flex-wrap:wrap;align-items:center;gap:5px;margin:6px 0}.tree-zoom-tools button{font-size:12px;padding:4px 7px}.tree-zoom-tools output{font-size:12px;min-width:42px;text-align:center;font-variant-numeric:tabular-nums}.tree-scale-surface{position:relative;overflow:hidden}.tree-scale-surface>.dependency-canvas{position:absolute;left:0;top:0}.tree-start-actions{display:flex;flex-wrap:wrap;gap:6px;flex-shrink:0;max-width:100%}
#tree-viewer-dialog[open]{display:flex;flex-direction:column;overflow:hidden;width:96vw;height:94dvh;max-height:94dvh;padding:0}#tree-viewer-dialog>.dialog-head{flex:0 0 auto;position:static;margin:0;align-items:center}#tree-viewer-owner{margin:0;font-size:13px}#tree-viewer-dialog>.dialog-foot{position:static;flex:0 0 auto;margin:0;padding:8px 12px}#tree-expanded-view{padding:10px 14px}#tree-expanded-view .dependency-viewport{max-height:calc(94dvh - 220px)}#tree-expanded-view .tree-zoom-tools{position:sticky;top:-10px;z-index:2;background:var(--panel);padding:8px 0;margin-top:0}
@media(max-width:650px){.tree-start-actions{flex-shrink:1}#tree-viewer-dialog[open]{width:98vw;height:96dvh;max-height:96dvh}#tree-expanded-view{padding:8px}#tree-expanded-view .dependency-viewport{max-height:calc(96dvh - 260px)}#tree-viewer-dialog .dialog-head{padding:10px;gap:8px}#tree-viewer-dialog .dialog-head h2{font-size:16px}}
#tree-viewer-owner{overflow-wrap:anywhere}
