:root {
  --ink: #16375f;
  --muted: #64748b;
  --line: #dbe5ef;
  --paper: #ffffff;
  --canvas: #eef4f9;
  --blue: #1766a7;
  --shadow: 0 18px 50px rgba(22, 55, 95, .12);
  --radius: 18px;
  font-family: "Avenir Next", Avenir, "Segoe UI", Arial, sans-serif;
  color: var(--ink);
  background: var(--canvas);
}

* { box-sizing: border-box; }
html { min-width: 320px; background: var(--canvas); }
body { margin: 0; min-height: 100vh; background: linear-gradient(135deg, #edf5fb 0%, #f8fbfd 62%, #eef3f8 100%); }
button, input { font: inherit; }
button { cursor: pointer; }

.app-shell { min-height: 100vh; display: flex; flex-direction: column; }
.app-header { display: flex; align-items: center; justify-content: space-between; gap: 28px; padding: 26px clamp(20px, 4vw, 64px) 22px; border-bottom: 1px solid rgba(139, 164, 190, .28); background: rgba(255,255,255,.83); backdrop-filter: blur(12px); }
.brand { display: flex; align-items: center; gap: 16px; }
.brand-mark { width: 48px; height: 48px; border-radius: 14px; padding: 9px; display: grid; grid-template-columns: repeat(2, 1fr); gap: 4px; background: var(--ink); box-shadow: 0 7px 16px rgba(22,55,95,.2); }
.brand-mark span { display: block; border-radius: 3px; background: #fff; }
.brand-mark span:nth-child(2) { background: #f1c453; }
.brand-mark span:nth-child(3) { background: #eb6b71; }
.brand-mark span:nth-child(4) { background: #6fc1a0; }
.eyebrow { margin: 0 0 5px; color: #6480a2; font-size: 10px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; }
h1, h2, p { margin-top: 0; }
.app-header h1 { margin-bottom: 5px; color: var(--ink); font-size: clamp(21px, 2.2vw, 31px); line-height: 1.08; letter-spacing: -.03em; }
.header-copy { margin-bottom: 0; color: var(--muted); font-size: 13px; }
.header-actions, .toolbar-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 9px; justify-content: flex-end; }
.button { min-height: 39px; padding: 9px 14px; border: 1px solid transparent; border-radius: 10px; font-size: 12px; font-weight: 750; letter-spacing: .01em; transition: transform .18s ease, box-shadow .18s ease, background .18s ease; }
.button:disabled { cursor: not-allowed; opacity: .52; transform: none; }
.button:hover { transform: translateY(-1px); }
.button-primary { color: #fff; background: var(--ink); box-shadow: 0 6px 14px rgba(22,55,95,.18); }
.button-primary:hover { box-shadow: 0 9px 20px rgba(22,55,95,.24); background: #0e2d52; }
.button-view { color: #fff; border-color: #278967; background: #319e7b; box-shadow: 0 6px 14px rgba(49,158,123,.2); }
.button-view:hover { border-color: #217756; background: #278866; box-shadow: 0 9px 20px rgba(49,158,123,.28); }
.button-phrase { color: #fff; border-color: #6b57a8; background: #7764bd; box-shadow: 0 6px 14px rgba(119,100,189,.2); }
.button-phrase:hover { border-color: #57448e; background: #6653a8; box-shadow: 0 9px 20px rgba(119,100,189,.28); }
.button-one-picto { color: #fff; border-color: #218c9c; background: #2ca7b5; box-shadow: 0 6px 14px rgba(44,167,181,.2); }
.button-one-picto:hover { border-color: #177783; background: #238f9c; box-shadow: 0 9px 20px rgba(44,167,181,.28); }
.header-actions .button-one-picto, .header-actions .button-phrase { display: inline-flex; align-items: center; gap: 7px; }
.header-actions .button-one-picto { color: #2ca7b5; border-color: #2ca7b5; background: #edf9fb; box-shadow: 0 5px 12px rgba(44,167,181,.14); }
.header-actions .button-one-picto:hover { color: #218c9c; border-color: #218c9c; background: #dff3f6; box-shadow: 0 8px 17px rgba(44,167,181,.22); }
.header-actions .button-phrase { color: #7764bd; border-color: #7764bd; background: #f4f0fb; box-shadow: 0 5px 12px rgba(119,100,189,.14); }
.header-actions .button-phrase:hover { color: #6653a8; border-color: #6653a8; background: #e9e0f8; box-shadow: 0 8px 17px rgba(119,100,189,.22); }
.button-quiet { color: var(--ink); background: #fff; border-color: #d6e2ee; }
.button-quiet:hover { border-color: #a9bfd3; background: #f8fbfd; }
.button-export, .button-import { display: inline-flex; align-items: center; gap: 7px; }
.button-export { color: #216b9a; border-color: #a7cfe8; background: #eef8fd; box-shadow: 0 5px 12px rgba(33,107,154,.13); }
.button-export:hover { color: #174f76; border-color: #6faed2; background: #e2f3fc; box-shadow: 0 8px 17px rgba(33,107,154,.2); }
.button-import { color: #2c7c63; border-color: #b3decf; background: #effaf5; box-shadow: 0 5px 12px rgba(44,124,99,.13); }
.button-import:hover { color: #21604d; border-color: #77bca4; background: #e2f6ed; box-shadow: 0 8px 17px rgba(44,124,99,.2); }
.header-action-icon { flex: 0 0 18px; width: 18px; height: 18px; display: inline-grid; place-items: center; }
.header-action-icon svg { width: 18px; height: 18px; display: block; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 2; }

.app-main { display: grid; grid-template-columns: clamp(340px, 22vw, 380px) minmax(0, 1fr); gap: 26px; align-items: start; width: min(1760px, calc(100% - 28px)); margin: 26px auto 35px; flex: 1; }
.library-panel { position: sticky; top: 18px; padding: 20px; border: 1px solid rgba(197, 214, 229, .76); border-radius: var(--radius); background: rgba(255,255,255,.78); box-shadow: 0 10px 28px rgba(36,73,109,.06); }
.library-heading, .workspace-toolbar, .modal-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.library-heading h2, .toolbar-title h2, .modal-head h2 { margin: 0; color: var(--ink); font-size: 20px; letter-spacing: -.025em; }
.icon-button { width: 34px; height: 34px; display: inline-grid; place-items: center; padding: 0; border: 1px solid #cadbea; border-radius: 10px; color: var(--ink); background: #fff; font-size: 22px; line-height: 1; }
.icon-button:hover { background: #edf6fc; border-color: #9ebbd4; }
.search-box { display: flex; align-items: center; gap: 8px; margin: 18px 0 13px; padding: 0 11px; border: 1px solid #cfdeeb; border-radius: 11px; color: #7890a9; background: #fbfdff; }
.search-box input { width: 100%; min-width: 0; height: 38px; border: 0; outline: 0; color: var(--ink); background: transparent; font-size: 13px; }
.filter-row { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.filter-chip { padding: 6px 8px; border: 1px solid #d7e2ec; border-radius: 99px; color: #66809d; background: #fff; font-size: 10px; font-weight: 750; }
.filter-chip.active { color: #fff; border-color: var(--ink); background: var(--ink); }
.routine-list { min-width: 0; display: grid; gap: 7px; max-height: min(53vh, 570px); overflow-x: hidden; overflow-y: auto; padding-right: 3px; }
.routine-list::-webkit-scrollbar { width: 5px; }
.routine-list::-webkit-scrollbar-thumb { border-radius: 5px; background: #ccd9e5; }
.routine-item { width: 100%; min-width: 0; display: grid; grid-template-columns: 27px minmax(0, 1fr); align-items: center; gap: 4px; padding: 5px 6px 5px 4px; border: 1px solid transparent; border-radius: 13px; color: var(--ink); text-align: left; background: transparent; cursor: grab; user-select: none; transition: border-color .18s ease, background .18s ease, opacity .18s ease, box-shadow .18s ease; }
.routine-item:hover { background: #f3f8fc; }
.routine-item:active { cursor: grabbing; }
.routine-item.dragging { opacity: .5; }
.routine-item.drag-over { border-color: #80acd0; background: #eaf5fc; box-shadow: inset 0 3px 0 #2776aa, 0 5px 14px rgba(39,118,170,.12); }
.routine-item.drag-over-after { box-shadow: inset 0 -3px 0 #2776aa, 0 5px 14px rgba(39,118,170,.12); }
.routine-item.active { border-color: #bdd7e9; background: #eaf5fc; box-shadow: inset 3px 0 0 var(--item-color, #1766a7); }
.routine-item.active.drag-over { border-color: #80acd0; background: #eaf5fc; box-shadow: inset 0 3px 0 #2776aa, 0 5px 14px rgba(39,118,170,.12); }
.routine-item.active.drag-over-after { border-color: #80acd0; background: #eaf5fc; box-shadow: inset 0 -3px 0 #2776aa, 0 5px 14px rgba(39,118,170,.12); }
.routine-select { width: 100%; min-width: 0; display: grid; grid-template-columns: 38px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 4px; border: 0; border-radius: 10px; color: var(--ink); text-align: left; background: transparent; }
.routine-select:hover { background: rgba(255,255,255,.7); }
.routine-delete { width: 25px; height: 25px; display: grid; place-items: center; padding: 0; border: 1px solid #f0c9d0; border-radius: 8px; color: #c35c6b; background: #fff7f8; font-size: 17px; font-weight: 500; line-height: 1; opacity: .7; transition: color .18s ease, background .18s ease, border-color .18s ease, transform .18s ease, opacity .18s ease; }
.routine-delete:hover, .routine-delete:focus-visible { color: #fff; border-color: #c94f62; background: #c94f62; opacity: 1; transform: scale(1.06); outline: none; }
.routine-icon { width: 38px; height: 38px; display: grid; place-items: center; overflow: hidden; border-radius: 11px; background: var(--item-soft, #e7f3fb); }
.routine-icon img { width: 31px; height: 31px; object-fit: contain; }
.routine-name { overflow: hidden; font-size: 12px; font-weight: 780; line-height: 1.2; text-overflow: ellipsis; white-space: nowrap; }
.routine-category { margin-top: 3px; overflow: hidden; color: #7b91a9; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.routine-count { min-width: 20px; padding: 3px 5px; border-radius: 99px; color: #6b849f; background: #fff; font-size: 10px; font-weight: 800; text-align: center; }
.empty-list { padding: 22px 8px; color: #7287a0; font-size: 12px; line-height: 1.5; text-align: center; }
.library-note { display: flex; gap: 9px; margin-top: 19px; padding: 12px; border-radius: 13px; color: #58718d; background: #f2f7fb; }
.note-icon { flex: 0 0 19px; width: 19px; height: 19px; display: grid; place-items: center; border-radius: 50%; color: #fff; background: #4a87b4; font-size: 12px; font-weight: 800; }
.library-note p { margin-bottom: 0; font-size: 10px; line-height: 1.45; }

.workspace { min-width: 0; }
.workspace-toolbar { margin: 3px 0 18px; }
.toolbar-title h2 { font-size: clamp(21px, 2.4vw, 30px); }
.editor-form { display: grid; grid-template-columns: minmax(180px, 1.25fr) minmax(200px, 2fr); gap: 12px; margin-bottom: 10px; }
.editor-form label { display: flex; flex-direction: column; gap: 5px; color: #6a829d; font-size: 10px; font-weight: 800; letter-spacing: .02em; text-transform: uppercase; }
.editor-form input[type="text"] { width: 100%; height: 39px; padding: 0 11px; border: 1px solid #ccdae7; border-radius: 10px; outline: none; color: var(--ink); background: rgba(255,255,255,.88); font-size: 13px; font-weight: 650; text-transform: none; }
.editor-form input[type="text"]:focus { border-color: #80acd0; box-shadow: 0 0 0 3px rgba(47,132,187,.12); }
.accent-control { min-width: 96px; }
.color-trigger { width: 100%; height: 39px; display: flex; align-items: center; gap: 6px; min-width: 0; padding: 4px 7px; border: 1px solid #ccdae7; border-radius: 10px; color: var(--ink); background: #fff; text-align: left; transition: border-color .18s ease, box-shadow .18s ease, background .18s ease; }
.color-trigger:hover, .color-trigger:focus-visible { border-color: #80acd0; outline: none; box-shadow: 0 0 0 3px rgba(47,132,187,.12); background: #fbfdff; }
.color-trigger:disabled { cursor: not-allowed; opacity: .55; }
.color-trigger-swatch { flex: 0 0 25px; width: 25px; height: 25px; border: 2px solid #fff; border-radius: 7px; background: #1774b8; box-shadow: 0 0 0 1px #b8cddd; }
.color-trigger-value { min-width: 0; overflow: hidden; color: #58728d; font-size: 9px; font-weight: 850; letter-spacing: .02em; text-overflow: ellipsis; white-space: nowrap; }
.preview-help { display: flex; align-items: center; gap: 7px; min-height: 26px; margin-bottom: 11px; color: #748aa1; font-size: 11px; }
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: #4db68d; }
.status-dot.dirty { background: #ed9d4e; }
.help-separator { color: #b3c1ce; }
.editor-preview-area { display: grid; grid-template-columns: minmax(0, 1fr) 145px; align-items: stretch; gap: 12px; min-width: 0; }
.editor-action-rail { position: relative; min-height: 210mm; display: flex; flex-direction: column; align-items: stretch; padding: 12px 9px; border: 1px solid rgba(197,214,229,.8); border-radius: 16px; background: rgba(255,255,255,.72); box-shadow: 0 10px 26px rgba(36,73,109,.07); }
.editor-action-top { display: flex; flex-direction: column; gap: 10px; }
.editor-color-control { display: block; margin-bottom: 1px; }
.editor-color-control .color-trigger { height: 42px; justify-content: flex-start; gap: 8px; padding-right: 9px; color: #315a7b; border-color: #a9c7df; background: #eef6fc; box-shadow: 0 6px 14px rgba(75,130,177,.14); }
.editor-color-control .color-trigger:hover { color: #234665; border-color: #7fa9ca; background: #e3f0fa; box-shadow: 0 9px 20px rgba(75,130,177,.21); }
.editor-color-control .color-trigger-value { color: currentColor; font-size: 12px; font-weight: 800; text-transform: none; }
.editor-action-top .button-view { color: #3d9a91; border-color: #3d9a91; background: #eaf7f5; box-shadow: 0 5px 12px rgba(61,154,145,.14); }
.editor-action-top .button-view:hover { color: #3d9a91; border-color: #3d9a91; background: #dff2ef; box-shadow: 0 8px 17px rgba(61,154,145,.22); }
.editor-action-top .editor-save { color: #704b9a; border-color: #d3b8eb; background: #f8f1fd; box-shadow: 0 5px 12px rgba(112,75,154,.14); }
.editor-action-top .editor-save:hover { color: #59377f; border-color: #b994db; background: #eee2fa; box-shadow: 0 8px 17px rgba(112,75,154,.22); }
.editor-print-all { color: #995d16; border-color: #efae5a; background: #fff3df; box-shadow: 0 6px 14px rgba(239,174,90,.2); }
.editor-print-all:hover { color: #7f470c; border-color: #d88d31; background: #ffe6bb; box-shadow: 0 9px 20px rgba(216,141,49,.28); }
.editor-print-current { color: #ad5b5f; border-color: #efb5b5; background: #fff2f2; box-shadow: 0 5px 12px rgba(173,91,95,.14); }
.editor-print-current:hover { color: #8f4147; border-color: #dc8d92; background: #ffe5e6; box-shadow: 0 8px 17px rgba(173,91,95,.22); }
.editor-action-button { width: 100%; min-height: 48px; display: flex; align-items: center; justify-content: flex-start; gap: 8px; padding: 8px 9px; font-size: 12px; font-weight: 800; line-height: 1.16; text-align: left; white-space: normal; }
.editor-action-icon { flex: 0 0 19px; width: 19px; height: 19px; display: inline-grid; place-items: center; font-size: 15px; font-weight: 900; line-height: 1; }
.editor-action-icon svg { width: 19px; height: 19px; display: block; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.9; }
.editor-add-step { position: absolute; top: 50%; right: 50%; width: 64px; height: 64px; display: grid; place-items: center; padding: 0; transform: translate(50%, -50%); border: 0; border-radius: 50%; color: var(--ink); background: #e1e6eb; box-shadow: 0 10px 24px rgba(22,55,95,.18), 0 0 0 6px rgba(255,255,255,.86); line-height: 0; transition: transform .18s ease, background .18s ease, box-shadow .18s ease; }
.editor-add-step svg { width: 31px; height: 31px; display: block; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 2.4; }
.editor-add-step:hover, .editor-add-step:focus-visible { transform: translate(50%, -50%) scale(1.08); background: #d1d8df; box-shadow: 0 13px 28px rgba(22,55,95,.24), 0 0 0 6px rgba(255,255,255,.95); outline: none; }
.editor-add-step:active { transform: translate(50%, -50%) scale(.98); }
.editor-project-actions { display: flex; flex-direction: column; gap: 10px; margin-top: auto; padding-top: 12px; border-top: 1px solid rgba(197,214,229,.8); }
.editor-project-button { width: 100%; justify-content: flex-start; padding: 8px 9px; font-size: 12px; font-weight: 800; line-height: 1.16; text-align: left; white-space: normal; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
body.visualizing .editor-action-rail, body.phrase-visualizing .editor-action-rail { display: none !important; }
.sheet-mount { display: flex; justify-content: center; min-height: 210mm; padding: 6px; border-radius: 16px; background: rgba(213,226,237,.48); box-shadow: inset 0 0 0 1px rgba(185,204,220,.45); overflow: auto; }

/* The preview is the exact A4 landscape page that the browser prints. */
.a4-sheet { position: relative; width: 297mm; height: 210mm; flex: 0 0 auto; overflow: hidden; padding: 12mm 13mm 9mm; border: 2px solid #d8e2eb; background: var(--paper); color: #152f53; box-shadow: var(--shadow); }
.a4-sheet::before { position: absolute; inset: 5px; z-index: 0; border: 2px solid color-mix(in srgb, var(--accent) 40%, white); content: ""; pointer-events: none; }
.a4-sheet::after { position: absolute; inset: 8px; z-index: 0; border: 5px solid transparent; border-image: linear-gradient(90deg, #f2a6b5 0 12%, #f3d177 12% 24%, #8ccbb0 24% 37%, #a6c6e7 37% 50%, #e5a7ca 50% 63%, #f1c77f 63% 76%, #99c8e8 76% 88%, #efb1c5 88% 100%) 1; opacity: .8; content: ""; pointer-events: none; }
.sheet-inner { position: relative; z-index: 1; height: 100%; display: flex; flex-direction: column; }
.sheet-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 15px; padding: 1mm 4mm 4mm; }
.sheet-kicker { margin-bottom: 4px; color: var(--accent); font-size: 9px; font-weight: 900; letter-spacing: .18em; text-transform: uppercase; }
.sheet-title { max-width: 215mm; margin: 0; color: #143b70; font-family: "Trebuchet MS", "Segoe UI", sans-serif; font-size: clamp(25px, 3.4vw, 43px); font-weight: 900; line-height: .98; letter-spacing: .01em; text-transform: uppercase; }
.sheet-subtitle { max-width: 215mm; margin: 7px 0 0; color: #5e7794; font-size: 13px; font-weight: 650; }
.sheet-emblem { width: 22mm; height: 22mm; display: grid; place-items: center; border: 3px solid var(--accent); border-radius: 50%; background: #fff; box-shadow: 0 6px 0 color-mix(in srgb, var(--accent) 16%, white); }
.sheet-emblem img { width: 16mm; height: 16mm; object-fit: contain; }
.sheet-rule { height: 3px; margin: 0 4mm 5mm; border-radius: 2px; background: linear-gradient(90deg, var(--accent), color-mix(in srgb, var(--accent) 22%, white), transparent); }
.steps-grid { flex: 1; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 5mm; padding: 0 4mm; align-content: center; }
.steps-grid.steps-1, .steps-grid.steps-2, .steps-grid.steps-3 {
  --step-unit: calc((100% - 15mm) / 4);
  grid-template-columns: repeat(1, minmax(0, var(--step-unit)));
  justify-content: center;
}
.steps-grid.steps-2 { grid-template-columns: repeat(2, minmax(0, var(--step-unit))); }
.steps-grid.steps-3 { grid-template-columns: repeat(3, minmax(0, var(--step-unit))); }
.steps-grid.steps-5 { grid-template-columns: repeat(6, minmax(0, 1fr)); grid-auto-rows: 1fr; align-content: stretch; }
.steps-grid.steps-5 .step-card:nth-child(-n + 3) { grid-column: span 2; }
.steps-grid.steps-5 .step-card:nth-child(4) { grid-column: 2 / span 2; }
.steps-grid.steps-5 .step-card:nth-child(5) { grid-column: 4 / span 2; }
.steps-grid.steps-6 { grid-template-columns: repeat(3, minmax(0, 1fr)); grid-auto-rows: 1fr; align-content: stretch; }
.step-card { position: relative; min-width: 0; min-height: 89mm; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 8mm 5mm 5mm; border: 2.2px solid #214d84; border-radius: 6px; background: rgba(255,255,255,.96); box-shadow: 0 2px 0 rgba(33,77,132,.1); }
.steps-grid.steps-5 .step-card, .steps-grid.steps-6 .step-card { min-height: 59mm; padding-top: 7mm; }
.step-number { position: absolute; top: -7mm; left: 50%; width: 14mm; height: 14mm; display: grid; place-items: center; transform: translateX(-50%); border: 3px solid #fff; outline: 2px solid #214d84; outline-offset: 1px; border-radius: 50%; color: #fff; background: var(--step-color, var(--accent)); box-shadow: 0 2px 0 rgba(20,59,112,.14); font-size: 21px; font-weight: 900; }
.step-card.pictogram-border-colored { border-color: var(--pictogram-border); box-shadow: 0 2px 0 color-mix(in srgb, var(--pictogram-border) 24%, white); }
.step-image-button { display: grid; place-items: center; width: 42mm; height: 42mm; padding: 0; border: 0; border-radius: 8px; background: transparent; }
.step-image-button:hover { background: var(--accent-soft); }
.step-image { width: 40mm; height: 40mm; object-fit: contain; }
.step-label-input { width: 100%; margin-top: 3mm; padding: 2px 4px; border: 0; border-bottom: 1px dashed #b9c9d8; outline: 0; color: var(--step-label-color, #153e70); background: transparent; font-size: 15px; font-weight: 850; text-align: center; }
.step-label-input:focus { border-bottom-color: var(--accent); background: #f6fbff; }
.step-label-print { display: block; max-width: 100%; margin-top: 3mm; color: var(--step-label-color, #153e70); font-size: 15px; font-weight: 850; line-height: 1.08; text-align: center; }
.step-hint { max-width: 100%; margin: 2mm 0 0; overflow: hidden; color: #7188a1; font-size: 9px; font-weight: 650; line-height: 1.15; text-align: center; text-overflow: ellipsis; white-space: nowrap; }
.step-tools { position: absolute; right: 3px; top: 3px; display: flex; gap: 3px; opacity: 0; transition: opacity .15s ease; }
.step-card:hover .step-tools, .step-card:focus-within .step-tools { opacity: 1; }
.mini-button { width: 24px; height: 24px; padding: 0; border: 1px solid #c9d9e8; border-radius: 7px; color: #52718f; background: #fff; font-size: 13px; }
.mini-button:hover { color: #fff; border-color: var(--accent); background: var(--accent); }
.mini-button[data-edit-icon] { color: #2b6f9f; border-color: #b8d5e8; background: #eef8fd; }
.mini-button[data-edit-icon]:hover, .mini-button[data-edit-icon]:focus-visible { color: #fff; border-color: #2b78ad; background: #2b78ad; outline: none; }
.mini-button[data-upload-image] { display: inline-grid; place-items: center; color: #2b8768; border-color: #b8dfcf; background: #effaf5; }
.mini-button[data-upload-image] svg { width: 14px; height: 14px; display: block; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 2; }
.mini-button[data-upload-image]:hover, .mini-button[data-upload-image]:focus-visible { color: #fff; border-color: #2b9873; background: #2b9873; outline: none; }
.mini-button[data-delete-step] { color: #c14f62; border-color: #efc4cc; background: #fff4f6; }
.mini-button[data-delete-step]:hover, .mini-button[data-delete-step]:focus-visible { color: #fff; border-color: #c14f62; background: #c14f62; outline: none; }
.sheet-bottom { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; margin: 6mm 4mm 0; padding-top: 3mm; border-top: 1px solid #dce6ef; }
.anticipation-chip, .finish-chip { display: flex; align-items: center; gap: 7px; color: #244d78; font-size: 11px; font-weight: 800; }
.anticipation-chip img, .finish-chip img { width: 11mm; height: 11mm; object-fit: contain; }
.sheet-credit { color: #8295a9; font-size: 8px; text-align: right; }
.sheet-credit strong { color: #5e7792; }

.app-footer { display: flex; justify-content: space-between; gap: 20px; padding: 14px clamp(20px, 4vw, 64px) 18px; color: #8296ab; border-top: 1px solid rgba(139,164,190,.25); background: rgba(255,255,255,.65); font-size: 10px; }

.modal-backdrop { position: fixed; inset: 0; z-index: 10; display: grid; place-items: center; padding: 20px; background: rgba(15,35,58,.48); backdrop-filter: blur(5px); }
.modal-backdrop[hidden] { display: none; }
.modal { width: min(760px, 100%); max-height: min(780px, 90vh); overflow: hidden; padding: 22px; border: 1px solid #d3e1ed; border-radius: 20px; background: #fff; box-shadow: 0 30px 80px rgba(15,35,58,.28); }
.modal-search { display: flex; gap: 8px; margin: 20px 0 8px; }
.modal-search input { flex: 1; min-width: 0; height: 42px; padding: 0 12px; border: 1px solid #cad9e7; border-radius: 10px; outline: none; }
.modal-search input:focus { border-color: #80acd0; box-shadow: 0 0 0 3px rgba(47,132,187,.12); }
.modal-hint { margin-bottom: 13px; color: #7287a0; font-size: 11px; line-height: 1.4; }
.pictogram-results { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 9px; max-height: 52vh; overflow-y: auto; padding: 3px; }
.pictogram-result { display: flex; flex-direction: column; align-items: center; gap: 5px; min-width: 0; padding: 8px; border: 1px solid #d7e4ee; border-radius: 12px; background: #fbfdff; }
.pictogram-result img { width: 75px; height: 75px; object-fit: contain; }
.pictogram-result span { width: 100%; overflow: hidden; color: #56728e; font-size: 10px; text-align: center; text-overflow: ellipsis; white-space: nowrap; }
.pictogram-result button { width: 100%; padding: 6px; border: 0; border-radius: 7px; color: #fff; background: var(--ink); font-size: 10px; font-weight: 750; }
.modal-empty { grid-column: 1 / -1; padding: 35px 12px; color: #7188a0; font-size: 12px; text-align: center; }
.phrase-modal { width: min(1240px, 100%); max-height: min(920px, 94vh); overflow-y: auto; padding: 28px; }
.phrase-modal .modal-head h2 { font-size: 24px; }
.phrase-modal .modal-head .icon-button { width: 38px; height: 38px; font-size: 25px; }
.phrase-form { margin-top: 20px; }
.phrase-input-label { display: block; margin-bottom: 7px; color: #6a829d; font-size: 11px; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; }
.phrase-form textarea { width: 100%; min-height: 100px; resize: vertical; padding: 14px 15px; border: 1px solid #cad9e7; border-radius: 12px; outline: none; color: var(--ink); background: #fbfdff; font-size: 16px; line-height: 1.45; }
.phrase-form textarea:focus { border-color: #8a7bc3; box-shadow: 0 0 0 3px rgba(119,100,189,.14); background: #fff; }
.phrase-form-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 11px; }
.phrase-option { display: inline-flex; align-items: flex-start; gap: 8px; color: #58718d; font-size: 12px; line-height: 1.35; }
.phrase-option input { flex: 0 0 auto; width: 17px; height: 17px; margin: 0; accent-color: #7764bd; }
.phrase-hint { margin: 16px 0 11px; color: #7287a0; font-size: 12px; line-height: 1.45; }
.phrase-status { min-height: 20px; margin-bottom: 8px; color: #58718d; font-size: 12px; font-weight: 700; }
.phrase-status.is-error { color: #b94d61; }
.phrase-results { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; min-height: 260px; max-height: 52vh; overflow-y: auto; padding: 14px; border: 1px solid #dbe6ef; border-radius: 15px; background: #f6fafe; }
.phrase-empty, .phrase-loading { grid-column: 1 / -1; display: grid; place-items: center; min-height: 190px; padding: 25px; color: #7188a0; font-size: 12px; text-align: center; }
.phrase-cell { position: relative; min-width: 0; display: flex; flex-direction: column; align-items: stretch; overflow: hidden; padding: 10px; border: 2px solid var(--phrase-border-color, #214d84); border-radius: 6px; background: rgba(255,255,255,.96); box-shadow: 0 2px 0 rgba(33,77,132,.1); }
.phrase-cell.is-text { background: rgba(255,255,255,.96); border-color: var(--phrase-border-color, #214d84); }
.phrase-cell-head { display: flex; align-items: center; justify-content: space-between; gap: 5px; min-height: 20px; }
.phrase-cell-number { width: 30px; height: 30px; display: grid; place-items: center; border: 3px solid #fff; outline: 2px solid #214d84; outline-offset: 1px; border-radius: 50%; color: #fff; background: var(--phrase-step-color, #1681c4); box-shadow: 0 2px 0 rgba(20,59,112,.14); font-size: 12px; font-weight: 900; }
.phrase-cell.is-text .phrase-cell-number { background: var(--phrase-step-color, #1681c4); }
.phrase-cell-keyword { overflow: hidden; color: #8b9bae; font-size: 9px; text-align: right; text-overflow: ellipsis; white-space: nowrap; }
.phrase-cell-visual { display: grid; place-items: center; min-width: 0; min-height: 108px; margin: 7px 0 5px; overflow: hidden; border-radius: 9px; background: #fbfdff; }
.phrase-cell.is-text .phrase-cell-visual { background: #fbfdff; }
.phrase-cell-visual img { display: block; width: auto; height: auto; max-width: 100%; max-height: 100px; object-fit: contain; }
.phrase-text-only { padding: 10px 5px; color: var(--phrase-label-color, #153e70); font-size: 30px; font-weight: 900; line-height: 1.05; text-align: center; overflow-wrap: anywhere; }
.phrase-text-search { width: 100%; display: flex; flex-direction: column; align-items: center; gap: 7px; padding: 3px; }
.phrase-text-search input { width: 100%; min-width: 0; height: 43px; padding: 3px 5px; border: 1px solid #bdcfe0; border-radius: 8px; outline: none; color: var(--phrase-label-color, #153e70); background: #fff; font-size: clamp(18px, 3vw, 30px); font-weight: 900; line-height: 1; text-align: center; }
.phrase-text-search input::placeholder { color: #9babbc; font-size: 11px; font-weight: 700; }
.phrase-text-search input:focus { border-color: #7764bd; box-shadow: 0 0 0 3px rgba(119,100,189,.15); }
.phrase-text-search input:disabled { color: #7188a0; background: #f4f7fa; }
.phrase-text-search button { min-width: 72px; padding: 6px 10px; border: 1px solid #7764bd; border-radius: 7px; color: #fff; background: #7764bd; font-size: 10px; font-weight: 800; }
.phrase-text-search button:hover:not(:disabled), .phrase-text-search button:focus-visible { border-color: #6653a8; background: #6653a8; outline: none; }
.phrase-text-search button:disabled { cursor: wait; opacity: .65; }
.phrase-cell-label { min-height: 32px; color: var(--phrase-label-color, #153e70); font-size: 13px; font-weight: 850; line-height: 1.18; text-align: center; overflow-wrap: anywhere; }
.phrase-cell-note { margin-top: 3px; color: #7b91a9; font-size: 10px; text-align: center; }
.phrase-cell-controls { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin-top: 8px; }
.phrase-cell-controls button { min-width: 0; padding: 6px 8px; border: 1px solid #d6e2ee; border-radius: 7px; color: #52718f; background: #fff; font-size: 10px; font-weight: 750; }
.phrase-cell-controls button:hover, .phrase-cell-controls button:focus-visible { border-color: #8a7bc3; color: #57448e; background: #f5f1ff; outline: none; }
.phrase-cell-controls button[data-phrase-upload-image] { color: #2b8768; border-color: #b8dfcf; background: #effaf5; }
.phrase-cell-controls button[data-phrase-upload-image]:hover, .phrase-cell-controls button[data-phrase-upload-image]:focus-visible { color: #fff; border-color: #2b9873; background: #2b9873; }
.phrase-alternatives { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; margin-top: 7px; padding-top: 7px; border-top: 1px solid #e6eef5; }
.phrase-alternatives[hidden] { display: none; }
.phrase-alternatives button { display: grid; place-items: center; min-width: 0; padding: 3px; border: 1px solid #d6e2ee; border-radius: 6px; background: #fbfdff; }
.phrase-alternatives button.selected { border-color: #7764bd; box-shadow: 0 0 0 2px rgba(119,100,189,.15); }
.phrase-alternatives img { width: 40px; height: 40px; object-fit: contain; }
.phrase-actions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 17px; }
.phrase-modal .phrase-actions .button { min-height: 42px; padding: 10px 16px; font-size: 13px; }
.one-picto-backdrop { z-index: 40; padding: 6px; }
.one-picto-modal { position: relative; width: min(1480px, 100%); height: min(820px, calc(100vh - 12px)); max-height: calc(100vh - 12px); display: flex; flex-direction: column; overflow: hidden; padding: 16px 20px 14px; }
.one-picto-head { flex: 0 0 auto; align-items: flex-start; }
.one-picto-head h2 { font-size: 24px; }
.one-picto-subtitle { margin: 4px 0 0; color: #7187a0; font-size: 11px; line-height: 1.35; }
.one-picto-sourcebar { flex: 0 0 auto; display: grid; grid-template-columns: minmax(260px, 1fr) auto; align-items: end; gap: 12px; margin-top: 10px; padding: 9px 11px; border: 1px solid #e0e9f0; border-radius: 11px; background: #fbfdff; }
.one-picto-search label { display: block; margin-bottom: 5px; color: #6a829d; font-size: 9px; font-weight: 850; letter-spacing: .07em; text-transform: uppercase; }
.one-picto-search-row { display: flex; gap: 7px; }
.one-picto-search-row input { flex: 1; min-width: 0; height: 36px; padding: 0 10px; border: 1px solid #cad9e7; border-radius: 8px; outline: none; color: var(--ink); background: #fff; font-size: 12px; }
.one-picto-search-row input:focus { border-color: #62b7c1; box-shadow: 0 0 0 3px rgba(44,167,181,.13); }
.one-picto-search-row .button { flex: 0 0 auto; min-height: 36px; padding: 7px 12px; }
.one-picto-library-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 7px; }
.one-picto-library-actions .button { min-width: 100px; min-height: 36px; padding: 7px 9px; font-size: 10px; }
.one-picto-print-panel-trigger { display: inline-flex; align-items: center; justify-content: center; gap: 6px; color: #80578d; border-color: #d9c4e0; background: #fbf5fd; box-shadow: 0 5px 12px rgba(128,87,141,.12); }
.one-picto-print-panel-trigger:hover, .one-picto-print-panel-trigger:focus-visible { color: #684473; border-color: #bd9bc8; background: #f5eafa; box-shadow: 0 8px 17px rgba(128,87,141,.2); outline: none; }
.one-picto-print-panel-trigger svg { width: 16px; height: 16px; display: block; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; }
.one-picto-results { flex: 0 0 132px; min-height: 132px; height: 132px; max-height: 132px; display: flex; align-items: stretch; gap: 9px; overflow-x: auto; overflow-y: hidden; padding: 7px 2px 3px; box-sizing: border-box; }
.one-picto-result { flex: 0 0 112px; min-width: 112px; display: flex; flex-direction: column; align-items: center; gap: 5px; padding: 6px; border: 1px solid #d5e2ec; border-radius: 8px; color: var(--ink); background: #fff; text-align: center; transition: border-color .18s ease, background .18s ease, box-shadow .18s ease, transform .18s ease; }
.one-picto-result:hover, .one-picto-result:focus-visible { border-color: #6dbac3; background: #f1fcfd; box-shadow: 0 4px 12px rgba(44,167,181,.14); outline: none; transform: translateY(-1px); }
.one-picto-result img { width: 72px; height: 72px; object-fit: contain; }
.one-picto-result span { width: 100%; overflow: hidden; color: #56728e; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.one-picto-result small { color: #8b9bad; font-size: 8px; }
.one-picto-empty { flex: 1 1 auto; display: grid; place-items: center; min-height: 0; height: 100%; padding: 6px 10px; color: #7187a0; font-size: 10px; line-height: 1.25; text-align: center; }
.one-picto-layout { min-height: 0; flex: 1; height: auto; display: grid; grid-template-columns: minmax(390px, .95fr) minmax(520px, 1.15fr); gap: 18px; margin-top: 8px; }
.one-picto-preview-panel { min-width: 0; min-height: 0; display: flex; flex-direction: column; overflow: hidden; border: 1px solid #d9e2e8; background: #f6f6f6; box-shadow: 0 8px 22px rgba(22,55,95,.1); }
.one-picto-preview-title { flex: 0 0 auto; display: flex; align-items: center; gap: 13px; min-height: 44px; padding: 7px 15px; border-bottom: 1px solid #e0e0e0; color: var(--ink); background: #fff; }
.one-picto-preview-title > span { color: var(--ink); font-size: 18px; }
.one-picto-preview-title strong { overflow: hidden; color: var(--ink); font-size: 18px; font-weight: 500; text-overflow: ellipsis; white-space: nowrap; }
.one-picto-stage-shell { min-height: 0; flex: 1; display: flex; align-items: center; justify-content: center; overflow: hidden; padding: 0; border: 0; border-radius: 0; background: #fff; }
.one-picto-stage { position: relative; flex: 0 1 auto; min-width: 0; min-height: 0; width: auto; height: 100%; max-width: 100%; max-height: 100%; aspect-ratio: 1 / 1; display: grid; place-items: center; overflow: hidden; padding: 0; background-color: #fff; background-image: linear-gradient(45deg, #d5d5d5 25%, transparent 25%), linear-gradient(-45deg, #d5d5d5 25%, transparent 25%), linear-gradient(45deg, transparent 75%, #d5d5d5 75%), linear-gradient(-45deg, transparent 75%, #d5d5d5 75%); background-position: 0 0, 0 7px, 7px -7px, -7px 0; background-size: 14px 14px; }
.one-picto-stage canvas { display: block; width: auto; height: auto; max-width: 100%; max-height: 100%; border: 0; border-radius: 0; background: transparent; box-shadow: none; cursor: grab; touch-action: none; }
.one-picto-stage canvas.is-dragging { cursor: grabbing; }
.one-picto-canvas-help { position: absolute; top: 50%; left: 50%; max-width: 230px; padding: 9px 12px; border-radius: 9px; color: #7a8ea2; background: rgba(255,255,255,.92); box-shadow: 0 5px 14px rgba(22,55,95,.08); font-size: 10px; line-height: 1.35; text-align: center; transform: translate(-50%, -50%); pointer-events: none; }
.one-picto-canvas-help[hidden] { display: none; }
.one-picto-preview-actions { flex: 0 0 auto; display: flex; align-items: center; justify-content: center; gap: 9px; padding: 9px 9px 7px; background: #f4f4f4; }
.one-picto-preview-actions .button { min-height: 36px; padding: 7px 11px; font-size: 10px; }
.one-picto-clear-primary { color: #a84a5a; border-color: #efcbd1; background: #fff6f7; }
.one-picto-clear-primary:hover:not(:disabled), .one-picto-clear-primary:focus-visible { color: #fff; border-color: #c94f62; background: #c94f62; box-shadow: 0 5px 12px rgba(201,79,98,.2); }
.one-picto-clear-primary:disabled { color: #a5a5a5; border-color: #dedede; background: #e9e9e9; }
.button-one-picto-download { color: #fff; border-color: #0e2d52; background: var(--ink); box-shadow: 0 5px 12px rgba(22,55,95,.2); }
.button-one-picto-download:hover { border-color: #0e2d52; background: #0e2d52; box-shadow: 0 8px 17px rgba(22,55,95,.28); }
.one-picto-composition-tools { display: flex; justify-content: center; gap: 5px; padding: 0 9px 9px; background: #f4f4f4; }
.one-picto-composition-tools .button { min-height: 27px; padding: 4px 7px; color: #7187a0; border-color: #d7e0e7; font-size: 9px; }
.one-picto-options-panel { min-width: 0; min-height: 0; display: flex; flex-direction: column; overflow: hidden; }
.one-picto-options-heading { flex: 0 0 auto; display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 3px 0 12px; border-bottom: 1px solid #dce2e6; }
.one-picto-options-heading h3 { margin: 0; color: var(--ink); font-size: 19px; font-weight: 500; }
.one-picto-options-heading p { margin: 5px 0 0; overflow: hidden; color: #7b8791; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.one-picto-object-actions { display: flex; gap: 5px; }
.one-picto-object-actions .button { min-height: 29px; padding: 5px 8px; color: #648349; border-color: #cfe0c0; background: #f7fbf3; font-size: 9px; }
.one-picto-object-actions, .one-picto-arrange-tools, .one-picto-elements-section, .one-picto-free-text, .one-picto-composition-tools, #onePictoDownloadPng { display: none !important; }
.one-picto-options-scroll { min-height: 0; flex: 1; overflow: hidden; padding: 7px 3px 0 0; }
.one-picto-options-content { width: 100%; transform: scale(var(--one-picto-options-scale, 1)); transform-origin: top left; }
.one-picto-option-section { padding: 7px 0 14px; border-bottom: 1px solid #e4e7ea; }
.one-picto-option-section h4 { margin: 0 0 12px; color: #6c7075; font-size: 14px; font-weight: 400; }
.one-picto-switch-grid { display: grid; grid-template-columns: repeat(3, minmax(120px, 1fr)); gap: 13px 28px; }
.one-picto-switch-grid-two { grid-template-columns: repeat(2, minmax(160px, 1fr)); max-width: 510px; }
.one-picto-switch-grid-three { grid-template-columns: repeat(3, minmax(120px, 1fr)); }
.one-picto-switch { min-width: 0; display: flex; align-items: center; gap: 8px; color: #1f2429; font-size: 14px; line-height: 1.2; cursor: pointer; }
.one-picto-switch input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.one-picto-switch-track { position: relative; flex: 0 0 auto; width: 35px; height: 18px; border-radius: 99px; background: #e9e9e9; box-shadow: inset 0 0 0 1px #dfe2e5; transition: background .16s ease; }
.one-picto-switch-track::after { position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; border-radius: 50%; background: #f1f1f1; box-shadow: 0 1px 3px rgba(0,0,0,.14); content: ""; transition: transform .16s ease, background .16s ease; }
.one-picto-switch input:checked + .one-picto-switch-track { background: var(--ink); box-shadow: none; }
.one-picto-switch input:checked + .one-picto-switch-track::after { background: #fff; transform: translateX(17px); }
.one-picto-switch input:focus-visible + .one-picto-switch-track { outline: 3px solid rgba(22,55,95,.28); outline-offset: 2px; }
.one-picto-switch input:disabled + .one-picto-switch-track, .one-picto-switch:has(input:disabled) { cursor: not-allowed; opacity: .45; }
.one-picto-option-details { display: grid; grid-template-columns: repeat(3, minmax(100px, 1fr)); gap: 10px; margin-top: 13px; padding: 10px; border: 1px solid #d8e4ef; border-radius: 8px; background: #f8fbfe; }
.one-picto-option-details[hidden] { display: none; }
.one-picto-option-details label, .one-picto-free-text label { min-width: 0; display: flex; flex-direction: column; gap: 5px; color: #778089; font-size: 9px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.one-picto-option-details input[type="color"] { width: 100%; height: 31px; padding: 2px; border: 1px solid #cad9e7; border-radius: 7px; background: #fff; cursor: pointer; }
.one-picto-option-details input[type="range"] { width: 100%; accent-color: var(--ink); }
.one-picto-option-details input[type="text"], .one-picto-option-details select, .one-picto-free-text input { width: 100%; height: 31px; min-width: 0; padding: 0 8px; border: 1px solid #cad9e7; border-radius: 7px; outline: none; color: var(--ink); background: #fff; font-size: 11px; font-weight: 650; letter-spacing: 0; text-transform: none; }
.one-picto-option-details output { color: var(--ink); font-size: 9px; font-weight: 800; text-align: right; text-transform: none; }
.one-picto-text-details { grid-template-columns: repeat(2, minmax(150px, 1fr)); }
.one-picto-free-text { margin-top: 11px; }
.one-picto-free-text[hidden] { display: none; }
.one-picto-arrange-tools { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 13px; }
.one-picto-arrange-tools .button { min-height: 29px; padding: 5px 8px; color: #627586; border-color: #d5e0e8; font-size: 9px; }
.one-picto-elements-section { padding: 12px 0 14px; }
.one-picto-layers-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-bottom: 7px; color: #697780; font-size: 10px; font-weight: 850; letter-spacing: .05em; text-transform: uppercase; }
.one-picto-layers-heading small { color: #93a4b5; font-size: 9px; font-weight: 600; letter-spacing: 0; text-transform: none; }
.one-picto-layer-list { display: flex; flex-wrap: wrap; gap: 5px; }
.one-picto-layer { min-width: 0; display: inline-flex; align-items: center; gap: 5px; max-width: 190px; padding: 5px 7px; overflow: hidden; border: 1px solid #d5e2ec; border-radius: 7px; color: #5b7590; background: #fbfdff; font-size: 9px; font-weight: 750; text-align: left; }
.one-picto-layer:hover, .one-picto-layer.selected { border-color: var(--ink); color: var(--ink); background: #edf5fb; box-shadow: 0 0 0 2px rgba(22,55,95,.12); }
.one-picto-layer-index { flex: 0 0 auto; width: 17px; height: 17px; display: grid; place-items: center; border-radius: 5px; color: #fff; background: var(--ink); font-size: 8px; }
.one-picto-layer small { color: #8ba0b2; font-size: 8px; font-weight: 650; }
.one-picto-layer-empty { color: #9aaaba; font-size: 9px; }
.one-picto-legacy-controls { display: none !important; }
.one-picto-legacy-controls .one-picto-selection-empty, .one-picto-legacy-controls .one-picto-selection-controls[hidden] { display: none; }
.one-picto-print-panel { position: absolute; inset: 0; z-index: 30; display: flex; flex-direction: column; min-width: 0; min-height: 0; overflow: hidden; border-radius: inherit; background: linear-gradient(135deg, #f8fbff 0%, #f1f7fc 100%); animation: one-picto-print-panel-in .2s ease-out; }
.one-picto-print-panel[hidden] { display: none; }
.one-picto-print-panel-head { flex: 0 0 auto; display: grid; grid-template-columns: auto minmax(180px, 1fr) auto; align-items: center; gap: 15px; padding: 17px 20px 14px; border-bottom: 1px solid #dce8f1; background: rgba(255,255,255,.92); }
.one-picto-panel-back, .one-picto-panel-clear, .one-picto-panel-arrange, .one-picto-panel-print { display: inline-flex; align-items: center; justify-content: center; gap: 7px; white-space: nowrap; }
.one-picto-panel-back { color: #587796; border-color: #cbdce9; background: #f7fbfe; }
.one-picto-panel-back:hover, .one-picto-panel-back:focus-visible { color: var(--ink); border-color: #9ebbd4; background: #edf6fc; outline: none; }
.one-picto-panel-back svg, .one-picto-panel-clear svg, .one-picto-panel-arrange svg, .one-picto-panel-print svg { width: 16px; height: 16px; display: block; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.9; }
.one-picto-print-panel-title { min-width: 0; }
.one-picto-print-panel-title .eyebrow { margin-bottom: 3px; color: #6d88a6; font-size: 9px; }
.one-picto-print-panel-title h2 { margin: 0; color: var(--ink); font-size: 22px; letter-spacing: -.025em; }
.one-picto-print-panel-title p:last-child { margin: 3px 0 0; overflow: hidden; color: #7187a0; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.one-picto-print-panel-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 7px; }
.one-picto-print-panel-actions .button { min-height: 36px; padding: 8px 11px; font-size: 10px; }
.one-picto-panel-clear { color: #a84a5a; border-color: #efcbd1; background: #fff6f7; }
.one-picto-panel-clear:hover, .one-picto-panel-clear:focus-visible { color: #fff; border-color: #c94f62; background: #c94f62; outline: none; }
.one-picto-panel-arrange { color: #5b7090; border-color: #c9d9e9; background: #f4f8fc; }
.one-picto-panel-arrange:hover, .one-picto-panel-arrange:focus-visible { color: var(--ink); border-color: #9ebbd4; background: #eaf3fa; outline: none; }
.one-picto-panel-print { color: #fff; border-color: #2d719e; background: #438bb4; box-shadow: 0 6px 14px rgba(67,139,180,.2); }
.one-picto-panel-print:hover, .one-picto-panel-print:focus-visible { border-color: #245f89; background: #2f789f; box-shadow: 0 9px 20px rgba(67,139,180,.28); outline: none; }
.one-picto-print-panel-stage { flex: 1 1 auto; min-height: 0; display: grid; place-items: center; overflow: hidden; padding: 17px; }
.one-picto-print-board { position: relative; width: min(94%, 1120px); max-height: 100%; aspect-ratio: 297 / 210; overflow: hidden; border: 1px solid #d3e0eb; border-radius: 5px; background: #fff; box-shadow: 0 16px 34px rgba(22,55,95,.14); outline: none; touch-action: none; }
.one-picto-print-board.is-portrait { width: min(58%, 610px); aspect-ratio: 210 / 297; }
.one-picto-print-board:focus-visible { box-shadow: 0 0 0 3px rgba(67,139,180,.28), 0 16px 34px rgba(22,55,95,.14); }
.one-picto-print-empty { position: absolute; top: 50%; left: 50%; width: min(80%, 420px); padding: 17px 20px; border: 1px dashed #b9cfe0; border-radius: 13px; color: #7187a0; background: #f8fbfe; font-size: 13px; line-height: 1.45; text-align: center; transform: translate(-50%, -50%); pointer-events: none; }
.one-picto-print-empty strong { display: block; margin-bottom: 4px; color: var(--ink); font-size: 15px; }
.print-panel-item { position: absolute; top: 0; left: 0; width: 24%; min-width: 7%; max-width: 82%; aspect-ratio: var(--item-ratio, 1); display: grid; place-items: center; overflow: visible; border: 0; background: transparent; cursor: grab; transform: translate(-50%, -50%) rotate(var(--item-rotation, 0deg)); transform-origin: center center; user-select: none; touch-action: none; }
.print-panel-item:active { cursor: grabbing; }
.print-panel-item.selected { outline: 2px dashed #438bb4; outline-offset: 5px; }
.print-panel-item img { width: 100%; height: 100%; display: block; object-fit: contain; pointer-events: none; user-select: none; -webkit-user-drag: none; }
.print-panel-item-tools { position: absolute; top: -35px; left: 50%; display: flex; gap: 3px; padding: 3px; border: 1px solid #c7dbe8; border-radius: 8px; background: rgba(255,255,255,.96); box-shadow: 0 5px 12px rgba(22,55,95,.16); transform: translateX(-50%) rotate(calc(var(--item-rotation, 0deg) * -1)); transform-origin: center bottom; }
.print-panel-item-tools button { width: 25px; height: 25px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 5px; color: #3e7096; background: #edf6fb; font-size: 15px; font-weight: 800; line-height: 1; }
.print-panel-item-tools button:hover, .print-panel-item-tools button:focus-visible { color: #fff; background: #438bb4; outline: none; }
@keyframes one-picto-print-panel-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
.confirm-modal { width: min(480px, 100%); padding: 31px 30px 27px; text-align: center; }
.confirm-symbol { width: 58px; height: 58px; display: grid; place-items: center; margin: 0 auto 15px; border: 8px solid #fff0f2; border-radius: 50%; color: #c94f62; background: #ffe1e6; box-shadow: 0 0 0 1px #f4b9c2; font-size: 36px; font-weight: 350; line-height: 1; }
.confirm-modal h2 { max-width: 390px; margin: 0 auto 12px; color: var(--ink); font-size: 22px; line-height: 1.15; letter-spacing: -.025em; }
.confirm-copy { max-width: 385px; margin: 0 auto; color: #6f849b; font-size: 12px; line-height: 1.55; }
.confirm-copy strong { color: #294f76; }
.confirm-actions { display: flex; justify-content: center; gap: 9px; margin-top: 24px; }
.button-danger { color: #fff; border-color: #c94f62; background: #c94f62; box-shadow: 0 6px 14px rgba(201,79,98,.2); }
.button-danger:hover { border-color: #ad3d50; background: #ad3d50; box-shadow: 0 9px 20px rgba(201,79,98,.27); }
.print-options-modal { width: min(620px, 100%); }
.print-options-copy { margin: 16px 0 22px; color: #6f849b; font-size: 12px; line-height: 1.5; }
.print-choice-group { min-width: 0; margin: 0 0 18px; padding: 0; border: 0; }
.print-choice-group legend { margin-bottom: 8px; color: #6a829d; font-size: 10px; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; }
.print-choice-grid { display: grid; gap: 9px; }
.print-paper-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.print-orientation-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.print-choice-card { position: relative; min-height: 68px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; padding: 9px; border: 1px solid #d5e1eb; border-radius: 12px; color: var(--ink); background: #fbfdff; cursor: pointer; text-align: center; transition: border-color .18s ease, background .18s ease, box-shadow .18s ease, transform .18s ease; }
.print-choice-card:hover { border-color: #9ebbd4; background: #f4faff; transform: translateY(-1px); }
.print-choice-card:has(input:checked) { border-color: #2776aa; background: #eaf5fc; box-shadow: 0 0 0 2px rgba(39,118,170,.12); }
.print-choice-card input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.choice-card-main { font-size: 16px; font-weight: 850; }
.choice-card-detail { color: #7990a7; font-size: 10px; }
.orientation-icon { display: block; border: 2px solid #5a7d9e; border-radius: 3px; background: #dcecf7; }
.orientation-landscape { width: 42px; height: 27px; }
.orientation-portrait { width: 27px; height: 42px; }
.print-options-actions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 24px; }
.color-picker-backdrop { z-index: 12; }
.color-picker-modal { width: min(480px, 100%); max-height: min(760px, 92vh); overflow-y: auto; padding: 22px; }
.color-picker-current { display: flex; align-items: center; gap: 11px; margin: 20px 0 15px; padding: 10px 12px; border: 1px solid #dbe6ef; border-radius: 12px; background: #f7fbfe; }
.color-picker-current-swatch { flex: 0 0 42px; width: 42px; height: 42px; border: 3px solid #fff; border-radius: 11px; background: #1774b8; box-shadow: 0 0 0 1px #b8cddd, 0 5px 12px rgba(22,55,95,.12); }
.color-picker-current strong { display: block; color: var(--ink); font-size: 15px; letter-spacing: .04em; }
.color-picker-current div span { display: block; margin-top: 3px; color: #7990a7; font-size: 10px; }
.pictogram-border-panel { margin: 0 0 17px; padding: 11px 12px 12px; border: 1px solid #dbe6ef; border-radius: 12px; background: #fbfdff; }
.pictogram-border-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.pictogram-border-head > div { min-width: 0; }
.pictogram-border-head strong { display: block; color: var(--ink); font-size: 12px; }
.pictogram-border-head span:not(.pictogram-border-status) { display: block; margin-top: 3px; color: #7990a7; font-size: 10px; line-height: 1.35; }
.pictogram-border-status { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 5px; padding: 5px 7px; border: 1px solid #d5e2ec; border-radius: 99px; color: #5d7792; background: #fff; font-size: 9px; font-weight: 850; white-space: nowrap; }
.pictogram-border-status::before { width: 8px; height: 8px; display: block; border: 1px solid rgba(20,47,75,.25); border-radius: 50%; background: var(--border-status-color, #111827); content: ""; }
.pictogram-border-actions { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 11px; }
.pictogram-border-actions .button { min-height: 34px; padding: 7px 10px; font-size: 11px; }
.button-reset { color: #6f5a64; border-color: #e2d6db; background: #fff; }
.button-reset:hover { border-color: #cdaeb9; background: #fff8fa; }
.color-spectrum { position: relative; width: 100%; height: 205px; overflow: hidden; border-radius: 12px; background: linear-gradient(to top, #000, transparent), linear-gradient(to right, #fff, hsl(var(--picker-hue, 205), 100%, 50%)); box-shadow: inset 0 0 0 1px rgba(22,55,95,.14); cursor: crosshair; touch-action: none; }
.color-spectrum:focus-visible { outline: 3px solid rgba(47,132,187,.25); outline-offset: 3px; }
.color-spectrum-thumb { position: absolute; left: 100%; top: 0; width: 20px; height: 20px; transform: translate(-50%, -50%); border: 3px solid #fff; border-radius: 50%; box-shadow: 0 0 0 1px rgba(22,55,95,.65), 0 2px 6px rgba(22,55,95,.28); pointer-events: none; }
.color-hue-label { display: block; margin: 16px 0 7px; color: #6a829d; font-size: 10px; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; }
.color-hue { width: 100%; height: 24px; margin: 0; appearance: none; border: 0; border-radius: 99px; background: linear-gradient(90deg, #f00 0deg, #ff0 60deg, #0f0 120deg, #0ff 180deg, #00f 240deg, #f0f 300deg, #f00 360deg); outline: none; }
.color-hue::-webkit-slider-thumb { width: 20px; height: 20px; appearance: none; border: 3px solid #fff; border-radius: 50%; background: #fff; box-shadow: 0 0 0 1px rgba(22,55,95,.7), 0 2px 5px rgba(22,55,95,.25); }
.color-hue::-moz-range-thumb { width: 14px; height: 14px; border: 3px solid #fff; border-radius: 50%; background: #fff; box-shadow: 0 0 0 1px rgba(22,55,95,.7), 0 2px 5px rgba(22,55,95,.25); }
.color-hue:focus-visible { box-shadow: 0 0 0 3px rgba(47,132,187,.18); }
.color-hex-row { display: flex; align-items: flex-end; gap: 9px; margin-top: 17px; }
.color-hex-row label { flex: 1; min-width: 0; color: #6a829d; font-size: 10px; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; }
.color-hex-row input { width: 100%; height: 39px; margin-top: 5px; padding: 0 11px; border: 1px solid #ccdae7; border-radius: 10px; outline: none; color: var(--ink); background: #fff; font-size: 13px; font-weight: 750; letter-spacing: .04em; text-transform: uppercase; }
.color-hex-row input:focus { border-color: #80acd0; box-shadow: 0 0 0 3px rgba(47,132,187,.12); }
.color-hex-row input.invalid { border-color: #c94f62; background: #fff7f8; box-shadow: 0 0 0 3px rgba(201,79,98,.1); }
.color-presets-heading { margin: 20px 0 8px; color: #6a829d; font-size: 10px; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; }
.color-presets { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 8px; }
.color-preset { width: 100%; aspect-ratio: 1; display: grid; place-items: center; padding: 3px; border: 1px solid #d3e0eb; border-radius: 9px; background: #fff; transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease; }
.color-preset::before { width: 100%; height: 100%; display: block; border-radius: 6px; background: var(--preset-color); content: ""; }
.color-preset:hover, .color-preset:focus-visible { border-color: #7199b7; outline: none; transform: translateY(-1px); }
.color-preset.selected { border-color: #214d84; box-shadow: 0 0 0 2px rgba(33,77,132,.16); }
.color-picker-actions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 23px; }
.phrase-print-sheet { position: relative; width: 297mm; height: 210mm; padding: 14mm 12mm 10mm; border: 2px solid #d8e2eb; background: #fff; color: #152f53; }
.phrase-print-inner { height: 100%; display: flex; flex-direction: column; }
.phrase-print-header { padding: 0 4mm 5mm; border-bottom: 2px solid #dce6ef; text-align: center; }
.phrase-print-kicker { margin-bottom: 4mm; color: #7764bd; font-size: 10px; font-weight: 900; letter-spacing: .16em; text-transform: uppercase; }
.phrase-print-header h1 { max-width: 260mm; margin: 0 auto; color: #143b70; font-size: 22px; line-height: 1.12; }
.phrase-print-strip { flex: 1; display: flex; flex-wrap: wrap; align-content: center; justify-content: center; gap: 4mm; padding: 8mm 2mm; }
.phrase-print-cell { width: 19mm; min-width: 0; min-height: 49mm; display: flex; flex-direction: column; align-items: center; justify-content: flex-start; overflow: hidden; padding: 2mm 1mm; border: 1.5px solid #7764bd; border-radius: 4px; background: #fff; }
.phrase-print-visual { width: 100%; height: 28mm; min-width: 0; min-height: 0; display: grid; place-items: center; overflow: hidden; }
.phrase-print-visual img { display: block; width: auto; height: auto; max-width: 100%; max-height: 25mm; object-fit: contain; }
.phrase-print-visual span { color: #916f1b; font-size: 15px; font-weight: 850; text-align: center; overflow-wrap: anywhere; }
.phrase-print-cell-text { border-color: #d3a542; background: #fffdf5; }
.phrase-print-label { max-width: 100%; margin-top: 2mm; color: #16375f; font-size: 10px; font-weight: 850; line-height: 1.12; text-align: center; overflow-wrap: anywhere; }
.phrase-print-footer { padding: 3mm 4mm 0; color: #8295a9; border-top: 1px solid #dce6ef; font-size: 8px; text-align: center; }
.phrase-print-portrait { width: 210mm; height: 297mm; }
.phrase-print-portrait .phrase-print-header h1 { max-width: 180mm; font-size: 19px; }
.phrase-print-portrait .phrase-print-cell { width: 24mm; min-height: 53mm; }
.phrase-print-portrait .phrase-print-visual { height: 31mm; }
.phrase-print-portrait .phrase-print-visual img { max-height: 27mm; }
.phrase-a4-sheet .phrase-step-image-button { flex: 0 0 auto; cursor: default; pointer-events: none; }
.phrase-a4-sheet .phrase-step-image { flex: 0 0 auto; }
.phrase-step-text { width: 100%; max-width: 100%; color: var(--step-label-color, #153e70); font-size: 30px; font-weight: 900; line-height: 1.05; text-align: center; overflow-wrap: anywhere; }
.phrase-a4-sheet .phrase-steps-many { grid-template-columns: repeat(4, minmax(0, 1fr)); grid-auto-rows: 1fr; align-content: stretch; gap: 4mm; }
.phrase-a4-sheet .phrase-steps-many .phrase-step-card { min-height: 0; padding: 5mm 3mm 3mm; }
.phrase-a4-sheet .phrase-steps-many .phrase-step-image-button { width: min(var(--phrase-card-image, 30mm), 100%); height: min(var(--phrase-card-image, 30mm), 100%); }
.phrase-a4-sheet .phrase-steps-many .phrase-step-image { width: min(calc(var(--phrase-card-image, 30mm) - 2mm), 100%); height: min(calc(var(--phrase-card-image, 30mm) - 2mm), 100%); }
.empty-editor { min-height: 150mm; display: grid; place-items: center; padding: 30px; border: 2px dashed #cbdbe8; border-radius: 16px; color: #6c829a; background: rgba(255,255,255,.7); text-align: center; }
.empty-editor h3 { margin: 0 0 8px; color: var(--ink); font-size: 20px; }
.empty-editor p { max-width: 340px; margin: 0 auto 17px; font-size: 12px; line-height: 1.5; }
.visualization-overlay { position: fixed; inset: 0; z-index: 30; display: flex; flex-direction: column; background: #dfeaf3; }
.phrase-visualization-overlay { z-index: 35; }
.visualization-overlay[hidden] { display: none; }
.visualization-stage { position: relative; flex: 1; min-height: 0; width: 100%; overflow: hidden; }
.visualization-mount { position: relative; width: 100%; height: 100%; }
.visualization-sheet-wrap { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%) scale(var(--visual-scale, 1)); transform-origin: center center; }
.visualization-close { position: fixed; top: 18px; left: 18px; z-index: 2; width: 46px; height: 46px; display: grid; place-items: center; padding: 0; border: 3px solid #fff; border-radius: 50%; color: #fff; background: #d74e5f; box-shadow: 0 7px 18px rgba(127,38,52,.3); font-size: 31px; font-weight: 300; line-height: 1; transition: transform .18s ease, background .18s ease; }
.visualization-close:hover, .visualization-close:focus-visible { background: #b9384b; outline: none; transform: scale(1.08); }
.visualization-step-nav { position: fixed; bottom: 18px; z-index: 2; width: 50px; height: 50px; display: grid; place-items: center; padding: 0; border: 2px solid #a7cfe8; border-radius: 50%; color: #216b9a; background: #eef8fd; box-shadow: 0 7px 18px rgba(33,107,154,.2); transition: transform .18s ease, background .18s ease, border-color .18s ease; }
.visualization-step-nav[hidden] { display: none; }
.visualization-step-previous { right: 80px; }
.visualization-step-next { right: 18px; }
.visualization-step-nav:hover, .visualization-step-nav:focus-visible { border-color: #6faed2; background: #e2f3fc; outline: none; transform: scale(1.08); }
.visualization-step-nav svg { width: 24px; height: 24px; display: block; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 2.2; }
body.visualizing { overflow: hidden; }
body.phrase-visualizing { overflow: hidden; }
.phrase-visualization-sheet { box-shadow: 0 25px 70px rgba(22,55,95,.2); }
.toast { position: fixed; right: 22px; bottom: 22px; z-index: 20; max-width: 330px; padding: 11px 14px; border-radius: 10px; color: #fff; background: #193b63; box-shadow: 0 12px 28px rgba(21,47,83,.24); font-size: 12px; opacity: 0; pointer-events: none; transform: translateY(8px); transition: opacity .18s ease, transform .18s ease; }
.toast.show { opacity: 1; transform: translateY(0); }
#printRoot { display: none; }

@media (max-width: 1100px) {
  .app-header { align-items: flex-start; flex-direction: column; }
  .header-actions { justify-content: flex-start; }
  .app-main { grid-template-columns: 1fr; }
  .library-panel { position: static; }
  .routine-list { max-height: 240px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sheet-mount { justify-content: flex-start; }
  .one-picto-layout { grid-template-columns: minmax(270px, .78fr) minmax(470px, 1.22fr); gap: 14px; }
  .one-picto-switch-grid { gap: 11px 16px; }
  .one-picto-switch { font-size: 12px; }
}

@media (max-width: 900px) {
  .one-picto-modal { height: calc(100vh - 12px); max-height: calc(100vh - 12px); padding: 15px; }
  .one-picto-sourcebar { grid-template-columns: 1fr; gap: 7px; }
  .one-picto-library-actions { justify-content: flex-end; }
  .one-picto-layout { height: calc(100% - 235px); grid-template-columns: 1fr; gap: 10px; }
  .one-picto-preview-panel { min-height: 330px; }
  .one-picto-options-panel { min-height: 350px; }
  .one-picto-stage-shell { min-height: 0; }
  .one-picto-print-panel-head { grid-template-columns: auto minmax(0, 1fr); align-items: start; }
  .one-picto-print-panel-actions { grid-column: 1 / -1; justify-content: flex-end; }
  .one-picto-print-panel-stage { padding: 12px; }
}

@media (max-width: 680px) {
  .app-main { width: min(100% - 20px, 1640px); margin-top: 14px; }
  .app-header { padding: 18px 15px; }
  .app-footer { flex-direction: column; padding: 12px 15px; }
  .routine-list { grid-template-columns: 1fr; }
  .workspace-toolbar { align-items: flex-start; flex-direction: column; }
  .toolbar-actions { justify-content: flex-start; }
  .editor-preview-area { grid-template-columns: 1fr; gap: 10px; }
  .editor-action-rail { min-height: 0; flex-direction: row; align-items: center; gap: 8px; padding: 9px; }
  .editor-action-top { flex: 1; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
  .editor-color-control { grid-column: 1 / -1; }
  .editor-action-button { min-height: 42px; padding: 7px 8px; }
  .editor-add-step { position: static; flex: 0 0 56px; width: 56px; height: 56px; transform: none; }
  .editor-add-step:hover, .editor-add-step:focus-visible { transform: scale(1.08); }
  .editor-add-step:active { transform: scale(.98); }
  .editor-project-actions { margin-top: 0; padding-top: 0; border-top: 0; }
  .editor-project-button { min-height: 42px; }
  .editor-form { grid-template-columns: 1fr; }
  .accent-control { max-width: 96px; }
  .preview-help { align-items: flex-start; flex-wrap: wrap; }
  .pictogram-results { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .phrase-modal { padding: 18px; }
  .phrase-results { grid-template-columns: repeat(auto-fit, minmax(128px, 1fr)); gap: 9px; padding: 10px; }
  .phrase-cell { padding: 8px; }
  .phrase-cell-visual { min-height: 96px; }
  .phrase-cell-visual img { max-height: 88px; }
  .one-picto-backdrop { padding: 4px; }
  .one-picto-modal { width: 100%; padding: 12px; }
  .one-picto-head h2 { font-size: 21px; }
  .one-picto-subtitle { font-size: 10px; }
  .one-picto-layout { gap: 8px; margin-top: 6px; }
  .one-picto-results { flex-basis: 105px; min-height: 105px; height: 105px; max-height: 105px; }
  .one-picto-result { flex-basis: 94px; min-width: 94px; gap: 4px; padding: 5px; }
  .one-picto-result img { width: 58px; height: 58px; }
  .one-picto-preview-panel { min-height: 260px; }
  .one-picto-preview-actions { gap: 4px; }
  .one-picto-preview-actions .button { min-width: 0; padding: 6px 7px; font-size: 9px; }
  .one-picto-switch-grid, .one-picto-switch-grid-three { grid-template-columns: repeat(2, minmax(120px, 1fr)); gap: 10px 12px; }
  .one-picto-switch-grid-two { grid-template-columns: 1fr; }
  .one-picto-option-details, .one-picto-text-details { grid-template-columns: repeat(2, minmax(100px, 1fr)); }
  .one-picto-options-heading { align-items: flex-start; flex-direction: column; gap: 6px; }
  .one-picto-library-actions { width: 100%; justify-content: stretch; }
  .one-picto-library-actions .button { flex: 1 1 0; min-width: 0; }
  .one-picto-print-panel-head { display: flex; flex-direction: column; align-items: stretch; gap: 9px; padding: 12px; }
  .one-picto-print-panel-title { order: -1; }
  .one-picto-print-panel-title h2 { font-size: 19px; }
  .one-picto-print-panel-title p:last-child { white-space: normal; }
  .one-picto-print-panel-actions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 5px; }
  .one-picto-print-panel-actions .button { min-width: 0; padding: 7px 5px; font-size: 9px; }
  .one-picto-print-panel-actions .button span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .one-picto-panel-back { align-self: flex-start; }
  .one-picto-print-board { width: 96%; }
  .one-picto-print-board.is-portrait { width: 68%; }
  .one-picto-print-empty { font-size: 11px; }
  .phrase-form-footer { align-items: stretch; flex-direction: column; }
  .phrase-form-footer .button, .phrase-actions .button { width: 100%; }
  .phrase-actions { flex-direction: column-reverse; }
  .confirm-modal { padding: 27px 20px 22px; }
  .confirm-actions { flex-direction: column-reverse; }
  .confirm-actions .button { width: 100%; }
  .print-paper-grid { grid-template-columns: 1fr; }
  .print-options-actions { flex-direction: column-reverse; }
  .print-options-actions .button { width: 100%; }
  .color-picker-modal { padding: 18px; }
  .color-spectrum { height: min(38vh, 190px); min-height: 145px; }
  .color-presets { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .color-picker-actions { flex-direction: column-reverse; }
  .color-picker-actions .button { width: 100%; }
}

@media print {
  @page { size: A4 landscape; margin: 0; }
  *, *::before, *::after { -webkit-print-color-adjust: exact !important; print-color-adjust: exact !important; }
  html, body { width: var(--print-page-width, 297mm); min-height: var(--print-page-height, 210mm); background: #fff; }
  body.printing { min-height: 0; }
  body.printing > *:not(#printRoot) { display: none !important; }
  body.printing #printRoot { display: block; width: var(--print-page-width, 297mm); }
  body.printing #printRoot .print-page-frame { width: var(--print-page-width, 297mm); height: var(--print-page-height, 210mm); display: flex; align-items: center; justify-content: center; overflow: hidden; page-break-after: always; break-after: page; }
  body.printing #printRoot .print-page-frame:last-child { page-break-after: auto; break-after: auto; }
  body.printing #printRoot .a4-sheet { width: var(--print-base-width, 297mm); height: var(--print-base-height, 210mm); margin: 0; transform: scale(var(--print-scale, 1)); transform-origin: center center; overflow: visible; box-shadow: none; }
  body.printing #printRoot .phrase-print-sheet { width: var(--print-base-width, 297mm); height: var(--print-base-height, 210mm); margin: 0; transform: scale(var(--print-scale, 1)); transform-origin: center center; overflow: hidden; box-shadow: none; }
  .editor-action-rail { display: none !important; }
  body.printing .step-label-input, body.printing .step-tools { display: none !important; }
  body.printing .step-label-print { display: block; }
  body.printing .step-number { border: 3px solid #fff !important; outline: 2px solid #214d84 !important; outline-offset: 1px; }

  body.printing.print-portrait #printRoot .sheet-top { gap: 8px; padding-right: 2mm; padding-left: 2mm; }
  body.printing.print-portrait #printRoot .sheet-top > div:first-child { min-width: 0; flex: 1; }
  body.printing.print-portrait #printRoot .sheet-title,
  body.printing.print-portrait #printRoot .sheet-subtitle { max-width: 145mm; }
  body.printing.print-portrait #printRoot .sheet-emblem { width: 18mm; height: 18mm; }
  body.printing.print-portrait #printRoot .sheet-emblem img { width: 13mm; height: 13mm; }
  body.printing.print-portrait #printRoot .sheet-rule,
  body.printing.print-portrait #printRoot .steps-grid,
  body.printing.print-portrait #printRoot .sheet-bottom { margin-right: 2mm; margin-left: 2mm; }
  body.printing.print-portrait #printRoot .step-card { min-height: 0; padding: 6mm 3mm 3mm; }
  body.printing.print-portrait #printRoot .steps-grid.steps-5 .step-card,
  body.printing.print-portrait #printRoot .steps-grid.steps-6 .step-card { min-height: 59mm; padding-top: 7mm; }
  body.printing.print-portrait #printRoot .step-image-button { width: 36mm; height: 36mm; }
  body.printing.print-portrait #printRoot .step-image { width: 34mm; height: 34mm; }
  body.printing.print-portrait #printRoot .phrase-a4-sheet .phrase-steps-many { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  body.printing.print-portrait #printRoot .phrase-a4-sheet .phrase-steps-many .phrase-step-image-button { width: min(var(--phrase-card-image, 30mm), 100%); height: min(var(--phrase-card-image, 30mm), 100%); }
  body.printing.print-portrait #printRoot .phrase-a4-sheet .phrase-steps-many .phrase-step-image { width: min(calc(var(--phrase-card-image, 30mm) - 2mm), 100%); height: min(calc(var(--phrase-card-image, 30mm) - 2mm), 100%); }
  body.printing.print-portrait #printRoot .step-label-print { font-size: 13px; }
  body.printing.print-portrait #printRoot .steps-grid.steps-1,
  body.printing.print-portrait #printRoot .steps-grid.steps-2,
  body.printing.print-portrait #printRoot .steps-grid.steps-3 { --step-unit: calc((100% - 5mm) / 2); }
  body.printing.print-portrait #printRoot .steps-grid.steps-1 { grid-template-columns: minmax(0, var(--step-unit)); }
  body.printing.print-portrait #printRoot .steps-grid.steps-2 { grid-template-columns: repeat(2, minmax(0, var(--step-unit))); }
  body.printing.print-portrait #printRoot .steps-grid.steps-3 { grid-template-columns: repeat(2, minmax(0, var(--step-unit))); grid-auto-rows: 1fr; }
  body.printing.print-portrait #printRoot .steps-grid.steps-3 .step-card:nth-child(3) { grid-column: 1 / span 2; width: var(--step-unit); justify-self: center; }
  body.printing.print-portrait #printRoot .steps-grid.steps-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: 1fr; align-content: stretch; }
  body.printing.print-portrait #printRoot .steps-grid.steps-5 { grid-template-columns: repeat(6, minmax(0, 1fr)); grid-auto-rows: 1fr; align-content: stretch; }
  body.printing.print-portrait #printRoot .steps-grid.steps-6 { grid-template-columns: repeat(3, minmax(0, 1fr)); grid-auto-rows: 1fr; align-content: stretch; }
  body.printing.print-portrait #printRoot .sheet-bottom { flex-wrap: wrap; }

  html.printing-one-picto-panel,
  body.printing-one-picto-panel { width: var(--one-picto-panel-page-width, 297mm); min-height: var(--one-picto-panel-page-height, 210mm); background: #fff; }
  body.printing-one-picto-panel > * { display: none !important; }
  body.printing-one-picto-panel #onePictoModal { position: static !important; display: block !important; width: var(--one-picto-panel-page-width, 297mm); height: var(--one-picto-panel-page-height, 210mm); max-height: none; padding: 0; background: #fff; }
  body.printing-one-picto-panel #onePictoModal > .one-picto-modal { position: static; width: var(--one-picto-panel-page-width, 297mm); height: var(--one-picto-panel-page-height, 210mm); max-height: none; display: block; padding: 0; overflow: visible; border: 0; border-radius: 0; box-shadow: none; background: #fff; }
  body.printing-one-picto-panel #onePictoModal > .one-picto-modal > *:not(.one-picto-print-panel) { display: none !important; }
  body.printing-one-picto-panel #onePictoModal .one-picto-print-panel { position: static; width: var(--one-picto-panel-page-width, 297mm); height: var(--one-picto-panel-page-height, 210mm); min-height: 0; display: flex !important; overflow: hidden; border-radius: 0; animation: none; background: #fff; }
  body.printing-one-picto-panel #onePictoModal .one-picto-print-panel-head { display: none !important; }
  body.printing-one-picto-panel #onePictoModal .one-picto-print-panel-stage { width: var(--one-picto-panel-page-width, 297mm); height: var(--one-picto-panel-page-height, 210mm); padding: 0; overflow: hidden; }
  body.printing-one-picto-panel #onePictoModal .one-picto-print-board,
  body.printing-one-picto-panel #onePictoModal .one-picto-print-board.is-portrait { width: var(--one-picto-panel-page-width, 297mm); height: var(--one-picto-panel-page-height, 210mm); max-width: none; max-height: none; aspect-ratio: auto; border: 0; border-radius: 0; box-shadow: none; }
  body.printing-one-picto-panel #onePictoModal .one-picto-print-empty,
  body.printing-one-picto-panel #onePictoModal .print-panel-item-tools { display: none !important; }
}
