html, body { margin: 0; height: 100%; overflow: hidden; font: 14px system-ui, sans-serif; background: #1e2127; color: #ddd; }
#view { position: absolute; inset: 30px 260px 0 0; }
#panel { position: absolute; top: 30px; right: 0; bottom: 0; width: 260px; box-sizing: border-box; padding: 12px; background: #282c34; overflow-y: auto; }
h3 { margin: 14px 0 6px; font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: #8b93a1; }
#objList { display: flex; flex-direction: column; gap: 2px; min-height: 80px; max-height: 260px; overflow-y: auto; border: 1px solid #3a3f4b; border-radius: 4px; padding: 2px; background: #22252b; }
#objList:empty::before { content: 'No objects'; color: #6b7280; font-size: 12px; text-align: center; padding: 28px 0; }
.objRow { display: flex; align-items: center; border-radius: 3px; border: 1px solid transparent; cursor: pointer; }
.objRow:hover { background: #2f343e; }
.objRow.sel { background: #3b3f8f; border-color: #7a6cf0; }
.objFlag { flex: none; width: 24px; height: 24px; padding: 0; margin-right: 2px; background: none; border: none; color: #8b93a1; }
.objHead { display: flex; align-items: center; justify-content: space-between; }
.objHead .objHeadBtns { display: flex; }
.objFlag:disabled { opacity: .35; pointer-events: none; }
.objFlag:hover { background: #3a404b; color: #fff; }
.objFlag.on { color: #e5a44a; }
.objRow.off input { opacity: .5; }
.objRow input { flex: 1; min-width: 0; width: 100%; box-sizing: border-box; background: transparent; color: #ddd; border: 0; padding: 4px 6px; font: inherit; cursor: pointer; outline: none; }
.objRow input:not([readonly]) { background: #1e2127; cursor: text; outline: 1px solid #7a6cf0; }
h3:first-child { margin-top: 0; }
/* separators between the option groups */
#panel h3 { margin-top: 12px; padding-top: 12px; border-top: 1px solid #3d4350; }
#panel > h3:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
#mirrorRow, #chamferRow, #boolRow, #smoothRow { margin-bottom: 0; }
#chamferRow { margin-top: 10px; }
button { background: #3a404b; color: #ddd; border: 1px solid #4b5262; border-radius: 4px; padding: 6px 10px; cursor: pointer; }
button:hover { background: #465062; }
button:disabled { opacity: .4; cursor: default; }
button:disabled:hover { background: #3a404b; }
button.active { background: #2f6fdb; border-color: #4c8bf5; color: #fff; }
.row { display: flex; gap: 6px; margin-bottom: 6px; flex-wrap: wrap; }
.grid3 { display: grid; grid-template-columns: auto 1fr 1fr 1fr; gap: 4px; align-items: center; margin-bottom: 4px; }
input[type=number] { width: 100%; box-sizing: border-box; background: #1e2127; color: #ddd; border: 1px solid #4b5262; border-radius: 3px; padding: 3px; }
input[type=checkbox] { appearance: none; -webkit-appearance: none; width: 15px; height: 15px; margin: 0 3px 0 0; vertical-align: -3px; background: #1e2127; border: 1px solid #4b5262; border-radius: 3px; cursor: pointer; display: inline-grid; place-content: center; }
input[type=checkbox]:checked { background: #4c8bf5; border-color: #4c8bf5; }
input[type=checkbox]:checked::after { content: ''; width: 4px; height: 8px; border: solid #fff; border-width: 0 2px 2px 0; transform: translateY(-1px) rotate(45deg); }
input[type=checkbox]:disabled { opacity: .45; cursor: default; }
input[type=color] { width: 44px; height: 26px; padding: 0; border: none; background: none; }
.hint { font-size: 12px; color: #8b93a1; line-height: 1.5; }
#navWrap { position: absolute; top: 40px; right: 270px; display: flex; align-items: center; gap: 6px; z-index: 2; }
#nav { display: flex; align-items: center; gap: 4px; padding: 4px 6px; background: #282c34ee; border: 1px solid #4b5262; border-radius: 8px; font-size: 12px; color: #8b93a1; }
#navHome { display: flex; align-items: center; gap: 6px; font-size: 12px; color: #8b93a1; }
#createWrap { position: absolute; top: 40px; left: 15.67px; height: 32.67px; display: flex; align-items: center; gap: 6px; z-index: 2; }
#gCreate, #gTools { position: relative; }
#gCreate > button, #gTools > button { position: relative; display: inline-flex; align-items: center; gap: 4px; padding: 4px 8px; font-size: 12px; }
#gCreate > button::after, #gTools > button::after { content: ""; position: absolute; top: calc(100% + 3px); left: 50%; display: none; border: 6px solid transparent; border-top-color: #282c34ee; transform: translateX(-50%); }
#gCreate.open > button::after, #gTools.open > button::after { display: block; }
#gCreate .flyout, #gTools .flyout { display: none; position: absolute; top: calc(100% + 9px); left: 0; flex-direction: row; gap: 4px; padding: 5px; background: #282c34ee; border: 1px solid #4b5262; border-radius: 8px; }
#gCreate.open .flyout, #gTools.open .flyout { display: flex; }
#gTools > button:disabled, #gTools .flyout button:disabled { opacity: .35; cursor: default; }
#gCreate .flyout button, #gTools .flyout button { display: inline-flex; align-items: center; gap: 4px; padding: 4px 8px; font-size: 12px; white-space: nowrap; }
#nav button, #navHome button { padding: 4px 8px; font-size: 12px; }
#navTools { position: absolute; top: 82px; right: 270px; display: flex; flex-direction: column; align-items: center; gap: 6px; z-index: 2; touch-action: none; }
#navGizmo { cursor: grab; }
#navTools button { width: 36px; height: 36px; padding: 0; font-size: 16px; border-radius: 50%; cursor: grab; touch-action: none; }
#status { position: absolute; left: 10px; bottom: 8px; font-size: 12px; color: #8b93a1; pointer-events: none; }
#toolbar { position: absolute; top: 122px; left: 10px; display: flex; flex-direction: column; gap: 4px; padding: 5px; background: #282c34ee; border: 1px solid #4b5262; border-radius: 8px; z-index: 2; }
#toolbar button { display: flex; flex-direction: column; align-items: center; width: 74px; padding: 5px 4px; font-size: 11px; }
.ico { display: inline-block; width: 1em; height: 1em; background: currentColor; -webkit-mask: var(--icon) center / contain no-repeat; mask: var(--icon) center / contain no-repeat; vertical-align: -0.15em; }
#toolbar button i { display: flex; align-items: center; justify-content: center; width: 22px; height: 22px; }
#toolbar button i .ico { width: 20px; height: 20px; }
#navHome button, #nav button { display: inline-flex; align-items: center; gap: 4px; }
#navTools button .ico { width: 20px; height: 20px; }
#toolbar button:disabled { opacity: .35; cursor: default; }
#toolbar .sep { height: 1px; background: #4b5262; margin: 2px 0; }
#toolbar .group { position: relative; }
#toolbar .group button { width: 100%; box-sizing: border-box; }
#toolbar .flyout { display: none; position: absolute; left: calc(100% + 10px); top: -5px; flex-direction: column; gap: 4px; padding: 5px; background: #282c34ee; border: 1px solid #4b5262; border-radius: 8px; }
#toolbar .flyout::before { content: ""; position: absolute; right: 100%; top: 18px; border: 6px solid transparent; border-right-color: #4b5262; }
#toolbar .group.open .flyout { display: flex; }
#params { display: grid; grid-template-columns: 1fr 80px; gap: 4px 8px; align-items: center; margin-bottom: 8px; }
#menubar { position: absolute; top: 0; left: 0; right: 0; height: 30px; display: flex; align-items: stretch; background: #21252b; border-bottom: 1px solid #4b5262; z-index: 5; }
.menu { position: relative; }
.menu > button { height: 100%; background: none; border: none; border-radius: 0; padding: 0 14px; }
.menu.open > button, .menu > button:hover { background: #3a404b; }
.menu .dropdown { display: none; position: absolute; top: 100%; left: 0; min-width: 160px; flex-direction: column; background: #282c34; border: 1px solid #4b5262; border-radius: 0 0 6px 6px; padding: 4px 0; }
.menu.open > .dropdown { display: flex; }
.msep { height: 1px; background: #4b5262; margin: 4px 0; }
.sub { position: relative; display: flex; flex-direction: column; }
.subhead { display: flex; justify-content: space-between; gap: 16px; }
.subdrop { display: none; position: absolute; left: 100%; top: -5px; min-width: 150px; flex-direction: column; background: #282c34; border: 1px solid #4b5262; border-radius: 6px; padding: 4px 0; }
.sub:hover > .subdrop { display: flex; }
.sub:hover > .subhead { background: #3a404b; }
.dropdown button { display: flex; justify-content: space-between; gap: 28px; white-space: nowrap; background: none; border: none; border-radius: 0; text-align: left; padding: 6px 14px; }
.dropdown .mi { display: inline-flex; align-items: center; gap: 8px; }
.dropdown button:disabled { opacity: .4; cursor: default; }
.dropdown button:disabled:hover { background: none; color: #ddd; }
.dropdown button:hover { background: #2f6fdb; color: #fff; }
#mViewport .dropdown button[data-shading]::after { content: "✓"; visibility: hidden; }
#mViewport .dropdown button[data-shading].active::after { visibility: visible; }
dialog.help { background: #282c34; color: #ddd; border: 1px solid #4b5262; border-radius: 8px; max-width: 520px; }
dialog.help::backdrop { background: #0008; }
.kb { opacity: .6; font-size: 11px; align-self: center; }
kbd { display: inline-block; font: 11px/1 ui-monospace, Menlo, monospace; background: #3a404b; border: 1px solid #5c6370; border-bottom-width: 2px; border-radius: 4px; padding: 2px 5px; margin-left: 6px; color: #eee; }
#tip { position: fixed; z-index: 50; pointer-events: none; background: #14171c; color: #ddd; border: 1px solid #4b5262; border-radius: 6px; padding: 5px 8px; font-size: 12px; white-space: nowrap; opacity: 0; transition: opacity .12s; }
#tip.show { opacity: 1; }
#keysTable h4 { margin: 12px 0 4px; color: #e5a44a; }
#keysTable table { width: 100%; border-collapse: collapse; }
#keysTable td { padding: 2px 0; border-bottom: 1px solid #333943; }
#keysTable td:last-child { text-align: right; white-space: nowrap; }
.ver { font-size: 12px; opacity: .6; margin-top: -6px; }
[hidden] { display: none !important; }
#props.multi .grid3 { opacity: .4; pointer-events: none; }
#props.disabled { opacity: .4; pointer-events: none; }
#logoBtn { display: flex; align-items: center; gap: 7px; height: 100%; padding: 0 12px 0 10px; background: none; border: none; border-radius: 0; font-weight: 700; letter-spacing: .04em; color: #e8e8f0; }
#logoBtn img { width: 22px; height: 22px; }
#logoBtn:hover { background: #3a404b; }
#splash { position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center; background: rgba(8, 9, 14, .55); transition: opacity .3s ease; }
#splash .card { display: flex; flex-direction: column; align-items: center; gap: 10px; width: 340px; padding: 30px 24px 22px; box-sizing: border-box; cursor: pointer;
  border: 1px solid #4b5262; border-radius: 14px; box-shadow: 0 20px 60px #000a;
  background: radial-gradient(circle at 50% 30%, #2c2f6b 0%, #1a1c2e 60%, #131420 100%); transition: transform .3s ease; }
#splash.hide .card { transform: scale(.94); }
#splash.hide { opacity: 0; pointer-events: none; }
#splash[hidden] { display: none; }
#splash .logo { width: 110px; height: 110px; filter: drop-shadow(0 0 22px #7a6cf088); animation: float 4s ease-in-out infinite; }
#splash h1 { margin: 0; font-size: 38px; letter-spacing: .06em; font-weight: 800; background: linear-gradient(90deg, #8fb4ff, #b08cff 50%, #ff9a4d); -webkit-background-clip: text; background-clip: text; color: transparent; }
#splash p { margin: 0; color: #9aa1b5; letter-spacing: .2em; text-transform: uppercase; font-size: 12px; }
#splash .go { margin-top: 12px; color: #6f7690; font-size: 12px; animation: pulse 1.8s ease-in-out infinite; }
#splash .copy { color: #6f7690; font-size: 11px; }
@keyframes float { 50% { transform: translateY(-8px); } }
@keyframes pulse { 50% { opacity: .3; } }

#selOpRow, #selShapeRow { display: flex; gap: 4px; }
#selOpRow button, #selShapeRow button { flex: 1; padding: 5px 0; }
#selOpRow .ico, #selShapeRow .ico { width: 20px; height: 20px; }
#selGroupRow, #selGroupRow2 { display: flex; gap: 4px; }
#selGroupName, #selGroupList { flex: 1; min-width: 0; 
  box-sizing: border-box; background: #1e2127; color: #ddd; border: 1px solid #4b5262; border-radius: 3px; padding: 3px; font: inherit; color-scheme: dark; }
#selGroupRow button, #selGroupRow2 button { padding: 4px 8px; }
#selBox { position: absolute; inset: 0; width: 100%; height: 100%; display: none; pointer-events: none; z-index: 3; }
#selBox polygon { fill: #4c8bf533; stroke: #7ab0ff; stroke-width: 1; stroke-dasharray: 5 3; }

#latDivRow { display: flex; gap: 4px; }
#latDivRow button { flex: 1; padding: 5px 0; }
#pivotRow { align-items: center; }
#pivotRow .pivotChk { display: inline-flex; align-items: center; gap: 3px; }
#pivotRow .ico { width: 18px; height: 18px; }
