/* Spalvos – dramblio kaulas, miltelių rožė ir šiltas grafitas */
:root {
  --bg: #f8f3ef; --panel: #fffdfb; --panel-2: #f8f3ef; --ink: #2c2326; --muted: #6f5f65; --line: rgba(70, 40, 50, .16);
  --accent: #a8445f; --accent-fill: #a8445f; --accent-ink: #ffffff; --accent-soft: rgba(168, 68, 95, .1); --hero: #f3e3df;
  --danger: #a8201a; --ok: #2e7a4b; --warn: #8a5a0c; --warn-soft: rgba(205, 140, 40, .15); --ok-soft: rgba(70, 160, 105, .15);
  --fill: rgba(70, 40, 50, .06); --input: #fffdfb; --seg-on: #ffffff; --bar: rgba(248, 243, 239, .84);
  --shadow: 0 1px 3px rgba(70, 40, 50, .1); --focus: rgba(168, 68, 95, .25);
  --sky-a: #f7f2ee; --sky-b: #f4dfda; --f-a: rgba(255, 255, 255, .5); --f-b: rgba(255, 255, 255, .9); --f-c: rgba(238, 205, 205, .85); --f-d: #f8f3ef;
  --sans: "Hanken Grotesk", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, Menlo, Consolas, monospace;
  --serif: "Instrument Serif", Georgia, serif;
  color-scheme: light;
}
/* Naktinis režimas: pagal sistemą, jei nepasirinkta kitaip */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #171215; --panel: #201a1d; --panel-2: #171215; --ink: #f5ecec; --muted: #b3a2a8; --line: rgba(245, 220, 225, .14);
    --accent: #e8a0b4; --accent-fill: #a8445f; --accent-ink: #ffffff; --accent-soft: rgba(232, 160, 180, .15); --hero: #2a1e23;
    --danger: #ff8a80; --ok: #7fcf9c; --warn: #eab565; --warn-soft: rgba(234, 181, 101, .16); --ok-soft: rgba(127, 207, 156, .16);
    --fill: rgba(245, 220, 225, .09); --input: #1b1518; --seg-on: #3a2c32; --bar: rgba(23, 18, 21, .84);
    --shadow: 0 1px 3px rgba(0, 0, 0, .4); --focus: rgba(232, 160, 180, .35);
    --sky-a: #1b1417; --sky-b: #33232a; --f-a: rgba(232, 160, 180, .16); --f-b: rgba(232, 160, 180, .3); --f-c: rgba(120, 72, 88, .75); --f-d: #171215;

    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #171215; --panel: #201a1d; --panel-2: #171215; --ink: #f5ecec; --muted: #b3a2a8; --line: rgba(245, 220, 225, .14);
  --accent: #e8a0b4; --accent-fill: #a8445f; --accent-ink: #ffffff; --accent-soft: rgba(232, 160, 180, .15); --hero: #2a1e23;
  --danger: #ff8a80; --ok: #7fcf9c; --warn: #eab565; --warn-soft: rgba(234, 181, 101, .16); --ok-soft: rgba(127, 207, 156, .16);
  --fill: rgba(245, 220, 225, .09); --input: #1b1518; --seg-on: #3a2c32; --bar: rgba(23, 18, 21, .84);
  --shadow: 0 1px 3px rgba(0, 0, 0, .4); --focus: rgba(232, 160, 180, .35);
  --sky-a: #1b1417; --sky-b: #33232a; --f-a: rgba(232, 160, 180, .16); --f-b: rgba(232, 160, 180, .3); --f-c: rgba(120, 72, 88, .75); --f-d: #171215;

  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { background: var(--bg); color: var(--ink); font: 14px/1.45 var(--sans); -webkit-font-smoothing: antialiased; display: flex; flex-direction: column; }

#topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 14px; padding: 8px 18px 8px 12px; padding-top: max(8px, env(safe-area-inset-top)); min-height: 51px; background: var(--bar); -webkit-backdrop-filter: saturate(160%) blur(16px); backdrop-filter: saturate(160%) blur(16px); border-bottom: 1px solid var(--line); flex: none; }
.brand { display: block; flex: none; padding: 0; border: 0; background: none; text-align: left; }
.brand:hover, .brand:active { background: none; filter: none; transform: none; }
.brand .logo, .brand .sub { display: block; }
.brand .logo { font: 500 14px/1.1 var(--mono); letter-spacing: 4px; color: var(--ink); }
.brand .sub { display: none; }
.tabs { display: flex; gap: 2px; margin-left: 10px; }
.tab { position: relative; display: flex; align-items: center; background: transparent; padding: 7px 12px; border-radius: 0; font: 500 11px var(--mono); letter-spacing: 1.6px; text-transform: uppercase; color: var(--muted); }
.tab::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: 2px; height: 1px; background: var(--accent); transform: scaleX(0); transform-origin: left; transition: transform .3s cubic-bezier(.2, .7, .2, 1); }
.tab:hover { filter: none; color: var(--ink); }
.tab.on { color: var(--ink); }
.tab.on::after { transform: scaleX(1); }
.tab-ic { display: none; }
/* Meniu mygtukas */
#nav-btn { position: relative; flex: none; width: 40px; height: 36px; padding: 0; background: none; }
#nav-btn span { position: absolute; left: 10px; right: 10px; height: 1.5px; background: var(--ink); transition: transform .3s cubic-bezier(.2, .7, .2, 1), opacity .2s ease, right .25s ease; }
#nav-btn span:nth-child(1) { top: 11px; }
#nav-btn span:nth-child(2) { top: 17px; right: 16px; }
#nav-btn span:nth-child(3) { top: 23px; }
#nav-btn:hover span:nth-child(2) { right: 10px; }
#nav-btn.open span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
#nav-btn.open span:nth-child(2) { opacity: 0; }
#nav-btn.open span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* Šoninis meniu: tamsus abiejose temose */
#nav-scrim { position: fixed; inset: 0; z-index: 39; background: rgba(30, 18, 24, .42); opacity: 0; visibility: hidden; transition: opacity .3s ease, visibility .3s; }
#nav-scrim.open { opacity: 1; visibility: visible; }
#nav { --n-bg: #211a1e; --n-up: #2d2529; --n-ink: #f3e9ea; --n-muted: #ae9fa5; --n-line: rgba(255, 255, 255, .1); --n-hi: #c87b90; --n-hi2: #e8a0b4; --n-hi3: #f4c6d3; --n-off: #5b4b51; position: fixed; z-index: 40; top: 0; left: 0; bottom: 0; width: min(300px, 86vw); display: flex; flex-direction: column; gap: 14px; padding: max(16px, env(safe-area-inset-top)) 14px max(14px, env(safe-area-inset-bottom)); background: var(--n-bg); color: var(--n-ink); border-right: 1px solid var(--n-line); overflow-y: auto; transform: translateX(-102%); visibility: hidden; transition: transform .42s cubic-bezier(.22, .8, .24, 1), visibility .42s; }
#nav.open { transform: none; visibility: visible; box-shadow: 18px 0 50px rgba(20, 10, 15, .3); }
#nav button { color: var(--n-ink); background: none; min-height: 0; }
#nav svg { flex: none; width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.nav-top { display: flex; align-items: center; gap: 6px; }
#nav-profile { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; padding: 4px; text-align: left; }
#nav-avatar { flex: none; display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 50%; background: var(--n-hi); color: #1a1014; font: 600 16px var(--sans); }
.nav-who { min-width: 0; display: block; }
.nav-who b, .nav-who small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: var(--mono); text-transform: uppercase; }
.nav-who b { font-size: 11.5px; font-weight: 500; letter-spacing: 1.2px; }
.nav-who small { font-size: 10px; letter-spacing: 1px; color: var(--n-muted); }
#nav-close { flex: none; width: 34px; height: 34px; padding: 0; font-size: 22px; line-height: 1; color: var(--n-muted); }
.nav-search { display: flex; align-items: center; gap: 9px; padding: 0 11px; border-radius: 10px; background: var(--n-up); color: var(--n-muted); transition: box-shadow .2s ease; }
.nav-search:focus-within { box-shadow: 0 0 0 2px var(--n-hi); }
#nav .nav-search input { flex: 1; min-width: 0; height: 40px; padding: 0; border: 0; border-radius: 0; background: none; outline: 0; color: var(--n-ink); font: 400 11.5px var(--mono); letter-spacing: 1px; }
#nav .nav-search input::placeholder { color: var(--n-muted); text-transform: uppercase; }
#nav-items { display: flex; flex-direction: column; gap: 3px; }
#nav .nav-item { width: 100%; display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: 10px; font: 500 11.5px var(--mono); letter-spacing: 1.3px; text-transform: uppercase; text-align: left; transition: background-color .2s ease, padding-left .2s ease; }
#nav .nav-item:hover { filter: none; background: var(--n-up); padding-left: 16px; }
#nav .nav-item.on { background: var(--accent-fill); color: var(--accent-ink); }
.nav-row { position: relative; }
#nav-more { position: absolute; top: 3px; right: 3px; bottom: 3px; width: 36px; padding: 0; border-radius: 8px; display: flex; align-items: center; justify-content: center; }
#nav-more svg { transition: transform .25s ease; }
.nav-group.open #nav-more svg { transform: rotate(180deg); }
#nav-sublist { max-height: 0; overflow: hidden; visibility: hidden; transition: max-height .3s ease, visibility .3s; }
.nav-group.open #nav-sublist { max-height: 240px; visibility: visible; }
#nav .nav-subitem { display: block; width: calc(100% - 22px); margin-left: 22px; padding: 8px 10px; border-left: 1px solid var(--n-line); border-radius: 0; text-align: left; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#nav .nav-subitem:hover { filter: none; border-left-color: var(--n-hi2); color: var(--n-hi3); }
.nav-none { margin: 8px 12px; font-size: 12px; color: var(--n-muted); }
#nav-sublist .nav-none { margin-left: 34px; }
#nav-results[hidden], #nav-items[hidden] { display: none; }
#nav .nav-hit { display: block; width: 100%; padding: 9px 12px; border-radius: 10px; text-align: left; }
#nav .nav-hit:hover { filter: none; background: var(--n-up); }
.nav-hit b, .nav-hit small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-hit b { font-weight: 500; }
.nav-hit small { font-size: 11px; color: var(--n-muted); }
.nav-bottom { margin-top: auto; display: flex; flex-direction: column; gap: 3px; }
.nav-acct { position: relative; }
.nav-acct > svg { position: absolute; left: 12px; top: 11px; pointer-events: none; }
#nav .nav-acct #acct-btn { display: block; padding-left: 43px; max-width: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#nav .nav-acct #acct-btn[hidden] { display: none; }
.nav-acct:has(#acct-btn[hidden]) > svg { display: none; }
.nav-theme { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 8px; padding: 12px 12px 2px; border-top: 1px solid var(--n-line); }
.nav-theme-l { display: flex; align-items: center; gap: 12px; font: 500 11.5px var(--mono); letter-spacing: 1.3px; text-transform: uppercase; }
#nav #theme-btn { position: relative; flex: none; width: 40px; height: 22px; padding: 0; border-radius: 999px; background: var(--n-off); transition: background-color .25s ease; }
#nav #theme-btn::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .25s cubic-bezier(.2, .7, .2, 1); }
#nav #theme-btn[aria-checked="true"] { background: var(--n-hi); }
#nav #theme-btn[aria-checked="true"]::after { transform: translateX(18px); }
/* Meniu punktai išslysta vienas po kito */
#nav.open .nav-item[style], #nav.open .nav-group { animation: nav-in .42s cubic-bezier(.22, .8, .24, 1) both; animation-delay: calc(90ms + var(--i) * 45ms); }
@keyframes nav-in { from { opacity: 0; transform: translateX(-16px); } }
@media print { #nav, #nav-scrim, #nav-btn { display: none !important; } }

.view { flex: 1; min-height: 0; }
.view:not([hidden]) { animation: view-in .4s ease both; }
@keyframes view-in { from { opacity: 0; } }
.view[hidden] { display: none !important; }
#app { display: flex; }
#side { width: 340px; flex: none; overflow-y: auto; padding: 18px 14px; border-right: 1px solid var(--line); background: var(--panel-2); }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; margin-bottom: 12px; }
.card h3 { margin: 0 0 12px; font: 500 11px var(--mono); letter-spacing: 1.6px; text-transform: uppercase; color: var(--muted); }
.row { margin-bottom: 8px; }
.btns { display: flex; gap: 6px; flex-wrap: wrap; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 10px; margin-bottom: 8px; }
.field { min-width: 0; display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--muted); }
.field input, .field select, .field textarea, select, input[type=search] { font: inherit; color: var(--ink); padding: 7px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--input); width: 100%; }
select option { color: #1c1c1e; background: #fff; }
input[type=search] { border-radius: 999px; padding-left: 14px; }
.field textarea { resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 3px solid var(--focus); outline-offset: 0; border-color: var(--accent); }
button:focus-visible, .btn:focus-within { outline: 3px solid var(--focus); outline-offset: 1px; }
button, .btn { font: inherit; font-weight: 500; padding: 7px 13px; border: 0; border-radius: 10px; background: var(--fill); cursor: pointer; color: var(--ink); display: inline-block; transition: filter .15s ease, transform .1s ease, background-color .2s ease, color .2s ease; }
button:hover, .btn:hover { filter: brightness(.95); }
button:active, .btn:active { transform: scale(.98); }
button:disabled { opacity: .45; cursor: default; }
button.primary { background: var(--accent-fill); color: var(--accent-ink); font-weight: 600; }
button.danger { color: var(--danger); }
.small-btn { font-size: 12px; padding: 4px 10px; border-radius: 8px; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.seg { display: flex; flex-direction: column; gap: 4px; margin-bottom: 8px; }
.seg label { display: flex; gap: 8px; align-items: center; padding: 9px 10px; border-radius: 10px; cursor: pointer; background: var(--input); }
.seg label.on { background: var(--accent-soft); font-weight: 500; }
input[type=radio], .ord-steps input[type=checkbox] { accent-color: var(--accent-fill); }
/* Segmentų valdiklis */
.seg2 { display: grid; grid-template-columns: 1fr 1fr; gap: 2px; padding: 2px; border-radius: 10px; background: var(--fill); margin-bottom: 10px; }
.seg3 { grid-template-columns: 1fr 1fr 1fr; }
.seg2 button { border-radius: 8px; padding: 6px; background: transparent; color: var(--ink); font-size: 13px; line-height: 1.2; }
.seg2 button:hover { filter: none; }
.seg2 button.on { background: var(--seg-on); box-shadow: 0 1px 3px rgba(0, 0, 0, .14); font-weight: 600; }
/* Jungikliai kaip iOS: tekstas kairėje, jungiklis dešinėje */
.checks, .checks1 { display: flex; flex-direction: column; }
.checks label, .checks1 label { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: .5px solid var(--line); cursor: pointer; }
.checks label:last-child, .checks1 label:last-child { border-bottom: 0; }
.checks label > input, .checks1 label > input { order: 2; flex: none; }
.checks input[type=checkbox], .checks1 input[type=checkbox] { -webkit-appearance: none; appearance: none; position: relative; width: 42px; height: 25px; margin: 0; border-radius: 999px; background: rgba(120, 120, 128, .32); cursor: pointer; transition: background-color .2s ease; }
.checks input[type=checkbox]::after, .checks1 input[type=checkbox]::after { content: ""; position: absolute; top: 2px; left: 2px; width: 21px; height: 21px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .3); transition: transform .2s ease; }
.checks input[type=checkbox]:checked, .checks1 input[type=checkbox]:checked { background: var(--accent-fill); }
.checks input[type=checkbox]:checked::after, .checks1 input[type=checkbox]:checked::after { transform: translateX(17px); }
.checks input[type=checkbox]:disabled, .checks1 input[type=checkbox]:disabled { opacity: .45; }
.checks1 p { margin: 4px 0; }
.grid2:has(#s-backShorten) { grid-template-columns: 1fr; }
.mode-group .measure-only { display: none !important; }

.toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 6px; max-width: 620px; }
.toolbar select { width: auto; border-radius: 999px; background: var(--bar); }
.spacer { flex: 1; }
.panels { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
#preview-wrap { height: min(calc(100vh - 110px), 980px); overflow: auto; padding: 16px; border: 1px solid var(--line); border-radius: 18px; background: var(--panel); }
/* Lekalo „popierius“ visada baltas – kaip atspausdintas */
#preview svg, #print-area { letter-spacing: normal; }
#preview svg { display: block; background: #fff; border-radius: 10px; }
#info { min-width: 0; padding: 20px; border: 1px solid var(--line); border-radius: 18px; background: var(--panel); }
#info h3 { margin: 6px 0 8px; font: 500 11px var(--mono); letter-spacing: 1.6px; text-transform: uppercase; color: var(--muted); }
#info table { width: 100%; border-collapse: collapse; margin-bottom: 12px; font-size: 12.5px; }
#info td { padding: 5px 4px; border-bottom: .5px solid var(--line); vertical-align: top; }
#info td.n { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.ok { color: var(--ok); } .bad { color: var(--danger); font-weight: 600; }
.legend div { display: flex; align-items: center; gap: 6px; margin: 3px 0; }
.legend .l { display: inline-block; width: 28px; height: 0; border-top: 2px solid var(--ink); }
.legend .stitch { border-top: 1px dashed var(--ink); }
.legend .final { border-top: 1px dotted #2e86c1; }
.legend .fold { border-top: 2px dashed #c0392b; }

/* Instrukcijos */
#docs { display: flex; }
#docs[hidden] { display: none; }
#docs-side { width: 300px; flex: none; overflow-y: auto; padding: 18px 14px; border-right: 1px solid var(--line); background: var(--panel-2); }
#docs-toc { margin-top: 12px; }
#docs-toc .grp { margin: 18px 0 6px 10px; font: 500 10.5px var(--mono); letter-spacing: 1.4px; text-transform: uppercase; color: var(--muted); }
#docs-toc a { display: block; padding: 7px 10px; border: 1px solid transparent; border-radius: 10px; transition: background-color .2s ease, transform .2s ease; color: var(--ink); text-decoration: none; }
#docs-toc a:hover { background: var(--fill); }
#docs-toc a:hover { transform: translateX(3px); }
#docs-toc a.on { background: var(--hero); border-color: var(--accent); font-weight: 500; }
#docs-body img { max-width: 100%; height: auto; border-radius: 12px; background: #fff; }
#docs-body table { border-collapse: collapse; width: 100%; margin: 10px 0; font-size: 13px; }
#docs-body th, #docs-body td { border-bottom: 1px solid var(--line); padding: 7px 8px; text-align: left; vertical-align: top; }
#docs-body th { font: 500 10.5px var(--mono); letter-spacing: 1px; text-transform: uppercase; color: var(--muted); }
#docs-body li { margin: 3px 0; }
#docs-body mark { background: var(--hero); color: inherit; border-radius: 3px; }
.docs-empty { padding: 30px; color: var(--muted); }

/* Užsakymai */
#orders { display: flex; }
#ord-side { width: 300px; flex: none; overflow-y: auto; padding: 18px 14px; border-right: 1px solid var(--line); background: var(--panel-2); display: flex; flex-direction: column; gap: 8px; }
#ord-side > input, #ord-side > select { width: 100%; }
#ord-list { display: flex; flex-direction: column; gap: 6px; }
.ord-item { display: block; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); color: var(--ink); text-decoration: none; transition: border-color .2s ease; }
.ord-item:hover { filter: brightness(.98); }
.ord-item.on { box-shadow: inset 0 0 0 2px var(--accent); }
.ord-name { font-weight: 600; }
.ord-sub { color: var(--muted); font-size: 12px; }
.ord-meta { display: flex; justify-content: space-between; align-items: center; margin-top: 4px; font-size: 12px; }
.chip { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 11px; font-weight: 600; }
.chip.st-plan { color: var(--muted); background: var(--fill); }
.chip.st-sew { color: var(--warn); background: var(--warn-soft); }
.chip.st-done { color: var(--ok); background: var(--ok-soft); }
.chip.st-given { color: var(--accent); background: var(--accent-soft); }
.ord-backup { display: flex; gap: 6px; margin-top: 6px; }
#ord-status.bad { color: var(--danger); }
.ord-images { display: flex; flex-wrap: wrap; gap: 10px; }
.ord-thumb { position: relative; width: 150px; height: 150px; border-radius: 14px; overflow: hidden; background: #fff; }
.ord-thumb img { width: 100%; height: 100%; object-fit: cover; cursor: zoom-in; }
.ord-thumb .x { position: absolute; top: 4px; right: 4px; }
.ord-drop { width: 150px; height: 150px; border: 2px dashed var(--line); border-radius: 14px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; cursor: pointer; color: var(--accent); font-weight: 600; padding: 8px; }
.ord-drop.over, .ord-drop:hover { border-color: var(--accent); background: var(--accent-soft); }
button.x { padding: 0; width: 22px; height: 22px; line-height: 20px; border-radius: 50%; font-size: 15px; text-align: center; color: var(--danger); background: var(--fill); }
.ord-thumb button.x { background: var(--panel); box-shadow: var(--shadow); }
.ord-table-wrap { overflow-x: auto; }
.ord-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.ord-table th { text-align: left; font-weight: 600; color: var(--muted); font-size: 12px; padding: 4px; border-bottom: .5px solid var(--line); }
.ord-table td { padding: 4px; border-bottom: .5px solid var(--line); }
.ord-table input, .ord-table select, .ord-steps input { font: inherit; color: var(--ink); background: var(--input); border: 1px solid transparent; border-radius: 8px; padding: 5px 7px; width: 100%; min-width: 0; }
.ord-table input.num { width: 70px; text-align: right; }
.ord-table select { width: 72px; }
.ord-table td.n { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.ord-table td.lnk { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; min-width: 160px; }
.ord-table td.lnk input { flex: 1 1 110px; width: auto; }
.lk-note { flex-basis: 100%; font-size: 11.5px; line-height: 1.3; color: var(--muted); }
.lk-note.ok { color: var(--ok); }
.lk-note.bad { color: var(--warn); }
.lk-note.busy { animation: lk-busy 1.2s ease-in-out infinite; }
.lk-note .linklike { min-height: 0; font-size: 11.5px; font-weight: 600; }
@keyframes lk-busy { 50% { opacity: .45; } }
.ord-table td.lnk a { color: var(--accent); text-decoration: none; font-weight: 700; }
.ord-steps { padding-left: 22px; margin: 0 0 8px; }
.ord-steps li { display: flex; gap: 6px; align-items: center; margin: 4px 0; flex-wrap: wrap; }
.ord-steps li.done .st-name { text-decoration: line-through; color: var(--muted); }
.ord-steps .st-name { flex: 1; min-width: 160px; }
.ord-steps input[type=date] { width: 140px; }
.ord-steps input[type=checkbox] { width: auto; }
.ord-steps .st-time { display: inline-flex; gap: 4px; align-items: center; font-size: 12px; color: var(--muted); white-space: nowrap; }
.ord-steps input.num2 { width: 46px; text-align: right; }
button.timer { font-size: 12px; white-space: nowrap; }
button.timer.on { background: var(--accent-fill); color: var(--accent-ink); }
.ord-sum { width: 100%; max-width: 460px; border-collapse: collapse; margin-top: 8px; font-size: 14px; }
.ord-sum td { padding: 7px 6px; border-bottom: .5px solid var(--line); }
.ord-sum td.n { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
#ord-lightbox { position: fixed; inset: 0; background: rgba(0,0,0,.8); display: flex; align-items: center; justify-content: center; z-index: 50; cursor: zoom-out; padding: 20px; }
#ord-lightbox[hidden] { display: none; }
#ord-lightbox img { max-width: 100%; max-height: 100%; background: #fff; border-radius: 14px; }

#print-area { display: none; }
@media print {
  @page { size: A4 portrait; margin: 10mm; }
  body { background: #fff; display: block; }
  #topbar, .view { display: none !important; }
  #print-area { display: block; }
  .page { width: 190mm; height: 275mm; overflow: hidden; page-break-after: always; break-after: page; }
  .page.page-val { height: 276.5mm; }
  #ord-lightbox { display: none !important; }
  .order-print { font: 10.5pt/1.4 Arial, sans-serif; color: #000; }
  .order-print h1 { font-size: 16pt; margin: 0 0 3mm; }
  .order-print h2 { font-size: 12pt; margin: 5mm 0 2mm; }
  .order-print table { width: 100%; border-collapse: collapse; }
  .order-print td, .order-print th { border: 1px solid #bbb; padding: 1.5mm 2mm; text-align: left; vertical-align: top; }
  .order-print td.url { font-size: 8pt; word-break: break-all; }
  .order-print .pre { white-space: pre-wrap; }
  .order-print .imgs { display: flex; flex-wrap: wrap; gap: 3mm; }
  .order-print .imgs img { max-width: 88mm; max-height: 90mm; border: 1px solid #ccc; }
  .page:last-child { page-break-after: auto; break-after: auto; }
  .page svg { display: block; }
  .overview h2 { margin: 0 0 4mm; font: 600 16pt Arial, sans-serif; color: #000; }
  .overview p { font: 10pt/1.4 Arial, sans-serif; margin: 0 0 4mm; color: #000; }
  .overview svg.ov { width: 190mm; max-height: 230mm; border: 1px solid #ccc; }
}
@media (max-width: 900px) {
  body { display: block; }
  #app, #docs, #orders { flex-direction: column; height: auto; }
  #side, #docs-side, #ord-side { width: 100%; border-right: 0; }
  .ord-thumb, .ord-drop { width: 110px; height: 110px; }
  .panels { flex-direction: column; }
  #info { width: 100%; border-left: 0; }
}

/* Paskyra */
#acct-btn.bad { color: var(--danger); }
#acct-dialog { position: fixed; inset: 0; z-index: 50; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(0, 0, 0, .35); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
#acct-dialog[hidden] { display: none; }
#acct-box { width: 100%; max-width: 380px; background: var(--panel); color: var(--ink); border-radius: 20px; padding: 20px; box-shadow: 0 20px 60px rgba(0, 0, 0, .3); }
#acct-box h3 { margin: 0 0 12px; font-size: 24px; font-weight: 500; letter-spacing: -.015em; }
#acct-box p { margin: 8px 0; }
#acct-box p:empty { display: none; }
#acct-box input { font-size: 16px; }
@media print { #acct-dialog, #acct-btn { display: none !important; } }
#acct-view { margin-bottom: 10px; }
#acct-view button { cursor: pointer; }

/* Matmenys: paaiškinimai, įspėjimai, istorija, paieška */
.m-lab { display: flex; align-items: flex-end; justify-content: space-between; gap: 4px; flex: 1; }
.help-btn { flex: none; width: 20px; height: 20px; padding: 0; border-radius: 50%; font-size: 12px; font-weight: 700; line-height: 20px; text-align: center; color: var(--accent); }
.help-btn[aria-expanded="true"] { background: var(--accent-fill); color: var(--accent-ink); }
.m-help { padding: 8px 10px; border-radius: 10px; background: var(--accent-soft); color: var(--ink); font-size: 12px; line-height: 1.35; }
.m-help[hidden], .m-warn[hidden], .warn-top[hidden], #g-find[hidden], #m-hist[hidden] { display: none; }
.m-warn { color: var(--warn); font-size: 12px; font-weight: 600; line-height: 1.3; }
.m-field.odd input { border-color: var(--warn); }
.m-field.odd, .m-field:has(.m-help:not([hidden])) { grid-column: 1 / -1; }
.warn-top { color: var(--warn); font-size: 12px; font-weight: 600; }
.linklike { padding: 0; background: none; color: var(--accent); font-size: 13px; }
#m-hist { margin-top: 8px; font-size: 12px; }
#m-hist summary { cursor: pointer; font-weight: 600; }
.hist-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 0; border-bottom: .5px solid var(--line); }
#g-results button { display: flex; justify-content: space-between; gap: 8px; width: 100%; margin-top: 4px; text-align: left; }

.ph-only { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
button, a, label, summary { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }

/* Telefonas ir siauri ekranai: vienu metu vienas rodinys */
@media screen and (max-width: 900px) {
  .ph-only { display: block !important; }
  .ph-back { margin-bottom: 10px; padding: 8px 12px 8px 8px; background: none; color: var(--accent); font-weight: 600; font-size: 15px; }
  #ph-seg { display: grid !important; position: sticky; top: calc(43px + max(8px, env(safe-area-inset-top))); z-index: 15; flex: none; margin: 10px 14px 0; box-shadow: 0 0 0 6px var(--bg); background: var(--panel); border: 1px solid var(--line); }
  #app[data-ph="form"] #main, #app[data-ph="sheet"] #side, #app[data-ph="sheet"] #info, #app[data-ph="info"] #side, #app[data-ph="info"] .lek-head, #app[data-ph="info"] #preview-wrap { display: none; }
  #side { border: 0; }
  #preview-wrap { height: 66vh; height: 66dvh; flex: none; padding: 10px; touch-action: pan-x pan-y; }
  .toolbar { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px; max-width: none; }
  .toolbar .title, .toolbar .warn-top { grid-column: 1 / -1; }
  .toolbar .spacer { display: none; }
  .toolbar select { grid-column: span 3; width: 100%; min-width: 0; }
  .toolbar button { padding-left: 2px; padding-right: 2px; line-height: 1.15; }
  #dl-svg, #do-test, #do-print { grid-column: span 2; }
  /* Suskleidžiamos kortelės */
  #side .card h3 { display: flex; align-items: center; justify-content: space-between; cursor: pointer; }
  #side .card h3::after { content: "›"; font-size: 20px; line-height: 1; color: var(--muted); transform: rotate(90deg); transition: transform .15s ease; }
  #side .card.shut h3 { margin-bottom: 0; }
  #side .card.shut h3::after { transform: none; }
  #side .card.shut > :not(h3) { display: none !important; }
  /* Sąrašas arba turinys */
  #orders[data-ph="list"] #ord-main, #orders[data-ph="detail"] #ord-side, #docs[data-ph="list"] #docs-main, #docs[data-ph="detail"] #docs-side { display: none; }
  #ord-side, #docs-side { border: 0; }
  /* Produktai – kortelėmis, ne plačia lentele */
  .ord-table thead { display: none; }
  .ord-table, .ord-table tbody, .ord-table tfoot { display: block; }
  .ord-table tbody tr { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)) 40px; gap: 8px; padding: 12px 0; border-bottom: .5px solid var(--line); }
  .ord-table td { display: block; padding: 0; border: 0; min-width: 0; }
  .ord-table td[data-l]::before { content: attr(data-l); display: block; margin-bottom: 3px; font-size: 12px; color: var(--muted); }
  .ord-table td.p-name { grid-column: 1 / -2; grid-row: 1; }
  .ord-table td.p-del { grid-column: -2 / -1; grid-row: 1; align-self: center; text-align: right; }
  .ord-table td.lnk { display: flex; grid-column: 1 / -2; min-width: 0; }
  .ord-table td.p-sum { grid-column: -2 / -1; grid-row: 2; margin-left: -40px; text-align: right; white-space: nowrap; }
  .ord-table td.p-sum::before { text-align: right; }
  .ord-table input.num, .ord-table select { width: 100%; text-align: left; }
  .ord-table tfoot tr { display: flex; align-items: center; justify-content: space-between; padding-top: 10px; }
  .ord-table tfoot td { border: 0; padding: 0; }
  .ord-table tfoot td:empty { display: none; }
  /* Siuvimo etapai */
  .ord-steps li { flex-wrap: wrap; }
  .ord-steps li > input[type=checkbox] { order: 1; }
  .ord-steps .st-name { order: 2; flex: 1 1 0; min-width: 0; }
  .ord-steps li > button.x { order: 3; flex: none; }
  .ord-steps input[type=date] { order: 4; width: calc(100% - 34px); margin-left: 34px; }
  .ord-steps .st-time { order: 5; margin-left: 34px; }
  .ord-steps button.timer { order: 6; margin-left: auto; }
  .ord-steps input.num2 { width: 50px; }
}
@media screen and (max-width: 700px) {
  #topbar { min-height: 51px; }
  /* Patogūs paspaudimui dydžiai */
  button, .btn { min-height: 42px; }
  label.btn { display: inline-flex; align-items: center; }
  #topbar button { min-height: 36px; }
  #topbar .tab { min-height: 44px; }
  .small-btn { min-height: 38px; }
  .field input, .field select, .field textarea, select, input[type=search], .ord-table input, .ord-table select, .ord-steps input:not([type=checkbox]) { min-height: 44px; }
  .field textarea { min-height: 72px; }
  .seg label { min-height: 46px; }
  .seg2 button { min-height: 40px; }
  button.x { min-height: 0; width: 32px; height: 32px; line-height: 30px; font-size: 18px; }
  .help-btn { min-height: 0; width: 26px; height: 26px; line-height: 26px; font-size: 13px; }
  .linklike, .hm-more { min-height: 32px; }
  .hm-list button { min-height: 58px; }
  .hm-steps { grid-template-columns: minmax(0, 1fr); }
  .card { padding: 14px; }
  .ord-item { padding: 12px 14px; }
  #docs-toc a { padding: 11px 12px; }
  body.kb #topbar .tabs { display: none; }
  body.kb { padding-bottom: 0; }
}

/* Užsakymo puslapis: per visą ekraną, kaip pradžia */
.pg { display: flex; }
#ord-main, #docs-main, #main, .pg-main { position: relative; flex: 1; min-width: 0; overflow-x: hidden; overflow-y: auto; container-type: inline-size; background: var(--bg); }
.ord-sky { position: absolute; z-index: 0; left: 0; right: 0; top: 0; height: 300px; overflow: hidden; background: linear-gradient(180deg, var(--sky-a) 0%, var(--sky-b) 80%); }
.ord-sky .hm-folds { height: 66%; }
#ord-editor, #docs-body, #lek-inner, .pg-inner { position: relative; z-index: 1; padding: clamp(20px, 4cqw, 44px) clamp(14px, 3.2cqw, 48px) 56px; }
.ord-rail { margin: 0 0 8px; font-size: 24px; font-weight: 500; letter-spacing: -.015em; }
.ord-rail span { color: var(--muted); font-size: 15px; }
#ord-new { min-height: 44px; border-radius: 999px; font: 500 11.5px var(--mono); letter-spacing: 1.4px; text-transform: uppercase; }
.ord-item { transition: border-color .2s ease, transform .25s cubic-bezier(.2, .7, .2, 1), background-color .2s ease; }
@media (hover: hover) { .ord-item:hover { filter: none; transform: translateX(3px); border-color: var(--accent); } }
.ord-item.on { box-shadow: none; border-color: var(--accent); background: var(--hero); }
.ord-mini { height: 2px; margin-top: 9px; border-radius: 2px; background: var(--line); overflow: hidden; }
.ord-mini i { display: block; height: 100%; background: var(--accent); }

.ord-head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 16px 32px; min-height: 180px; margin-bottom: 22px; }
.ord-head-l { min-width: 0; flex: 1 1 340px; }
.ord-head .hm-num { margin-bottom: 10px; }
.ord-head h2 { margin: 0 0 12px; font-size: clamp(32px, 4.2cqw, 58px); line-height: 1.05; font-weight: 500; letter-spacing: -.025em; overflow-wrap: anywhere; }
.ord-head em { font: italic 400 1.08em/1 var(--serif); letter-spacing: 0; color: var(--accent); }
.ord-meta-line { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; }
.ord-meta-line .hm-due:empty { display: none; }
.ord-progress { display: flex; align-items: center; gap: 12px; max-width: 420px; margin-top: 14px; }
.ord-bar { flex: 1; height: 4px; border-radius: 4px; background: var(--line); overflow: hidden; }
.ord-bar i { display: block; height: 100%; width: 0; border-radius: 4px; background: var(--accent); transition: width .5s cubic-bezier(.2, .7, .2, 1); }
.ord-progress small { flex: none; font: 500 11px var(--mono); letter-spacing: .6px; color: var(--muted); }
.ord-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.ord-actions button { padding: 9px 16px; border-radius: 999px; background: var(--bar); font: 500 11px var(--mono); letter-spacing: 1px; text-transform: uppercase; -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }

.ord-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
#ord-editor .card { margin: 0; padding: 20px; border-radius: 18px; }
#ord-editor .card h3 { margin-bottom: 16px; }
#ord-editor .field input, #ord-editor .field select { min-width: 0; max-width: 100%; }
@container (min-width: 860px) {
  .ord-grid { grid-template-columns: repeat(12, minmax(0, 1fr)); }
  .ord-c-client { grid-column: 1 / -1; }
  .ord-c-meta { grid-column: span 7; }
  .ord-c-price { grid-column: span 5; grid-row: span 2; }
  .ord-c-sketch { grid-column: span 7; }
  .ord-c-prod, .ord-c-steps, .ord-c-design, .ord-c-shop { grid-column: 1 / -1; }
}
@container (min-width: 1280px) {
  .ord-c-meta { grid-column: span 5; }
  .ord-c-sketch { grid-column: span 3; grid-row: span 1; }
  .ord-c-price { grid-column: span 4; grid-row: span 1; }
  .ord-c-client { order: 0; } .ord-c-meta { order: 1; } .ord-c-sketch { order: 2; } .ord-c-price { order: 3; } .ord-c-design { order: 4; } .ord-c-prod { order: 5; } .ord-c-shop { order: 6; } .ord-c-steps { order: 7; }
  .ord-steps { display: grid; grid-template-columns: 1fr 1fr; column-gap: 40px; }
}
/* Pelnas */
.ord-profit { padding-bottom: 16px; margin-bottom: 16px; border-bottom: 1px solid var(--line); }
.ord-profit small { display: block; font: 500 11px var(--mono); letter-spacing: 1.6px; text-transform: uppercase; color: var(--muted); }
.ord-profit b { display: block; margin: 4px 0 2px; font-size: clamp(36px, 4cqw, 52px); line-height: 1.05; font-weight: 500; letter-spacing: -.025em; font-variant-numeric: tabular-nums; color: var(--accent); }
.ord-profit b.bad { color: var(--danger); }
.ord-profit span { font-size: 12px; color: var(--muted); }
.ord-sum { max-width: none; margin-top: 12px; }
.ord-table:has(tbody:empty) thead { display: none; }
.ord-table input, .ord-table select { border-color: transparent; }
/* Siuvimo eiga – laiko juosta */
.ord-steps { list-style: none; padding: 0; margin: 0 0 12px; }
.ord-steps li { position: relative; display: flex; gap: 10px; align-items: center; margin: 0; padding: 7px 0; }
.ord-steps li::before { content: ""; position: absolute; left: 11px; top: 0; bottom: 0; width: 1px; background: var(--line); }
.ord-steps li > input[type=checkbox] { -webkit-appearance: none; appearance: none; position: relative; z-index: 1; flex: none; width: 24px; height: 24px; min-height: 0; margin: 0; padding: 0; border: 1.5px solid var(--muted); border-radius: 50%; background: var(--panel); cursor: pointer; transition: background-color .2s ease, border-color .2s ease, transform .2s cubic-bezier(.2, 1.6, .4, 1); }
.ord-steps li > input[type=checkbox]:checked { background: var(--accent-fill); border-color: var(--accent-fill); transform: scale(1.06); }
.ord-steps li > input[type=checkbox]:checked::after { content: ""; position: absolute; left: 7px; top: 3px; width: 6px; height: 11px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(42deg); }
.ord-steps .st-name, .ord-steps input[type=date], .ord-steps input.num2 { border-color: transparent; background: transparent; transition: background-color .2s ease; }
.ord-steps li:hover .st-name, .ord-steps li:hover input[type=date], .ord-steps li:hover input.num2, .ord-steps input:focus { background: var(--input); }
.ord-steps .st-name { flex: 1 1 0; min-width: 0; font-weight: 500; }
.ord-steps li.done .st-name { font-weight: 400; }
.ord-steps input[type=date] { flex: none; width: 138px; }
button.timer { flex: none; border-radius: 999px; }
button.timer.on { animation: ord-pulse 1.6s ease-in-out infinite; }
@keyframes ord-pulse { 50% { box-shadow: 0 0 0 5px var(--accent-soft); } }
@media (hover: hover) { .ord-steps li > button.x { opacity: .35; transition: opacity .2s ease; } .ord-steps li:hover > button.x, .ord-steps li > button.x:focus-visible { opacity: 1; } }
/* Lekalo puslapis */
.lek-head { min-height: 170px; }
.lek-head h2 { font-size: clamp(30px, 3.3cqw, 46px); }
.ord-actions .primary { background: var(--accent-fill); color: var(--accent-ink); }
.ord-actions button.primary:hover { filter: brightness(1.08); }
.lek-head .ord-actions select { min-height: 37px; padding: 7px 12px; }
#zoom-out, #zoom-in, #zoom-fit { min-width: 40px; padding-left: 12px; padding-right: 12px; }
.lek-head .warn-top { flex-basis: 100%; }
#lek-sheets[hidden] { display: none; }
.card#measure-card { scroll-margin-top: 60px; }
#info h3 { margin-top: 0; }
#info table + h3 { margin-top: 18px; }
@media (min-width: 901px) {
  @container (min-width: 860px) {
    .panels { grid-template-columns: minmax(0, 1fr) 320px; }
    #info { height: min(calc(100vh - 110px), 980px); overflow-y: auto; }
  }
}
/* Instrukcijų puslapis */
.doc-cards { counter-reset: skyr; }
#docs-body .doc-card { margin: 0 0 14px; padding: 22px; border-radius: 18px; break-inside: avoid; overflow-x: auto; line-height: 1.55; }
.doc-card:not(.intro) { counter-increment: skyr; }
#docs-body .doc-card > :first-child { margin-top: 0; }
#docs-body .doc-card > :last-child { margin-bottom: 0; }
#docs-body .doc-card h3 { margin: 0 0 12px; font: 500 22px/1.2 var(--sans); letter-spacing: -.015em; text-transform: none; color: var(--ink); }
#docs-body .doc-card h3::before { content: counter(skyr, decimal-leading-zero); display: block; margin-bottom: 10px; font: 500 11px var(--mono); letter-spacing: 2px; color: var(--accent); }
#docs-body .doc-card h4 { margin: 18px 0 6px; font-size: 16px; font-weight: 600; }
#docs-body .doc-card h5 { margin: 14px 0 4px; font: 500 11px var(--mono); letter-spacing: 1px; text-transform: uppercase; color: var(--muted); }
#docs-body .doc-card p, #docs-body .doc-card ul, #docs-body .doc-card ol { max-width: 76ch; }
#docs-body .doc-card ul, #docs-body .doc-card ol { padding-left: 20px; }
#docs-body li::marker { color: var(--accent); }
#docs-body figure { margin: 12px 0; }
#docs-body figcaption { margin-top: 6px; font-size: 12px; color: var(--muted); }
@container (min-width: 1180px) {
  .doc-cards { column-count: 2; column-gap: 14px; }
}
.doc-navs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-top: 8px; }
.doc-nav { display: block; padding: 18px 20px; border: 1px solid var(--line); border-radius: 18px; background: var(--panel); text-align: left; transition: transform .25s cubic-bezier(.2, .7, .2, 1), border-color .2s ease, background-color .2s ease; }
.doc-nav.n { text-align: right; }
.doc-nav:hover { filter: none; transform: translateY(-3px); border-color: var(--accent); background: var(--hero); }
.doc-nav small { display: block; margin-bottom: 4px; font: 500 10.5px var(--mono); letter-spacing: 1.4px; text-transform: uppercase; color: var(--accent); }
.doc-nav b { display: block; font-size: 16px; font-weight: 500; overflow-wrap: anywhere; }
/* Pasirinkus puslapį kortelės atsiranda viena po kitos */
#ord-editor.enter .ord-head, #ord-editor.enter .card, #docs-body.enter .ord-head, #docs-body.enter .card { animation: hm-up .6s cubic-bezier(.2, .7, .2, 1) both; }
#docs-body.enter .card:nth-child(2) { animation-delay: .08s; }
#docs-body.enter .card:nth-child(n+3) { animation-delay: .16s; }
#ord-editor.enter .card:nth-child(1) { animation-delay: .06s; }
#ord-editor.enter .card:nth-child(2) { animation-delay: .12s; }
#ord-editor.enter .card:nth-child(3) { animation-delay: .18s; }
#ord-editor.enter .card:nth-child(4) { animation-delay: .24s; }
#ord-editor.enter .card:nth-child(5) { animation-delay: .3s; }
@media screen and (max-width: 900px) {
  .ord-sky { height: 340px; }
  .ord-head { min-height: 0; }
  .ord-actions { width: 100%; }
  #ord-side .ord-rail { font-size: 30px; }
  #ord-editor .card { padding: 16px; }
  .ord-steps li { flex-wrap: wrap; }
  .ord-steps input[type=date] { width: calc(100% - 34px); margin-left: 34px; }
}
@media screen and (max-width: 700px) {
  .ord-actions button { flex: 1 1 auto; min-height: 42px; padding: 9px 8px; }
  .toolbar.ord-actions button { padding-left: 3px; padding-right: 3px; font-size: 10.5px; letter-spacing: .3px; line-height: 1.15; }
  .toolbar.ord-actions select { min-height: 42px; font-size: 14px !important; }
  #docs-body .doc-card { padding: 16px; }
  #docs-body .doc-card h3 { font-size: 20px; }
  .doc-nav { padding: 14px; }
  .doc-nav b { font-size: 14px; }
  .ord-steps li { align-items: center; padding: 12px 0; }
  .ord-steps li::before { top: 0; }
  .ord-steps input[type=date], .ord-steps .st-name, .ord-steps input.num2 { background: var(--input); }
}

/* Audinio kiekis */
#fabric[hidden] { display: none; }
#fab-res { margin-bottom: 12px; }
#fab-res b { display: block; font-size: 34px; line-height: 1.05; font-weight: 500; letter-spacing: -.025em; color: var(--accent); }
#fab-res span { font-size: 12px; color: var(--muted); }
#fab-warn:empty { display: none; }
#fab-svg { margin: 10px 0 8px; }
#fab-svg svg { display: block; width: 100%; height: auto; max-height: 460px; }
.fb-cloth { fill: var(--accent-soft); stroke: var(--line); stroke-width: .3; }
.fb-parts path { fill: var(--panel); stroke: var(--accent); stroke-width: .35; stroke-linejoin: round; }
#fabric .checks1 label { padding: 5px 0; font-size: 12.5px; }
#info #fabric + h3, #info h3#calc-h { margin-top: 20px; }
/* Sandėlis ir statistika */
.pg-card { margin-bottom: 14px; padding: 20px; border-radius: 18px; }
.pg-tools { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.pg-tools input { flex: 1 1 220px; width: auto; }
.pg-tools select { flex: 0 0 auto; width: auto; }
.st-table input.num { width: 76px; }
.st-table select[data-k="cat"] { width: 108px; }
.st-table td { vertical-align: middle; }
.st-state { white-space: nowrap; }
#st-empty[hidden], #st-table[hidden], #sx-empty[hidden], #sx-table-wrap[hidden], #sx-tip[hidden] { display: none; }
.sx-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; margin-bottom: 14px; }
.sx-tile.card { margin: 0; padding: 16px 18px; border-radius: 18px; }
.sx-tile small { display: block; font: 500 10.5px var(--mono); letter-spacing: 1.4px; text-transform: uppercase; color: var(--muted); }
.sx-tile b { display: block; margin: 8px 0 2px; font-size: 26px; line-height: 1.1; font-weight: 500; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.sx-tile span { font-size: 12px; color: var(--muted); }
.sx-tile.lead { background: var(--hero); }
.sx-tile.lead b { color: var(--accent); }
#sx-chart { position: relative; height: 240px; margin: 26px 0 18px; padding-left: 56px; }
#sx-grid { position: absolute; left: 0; right: 0; top: 0; bottom: 24px; }
#sx-grid div { position: absolute; left: 0; right: 0; border-top: 1px solid var(--line); }
#sx-grid span { position: absolute; left: 0; bottom: 2px; font: 400 10.5px var(--mono); color: var(--muted); }
#sx-bars { position: absolute; left: 56px; right: 0; top: 0; bottom: 0; display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); }
.sx-col { position: relative; display: block; min-height: 0 !important; padding: 0; border-radius: 0; background: none; }
.sx-col:hover { filter: none; background: var(--fill); }
.sx-col:active { transform: none; }
.sx-col i { position: absolute; left: 50%; bottom: 24px; width: min(26px, 62%); max-height: calc(100% - 24px); transform: translateX(-50%); border-radius: 4px 4px 0 0; background: var(--accent-fill); animation: sx-grow .7s cubic-bezier(.2, .7, .2, 1) both; transform-origin: bottom; }
@keyframes sx-grow { from { clip-path: inset(100% 0 0 0); } to { clip-path: inset(0 0 0 0); } }
.sx-col small { position: absolute; left: 0; right: 0; bottom: 4px; font: 400 10.5px var(--mono); color: var(--muted); text-align: center; }
#sx-tip { position: absolute; z-index: 2; top: 0; display: flex; flex-direction: column; gap: 1px; min-width: 130px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); box-shadow: var(--shadow); font-size: 12px; pointer-events: none; }
#sx-tip b { font: 500 11px var(--mono); text-transform: uppercase; letter-spacing: 1px; }
.sx-table th { padding: 6px; font: 500 10.5px var(--mono); letter-spacing: 1px; text-transform: uppercase; color: var(--muted); text-align: left; border-bottom: 1px solid var(--line); }
.sx-table th.n { text-align: right; }
/* Kainos pasiūlymas */
#quote-dialog { position: fixed; inset: 0; z-index: 50; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(30, 18, 24, .42); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
#quote-dialog[hidden] { display: none; }
#quote-box { display: grid; grid-template-columns: 340px minmax(0, 1fr); gap: 20px; width: 100%; max-width: 980px; max-height: 100%; overflow: auto; padding: 22px; border-radius: 20px; background: var(--panel); color: var(--ink); box-shadow: 0 20px 60px rgba(0, 0, 0, .3); }
.qd-form h3 { margin: 0 0 14px; font-size: 24px; font-weight: 500; letter-spacing: -.015em; }
.qd-form .field { margin-bottom: 10px; }
.qd-preview { min-width: 0; padding: 12px; border-radius: 14px; background: var(--fill); }
.quote-sheet { padding: 34px; border-radius: 6px; background: #fffdfb; color: #2c2326; font-family: var(--sans); }
.qs-top { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 16px; padding-bottom: 12px; border-bottom: 1px solid #2c2326; font: 500 11px var(--mono); letter-spacing: 1.2px; text-transform: uppercase; }
.qs-logo { letter-spacing: 4px; font-size: 13px; }
.quote-sheet h1 { margin: 24px 0 18px; font-size: 34px; line-height: 1.08; font-weight: 500; letter-spacing: -.02em; overflow-wrap: anywhere; }
.quote-sheet em { font: italic 400 1.08em/1 var(--serif); color: var(--accent-fill); }
.qs-imgs { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; margin-bottom: 18px; }
.qs-imgs img { display: block; width: 100%; max-height: 300px; object-fit: contain; border-radius: 8px; background: #f8f3ef; }
.qs-price small, .qs-contact small { display: block; margin-bottom: 4px; font: 500 10.5px var(--mono); letter-spacing: 1.4px; text-transform: uppercase; color: #6f5f65; }
.qs-price b { display: block; margin-bottom: 14px; font-size: 42px; line-height: 1.05; font-weight: 500; letter-spacing: -.025em; color: var(--accent-fill); }
.quote-sheet table { width: 100%; border-collapse: collapse; }
.quote-sheet td { padding: 8px 0; border-top: 1px solid rgba(70, 40, 50, .16); }
.quote-sheet td:last-child { text-align: right; font-weight: 500; }
.qs-note { margin: 16px 0 0; line-height: 1.5; }
.qs-contact { margin: 18px 0 0; line-height: 1.5; }
@media print { #quote-dialog { display: none !important; } .quote-sheet { padding: 0; -webkit-print-color-adjust: exact; print-color-adjust: exact; } }
@media screen and (max-width: 820px) {
  #quote-dialog { padding: 0; }
  #quote-box { display: block; height: 100%; max-height: none; border-radius: 0; }
  .qd-preview { margin-top: 16px; }
  .quote-sheet { padding: 20px; }
}
@media screen and (max-width: 900px) {
  .pg-card { padding: 16px; }
  .ord-table td.p-stock { grid-column: 1 / -1; grid-row: 2; }
  .ord-table td.p-sum { grid-row: 3; }
  .ord-table.st-table tbody tr { position: relative; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ord-table.st-table td.p-name { grid-column: 1 / -1; grid-row: auto; padding-right: 42px; }
  .ord-table.st-table td.p-del { position: absolute; top: 18px; right: 0; }
  .ord-table.st-table td.lnk { grid-column: 1 / -1; }
  .ord-table.st-table td.st-val { text-align: left; white-space: normal; }
}
@media screen and (max-width: 700px) {
  #topbar .tab-extra { display: none; }
  #sx-chart { padding-left: 0; height: 210px; }
  #sx-bars { left: 0; }
  #sx-grid span { background: var(--panel); padding-right: 3px; }
}

/* Dizainas ant lekalo */
.dz-row { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.dz-thumb { flex: none; width: 64px; height: 48px; border-radius: 8px; background: #fff; border: 1px solid var(--line); overflow: hidden; }
.dz-thumb img { display: block; width: 100%; height: 100%; object-fit: contain; }
.dz-info { flex: 1; min-width: 0; }
.dz-info b, .dz-info small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dz-info b { font-weight: 500; }
.dz-info small { color: var(--muted); }
.dz-actions { margin-top: 12px; align-items: center; }
#dz-msg { margin: 8px 0 0; }
#dz-dialog { position: fixed; inset: 0; z-index: 50; display: flex; background: rgba(30, 18, 24, .42); padding: 16px; -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
#dz-dialog[hidden] { display: none; }
#dz-box { display: grid; grid-template-columns: minmax(0, 1fr) 320px; flex: 1; min-width: 0; min-height: 0; border-radius: 20px; background: var(--panel); color: var(--ink); overflow: hidden; box-shadow: 0 20px 60px rgba(0, 0, 0, .3); }
.dz-stage { min-height: 0; padding: 12px; background: var(--bg); touch-action: none; }
.dz-stage svg { display: block; width: 100%; height: 100%; }
.dz-none { padding: 40px; text-align: center; }
.dz-item { cursor: move; }
.dz-item.on image { outline: none; }
.dz-side { overflow-y: auto; padding: 20px; border-left: 1px solid var(--line); }
.dz-side .hm-num { margin: 0 0 6px; }
.dz-side h3 { margin: 0 0 14px; font-size: 22px; font-weight: 500; letter-spacing: -.015em; overflow-wrap: anywhere; }
.dz-side > .field { margin-bottom: 10px; }
.dz-side .btns { margin: 10px 0; }
.dz-val { padding: 8px 0; font-weight: 500; color: var(--ink); }
.dzf-srcs { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 8px; }
#dz-box input[type="radio"] { display: inline-block; width: auto; flex: none; }
.dzf-src { display: block; padding: 4px; border: 2px solid var(--line); border-radius: 10px; background: #fff; color: var(--ink); cursor: pointer; }
.dzf-src.on { border-color: var(--ink); }
.dzf-src img { display: block; width: 100%; height: 70px; object-fit: contain; }
.dzf-src small { display: block; margin-top: 3px; font-size: 11px; line-height: 1.2; color: #333; }
@media screen and (max-width: 820px) {
  #dz-dialog { padding: 0; }
  #dz-box { display: flex; flex-direction: column; border-radius: 0; }
  .dz-stage { flex: 0 0 48%; }
  .dz-side { flex: 1; border-left: 0; border-top: 1px solid var(--line); }
}
@media print { #dz-dialog { display: none !important; } }

/* Užsakymų blokai ir gimnastės */
#ord-list { gap: 18px; }
.ord-block { display: flex; flex-direction: column; gap: 8px; }
.ord-block-h { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding-bottom: 6px; border-bottom: 1px solid var(--ink); }
.ord-block-h h3 { margin: 0; font-size: 16px; font-weight: 500; }
.ord-block-h h3 span { color: var(--muted); font-size: 13px; }
.ord-block p { margin: 2px 0; }
.ord-name { overflow-wrap: anywhere; }
.ord-model { max-width: 460px; margin-bottom: 12px; }
.ath { display: flex; align-items: flex-start; gap: 10px; padding: 10px 0; border-top: 1px solid var(--line); }
.ath-body { flex: 1; min-width: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(180px, 100%), 1fr)); gap: 10px; align-items: end; }
.ath-body .field { min-width: 0; margin: 0; }
.ath-note, .ath-info, .ath-pay { grid-column: 1 / -1; }
.ath-note textarea { width: 100%; resize: vertical; }
.ath-info { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 12px; }
.ath-info:has(.ath-m:empty):has(.ath-go:empty) { display: none; }
.ath-n { display: flex; align-items: center; justify-content: center; width: 26px; height: 26px; margin-bottom: 5px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); font: 500 12px var(--mono); }
.ath-go { display: flex; align-items: center; gap: 8px; min-height: 36px; white-space: nowrap; }
.ath-go a { color: var(--accent); font-weight: 600; }
.ath-pay { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px 10px; }
.ath-pay .field { flex: 0 1 120px; }
.ath-state { display: flex; align-items: center; gap: 6px; min-height: 36px; }
.ath-state small { color: var(--muted); font-size: 11px; }
.ord-pay { font-size: 12px; color: var(--muted); }
.ga-list { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.ga-row { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); text-align: left; font-weight: 400; color: var(--ink); }
.ga-row.on { border-color: var(--accent); background: var(--hero); }
.ga-row .ath-n { flex: none; margin: 0; }
.ga-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.ga-main b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.ga-main .ord-bar { display: block; flex: none; }
.ga-nums { flex: none; display: flex; flex-direction: column; align-items: flex-end; gap: 2px; font-variant-numeric: tabular-nums; color: var(--muted); }
.ga-nums small { font-size: 12px; }
.ga-cur { margin: 0 0 8px; font-size: 16px; font-weight: 500; }
.shop-sum { margin: 0 0 8px; }
.shop-list { list-style: none; margin: 0 0 12px; padding: 0; }
.shop-row { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.shop-row input[type=checkbox] { -webkit-appearance: none; appearance: none; position: relative; flex: none; width: 24px; height: 24px; margin: 0; border: 1.5px solid var(--muted); border-radius: 50%; background: var(--panel); cursor: pointer; transition: background-color .2s ease, border-color .2s ease; }
.shop-row input[type=checkbox]:checked { background: var(--accent-fill); border-color: var(--accent-fill); }
.shop-row input[type=checkbox]:checked::after { content: ""; position: absolute; left: 7px; top: 3px; width: 6px; height: 11px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(42deg); }
.shop-mark { flex: none; width: 24px; text-align: center; color: var(--ok); font-weight: 700; }
.shop-name { flex: 1 1 120px; min-width: 0; font-weight: 500; overflow-wrap: anywhere; }
.shop-row small { color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.shop-row a { color: var(--accent); font-weight: 600; font-size: 13px; white-space: nowrap; padding: 4px 0; }
.shop-row.done .shop-name { text-decoration: line-through; color: var(--muted); font-weight: 400; }
.shop-row.have .shop-name { color: var(--muted); font-weight: 400; }
/* Kalbos */
#lang-pick { flex: none; width: auto; max-width: 110px; padding: 5px 6px; border-radius: 8px; font-size: 13px; }
.doc-lang { margin: 0 0 14px; padding: 10px 14px; border-radius: 12px; background: var(--accent-soft); color: var(--ink); }
/* Šiose kalbose raidės neretinamos, o pasviras ir mono šriftas nenaudojami */
:lang(zh) *, :lang(hi) *, :lang(ar) * { letter-spacing: 0 !important; }
:root:lang(zh), :root:lang(hi), :root:lang(ar) { --mono: var(--sans); --serif: var(--sans); }
:lang(zh) em, :lang(hi) em, :lang(ar) em { font-style: normal !important; font-family: inherit !important; }
:lang(hi) .tab, :lang(hi) .hm-btn, :lang(hi) .hm-link, :lang(ar) .tab, :lang(ar) .hm-btn, :lang(ar) .hm-link, :lang(zh) .tab { text-transform: none; font-family: var(--sans); font-size: 13px; }
/* Arabų kalba: iš dešinės į kairę, bet lekalas ir skaičių laukai lieka kaip brėžinyje */
[dir="rtl"] #nav { left: auto; right: 0; transform: translateX(102%); border-right: 0; border-left: 1px solid rgba(255, 255, 255, .1); }
[dir="rtl"] #nav.open { transform: none; box-shadow: -18px 0 50px rgba(20, 10, 15, .3); }
[dir="rtl"] #nav .nav-item:hover { padding-left: 12px; padding-right: 16px; }
[dir="rtl"] .hm-art { right: auto; left: max(10px, calc((100% - 1240px) / 2)); }
[dir="rtl"] .hm-plate { right: auto; left: max(40px, calc((100% - 1120px) / 2)); }
[dir="rtl"] .brand, [dir="rtl"] .ga-row, [dir="rtl"] .hm-tile, [dir="rtl"] .doc-nav, [dir="rtl"] #nav .nav-item, [dir="rtl"] #nav-profile { text-align: right; }
[dir="rtl"] .hm-tile i { right: auto; left: 22px; transform: scaleX(-1); }
[dir="rtl"] .ord-steps li::before { left: auto; right: 11px; }
[dir="rtl"] #preview svg, [dir="rtl"] #dz-canvas svg, [dir="rtl"] #hm-art svg, [dir="rtl"] #print-area svg { direction: ltr; }
[dir="rtl"] input[type=number], [dir="rtl"] input[inputmode], [dir="rtl"] input[type=date] { direction: ltr; text-align: right; }
.nav-ver { padding: 0 12px 6px; font: 400 10px var(--mono); letter-spacing: .6px; color: var(--n-muted); }
@media (max-width: 760px) {
  .ath-pay .field { flex: 1 1 110px; }
  .ath-go:empty { display: none; }
  .ath-n { grid-row: 1; }
}
@media screen and (max-width: 900px) {
  /* Atsidarius užsakymui turinys užima tiek aukščio, kiek reikia, ir nesusitraukia */
  #ord-main, #docs-main, #main, .pg-main { flex: none; width: 100%; }
}

/* Pradžia */
#home { overflow-y: auto; overflow-x: hidden; }
.hm-num { margin: 0 0 14px; font: 500 11px var(--mono); letter-spacing: 2px; text-transform: uppercase; color: var(--muted); }
.hm-wrap { max-width: 1200px; margin: 0 auto; padding: 0 40px 28px; }
.hm-title { margin: 0 0 26px; font-size: clamp(27px, 3.6vw, 40px); line-height: 1.12; font-weight: 500; letter-spacing: -.02em; text-wrap: balance; }
#home em { font: italic 400 1.1em/1 var(--serif); letter-spacing: 0; color: var(--accent); }
.hm-btn { padding: 14px 28px; border: 1px solid var(--ink); border-radius: 999px; background: none; color: var(--ink); font: 500 12px var(--mono); letter-spacing: 1.8px; text-transform: uppercase; transition: background-color .25s ease, color .25s ease, transform .15s ease; }
.hm-btn.solid:hover { filter: none; background: var(--ink); color: var(--bg); }
.hm-link { padding: 14px 4px; background: none; color: var(--muted); font: 500 12px var(--mono); letter-spacing: 1.6px; text-transform: uppercase; }
.hm-link:hover { filter: none; color: var(--ink); }
.hm-link span { display: inline-block; transition: transform .25s ease; }
.hm-link:hover span { transform: translateX(5px); }
.hm-cta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 22px; }

/* Pagrindinis vaizdas: lekalas tiulio bangose */
.hm-hero { position: relative; overflow: hidden; min-height: min(760px, calc(100vh - 51px)); display: flex; align-items: flex-start; padding: clamp(40px, 9vh, 96px) max(40px, calc((100% - 1120px) / 2)) 0; background: linear-gradient(180deg, var(--sky-a) 0%, var(--sky-a) 35%, var(--sky-b) 78%); }
.hm-copy { position: relative; z-index: 3; max-width: 620px; }
.hm-hero h1 { margin: 0 0 30px; font-size: clamp(42px, 5.4vw, 72px); line-height: 1.04; font-weight: 500; letter-spacing: -.025em; text-wrap: balance; }
.hm-lead { margin: 30px 0 0; max-width: 44ch; font-size: 16px; line-height: 1.55; color: var(--muted); }
.hm-copy > * { animation: hm-up .8s cubic-bezier(.2, .7, .2, 1) both; }
.hm-copy > :nth-child(2) { animation-delay: .12s; }
.hm-copy > :nth-child(3) { animation-delay: .24s; }
@keyframes hm-up { from { opacity: 0; transform: translateY(18px); } }
.hm-plate { position: absolute; z-index: 3; right: max(40px, calc((100% - 1120px) / 2)); bottom: 34px; margin: 0; font: 400 11px/1.9 var(--mono); letter-spacing: 1.3px; text-transform: uppercase; color: var(--muted); animation: hm-up .8s .4s both; }
.hm-plate div { display: flex; gap: 12px; justify-content: flex-end; }
.hm-plate dt { opacity: .75; }
.hm-plate dd { margin: 0; }
.hm-plate .tint { color: var(--accent); }
.hm-art { position: absolute; z-index: 1; top: 3%; right: max(10px, calc((100% - 1240px) / 2)); bottom: -6%; width: 50%; -webkit-mask-image: linear-gradient(180deg, #000 58%, transparent 90%); mask-image: linear-gradient(180deg, #000 58%, transparent 90%); }
.hm-art svg { display: block; width: 100%; height: 100%; }
.hm-g1 { fill: none; stroke: var(--line); stroke-width: .012; }
.hm-g5 { fill: none; stroke: var(--line); stroke-width: .03; }
.hm-line { fill: none; stroke: var(--ink); stroke-width: .13; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1; animation: hm-draw 2.4s .15s cubic-bezier(.4, .1, .2, 1) both; }
.hm-line.fold { stroke: var(--muted); stroke-width: .07; stroke-dasharray: none; animation: none; }
.hm-dot { fill: var(--accent); }
.hm-pt { fill: var(--muted); font: 500 1.05px var(--mono); }
@keyframes hm-draw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
.hm-folds { position: absolute; z-index: 2; left: 0; right: 0; bottom: 0; width: 100%; height: 48%; pointer-events: none; }
.f-a { stop-color: var(--f-a); } .f-b { stop-color: var(--f-b); } .f-c { stop-color: var(--f-c); } .f-d { stop-color: var(--f-d); }
.fold { animation: hm-drift 26s ease-in-out infinite alternate; will-change: transform; }
.fold.f2 { animation-duration: 19s; animation-direction: alternate-reverse; }
.fold.f3 { animation-duration: 32s; }
@keyframes hm-drift { from { transform: translate3d(-90px, 6px, 0); } to { transform: translate3d(100px, -8px, 0); } }

.hm-sec { margin-top: 72px; }
.hm-work { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: start; }
.hm-panel { min-width: 0; }
.hm-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; padding-bottom: 10px; border-bottom: 1px solid var(--ink); }
.hm-head h2 { margin: 0; font-size: 20px; font-weight: 500; letter-spacing: -.01em; }
.hm-head h2 span { color: var(--muted); font-size: 15px; }
.hm-more { flex: none; white-space: nowrap; padding: 0; background: none; color: var(--accent); font: 500 11px var(--mono); letter-spacing: 1.3px; text-transform: uppercase; }
.hm-list { list-style: none; margin: 0; padding: 0; }
.hm-list li { border-bottom: 1px solid var(--line); }
.hm-list button { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; border-radius: 0; background: none; text-align: left; font-weight: 400; transition: padding-left .25s ease; }
.hm-list button:hover { filter: none; padding-left: 8px; }
.hm-list button:active { transform: none; }
.hm-main { min-width: 0; display: block; }
.hm-main b, .hm-main small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hm-main b { font-weight: 500; font-size: 15px; }
.hm-main small { color: var(--muted); font-size: 12px; }
.hm-due { flex: none; font: 500 11px var(--mono); letter-spacing: .5px; text-transform: uppercase; color: var(--muted); }
.hm-due.soon { color: var(--accent); }
.hm-due.late { color: var(--danger); }
.hm-arrow { color: var(--muted); }
.hm-empty { padding: 14px 0 4px; color: var(--muted); }
.hm-empty p { margin: 0 0 10px; }
.hm-rest { margin: 8px 0 0; }

.hm-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 14px; }
.hm-tile { position: relative; display: flex; flex-direction: column; align-items: flex-start; min-height: 230px; padding: 22px; border: 1px solid var(--line); border-radius: 18px; background: var(--panel); text-align: left; font-weight: 400; overflow: hidden; transition: transform .3s cubic-bezier(.2, .7, .2, 1), background-color .3s ease, border-color .3s ease; }
.hm-tile:hover { filter: none; transform: translateY(-4px); background: var(--hero); border-color: var(--accent); }
.hm-tile small { font: 500 11px var(--mono); letter-spacing: 2px; color: var(--accent); }
.hm-tile b { margin-top: auto; font-size: 25px; font-weight: 500; letter-spacing: -.015em; }
.hm-tile span { margin-top: 5px; max-width: 34ch; color: var(--muted); line-height: 1.45; }
.hm-tile i { position: absolute; top: 18px; right: 22px; font-style: normal; font-size: 18px; color: var(--muted); transition: transform .3s ease, color .3s ease; }
.hm-tile:hover i { transform: translateX(5px); color: var(--accent); }

.hm-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 28px; }
.hm-steps li { padding-top: 14px; border-top: 1px solid var(--ink); }
.hm-steps small { display: block; margin-bottom: 22px; font: 500 11px var(--mono); letter-spacing: 2px; color: var(--accent); }
.hm-steps b { display: block; margin-bottom: 5px; font-size: 18px; font-weight: 500; letter-spacing: -.01em; }
.hm-steps span { display: block; color: var(--muted); line-height: 1.5; }

.hm-band { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px 40px; margin-top: 72px; padding: 40px; border-radius: 22px; background: var(--hero); }
.hm-band[hidden] { display: none; }
.hm-band .hm-title { margin: 0 0 8px; max-width: 16em; }
.hm-band p { margin: 0; }
.hm-foot { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: 56px; padding-top: 16px; border-top: 1px solid var(--line); color: var(--muted); font: 400 11px var(--mono); letter-spacing: 1px; }
.hm-foot .logo { font-weight: 500; letter-spacing: 3px; color: var(--ink); }

/* Atsiradimas slenkant */
#home.anim .rv { opacity: 0; transform: translateY(22px); transition: opacity .8s ease, transform .8s cubic-bezier(.2, .7, .2, 1); }
#home.anim .rv.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
@media (max-width: 820px) {
  .hm-wrap { padding: 0 18px 24px; }
  .hm-hero { flex-direction: column; align-items: stretch; min-height: 0; padding: 40px 18px 0; }
  .hm-copy { order: -1; }
  .hm-art { position: relative; inset: auto; width: auto; height: 400px; margin: 20px -18px -70px; }
  .hm-folds { height: 170px; }
  .hm-plate { position: relative; right: auto; bottom: auto; padding: 0 0 18px; }
  .hm-plate div { justify-content: flex-start; }
  .hm-sec { margin-top: 48px; }
  .hm-work, .hm-tiles { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .hm-tiles { gap: 10px; }
  .hm-tile { min-height: 150px; padding: 18px; }
  .hm-steps { grid-template-columns: 1fr 1fr; gap: 22px; }
  .hm-band { margin-top: 48px; padding: 26px 20px; }
}
/* Telefonas: skirtukai apačioje */
@media screen and (max-width: 700px) {
  body { padding-bottom: calc(58px + env(safe-area-inset-bottom)); }
  input, select, textarea { font-size: 16px !important; } /* kitaip iOS priartina puslapį */
  #topbar { -webkit-backdrop-filter: none; backdrop-filter: none; background: var(--bg); }
  #topbar .tabs { position: fixed; z-index: 30; left: 0; right: 0; bottom: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; margin: 0; padding: 6px 4px calc(4px + env(safe-area-inset-bottom)); background: var(--bar); -webkit-backdrop-filter: saturate(160%) blur(16px); backdrop-filter: saturate(160%) blur(16px); border-top: 1px solid var(--line); }
  #topbar .tab { flex-direction: column; gap: 2px; padding: 2px 0; color: var(--muted); font: 500 10px var(--sans); letter-spacing: 0; text-transform: none; }
  #topbar .tab::after { display: none; }
  #topbar .tab.on { color: var(--accent); font-weight: 600; }
  .tab-ic { display: block; width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
  #topbar button.tab { min-height: 44px; }
  .hm-steps { grid-template-columns: minmax(0, 1fr); }
  body.nav-open { overflow: hidden; }
  #nav .nav-item { padding-top: 13px; padding-bottom: 13px; }
}

/* ---------- Naujai vartotojai: pirmi žingsniai, tušti matmenys, paprastas režimas, pagalba */
.hm-start { padding: 26px 28px; border: 1px solid var(--line); border-radius: 22px; background: var(--panel); }
.st-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.st-head .hm-title { margin: 4px 0 6px; }
.st-bar { height: 6px; border-radius: 6px; background: var(--accent-soft); overflow: hidden; margin: 8px 0 18px; }
.st-bar i { display: block; height: 100%; background: var(--accent-fill); border-radius: 6px; transition: width .4s ease; }
.st-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.st-list li { display: flex; align-items: center; gap: 14px; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--line); }
.st-list li > div { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.st-list li small { color: var(--muted); }
.st-list li.next { border-color: var(--accent); background: var(--accent-soft); }
.st-list li.done { opacity: .6; }
.st-list li.done b { text-decoration: line-through; }
.st-dot { flex: none; width: 30px; height: 30px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 600; border: 1px solid var(--line); }
.st-list li.done .st-dot { background: var(--ok); color: #fff; border-color: transparent; }
.st-list li.next .st-dot { background: var(--accent-fill); color: #fff; border-color: transparent; }
.st-list button { flex: none; }
@media (max-width: 600px) {
  .hm-start { padding: 20px 16px; }
  .st-list li { flex-wrap: wrap; }
  .st-list li > div { flex-basis: calc(100% - 44px); }
  .st-list button { margin-left: 44px; }
}
.lek-empty { max-width: 460px; margin: 40px auto; padding: 24px; text-align: center; border: 1.5px dashed var(--line); border-radius: 18px; background: var(--panel); }
.lek-empty b { font-size: 18px; }
.lek-empty p { margin: 8px 0 0; }
.m-field.need input { border-color: var(--accent); background: var(--accent-soft); }
body:not(.adv) .adv-only { display: none !important; }
.adv-switch { display: flex; align-items: center; justify-content: space-between; gap: 12px; cursor: pointer; }
.adv-switch span { display: flex; flex-direction: column; gap: 2px; }
.adv-switch small { color: var(--muted); font-size: 12px; }
.adv-switch input { flex: none; }
.hm-legal { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-left: auto; }
.hm-legal a { color: inherit; opacity: .75; font-size: 13px; text-decoration: none; }
.hm-legal a:hover { opacity: 1; text-decoration: underline; }
#help .pg-inner { max-width: 860px; }
.hp-q { border-top: 1px solid var(--line); padding: 12px 0; }
.hp-q:first-of-type { border-top: 0; }
.hp-q summary { display: flex; align-items: flex-start; gap: 10px; cursor: pointer; font-weight: 600; list-style: none; }
.hp-q summary::-webkit-details-marker { display: none; }
.hp-q summary::before { content: ""; flex: none; width: 7px; height: 7px; margin: 6px 3px 0 2px; border-right: 1.8px solid var(--accent); border-bottom: 1.8px solid var(--accent); transform: rotate(-45deg); transition: transform .15s ease; }
.hp-q[open] summary::before { transform: rotate(45deg); }
.hp-q p { margin: 8px 0 0; color: var(--muted); line-height: 1.55; }
.hp-cs { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 10px; }
.hp-c { display: flex; flex-direction: column; gap: 2px; padding: 12px 16px; border: 1px solid var(--line); border-radius: 14px; color: inherit; text-decoration: none; }
.hp-c small { color: var(--muted); }
.hp-legal p { line-height: 1.6; margin: 0 0 10px; }
.hp-doc h3 { scroll-margin-top: 80px; }
#topbar .tab[hidden] { display: none !important; }

/* ---------- Dialogai be peržiūros dalies: nuoroda klientei, bendras pirkinių sąrašas, matmenys iš tėvų */
#quote-box:has(> .qd-wide) { grid-template-columns: minmax(0, 1fr); max-width: 620px; }
.qd-wide input[readonly] { width: 100%; margin-bottom: 10px; font-size: 13px; }
.qd-wide h4 { margin: 18px 0 8px; font-size: 15px; }
.shop-from { display: block; color: var(--muted); font-weight: 400; font-size: 12px; }
.badge { display: inline-flex; align-items: center; justify-content: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--accent-fill); color: #fff; font-size: 12px; font-weight: 600; vertical-align: 1px; }
.small-btn.on { border-color: var(--accent); color: var(--accent); }
.ib-list, .ib-forms { list-style: none; margin: 0 0 8px; padding: 0; }
.ib-list li, .ib-forms li { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.ib-main { flex: 1 1 260px; display: flex; flex-direction: column; gap: 3px; min-width: 0; overflow-wrap: anywhere; }
.ib-main small, .ib-m { color: var(--muted); font-size: 13px; }
.ib-forms li { flex-direction: column; }
.ib-new { display: flex; gap: 8px; margin: 10px 0 4px; }
.ib-new input { flex: 1; min-width: 0; }
.ib-new button { flex: none; }
/* Priminimai pradžios puslapyje */
.rm-list li.rm-pay { display: flex; align-items: center; gap: 10px; }
.hm-list.rm-list li.rm-pay > button:first-child { flex: 1 1 auto; width: auto; min-width: 0; }
.hm-list.rm-list li.rm-pay > .rm-send { flex: none; width: auto; padding: 7px 14px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.hm-list.rm-list li.rm-pay > .rm-send:hover { padding-left: 14px; }
/* PDF pasirinkimas */
.pdf-wrap { position: relative; display: inline-flex; }
.pdf-pick { position: absolute; z-index: 20; top: calc(100% + 6px); right: 0; display: flex; flex-direction: column; gap: 4px; width: 250px; padding: 6px; border: 1px solid var(--line); border-radius: 14px; background: var(--panel); box-shadow: 0 14px 40px rgba(30, 18, 24, .18); }
.pdf-pick[hidden] { display: none; }
.pdf-pick button { display: flex; flex-direction: column; align-items: flex-start; gap: 1px; width: 100%; padding: 9px 12px; border-radius: 10px; background: none; text-align: left; }
.pdf-pick button:hover { background: var(--accent-soft); filter: none; }
.pdf-pick small { color: var(--muted); font-size: 12px; font-weight: 400; }
[dir="rtl"] .pdf-pick { right: auto; left: 0; }
/* Viešas puslapis klientei ir tėvams */
body.pub { min-height: 100vh; background: var(--bg); }
.pub-top { display: flex; align-items: center; justify-content: space-between; max-width: 680px; margin: 0 auto; padding: 16px; }
.pub-top .logo { font-weight: 500; letter-spacing: 3px; }
.pub-top select { width: auto; }
.pub-main { max-width: 680px; margin: 0 auto; padding: 0 16px 48px; }
.pub-card { padding: 22px; border-radius: 20px; margin-bottom: 14px; }
.pub-card h1 { margin: 4px 0 6px; font-size: 30px; font-weight: 500; letter-spacing: -.02em; line-height: 1.15; }
.pub-card h1 em { font-family: var(--serif); font-weight: 400; color: var(--accent); }
.pub-card h3 { margin: 0 0 10px; }
.pub-steps { list-style: none; display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin: 22px 0 18px; padding: 0; }
.pub-steps li { display: flex; flex-direction: column; gap: 8px; font-size: 13px; color: var(--muted); }
.pub-steps li i { display: block; height: 6px; border-radius: 6px; background: var(--accent-soft); }
.pub-steps li.done i, .pub-steps li.on i { background: var(--accent-fill); }
.pub-steps li.on { color: var(--ink); font-weight: 600; }
.pub-prog-l, .pub-row { display: flex; justify-content: space-between; gap: 12px; margin: 8px 0; }
.pub-row { padding: 8px 0; border-bottom: 1px solid var(--line); }
.pub-left b { font-size: 20px; color: var(--accent); }
.pub-contact { white-space: normal; overflow-wrap: anywhere; }
.pub-upd { text-align: center; }
.pub-guide { display: flex; align-items: center; gap: 12px; width: 100%; margin: 12px 0 16px; padding: 8px; border: 1px solid var(--line); border-radius: 14px; background: none; text-align: left; }
.pub-guide img { width: 64px; height: 64px; object-fit: cover; border-radius: 10px; }
.pub-zoom { position: fixed; inset: 0; z-index: 60; display: flex; align-items: center; justify-content: center; padding: 12px; background: rgba(20, 12, 16, .8); }
.pub-zoom[hidden] { display: none; }
.pub-zoom img { max-width: 100%; max-height: 100%; border-radius: 12px; background: #fff; }
.pub-send { width: 100%; padding: 14px; font-size: 16px; }
.pub-ok { text-align: center; }
.pub-tick { display: inline-flex; align-items: center; justify-content: center; width: 56px; height: 56px; border-radius: 50%; background: var(--ok); color: #fff; font-size: 28px; }

/* ---------- Mokama prieiga */
body:not(.owner) .owner-only { display: none !important; }
.lock-card { max-width: 620px; margin: 24px auto; text-align: center; }
.lock-card h2 { margin: 10px 0 8px; font-size: 26px; font-weight: 500; letter-spacing: -.015em; }
.lock-ic { display: inline-flex; align-items: center; justify-content: center; width: 56px; height: 56px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); }
.lock-ic svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.lock-btns { justify-content: center; }
.lock-form { display: flex; gap: 8px; max-width: 420px; margin: 12px auto 4px; }
.lock-form input { flex: 1; min-width: 0; font-family: var(--mono); text-transform: uppercase; letter-spacing: .08em; }
.lock-form button { flex: none; }
.acc-band { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 20px; padding: 16px 20px; border: 1px solid var(--accent); border-radius: 18px; background: var(--accent-soft); }
.acc-band > div { display: flex; flex-direction: column; gap: 2px; }
.acc-band small { color: var(--muted); }
.acc-band .lock-form { margin: 0; flex: 1 1 260px; max-width: 380px; }
#hm-access > .muted { margin-top: 8px; }
.lek-lock { border-color: var(--accent); background: var(--accent-soft); }
.lek-lock .lock-form { margin: 8px 0 0; }
.acc-dlg { margin: 10px 0; padding: 12px 14px; border-radius: 12px; background: var(--accent-soft); }
.acc-dlg .lock-form { margin: 8px 0 0; max-width: none; }
.cd-new { display: grid; grid-template-columns: minmax(0, 1fr) 160px auto; gap: 10px; align-items: end; }
@media (max-width: 600px) { .cd-new { grid-template-columns: 1fr; } }
.cd-table { overflow-x: auto; }
.cd-table table { width: 100%; border-collapse: collapse; font-size: 14px; }
.cd-table th, .cd-table td { padding: 9px 8px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
.cd-code { font-family: var(--mono); letter-spacing: .05em; white-space: nowrap; }
.cd-table tr.used td { color: var(--muted); }
.cd-act { white-space: nowrap; text-align: right; }
.cd-act button + button { margin-left: 6px; }
#topbar .tab[data-tab="kodai"] { display: none !important; }


/* ---------- Planai: kas nepriklauso planui, net nerodoma */
body.tier-none .need-basic, body.tier-none .need-lite, body.tier-none .need-premium, body.tier-basic .need-lite, body.tier-basic .need-premium, body.tier-lite .need-premium { display: none !important; }
body.tier-premium #topbar .tab-prices { display: none !important; }
.pr-want { margin: 0 0 14px; padding: 12px 16px; border-radius: 14px; background: var(--accent-soft); border: 1px solid var(--accent); font-weight: 600; }
.pr-now { margin: 0 0 16px; color: var(--muted); }
.pr-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-bottom: 14px; }
@media (max-width: 900px) { .pr-grid { grid-template-columns: 1fr; } }
.pr-card { position: relative; display: flex; flex-direction: column; padding: 22px; border-radius: 20px; margin: 0; }
.pr-card h3 { margin: 0 0 6px; font-size: 22px; font-weight: 500; }
.pr-price { margin: 0 0 14px; }
.pr-price b { font-size: 34px; font-weight: 600; letter-spacing: -.02em; }
.pr-price small { margin-left: 4px; color: var(--muted); }
.pr-card ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.pr-card li { position: relative; padding-left: 24px; line-height: 1.4; }
.pr-card li::before { content: ""; position: absolute; left: 2px; top: 4px; width: 6px; height: 11px; border: solid var(--accent); border-width: 0 2px 2px 0; transform: rotate(42deg); }
.pr-best { border-color: var(--accent); box-shadow: 0 10px 30px rgba(168, 68, 95, .12); }
.pr-tag { position: absolute; top: 18px; right: 18px; padding: 3px 10px; border-radius: 999px; background: var(--accent-fill); color: #fff; font-size: 12px; font-weight: 600; }
[dir="rtl"] .pr-tag { right: auto; left: 18px; }
.pr-on { outline: 2px solid var(--accent); }
.pr-cur { margin: 14px 0 0; color: var(--accent); font-weight: 600; }
.pr-how ol { margin: 0 0 10px; padding-left: 20px; display: grid; gap: 6px; }
.pr-how .lock-form { margin-left: 0; }


/* Gauti matmenys iš tėvų – lentelės */
.ib-list li.ib-item { display: block; padding: 14px 0 16px; }
.ib-t { width: 100%; border-collapse: collapse; font-size: 14px; margin-bottom: 8px; }
.ib-t th, .ib-t td { padding: 7px 10px; border: 1px solid var(--line); text-align: left; vertical-align: top; }
.ib-t th { width: 34%; font-weight: 500; color: var(--muted); background: var(--accent-soft); white-space: nowrap; }
.ib-t td { overflow-wrap: anywhere; }
.ib-mt { width: 100%; border-collapse: collapse; table-layout: fixed; font-size: 14px; font-variant-numeric: tabular-nums; }
.ib-mt th, .ib-mt td { padding: 6px 2px; border: 1px solid var(--line); text-align: center; }
.ib-mt th { font-weight: 600; color: var(--accent); background: var(--accent-soft); font-size: 12px; }
.ib-unit { margin: 4px 0 8px; text-align: right; }
.ib-btns { margin-top: 10px; }
.ib-btns button { flex: none; }
@media (max-width: 520px) { .ib-t th { white-space: normal; } .ib-mt { font-size: 12px; } .ib-mt th { font-size: 11px; } }
.ib-mt th, .ib-t th { text-transform: none; letter-spacing: 0; }

/* ---------- prieigos juosta visuose puslapiuose */
#acc-strip[hidden] { display: none; }
#acc-strip .strip { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px 14px; padding: 7px 44px 7px 16px; position: relative; font-size: 14px; background: var(--accent-soft); color: var(--ink); border-bottom: 1px solid var(--line); }
#acc-strip .strip-warn { background: var(--warn-soft); }
#acc-strip .strip-btn { padding: 4px 12px; min-height: 0; font-size: 13px; border-radius: 999px; }
#acc-strip .strip-x { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); width: 30px; height: 30px; padding: 0; min-height: 0; border: 0; background: transparent; font-size: 20px; line-height: 1; color: var(--muted); }

/* ---------- terminų kalendorius */
.cal-nav { display: flex; align-items: center; gap: 8px; margin: 10px 0 8px; }
.cal-nav b { flex: 1; text-align: center; font-size: 17px; }
.cal-nav button[data-cal="-1"], .cal-nav button[data-cal="1"] { width: 38px; padding: 6px 0; font-size: 18px; }
.cal-head, .cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.cal-head span { text-align: center; font-size: 12px; color: var(--muted); text-transform: capitalize; padding-bottom: 2px; }
.cal-cell { position: relative; min-height: 78px; padding: 4px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); display: flex; flex-direction: column; gap: 2px; overflow: hidden; }
.cal-cell > b { font-size: 12px; font-weight: 600; color: var(--muted); }
.cal-empty { border-color: transparent; background: transparent; }
.cal-today { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.cal-today > b { color: var(--accent); }
.cal-ord { display: block; width: 100%; padding: 2px 5px; min-height: 0; border: 0; border-radius: 6px; font-size: 11.5px; line-height: 1.35; text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; background: var(--accent-soft); color: var(--ink); }
.cal-ord.st-done { background: var(--ok-soft); }
.cal-ord.cal-late { background: var(--danger); color: var(--bg); }
@media print { #acc-strip { display: none !important; } }
.cal-cell small { font-size: 11px; color: var(--muted); }
.cal-dot { display: none; }
.cal-warn { margin: 8px 0; padding: 8px 12px; border-radius: 10px; background: var(--warn-soft); font-size: 14px; }
.cal-sub { margin: 16px 0 6px; font-size: 15px; }
.cal-list { list-style: none; margin: 0 0 12px; padding: 0; }
.cal-list li button { display: flex; align-items: center; gap: 12px; width: 100%; padding: 8px 4px; border: 0; border-bottom: .5px solid var(--line); border-radius: 0; background: transparent; text-align: left; color: var(--ink); }
.cal-date { flex: none; width: 46px; font-family: "IBM Plex Mono", monospace; font-size: 13px; color: var(--muted); }
.cal-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.cal-main small { color: var(--muted); }
@media (max-width: 640px) {
  .cal-cell { min-height: 44px; align-items: center; }
  .cal-ord, .cal-cell small { display: none; }
  .cal-dot { display: inline-flex; align-items: center; justify-content: center; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 999px; background: var(--accent-fill); color: #fff; font-size: 11px; font-style: normal; }
}

/* ---------- profilis klientėms */
.prof-logo { display: flex; align-items: center; gap: 14px; margin: 8px 0 12px; }
.prof-logo p { margin: 4px 0 0; }
.prof-img { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 64px; height: 64px; border-radius: 16px; overflow: hidden; background: var(--accent-soft); color: var(--accent); font-size: 26px; font-weight: 600; }
.prof-img img { width: 100%; height: 100%; object-fit: cover; }
.acct-more { margin-top: 4px; }
.pub-seller { display: flex; align-items: center; gap: 12px; margin: 0 0 14px; }
.pub-seller .prof-img { width: 52px; height: 52px; border-radius: 14px; font-size: 22px; }
.pub-seller div { display: flex; flex-direction: column; }
.pub-seller small { color: var(--muted); font-size: 12px; }
.pub-seller b { font-size: 17px; }

/* Juostų siaurinimas eskizo lange */
#dzf-stage svg { cursor: crosshair; }
.dzf-thin { border-top: 1px solid var(--line, rgba(127,127,127,.25)); padding-top: 10px; margin-top: 6px; }
.dzf-mm { display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; align-items: center; margin: 6px 0; }
.dzf-mm > span { grid-column: 1 / -1; font-size: .85em; }
.dzf-mm input { width: 100%; }
.dzf-mm b { min-width: 4.5em; text-align: right; font-variant-numeric: tabular-nums; }

/* Patogumas: pranešimai, eiga, Šiandien, kalendorius meniu, telefonas */
#ease-toast, #ease-update { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(24px + env(safe-area-inset-bottom)); z-index: 300; display: flex; align-items: center; gap: 12px; max-width: min(560px, calc(100vw - 32px)); padding: 10px 12px 10px 18px; border-radius: 12px; background: var(--ink); color: var(--bg); box-shadow: 0 6px 24px rgba(0,0,0,.3); font-size: 14px; }
#ease-update { bottom: auto; top: calc(70px + env(safe-area-inset-top)); z-index: 299; }
#ease-toast button, #ease-update button { flex: none; min-height: 36px; padding: 6px 12px; border: 0; border-radius: 8px; background: transparent; color: inherit; font-weight: 600; text-decoration: underline; cursor: pointer; }
#ease-update button.primary { background: var(--accent-fill); color: var(--accent-ink); text-decoration: none; }
#ease-busy { position: fixed; inset: 0; z-index: 400; display: grid; place-items: center; background: rgba(20,12,16,.45); }
#ease-busy[hidden] { display: none; }
#ease-busy > div { display: grid; gap: 10px; width: min(320px, calc(100vw - 48px)); padding: 20px; border-radius: 12px; background: var(--panel); color: var(--ink); }
#ease-busy i { display: block; height: 4px; overflow: hidden; border-radius: 2px; background: var(--fill); }
#ease-busy u { display: block; width: 40%; height: 100%; background: var(--accent-fill); animation: ease-run 1.1s linear infinite; will-change: transform; }
#ease-busy small { color: var(--muted); }
@keyframes ease-run { from { transform: translateX(-100%); } to { transform: translateX(260%); } }
@media (prefers-reduced-motion: reduce) { #ease-busy u { animation-duration: 3s; } }
.ea-orders { display: grid; gap: 6px; max-height: 44vh; overflow: auto; margin: 10px 0 14px; }
.ea-orders button { display: grid; gap: 2px; padding: 10px 12px; text-align: left; }
.ea-orders small { color: var(--muted); }
.ea-tour p:not(.hm-num) { line-height: 1.5; }
.ea-dots { display: flex; gap: 6px; margin: 14px 0; }
.ea-dots i { width: 8px; height: 8px; border-radius: 50%; background: var(--fill); }
.ea-dots i.on { background: var(--accent-fill); }
.ord-blank { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 10px; padding: 8px 10px; border-radius: 8px; background: var(--warn-soft); font-size: 13px; }
.ath-m:empty, .ath-go:empty { display: none; }
.ath-m { margin: 0; color: var(--muted); font: 12px var(--mono); overflow-wrap: anywhere; }
.dz-stage { position: relative; }
.dzf-zoom { position: absolute; right: 16px; bottom: 16px; display: flex; gap: 6px; }
.dzf-zoom button { width: 40px; height: 40px; padding: 0; border-radius: 50%; font-size: 18px; line-height: 1; }
@media (pointer: coarse), (max-width: 760px) {
  input:not([type=checkbox]):not([type=radio]):not([type=range]), select, textarea { font-size: 16px; }
  .small-btn { min-height: 42px; }
  .nav-item, .nav-hit, .nav-subitem { min-height: 46px; }
}
@media print { #ease-toast, #ease-update, #ease-busy { display: none !important; } }

/* Paieška viršutinėje juostoje, šalia kalbos */
.top-search { position: relative; flex: 0 1 220px; min-width: 130px; margin-right: 10px; }
.top-search svg { position: absolute; left: 10px; top: 50%; width: 16px; height: 16px; transform: translateY(-50%); fill: none; stroke: var(--muted); stroke-width: 1.8; stroke-linecap: round; pointer-events: none; }
.top-search input { width: 100%; height: 34px; padding: 0 10px 0 32px; border: 1px solid var(--line); border-radius: 8px; background: var(--input); color: var(--ink); font-size: 14px; }
#top-results { position: absolute; right: 0; top: calc(100% + 6px); z-index: 120; width: min(340px, calc(100vw - 32px)); max-height: 60vh; overflow: auto; padding: 6px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); box-shadow: 0 8px 28px rgba(0,0,0,.28); }
#top-results .nav-hit { display: grid; gap: 2px; width: 100%; padding: 8px 10px; border: 0; border-radius: 6px; background: transparent; color: var(--ink); text-align: left; cursor: pointer; }
#top-results .nav-hit:hover, #top-results .nav-hit.on { background: var(--accent-soft); }
#top-results .nav-hit small { color: var(--muted); }
#top-search-btn { display: none; width: 40px; height: 40px; margin-right: 6px; padding: 8px; border: 0; background: transparent; color: var(--ink); }
#top-search-btn svg { display: block; width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
@media (min-width: 901px) { .nav-search { display: none; } }
@media (max-width: 900px) { .top-search { display: none; } #top-search-btn { display: block; } }

/* Nustatymai */
#settings .pg-inner { width: 100%; max-width: none; }
.set-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 22px; }
.set-head .muted { margin-bottom: 0; }
.set-head button { flex: none; }
.set-grid { columns: 340px 4; column-gap: 18px; }
.set-card { break-inside: avoid; margin: 0 0 18px; }
@media (max-width: 640px) { .set-head { display: block; } .set-head button { margin-top: 12px; } }
.set-card h3 { margin-top: 0; }
.set-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 9px 0; border-bottom: .5px solid var(--line); cursor: pointer; }
.set-row > span, .set-card .checks1 label > span { display: grid; gap: 1px; min-width: 0; }
.set-row b, .set-card .checks1 b { font-weight: 500; }
.set-row small, .set-card .checks1 small { color: var(--muted); font-size: 12px; }
.set-row select { flex: none; width: auto; max-width: 48%; }
.set-num { flex: none; width: 90px; height: 36px; padding: 0 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--input); color: var(--ink); text-align: right; }
.set-steps { margin-top: 12px; }
.set-steps textarea { width: 100%; }
.set-row input[type=checkbox] { -webkit-appearance: none; appearance: none; position: relative; flex: none; width: 42px; height: 25px; margin: 0; border-radius: 999px; background: var(--fill); cursor: pointer; transition: background .15s; }
.set-row input[type=checkbox]::after { content: ""; position: absolute; top: 2px; left: 2px; width: 21px; height: 21px; border-radius: 50%; background: #fff; transition: transform .15s; }
.set-row input[type=checkbox]:checked { background: var(--accent-fill); }
.set-row input[type=checkbox]:checked::after { transform: translateX(17px); }

/* Nustatymai: išvaizda */
.set-block { padding: 10px 0; border-bottom: .5px solid var(--line); }
.set-block > b { font-weight: 500; }
.set-swatches { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 8px; }
.set-swatches > button { width: 34px; height: 34px; min-height: 0; padding: 0; border: 2px solid transparent; border-radius: 50% !important; box-shadow: inset 0 0 0 2px var(--panel); cursor: pointer; }
.set-swatches > button.on { border-color: var(--ink); }
.set-custom { display: inline-flex; align-items: center; gap: 6px; padding: 2px 8px 2px 2px; border: 1px solid var(--line); border-radius: 999px; font-size: 13px; cursor: pointer; }
.set-custom.on { border-color: var(--ink); }
.set-custom input { width: 28px; height: 28px; padding: 0; border: 0; border-radius: 50%; background: none; cursor: pointer; }
.set-text { flex: none; width: 150px; height: 36px; padding: 0 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--input); color: var(--ink); }
.set-tour { margin-top: 12px; }

.set-swatches > .set-tone { box-shadow: inset 0 0 0 1px var(--line); }
.set-swatches > .set-tone.on { box-shadow: inset 0 0 0 2px var(--panel); }

/* Kurias lekalo detales spausdinti */
.print-pick { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0 0 10px; }
.print-pick[hidden] { display: none; }
.print-pick > span { margin-right: 4px; color: var(--muted); font-size: 13px; }
.print-pick button { min-height: 34px; padding: 4px 12px; border: 1px solid var(--line); border-radius: 999px; background: transparent; color: var(--muted); font-size: 12.5px; text-decoration: line-through; }
.print-pick button.on { border-color: var(--accent-fill); background: var(--accent-fill); color: var(--accent-ink); text-decoration: none; }
.print-pick button.pp-all { border-style: dashed; color: var(--ink); text-decoration: none; }
@media print { .print-pick { display: none !important; } }

/* Teisiniai dokumentai ir slapukų pranešimas */
.hp-table { overflow-x: auto; margin: 0 0 12px; }
.hp-table table { width: 100%; min-width: 520px; border-collapse: collapse; font-size: 13px; }
.hp-table th, .hp-table td { padding: 7px 8px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
#cookie-note { position: fixed; left: 16px; bottom: calc(16px + env(safe-area-inset-bottom)); z-index: 200; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; max-width: min(460px, calc(100vw - 32px)); padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); color: var(--ink); box-shadow: 0 6px 24px rgba(0,0,0,.25); font-size: 13px; }
#cookie-note span { flex: 1 1 240px; }
#cookie-note a { color: var(--accent); }
#cookie-note button { min-height: 36px; padding: 6px 12px; }
.pub-foot { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 16px; padding: 20px 16px 28px; font-size: 12px; }
.pub-foot a { color: var(--muted); }
@media (max-width: 900px) { #cookie-note { bottom: calc(76px + env(safe-area-inset-bottom)); } }
@media print { #cookie-note, .pub-foot { display: none !important; } }

/* Mano pastabos prie instrukcijų */
#docs-body .doc-note textarea { width: 100%; min-height: 110px; resize: vertical; }
#docs-body .doc-note p { margin: 6px 0 0; }
#docs-toc a.has-note::after { content: " ✎"; color: var(--accent); }
.ath > .ath-n { margin-top: 22px; }

/* Viršutinė juosta nebeišeina už ekrano: per ankštos skiltys slenkamos */
@media (min-width: 761px) {
  #topbar .tabs { flex: 0 1 auto; min-width: 0; overflow-x: auto; scrollbar-width: none; }
  #topbar .tabs::-webkit-scrollbar { display: none; }
  #topbar .tab { flex: none; }
  #topbar .brand, #lang-pick, #top-search-btn { flex: none; }
}

/* Atgal ir pirmyn šalia meniu */
.hist-btns { display: flex; flex: none; gap: 2px; margin-left: -8px; }
.hist-btns button { display: flex; align-items: center; justify-content: center; width: 34px; height: 36px; min-height: 0; padding: 0; border: 0; border-radius: 8px; background: none; color: var(--ink); cursor: pointer; }
.hist-btns button:hover:not(:disabled) { background: var(--fill); }
.hist-btns button:disabled { opacity: .3; cursor: default; }
.hist-btns svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
@media (max-width: 420px) { #topbar { gap: 6px; } .brand .logo { letter-spacing: 2px; } #top-search-btn { margin-right: 0; width: 36px; } #lang-pick { max-width: 92px; } }
@media print { .hist-btns { display: none !important; } }

/* Kainų puslapis */
.pr-sub { margin: 0 0 12px; color: var(--muted); font-size: 14px; }
.pr-free { margin: 0 0 14px; color: var(--muted); font-size: 14px; }
.pr-free b { color: var(--ink); font-weight: 600; }
