/* Formbox · SciFi planning workbench · functional grid, real geometry, no decorative motion. */
@import url('./theme.css');
* {box-sizing:border-box;}
html,body {margin:0;overflow-x:clip;background:var(--bg);color:var(--ink);font:14px/1.5 var(--font);}
button,input,select {font:inherit;}
button,a,input,select,summary { -webkit-tap-highlight-color:transparent;}
button {cursor:pointer;}
button:disabled {cursor:not-allowed;opacity:.4;}
button:active:not(:disabled) {transform:translateY(1px);}
:focus-visible {outline:2px solid var(--accent);outline-offset:3px;}
[hidden] {display:none!important;}
::selection {background:var(--accent);color:var(--accent-ink);}
a {color:var(--accent);text-underline-offset:3px;}
.icon-definitions {position:absolute;width:0;height:0;overflow:hidden;}
.icon {width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.65;stroke-linejoin:round;stroke-linecap:round;flex-shrink:0;}
.visually-hidden {position:absolute;width:1px;height:1px;clip-path:inset(50%);overflow:hidden;white-space:nowrap;}
.app {max-width:2200px;margin:auto;}
.topbar {height:68px;display:flex;align-items:center;gap:44px;padding:0 24px;border-bottom:1px solid var(--line);background:var(--panel);}
.brand {display:flex;align-items:center;gap:10px;text-decoration:none;color:var(--ink);font-size:22px;font-weight:650;white-space:nowrap;}
.brand-icon {width:30px;height:32px;color:var(--accent);}
.brand-sub {color:var(--muted);font-size:12px;font-weight:400;border-left:1px solid var(--line-strong);padding-left:16px;margin-left:10px;}
.product-nav {display:flex;align-self:stretch;gap:26px;font-size:14px;}
.product-nav > * {display:flex;align-items:center;text-decoration:none;color:var(--muted);}
.product-nav [aria-current] {color:var(--ink);border-bottom:2px solid var(--accent);}
.product-nav a:hover {color:var(--accent);}
.header-actions {display:flex;align-items:center;gap:10px;margin-left:auto;}
.button {min-height:38px;display:inline-flex;align-items:center;justify-content:center;gap:8px;padding:0 13px;border:1px solid var(--line-strong);border-radius:5px;background:var(--panel-raised);color:var(--ink);white-space:nowrap;font-size:13px;}
.button:hover:not(:disabled) {background:var(--line);border-color:var(--muted);}
.button.primary {background:var(--accent);color:var(--accent-ink);border-color:var(--accent);font-weight:600;}
.button.primary:hover:not(:disabled) {filter:brightness(1.1);}
.button.quiet {background:transparent;border-color:var(--line);}
.icon-button {width:36px;height:36px;display:inline-grid;place-items:center;flex-shrink:0;padding:0;border:1px solid transparent;border-radius:4px;background:transparent;color:var(--muted);font-size:20px;}
.icon-button:hover:not(:disabled),.icon-button.active {color:var(--accent);background:var(--accent-soft);}
.icon-button.danger:hover:not(:disabled) {color:var(--error);background:var(--error-bg);}
.text-button {background:none;border:0;color:var(--muted);padding:4px 0;font-size:12px;min-height:30px;white-space:nowrap;}
.text-button:hover {color:var(--accent);}
.projectbar {height:74px;display:flex;align-items:center;justify-content:space-between;gap:20px;padding:0 24px;border-bottom:1px solid var(--line);}
.project-title {display:flex;align-items:center;gap:18px;min-width:0;}
.project-title input {font-size:19px;font-weight:550;background:transparent;border:1px solid transparent;width:225px;padding:4px 0;}
.project-title input:hover {border-bottom-color:var(--line-strong);}
#save-state {color:var(--subtle);font-size:12px;white-space:nowrap;}
.project-actions {display:flex;align-items:center;gap:8px;}
.workspace {display:grid;grid-template-columns:270px minmax(0,1fr) 286px;height:calc(100dvh - 178px);min-height:520px;}
.pane {background:var(--panel);overflow:auto;scrollbar-width:thin;scrollbar-color:var(--line-strong) var(--panel);}
.setup {border-right:1px solid var(--line);}
.inspector {border-left:1px solid var(--line);}
.pane-title {min-height:58px;display:flex;align-items:center;justify-content:space-between;gap:8px;padding:0 18px;border-bottom:1px solid var(--line);}
h1,h2,h3,p {margin:0;}
h1,h2 {font-size:15px;font-weight:550;line-height:1.3;}
h3 {font-size:14px;}
.pane-title > span {font-size:11px;color:var(--muted);}
.section {padding:18px;border-bottom:1px solid var(--line);}
.section-title {display:flex;justify-content:space-between;align-items:center;gap:8px;margin-bottom:14px;}
.section-title h2 {font-size:14px;}
.section-title > span,.section-title > .icon {color:var(--muted);font-size:12px;}
label {display:grid;gap:6px;color:var(--muted);font-size:12px;}
input,select {min-width:0;width:100%;height:37px;background:var(--surface);border:1px solid var(--line-strong);border-radius:4px;color:var(--ink);padding:0 8px;font-variant-numeric:tabular-nums;}
input:hover,select:hover {border-color:var(--muted);}
input[aria-invalid=true] {border-color:var(--error);}
input:disabled {color:var(--subtle);cursor:not-allowed;}
input[type=number] {appearance:textfield;}
input[type=number]::-webkit-inner-spin-button {display:none;}
select {padding-right:22px;cursor:pointer;}
.pair {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;}
.triple {display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;}
.hint {color:var(--muted);font-size:12px;line-height:1.6;margin-top:9px;}
.grid-fields {margin-top:18px;}
.cell-info {display:flex;align-items:center;gap:9px;margin-top:13px;font-size:12px;color:var(--accent);}
.cell-info .icon {width:15px;height:15px;}
.layer-row {display:grid;grid-template-columns:26px minmax(0,1fr) 52px;gap:7px;align-items:center;padding:7px 0;}
.layer-switch {display:grid;place-items:center;width:26px;height:30px;border:1px solid var(--line-strong);background:var(--surface);color:var(--muted);border-radius:3px;font-size:12px;}
.layer-row.active .layer-switch {color:var(--accent);border-color:var(--accent);background:var(--accent-soft);}
.layer-name {border-color:transparent;background:transparent;font-size:13px;padding:0 4px;}
.layer-height {height:32px;font-size:13px;text-align:center;padding:0 3px;}
summary {cursor:pointer;list-style:none;user-select:none;font-size:13px;}
summary::after {content:'+';float:right;color:var(--muted);}
details[open] > summary::after {content:'−';}
summary::-webkit-details-marker {display:none;}
.advanced .pair {margin-top:15px;}
.apply-drawer .button {width:100%;background:transparent;}
.apply-drawer .hint {font-size:11px;}
.buttons {margin-top:12px;gap:7px;}
.buttons .button {padding:0 7px;font-size:12px;}
.inline-error {font-size:12px;color:var(--error);margin-top:12px;}
.workarea {min-width:0;min-height:0;overflow:hidden;display:flex;flex-direction:column;background:var(--surface);position:relative;}
.editor-toolbar {height:58px;display:flex;align-items:center;gap:10px;padding:0 16px;border-bottom:1px solid var(--line);flex-shrink:0;}
.segmented {display:flex;border:1px solid var(--line);border-radius:5px;padding:3px;background:var(--bg);}
.segmented button {display:flex;align-items:center;justify-content:center;gap:7px;min-height:30px;padding:0 12px;background:transparent;border:0;border-radius:3px;color:var(--muted);font-size:12px;white-space:nowrap;}
.segmented button:hover {color:var(--ink);}
.segmented button.active {color:var(--accent);background:var(--accent-soft);}
.segmented .icon {width:15px;height:15px;}
.toolbar-divider {height:20px;border-left:1px solid var(--line);}
.edit-tools,.view-tools {display:flex;align-items:center;gap:2px;}
.view-tools {margin-left:auto;}
#zoom-value {min-width:40px;text-align:center;font-size:11px;color:var(--muted);font-family:var(--mono);}
.canvas-heading {display:flex;align-items:center;justify-content:space-between;padding:18px 22px 6px;gap:12px;flex-shrink:0;}
.canvas-heading > div:first-child {display:grid;gap:3px;}
#active-layer-name {font-size:14px;color:var(--ink);}
#layer-location {font-size:11px;color:var(--subtle);}
kbd {font:10px var(--mono);border:1px solid var(--line-strong);border-radius:2px;padding:2px 4px;margin-left:7px;color:var(--subtle);}
.tools button {padding:0 9px;}
.plan-surface {flex:1;min-height:0;overflow:auto;position:relative;display:flex;align-items:safe center;justify-content:safe center;padding:10px 18px 16px;scrollbar-width:thin;}
#board {width:100%;height:100%;min-height:0;display:block;flex-shrink:0;touch-action:none;user-select:none;}
.drawer-boundary {fill:var(--bg);stroke:var(--line-strong);stroke-width:1.4;vector-effect:non-scaling-stroke;}
.grid-lines {stroke:var(--line);stroke-width:.65;fill:none;vector-effect:non-scaling-stroke;}
.ruler-text {font-size:7px;fill:var(--subtle);font-family:var(--mono);}
.dimension-text {font-size:8px;fill:var(--muted);font-family:var(--mono);}
.bin-tile {cursor:grab;}
.bin-body {fill:color-mix(in srgb,var(--bin-color) 13%,var(--panel));stroke:var(--bin-color);stroke-width:1;vector-effect:non-scaling-stroke;}
.bin-tile:hover .bin-body {fill:color-mix(in srgb,var(--bin-color) 23%,var(--panel));stroke-width:1.5;}
.bin-tile.selected .bin-body {fill:color-mix(in srgb,var(--bin-color) 24%,var(--panel));stroke:var(--ink);stroke-width:2;}
.bin-tile:focus-visible {outline:none;}
.bin-tile:focus-visible .bin-body {stroke:var(--ink);stroke-width:3;}
.bin-label {fill:var(--ink);font-size:8px;font-weight:500;pointer-events:none;}
.bin-size {fill:var(--bin-color);font-size:7px;pointer-events:none;font-family:var(--mono);}
.bin-dividers {stroke:var(--bin-color);stroke-opacity:.4;stroke-width:1;fill:none;vector-effect:non-scaling-stroke;pointer-events:none;}
.group-symbol {stroke:var(--bin-color);stroke-width:2;vector-effect:non-scaling-stroke;}
.lid-symbol {stroke:var(--bin-color);fill:none;stroke-width:1;vector-effect:non-scaling-stroke;}
.bin-tile.below {opacity:.15;}
.bin-tile.locked {cursor:default;}
.resize-handle {fill:var(--ink);stroke:var(--bg);stroke-width:1;vector-effect:non-scaling-stroke;cursor:nwse-resize;}
.ghost {fill:var(--accent-soft);fill-opacity:.6;stroke:var(--accent);stroke-width:2;stroke-dasharray:5 3;vector-effect:non-scaling-stroke;}
.ghost.invalid {fill:var(--error-bg);stroke:var(--error);}
.empty-board {pointer-events:none;position:absolute;left:16%;right:16%;top:42%;text-align:center;}
.empty-board .icon {width:27px;height:27px;color:var(--accent);margin:0 auto 12px;display:block;}
.empty-board p {color:var(--muted);font-size:13px;margin-top:10px;}
.selection-toolbar {min-height:51px;display:flex;align-items:center;justify-content:space-between;gap:8px;padding:7px 18px;border-top:1px solid var(--line);flex-shrink:0;}
#selection-status {font-size:12px;color:var(--muted);min-width:0;}
.selection-actions {display:flex;gap:2px;}
.selection-actions .icon-button {width:32px;height:32px;}
.stage-stats {min-height:40px;display:flex;align-items:center;gap:16px;padding:6px 20px;border-top:1px solid var(--line);font-size:11px;color:var(--muted);flex-shrink:0;}
.stage-stats .check-label {margin-left:auto;font-size:11px;}
.check-label {display:inline-flex;align-items:center;gap:6px;font-size:12px;white-space:nowrap;cursor:pointer;}
input[type=checkbox] {width:15px;height:15px;margin:0;accent-color:var(--accent);cursor:pointer;}
#scene-tools {display:flex;gap:12px;}
.workspace-notes {padding:3px 20px 5px;border-top:1px solid var(--line);}
.workspace-notes button {white-space:normal;text-align:left;color:var(--warn);font-size:11px;}
.scene-surface {position:relative;flex:1;min-height:240px;overflow:hidden;}
#scene {display:block;width:100%;height:100%;cursor:grab;touch-action:none;}
#scene.dragging {cursor:grabbing;}
.scene-hint {position:absolute;left:22px;bottom:14px;font-size:11px;color:var(--subtle);pointer-events:none;}
.dimension-labels {position:absolute;inset:0;pointer-events:none;}
.dimension-labels svg {position:absolute;inset:0;}
.dimension-labels path {fill:none;stroke:var(--subtle);stroke-width:.8;}
.dimension {position:absolute;transform:translate(-50%,-50%);background:var(--surface);color:var(--muted);padding:2px 5px;font:11px var(--mono);white-space:nowrap;}
.scene-error {position:absolute;inset:20px 20px auto;padding:15px;background:var(--error-bg);color:var(--error);font-size:13px;}
.properties-empty {padding:23px 18px 28px;border-bottom:1px solid var(--line);}
.properties-empty .icon {color:var(--accent);width:25px;height:25px;margin-bottom:14px;}
.properties-empty p {color:var(--muted);font-size:13px;margin-top:9px;}
.properties-empty kbd {margin:0 3px;}
.property-form {padding:18px;border-bottom:1px solid var(--line);}
.property-form > label,.property-form > .pair,.property-form > .triple {margin-bottom:13px;}
.property-form .hint {font-size:11px;}
.property-form h3 {margin:20px 0 12px;border-top:1px solid var(--line);padding-top:17px;font-weight:500;}
.actual-size {padding:11px 12px;margin:0 0 17px;background:var(--bg);border-left:2px solid var(--accent);font-size:13px;font-family:var(--mono);}
.actual-size small {display:block;color:var(--muted);font:11px var(--font);margin-bottom:4px;}
.property-colors {display:flex;gap:9px;padding:1px 0 14px;}
.swatch {width:23px;height:23px;border:2px solid var(--panel);border-radius:4px;outline:1px solid transparent;}
.swatch:hover,.swatch.active {outline-color:var(--ink);}
.bin-option-toggle {display:flex;justify-content:space-between;align-items:center;padding:8px 0;}
.inventory-row {display:flex;align-items:center;gap:10px;width:100%;border:1px solid transparent;background:transparent;color:var(--muted);padding:9px 4px;min-height:40px;border-radius:4px;text-align:left;}
.inventory-row:hover {background:var(--panel-raised);color:var(--ink);}
.inventory-row.active {background:var(--accent-soft);color:var(--ink);border-color:var(--line-strong);}
.bin-dot {width:8px;height:8px;flex-shrink:0;border-radius:2px;background:var(--item-color);}
.inventory-row .item-name {min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:12px;}
.inventory-row .item-size {margin-left:auto;font:11px var(--mono);white-space:nowrap;}
.parking-row {display:flex;align-items:center;gap:8px;padding:7px 0;}
.parking-row .text-button {min-width:0;text-overflow:ellipsis;overflow:hidden;}
.parking-row .button {margin-left:auto;font-size:11px;min-height:30px;padding:0 9px;}
.statusbar {min-height:36px;display:flex;align-items:center;gap:20px;padding:4px 22px;border-top:1px solid var(--line);font-size:10px;color:var(--subtle);}
#action-status {margin-left:auto;}
.statusbar .text-button {font-size:11px;}
dialog {max-width:720px;width:calc(100% - 32px);max-height:85dvh;border:1px solid var(--line-strong);border-radius:8px;padding:26px;color:var(--ink);background:var(--panel);}
dialog::backdrop {background:#030a10c9;backdrop-filter:blur(4px);}
.dialog-heading {display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:18px;}
.dialog-heading h2 {font-size:20px;}
dialog p {font-size:14px;line-height:1.7;color:var(--muted);}
.dialog-actions {display:flex;flex-wrap:wrap;align-items:center;gap:9px;margin:20px 0 12px;}
.library-row {display:flex;align-items:center;justify-content:space-between;gap:14px;padding:15px 0;border-top:1px solid var(--line);}
.library-row .button {margin-left:auto;}
.library-row .hint {margin-top:4px;}
.library-row strong {font-weight:500;}
.export-choice {margin:20px 0 15px;}
.export-summary {background:var(--bg);padding:16px;border:1px solid var(--line);font-size:14px;margin-bottom:18px;}
#export-warnings ul {color:var(--warn);font-size:13px;padding-left:18px;line-height:1.6;}
#export-progress {min-height:24px;color:var(--accent);font-size:13px;}
.help-grid {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:28px;}
.help-grid h3 {margin:18px 0 7px;}
.shortcuts-list {display:grid;grid-template-columns:125px minmax(0,1fr);gap:8px;font-size:12px;color:var(--muted);}
.shortcuts-list dt {font-family:var(--mono);color:var(--ink);}.shortcuts-list dd {margin:0;}
.toast {position:fixed;left:50%;bottom:24px;transform:translateX(-50%);max-width:min(620px,calc(100% - 32px));background:var(--panel-raised);border:1px solid var(--line-strong);border-left:3px solid var(--accent);padding:13px 18px;box-shadow:0 12px 40px #0006;z-index:100;font-size:13px;}
.toast.error {border-left-color:var(--error);color:var(--error);}
.noscript {padding:20px;color:var(--error);}
@media(min-width:1700px){.workspace {grid-template-columns:292px minmax(0,1fr) 310px;}.section {padding:21px;}}
@media(max-width:1150px){.brand-sub {display:none;}.topbar {gap:30px;}.workspace {grid-template-columns:245px minmax(0,1fr) 255px;}.section,.property-form {padding:15px;}.pane-title {padding:0 15px;}.pane-title > span {font-size:10px;}.project-title {gap:12px;}#save-state {display:none;}.selection-toolbar {flex-wrap:wrap;gap:0;}.selection-actions {margin-left:auto;}.stage-stats {gap:10px;flex-wrap:wrap;}.stage-stats .check-label {margin-left:0;}.editor-toolbar {padding-inline:10px;gap:5px;}.canvas-heading {padding-inline:15px;}.tools kbd {display:none;}.product-nav {gap:20px;}.project-title input {width:180px;}}
@media(max-width:900px){.workspace {grid-template-columns:235px minmax(0,1fr);height:auto;min-height:0;}.workarea {height:670px;}.setup {grid-row:span 2;max-height:1250px;}.inspector {grid-column:2;max-height:650px;border-top:1px solid var(--line);}.property-form {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:0 16px;}.property-form > .actual-size,.property-form > h3,.property-form > .property-colors,.property-form > .hint,.property-form > details {grid-column:span 2;}.projectbar {padding:0 18px;gap:8px;}.project-actions {gap:5px;}.project-actions .quiet {padding-inline:9px;}.project-title input {width:155px;font-size:17px;}.system-label {display:none;}.statusbar {gap:10px;}.property-form h3 {margin:12px 0;}.inventory-section {display:none;}}
@media(max-width:620px){.topbar {height:60px;padding:0 14px;gap:12px;}.brand {font-size:20px;gap:6px;}.brand-icon {width:25px;}.product-nav {gap:14px;margin-left:auto;font-size:12px;}.product-nav [aria-current] {display:none;}.header-actions {gap:0;margin-left:0;}.header-actions .button {width:36px;padding:0;}.header-actions .button span {display:none;}.header-actions .icon-button {width:30px;}.projectbar {height:auto;min-height:99px;padding:13px 14px;align-items:flex-start;flex-wrap:wrap;gap:8px;}.project-title {width:100%;}.project-title input {width:100%;height:28px;font-size:18px;}.project-actions {width:100%;justify-content:space-between;}.project-actions .button {min-height:36px;font-size:12px;padding-inline:10px;}#export-open {margin-left:auto;}#save-project span {display:none;}#save-project {width:36px;padding:0;}#share {width:30px;}.workspace {display:flex;flex-direction:column;}.workarea {order:0;height:590px;}.setup {order:2;border-right:0;border-top:1px solid var(--line);max-height:none;overflow:visible;}.inspector {order:1;border:0;border-top:1px solid var(--line);max-height:none;overflow:visible;}.inspector .pane-title {min-height:52px;}.inspector .properties-empty {padding:16px;}.properties-empty .icon {display:none;}.properties-empty p {margin-top:4px;}.canvas-heading {padding:12px 14px 0;}.tools button {padding:0 9px;}.plan-surface {padding:6px;}.editor-toolbar {height:54px;}.view-tools {gap:0;}.editor-toolbar .icon-button {width:30px;}#zoom-value {min-width:35px;}.segmented button {padding:0 9px;}.selection-toolbar {padding:7px 12px;}.selection-actions .icon-button {width:32px;}.selection-toolbar > span {font-size:11px;}.stage-stats {padding:6px 14px;font-size:10px;gap:8px;}.stage-stats .check-label {font-size:10px;}.pane-title {padding:0 18px;}.section {padding:18px;}.setup .pane-title {min-height:54px;}.pane-title > span {font-size:12px;}.property-form {padding:18px;}.statusbar {padding:8px 14px;align-items:flex-start;}.statusbar .text-button {display:none;}#action-status {margin-left:0;font-size:11px;}dialog {padding:20px;}.dialog-heading h2 {font-size:18px;}.dialog-actions .button {flex:1;}.help-grid {grid-template-columns:minmax(0,1fr);gap:0;}.workspace-notes {padding:4px 14px;}.toast {bottom:12px;}.export-summary {padding:12px;}label {font-size:13px;}.button {min-height:40px;}.layer-row {grid-template-columns:34px minmax(0,1fr) 65px;}.layer-switch {height:36px;width:34px;}.layer-height {height:36px;}.section-title h2 {font-size:15px;}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after {animation:none!important;transition:none!important;scroll-behavior:auto!important;}}

.export-short {display:none;}
@media(max-width:620px){.export-long {display:none;}.export-short {display:inline;}}
