:root{color-scheme:light;--ink:#212431;--muted:#757783;--line:#e8e5e0;--paper:#fff;--cream:#faf8f4;--accent:#5d6fbc;--mint:#c4f0df;font-family:Inter,'Segoe UI',system-ui,-apple-system,sans-serif;font-synthesis:none}*{box-sizing:border-box}body{margin:0;background:var(--cream);color:var(--ink)}button,input,select{font:inherit}button{cursor:pointer}button:focus-visible,input:focus-visible,select:focus-visible{outline:3px solid #97a7fb;outline-offset:2px}a{color:inherit;text-decoration:none}.app-shell{max-width:1720px;margin:auto}.topbar{height:75px;padding:0 clamp(18px,3.2vw,58px);background:#fff;display:flex;justify-content:space-between;align-items:center;border-bottom:1px solid var(--line)}.brand{display:flex;gap:10px;align-items:center;font-size:20px;font-weight:850;letter-spacing:-1px}.brand-mark{display:grid;place-items:center;background:#202638;color:#bcebd8;width:39px;height:39px;border-radius:12px;font-size:25px}.brand-light{font-weight:420}.brand small{display:block;font-size:8px;font-weight:800;letter-spacing:2.1px;color:#818592;margin-left:1px}.top-actions{display:flex;align-items:center;gap:16px}.top-note{font-size:11px;color:#666a70}.online-dot{display:inline-block;width:7px;height:7px;border-radius:50%;background:#34b883;margin-right:4px}.plain-btn{border:0;background:transparent;color:#6c7282;font-weight:650;font-size:12px;padding:8px}.btn{border:0;border-radius:10px;padding:12px 16px;font-size:13px;font-weight:750;transition:transform .15s,filter .15s}.btn:hover{transform:translateY(-1px);filter:brightness(1.04)}.btn.primary{background:#202638;color:white}.btn.dark{background:#262a36;color:white}.btn.small{padding:10px 15px}.workspace{padding:30px clamp(18px,3.2vw,58px) 38px}.intro{display:flex;justify-content:space-between;align-items:center;min-height:227px;padding:8px 0 27px;border-bottom:1px solid var(--line)}.eyebrow{font-size:10px;font-weight:800;letter-spacing:2px;color:#70817a}.intro h1{font-size:clamp(32px,3.35vw,51px);letter-spacing:-2.3px;line-height:1.06;margin:15px 0 12px}.intro h1 em{font-style:normal;color:#6678b9}.intro p{font-size:13px;color:#747581;max-width:500px;line-height:1.8;margin:0}.intro-art{position:relative;width:210px;height:170px;margin-right:65px}.art-card{position:absolute;border-radius:15px;width:130px;height:155px;box-shadow:0 10px 28px #22223316;border:1px solid #e8e1df}.art-back{transform:rotate(12deg);left:66px;top:7px;background:#d9daf4;display:flex;align-items:center;justify-content:center;font-weight:800;font-size:18px;color:#515a9a}.art-back small{position:absolute;bottom:12px;font-size:10px}.art-front{transform:rotate(-10deg);left:5px;top:0;background:#fffdf4;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px}.art-front span{font-size:55px}.art-front strong{font-size:20px}.art-front small{font-size:10px;color:#899;letter-spacing:1px}.workgrid{display:grid;grid-template-columns:minmax(245px,295px) minmax(370px,1fr) minmax(255px,330px);gap:25px;align-items:start;margin-top:28px}.sidebar,.content-area,.preview-panel{min-width:0}.sidebar{background:#fff;border:1px solid var(--line);border-radius:15px;padding:20px}.panel-title{display:flex;gap:9px;align-items:center;margin-bottom:19px}.panel-title h2{font-size:15px;letter-spacing:-.35px;margin:0;flex:1}.panel-title .muted{font-size:10px;color:#9a9ba2}.section-num{width:26px;height:26px;border-radius:8px;background:#edf0f8;display:grid;place-items:center;color:#6377ac;font-size:10px;font-weight:850;flex:none}.field{display:flex;flex-direction:column;gap:8px;margin-bottom:16px}.field>span,.field-label{font-size:11px;font-weight:750;color:#535661}.field input:not([type=color]),.field select,.library-controls select,.custom-form input{width:100%;border:1px solid #e1e2e7;background:#fff;min-height:40px;border-radius:8px;padding:0 10px;font-size:12px;color:#303542;min-width:0}.field select,.library-controls select{appearance:auto}.field input:focus,.field select:focus{border-color:#7f91ce}.two-col{display:grid;grid-template-columns:1fr 1fr;gap:8px}.sidebar hr{height:1px;background:#eee;border:0;margin:18px 0}.theme-options{display:grid;grid-template-columns:repeat(4,1fr);gap:6px;margin:10px 0 16px}.theme-option{border:1px solid transparent;background:transparent;border-radius:8px;padding:3px 2px 6px;color:#6c6d76;font-size:10px;font-weight:650}.theme-option.active{border-color:#7d92db;background:#f7f8fc;color:#222}.theme-swatch{display:grid;place-items:center;margin-bottom:5px;border-radius:5px;height:38px;font-size:15px;font-weight:800}.swatch-clean{background:#f8f8f5;border:1px solid #eee;color:#262d3d}.swatch-pastel{background:#ece6fc;color:#7561ae}.swatch-bold{background:#25314d;color:#f7f0d7}.swatch-mono{background:#fff;border:1px solid #181818;color:#111}.color-row{flex-direction:row;align-items:center;justify-content:space-between}.color-row input{border:0;padding:0;width:43px;height:27px;background:none;cursor:pointer}.switch-row{display:flex;align-items:center;gap:8px;font-size:11px;color:#565965;margin:12px 0}.switch-row input{accent-color:#5c70b8}.sidebar-tip{background:#f5f7ee;border:1px solid #e7eddb;border-radius:10px;padding:11px 12px;margin-top:12px}.sidebar-tip strong{font-size:11px;color:#647550}.sidebar-tip p{font-size:10px;line-height:1.65;color:#717966;margin:5px 0 0}.content-heading{margin:3px 0 15px}.content-heading h2{font-size:20px}.count-pill{background:#e5f4e9;color:#397b59;font-size:11px;font-weight:700;padding:6px 10px;border-radius:30px}.library-controls{display:grid;grid-template-columns:1fr 174px;gap:10px}.search-wrap{display:flex;align-items:center;gap:7px;border:1px solid #dedee5;border-radius:9px;background:white;padding:0 12px}.search-wrap span{font-size:24px;color:#89909a}.search-wrap input{width:100%;height:44px;background:transparent;border:0;outline:0;font-size:12px;min-width:0}.library-controls select{height:45px}.library-actions{display:flex;align-items:center;gap:17px;flex-wrap:wrap;margin:12px 0 17px}.link-btn{border:0;background:transparent;padding:0;color:#6478b8;font-weight:700;font-size:11px}.muted-link{color:#95969e}.word-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:9px;max-height:490px;overflow:auto;padding:2px 3px 8px 0;scrollbar-color:#d7d7e0 transparent;scrollbar-width:thin}.word-item{position:relative;min-height:117px;border:1px solid #e6e4e1;background:#fff;border-radius:11px;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:8px 4px;gap:4px;transition:background .13s,border-color .13s}.word-item:hover{border-color:#99a7d9}.word-item.selected{background:#eef2fc;border-color:#8194cf;box-shadow:inset 0 0 0 1px #8194cf}.word-item .emoji{font-size:35px;line-height:1.25}.word-item strong{font-size:12px;max-width:100%;overflow-wrap:anywhere;line-height:1.25}.word-item small{font-size:10px;color:#7b7b89;max-width:100%;overflow-wrap:anywhere}.word-item .checkmark{position:absolute;right:8px;top:7px;width:16px;height:16px;border:1px solid #d9dbe5;border-radius:5px;font-size:10px;background:#fff;color:transparent;display:grid;place-items:center}.word-item.selected .checkmark{background:#6e82bf;color:#fff;border-color:#6e82bf}.empty-message{grid-column:1/-1;font-size:12px;padding:22px;color:#777}.custom-area,.selected-section{margin-top:24px;border-top:1px solid var(--line);padding-top:22px}.custom-area h3,.selected-head h3{font-size:15px;margin:0}.custom-area p,.selected-head p{font-size:11px;margin:5px 0 14px;color:#92919a}.custom-form{display:grid;grid-template-columns:1fr 1fr 52px;gap:7px}.custom-form input{min-width:0}.custom-form .btn{grid-column:1/-1}.selected-head{display:flex;align-items:start;justify-content:space-between;gap:12px}.selected-head .link-btn{padding-top:3px;white-space:nowrap}.selected-list{display:flex;flex-direction:column;gap:7px;max-height:260px;overflow:auto}.selected-card{display:grid;grid-template-columns:29px 1fr auto;align-items:center;gap:8px;border:1px solid #e7e6e4;background:#fff;border-radius:8px;padding:7px 9px}.selected-card .mini-emoji{font-size:22px}.selected-card strong{display:block;font-size:11px}.selected-card small{display:block;color:#848692;font-size:10px;margin-top:2px}.selected-card .move{display:flex;gap:2px}.selected-card button{background:#f7f8fa;border:0;border-radius:5px;color:#5d6475;padding:4px 6px;font-size:11px}.selected-card button:disabled{opacity:.3}.import-row{display:flex;flex-wrap:wrap;gap:9px;align-items:center;margin-top:14px}.import-row span{font-size:10px;color:#8e919d}.file-button{border:1px dashed #a6aecc;padding:9px 10px;border-radius:8px;color:#6374ad;font-weight:750;font-size:10px;cursor:pointer}.file-button input{position:absolute;width:1px;height:1px;opacity:0}.preview-panel{background:#f0efeb;border:1px solid #e8e5df;border-radius:15px;padding:18px}.preview-sticky{position:sticky;top:15px}.preview-title{display:flex;align-items:center;gap:7px}.preview-title h2{font-size:16px;margin:0;flex:1}.preview-tag{font-size:9px;color:#8c8e97}.preview-desc{color:#878791;font-size:11px;line-height:1.6;margin:10px 0 16px}.sheet-preview{background:#fff;width:100%;aspect-ratio:210 / 297;box-shadow:0 8px 22px #22222217;padding:6%;display:flex;flex-direction:column;gap:3%;overflow:hidden}.mock-header{font-size:7px;letter-spacing:.2px;color:#535a68;display:flex;justify-content:space-between;border-bottom:1px solid #eaeaea;padding-bottom:5px}.mock-grid{flex:1;min-height:0;display:grid;gap:3%;grid-template-columns:repeat(2,1fr);grid-template-rows:repeat(2,1fr)}.mock-grid.grid-2{grid-template-columns:1fr;grid-template-rows:repeat(2,1fr)}.mock-grid.grid-9{grid-template-columns:repeat(3,1fr);grid-template-rows:repeat(3,1fr)}.mock-card{border:1px dashed #a5a5a5;border-radius:2px;min-width:0;min-height:0;display:flex;flex-direction:column;justify-content:center;align-items:center;gap:4px;background:#fcfbf8;overflow:hidden;padding:3px}.mock-card .emoji{font-size:25px;line-height:1.1}.mock-card strong{font-size:9px;overflow-wrap:anywhere;text-align:center}.mock-card small{font-size:6px;color:#6b7180}.mock-grid.grid-9 .mock-card .emoji{font-size:14px}.mock-grid.grid-9 .mock-card strong{font-size:6px}.mock-grid.grid-2 .mock-card .emoji{font-size:39px}.mock-footer{font-size:6px;color:#9699a0;display:flex;justify-content:space-between}.preview-stats{display:grid;grid-template-columns:repeat(3,1fr);gap:5px;margin:17px 0}.preview-stats div{display:flex;flex-direction:column;align-items:center;border-right:1px solid #dfdcd7}.preview-stats div:last-child{border:0}.preview-stats strong{font-size:19px}.preview-stats span{font-size:10px;color:#96939a}.print-btn{width:100%;padding:15px}.preview-calibration{width:100%;margin-top:7px}.preview-hint{font-size:10px;line-height:1.7;color:#93919a;margin:12px 2px}.status{font-size:11px;color:#387c5d;min-height:16px;line-height:1.5}.status.error{color:#a52d2d}.site-footer{display:flex;gap:14px;justify-content:space-between;border-top:1px solid var(--line);padding:22px clamp(18px,3.2vw,58px);font-size:10px;color:#92929c}.print-deck{display:none}
/* Print sheets are full A4 pages, with zero browser margins: cards stay in fixed mm coordinates. */
@page{size:A4 portrait;margin:0}
.sheet{width:210mm;height:297mm;box-sizing:border-box;padding:12mm;display:flex;flex-direction:column;background:#fff;color:#202430;overflow:hidden;break-after:page;page-break-after:always;position:relative;--print-accent:#0088b0}.sheet:last-child{break-after:auto;page-break-after:auto}.sheet-header{height:16mm;flex:none;display:flex;align-items:start;justify-content:space-between;gap:5mm;font-family:'Segoe UI',Arial,sans-serif}.sheet-header strong{font-size:10pt;letter-spacing:-.2pt}.sheet-header .sheet-sub{display:block;font-size:7pt;line-height:1.5;color:#778094;margin-top:1mm}.sheet-header .sheet-id{font-size:7pt;color:#7a7a83;text-align:right}.sheet-grid{flex:1;min-height:0;display:grid;gap:4mm;grid-template-columns:repeat(2,minmax(0,1fr));grid-template-rows:repeat(2,minmax(0,1fr))}.sheet.layout-2 .sheet-grid{grid-template-columns:1fr;grid-template-rows:repeat(2,minmax(0,1fr))}.sheet.layout-9 .sheet-grid{grid-template-columns:repeat(3,minmax(0,1fr));grid-template-rows:repeat(3,minmax(0,1fr))}.sheet-footer{height:10mm;flex:none;display:flex;align-items:end;justify-content:space-between;gap:5mm;font-size:6.5pt;color:#82848b;font-family:'Segoe UI',Arial,sans-serif}.print-card{position:relative;min-height:0;min-width:0;overflow:hidden;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:6mm;text-align:center;border:0.3mm dashed #9c9c9c;background:#fff;--card-bg:#fcfaf5;--card-fg:#283146;--card-muted:#747b8d}.print-card::before{content:"";position:absolute;inset:1.5mm;border:.35mm solid var(--print-accent);border-radius:3mm;pointer-events:none}.print-card .card-number{position:absolute;top:4mm;left:5mm;font-size:8pt;color:var(--card-muted)}.print-card .card-lang{font-size:8pt;letter-spacing:1.5pt;color:var(--print-accent);font-weight:800;margin-bottom:2mm}.print-card .card-emoji{font-family:'Segoe UI Emoji','Noto Color Emoji',sans-serif;font-size:62pt;line-height:1.3;margin-bottom:4mm}.print-card .card-term{font-size:23pt;font-weight:850;color:var(--card-fg);line-height:1.18;overflow-wrap:anywhere;max-width:100%}.print-card .card-translation{font-size:12pt;color:var(--card-muted);line-height:1.3;margin-top:3mm;overflow-wrap:anywhere}.sheet.layout-2 .card-emoji{font-size:91pt}.sheet.layout-2 .card-term{font-size:33pt}.sheet.layout-2 .card-translation{font-size:16pt}.sheet.layout-9 .print-card{padding:3.5mm}.sheet.layout-9 .print-card::before{inset:1mm;border-radius:1.5mm}.sheet.layout-9 .card-emoji{font-size:40pt;margin-bottom:2mm}.sheet.layout-9 .card-term{font-size:15pt}.sheet.layout-9 .card-translation{font-size:9pt;margin-top:1.5mm}.sheet.layout-9 .card-lang{font-size:6pt;margin-bottom:1mm}.sheet.layout-9 .card-number{font-size:6pt;top:2mm;left:3mm}.sheet.theme-clean .print-card{--card-bg:#fcfaf5;background:var(--card-bg)}.sheet.theme-pastel .print-card{background:#f2eefc;--card-fg:#40365d;--card-muted:#6d6394}.sheet.theme-pastel .print-card::before{border-color:#a698d8}.sheet.theme-bold .print-card{background:#222d43;--card-fg:#fff9e9;--card-muted:#d6d9e0;border-color:#9297a1}.sheet.theme-bold .print-card::before{border-color:#c4eddb}.sheet.theme-bold .card-lang{color:#b9efda}.sheet.theme-mono .print-card{background:white;--card-fg:#111;--card-muted:#444;border-color:#444}.sheet.theme-mono .print-card::before{border-color:#222}.sheet.theme-mono{--print-accent:#111!important}.sheet:not(.cuts) .print-card{border-color:transparent}.sheet:not(.cuts) .sheet-sub.cut-hint,.sheet:not(.cuts) .sheet-footer .cut-hint{visibility:hidden}.calibration .sheet-grid{grid-template-columns:repeat(2,1fr)!important;grid-template-rows:repeat(2,1fr)!important}.calibration .cal-card{position:relative;border:.35mm dashed black;display:flex;align-items:center;justify-content:center;flex-direction:column;text-align:center;font-size:12pt;font-weight:750}.calibration .cal-card span{margin-top:3mm;font-size:8pt;font-weight:normal}.calibration .cross{position:absolute;top:2mm;left:2mm;font-size:15pt;font-weight:normal}
@media print{html,body{background:#fff!important;margin:0!important;padding:0!important;width:210mm!important}body *{visibility:hidden!important}.app-shell{display:none!important}body.print-normal #printDeck,body.print-calibration #calibrationDeck{display:block!important;position:absolute;left:0;top:0;width:210mm;visibility:visible!important}body.print-normal #printDeck *,body.print-calibration #calibrationDeck *{visibility:visible!important}.sheet{box-shadow:none!important;-webkit-print-color-adjust:exact;print-color-adjust:exact}}
@media(max-width:1240px){.workgrid{grid-template-columns:265px 1fr}.preview-panel{grid-column:1/-1}.preview-sticky{display:grid;grid-template-columns:1fr 260px;gap:0 22px;align-items:start}.preview-title,.preview-desc{grid-column:1}.sheet-preview{grid-column:2;grid-row:1/7}.preview-stats{grid-column:1}.print-btn,.preview-calibration,.preview-hint,.status{grid-column:1}}
@media(max-width:810px){.topbar{padding:0 15px}.top-note{display:none}.workspace{padding:22px 14px}.intro-art{margin-right:15px;transform:scale(.82);transform-origin:center right}.workgrid{grid-template-columns:1fr;gap:17px}.preview-panel{grid-column:auto}.preview-sticky{display:block}.sheet-preview{max-width:310px;margin:auto}.word-grid{grid-template-columns:repeat(4,minmax(0,1fr));max-height:400px}.sidebar{padding:16px}.theme-options{max-width:320px}}
@media(max-width:480px){.brand{font-size:17px}.brand-mark{width:35px;height:35px}.top-actions{gap:4px}.top-actions #reset{display:none}.intro{min-height:auto;padding:10px 0 24px}.intro h1{letter-spacing:-1.6px}.intro-art{display:none}.intro p{max-width:310px}.library-controls{grid-template-columns:1fr}.word-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.word-item{min-height:108px}.library-actions{gap:10px}.site-footer{flex-direction:column}.custom-form{grid-template-columns:1fr 1fr 46px}}

/* Preserve the browser's hidden attribute even on flex fields. */
[hidden]{display:none!important}
/* Long learner-supplied labels fit in compact print cards rather than spilling. */
.sheet.layout-2 .print-card.long .card-term{font-size:25pt}
.sheet.layout-2 .print-card.very-long .card-term{font-size:17pt}
.sheet.layout-4 .print-card.long .card-term{font-size:16pt}
.sheet.layout-4 .print-card.very-long .card-term{font-size:11pt}
.sheet.layout-9 .print-card.long .card-term{font-size:11pt}
.sheet.layout-9 .print-card.very-long .card-term{font-size:8pt}
.sheet.layout-9 .print-card.very-long .card-emoji{font-size:28pt}
