

:root {

  --tip-bg: #2E2F34;
  --tip-ink: #E9EAEF;

  --iris:#673DE6;      --iris-strong:#582ED6;

  --iris-text:#582ED6;
  --iris-tint:rgba(103,61,230,.09);    --iris-line:rgba(103,61,230,.28);
  --violet:#7112A1;    --violet-strong:#52007A; --violet-deep:#52007A; --violet-tile:#912BC5;
  --violet-tint:rgba(113,18,161,.09); --violet-line:rgba(113,18,161,.28);
  --cyan:#0B7FA3;      --cyan-tint:rgba(11,127,163,.09);  --cyan-line:rgba(11,127,163,.26);
  --peridot:#5E6B00;   --peridot-tint:rgba(94,107,0,.10); --peridot-line:rgba(94,107,0,.30);
  --crimson:#C31F52;   --crimson-tint:rgba(195,31,82,.09);--crimson-line:rgba(195,31,82,.28);

  --azure:#3A62CE;     --azure-tint:rgba(58,98,206,.09); --azure-line:rgba(58,98,206,.28);
  --azure-text:#274AAB;
  
  --teal-text:#076354; --cyan-text:#085F79; --peridot-text:#454F00; --crimson-text:#97103C;
  --on-iris:#FFFFFF;   --on-crimson:#FFFFFF;
  --surface:#FFFFFF;   --surface-2:#F2F3F8;  --surface-3:#E6E8EC;

  --line-soft:#EEEFF4; --line-pill:#E3E4E8; --row-line:#F3F4F7;
  --debug-log-line:#E9EBEF;   
  --text:#1C1D21;      --text-2:#5C5D62;     --text-3:#8C8D92;
  
  --jade:#0C8570;      --jade-tint:rgba(12,133,112,.09);  --jade-line:rgba(12,133,112,.26);

  --teal:            var(--cyan);
  --teal-strong:     var(--cyan-text);
  --teal-wash:       var(--cyan-tint);
  --green:           var(--jade);
  --green-ink:       var(--teal-text);
  --green-wash:      var(--jade-tint);
  --coral:           var(--crimson);
  --coral-ink:       var(--crimson-text);
  --coral-wash:      var(--crimson-tint);
  --coral-line:      var(--crimson-line);
  --blue:            #6F54C0;
  --blue-wash:       rgba(74,82,201,.09);
  --amber:           var(--peridot);
  
  --bg:              #FFFFFF;   
  --card:            var(--surface);
  --control:         var(--surface-2);
  --control-hover:   var(--surface-3);
  --popover:         var(--surface);
  --line:            #DDDEE3;

  --card-line:       var(--line);
  --line-strong:     #CDCED2;
  --sunken:          var(--surface);
  --rail:            var(--surface);
  --ink:             var(--text);
  --ink-list:        var(--text);
  --ink-soft:        var(--text-2);
  --ink-dim:         var(--text-3);
  --ink-invert:      #FFFFFF;
  --warn-bg:         var(--peridot-tint);
  --warn-border:     var(--peridot-line);
  --warn-ink:        var(--peridot-text);
  --ring:            var(--iris-line);

  --brand:       var(--violet-deep);   
  --on-brand:    #FFFFFF;
  --interactive: var(--iris);          
  --selected:    #CDCDF0;   
  
  --control-face:    #F2F2F2;
  --control-face-on: #FFFFFF;
  --selected-bg: var(--iris-tint);
  --ok:          var(--jade);
  --warn:        var(--peridot);
  --danger:      var(--crimson);

  --ink-title:  var(--ink);   
  --ink-faint:  var(--ink-soft);  

  --preview-ring-w: 1px;
  --preview-ring: rgba(0, 0, 0, .16);
  --preview-shadow: 0 4px 12px rgba(0, 0, 0, .10);

  --shadow-popover:  0 14px 32px -14px rgba(20, 22, 26, 0.28);

  --font-ui:    "Noto Sans TC", system-ui, -apple-system, "Microsoft JhengHei", sans-serif;
  --font-data:  "Manrope", var(--font-ui);
  --font-mono:  "IBM Plex Mono", ui-monospace, monospace;

  --ui-scale:   1.14;
  --radius-sm:  8px;   
  --radius:     8px;   
  --radius-lg:  14px;  
  --radius-xl:  14px;
  --shadow-card: 0 1px 2px rgba(20, 22, 26, 0.05);
  --shadow-lift: 0 -6px 18px rgba(20, 22, 26, 0.10);
}

body.theme-dark {
  --tip-bg: #2E2F34;
  --tip-ink: #E9EAEF;

  --iris:#673DE6;      --iris-strong:#582ED6;
  --iris-text:#C1AFF8;   
  --iris-tint:rgba(169,144,244,.15);  --iris-line:rgba(169,144,244,.42);
  --violet:#C47DE8;    --violet-strong:#D7A1F2; --violet-deep:#52007A; --violet-tile:#912BC5;
  --violet-tint:rgba(196,125,232,.15);--violet-line:rgba(196,125,232,.42);
  --cyan:#4FC3E8;      --cyan-tint:rgba(79,195,232,.14); --cyan-line:rgba(79,195,232,.38);
  --peridot:#C6DB33;   --peridot-tint:rgba(198,219,51,.14); --peridot-line:rgba(198,219,51,.38);
  --crimson:#F4708F;   --crimson-tint:rgba(244,112,143,.16);--crimson-line:rgba(244,112,143,.44);
  --azure:#7597F5;     --azure-tint:rgba(117,151,245,.14); --azure-line:rgba(117,151,245,.38);
  --azure-text:#B7C5EA;
  --teal-text:#7FE0C8; --cyan-text:#8AD9F2; --peridot-text:#DCE87A; --crimson-text:#FBA3B6;
  --on-iris:#FFFFFF;       --on-crimson:#2A0710;
  --surface:#1F2024;   --surface-2:#292A2E;  --surface-3:#333438;

  --line-soft:#2B2C30; --line-pill:#3A3B40; --row-line:#232428;
  --debug-log-line:transparent;  
  --text:#E9EAEF;      --text-2:#A8A9AE;     --text-3:#74757A;
  --jade:#3FC9A8;      --jade-tint:rgba(63,201,168,.14); --jade-line:rgba(63,201,168,.36);

  --teal:            var(--cyan);
  --teal-strong:     var(--cyan-text);
  --teal-wash:       var(--cyan-tint);
  --green:           var(--jade);
  --green-ink:       var(--teal-text);
  --green-wash:      var(--jade-tint);
  --coral:           var(--crimson);
  --coral-ink:       var(--crimson-text);
  --coral-wash:      var(--crimson-tint);
  --coral-line:      var(--crimson-line);
  --blue:            #977AF0;
  --blue-wash:       rgba(123,132,240,.14);
  --amber:           var(--peridot);
  --bg:              #16171B;
  --card:            var(--surface);
  --control:         var(--surface-2);
  --control-hover:   var(--surface-3);
  --popover:         var(--surface);
  --line:            #3A3B40;
  --card-line:       var(--line);   
  --line-strong:     #494A4F;
  --sunken:          #1A1B1F;
  --rail:            var(--surface);
  --ink:             var(--text);
  --ink-list:        var(--text);
  --ink-soft:        var(--text-2);
  --ink-dim:         var(--text-3);
  --ink-invert:      #150C24;
  --warn-bg:         var(--peridot-tint);
  --warn-border:     var(--peridot-line);
  --warn-ink:        var(--peridot-text);
  --ring:            var(--iris-line);

  --brand:       var(--violet);
  --on-brand:    #FFFFFF;
  --interactive: var(--iris);
  --selected:    #5F5581;   
  --control-face:    #1F2024;
  --control-face-on: #292A2E;
  --selected-bg: var(--iris-tint);
  --ok:          var(--jade);
  --warn:        var(--peridot);
  --danger:      var(--crimson);

  --ink-title:  var(--ink);   

  --ink-faint:  var(--ink-soft);  

  --preview-ring: rgba(255, 255, 255, .28);
  --preview-shadow: 0 4px 14px rgba(0, 0, 0, .45);

  --shadow-card: none;
  --shadow-lift: 0 -6px 18px rgba(0, 0, 0, 0.5);
  --shadow-popover: 0 18px 38px -20px rgba(8, 9, 11, 0.6);
}

body.scale-std { --ui-scale: 1.14; }
body.scale-big { --ui-scale: 1.315; }
body.scale-max { --ui-scale: 1.491; }

* { box-sizing: border-box; }

[hidden] { display: none !important; }

:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px var(--ring);
}

.material-symbols-rounded {
  font-variation-settings: "FILL" 0, "wght" 400, "GRAD" 0, "opsz" 20;
  vertical-align: middle;
  line-height: 1;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-ui);
  font-size: calc(15px * var(--ui-scale));
  line-height: 1.5;
  padding-top: 83px; 
  
  padding-bottom: calc(var(--footer-h, 150px) + 12px);
}

a { color: var(--interactive); text-decoration: none; }
a:hover { color: var(--iris-text); text-decoration: underline; }

.app-header {
  background: var(--card);
  border-bottom: 1px solid var(--line);
  padding: 12px 14px 10px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.app-header__title {
  display: flex;
  align-items: center;
  gap: 11px;
}

.app-header__mark {
  width: 32px;
  height: 32px;
  flex: none;
  border-radius: 10px;
  background: var(--iris);
  color: var(--on-iris);
  display: flex;
  align-items: center;
  justify-content: center;
}

.app-header__mark .material-symbols-rounded { font-size: 20px; }

.app-header__names {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
  min-width: 0;
}

.app-header__name {
  font-family: var(--font-data);
  font-weight: 800;
  font-size: calc(15px * var(--ui-scale));
  line-height: 1.2;
  color: var(--ink);
}

.app-header__sub {
  font-family: var(--font-mono);
  font-size: calc(11px * var(--ui-scale));
  letter-spacing: 0.14em;
  color: var(--ink-faint);
}

.app-header__right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.icon-btn {
  width: 30px;
  height: 30px;
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: var(--radius);
  background: var(--control);
  color: var(--ink-soft);
  cursor: pointer;
  padding: 0;
}

.icon-btn:hover { background: var(--control-hover); color: var(--ink); }
.icon-btn .material-symbols-rounded { font-size: 18px; }

.status-pill[hidden] { display: none !important; }

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: none;
  border-radius: 999px;
  padding: 5px 10px 5px 8px;
  font-family: var(--font-mono);
  font-size: calc(11px * var(--ui-scale));
  font-weight: 500;
}

.status-pill::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.status-pill--connected { background: var(--green-wash); color: var(--green-ink); }
.status-pill--waiting   { background: var(--control);    color: var(--ink-soft); }
.status-pill--error     { background: var(--coral-wash); color: var(--coral-ink); }

.status-pill--mismatch {
  background: var(--iris-tint);
  color: var(--iris);   

  cursor: pointer;

  border: 1px solid var(--iris-line);
}
.status-pill--mismatch:hover { filter: brightness(.97); }
.status-pill--mismatch .material-symbols-rounded {
  font-size: calc(13px * var(--ui-scale));
}

.tabbar {
  display: flex;
  gap: 4px;
  background: var(--control);
  border-radius: 10px;
  padding: 3px;
}

.tab {
  flex: 1;
  border: none;
  background: none;
  border-radius: var(--radius-sm);
  padding: 7px 4px;
  font-family: var(--font-ui);
  font-size: calc(12.5px * var(--ui-scale));
  color: var(--ink-soft);
  cursor: pointer;
}

.tab:hover { color: var(--ink); }

.tab--active,
.tab--active:hover {
  background: var(--iris);
  color: var(--on-iris);
  font-weight: 700;
}

.app-main {
  padding: 13px 14px 15px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 100%;   
}

.app-main > [data-platform] {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.app-main > [data-platform][hidden] { display: none; }

.panel {
  background: transparent;
  border: 0;
  border-radius: 0;
  padding: 14px 0;
  box-shadow: none;
}

.panel--card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 13px;
}

[data-platform] > .panel + .panel,
.pane > .panel + .panel { border-top: 1px solid var(--line); }

.panel__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.panel__title {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  
  font-family: var(--font-ui);
  font-size: calc(13px * var(--ui-scale));
  font-weight: 700;
  letter-spacing: 0;
  color: var(--ink);
}

.panel__icon { font-size: 14px; color: var(--ink-faint); }

.order-count {
  font-family: var(--font-data);
  font-size: calc(12px * var(--ui-scale));
  font-weight: 700;
  color: var(--ink);
}

:root      { --pick-meta: #6A6B6F; }
body.theme-dark { --pick-meta: #A6A7AA; }

.pickcard {
  height: calc(56px * var(--ui-scale));
  box-sizing: border-box;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0 16px;
  display: flex;
  align-items: center;
  gap: 15px;
}

.pickcard__stack { position: relative; width: 42px; height: 38px; flex: none; }

.pickcard__doc {
  position: absolute;
  width: 27px;
  height: 33px;
  border-radius: 3px;
  box-sizing: border-box;
  
  transition: opacity 140ms ease, transform 140ms ease;
}
.pickcard__doc--3     { left: 0;    top: 5px; background: var(--pick-doc3); border: 1px solid var(--pick-doc3-line); transform: rotate(-9deg); }
.pickcard__doc--2     { left: 6px;  top: 2px; background: var(--pick-doc2); border: 1px solid var(--pick-doc2-line); transform: rotate(-4deg); }
.pickcard__doc--empty { left: 13px; top: 0;   background: var(--pick-idle); border: 1px dashed var(--pick-idle-line); }
.pickcard__doc--1 {
  left: 13px; top: 0;

  background-color: var(--card);
  background-image: linear-gradient(var(--iris-tint), var(--iris-tint));
  border: 1px solid var(--iris-line);
  padding: 0 4px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2.5px;
}

.pickcard__doc--1 i { display: block; height: 2px; border-radius: 1px; background: var(--pick-rule-2); }
.pickcard__doc--1 i:nth-child(2) { background: var(--pick-rule-1); width: 70%; }
.pickcard__doc--1 i:nth-child(3) { height: 5px; margin-top: 1px; background: var(--pick-rule-3); }

:root {
  --pick-doc2: #E8E8EC; --pick-doc2-line: #CBCBCE;
  --pick-doc3: #F2F2F6; --pick-doc3-line: #D7D7DB;
  --pick-idle: #F6F7F9; --pick-idle-line: #CBCCCF;
  --pick-rule-1: rgba(103,61,230,.34);
  --pick-rule-2: rgba(103,61,230,.55);
  --pick-rule-3: rgba(103,61,230,.85);
}
body.theme-dark {
  --pick-doc2: #45454A; --pick-doc2-line: #68686D;
  --pick-doc3: #343439; --pick-doc3-line: #535458;
  --pick-idle: #2C2C31; --pick-idle-line: #535458;
  --pick-rule-1: rgba(193,175,248,.42);
  --pick-rule-2: rgba(193,175,248,.64);
  --pick-rule-3: rgba(193,175,248,.95);
}

.pickcard[data-n="0"] .pickcard__doc--1,
.pickcard[data-n="0"] .pickcard__doc--2,
.pickcard[data-n="0"] .pickcard__doc--3,
.pickcard[data-n="1"] .pickcard__doc--2,
.pickcard[data-n="1"] .pickcard__doc--3,
.pickcard[data-n="2"] .pickcard__doc--3 { opacity: 0; transform: translateY(6px); }
.pickcard:not([data-n="0"]) .pickcard__doc--empty { opacity: 0; }

.pickcard__body { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.pickcard__line { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.pickcard__count { display: flex; align-items: baseline; gap: 5px; }
.pickcard__num {
  font-size: calc(21px * var(--ui-scale));
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1;
  color: var(--ink);
  
  font-variant-numeric: tabular-nums;
}
.pickcard__unit { font-size: calc(12.5px * var(--ui-scale)); color: var(--text-2); }
.pickcard__meta { font-size: calc(12px * var(--ui-scale)); color: var(--pick-meta); white-space: nowrap; }

.pickcard__idle { display: none; flex-direction: column; gap: 3px; }
.pickcard__idle-t1 { font-size: calc(13px * var(--ui-scale)); font-weight: 600; color: var(--ink); }
.pickcard__idle-t2 { font-size: calc(11.5px * var(--ui-scale)); color: var(--pick-meta); }
.pickcard[data-n="0"] .pickcard__line { display: none; }
.pickcard[data-n="0"] .pickcard__idle { display: flex; }

:root            { --hairline: rgba(0,0,0,.07); }
body.theme-dark  { --hairline: rgba(255,255,255,.08); }

.pickcard--merged { height: auto; flex-direction: column; align-items: stretch; gap: 0; padding: 0; overflow: hidden; }

.pickcard__head {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 0 16px;
  flex: none;
  height: calc(56px * var(--ui-scale));
}

.pickcard__rows { overflow-y: auto; overscroll-behavior: contain; }
.pickcard__rows::-webkit-scrollbar { width: 8px; }
.pickcard__rows::-webkit-scrollbar-track { background: transparent; }
.pickcard__rows::-webkit-scrollbar-thumb {
  background: var(--line-strong);
  border-radius: 99px;
  border: 2px solid transparent;
  background-clip: content-box;
}

.pk-row { position: relative; display: flex; align-items: center; gap: 15px; padding: 9px 16px; border-top: 1px solid var(--hairline); }

.pk-row + .pk-row { border-top: 0; }
.pk-row + .pk-row::before {
  content: "";
  position: absolute;
  top: 0; left: 16px; right: 16px;
  height: 1px;
  background: var(--hairline);
}

.pk-row__slot  { width: 42px; flex: none; display: flex; justify-content: center; }
.pk-row__thumb {
  width: 30px; height: 30px; border-radius: 7px;
  background: var(--control); color: var(--ink-faint);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.pk-row__thumb img { width: 100%; height: 100%; object-fit: cover; }
.pk-row__thumb .material-symbols-rounded { font-size: 16px; }

.pk-row__body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.pk-row__no {
  font-family: var(--font-data);
  font-size: calc(11.5px * var(--ui-scale));
  font-weight: 600;
  color: var(--ink);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.pk-empty {
  padding: 14px 16px;
  font-size: calc(11.5px * var(--ui-scale));
  line-height: 1.7;
  color: var(--ink-faint);
  border-top: 1px solid var(--hairline);
}

.pk-row__meta {
  font-size: calc(11px * var(--ui-scale));
  color: var(--ink-faint);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

.pk-flag {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 9px 16px;
  border-top: 1px solid var(--hairline);
  background: var(--warn-bg);
  color: var(--warn-ink);
  font-size: calc(11px * var(--ui-scale));
  line-height: 1.5;
}
.pk-flag[hidden] { display: none !important; }
.pk-flag .material-symbols-rounded {
  font-size: calc(15px * var(--ui-scale));
  flex: none;
}

.hero {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.hero__row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
}

.hero__num {
  font-family: var(--font-data);
  font-size: calc(38px * var(--ui-scale));
  font-weight: 800;
  line-height: 0.9;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.hero__unit { font-size: calc(12.5px * var(--ui-scale)); color: var(--ink-soft); margin-left: 8px; }
.hero__meta { font-family: var(--font-mono); font-size: calc(11.5px * var(--ui-scale)); color: var(--ink-faint); }

.hero__bar {
  height: 6px;
  border-radius: 3px;
  background: var(--control);
  overflow: hidden;
  display: flex;
}

.hero__bar-gold { background: var(--iris); }
.hero__bar-blue { background: var(--blue); }

.hero__legend { display: flex; gap: 14px; }

.hero__legend-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: calc(11.5px * var(--ui-scale));
  color: var(--ink-soft);
}

.hero__legend-item::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--iris);
}

.hero__legend-item--blue::before { background: var(--blue); }

.hero__bar-mute { background: var(--ink-dim); }
.hero__legend-item--mute::before { background: var(--ink-dim); }

.alert {
  display: flex;
  align-items: center;
  gap: 9px;
  border-radius: var(--radius-lg);
  padding: 10px 11px;
  font-size: calc(12px * var(--ui-scale));
  line-height: 1.55;
}

.alert__icon { flex: none; font-size: 17px; }
.alert__text { flex: 1; color: var(--ink); }
.alert__action {
  flex: none;
  background: none;
  border: none;
  padding: 0;
  font-family: var(--font-ui);
  font-size: calc(12px * var(--ui-scale));
  font-weight: 600;
  cursor: pointer;
}

.alert--danger { background: var(--coral-wash); border: 1px solid var(--coral-line); }
.alert--danger .alert__icon,
.alert--danger .alert__action { color: var(--coral); }

.alert--info { background: var(--teal-wash); border: 1px solid transparent; }
.alert--info .alert__icon,
.alert--info .alert__action { color: var(--teal); }

.alert--warning { background: var(--warn-bg); border: 1px solid var(--warn-border); }
.alert--warning .alert__icon,
.alert--warning .alert__action { color: var(--warn-ink); }

.order-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 7px;
  max-height: 320px;
  overflow-y: auto;
}

.order-list li.order-card {
  display: flex;
  align-items: center;
  gap: 11px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 9px 11px 9px 9px;
}

.order-list li.order-card:hover { border-color: var(--line-strong); }

.order-card__thumb {
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--control);
  display: flex;
  align-items: center;
  justify-content: center;
}

.order-card__thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.order-card__thumb .material-symbols-rounded { font-size: 18px; color: var(--ink-faint); }

.order-card__body { flex: 1; min-width: 0; }

.order-card__no {
  font-family: var(--font-mono);
  font-size: calc(12px * var(--ui-scale));
  font-weight: 600;
  color: var(--ink);
}

.order-card__meta {
  margin-top: 3px;
  font-size: calc(11.5px * var(--ui-scale));
  color: var(--ink-faint);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.order-card__warn {
  color: var(--warn, #C99A3D);
  font-weight: 700;
  white-space: nowrap;
}

.order-card__ship {
  color: var(--ink-soft);
  font-weight: 600;
  margin-right: 3px;
  white-space: nowrap;
}

.order-card__meta-icon { font-size: 14px; vertical-align: -2px; margin-right: 2px; }

.order-card__qty {
  flex: none;
  font-family: var(--font-data);
  font-size: calc(13px * var(--ui-scale));
  font-weight: 700;
  color: var(--ink);
}

.order-empty {
  list-style: none;
  text-align: center;
  color: var(--ink-faint);
  padding: 26px 10px;
  font-size: calc(12.5px * var(--ui-scale));
  line-height: 1.7;
}

.chip-group:not(.chip-group--compact) {
  display: flex;
  gap: 3px;
  padding: 3px;
  background: var(--control);
  border-radius: calc(var(--radius-sm) + 3px);
}
.chip-group--compact { display: flex; gap: 6px; }

.chip {
  flex: 1;
  
  border: none;
  background: transparent;
  color: var(--ink-soft);
  border-radius: var(--radius-sm);
  padding: 8px 4px;
  font-family: var(--font-mono);
  font-size: calc(11.5px * var(--ui-scale));
  cursor: pointer;
  transition: background 0.12s ease, color 0.12s ease;
}

.chip:hover { background: var(--control-hover); color: var(--ink); }

.chip--active,
.chip--active:hover {
  background: var(--iris);
  color: var(--on-iris);
  font-weight: 600;
}

.chip-group--compact .chip { flex: none; padding: 4px 10px; font-size: 11px; border-radius: 999px; }

.setting-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;   

  background: none;
  border-radius: 0;
  padding: 9px 0;
}

.setting-row + .setting-row { margin-top: 6px; border-top: 0; }

.setting-row[hidden] { display: none !important; }

.setting-row__value { display: flex; align-items: center; gap: 8px; }

.setting-row--stack {
  flex-direction: column;
  align-items: stretch;
  background: none;
  padding: 0;
  gap: 8px;
}

.setting-row__label {
  font-size: calc(12.5px * var(--ui-scale));
  color: var(--ink-soft);
  min-width: 0;      
  overflow-wrap: anywhere;
}

.setting-row__hint {
  margin: 6px 0 0;
  font-size: calc(11.5px * var(--ui-scale));
  line-height: 1.6;
  color: var(--ink-faint);
}

.dropdown-select {
  border: none;
  background: transparent;
  color: var(--ink);
  font-family: var(--font-ui);
  font-size: calc(13px * var(--ui-scale));
  font-weight: 700;
  text-align: right;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;

  background-color: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 4px 22px 4px 10px;

  min-width: 140px;
  max-width: 100%;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%238A8F98' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 7px center;
}

.dropdown-select:hover { background-color: var(--control); }

body.theme-dark .dropdown-select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%2371767F' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

.dropdown-select option {
  background: var(--card);
  color: var(--ink);
}

.readonly-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: var(--control);
  color: var(--ink-soft);
  border-radius: 6px;
  padding: 3px 8px;
  font-family: var(--font-mono);
  font-size: calc(10.5px * var(--ui-scale));
  font-weight: 500;
}

.platform-tag {
  font-family: var(--font-mono);
  font-size: calc(11.5px * var(--ui-scale));
  background: var(--control);
  color: var(--ink-faint);
  padding: 3px 7px;
  border-radius: 5px;
}

.text-input {
  width: 100%;
  padding: 9px 10px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--card);
  color: var(--ink);
  font-family: var(--font-ui);
  font-size: calc(13px * var(--ui-scale));
}

.slider { width: 100%; accent-color: var(--iris); }

.field-stack {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 11px;
}

.field-stack:last-of-type { margin-bottom: 0; }

.field-stack__label {
  font-size: calc(12.5px * var(--ui-scale));
  color: var(--ink-soft);
}

.field-stack .dropdown-select {
  width: 100%;
  text-align: left;

  background-color: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 9px 26px 9px 10px;
  font-weight: 500;
  background-position: right 10px center;
}

#bvCustomFieldsBlock,
#bvNativeFieldsBlock {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.field-category {
  background: transparent;
  border: 0;
  border-radius: 0;
  padding: 14px 0;
  display: flex;
  flex-direction: column;
  gap: 9px;
}
.field-category + .field-category { border-top: 1px solid var(--line); }

.field-category:last-child { margin-bottom: 0; }

.field-category__title {
  font-family: var(--font-ui);
  font-size: calc(13px * var(--ui-scale));
  font-weight: 700;
  letter-spacing: 0;
  color: var(--ink);
}

.toggle-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: calc(13px * var(--ui-scale));
  color: var(--ink);
  cursor: pointer;
}

.switch {
  appearance: none;
  width: 34px;
  height: 19px;
  flex-shrink: 0;
  border-radius: 999px;
  background: var(--line-strong);
  position: relative;
  cursor: pointer;
  outline: none;
  transition: background 0.15s ease;
}

.switch::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: #FFFFFF;
  transition: transform 0.15s ease;
  box-shadow: 0 1px 2px rgba(20, 22, 26, 0.3);
}

body.theme-dark .switch::after { background: var(--ink-faint); box-shadow: none; }

.switch:checked { background: var(--iris); }
.switch:checked::after { transform: translateX(15px); background: var(--ink-invert); box-shadow: none; }

.col-order-label-row {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.col-order-label {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: calc(12px * var(--ui-scale));
  color: var(--ink-soft);
}

.col-order-row { display: flex; gap: 6px; }

.col-order-chip {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  background: var(--control);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  padding: 7px 4px;
  font-size: calc(11.5px * var(--ui-scale));
  color: var(--ink);
  cursor: grab;
  user-select: none;
}

.col-order-chip:active { cursor: grabbing; }

.col-order-chip.dragging {
  border-color: var(--iris);
  background: var(--control-hover);
}

.col-order-chip__grip { font-size: 14px !important; color: var(--ink-faint); }

.info-tip { position: relative; display: inline-flex; align-items: center; outline: none; vertical-align: -2px; margin-left: 4px; }

.info-tip .material-symbols-rounded {
  font-size: 13px !important;
  color: var(--teal);

  cursor: default;
  opacity: 0.85;
}
.info-tip:hover .material-symbols-rounded,
.info-tip:focus-visible .material-symbols-rounded { color: var(--teal-strong); opacity: 1; }

.info-tip__line { display: block; }
.info-tip__line + .info-tip__line { margin-top: 6px; }

.info-tip__bubble {
  position: absolute;
  left: 50%;

  top: calc(100% + 8px);
  transform: translateX(-50%);
  
  z-index: 240;
  width: max-content;

  max-width: min(260px, calc(100vw - 40px));
  text-align: left;
  font-weight: 400;
  white-space: normal;
  padding: 9px 11px;
  border-radius: var(--radius);
  background: var(--tip-bg);
  color: var(--tip-ink);
  border: 1px solid var(--line);
  
  font-size: calc(12px * var(--ui-scale));
  line-height: 1.6;
  box-shadow: 0 10px 28px -8px rgba(0, 0, 0, 0.6);
  opacity: 0;
  visibility: hidden;
  
  transition: opacity 80ms ease 120ms, visibility 0s linear 200ms;
  pointer-events: none;
}

.info-tip--up .info-tip__bubble {
  top: auto;
  bottom: calc(100% + 8px);
}

.info-tip:hover .info-tip__bubble,
.info-tip:focus-visible .info-tip__bubble {
  opacity: 1;
  visibility: visible;
  transition: opacity 80ms ease, visibility 0s;
}

.completed-list:empty { display: none; }

.completed-list {
  list-style: none;
  margin: 0;   
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.completed-item {
  display: flex;

  align-items: flex-end;
  gap: 10px;

  background: var(--surface-2);
  border: 1px solid transparent;
  border-radius: var(--radius-lg);
  padding: 10px 11px;
}

.completed-item__info { flex: 1; min-width: 0; }

.completed-item__logi {
  display: flex;
  align-items: center;
  gap: 5px;
  font-family: var(--font-mono);
  font-size: calc(11px * var(--ui-scale));
  color: var(--teal);
  margin-bottom: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 4px;
}

.completed-item__logi .platform-tag {
  margin-left: auto;
  flex: none;
  font-size: calc(10px * var(--ui-scale));
  padding: 2px 6px;
}
.completed-item__logi .material-symbols-rounded,
.completed-item__label .material-symbols-rounded {
  font-size: 13px !important;
  flex: none;
  color: var(--ink-faint);
}

.completed-item__logi .material-symbols-rounded { color: var(--teal); }

.completed-item__label {
  display: flex;
  align-items: center;
  gap: 5px;
  font-family: var(--font-mono);
  font-size: calc(12px * var(--ui-scale));
  font-weight: 600;
  color: var(--ink);
}

.completed-item__meta {
  margin-top: 3px;
  font-family: var(--font-mono);
  font-size: calc(10.5px * var(--ui-scale));
  color: var(--ink-faint);
}

.completed-item__print {
  flex-shrink: 0;
  background: var(--control);
  border: 1px solid var(--line-strong);
  color: var(--ink);
  border-radius: var(--radius-sm);
  padding: 7px 11px;
  font-family: var(--font-ui);
  font-size: calc(11.5px * var(--ui-scale));
  cursor: pointer;
  white-space: nowrap;
}

.completed-item__print:hover { background: var(--control-hover); }

.completed-item__print[data-action="download"],
.completed-item__print[data-action="print"] {
  padding: 7px 9px;
}

.link-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  width: 100%;
  background: none;
  border: none;
  color: var(--ink-faint);
  font-family: var(--font-ui);
  font-size: calc(11.5px * var(--ui-scale));
  cursor: pointer;
  padding: 4px;
}

.link-btn:hover { color: var(--ink-soft); }

.link-btn--danger { color: var(--danger, #E0413B); font-weight: 700; }
.link-btn--danger:hover { color: var(--danger, #E0413B); }

.text-action {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: none;
  border: none;
  padding: 0;
  font-family: var(--font-ui);
  font-size: calc(12px * var(--ui-scale));
  font-weight: 600;

  color: var(--interactive);
  cursor: pointer;
}

.text-action:hover { color: var(--iris-text); }

.btn-primary {
  width: 100%;
  padding: 13px;
  border: none;
  border-radius: 999px;
  background: var(--iris);
  color: var(--on-iris);
  font-family: var(--font-ui);
  font-size: calc(14px * var(--ui-scale));
  font-weight: 700;
  cursor: pointer;
  transition: background 0.12s ease;
}

.btn-primary:hover:not(:disabled)  { background: var(--iris-strong); }
.btn-primary:active:not(:disabled) { background: var(--iris-strong); }

.btn-primary:disabled {
  background: var(--control);
  color: var(--ink-faint);
  cursor: not-allowed;
}

.btn-row { display: flex; gap: 8px; }

.btn-secondary {
  flex: 1;
  padding: 9px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--control);
  color: var(--ink);
  font-family: var(--font-ui);
  font-size: calc(12.5px * var(--ui-scale));
  cursor: pointer;
}

.btn-secondary:hover { background: var(--control-hover); }
.btn-secondary:disabled { color: var(--ink-faint); cursor: not-allowed; }

.progress-wrap { margin-top: 0; }   

.progress-track {
  position: relative;
  height: 6px;
  border-radius: 3px;
  background: var(--control);
  overflow: hidden;
}

.progress-bar {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 40%;
  border-radius: 3px;
  overflow: hidden;          
  background: var(--iris);
  will-change: transform;
  animation: progress-slide 1.1s ease-in-out infinite;
}

@keyframes progress-slide {
  0%   { transform: translateX(-100%); }
  100% { transform: translateX(250%); }
}

.progress-bar.progress-bar--pct {
  width: var(--pct, 0%);
  transform: none;
  animation: none;
  transition: width 0.18s linear;
}

.progress-bar.progress-bar--full {
  width: 100%;
  transform: none;
  animation: none;
}

.progress-bar.progress-bar--pct::after,
.progress-bar.progress-bar--full::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .5), transparent);
  animation: progress-sheen 1.15s linear infinite;
  will-change: transform;
}

@keyframes progress-sheen {
  0%   { transform: translateX(-100%); }
  100% { transform: translateX(160%); }
}

.progress-bar.progress-bar--done {
  width: 100%;
  transform: none;
  background: var(--green);
  animation: none;
  transition: width 0.2s ease;
}

.progress-bar.progress-bar--done::after { display: none; }

.progress-foot {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.progress-label {
  display: block;
  margin-top: 5px;
  font-family: var(--font-mono);
  font-size: calc(11.5px * var(--ui-scale));
  color: var(--ink-soft);
}

.progress-foot { margin-top: 5px; }
.progress-foot .progress-label { margin-top: 0; }

.progress-pct {
  flex: none;
  font-family: var(--font-data);
  font-weight: 800;
  font-size: calc(11.5px * var(--ui-scale));

  color: var(--iris-text);
  font-variant-numeric: tabular-nums;
}

.debug-log {
  margin: 0;
  max-height: 180px;
  overflow-y: auto;

  background: var(--control);
  border: 1px solid var(--debug-log-line);
  border-radius: var(--radius);
  color: var(--ink-soft);
  font-family: var(--font-mono);
  font-size: calc(10px * var(--ui-scale));
  line-height: 1.55;
  padding: 10px;
  white-space: pre-wrap;
  word-break: break-all;
}

body.theme-dark .debug-log { background: #0C0E11; border-color: transparent; }

.debug-log .log-error { color: var(--coral); }

.sub-view {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: var(--bg);
  display: flex;
  flex-direction: column;
}

.sub-view[hidden] { display: none; }

.sub-view__header {
  display: flex;
  align-items: center;
  padding: 12px 14px;
  background: var(--card);
  border-bottom: 1px solid var(--line);
}

.back-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  border: none;
  background: none;
  color: var(--ink);
  font-family: var(--font-ui);
  font-size: calc(14px * var(--ui-scale));
  font-weight: 700;
  cursor: pointer;
  padding: 4px 6px;
}

.back-btn .material-symbols-rounded { font-size: 20px; }

.sub-view__body { flex: 1; overflow-y: auto; padding: 13px 14px; }

.sub-view__footer {
  text-align: center;
  padding: 14px 0 6px;
  font-family: var(--font-mono);
  font-size: calc(10.5px * var(--ui-scale));
  color: var(--ink-faint);
}

.fixed-footer {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 50;
  background: var(--sunken);
  border-top: 1px solid var(--line);
  box-shadow: var(--shadow-lift);
}

.fixed-footer__action {
  padding: 12px 14px 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.fixed-footer__completed { border-top: 1px solid var(--line); }

.fixed-footer__toggle {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 10px 14px;
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--font-ui);
  font-size: calc(12px * var(--ui-scale));
  color: var(--ink-soft);
}

.fixed-footer__toggle .material-symbols-rounded { font-size: 16px; color: var(--green); }
.fixed-footer__toggle .order-count { margin-left: auto; }
.fixed-footer__chevron { font-size: 18px; color: var(--ink-faint) !important; }

.fixed-footer__completed-body {
  max-height: 240px;
  overflow-y: auto;
  padding: 10px 14px 12px;
}

.app-footer {
  margin: 0;
  padding: 6px 16px 14px;
  text-align: center;
  font-size: calc(11.5px * var(--ui-scale));
  line-height: 1.65;
  color: var(--ink-faint);
}

.hint-text {
  margin: 8px 0 0;
  font-size: calc(11px * var(--ui-scale));
  line-height: 1.6;
  color: var(--ink-faint);
}

.hint-text--warn { color: var(--coral); }

:root {

  --preview-sheet-w: 200px;
  --preview-zoom: 1.52;   
}

.preview-frame {
  display: flex;
  justify-content: center;

  width: fit-content;
  margin-inline: auto;
  padding: 0;
  background: transparent;
  border-radius: 5px;

  box-shadow: 0 0 0 var(--preview-ring-w) var(--preview-ring), var(--preview-shadow);
  margin-bottom: 10px;
}

.preview-sheet {
  width: var(--preview-sheet-w);
  max-width: 100%;
  zoom: var(--preview-zoom);
  aspect-ratio: 100 / 150;
  background: #fff;
  color: #14161A;
  border-radius: 3px;

  padding: 0;
  font-family: var(--font-ui);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.preview-sheet.preview-sheet--picking {
  width: var(--preview-sheet-w);
  max-width: 100%;
  aspect-ratio: 210 / 297;
  overflow: auto;
  display: block;
}

@media (max-width: 400px) {
  .preview-sheet.preview-sheet--picking { width: 100%; aspect-ratio: auto; overflow: visible; }
}

.pk-table {
  width: 100%;
  min-width: 520px;
  border-collapse: collapse;
  font-size: calc(10px * var(--ui-scale));
}

.pk-table th {
  text-align: left;
  font-weight: 700;
  padding: 4px 6px;
  border-bottom: 1px solid #14161A;
  white-space: nowrap;
}

.pk-table td { padding: 4px 6px; border-bottom: 1px solid #E1E3E7; vertical-align: middle; }
.pk-table td.pk-qty { text-align: center; font-weight: 700; }
.pk-table img { width: 28px; height: 28px; object-fit: cover; border-radius: 4px; display: block; }

.pk-compact { display: none; }

@media (max-width: 400px) {
  .pk-table { display: none; }
  .pk-compact { display: block; }
}

.pk-compact-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 0;
  border-bottom: 1px solid #E1E3E7;
}

.pk-compact-item:last-child { border-bottom: none; }

.pk-compact-item img,
.pk-compact-item__noimg {
  width: 32px;
  height: 32px;
  border-radius: 4px;
  object-fit: cover;
  flex-shrink: 0;
  background: #EDEEF0;
}

.pk-compact-item__text { min-width: 0; }
.pk-compact-item__name { font-weight: 700; font-size: calc(12px * var(--ui-scale)); }
.pk-compact-item__meta { font-size: calc(10px * var(--ui-scale)); color: #5A6069; }

.ship-card {
  width: var(--preview-sheet-w);
  max-width: 100%;
  zoom: var(--preview-zoom);
  padding: 10px;
  background: #fff;
  color: #14161A;
  font-family: var(--font-ui);
  box-sizing: border-box;
  border-radius: 3px;
  
  overflow: hidden;
}

.ship-sheet {
  width: var(--preview-sheet-w); max-width: 100%;
  zoom: var(--preview-zoom); box-sizing: border-box;
  background: #FFFFFF; border-radius: 3px; overflow: hidden;
}
.ship-sheet .ship-card {
  width: var(--preview-sheet-w); zoom: var(--sheet-scale, .5);
  border-radius: 0; outline: 1px solid #C9CDD4;   
}
.ship-card--v3 { padding: 0; display: flex; flex-direction: column; line-height: 1.3; }

.sc--hct, .sc--family { flex-direction: row; }

.sc-mono { font-family: ui-monospace, Menlo, monospace; }
.sc-bars {
  background-image: repeating-linear-gradient(90deg,#171A24 0 1px,transparent 1px 3px,#171A24 3px 5px,transparent 5px 6px,#171A24 6px 7px,transparent 7px 10px);
}
.sc-bars--tall { height: 21.5px; }
.sc-bars--mid  { height: 20px; }
.sc-bars--hct  { height: 16.5px; }
.sc-bars--fam  { height: 18px; }
.sc-bars--7    { height: 24px; }
.sc-bars--g    { height: 25px; }

.sc-top {
  flex: none; background: var(--sc-accent, #6B7285); color: #fff;
  padding: 6px 10px; display: flex; align-items: center;
  justify-content: space-between; gap: 7px;
}
.sc-top--home { justify-content: flex-start; }
.sc-top__brand { font-size: 8.5px; font-weight: 700; letter-spacing: .02em; opacity: .92; }
.sc-top__mode { font-size: 11px; font-weight: 900; letter-spacing: .03em; }
.sc-top__mode--7 { font-size: 9px; }
.sc-top__mode--g { font-size: 9px; font-weight: 700; }
.sc-top__ch { font-family: ui-monospace, Menlo, monospace; font-size: 7.5px; opacity: .85; }
.sc-hd {
  font-family: ui-monospace, Menlo, monospace; font-size: 10px; font-weight: 600;
  letter-spacing: .06em; border: 1.2px solid rgba(255,255,255,.7);
  padding: 0 3px; line-height: 1.35;
}

.sc-cage {
  flex: none; padding: 9px 10px 8px; display: flex; align-items: flex-end;
  justify-content: space-between; gap: 8px; border-bottom: 1px solid #E7E8EF;
}
.sc-cage__box { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.sc-cage__lab { font-size: 6.5px; letter-spacing: .1em; color: #9BA0B4; }
.sc-cage__no {
  font-family: ui-monospace, Menlo, monospace; font-size: 22px; font-weight: 600;
  line-height: .95; letter-spacing: -.01em;
}
.sc-cage__right { display: flex; align-items: flex-end; gap: 7px; flex: none; }
.sc-stamp {
  font-family: ui-monospace, Menlo, monospace; font-size: 6.5px; color: #8A90A6;
  text-align: right; line-height: 1.4; flex: none;
}

.sc-hand { flex: none; padding: 8px 10px 0; display: flex; align-items: center; justify-content: space-between; gap: 7px; }
.sc-chip-dark { font-size: 9px; font-weight: 700; letter-spacing: .04em; color: #fff; background: #171A24; padding: 2.5px 6.5px; }
.sc-chip-dark--sm { font-size: 8px; letter-spacing: 0; padding: 1.5px 5px; }
.sc-party { display: flex; align-items: baseline; gap: 5px; }
.sc-party__lab { font-size: 6.5px; color: #9BA0B4; flex: none; }
.sc-party__no { font-family: ui-monospace, Menlo, monospace; font-size: 12.5px; font-weight: 600; line-height: 1; }
.sc-party__no--lg { font-size: 13px; }
.sc-party__name { font-size: 10px; font-weight: 700; line-height: 1; }

.sc-rows {
  flex: 0 1 auto; min-height: 0; overflow: hidden;
  margin: 9px 10px 0; padding-top: 7.5px; border-top: 1px solid #E7E8EF;
  display: flex; flex-direction: column; gap: 6px;
}
.sc-row { display: flex; gap: 6px; align-items: baseline; min-width: 0; }
.sc-row__lab { font-size: 6.5px; color: #9BA0B4; width: 33px; flex: none; }
.sc-row__lab--w { width: 36px; }
.sc-row__val { font-size: 7.5px; color: #2B3145; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sc-row__val--mute { color: #8A90A6; }

.sc-dest {
  flex: 1 1 auto; min-height: 0; overflow: hidden;
  margin: 10px 10px 0; padding-top: 9px; border-top: 1px solid #171A24;
  display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; min-width: 0;
}
.sc-dest__l { min-width: 0; display: flex; flex-direction: column; gap: 4px; }

.sc-dest--home { flex-direction: column; align-items: stretch; justify-content: flex-start; gap: 5px; }
.sc-dest__store { display: flex; align-items: baseline; gap: 6px; min-width: 0; }
.sc-dest__no { font-family: ui-monospace, Menlo, monospace; font-size: 12.5px; font-weight: 600; line-height: 1; flex: none; }
.sc-dest__name { font-size: 10px; font-weight: 700; line-height: 1.15; }
.sc-region { font-size: 25px; font-weight: 900; line-height: .9; flex: none; }
.sc-region--sm { font-size: 21.5px; line-height: .85; }
.sc-addr { font-size: 7.5px; line-height: 1.55; color: #2B3145; }
.sc-memo {
  font-size: 6.5px; line-height: 1.5; color: #4C5266;
  background: #F3F4F8; border-left: 2px solid #C9CCDA; padding: 3px 5px;
}

.sc-foot { flex: none; margin: 0 10px 10px; padding-top: 8px; display: flex; align-items: flex-end; justify-content: space-between; gap: 8px; }
.sc-code { display: flex; flex-direction: column; gap: 2.5px; min-width: 0; flex: 1 1 auto; }
.sc-code__no { font-family: ui-monospace, Menlo, monospace; font-size: 6.5px; letter-spacing: .06em; color: #2B3145; }
.sc-code__no--c { text-align: center; }
.sc-code__no--lg { font-size: 8px; letter-spacing: .1em; }
.sc-stampbox { font-size: 8px; font-weight: 700; padding: 2.5px 5px; border: 1.2px solid #171A24; white-space: nowrap; flex: none; }
.sc-note { font-size: 7.5px; font-weight: 500; color: #4C5266; white-space: nowrap; flex: none; }

.sc-spine {
  flex: none; width: 16px; background: var(--sc-accent, #6B7285); color: #fff;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 6px; font-size: 8px; font-weight: 700; line-height: 1;
}
.sc-spine--fam { gap: 7.5px; font-size: 8.5px; }
.sc-body { flex: 1 1 auto; display: flex; flex-direction: column; min-width: 0; }

.sc-hct-top { flex: none; padding: 7.5px 9px 6.5px; display: flex; align-items: flex-end; justify-content: space-between; gap: 7px; border-bottom: 1px solid #171A24; }
.sc-hct-nums { display: flex; align-items: baseline; gap: 7.5px; font-family: ui-monospace, Menlo, monospace; font-weight: 600; line-height: 1; }
.sc-hct-a { font-size: 19px; }
.sc-hct-c { font-size: 11px; }
.sc-hct-logo { font-size: 11.5px; font-weight: 900; letter-spacing: .04em; color: var(--sc-accent, #1E4FA3); flex: none; }
.sc-hct-wayb { flex: none; padding: 6.5px 9px 0; display: flex; align-items: center; justify-content: space-between; gap: 7px; }
.sc-hct-wayb__l { display: flex; align-items: center; gap: 6px; min-width: 0; }
.sc-hct-no { font-family: ui-monospace, Menlo, monospace; font-size: 8.5px; font-weight: 600; }
.sc-hct-meta { font-family: ui-monospace, Menlo, monospace; font-size: 6.5px; color: #8A90A6; text-align: right; line-height: 1.4; flex: none; }
.sc-hct-party { flex: none; margin: 7px 9px 0; padding-top: 6.5px; border-top: 1px solid #E7E8EF; display: flex; gap: 6.5px; }
.sc-hct-party--rcpt { flex: 1 1 auto; min-height: 0; overflow: hidden; }
.sc-vlab { flex: none; width: 9px; display: flex; flex-direction: column; gap: 3px; font-size: 6.5px; font-weight: 700; line-height: 1; color: #5B6178; }
.sc-hct-party__b { flex: 1 1 auto; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.sc-hct-line { display: flex; align-items: baseline; gap: 6.5px; }
.sc-hct-name { font-size: 11px; font-weight: 700; line-height: 1; }
.sc-hct-name--sm { font-size: 9px; }
.sc-hct-tel { font-family: ui-monospace, Menlo, monospace; font-size: 7px; color: #4C5266; }
.sc-hct-addr { font-size: 6.5px; line-height: 1.55; color: #2B3145; }
.sc-hct-order { font-family: ui-monospace, Menlo, monospace; font-size: 6.5px; color: #8A90A6; }
.sc-hct-foot { flex: none; padding: 6.5px 9px 8px; display: flex; align-items: flex-end; justify-content: space-between; gap: 8px; }
.sc-hct-foot .sc-bars { flex: 1 1 auto; }
.sc-hct-foot .sc-hct-nums { gap: 4px; flex: none; }
.sc-hct-b2 { font-size: 11.5px; }
.sc-hct-c2 { font-size: 8.5px; }

.sc-fam-ids { flex: none; padding: 7.5px 9px; display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; border-bottom: 1px solid #E7E8EF; }
.sc-fam-ids__l { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.sc--family .sc-row__lab { width: 35px; font-size: 6px; }
.sc--family .sc-row__val { font-size: 6.5px; }
.sc-region--fam { font-size: 16px; }
.sc-fam-bay { flex: none; padding: 7.5px 9px 0; display: flex; align-items: center; justify-content: space-between; gap: 7px; }
.sc-fam-bay__l { display: flex; align-items: baseline; gap: 6.5px; font-family: ui-monospace, Menlo, monospace; font-weight: 600; }
.sc-fam-seq { font-size: 12.5px; line-height: 1; }
.sc-fam-route {
  flex: none; margin: 7.5px 9px 0; padding: 6px 0;
  border-top: 1px solid #E7E8EF; border-bottom: 1px solid #E7E8EF;
  display: flex; align-items: center; justify-content: space-between; gap: 5px;
  font-size: 6.5px; color: #4C5266;
}
.sc-fam-route__l { display: flex; align-items: baseline; gap: 6px; font-family: ui-monospace, Menlo, monospace; }
.sc-fam-main { flex: 1 1 auto; min-height: 0; overflow: hidden; padding: 8px 9px 0; display: flex; flex-direction: column; gap: 6.5px; }
.sc-fam-brand { font-size: 8.5px; font-weight: 700; color: var(--sc-accent, #0E7A4B); }
.sc-fam-who { display: flex; align-items: flex-end; justify-content: space-between; gap: 8px; }
.sc-fam-who > div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.sc-fam-tailbox { align-items: flex-end; flex: none; }
.sc-fam-storebox { display: flex; flex-direction: column; gap: 2px; }
.sc-fam-lab { font-size: 6px; color: #9BA0B4; }
.sc-fam-name { font-size: 13px; font-weight: 700; line-height: 1.1; }
.sc-fam-tail { font-family: ui-monospace, Menlo, monospace; font-size: 11px; font-weight: 600; letter-spacing: .08em; line-height: 1; }
.sc-fam-store { font-size: 10px; font-weight: 700; line-height: 1.15; }
.sc-fam-bars { flex: none; padding: 8px 9px 9px; display: flex; flex-direction: column; gap: 6px; }
.sc--family .sc-code__no { letter-spacing: .08em; }

.sc-7-chip { flex: none; padding: 11.5px 10px 0; }
.sc-chip-line { font-size: 8px; font-weight: 500; padding: 1.5px 6px; border: 1px solid #D4D7E3; color: #4C5266; display: inline-block; }
.sc-chip-line--dash { border-style: dashed; border-color: #B6BAC9; color: #5B6178; }
.sc-7-name { flex: none; padding: 10px 10px 0; display: flex; flex-direction: column; gap: 2.5px; }
.sc-lab { font-size: 6.5px; letter-spacing: .06em; color: #9BA0B4; }
.sc-bigname { font-size: 16px; font-weight: 700; line-height: 1.15; }
.sc-bigname--sm { font-size: 15px; }
.sc-7-rows { flex: 1 1 auto; min-height: 0; margin: 10px 10px 0; padding-top: 8px; border-top: 1px solid #E7E8EF; display: flex; flex-direction: column; gap: 6.5px; }
.sc-7-store { font-size: 9px; font-weight: 700; }
.sc-7-bars { flex: none; margin: 0 10px 10px; padding-top: 8px; display: flex; flex-direction: column; gap: 3px; }

.sc-g-chip { flex: none; padding: 10px 10px 0; display: flex; align-items: center; justify-content: space-between; gap: 7px; }
.sc-paper { font-family: ui-monospace, Menlo, monospace; font-size: 6.5px; letter-spacing: .06em; color: #9BA0B4; flex: none; }
.sc-g-rows { flex: 0 1 auto; min-height: 0; overflow: hidden; margin: 9px 10px 0; padding-top: 8px; border-top: 1px solid #E7E8EF; display: flex; flex-direction: column; gap: 6.5px; }

.sc-g-blank { flex: 1 1 auto; min-height: 0; overflow: hidden; margin: 10px 10px 0; padding-top: 9px; border-top: 1px dashed #DEE0EA; display: flex; flex-direction: column; justify-content: center; gap: 5px; }
.sc-g-blank__t { font-size: 7.5px; font-weight: 700; color: #4C5266; }
.sc-g-blank__lines { display: flex; flex-direction: column; gap: 4px; }
.sc-g-blank__lines i { display: block; height: 5px; background: #EDEEF3; }
.sc-g-blank__hint { font-size: 6.5px; line-height: 1.55; color: #9BA0B4; }.preview-sheet .p-label { font-size: 7px; color: #5A6069; margin-bottom: 1px; }
.preview-sheet .p-value { font-size: 9px; font-weight: 700; word-break: break-word; }
.preview-sheet .p-orderno { font-size: 13px; font-weight: 700; word-break: break-word; }
.preview-sheet hr { border: none; border-top: 1px solid #E1E3E7; margin: 2px 0; width: 100%; }
.preview-sheet .p-cols { display: flex; gap: 8px; }
.preview-sheet .p-cols > div { flex: 1; min-width: 0; }

.preview-sheet .p-table-head {
  display: flex;
  justify-content: space-between;
  font-size: 7px;
  font-weight: 700;
  border-bottom: 1px solid #14161A;
  padding-bottom: 2px;
}

.preview-sheet .p-table-row { display: flex; justify-content: space-between; gap: 4px; font-size: 6.5px; color: #5A6069; }
.preview-sheet .p-note { font-size: 6px; color: #5A6069; line-height: 1.4; flex: 1; }
.preview-sheet .p-line { font-size: 8px; line-height: 1.3; word-break: break-word; }

.checkbox-list { display: flex; flex-direction: column; gap: 6px; margin-bottom: 8px; }
.checkbox-item { display: flex; align-items: center; gap: 8px; font-size: calc(13px * var(--ui-scale)); cursor: pointer; }
.panel--action { border: none; background: transparent; padding: 4px 0 12px; }

.topbar {
  position: fixed;
  left: 0;
  right: 0;
  top: 0;
  height: 44px;
  z-index: 120;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 13px;
  background: var(--rail);
}

.wordmark {
  display: inline-flex;
  align-items: center;
  font-family: "Inter", var(--font-data);
  font-weight: 700;
  font-size: 20px;
  letter-spacing: -0.04em;
  color: var(--ink-title);
}

.wordmark__mk {
  height: 20px;
  width: 17px;
  margin-left: 1px;
  display: block;
  flex: none;
}

.wordmark__mk--dark { display: none; }
body.theme-dark .wordmark__mk--light { display: none; }
body.theme-dark .wordmark__mk--dark { display: block; }

.topbar__sync {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 5px;
}

.topbar__sync-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--ink-faint);
  flex: none;
}

.topbar__sync-dot--on { background: var(--green); }

.topbar__sync-text {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--ink-faint);
}

.topbar__settings {
  width: 24px;
  height: 24px;
  flex: none;
  border: none;
  padding: 0;
  background: none;
  color: var(--ink-faint);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: color 0.12s ease;
}

.topbar__settings .material-symbols-rounded { font-size: 17px; }
.topbar__settings:hover { color: var(--ink-soft); }

.theme-switch {
  position: relative;
  margin-left: auto;
}

.icon-row {
  position: fixed;
  left: 0;
  right: 0;
  top: 44px;
  height: 38px;
  z-index: 119;
  display: flex;
  background: var(--rail);
  border-bottom: 1px solid var(--line);
}

.icon-row__btn {
  flex: 1;
  min-width: 0;
  position: relative;
  border: none;
  border-bottom: 3px solid transparent;
  background: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  
  color: var(--text-3);
  cursor: pointer;
  overflow: hidden;
  white-space: nowrap;
  transition: flex 0.22s ease, color 0.12s ease, background 0.12s ease;
}

.icon-row__btn .material-symbols-rounded {
  font-size: 20px; flex: none;
  font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 20;
}
.icon-row__btn--active .material-symbols-rounded { font-variation-settings: 'FILL' 1, 'wght' 400, 'GRAD' 0, 'opsz' 20; }
.icon-row__btn:hover { color: var(--ink-soft); }

.tool-mark {

  width: 32px; height: 32px; flex: none; display: block;
}

.icon-row__label {
  display: none;
  font-size: calc(11px * var(--ui-scale));
  font-weight: 700;
  white-space: nowrap;
}

.icon-row__btn--active {
  flex: 2.6;
  color: var(--iris-text);
  border-bottom-color: var(--iris-text);
}

.icon-row__btn--active .icon-row__label { display: inline; }

.icon-row__btn--empty {
  flex: 1;
  margin: 7px 6px;
  border: 1px dashed var(--line-strong);
  border-radius: 6px;
  cursor: default;
}

.icon-row__reminder {
  position: absolute;
  top: 5px;
  right: calc(50% - 13px);
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--amber);
}

.tool[hidden] { display: none; }

.pane[hidden] { display: none; }

.tool-header {
  background: var(--card);
  border-bottom: 1px solid var(--line);
  padding: 13px 14px 11px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.tool-header__row { display: flex; align-items: center; gap: 9px; }

.tool-header__name {
  flex: 1;
  min-width: 0;
  font-family: var(--font-data);
  font-size: calc(15px * var(--ui-scale));
  font-weight: 800;
  color: var(--ink);
}

.tool-empty {
  padding: 40px 22px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.tool-empty .material-symbols-rounded { font-size: 30px; color: var(--ink-faint); }
.tool-empty__title { font-size: calc(14px * var(--ui-scale)); font-weight: 700; color: var(--ink); }
.tool-empty__text { font-size: calc(12.5px * var(--ui-scale)); line-height: 1.7; color: var(--ink-faint); }

.preview-sheet .ph { height: 4px; width: 100%; background: #C5C9CF; flex: none; }
.preview-sheet .ph--title { height: 6px; width: 72%; background: #14161A; }
.preview-sheet .ph--code { background: repeating-linear-gradient(90deg, #14161A 0 2px, transparent 2px 4px); }
.preview-sheet .ph--rule { height: 1px; background: #E1E3E7; }
.preview-sheet .ph--faint { background: #EDEEF0; }

.footer-recent { border-top: 1px solid var(--line); }

.footer-recent__toggle {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 9px 14px;
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--font-ui);
  font-size: calc(12px * var(--ui-scale));
  color: var(--ink-soft);
}

.footer-recent__toggle .material-symbols-rounded { color: var(--green); }
.footer-recent__toggle .order-count { margin-left: auto; }

.footer-recent__chevron {
  font-size: 18px !important;
  color: var(--ink-faint) !important;
  transition: transform 0.15s ease;
}

.footer-recent--collapsed .footer-recent__chevron { transform: rotate(-90deg); }
.footer-recent--collapsed .footer-recent__body { display: none; }

.footer-recent__body {
  max-height: 168px;
  overflow-y: auto;
  padding: 0 14px 10px;
}

.recent-list {
  list-style: none;
  margin: 0 0 6px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.recent-item, .pw-item { position: relative; }

.hover-pop {

  position: fixed;
  z-index: 2147483000;   

  background: #22262D;
  color: #F2F4F7;
  border: 1px solid #22262D;
  border-radius: var(--radius);
  padding: 9px 11px;
  box-shadow: 0 12px 30px rgba(20, 22, 26, .32);
  opacity: 0; visibility: hidden;
  transition: opacity .12s ease;
  pointer-events: none;   
}
.recent-item:hover > .hover-pop,
.pw-item:hover > .hover-pop { opacity: 1; visibility: visible; }

body.theme-dark .hover-pop {
  background: #E8EBEF;
  color: #14161A;
  border-color: #E8EBEF;
  box-shadow: 0 12px 30px rgba(0, 0, 0, .55);
}
body.theme-dark .hover-pop__line .material-symbols-rounded { color: #6B7079; }

.hover-pop__line {
  display: flex; align-items: flex-start; gap: 7px;
  font-size: calc(11.5px * var(--ui-scale));
  line-height: 1.55;

  color: inherit;
  padding: 2px 0;
  word-break: break-word;
}
.hover-pop__line .material-symbols-rounded {
  font-size: 14px !important;

  color: #949BA5;
  flex: none;
  margin-top: 1px;
}

.recent-item {
  display: flex;
  align-items: center;
  gap: 9px;
  background: var(--control);
  border-radius: var(--radius);
  padding: 7px 8px 7px 10px;
}

.recent-item__label {
  flex: 1;
  min-width: 0;
  font-family: var(--font-mono);
  font-size: calc(11.5px * var(--ui-scale));
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.recent-item__time {
  flex: none;
  font-family: var(--font-mono);
  font-size: calc(10.5px * var(--ui-scale));
  color: var(--ink-faint);
}

.recent-item__print {
  flex: none;
  background: none;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  padding: 4px 9px;
  font-family: var(--font-ui);
  font-size: calc(11px * var(--ui-scale));
  color: var(--ink);
  cursor: pointer;
}

.recent-item__print:hover { background: var(--control-hover); }

.recent-item__download { padding: 4px 6px; }

.shipfee-total {
  display: flex;
  flex-direction: column;
  gap: 3px;
  margin-top: 10px;
  padding: 11px 13px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
}

.shipfee-total__main {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.shipfee-total__label {
  font-size: calc(12px * var(--ui-scale));
  color: var(--ink);
  font-weight: 600;
}

.result-bar {
  padding: 10px 13px 13px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.result-bar__main { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }

.result-bar__label {
  display: none; 
}

.result-bar__margin {
  font-family: var(--font-data);
  font-size: calc(28px * var(--ui-scale));
  font-weight: 800;
  line-height: 1.1;
  color: var(--green-ink);
  flex: none;
}

.result-bar__margin--neg { color: var(--coral); }

.result-bar__meta {
  display: flex;
  gap: 14px;
  font-size: calc(13px * var(--ui-scale));
  color: var(--ink-faint);
}

.result-bar__meta b { font-family: var(--font-data); font-size: calc(15px * var(--ui-scale)); font-weight: 700; color: var(--ink); }

.preview-caption {
  font-family: var(--font-mono);
  font-size: calc(10.5px * var(--ui-scale));
  color: var(--ink-faint);
  margin: 0 0 5px;
}

.quota__track {
  height: 4px;
  border-radius: 2px;
  background: var(--control);
  overflow: hidden;
}

.quota__fill {
  display: block;
  height: 100%;
  border-radius: 2px;
  background: var(--iris);
  transition: width 0.2s ease;
}

.quota__fill--over { background: var(--coral); }

.shipfee-total__meta {
  font-size: calc(11px * var(--ui-scale));
  color: var(--ink-faint);
}

.shipfee-total__over {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 4px;
  font-size: calc(11px * var(--ui-scale));
  color: var(--coral-ink);
}
.shipfee-total__over .material-symbols-rounded {
  font-size: calc(13px * var(--ui-scale));
  flex: none;
}

.shipfee-total__amount {
  font-family: var(--font-data);
  font-size: calc(20px * var(--ui-scale));
  font-weight: 800;
  color: var(--iris-strong);
}

.shipfee-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.shipfee-stat {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 10px 6px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.shipfee-stat__label {
  font-size: calc(11px * var(--ui-scale));
  color: var(--ink-faint);
}

.shipfee-stat__num {
  font-family: var(--font-data);
  font-size: calc(17px * var(--ui-scale));
  font-weight: 800;
  color: var(--ink);
}

.shipfee-stat__amount {
  font-family: var(--font-data);
  font-size: calc(12px * var(--ui-scale));
  font-weight: 600;
  color: var(--iris-strong);
}

.shipfee-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.shipfee-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 2px;
  border-top: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: calc(11.5px * var(--ui-scale));
}

.shipfee-item:first-child { border-top: none; }

.shipfee-item__order { color: var(--ink-soft); }

.shipfee-item__amount { color: var(--ink); font-weight: 600; }

.shipfee-item__amount--adjusted { color: var(--iris-strong); }   

.shipfee-list__empty {
  padding: 10px 2px;
  font-size: calc(12px * var(--ui-scale));
  color: var(--ink-faint);
  text-align: center;
}

  .field-row-inline { display: flex; gap: 8px; align-items: stretch; }
  .field-row-inline .text-input { flex: 1; min-width: 0; }
  .field-row-inline .chip-group { flex: 0 0 auto; width: auto; }
  .field-row-inline .chip-group .chip { flex: none; padding: 8px 10px; }

  .amount-input {
    
    width: 68px; flex: none; text-align: right; padding: 7px 8px;
    border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
    background: var(--card); color: var(--ink);
    font-family: var(--font-data); font-size: calc(12.5px * var(--ui-scale));
  }

  .setting-row .setting-row__label { flex: 1; }
  .setting-row .amount-input + .setting-row__unit,
  .setting-row__unit { color: var(--ink-faint); font-size: calc(11.5px * var(--ui-scale)); margin-left: 4px; }

  .scenario-card {
    background: var(--card); border: 1px solid var(--line); border-left: 3px solid var(--line);
    border-radius: var(--radius-xl); padding: 12px 13px; margin-bottom: 9px;
  }
  .scenario-card:last-child { margin-bottom: 0; }

  .scenario-card--plan1 { border-left-color: var(--teal); }
  .scenario-card--plan2 { border-left-color: var(--blue); }

  .scenario-card__head { display: flex; align-items: center; gap: 8px; margin-bottom: 9px; }
  .scenario-card__icon {
    font-size: 15px; width: 26px; height: 26px; border-radius: 8px;
    display: flex; align-items: center; justify-content: center; flex: none;
    background: var(--control); color: var(--ink-soft);
  }
  
  .scenario-card--promo .scenario-card__icon { background: rgba(232,163,61,0.16); color: var(--iris-strong); }
  body.theme-dark .scenario-card--promo .scenario-card__icon { color: var(--amber); }

  .scenario-card__margin {
    margin-left: auto;
    font-family: var(--font-data); font-weight: 800; font-size: calc(12.5px * var(--ui-scale));
    padding: 3px 9px; border-radius: 999px; background: var(--green-wash); color: var(--green-ink);
  }
  .scenario-card__margin--neg { background: var(--coral-wash); color: var(--coral-ink); }

  .scenario-tag-row {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
    gap: 6px; padding-bottom: 8px;
  }
  .scenario-tag {
    display: flex; flex-direction: column; align-items: center; gap: 3px;
    border: 1px solid transparent; background: none; border-radius: var(--radius);
    padding: 7px 2px; cursor: pointer;
  }
  .scenario-tag:hover { background: var(--control); }
  .scenario-tag--active { border-color: var(--iris-strong); background: var(--card); }
  body.theme-dark .scenario-tag--active { border-color: var(--iris); }

  .scenario-tag__day { font-size: calc(10.5px * var(--ui-scale)); color: var(--ink-soft); }
  .scenario-tag__plan {
    font-size: calc(11px * var(--ui-scale)); font-weight: 700; padding: 1px 7px; border-radius: 999px;
  }

  .scenario-tag__plan.scenario-card--plan1 { background: var(--teal-wash); color: var(--teal-strong); }
  .scenario-tag__plan.scenario-card--plan2 { background: var(--blue-wash); color: var(--iris-text); }

  .scenario-card__profit-row { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 8px; }
  .scenario-card__profit-label { font-size: calc(11.5px * var(--ui-scale)); color: var(--ink-faint); }
  .scenario-card__profit {
    font-family: var(--font-data); font-weight: 800; font-size: calc(21px * var(--ui-scale)); color: var(--ink);
  }
  .scenario-card__profit--neg { color: var(--coral); }
  .scenario-card__price { font-size: calc(11.5px * var(--ui-scale)); color: var(--ink-soft); }

  .scenario-card__details { margin-top: 2px; }
  .scenario-card__details summary {
    cursor: pointer; list-style: none; display: flex; align-items: center; gap: 4px;
    font-size: calc(11.5px * var(--ui-scale)); color: var(--teal); font-weight: 600;
  }
  .scenario-card__details summary::-webkit-details-marker { display: none; }
  .scenario-card__details summary .material-symbols-rounded { font-size: 15px; transition: transform 0.15s ease; }
  .scenario-card__details[open] summary .material-symbols-rounded { transform: rotate(180deg); }

  .scenario-card__lines { margin-top: 8px; padding-top: 8px; border-top: 1px dashed var(--line); }
  .scenario-card__line {
    display: flex; justify-content: space-between; padding: 3px 0;
    font-size: calc(12px * var(--ui-scale));
  }
  .scenario-card__line span:first-child { color: var(--ink-soft); }
  .scenario-card__line span:last-child { font-family: var(--font-data); color: var(--ink); }
  .scenario-card__line--credit span:last-child { color: var(--green-ink); }
  .scenario-card__line--total { border-top: 1px solid var(--line); margin-top: 4px; padding-top: 6px; font-weight: 700; }

  .compare-table { width: 100%; border-collapse: collapse; }
  .compare-table th, .compare-table td {
    font-size: calc(11.5px * var(--ui-scale)); padding: 7px 6px; text-align: right;
    border-bottom: 1px solid var(--line);
  }
  .compare-table th:first-child, .compare-table td:first-child { text-align: left; color: var(--ink-soft); }
  .compare-table th { color: var(--ink-faint); font-weight: 500; font-family: var(--font-mono); font-size: calc(10px * var(--ui-scale)); white-space: nowrap; }
  .compare-table td { font-family: var(--font-data); color: var(--ink); }
  .compare-table tr:last-child td { border-bottom: none; }
  .compare-table td.is-profit-pos { color: var(--green-ink); font-weight: 700; }
  .compare-table td.is-profit-neg { color: var(--coral); font-weight: 700; }

  .compare-table__dot {
    display: inline-block; width: 6px; height: 6px; border-radius: 50%; margin-right: 6px;
  }
  .compare-table__dot--plan1 { background: var(--teal); }
  .compare-table__dot--plan2 { background: var(--blue); }

.pw-item {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 10px 4px;
  border-top: 1px solid var(--line);
  cursor: pointer;
}

.pw-item:first-child { border-top: none; }
.pw-item:hover { background: var(--control); }

.pw-item__confirm { display: none; }

.pw-item.is-confirming { flex-wrap: wrap; }

.pw-item.is-confirming .pw-item__icons { visibility: hidden; }

.pw-item.is-confirming .pw-item__confirm {
  display: flex;
  flex: 0 0 100%;
  flex-wrap: wrap;          
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  padding: 8px 10px;
  border-radius: 8px;
  background: var(--control);
}

.pw-item__confirm-q {

  flex: 0 0 100%;
  min-width: 0;             
  font-size: calc(11.5px * var(--ui-scale));
  color: var(--ink);
}

.pw-item__confirm-no,
.pw-item__confirm-yes {
  flex: 0 0 auto;
  box-sizing: border-box;   
  font-family: inherit;
  font-size: calc(11.5px * var(--ui-scale));
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 999px;
  cursor: pointer;
}

.pw-item__confirm-no {
  margin-left: auto;        
  background: transparent;
  border: 1px solid var(--line-strong);
  color: var(--ink-soft);
}

.pw-item__confirm-yes {
  background: var(--coral-wash);
  border: 1px solid var(--coral-line);
  color: var(--coral-ink);
}

.pw-item__thumb {
  width: 44px;
  height: 44px;
  flex: none;
  border-radius: var(--radius-sm);
  background-color: var(--control);
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
}

.pw-item__body { flex: 1; min-width: 0; }

.pw-item__title {
  font-size: calc(12px * var(--ui-scale));
  color: var(--ink-list);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pw-item__title--2line {
  white-space: normal;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  line-height: 1.35;
}

.pw-item__shop {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 3px;
  min-width: 0;
}

.pw-item__shop-logo {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  flex: none;
  background-color: var(--control);
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
}

.pw-item__shop-name {
  font-size: calc(10.5px * var(--ui-scale));
  color: var(--ink-faint);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

.pw-item__price-row {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin-top: 3px;
}

.pw-item__price {
  font-family: var(--font-data);
  font-weight: 800;
  font-size: calc(15px * var(--ui-scale));
  color: var(--ink-title);
}

.pw-item__delta { font-family: var(--font-mono); font-size: calc(11px * var(--ui-scale)); }
.pw-item__delta--down { color: var(--teal); }
.pw-item__delta--up   { color: var(--coral); }
.pw-item__delta--flat { color: var(--ink-faint); }

.pw-item__spec {
  display: inline-block;
  align-self: flex-start;
  margin: 4px 0 1px;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: calc(11px * var(--ui-scale));
  line-height: 1.6;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  background: var(--iris-tint);
  color: var(--iris-text);
}
.pw-item__spec--oos {
  background: var(--peridot-tint);
  color: var(--peridot-text);
}
.pw-item__spec--gone {
  background: var(--crimson-tint);
  color: var(--crimson-text);
}

.pw-item__trend-locked {
  display: block;
  margin-top: 4px;
  font-size: calc(10.5px * var(--ui-scale));
  line-height: 1.5;
  color: var(--text-3);
}

.pw-item__spark { display: block; width: 100%; height: 28px; margin-top: 6px; overflow: visible; }

.pw-item__sparkbox { margin-top: 6px; position: relative; }
.pw-item__sparkbox .pw-item__spark { margin-top: 0; height: 44px; }
.pw-item__spark-ab {
  position: absolute; top: 3px; right: 0; bottom: 3px;
  display: flex; flex-direction: column; justify-content: space-between;
  align-items: flex-end; text-align: right;
  font-family: 'IBM Plex Mono', monospace; font-size: 10.5px;
  color: var(--ink-faint); line-height: 1.2;
  pointer-events: none;   
}

.pw-item__spark-ab[data-flat="1"] { justify-content: center; }

.pw-item__delta--fail { color: var(--warn-ink); }

.pw-item__side {
  flex: none;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}

.pw-item__icons { display: flex; gap: 2px; }
.pw-item__icons .icon-btn { width: 24px; height: 24px; }
.pw-item__icons .icon-btn .material-symbols-rounded { font-size: 15px; }

.pw-item__handle {
  flex: none;
  display: flex;
  align-items: center;
  color: var(--ink-dim);
  cursor: grab;
  margin-top: 4px;
}
.pw-item__handle .material-symbols-rounded { font-size: 16px; }
.pw-item--dragging { opacity: 0.4; }

.pw-group__menu { position: relative; }

.pw-group__menu-pop {
  position: absolute;
  right: 0;
  top: 26px;
  z-index: 20;
  min-width: 128px;
  background: var(--popover);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  padding: 4px;
  box-shadow: var(--shadow-popover);
}

.pw-item__menu-item {
  padding: 6px 8px;
  font-size: calc(11.5px * var(--ui-scale));
  color: var(--ink-list);
  border-radius: var(--radius-sm);
  cursor: pointer;
  white-space: nowrap;
}
.pw-item__menu-item:hover { background: var(--control-hover); }

.pw-group {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin-top: 10px;
  overflow: hidden;
}

.pw-group__head {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 8px;
  background: var(--pw-group-bg, var(--control));
  color: var(--pw-group-ink, var(--ink-title));
}

.pw-group__handle,
.pw-group__chevron,
.pw-group__menu-btn { color: inherit; }

.pw-group__head .icon-btn { background: transparent; }
.pw-group__head .icon-btn:hover {
  background: color-mix(in srgb, var(--pw-group-ink, var(--ink-soft)) 14%, transparent);
}

.pw-group__handle {
  flex: none;
  display: flex;
  align-items: center;
  cursor: grab;
}
.pw-group__handle .material-symbols-rounded { font-size: 16px; }

.pw-group__chevron {
  flex: none;
  display: flex;
  align-items: center;
  cursor: pointer;
  transition: transform 0.15s ease;
}
.pw-group__chevron .material-symbols-rounded { font-size: 18px; }
.pw-group[data-collapsed="1"] .pw-group__chevron { transform: rotate(-90deg); }

.pw-group__name {
  flex: 1;
  min-width: 0;
  font-size: calc(12px * var(--ui-scale));
  font-weight: 700;
  color: inherit;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pw-group__count {
  flex: none;
  font-family: var(--font-mono);
  font-size: calc(10.5px * var(--ui-scale));
  color: inherit;
  opacity: 0.75;
}

.pw-group__items { padding: 0 8px 8px; background: var(--card); }
.pw-group[data-collapsed="1"] .pw-group__items { display: none; }
.pw-group__items .pw-item:first-child { border-top: none; }

.pw-group__empty {
  margin: 6px 0;
  padding: 14px 8px;
  text-align: center;
  font-size: calc(11px * var(--ui-scale));
  color: var(--ink-faint);
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-sm);
}

.pw-add-group {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
  margin-bottom: 10px;
  padding: 9px 10px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  background: none;
  color: var(--ink-soft);
  font-size: calc(12px * var(--ui-scale));
  cursor: pointer;
}
.pw-add-group:hover { background: var(--control); }
.pw-add-group .material-symbols-rounded { font-size: 17px; }

.pw-add-group-form {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 10px;
}
.pw-add-group-form .text-input {
  flex: 1;
  min-width: 0;          
  margin: 0;
}
.pw-add-group-ok,
.pw-add-group-cancel {
  flex: none;
  box-sizing: border-box;  
  font-family: inherit;
  font-size: calc(11.5px * var(--ui-scale));
  font-weight: 600;
  padding: 7px 12px;
  border-radius: 999px;
  cursor: pointer;
}

.pw-add-group-ok {
  background: var(--iris);
  border: 1px solid var(--iris);
  color: var(--on-iris);
}
.pw-add-group-cancel {
  background: transparent;
  border: 1px solid var(--line-strong);
  color: var(--ink-soft);
}

.pw-group-limit { margin: -4px 0 10px; }

.pw-group__rename {
  flex: 1;
  min-width: 0;
  margin: 0;
  padding: 3px 7px;
  font-size: calc(12px * var(--ui-scale));
  font-weight: 700;
}

.pw-group__confirm { display: none; }
.pw-group.is-confirming .pw-group__confirm {
  display: flex;
  flex-wrap: wrap;         
  align-items: center;
  gap: 8px;
  padding: 9px 10px;
  background: var(--card);
  border-top: 1px solid var(--line);
}
.pw-group__confirm-q {

  flex: 0 0 100%;
  min-width: 0;
  overflow-wrap: anywhere;  
  font-size: calc(11.5px * var(--ui-scale));
  color: var(--ink);
}
.pw-group__confirm-no,
.pw-group__confirm-yes {
  flex: 0 0 auto;
  box-sizing: border-box;
  font-family: inherit;
  font-size: calc(11.5px * var(--ui-scale));
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 999px;
  cursor: pointer;
}
.pw-group__confirm-no {
  margin-left: auto;
  background: transparent;
  border: 1px solid var(--line-strong);
  color: var(--ink-soft);
}

.pw-group__confirm-yes {
  background: var(--coral-wash);
  border: 1px solid var(--coral-line);
  color: var(--coral-ink);
}

.pw-gate {

  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: calc(7px * var(--ui-scale));
  padding: calc(22px * var(--ui-scale)) calc(16px * var(--ui-scale));
  background: var(--iris-tint);
  border: 1px solid transparent;
}
.pw-gate__icon { font-size: calc(24px * var(--ui-scale)); color: var(--iris-text); }
.pw-gate__title { font-size: calc(13px * var(--ui-scale)); font-weight: 700; color: var(--ink); }

.pw-gate__text { font-size: calc(11.5px * var(--ui-scale)); line-height: 1.7; color: var(--ink-soft); }

.pw-color-row {
  display: flex;
  gap: 7px;
  padding: 8px 6px;
}

.pw-color-swatch {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid transparent;
  cursor: pointer;
  padding: 0;
}

.pw-color-swatch[data-active="1"] { border-color: var(--ink-soft); }

.pw-group__menu-sep { border-top: 1px solid var(--line); margin: 4px 0; }

.pw-item__meta {
  font-family: var(--font-mono);
  font-size: calc(10px * var(--ui-scale));
  color: var(--ink-faint);
  white-space: nowrap;
}

.pw-item__delete { width: 26px; height: 26px; }
.pw-item__delete .material-symbols-rounded { font-size: 16px; }

.platform-select { position: relative; display: flex; align-items: center; gap: 2px; }

.platform-select__shell {
  display: inline-flex; align-items: center; gap: 1px;
  border-radius: 999px; padding: 1px 3px 1px 1px; cursor: pointer;
  box-shadow: inset 0 0 0 1px currentColor;
  transition: background .12s ease;
}

.platform-select__shell[data-state="connected"] { background: var(--green-wash); color: var(--green-ink); }
.platform-select__shell[data-state="waiting"]   { background: var(--control);    color: var(--ink-soft); }
.platform-select__shell[data-state="mismatch"]  { background: var(--iris-tint);  color: var(--iris); }

.platform-select__shell .status-pill { background: none; }
.platform-select__shell:hover { background: var(--control-hover); }

.platform-select__shell[data-state="mismatch"] { cursor: default; }
.platform-select__shell[data-state="mismatch"]:hover { background: var(--iris-tint); }
.platform-select__shell[data-state="mismatch"] .platform-select__toggle { display: none; }

.platform-select__toggle {
  border: 0; background: none; color: inherit;
  width: 20px; height: 20px; padding: 0; border-radius: 999px;
  display: flex; align-items: center; justify-content: center; cursor: pointer;
  opacity: .62;
}
.platform-select__toggle .material-symbols-rounded { font-size: 16px; }
.platform-select__shell:hover .platform-select__toggle { opacity: 1; }

.platform-select__toggle[aria-expanded="true"] .material-symbols-rounded { transform: rotate(180deg); }

.platform-select__menu {
  position: absolute; top: calc(100% + 6px); right: 0; z-index: 60;
  min-width: 168px; padding: 4px;
  background: var(--popover); border: 1px solid var(--line);
  border-radius: var(--radius-md); box-shadow: var(--shadow-popover);
}

.platform-select__menu[hidden] { display: none !important; }

.platform-select__menu .platform-switcher {
  flex-direction: column; align-items: stretch;
  gap: 1px; padding: 0; background: none; border-radius: 0; overflow: visible;
}
.platform-select__menu .platform-pill {
  text-align: left; justify-content: flex-start; border-radius: 7px; padding: 8px 10px;
}

.platform-switcher {
  display: flex;
  gap: 4px;
  background: var(--control);
  border-radius: var(--radius);
  padding: 3px;

  overflow-x: auto;

  overflow-y: hidden;
  overscroll-behavior-x: contain;   
  scrollbar-width: none;
}
.platform-switcher::-webkit-scrollbar { display: none; }
.platform-pill {

  flex: 1 0 auto;
  white-space: nowrap;
  padding-left: 8px;
  padding-right: 8px;
  
  border: 1px solid transparent;
  background: transparent;
  border-radius: var(--radius-sm);
  padding: 5px 0;
  font-size: 12px;
  color: var(--ink-soft);
  cursor: pointer;
}
.platform-pill:hover:not(.platform-pill--active):not(:disabled) { color: var(--ink); }

.platform-pill--active {
  background: var(--iris-tint);

  color: var(--iris-text);
  border-color: var(--iris-line);
  font-weight: 600;
}
.platform-pill--add {
  flex: 0 0 28px;
  color: var(--ink-soft);
  cursor: not-allowed;
  opacity: 0.6;
}
.platform-switcher__hint {
  font-size: 10.5px;
  color: var(--ink-soft);
  margin: 6px 2px 10px;
}

.pk-row > input.switch {
  flex: 0 0 auto;
  margin-left: 4px;
}

.order-list.order-list--tall {
  max-height: 700px;
}

.date-input {
  background: var(--card);   
  color: var(--ink);
  font-family: var(--font-ui);
  font-size: calc(13px * var(--ui-scale));
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 4px 6px;
  cursor: pointer;
  color-scheme: dark;
}
body:not(.theme-dark) .date-input { color-scheme: light; }

.date-range-trigger {
  display: flex;
  align-items: center;

  justify-content: flex-end;
  gap: 6px;
  cursor: pointer;
}

.date-range-panel {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 30;

  width: min(320px, 100%);
  background: var(--popover);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-popover);
  overflow: hidden;
}

.date-range-panel__body {
  display: flex;
}

.date-range-panel__presets {
  flex: 0 0 92px;
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--line);
  padding: 6px 0;
  max-height: 260px;
  overflow-y: auto;
}

.date-range-preset {
  border: none;
  background: transparent;
  text-align: left;
  padding: 7px 10px;
  font-size: calc(12px * var(--ui-scale));
  color: var(--ink);
  cursor: pointer;
}
.date-range-preset:hover { background: var(--control); }
.date-range-preset--active { background: var(--iris-tint); color: var(--iris); font-weight: 600; }

.date-range-panel__calendar {
  flex: 1;
  padding: 8px 10px 10px;
  min-width: 0;
}

.date-range-calendar__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: calc(12.5px * var(--ui-scale));
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 6px;
}
.date-range-calendar__header .icon-btn { width: 24px; height: 24px; }

.date-range-calendar__weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  text-align: center;
  font-size: 10.5px;
  color: var(--ink-faint);
  margin-bottom: 2px;
}

.date-range-calendar__grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
}

.date-range-day {
  border: none;
  background: transparent;
  font-size: 11.5px;
  color: var(--ink);
  padding: 5px 0;
  border-radius: var(--radius-sm);
  cursor: pointer;
}
.date-range-day:hover:not(:disabled) { background: var(--control); }
.date-range-day--muted { color: var(--ink-dim); }
.date-range-day--in-range { background: var(--iris-tint); color: var(--iris); border-radius: 0; }
.date-range-day--start, .date-range-day--end {
  background: var(--iris);
  color: var(--on-iris);
  font-weight: 700;
}
.date-range-day--start { border-radius: var(--radius-sm) 0 0 var(--radius-sm); }
.date-range-day--end { border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
.date-range-day--single { border-radius: var(--radius-sm); }
.date-range-day:disabled { color: var(--ink-dim); cursor: not-allowed; opacity: 0.4; }

.date-range-panel__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 12px;
  border-top: 1px solid var(--line);
  background: var(--control);
}
.date-range-panel__summary {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-soft);
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.date-range-panel__summary--warn {
  color: var(--warn-ink);
  font-weight: 600;
  font-family: var(--font-ui);   
}
.date-range-panel__footer > div {
  flex: none;
  display: flex;
  gap: 8px;
}
.date-range-panel__footer button {
  flex: none;
  white-space: nowrap;
}

.date-range-panel__footer .btn-primary,
.date-range-panel__footer .link-btn { width: auto; }

.filter-toggle {
  display: flex;
  gap: 4px;
  background: var(--control);
  border-radius: var(--radius-sm);
  padding: 3px;
}
.filter-toggle__option {
  flex: 1;
  border: none;
  background: transparent;
  border-radius: 6px;
  padding: 5px 10px;
  font-size: 11.5px;
  color: var(--ink-soft);
  cursor: pointer;
  white-space: nowrap;
}
.filter-toggle__option:hover:not(.filter-toggle__option--active) { color: var(--ink); }
.filter-toggle__option--active {
  background: var(--iris);
  color: var(--on-iris);
  font-weight: 600;
}

.auth-cta {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  
  z-index: 55;
  padding: 10px 13px 13px;
  background: var(--sunken);
  border-top: 1px solid var(--line);
  box-shadow: var(--shadow-lift);
}
.auth-cta[hidden] { display: none; }

body.auth-cta-on .fixed-footer { display: none; }

body.auth-cta-on { padding-bottom: calc(var(--footer-h, 0px) + 96px); }

.auth-cta__hint {
  margin: 8px 0 0;
  font-size: calc(11px * var(--ui-scale));
  line-height: 1.5;
  color: var(--ink-faint);
  text-align: center;
}

.google-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-height: 44px;
  padding: 0 16px;
  background: #FFFFFF;
  border: 1px solid #DADCE0;
  border-radius: 999px;
  box-shadow: 0 1px 2px rgba(20, 22, 26, 0.08);
  font-family: var(--font-ui);
  font-size: calc(13px * var(--ui-scale));
  font-weight: 600;
  color: #3C4043;
  cursor: pointer;
  transition: box-shadow 0.15s ease, transform 0.15s ease, background 0.15s ease;
}
.google-btn:hover:not(:disabled) {
  background: #F8F9FA;
  box-shadow: 0 4px 12px -4px rgba(20, 22, 26, 0.22);
  transform: translateY(-1px);
}
.google-btn:active:not(:disabled) { transform: translateY(0); box-shadow: none; }
.google-btn:focus-visible { outline: 2px solid var(--ring); outline-offset: 2px; }
.google-btn:disabled { opacity: 0.55; cursor: not-allowed; }
.google-btn__logo { width: 18px; height: 18px; flex: none; }
.google-btn--busy .google-btn__label::after {
  content: "…";
  margin-left: 1px;
}

.auth-cta__error {
  margin: 9px 0 0;
  padding: 8px 10px;
  background: var(--coral-wash);
  border: 1px solid var(--coral-line);
  border-radius: var(--radius-sm);
  font-size: calc(11px * var(--ui-scale));
  line-height: 1.6;
  color: var(--coral-ink);
}
.auth-cta__error[hidden] { display: none; }

.bell { position: relative; display: inline-flex; }

.bell__btn { position: relative; }
.bell__btn .material-symbols-rounded { font-size: calc(19px * var(--ui-scale)); }

.bell--empty .bell__btn { opacity: .45; }

.bell__dot {

  position: absolute;
  top: calc(4px * var(--ui-scale));
  right: calc(4px * var(--ui-scale));
  width: calc(8px * var(--ui-scale));
  height: calc(8px * var(--ui-scale));
  border-radius: 50%;
  background: var(--iris);
  box-shadow: 0 0 0 2px var(--topbar-bg, var(--bg));
}

.bell__dot[hidden] { display: none !important; }

.bell__pop {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 8px;
  width: calc(250px * var(--ui-scale));
  max-width: 78vw;
  background: var(--popover);
  border-radius: var(--radius-lg);
  padding: calc(12px * var(--ui-scale)) calc(13px * var(--ui-scale));
  box-shadow: var(--shadow-popover);
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: calc(8px * var(--ui-scale));
  text-align: left;
}
.bell__pop[hidden] { display: none !important; }
.bell__row { display: flex; align-items: flex-start; gap: calc(8px * var(--ui-scale)); }
.bell__row[hidden] { display: none !important; }
.bell__icon { font-size: calc(17px * var(--ui-scale)); color: var(--iris-text); flex: none; }
.bell__body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: calc(7px * var(--ui-scale)); }
.bell__text {
  font-size: calc(12px * var(--ui-scale));
  line-height: 1.65;
  color: var(--ink);
  text-wrap: pretty;
  word-break: break-word;
}

.bell__link {
  align-self: flex-start;
  font-size: calc(11.5px * var(--ui-scale));
  font-weight: 600;
  color: var(--interactive);
  text-decoration: none;
}
.bell__link[hidden] { display: none !important; }
.bell__link::after { content: " \2192"; }
.bell__link:hover { color: var(--iris-text); text-decoration: underline; }
.bell__empty { font-size: calc(11.5px * var(--ui-scale)); color: var(--ink-soft); }
.bell__empty[hidden] { display: none !important; }

.account-panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.account-panel[hidden] { display: none; }

.account-card {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 11px;
}

.account-card__figure {
  position: relative;
  width: 38px;
  height: 38px;
  flex: none;
}
.account-card__avatar {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}
.account-card__avatar[hidden] { display: none; }
.account-card__initial {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: var(--iris);
  color: var(--on-iris);
  font-family: var(--font-data);
  font-weight: 800;
  font-size: 16px;
}
.account-card__initial[hidden] { display: none; }

.account-card__body {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
  flex: 1;
}
.account-card__name {
  font-size: calc(12.5px * var(--ui-scale));
  font-weight: 600;
  color: var(--ink-title);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.account-card__email {
  font-size: calc(11px * var(--ui-scale));
  color: var(--ink-faint);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.account-card__plan {
  margin-top: 5px;
  font-size: calc(11px * var(--ui-scale));
  color: var(--ink-faint);
}
.account-card__plan-badge {
  margin-left: 6px;
  padding: 3px 11px;
  border-radius: 999px;
  font-size: calc(12px * var(--ui-scale));
  font-weight: 800;
}

.account-card__plan-badge--free {
  background: var(--control);
  color: var(--ink-soft);
}
.account-card__plan-badge--lite {
  background: var(--teal-wash);
  color: var(--teal-strong);
}
.account-card__plan-badge--pro {
  background: var(--iris-tint);
  color: var(--iris);
}

.account-card__signout {
  width: auto;
  flex: none;
  align-self: flex-start;
  padding: 3px 6px;
}

.usage-card {
  padding: 11px 12px;
  border-top: 1px solid var(--line);
}

.usage-card__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}
.usage-card__title {
  font-size: calc(11.5px * var(--ui-scale));
  color: var(--ink-soft);
}
.usage-card__value {
  font-family: var(--font-data);
  font-size: calc(12.5px * var(--ui-scale));
  color: var(--ink-faint);
  white-space: nowrap;
}
.usage-card__value b {
  font-weight: 800;
  color: var(--ink-title);
}

.usage-meter {
  position: relative;
  margin-top: 7px;
  height: 6px;
  border-radius: 3px;
  background: var(--control);
  overflow: hidden;
}
.usage-meter__fill {
  height: 100%;
  width: 0%;
  border-radius: 3px;
  background: var(--iris);
  transition: width 0.25s ease, background 0.25s ease;
}
.usage-meter__fill.usage-meter__fill--warn { background: var(--amber); }
.usage-meter__fill.usage-meter__fill--full { background: var(--coral); }

.usage-card__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 7px;
}
.usage-card__synced {
  font-family: var(--font-mono);
  font-size: calc(10px * var(--ui-scale));

  color: var(--ink-soft);
}
.usage-card__link {
  font-size: calc(11px * var(--ui-scale));
  font-weight: 600;
  
  color: var(--interactive);
  text-decoration: none;
  white-space: nowrap;
}
.usage-card__link:hover { color: var(--iris-text); text-decoration: underline; }

.redeem-card {
  margin-top: 9px;
  padding: 11px 12px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.redeem-card[hidden] { display: none; }

.redeem-card__title {
  font-size: calc(11.5px * var(--ui-scale));
  color: var(--ink-soft);
}

.redeem-card__row {
  display: flex;
  gap: 8px;
}
.redeem-card__input {
  flex: 1;
  min-width: 0;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line-strong);
  background: var(--card);   
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: calc(12px * var(--ui-scale));
  letter-spacing: .04em;
  text-transform: uppercase;
}
.redeem-card__input::placeholder { color: var(--ink-dim); text-transform: none; letter-spacing: normal; }
.redeem-card__input:focus { outline: 2px solid var(--ring); outline-offset: 1px; }

.redeem-card__btn {
  flex: none;
  padding: 8px 14px;
  font-size: calc(12px * var(--ui-scale));
}

.redeem-card__msg {
  margin: 0;
  font-size: calc(11.5px * var(--ui-scale));
  line-height: 1.6;
}
.redeem-card__msg[hidden] { display: none; }
.redeem-card__msg--ok { color: var(--green-ink); }
.redeem-card__msg--error { color: var(--coral-ink); }

.devices-card {
  margin-top: 9px;
  padding: 11px 12px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.devices-card[hidden] { display: none; }

.devices-card__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}
.devices-card__title {
  font-size: calc(11.5px * var(--ui-scale));
  color: var(--ink-soft);
}
.devices-card__count {
  font-family: var(--font-data);
  font-size: calc(11.5px * var(--ui-scale));
  color: var(--ink-faint);
  white-space: nowrap;
}

.devices-card__list {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.devices-card__item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 0;
  border-top: 1px solid var(--line);
}
.devices-card__item:first-child { border-top: none; padding-top: 0; }
.devices-card__item-label {
  font-size: calc(11.5px * var(--ui-scale));
  color: var(--ink-list);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.devices-card__item-you {
  color: var(--iris);
  font-weight: 700;
}
.devices-card__remove-btn {
  flex: none;
  background: none;
  border: none;
  padding: 2px 6px;
  font-size: calc(10.5px * var(--ui-scale));
  color: var(--ink-faint);
  cursor: pointer;
  border-radius: var(--radius-sm);
}
.devices-card__remove-btn:hover { background: var(--control-hover); color: var(--coral-ink); }

.devices-card__blocked {
  margin: 8px 0 0;
  padding: 8px 9px;
  background: var(--coral-wash);
  border: 1px solid var(--coral-line);
  border-radius: var(--radius-sm);
  font-size: calc(11px * var(--ui-scale));
  line-height: 1.6;
  color: var(--coral-ink);
}
.devices-card__blocked[hidden] { display: none; }

.footer-entry {
  display: flex;
  gap: 8px;
  
  padding: 10px 14px 0;
  border-bottom: 0;
}
.footer-entry__btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 6px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--control-face);
  color: var(--ink-soft);
  font-family: var(--font-ui);
  font-size: calc(11.5px * var(--ui-scale));
  font-weight: 700;
  cursor: pointer;
}

.footer-entry__btn:hover {
  background: var(--control-face-on);
  border-color: var(--line-strong);
  color: var(--ink);
}
.footer-entry__btn .material-symbols-rounded { font-size: calc(15px * var(--ui-scale)); }

.pane-back {
  display: flex;
  align-items: center;
  gap: 7px;
  width: 100%;
  padding: 4px 2px 2px;
  border: none;
  background: none;
  color: var(--ink);
  font-family: var(--font-ui);
  font-size: calc(13px * var(--ui-scale));
  font-weight: 700;
  cursor: pointer;
  text-align: left;
}
.pane-back:hover { color: var(--iris); }

.pane-back__title {
  font-size: calc(12.5px * var(--ui-scale));
  font-weight: 700;
}

.btn-ghost {
  appearance: none;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink-soft);
  font-family: var(--font-ui);
  font-size: calc(11.5px * var(--ui-scale));
  font-weight: 600;
  padding: 5px 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  white-space: nowrap;
  transition: background .12s, color .12s, border-color .12s;
}
.btn-ghost:hover { background: var(--control-hover); color: var(--ink); }
.btn-ghost:disabled { opacity: .45; cursor: default; }
.pane-back .material-symbols-rounded { font-size: calc(18px * var(--ui-scale)); }

.platform-switcher { margin-top: 8px; padding: 2px; gap: 2px; }
.platform-switcher .platform-pill {
  font-size: calc(11px * var(--ui-scale));
  padding: 5px 10px;
}
.tool-header { gap: 9px; }

.pane-return {
  position: sticky;
  bottom: 10px;
  z-index: 5;
  display: block;
  width: 100%;

  margin-top: auto;
  padding: 14px;
  border: none;
  border-radius: var(--radius-xl);
  background: var(--iris);
  color: var(--on-iris);
  font-family: var(--font-ui);
  font-size: calc(14px * var(--ui-scale));
  font-weight: 700;
  cursor: pointer;

  box-shadow: 0 0 0 12px var(--bg), 0 10px 24px -10px rgba(0, 0, 0, .55);
  transition: background .12s ease;
}
.pane-return:hover { background: var(--iris-strong); }
.pane-return:active { background: var(--iris-strong); }

.site-link {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  column-gap: 8px;
  margin-top: 8px;
  padding: 10px 11px;
  background: var(--control);
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--ink);
}
.site-link:hover { background: var(--control-hover); }
.site-link .material-symbols-rounded { font-size: calc(17px * var(--ui-scale)); color: var(--ink-soft); }
.site-link__t { font-size: calc(12.5px * var(--ui-scale)); font-weight: 700; }

.site-link__s {
  grid-column: 2 / 3;
  font-size: calc(11px * var(--ui-scale));
  color: var(--ink-soft);
}

.site-link__chev { grid-row: 1 / 3; grid-column: 3 / 4; }

.sub-view__body--settings {
  padding: 0;
  background: var(--card);
  display: flex;
  flex-direction: column;
}

.set-sec {
  display: flex;
  flex-direction: column;
  gap: calc(9px * var(--ui-scale));
  padding: calc(14px * var(--ui-scale)) 16px;
  border-top: 1px solid var(--line);
}
.set-sec:first-of-type { border-top: 0; }

.set-sec__head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }

.set-sec__head--btn {
  all: unset;
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; width: 100%; cursor: pointer;
}
.set-sec__title {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: calc(13px * var(--ui-scale));
  font-weight: 700; letter-spacing: 0; color: var(--ink);
}
.set-sec__meta { font-size: calc(11.5px * var(--ui-scale)); font-weight: 600; color: var(--ink-soft); font-variant-numeric: tabular-nums; }

.set-sec__meta--full { color: var(--peridot); }
.set-sec__chev { font-size: calc(18px * var(--ui-scale)); color: var(--ink-soft); transition: transform .16s ease; }
.set-sec__head--btn[aria-expanded="true"] .set-sec__chev { transform: rotate(180deg); }

.set-row { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.set-row__label { font-size: calc(12.5px * var(--ui-scale)); color: var(--ink-soft); }
.set-row__value { font-size: calc(14px * var(--ui-scale)); font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; }
.set-row__unit { font-size: calc(11.5px * var(--ui-scale)); font-weight: 400; color: var(--ink-soft); }
.set-row__sub { font-size: calc(11px * var(--ui-scale)); color: var(--ink-soft); }

.set-textbtn {
  all: unset; cursor: pointer; flex: none;
  font-size: calc(11.5px * var(--ui-scale)); color: var(--ink-soft);
}
.set-textbtn:hover { color: var(--ink); }
.set-textbtn--accent { color: var(--iris-text); font-weight: 600; text-decoration: none; }
.set-textbtn--accent:hover { color: var(--iris-text); }

.set-badge {
  font-size: calc(10.5px * var(--ui-scale)); font-weight: 600;
  padding: 2px 6px; border-radius: 4px; white-space: nowrap;
  background: var(--iris-tint); color: var(--iris-text);
}
.set-badge--dev { background: var(--peridot-tint); color: var(--peridot); }

.set-account { flex-direction: row; align-items: center; gap: 11px; }
.set-account__figure {
  width: calc(38px * var(--ui-scale)); height: calc(38px * var(--ui-scale));
  border-radius: 50%; background: var(--control); flex: none;
  display: flex; align-items: center; justify-content: center; overflow: hidden;
}
.set-account__avatar { width: 100%; height: 100%; object-fit: cover; }
.set-account__initial { font-size: calc(15px * var(--ui-scale)); font-weight: 700; color: var(--ink-soft); }
.set-account__body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.set-account__line { display: flex; align-items: center; gap: 7px; min-width: 0; }
.set-account__name { font-size: calc(14px * var(--ui-scale)); font-weight: 600; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.set-account__email { font-size: calc(11.5px * var(--ui-scale)); color: var(--ink-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.set-devices { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.set-devices li {
  display: flex; align-items: center; gap: 8px;
  padding: calc(9px * var(--ui-scale)) 0;
  border-bottom: 1px solid var(--line-soft, var(--line));
}
.set-devices li:last-child { border-bottom: 0; }
.set-devices__body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.set-devices__name { font-size: calc(12.5px * var(--ui-scale)); color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.set-devices__self {
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  opacity: .82;
}

.set-devices__sub { font-size: calc(10.5px * var(--ui-scale)); color: var(--ink-soft); }
.set-note { margin: 0; font-size: calc(11px * var(--ui-scale)); line-height: 1.7; color: var(--ink-soft); }
.set-note--warn { color: var(--warn-ink); }

.set-note--err { color: var(--coral-ink); }

.set-toggle { display: flex; align-items: center; gap: 12px; cursor: pointer; }
.set-toggle__body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.set-toggle__t { font-size: calc(13px * var(--ui-scale)); color: var(--ink); text-wrap: pretty; }
.set-toggle__s { font-size: calc(11px * var(--ui-scale)); line-height: 1.6; color: var(--ink-soft); }

.set-scale {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 3px;
  padding: 3px; background: var(--control); border-radius: 9px;
}

.set-scale__btn {
  all: unset; cursor: pointer; text-align: center;
  display: flex; align-items: center; justify-content: center;
  padding: calc(7px * var(--ui-scale)) 0; border-radius: 7px;
  font-size: calc(12.5px * var(--ui-scale));
  font-weight: 600; color: var(--ink-soft); line-height: 1.2;

  white-space: nowrap;
}

.set-reset {
  all: unset; cursor: pointer;
  display: inline-flex; align-items: center; gap: 4px;
  font-size: calc(11.5px * var(--ui-scale)); color: var(--interactive);
}
.set-reset[hidden] { display: none !important; }
.set-reset:hover { color: var(--iris-text); text-decoration: underline; }
.set-reset .material-symbols-rounded { font-size: calc(14px * var(--ui-scale)); }
.set-sec__head-right { display: inline-flex; align-items: center; gap: calc(9px * var(--ui-scale)); }

.set-scale--2 { grid-template-columns: repeat(2, 1fr); }

.lay-ico {
  display: grid; gap: calc(2px * var(--ui-scale));
  width: calc(18px * var(--ui-scale)); flex: none;
  margin-right: calc(5px * var(--ui-scale));
  
  height: calc(14px * var(--ui-scale));
}
.lay-ico i, .lay-ico b, .lay-ico u {
  border: 1px solid currentColor; border-radius: 1px; opacity: .7;
}

.lay-ico--v1 { grid-template-rows: 1fr 1fr; }

.lay-ico--v2 { grid-template-columns: repeat(3, 1fr); grid-template-rows: 1.6fr 1fr; }
.lay-ico--v2 u { grid-column: 1 / -1; }
.set-scale__btn:hover { color: var(--ink); }
.set-scale__btn--active { background: var(--card); color: var(--ink); box-shadow: var(--shadow-card); }

.set-foot {
  flex-direction: row; align-items: center; justify-content: space-between;
  gap: 10px; margin-top: auto;
  background: var(--control);
  padding-top: calc(12px * var(--ui-scale));
  padding-bottom: calc(12px * var(--ui-scale));
}

.set-logwrap { display: flex; flex-direction: column; gap: calc(8px * var(--ui-scale)); }
.set-copy {
  align-self: flex-start;
  display: inline-flex; align-items: center; gap: 5px;
  padding: 0; border: none; background: none; cursor: pointer;
  font-family: inherit;
  font-size: calc(11.5px * var(--ui-scale));
  font-weight: 600;
  color: var(--interactive);
}
.set-copy:hover { color: var(--iris-text); }
.set-copy .material-symbols-rounded { font-size: calc(15px * var(--ui-scale)); }
.set-foot__ver {
  flex: none;
  font-family: var(--font-mono);
  font-size: calc(11px * var(--ui-scale));

  color: var(--ink-soft);
}

.set-sitelink {
  display: inline-flex; align-items: center; gap: 8px;
  text-decoration: none; color: var(--ink-soft);
}
.set-sitelink .material-symbols-rounded { font-size: calc(16px * var(--ui-scale)); color: inherit; }
.set-sitelink__t { font-size: calc(12.5px * var(--ui-scale)); }

.preview-sheet--merged {
  aspect-ratio: 210 / 297;
  justify-content: flex-start;

  padding: calc(var(--preview-sheet-w, 200px) * 8 / 210);
}

#mergedLabelSlot { width: auto; }
#mergedLabelSlot .ship-card {
  width: var(--preview-sheet-w);
  zoom: 0.464;
  margin: 0;
  border-radius: 0;

  outline: 1px solid #C9CDD4;
  outline-offset: 0;
}
.merged-divider {
  border-top: 1px dashed #9CA3AF;
  margin: 6px 0;
}
#mergedPackingSlot { flex: 1; min-height: 0; overflow: hidden; }
#mergedPackingSlot .packing-preview { height: 100%; }

:root { --control-ring: var(--line-pill); }
body.theme-dark { --control-ring: transparent; }

.icon-btn:hover,
.completed-item__print:hover,
.btn-secondary:hover,
.recent-item__print:hover,
.pw-item__menu-item:hover,
.devices-card__remove-btn:hover,
.btn-ghost:hover,
.site-link:hover {
  box-shadow: inset 0 0 0 1px var(--control-ring);
}

.panel--follow-row:has(> .setting-row[hidden]) { display: none; }

body.theme-dark .account-card__plan-badge--free {
  background: transparent;
  color: var(--text-2);
  box-shadow: inset 0 0 0 1px #4A5170;
}
body.theme-dark .account-card__plan-badge--lite {
  background: #4A5170;
  color: #FFFFFF;
}
body.theme-dark .account-card__plan-badge--pro {
  background: var(--iris);
  color: var(--on-iris);
}

body.theme-dark .text-action,
body.theme-dark .usage-card__link,
body.theme-dark .bell__link,
body.theme-dark .set-textbtn--accent {
  color: #FFFFFF;
  font-weight: 700;
  text-decoration: none;
}
body.theme-dark .text-action:hover,
body.theme-dark .usage-card__link:hover,
body.theme-dark .bell__link:hover,
body.theme-dark .set-textbtn--accent:hover {
  color: #FFFFFF;
  text-decoration: none;
  opacity: .78;
}
body.theme-dark .text-action::after,
body.theme-dark .usage-card__link::after,
body.theme-dark .set-textbtn--accent::after {
  content: " \2192";
}

body.theme-dark .set-reset,
body.theme-dark .set-copy {
  color: #FFFFFF;
  font-weight: 700;
}
body.theme-dark .set-reset:hover,
body.theme-dark .set-copy:hover {
  color: #FFFFFF;
  text-decoration: none;
  opacity: .78;
}

body.theme-dark .bell__row {
  background: var(--surface-2);
  border-radius: var(--radius-sm);
  padding: calc(10px * var(--ui-scale));
}
body.theme-dark .bell__icon {
  flex: none;
  width: calc(26px * var(--ui-scale));
  height: calc(26px * var(--ui-scale));
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 7px;
  background: var(--iris);
  color: var(--on-iris);
  font-size: calc(15px * var(--ui-scale));
}

body.theme-dark .set-scale__btn--active {
  background: var(--iris);
  color: var(--on-iris);
  box-shadow: none;
}

body.theme-dark .icon-row__btn--active {
  color: #FFFFFF;
  font-weight: 700;
  border-bottom-color: var(--iris);
}

body.theme-dark .set-badge--here {
  background: transparent;
  color: #FFFFFF;
  padding: 0;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
body.theme-dark .set-badge--here::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--iris);
  flex: none;
}

body.theme-dark .btn-ghost { border-color: #4A5170; }

body.theme-dark .platform-pill--active,
body.theme-dark .pw-item__spec,
body.theme-dark .set-badge:not([class*="plan-badge--"]):not(.set-badge--dev):not(.set-badge--here) {
  background: var(--iris);
  color: var(--on-iris);
  border-color: transparent;
}

body.theme-dark .shipfee-total__amount          { color: var(--iris); }
body.theme-dark .shipfee-stat__amount           { color: var(--iris); }

body.theme-dark .shipfee-item__amount--adjusted { color: var(--iris); }

body.theme-dark .status-pill--mismatch,
body.theme-dark .date-range-preset--active,
body.theme-dark .date-range-day--in-range { color: #FFFFFF; }

body.theme-dark .devices-card__item-you { color: #FFFFFF; }
body.theme-dark .pane-back:hover { color: #FFFFFF; }

body.theme-dark a,
body.theme-dark a:hover { color: #FFFFFF; text-decoration: underline; }

.ps { display: flex; flex-direction: column; gap: calc(16px * var(--ui-scale)); }
.ps__grp { display: flex; flex-direction: column; gap: calc(10px * var(--ui-scale)); }
.ps__head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.ps__title { font-size: calc(12.5px * var(--ui-scale)); font-weight: 600; color: var(--ink); }
.ps__aux {
  font-size: calc(11.5px * var(--ui-scale)); font-weight: 600;
  color: var(--iris-text); text-align: right;
}

.ps__aux--warn { color: var(--warn-ink, #8A6A2E); }

.ps__thumbs { display: flex; gap: calc(7px * var(--ui-scale)); }
.ps-thumb {
  flex: 1 1 0; min-width: 0; position: relative;
  display: flex; flex-direction: column; align-items: center;
  gap: calc(8px * var(--ui-scale));
  padding: calc(11px * var(--ui-scale)) calc(8px * var(--ui-scale)) calc(9px * var(--ui-scale));
  background: var(--card); border: 1px solid var(--line);
  border-radius: calc(10px * var(--ui-scale));
  cursor: pointer; font: inherit; color: inherit;
}
.ps-thumb__name {
  font-size: calc(12px * var(--ui-scale)); font-weight: 500; color: var(--ink-soft);
  white-space: nowrap;
}
.ps-thumb[aria-pressed="true"] { border-color: var(--iris); background: var(--iris-tint); }
.ps-thumb[aria-pressed="true"] .ps-thumb__name { font-weight: 700; color: var(--ink); }

.ps-thumb__tick {
  position: absolute; top: calc(-6px * var(--ui-scale)); right: calc(-6px * var(--ui-scale));
  width: calc(15px * var(--ui-scale)); height: calc(15px * var(--ui-scale));
  border-radius: 50%; background: var(--iris);
  display: none; font-size: 0;
}
.ps-thumb__tick::before {
  content: ""; position: absolute; left: 34%; top: 20%;
  width: calc(4px * var(--ui-scale)); height: calc(7px * var(--ui-scale));
  border: solid var(--on-iris); border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
.ps-thumb[aria-pressed="true"] .ps-thumb__tick { display: block; }

.ps-thumb__art {
  width: calc(26px * var(--ui-scale)); height: calc(32px * var(--ui-scale));
  --ink1: #9BA0B4; --ink2: #C3C7D6;
  background-color: var(--control); border: 1px solid var(--line); border-radius: 2px;
  background-repeat: no-repeat; flex: none;
}
.ps-thumb[aria-pressed="true"] .ps-thumb__art {
  background-color: #FFFFFF; border-color: #C9CCDA;
  --ink1: #14161A; --ink2: #8A90A6;
}
.ps-thumb__art--label {   
  background-image:
    linear-gradient(var(--ink1), var(--ink1)),
    repeating-linear-gradient(90deg,var(--ink1) 0 1px,transparent 1px 2px,var(--ink1) 2px 3px,transparent 3px 5px);
  background-size: 72% 6px, 72% 8px;
  background-position: 50% 18%, 50% 76%;
}
.ps-thumb__art--slip {    
  background-image:
    linear-gradient(var(--ink1), var(--ink1)),
    repeating-linear-gradient(var(--ink2) 0 1.5px, transparent 1.5px 5px);
  background-size: 72% 2px, 72% 16px;
  background-position: 50% 22%, 50% 72%;
}
.ps-thumb__art--pick {    
  background-image:
    repeating-linear-gradient(var(--ink1) 0 1.5px, transparent 1.5px 6px),
    repeating-linear-gradient(var(--ink2) 0 1.5px, transparent 1.5px 6px);
  background-size: 22% 20px, 46% 20px;
  background-position: 16% 55%, 74% 55%;
}

.ps__chips { display: flex; align-items: stretch; gap: calc(7px * var(--ui-scale)); }
.ps-chip {
  flex: none; padding: calc(7px * var(--ui-scale)) calc(10px * var(--ui-scale));
  border: 1px solid var(--line); border-radius: calc(8px * var(--ui-scale));
  background: var(--card); color: var(--ink-soft);
  font: inherit; font-size: calc(12px * var(--ui-scale)); font-weight: 500;
  cursor: pointer; white-space: nowrap; text-align: center;
}

.ps-chip--flex { flex: 1 1 0; min-width: 0; }
.ps-chip[aria-pressed="true"] {
  background: var(--iris); border-color: var(--iris); color: var(--on-iris); font-weight: 700;
}

.ps-chip[disabled] { color: var(--ink-dim); background: var(--control); cursor: default; }
.ps-chips__sep { flex: none; width: 1px; align-self: center; height: calc(20px * var(--ui-scale)); background: var(--line); }

.ps-sub { display: flex; align-items: center; gap: calc(8px * var(--ui-scale)); cursor: pointer; }

.ps-sub[hidden] { display: none !important; }
.ps-sub__label { font-size: calc(12px * var(--ui-scale)); font-weight: 500; color: var(--ink); }

.ps-sub__note {
  font-size: calc(11px * var(--ui-scale)); font-weight: 400;
  color: var(--ink-soft); white-space: nowrap;
}

.ps-sub__ico {
  flex: none; box-sizing: border-box;
  width: calc(13px * var(--ui-scale)); height: calc(18px * var(--ui-scale));
  background: #FFFFFF; border: 1px solid var(--iris);
  border-radius: 2px; padding: calc(1.5px * var(--ui-scale));
  display: grid; grid-template-rows: 1fr 1fr; gap: calc(1.5px * var(--ui-scale));
}
.ps-sub__ico i { display: block; background: rgba(103, 61, 230, .28); }

body.theme-dark .ps__aux { color: #FFFFFF; font-weight: 700; }
body.theme-dark .ps__aux--warn { color: var(--warn-ink); }

body.theme-dark .ps-thumb { background: var(--surface-2); border-color: #4A5170; }
body.theme-dark .ps-thumb .ps-thumb__name { color: #FFFFFF; font-weight: 500; }
body.theme-dark .ps-thumb__art {
  background-color: #3E4462; border-color: #4A5170;
  --ink1: #9AA2BE; --ink2: #6E7593;
}
body.theme-dark .ps-thumb[aria-pressed="true"] { border-color: #FFFFFF; }
body.theme-dark .ps-thumb[aria-pressed="true"] .ps-thumb__name { font-weight: 700; }
body.theme-dark .ps-thumb[aria-pressed="true"] .ps-thumb__art {
  background-color: #FFFFFF; border-color: #C9CCDA;
  --ink1: #14161A; --ink2: #8A90A6;
}

.tab__count {
  font-family: var(--font-data);
  font-weight: 700;
  margin-left: 4px;
}

.tabbar .tab { flex: 1; }

.order-card > input.switch {
  flex: 0 0 auto;
  margin-left: 4px;
}
