:root {
  --ink: #20262d;
  --muted: #525d68;
  --line: #d5dade;
  --control: #78848e;
  --accent: #1f5fbf;
  --surface: #ffffff;
  --background: #f6f7f8;
  --bag: #d5cae8;
  color: var(--ink);
  background: var(--background);
  font-family: system-ui, -apple-system, 'Noto Sans JP', 'Hiragino Kaku Gothic ProN', sans-serif;
  font-synthesis: none;
  line-height: 1.5;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }
button, input, select { font: inherit; }
button {
  min-height: 44px;
  padding: 10px 14px;
  border: 1px solid var(--control);
  border-radius: 8px;
  background: white;
  color: var(--ink);
  font-size: .875rem;
  font-weight: 650;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
}
button:hover { background: #f0f2f4; }
button:disabled { color: #6c757d; background: #e7eaed; border-color: #b9c0c6; cursor: not-allowed; }
button.primary, .small-primary { background: #252b32; color: white; border-color: #252b32; }
button.primary:hover, .small-primary:hover { background: #10151a; }
button.primary:disabled { color: #68727c; background: #e1e5e8; border-color: #b9c0c6; }
.primary { min-height: 48px; font-size: .9375rem; }
.outline { background: white; }
.full { width: 100%; }
.text-button { background: transparent; border-color: transparent; color: #344655; }
.icon-button { width: 44px; height: 44px; padding: 10px; flex: none; border-color: transparent; }
.icon { width: 20px; height: 20px; flex: none; display: block; pointer-events: none; }
button:focus-visible, input:focus-visible, select:focus-visible, summary:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}
h1, h2, h3, p { margin-top: 0; }
h1 { margin: 0; font-size: 1.375rem; }
h2 { margin-bottom: 12px; font-size: 1.125rem; }
h3 { font-size: 1rem; }
p { line-height: 1.65; }
.topbar {
  display: flex; justify-content: space-between; align-items: center;
  gap: 12px; max-width: 1320px; margin: auto; padding: 18px 28px;
  border-bottom: 1px solid var(--line); background: var(--surface);
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 750; }
.brand-mark { display: grid; place-items: center; width: 32px; height: 32px; }
.brand-mark .icon { width: 27px; height: 27px; }
.header-actions { display: flex; align-items: center; gap: 16px; }
.private-tag, #save-status { font-size: .8125rem; color: var(--muted); }
main { max-width: 1190px; margin: auto; padding: 0 24px; }
.work-title { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 20px 0 16px; }
.workspace { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 24px; align-items: start; }
.editor { min-width: 0; padding: 18px; background: white; border: 1px solid var(--line); border-radius: 12px; }
.editor-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.tabs { display: flex; border: 1px solid var(--control); border-radius: 9px; padding: 3px; gap: 3px; }
.tabs button { border-color: transparent; padding: 8px 12px; min-height: 44px; }
.tabs button[aria-pressed=true] { background: #252b32; color: white; }
.tabs button span { font-size: .8125rem; }
#bag-settings { margin-left: auto; font-size: .8125rem; }
.canvas-surround { background: #eef0f2; padding: 12px 16px 10px; border-radius: 10px; }
.canvas-meta, .canvas-bottom { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: .8125rem; color: var(--muted); }
.canvas-meta > span { text-align: right; }
.bag-color-control { display: flex; align-items: center; gap: 7px; cursor: pointer; min-height: 44px; padding: 4px 8px; border: 1px solid var(--control); border-radius: 8px; background: white; color: var(--ink); }
.bag-color-control strong { font-size: .8125rem; margin-left: 3px; text-decoration: underline; text-underline-offset: 3px; }
.bag-color-control input { appearance: none; -webkit-appearance: none; width: 27px; height: 27px; border: 1px solid #75808a; border-radius: 50%; padding: 0; overflow: hidden; background: none; cursor: pointer; flex: none; }
.bag-color-control input::-webkit-color-swatch-wrapper { padding: 0; }
.bag-color-control input::-webkit-color-swatch, .bag-color-control input::-moz-color-swatch { border: 0; border-radius: 50%; }
.bag-stage { width: min(100%, 385px); position: relative; padding-top: 48px; margin: 8px auto; }
.bag-handle { position: absolute; top: 0; left: 23%; width: 54%; height: 100px; border: 14px solid var(--bag); border-radius: 60px 60px 0 0; }
.bag-frame { position: relative; background: var(--bag); border: 6px solid var(--bag); padding: 10px; border-radius: 24px; box-shadow: inset 0 0 0 1px #fff9; }
.bag-window { position: relative; width: 100%; aspect-ratio: 240 / 300; background: #fbfcfd; border: 3px solid #ffffffd9; border-radius: 15px; box-shadow: 0 0 0 1px #9ca4ac55; isolation: isolate; touch-action: pan-y; overflow: hidden; overflow-anchor: none; }
.good { position: absolute; padding: 0; border: 0; border-radius: 0; min-height: 0; background: transparent; touch-action: none; user-select: none; display: block; }
.good:hover { background: transparent; }
.good img { width: 100%; height: 100%; object-fit: fill; display: block; pointer-events: none; -webkit-user-drag: none; }
.good.selected, .good:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.lock-symbol { position: absolute; right: -2px; top: -4px; background: #252b32; color: white; border-radius: 5px; width: 23px; height: 23px; display: grid; place-items: center; pointer-events: none; }
.lock-symbol .icon { width: 16px; height: 16px; }
.good.planned { pointer-events: none; opacity: .62; outline: 1.5px dashed #465462; outline-offset: -2px; }
.plan-symbol { position: absolute; right: 1px; bottom: 1px; font-size: .75rem; background: #ffffffed; color: #303b46; border-radius: 3px; padding: 0 3px; }
.canvas-bottom { padding-top: 6px; flex-wrap: wrap; }
.canvas-item-action { position: absolute; left: 50%; transform: translateX(-50%); z-index: 1001; max-width: calc(100% - 12px); width: max-content; pointer-events: none; }
.unlock-action { pointer-events: auto; min-height: 44px; padding: 8px 12px; box-shadow: 0 3px 12px #1b263a20; }
.move-hint { display: block; font-size: .875rem; color: #26323e; background: #fffffff2; border-radius: 6px; padding: 6px 9px; }
.selection { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; padding: 12px 0; margin-top: 10px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); min-height: 78px; font-size: .875rem; color: var(--muted); }
.selected-name { flex: 1 1 130px; color: var(--ink); }
.selected-name strong, .selected-name small { display: block; }
.selected-name small { font-size: .8125rem; margin-top: 3px; color: var(--muted); }
.selection button { min-height: 44px; padding: 9px 10px; font-size: .875rem; }
.position-controls { width: 100%; font-size: .875rem; }
.position-controls summary { min-height: 44px; cursor: pointer; padding: 10px 0; color: #344655; }
.position-fields { display: grid; grid-template-columns: 1fr 1fr auto; align-items: end; gap: 8px; padding-bottom: 8px; }
.position-fields label { display: block; margin: 0; }
.position-fields input { display: block; width: 100%; min-width: 0; min-height: 44px; padding: 8px; margin-top: 4px; border: 1px solid var(--control); border-radius: 7px; font-size: 16px; }
.edit-actions { display: flex; gap: 8px; margin-top: 14px; align-items: center; }
.edit-actions .primary { flex: 1; }
.edit-actions .text-button { font-size: .8125rem; padding: 8px; }
.micro, .help { color: var(--muted); font-size: .875rem; line-height: 1.6; margin: 12px 0 0; }
.sidebar { display: flex; flex-direction: column; gap: 16px; }
.panel { padding: 18px; background: white; border: 1px solid var(--line); border-radius: 12px; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.section-head h2 { margin: 0; }
.small-primary { font-size: .875rem; min-height: 44px; padding: 9px 12px; }
.section-help { font-size: .875rem; color: var(--muted); margin: 14px 0; }
.inventory { display: flex; flex-direction: column; gap: 10px; overflow-anchor: none; }
.inventory-card { display: grid; grid-template-columns: 48px 1fr auto; align-items: center; gap: 8px; border: 1px solid var(--line); border-radius: 9px; padding: 10px; }
.inventory-image { width: 46px; height: 52px; object-fit: contain; }
.inventory-info { min-width: 0; }
.inventory-card strong { display: block; font-size: .875rem; overflow-wrap: anywhere; }
.inventory-card small { display: block; font-size: .8125rem; color: var(--muted); margin-top: 3px; }
.inventory-card button { min-height: 44px; font-size: .875rem; padding: 8px 10px; }
.remaining { display: block; font-size: .8125rem; margin-bottom: 4px; color: var(--muted); }
.inventory-edit { grid-column: 2 / 4; justify-self: start; min-height: 44px; background: none; border-color: transparent; text-decoration: underline; text-underline-offset: 3px; }
.auto-summary p, .storage p { font-size: .875rem; color: var(--muted); }
.file-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.notice { border: 1px solid #8192a4; background: #f0f4f8; color: #233342; border-radius: 8px; padding: 12px 14px; margin-bottom: 16px; font-size: .875rem; line-height: 1.6; }
.notice.error { border-color: #a34132; background: #fff2ef; color: #8c2f20; }
.fill-summary { font-size: .875rem; color: #263b50; margin: 12px 0 0; line-height: 1.65; }
footer { text-align: center; padding: 28px; color: #5a6570; font-size: .8125rem; }
dialog { width: min(94vw, 500px); max-height: 92dvh; padding: 0; border: 1px solid var(--control); border-radius: 14px; color: var(--ink); background: white; box-shadow: 0 16px 70px #101a2a30; }
dialog::backdrop { background: #17233166; }
.dialog-form { padding: 24px; }
.dialog-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.dialog-head h2 { margin: 0; font-size: 1.25rem; }
.dialog-form > p { font-size: .875rem; color: var(--muted); }
label { font-size: .875rem; font-weight: 600; }
.dialog-form label { display: block; margin-bottom: 14px; }
input:not([type=range],[type=radio],[type=color],[type=checkbox],[type=file],[type=hidden]), select {
  display: block; width: 100%; min-width: 0; min-height: 48px; padding: 10px 12px;
  margin: 6px 0 0; border: 1px solid var(--control); border-radius: 8px;
  background: white; color: var(--ink); font-size: 16px;
}
input[aria-invalid=true], select[aria-invalid=true] { border-color: #a52c20; box-shadow: 0 0 0 1px #a52c20; }
.dialog-form input[type=color] { width: 100%; height: 48px; display: block; margin-top: 6px; border: 1px solid var(--control); border-radius: 8px; padding: 3px; background: white; }
.fields { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
legend { font-size: .875rem; font-weight: 650; padding: 0; margin-bottom: 10px; }
input[type=range] { display: block; width: 100%; min-height: 44px; margin: 5px 0; accent-color: var(--accent); cursor: pointer; }
input[type=checkbox], input[type=radio] { accent-color: var(--accent); width: 19px; height: 19px; flex: none; }
.range-label { display: block; margin-top: 18px; font-size: .875rem; }
.range-label output { float: right; color: #263b50; }
details { font-size: .875rem; color: var(--muted); line-height: 1.65; }
summary { min-height: 44px; padding: 9px 0; cursor: pointer; color: #344655; }
.form-error, .field-error { font-size: .875rem; line-height: 1.6; color: #982f22 !important; margin: 6px 0 12px; }
.danger { color: #982f22; }
.arrange-dialog { width: min(95vw, 900px); max-height: 94dvh; }
.arrange-form { display: flex; flex-direction: column; height: min(90dvh, 790px); overflow: hidden; padding: 22px; }
.arrange-form .dialog-head { flex: none; margin-bottom: 14px; }
.arrange-body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 22px; min-height: 0; flex: 1; }
.live-preview-panel { background: #eff1f3; border: 1px solid var(--line); border-radius: 10px; padding: 14px; display: flex; flex-direction: column; min-height: 0; }
.preview-label { display: flex; justify-content: space-between; gap: 8px; font-size: .8125rem; color: var(--muted); margin-bottom: 10px; }
.live-window-wrap { flex: 1; min-height: 160px; display: flex; align-items: center; justify-content: center; }
.live-window-wrap svg { width: 100%; height: 100%; display: block; }
.preview-count { font-size: .9375rem; font-weight: 650; margin: 12px 0 0; text-align: center; line-height: 1.55; }
.live-preview-panel .micro { font-size: .8125rem; text-align: center; margin-top: 6px; }
.arrange-controls { overflow-y: auto; overscroll-behavior: contain; min-height: 0; padding: 0 6px 10px 0; }
.mode-choices { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; }
.mode-choices label { display: flex; align-items: center; gap: 8px; padding: 10px; min-height: 48px; border: 1px solid var(--control); border-radius: 8px; margin: 0; }
.mode-choices label:has(input:checked), .pattern-choices label:has(input:checked) { border: 2px solid var(--accent); padding: 9px; background: #f2f6fb; }
.mode-choices small { display: block; color: var(--muted); font-size: .8125rem; font-weight: 400; }
.pattern-choices { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.pattern-choices label { position: relative; text-align: center; padding: 10px; border: 1px solid var(--control); border-radius: 8px; min-height: 75px; }
.pattern-choices input { position: absolute; top: 8px; right: 8px; }
.dots { display: block; color: #6c7782; font-size: 1rem; line-height: 1.4; margin-bottom: 5px; }
.arrange-footer { padding-top: 12px; flex: none; }
.arrange-footer .micro { margin: 0 0 10px; text-align: center; }
.compare-dialog { width: min(94vw, 800px); }
.comparison { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; align-items: start; }
.compare-card { min-width: 0; padding: 14px; border: 1px solid var(--control); border-radius: 10px; background: #f7f8f9; }
.compare-card h3 { display: flex; align-items: center; gap: 7px; }
.compare-card h3 span { width: 28px; height: 28px; display: grid; place-items: center; background: #252b32; color: white; border-radius: 5px; }
.compare-card p { font-size: .875rem; margin: 14px 0; line-height: 1.6; }
.mini-stage .bag-stage { padding-top: 32px; margin: 6px auto; }
.mini-stage .bag-handle { height: 72px; border-width: 10px; }
.mini-stage .bag-frame { padding: 6px; border-width: 4px; border-radius: 18px; }
.mini-stage .bag-window { border-radius: 10px; border-width: 2px; }
.mini-stage .good { pointer-events: none; }
.mini-stage .lock-symbol { display: none; }
.goods-dialog { width: min(94vw, 520px); max-height: 94dvh; }
.goods-form { display: flex; flex-direction: column; height: min(90dvh, 750px); margin: 0; }
.wizard-header { display: flex; align-items: center; justify-content: space-between; padding: 18px 22px; border-bottom: 1px solid var(--line); flex: none; gap: 12px; }
.wizard-header h2 { margin: 0; font-size: 1.25rem; }
.wizard-header h2:focus { outline: none; }
.step-count { font-size: .8125rem; color: var(--muted); margin: 0 0 4px; }
.wizard-body { min-height: 0; flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 24px 22px; }
.wizard-step > label { display: block; margin-top: 18px; }
.wizard-step > label:first-child { margin-top: 0; }
.dimensions-fields { margin-top: 20px; }
.dimension-equivalent { font-size: .9375rem; font-weight: 600; margin: 18px 0 0; }
.photo-buttons { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 18px 0; }
.photo-buttons button { min-height: 68px; flex-direction: column; }
#crop-canvas { display: block; width: 100%; height: 235px; object-fit: contain; touch-action: none; background: #edf0f2; border: 1px solid var(--control); border-radius: 8px; }
.crop-adjustments { margin-top: 12px; }
.crop-adjustments select { margin-bottom: 10px; }
#skip-photo { flex: 1; min-height: 48px; }
#skip-photo.photo-skip-alt { order: -1; flex-basis: 100%; background: white; color: var(--text); border: 1px solid var(--control); }
#preview-leftovers { margin-top: 8px; font-size: .875rem; }
#preview-leftovers ul { padding-left: 20px; }
.goods-review { display: flex; align-items: center; gap: 16px; padding: 14px; border: 1px solid var(--line); border-radius: 9px; background: #f7f8f9; margin-bottom: 22px; }
.goods-review img { width: 76px; height: 88px; object-fit: contain; }
.goods-review strong { display: block; }
.goods-review p, .goods-review span { display: block; font-size: .875rem; color: var(--muted); margin: 5px 0 0; }
.wizard-step > .checkbox-label { display: flex; align-items: center; gap: 10px; min-height: 48px; font-weight: 500; }
.save-outcome { padding: 12px; background: #f0f3f6; border-radius: 7px; font-size: .875rem; margin: 12px 0; }
.draft-discard { margin-top: 24px; font-size: .875rem; color: #9b2525; border-color: #9b2525; min-height: 44px; }
.wizard-footer { flex: none; padding: 14px 22px 18px; border-top: 1px solid var(--line); background: white; }
.draft-note { font-size: .8125rem; line-height: 1.5; color: var(--muted); margin: 0 0 10px; }
.wizard-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.wizard-actions .primary { flex: 1; min-height: 48px; }
body.dragging, body.dragging * { cursor: grabbing !important; }
@media (min-width: 950px) { .editor { position: sticky; top: 16px; } }
@media (max-width: 950px) { .workspace { grid-template-columns: minmax(0, 1fr) 290px; gap: 18px; } main { padding: 0 18px; } .editor { padding: 14px; } .tabs button span { display: none; } .panel { padding: 16px; } }
@media (max-width: 720px) {
  .topbar { padding: 12px; gap: 8px; } .brand { font-size: .875rem; gap: 6px; } .brand-mark { width: 26px; } .brand-mark .icon { width: 24px; height: 24px; } .header-actions { gap: 0; } .private-tag { display: none; } .header-actions button { padding: 8px 10px; }
  main { padding: 0 10px; } .work-title { padding: 16px 4px 12px; } h1 { font-size: 1.25rem; } .workspace { display: flex; flex-direction: column; gap: 16px; } .editor { width: 100%; padding: 12px; } .editor-head { gap: 8px; margin-bottom: 12px; } .tabs button span { display: inline; } .tabs button { padding: 8px 10px; font-size: .875rem; } #bag-settings { margin-left: 0; width: 100%; justify-content: flex-start; } .canvas-surround { padding: 10px; } .canvas-meta { gap: 8px; } .canvas-meta > span { font-size: .8125rem; max-width: 38%; } .bag-color-control { font-size: .8125rem; padding: 4px 6px; } .bag-stage { max-width: 340px; padding-top: 42px; } .bag-handle { height: 85px; border-width: 12px; } .bag-frame { padding: 8px; border-width: 5px; border-radius: 21px; } .bag-window { border-radius: 12px; } .selection { gap: 7px; } .selected-name { flex-basis: 100%; } .selection button { flex: 1 1 auto; } .position-fields { grid-template-columns: 1fr 1fr; } .position-fields button { grid-column: 1 / 3; } .edit-actions #undo { padding: 9px; } .edit-actions #undo > span:not([data-icon]) { display: none; } .edit-actions .primary { font-size: .875rem; } .sidebar { width: 100%; } .auto-summary { display: none; } .panel { padding: 16px; } .inventory { gap: 10px; } .inventory-card { grid-template-columns: 46px minmax(0, 1fr) auto; } .inventory-edit { grid-column: 2 / 4; } .micro, .help { font-size: .875rem; } .dialog-form { padding: 20px; } .fields { gap: 12px; }
  .arrange-dialog { width: calc(100vw - 12px); max-height: 96dvh; } .arrange-form { height: 94dvh; padding: 14px 12px; } .arrange-form .dialog-head { margin-bottom: 8px; } .arrange-body { display: flex; flex-direction: column; gap: 10px; } .live-preview-panel { flex: none; padding: 9px; } .preview-label { font-size: .8125rem; margin-bottom: 5px; } .live-window-wrap { height: clamp(140px, 23dvh, 215px); min-height: 0; flex: none; } .preview-count { font-size: .875rem; margin-top: 6px; } .live-preview-panel .micro { font-size: .8125rem; line-height: 1.5; margin-top: 4px; } .arrange-controls { flex: 1; padding: 0 3px 6px; } .mode-choices { gap: 8px; } .arrange-footer { padding-top: 8px; } .arrange-footer .micro { font-size: .8125rem; margin-bottom: 6px; }
  .compare-dialog .dialog-form { padding: 16px 10px; } .comparison { gap: 8px; } .compare-card { padding: 9px 6px; } .compare-card h3 { font-size: .875rem; gap: 5px; } .compare-card button { padding: 8px 4px; font-size: .8125rem; } .compare-card p { font-size: .8125rem; } .mini-stage .bag-stage { padding-top: 24px; } .mini-stage .bag-handle { border-width: 8px; height: 60px; } .mini-stage .bag-frame { padding: 4px; border-width: 3px; border-radius: 14px; } .mini-stage .bag-window { border-width: 1px; border-radius: 7px; }
  .goods-dialog { width: calc(100vw - 16px); max-height: 96dvh; } .goods-form { height: min(94dvh, 760px); } .wizard-header { padding: 14px 16px; } .wizard-body { padding: 20px 16px; } .wizard-footer { padding: 12px 16px max(14px, env(safe-area-inset-bottom)); } .wizard-header h2 { font-size: 1.125rem; } #crop-canvas { height: 215px; } .wizard-actions .primary { font-size: .875rem; } .photo-buttons button { min-height: 64px; }
}
@media (max-width: 350px) { .brand { max-width: 160px; line-height: 1.3; } .header-actions button { font-size: .8125rem; } .tabs button span { font-size: .8125rem; } .canvas-meta > span { display: none; } .selection button { font-size: .8125rem; } .edit-actions { flex-wrap: wrap; } .edit-actions .text-button { width: 100%; } .wizard-actions { gap: 7px; } .wizard-actions button { padding-left: 10px; padding-right: 10px; } }
@media (max-height: 600px) { .goods-form { height: 96dvh; } .wizard-header { padding-top: 9px; padding-bottom: 9px; } .wizard-footer { padding-top: 8px; padding-bottom: 10px; } .draft-note { margin-bottom: 7px; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; } }

/* Short landscape/keyboard viewports use one scrollable body instead of
   allowing a fixed preview to consume all space available to the controls. */
@media (max-height: 600px) {
  .arrange-form { height: 96dvh; }
  .arrange-body { display: block; overflow-y: auto; overscroll-behavior: contain; }
  .live-preview-panel { min-height: 0; margin-bottom: 12px; }
  .live-window-wrap { height: 120px; min-height: 120px; flex: none; }
  .arrange-controls { min-height: auto; overflow: visible; }
  .arrange-footer .micro { display: none; }
}

.direction-choices { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 16px 0; }
.direction-choices label { display: flex; align-items: center; gap: 6px; min-height: 48px; padding: 8px; border: 1px solid var(--control); border-radius: 8px; font-size: .875rem; }
.direction-choices input { margin: 0; }
.direction-choices .icon { width: 18px; height: 18px; flex: none; }
#goods-selection { padding: 10px 0; border-bottom: 1px solid var(--line); }
#goods-selection-summary { font-weight: 600; }
.arrange-item-row { display: grid; grid-template-columns: minmax(0,1fr) 78px; gap: 8px; align-items: center; padding: 8px 0; }
.arrange-item-row > label:first-child { display: flex; gap: 8px; align-items: center; min-width: 0; min-height: 44px; }
.arrange-item-row img { width: 32px; height: 36px; object-fit: contain; flex: none; }
.arrange-item-row .good-label { min-width: 0; overflow-wrap: anywhere; font-size: .875rem; }
.arrange-item-row small { display: block; color: var(--muted); font-size: .8125rem; }
.arrange-item-row input[type=checkbox] { flex: none; margin: 0; }
.arrange-item-row .count-field { font-size: .75rem; }
.arrange-item-row input[type=number] { width: 78px; min-height: 44px; padding: 8px; }
#reset-goods-selection { font-size: .875rem; margin-top: 8px; }

.arrange-item-row > .field-error { grid-column: 1 / -1; margin: 0; font-size: .875rem; }
/* Compact controls keep editing actions in the same inventory row. */
.inventory-actions { display: flex; gap: 6px; align-items: center; }
.inventory-edit { grid-column: auto; justify-self: auto; min-height: 44px; padding: 8px; border-color: var(--control); background: white; text-decoration: none; }
.inventory-edit .icon { width: 16px; height: 16px; }
.inventory-info .remaining { margin: 2px 0 0; }
.placement-feedback-slot { min-height: 20px; text-align: center; font-size: .8125rem; color: #1d4e91; }
#placement-feedback { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#open-tools, #toggle-canvas, #mobile-plan-summary { display: none; }
#tools-dialog .storage { padding: 0; border: 0; }
#tools-dialog .storage h2 { display: none; }
#tools-help { margin: 16px 0; }
#selection-dialog .selection { border: 0; margin: 0; padding: 0; }
.photo-help { margin: 12px 0; font-size: .875rem; }
.good.just-added img { animation: added-feedback .5s ease-out; }
@keyframes added-feedback { from { filter: drop-shadow(0 0 7px #1f5fbf); } to { filter: none; } }
@media (max-width: 720px) {
  body { height: 100dvh; overflow: hidden; display: flex; flex-direction: column; }
  .topbar { width: 100%; max-width: none; margin: 0; padding: 6px 10px; flex: none; min-height: 56px; }
  .header-actions { gap: 2px; }
  .brand { font-size: .8125rem; }
  .brand-mark { width: 22px; }
  .brand-mark .icon { width: 22px; height: 22px; }
  .header-actions #compare { padding: 8px; font-size: .75rem; }
  #open-tools { display: inline-flex; }
  main { width: 100%; max-width: none; flex: 1; min-height: 0; display: flex; flex-direction: column; padding: 0 6px 6px; }
  .work-title { padding: 0 4px 4px; min-height: 22px; flex: none; justify-content: flex-end; }
  .work-title h1 { display: none; }
  #save-status { font-size: .75rem; }
  .workspace { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0,1fr); grid-template-rows: minmax(326px,62%) minmax(110px,1fr); gap: 6px; align-items: stretch; }
  .editor { position: relative; display: grid; grid-template-rows: 44px minmax(0,1fr) 44px; gap: 6px; width: 100%; min-height: 0; padding: 8px; border-radius: 9px; overflow: hidden; }
  .editor-head { margin: 0; flex-wrap: nowrap; height: 44px; gap: 4px; }
  .tabs { padding: 0; gap: 0; flex: none; }
  .tabs button { padding: 6px 12px; min-width: 44px; }
  .tabs button span { display: none; }
  #bag-settings { width: auto; margin-left: auto; min-width: 0; padding: 6px; white-space: nowrap; font-size: .75rem; }
  .bag-settings-label { display: inline; }
  #bag-settings .icon { width: 18px; height: 18px; }
  .editor .canvas-surround { position: relative; min-height: 0; display: flex; flex-direction: column; align-items: stretch; justify-content: center; padding: 4px; border-radius: 7px; overflow: hidden; }
  .editor .canvas-meta { position: absolute; left: 4px; right: 4px; top: 4px; z-index: 1002; pointer-events: none; }
  .bag-color-control, #toggle-canvas { pointer-events: auto; }
  .bag-color-control { min-height: 44px; width: 44px; padding: 7px; justify-content: center; }
  .bag-color-control > span { display: none; }
  #toggle-canvas { display: inline-flex; min-height: 44px; padding: 6px; gap: 4px; font-size: .75rem; }
  #toggle-canvas .icon { width: 16px; height: 16px; }
  .editor .bag-stage { flex: none; margin: 0 auto; max-width: 100%; padding-top: 18px; }
  .editor .bag-handle { height: 36px; border-width: 7px; border-radius: 35px 35px 0 0; }
  .editor .bag-frame { padding: 4px; border-width: 4px; border-radius: 14px; }
  .editor .bag-window { border-width: 2px; border-radius: 8px; }
  .editor .canvas-bottom { flex: none; padding-top: 2px; display: flex; justify-content: center; gap: 8px; font-size: .75rem; line-height: 18px; }
  #mobile-plan-summary { display: inline; color: #694a13; }
  .editor .placement-feedback-slot { flex: none; font-size: .75rem; line-height: 18px; min-height: 18px; }
  #selection-slot, .editor > .fill-summary { display: none; }
  .edit-actions { margin: 0; height: 44px; gap: 6px; flex-wrap: nowrap; }
  .edit-actions #undo { min-height: 44px; width: 44px; padding: 10px; }
  .edit-actions .primary { min-height: 44px; padding: 8px; }
  .sidebar { min-height: 0; overflow-y: auto; overscroll-behavior: contain; scroll-padding-top: 56px; scroll-padding-bottom: 6px; gap: 0; border: 1px solid var(--line); border-radius: 9px; background: white; overflow-anchor: none; }
  .inventory-panel { border: 0; padding: 6px; border-radius: 0; }
  .inventory-panel .section-head { position: sticky; top: -6px; z-index: 2; background: white; margin: -6px -6px 6px; padding: 6px; flex-wrap: nowrap; }
  .inventory-panel h2 { font-size: .875rem; white-space: nowrap; }
  #add-good { font-size: .75rem; padding: 6px 8px; }
  .inventory { gap: 6px; }
  .inventory-card { grid-template-columns: 34px minmax(0,1fr) auto; padding: 6px; gap: 6px; }
  .inventory-image { width: 34px; height: 44px; }
  .inventory-card strong { font-size: .8125rem; line-height: 1.3; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
  .inventory-card small, .remaining { font-size: .75rem; line-height: 1.3; }
  .inventory-actions { gap: 4px; }
  .inventory-card button { padding: 6px; font-size: .75rem; }
  .inventory-edit { min-width: 58px; gap: 4px; }
  .inventory-add { min-width: 44px; width: 44px; }
  .inventory-add .button-label { display: none; }
  #tools-slot:empty { display: none; }
  .notice { position: fixed; z-index: 2100; top: 56px; left: 8px; right: 8px; margin: 0; padding: 8px 10px; max-height: 110px; overflow: auto; font-size: .8125rem; }
  body > footer { display: none; }
  body.canvas-expanded .workspace { grid-template-rows: minmax(0,1fr); }
  body.canvas-expanded .sidebar { display: none; }
  body.canvas-expanded .editor .bag-stage { padding-top: 44px; }
  .mode-choices label { min-height: 44px; padding: 8px; }
  .preview-label { margin-bottom: 4px; }
  .preview-count { margin-top: 4px; }
  .arrange-footer { padding-top: 6px; }
}
@media (max-width: 720px) and (max-height: 510px) {
  .work-title { display: none; }
  .workspace { grid-template-rows: minmax(170px,56%) minmax(100px,1fr); }
  .editor { grid-template-rows: 40px minmax(0,1fr) 40px; padding: 4px; gap: 3px; }
  .editor-head { height: 40px; }
  .editor .bag-stage { padding-top: 0; }
  .editor .bag-handle { display: none; }
  .editor .placement-feedback-slot { display: none; }
}
@media (prefers-reduced-motion: reduce) { .good.just-added img { animation: none; } }

.dialog-notice { padding: 8px; border: 1px solid var(--control); border-radius: 6px; font-size: .875rem; }
.dialog-notice.error { color: #8c2f20; border-color: #a34132; background: #fff2ef; }
.appearance-choices { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 12px 0; }
.appearance-choices label { display: flex; align-items: center; gap: 6px; padding: 6px 8px; min-height: 48px; margin: 0; border: 1px solid var(--control); border-radius: 8px; font-size: .875rem; }
.appearance-choices label:has(input:checked) { border-color: var(--accent); background: #f0f5fb; box-shadow: inset 0 0 0 1px var(--accent); }
.appearance-choices input { margin: 0; flex: none; }
.pattern-sample { width: 32px; height: 32px; display: block; flex: none; }

/* Reserve the status lane before dragging so bag scale and pointer geometry stay stable. */
.canvas-status { position: relative; flex: none; min-height: 44px; }
#placement-drop { position: absolute; z-index: 1003; inset: 0; display: flex; align-items: center; justify-content: flex-start; gap: 8px; min-height: 44px; padding: 4px 12px; border: 2px dashed var(--ink); border-radius: 8px; background: white; color: var(--ink); pointer-events: none; }
#placement-drop[hidden] { display: none; }
#placement-drop.drop-ready { border-style: solid; background: var(--ink); color: white; }
.dragging .canvas-status > :not(#placement-drop) { visibility: hidden; }
.dragging .canvas-item-action { visibility: hidden; }
.drag-source { opacity: .2; }
.drag-ghost { position: fixed; z-index: 2000; pointer-events: none; opacity: .8; }
.drag-ghost img { display: block; width: 100%; height: 100%; }
.manual-item-row { display: flex; align-items: center; gap: 8px; min-height: 48px; padding: 8px 0; }
.manual-item-row img { width: 32px; height: 36px; object-fit: contain; }
.manual-item-row input { flex: none; }
.manual-item-row small { display: block; color: var(--muted); font-size: .8125rem; }
#delete-good { margin-bottom: 8px; min-height: 44px; }

.inventory-delete .icon { width: 16px; height: 16px; }
@media (max-width: 720px) { .inventory-delete { min-width: 58px; gap: 4px; } }
/* Desktop's narrow sidebar needs a full-width action row to keep names legible. */
@media (min-width: 721px) {
  .inventory-card { grid-template-columns: 46px minmax(0, 1fr); }
  .inventory-actions { grid-column: 1 / -1; justify-content: flex-end; flex-wrap: wrap; }
}
.arrange-controls .manual-item-row { display: flex; }

/* Keep item names full-width and the placement stepper on a separate action row. */
.inventory-card { grid-template-columns: 46px minmax(0,1fr); }
.inventory-actions { grid-column: 1 / -1; justify-content: space-between; flex-wrap: nowrap; }
.inventory-stepper { display: flex; align-items: center; gap: 2px; flex: none; }
.inventory-stepper button { width: 44px; min-width: 44px; min-height: 44px; padding: 8px; }
.inventory-stepper .button-label { display: none; }
.inventory-placed { width: 42px; flex: none; text-align: center; font-variant-numeric: tabular-nums; }
.inventory-placed small { display: block; font-size: .6875rem; line-height: 1.2; }
.inventory-placed .inventory-placed-count { display: block; font-size: 1rem; line-height: 1.3; }
@media (max-width: 720px) {
 .inventory-card { grid-template-columns: 34px minmax(0,1fr); padding: 4px; }
 .inventory-actions { gap: 4px; }
 .inventory-info strong { -webkit-line-clamp: 2; }
 .inventory-image { height: 34px; }
 .inventory-info small, .inventory-info .remaining { display: inline; white-space: nowrap; }
 .inventory-info .remaining { margin: 0 0 0 8px; }
}
/* Short phones retain a usable bag and a complete action row below the sticky heading. */
@media (max-width: 720px) and (min-height: 566px) and (max-height: 600px) {
 .workspace { grid-template-rows: minmax(306px,62%) minmax(170px,1fr); }
 .editor .bag-handle { height: 20px; }
 .editor .bag-stage { padding-top: 0; }
 body.canvas-expanded .workspace { grid-template-rows: minmax(0,1fr); }
}

@media (max-width: 720px) and (min-height: 511px) {
 .editor { gap: 4px; }
 .editor .canvas-surround { padding-top: 2px; padding-bottom: 2px; }
}

@media (max-width: 720px) { #bag-settings { display: grid; grid-template-columns: auto auto; gap: 0 4px; line-height: 1.3; } #bag-settings .bag-settings-label { grid-column: 1; } #bag-size { grid-column: 1; font-size: .6875rem; } #bag-settings > .icon { grid-column: 2; grid-row: 1 / 3; } }

/* One goods form, with a separate optional photo editor. */
.goods-form { height: auto; max-height: 94dvh; }
.goods-form .wizard-body { padding: 14px 20px; }
.goods-form .wizard-step + .wizard-step { margin-top: 18px; }
.goods-form .wizard-step > h3 { margin: 0 0 8px; font-size: .875rem; }
.goods-form .help { margin-top: 4px; font-size: .8125rem; }
.goods-form .dimension-equivalent { margin: 4px 0 0; }
.goods-form .goods-review { margin: 0 0 8px; padding: 8px; gap: 10px; }
.goods-form .goods-review img { width: 48px; height: 56px; }
.goods-form .photo-buttons button { min-height: 44px; }
.photo-edit-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.optional-label { color: var(--muted); font-weight: 400; margin-left: 6px; }
#delete-good { margin: 12px 0 0; }
.photo-dialog { width: min(560px, calc(100vw - 16px)); max-height: 96dvh; padding: 0; }
.photo-editor-form { display: flex; flex-direction: column; max-height: 94dvh; }
.photo-editor-form .wizard-body { padding: 12px 16px; }
.photo-editor-form .wizard-header h2 { margin: 0; font-size: 1.125rem; }
.photo-editor-form #crop-canvas { height: clamp(100px, 35dvh, 300px); }
@media (max-width: 720px) {
 .goods-form .wizard-header { padding: 10px 12px; }
 .goods-form .wizard-body { padding: 12px; }
 .goods-form .wizard-footer { padding: 10px 12px; }
 .goods-form .wizard-step + .wizard-step { margin-top: 14px; }
 .photo-editor-form .wizard-header, .photo-editor-form .wizard-footer { padding: 10px 12px; }
}

/* Purchasing is counted per proposal. Keep the drag target's reserved lane. */
.sr-only { position:absolute!important; width:1px!important; height:1px!important; padding:0!important; margin:-1px!important; overflow:hidden!important; clip:rect(0,0,0,0)!important; white-space:nowrap!important; border:0!important; }
.save-error { margin:4px 0; padding:8px; border:2px solid #a52a2a; color:#8b2020; background:#fff2f2; font-weight:600; }
.purchase-counts { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:8px; margin:4px 0; }
.purchase-counts span { display:flex; flex-direction:column; }
.purchase-counts strong { font-variant-numeric:tabular-nums; }
.purchase-counts.needs-purchase span:last-child { color:#854300; }
.inventory-info .remaining { display:block; margin:0; font-size:.75rem; color:var(--muted); }
#purchase-context { margin:0 0 6px; font-size:.75rem; }
.good.planned { opacity:.85; }
.plan-symbol { display:none; }
#bag-settings { display:flex; flex-wrap:nowrap; gap:4px; white-space:nowrap; min-height:44px; }
#bag-size { font-size:inherit; }
@media(max-width:720px){
 .workspace { grid-template-rows:minmax(300px,56%) minmax(140px,1fr); }
 .inventory-panel .section-head { flex-wrap:wrap; gap:0 4px; }
 .inventory-panel h2 { white-space:normal; }
 .purchase-counts small { display:block; }
 .inventory-info .remaining { display:block; white-space:normal; margin:0; }
 #bag-settings { display:flex; font-size:.75rem; padding:4px 6px; }
 #bag-settings > .icon { display:none; }
 .edit-actions #redo { min-width:44px; min-height:44px; padding:8px; }
 .edit-actions #redo > span:not([data-icon]) { display:none; }
}

.notice:not(.error) { pointer-events:none; }

/* Keep the purchasing row compact enough to show as many goods as before. */
.inventory-info > small { display:none; }
.purchase-counts span { flex-direction:row; align-items:baseline; gap:3px; white-space:nowrap; }
.purchase-counts { gap:4px; margin:2px 0; }
.purchase-counts small { margin:0; font-size:.75rem; }
.purchase-counts strong { font-size:.875rem; }
.inventory-info .remaining:empty { display:none; }
.notice:not(.error) { position:fixed; z-index:2100; top:auto; bottom:12px; left:50%; right:auto; transform:translateX(-50%); width:max-content; max-width:calc(100vw - 24px); margin:0; padding:6px 12px; }
@media(max-width:720px){.workspace { grid-template-rows:minmax(306px,60.3%) minmax(140px,1fr); }}

@media(max-width:720px) and (max-height:510px){.workspace { grid-template-rows:minmax(170px,60.3%) minmax(100px,1fr); }}

/* Purchase marks are a display layer; planned stock is shown in its original color. */
.good.planned { opacity:1; outline:none; }
.good.purchase-missing img { filter:grayscale(.65) brightness(.9); }
.purchase-symbol { position:absolute; right:1px; top:1px; width:clamp(10px,35%,19px); aspect-ratio:1; display:grid; place-items:center; border:1px solid #303943; border-radius:50%; background:#fff; color:#20262d; pointer-events:none; }
.purchase-symbol .icon { width:85%; height:85%; }
.good.purchase-highlight { box-shadow:inset 0 0 0 3px #005a91; }
.good.purchase-highlight .purchase-symbol { background:#005a91; color:#fff; border-color:#fff; }
#purchase-view { min-height:44px; padding:4px 8px; font-size:.75rem; margin:auto; }
.canvas-status { display:flex; justify-content:center; align-items:center; }
.purchase-counts { display:flex; flex-wrap:wrap; justify-content:flex-start; align-items:center; column-gap:7px; row-gap:6px; }
.purchase-counts .purchase-toggle { display:inline-flex; gap:3px; padding:0 4px; min-height:44px; border:1px solid #717b85; border-radius:6px; font-size:.75rem; color:var(--text); }
.purchase-toggle .icon { width:13px; height:13px; }
.purchase-toggle[aria-pressed=true] { border-color:#005a91; background:#e7f3ff; }
.purchase-counts [hidden], .purchase-symbol[hidden] { display:none; }

/* Quiet secondary actions keep their labels and touch targets without boxed chrome. */
#compare, #bag-settings, #toggle-canvas, #undo, #redo, .inventory-edit, .inventory-delete,
.purchase-counts .purchase-toggle, #purchase-view { border-color:transparent; background:transparent; box-shadow:none; }
#compare, #bag-settings, .inventory-edit, .inventory-delete { white-space:nowrap; writing-mode:horizontal-tb; }
#compare .icon { width:16px; height:16px; }
.inventory-card .inventory-edit, .inventory-card .inventory-delete { flex:0 0 auto; min-width:60px; padding:8px 4px; gap:4px; text-decoration:none; }
.inventory-actions { gap:4px; }
.inventory-stepper { gap:0; }
.inventory-stepper button { border-color:transparent; background:#f1f3f5; }
.inventory-stepper button:disabled, #undo:disabled, #redo:disabled { background:transparent; color:#7a838c; border-color:transparent; }
#compare:hover, #bag-settings:hover, #toggle-canvas:hover, #undo:not(:disabled):hover, #redo:not(:disabled):hover,
.inventory-edit:hover, .inventory-delete:hover, .purchase-counts .purchase-toggle:hover, #purchase-view:hover { background:#e8edf1; }
#compare:active, .inventory-edit:active, .inventory-delete:active, .purchase-counts .purchase-toggle:active { background:#dce5ec; }
.purchase-counts .purchase-toggle { padding:0 2px; gap:3px; color:#245878; text-decoration:underline; text-underline-offset:3px; border-radius:5px; }
.purchase-toggle .icon { order:-1; }
.purchase-counts .purchase-toggle[aria-pressed=true] { background:#e2eff9; color:#17436b; text-decoration-thickness:2px; }
#purchase-view { gap:7px; font-weight:500; color:var(--muted); padding:0 6px; }
.switch-track { display:block; position:relative; width:30px; height:18px; flex:none; background:#78848e; border-radius:10px; }
.switch-track::after { content:''; position:absolute; width:12px; height:12px; top:3px; left:3px; border-radius:50%; background:#fff; }
#purchase-view[aria-checked=true] .switch-track { background:#245878; }
#purchase-view[aria-checked=true] .switch-track::after { transform:translateX(12px); }
.inventory-panel > .section-head { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:6px; align-items:center; }
.inventory-heading { display:flex; align-items:baseline; flex-wrap:wrap; column-gap:8px; row-gap:0; min-width:0; }
.inventory-heading h2 { font-size:.875rem; white-space:nowrap; line-height:1.5; }
#purchase-context { display:inline-flex; align-items:center; gap:3px; font-size:.6875rem; margin:0; white-space:nowrap; }
#purchase-context .icon { width:13px; height:13px; }
#add-good { white-space:nowrap; padding:6px 8px; gap:4px; }
#placement-drop { inset:auto; bottom:0; left:50%; transform:translateX(-50%); width:56px; height:44px; min-height:44px; padding:0; border:0; background:transparent; justify-content:center; }
#placement-drop::before { content:''; position:absolute; width:44px; height:44px; border:1px solid #78848e; border-radius:50%; background:#fff; }
#placement-drop > [data-icon] { position:relative; }
#placement-drop .icon { width:22px; height:22px; }
#placement-drop.drop-ready { background:transparent; color:#fff; }
#placement-drop.drop-ready::before { background:#8c2f20; border:3px solid #fff; box-shadow:0 0 0 2px #8c2f20; }
@media(min-width:721px){.inventory-card { padding:8px; gap:6px; }.inventory-actions { flex-wrap:wrap; justify-content:space-between; }.inventory-stepper { order:0; }}

.drag-ghost.over-trash { opacity:.2; }

.inventory-heading { align-items:center; }
.purchase-counts .purchase-toggle { text-decoration:none; }
.purchase-counts .purchase-link-text { display:inline; text-decoration:underline; text-underline-offset:3px; white-space:nowrap; }
.purchase-toggle[aria-pressed=true] .purchase-link-text { text-decoration-thickness:2px; }
#preview-leftovers ul { margin:8px 0 0; padding-left:20px; }
#preview-leftovers li { padding-left:2px; margin:0 0 8px; overflow-wrap:anywhere; }
#preview-leftovers li > strong, #preview-leftovers li > span, #preview-leftovers li > small { display:block; }
#preview-leftovers li > strong { font-size:.875rem; }
#preview-leftovers li > small { color:var(--muted); }
#add-good { font-size:.75rem; }

.purchase-counts { margin-top:6px; }
.preview-quantity, #preview-target { white-space:nowrap; }
.preview-quantity { display:inline-block; }
/* Keep the preview visible while only the settings and quantity details scroll. */
.arrange-body { display:grid; overflow:hidden; }
.live-preview-panel { overflow:hidden; margin-bottom:0; }
.live-window-wrap { min-height:0; }
.arrange-controls { min-height:0; overflow-y:auto; }
#preview-leftovers { padding:8px 0 12px; margin-bottom:12px; border-bottom:1px solid var(--line); }
#preview-leftovers > summary { font-weight:600; }
@media(max-width:720px){
 .arrange-body { display:flex; flex-direction:column; }
 .live-window-wrap { height:clamp(100px,23dvh,215px); min-height:0; }
 .arrange-controls { flex:1; }
}
@media(max-height:600px) and (max-width:720px){.live-window-wrap { height:clamp(48px,15dvh,90px); }}

.inventory-edit, .inventory-delete { border-color:var(--line); }

.purchase-counts .purchase-toggle, .purchase-counts .purchase-zero {
 display:inline-flex; align-items:center; gap:3px; min-height:44px; padding:0 2px;
 border:1px solid transparent; font-family:inherit; font-size:.75rem; font-weight:600; line-height:1.5; letter-spacing:normal;
}
.purchase-counts .purchase-zero { color:var(--muted); }
.purchase-zero .icon { width:13px; height:13px; order:-1; }
.purchase-counts .purchase-zero .purchase-link-text { text-decoration:none; }
.purchase-counts .purchase-toggle[hidden], .purchase-counts .purchase-zero[hidden] { display:none; }
@media(max-height:600px) and (min-width:600px){
 .arrange-body { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr); }
 .live-window-wrap { height:auto; flex:1; }
}

#toggle-canvas { border-color:var(--line); }
