/* HWorld Retro 95–99. Independent theme; original styles.css is preserved. */
:root {
  color-scheme:light;
  font-family:Tahoma,Arial,sans-serif;
  font-size:14px;
  color:#202020;
  background-color:#d6d6d2;
  background-image:radial-gradient(#00000012 .5px,transparent .7px),radial-gradient(#ffffff70 .5px,transparent .7px);
  background-size:3px 3px,5px 5px;
  background-position:0 0,1px 2px;
  --panel:#d4d4ce;
  --light:#fafaf7;
  --edge:#777770;
  --green:#12602b;
  --red:#9d2020;
  --gold:#73520a;
}
* { box-sizing:border-box; border-radius:0; }
body { margin:0; }
[hidden] { display:none!important; }
header,main,footer { max-width:1640px; margin:auto; padding:20px; }
header { display:flex; align-items:center; gap:18px; background:#16305a; color:white; border:2px solid; border-color:#5577a3 #0c1830 #0c1830 #5577a3; padding:12px 20px; }
.brand { font:bold 25px Tahoma,Arial,sans-serif; letter-spacing:1px; }
header .brand { color:white; background:transparent; border:0; box-shadow:none; padding:0; }
header .brand:hover:not(:disabled) { background:transparent; text-decoration:underline; }
.site-tabs { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:8px; }
.site-tabs button.active,.site-tabs button.active:hover:not(:disabled) { color:white; background:#16305a; }
.dashboard { display:grid; grid-template-columns:minmax(0,2fr) minmax(250px,1fr); gap:16px; align-items:start; }
.dashboard section { margin:0; }
.world-tree { font-family:"Lucida Console","Courier New",monospace; }
.tree-group { margin:8px 0 8px 20px; border-left:1px solid var(--edge); padding-left:12px; }
.world-tree ul { list-style:none; margin:4px 0 10px; padding-left:18px; }
.world-tree summary,.world-name { color:inherit; font-weight:normal; }
.world-tree summary small { font-weight:normal; }
.world-row { border-left:1px solid var(--edge); padding:5px 12px; overflow-wrap:anywhere; }
.world-row small { display:block; font-size:11px; color:#55554f; margin-top:4px; }
.world-tree .main-group { color:var(--green); font-weight:bold; }
.world-tree .primary-world { color:var(--gold); font-weight:bold; }
.world-tree .main-world { font-weight:bold; }
#save-template { color:var(--green); font-weight:bold; }
.border-row { display:grid; grid-template-columns:auto minmax(100px,1fr); align-items:center; gap:8px 12px; }
.border-row label { margin:0; }
.border-row .field-default { grid-column:1/-1; margin:0; }
.badge { font:bold 11px Tahoma,Arial,sans-serif; letter-spacing:1px; border:1px solid #d9e0ef; padding:5px 8px; }
h1 { font-size:28px; margin:8px 0 12px; } h2 { font-size:18px; margin:0; } h3 { font-size:15px; }
.intro,.muted,footer { color:#50504a; } .intro { margin-bottom:20px; }
section { margin:18px 0; }
.connection,.catalog,.editor-panel,.summary,dialog {
  background:var(--panel); border:2px solid; border-color:var(--light) var(--edge) var(--edge) var(--light);
  padding:16px; min-width:0; box-shadow:1px 1px 0 #444;
}
.section-heading { display:flex; justify-content:space-between; align-items:center; gap:12px; flex-wrap:wrap; }
.status { color:var(--gold); font-weight:bold; padding:4px 8px; border:1px solid var(--edge); background:#eeeeea; }
.status.ok,.editor-feedback.ok { color:var(--green); } .status.error,.editor-feedback.error { color:var(--red); }
code { color:#16305a; font-family:"Lucida Console","Courier New",monospace; overflow-wrap:anywhere; }
label { display:block; margin-bottom:6px; }
.command-row { display:flex; gap:8px; margin-bottom:16px; }
input,select,textarea {
  width:100%; min-width:0; flex:1; padding:9px 10px;
  background:#f9f9f3; color:#171717; border:2px solid; border-color:#66665f #ffffff #ffffff #66665f;
  box-shadow:inset 1px 1px 0 #b3b3a9;
  font:14px "Lucida Console","Courier New",monospace; line-height:1.35;
}
input[type=checkbox] { width:18px; height:18px; accent-color:#16305a; }
textarea { resize:vertical; white-space:pre; overflow:auto; }
button {
  padding:8px 12px; color:#202020; background:#d4d4ce; border:2px solid;
  border-color:#ffffff #66665f #66665f #ffffff; box-shadow:1px 1px 0 #444;
  font:bold 13px Tahoma,Arial,sans-serif; cursor:pointer;
}
button.secondary { background:#e0e0da; }
button:hover:not(:disabled) { background:#e9e9e2; }
button:active:not(:disabled) { border-color:#66665f #ffffff #ffffff #66665f; box-shadow:inset 1px 1px 0 #a5a59b; }
button:disabled { color:#777770; box-shadow:none; cursor:default; }
button:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible,summary:focus-visible { outline:2px solid #164d8e; outline-offset:2px; }
input:invalid:not(:placeholder-shown) { outline-color:var(--red); }
.actions { display:flex; gap:8px; flex-wrap:wrap; margin-top:14px; }
.workspace { display:grid; grid-template-columns:230px minmax(0,1fr) 250px; gap:16px; align-items:start; }
.catalog,.editor-panel,.summary { margin:0; }
.editor-panel { overflow-anchor:none; }
.catalog label { margin-top:16px; } .catalog>button { margin-top:10px; width:100%; }
.templates { display:grid; gap:8px; margin-top:14px; max-height:65vh; overflow-y:auto; padding:2px; }
.template { text-align:left; padding:10px; width:100%; }
.template strong { display:block; color:#16305a; font-size:14px; margin-bottom:6px; overflow-wrap:anywhere; }
.template .identifier { color:#444438; font:12px "Lucida Console","Courier New",monospace; overflow-wrap:anywhere; }
.template small { display:block; margin-top:6px; }
.template.selected { background:#eef1f5; outline:2px solid #16305a; outline-offset:-4px; }
.summary:empty { display:none; } .summary p { color:#16305a; margin:4px 0 12px; overflow-wrap:anywhere; }
.summary>strong { font-size:12px; } .summary h3 { margin-top:0; }
.tabs { display:flex; gap:5px; flex-wrap:wrap; padding:12px 0; margin:12px 0; border-top:1px solid var(--edge); border-bottom:1px solid var(--edge); }
.tabs button { padding:7px 10px; } .tabs button.active { color:white; background:#16305a; border-color:#5577a3 #0c1830 #0c1830 #5577a3; }
.form-fields { border:1px solid #8b8b83; padding:10px; margin:0; min-width:0; background:#c6c6bf; }
.form-fields:disabled { color:#55554f; }
.field { border:1px solid #919187; padding:10px; margin:0 0 10px; min-width:0; background:#e1e1db; }
.field:last-child { margin-bottom:0; } .field>label { font-weight:bold; }
.field>small { display:block; font-size:12px; line-height:1.45; margin:0 0 8px; }
.field-default { display:block; color:#424237; font:12px "Lucida Console","Courier New",monospace; border-top:1px dotted #919187; padding-top:6px; margin:6px 0 8px; overflow-wrap:anywhere; }
.nested { border:2px solid; border-color:#85857a #f7f7f0 #f7f7f0 #85857a; padding:10px; margin-top:10px; background:#cfcfc7; }
.nested>small { display:block; margin-bottom:10px; }
.layer { border:1px solid #79796e; padding:10px; margin:8px 0; background:#cfcfc7; }
.layer>strong { display:block; color:#16305a; margin-bottom:8px; } .layer .field { margin-top:8px; } .layer>button { margin-right:8px; }
.rule-group { border:1px solid #8b8b80; padding:8px; margin:12px 0; background:#cecec5; }
.rule-toolbar,.rule-heading { display:flex; gap:8px; align-items:center; flex-wrap:wrap; margin-bottom:8px; }
.rule-toolbar input { flex:1 1 180px; } .rule-toolbar button { padding:7px 9px; }
.rule-heading h3 { margin:4px 0; } .rule-heading select { width:auto; flex:1; padding:6px; }
.rule { display:grid; grid-template-columns:minmax(120px,1fr) 130px 85px; align-items:center; gap:6px 10px; border:1px solid #8b8b80; padding:8px; margin:6px 0; background:#e3e3dc; }
.rule>strong { font:12px "Lucida Console","Courier New",monospace; overflow-wrap:anywhere; }
.rule>select { padding:5px; font-size:12px; } .rule-state { font-size:11px; text-align:right; }
.rule>details { grid-column:1/-1; margin:0; border-top:1px solid #a3a397; }
summary { cursor:pointer; color:#16305a; font-weight:bold; padding:6px 0; }
.rule summary { font-size:12px; } .rule details[open]>summary { margin-bottom:6px; }
.rule details>.field { margin:8px 0; } .rule .field>small { font-size:11px; }
.changed-marker { color:var(--green); font:bold 11px Tahoma,Arial,sans-serif; }
.rule .changed-marker { grid-column:1/-1; margin:0; }
.field.modified,.rule.modified { border-left:3px solid var(--green); }
.modified>label,.modified>strong { color:var(--green); }
.modified>input,.modified>select { color:var(--green); outline:1px solid var(--green); outline-offset:-3px; }
.is-enabled>label,.is-enabled>strong,.is-enabled>.rule-state,.is-enabled>select { color:var(--green); }
.is-disabled>label,.is-disabled>strong,.is-disabled>.rule-state,.is-disabled>select { color:var(--red); }
.chips { display:flex; flex-wrap:wrap; gap:6px; } .chip { font:12px "Lucida Console","Courier New",monospace; padding:6px; overflow-wrap:anywhere; }
.field input[type=search] { margin-bottom:6px; }
.path-preview { display:flex; flex-wrap:wrap; gap:0; margin:10px 0; border:2px solid var(--edge); padding:4px; }
.path-preview-line { white-space:pre-line; text-align:center; padding:8px; border:1px solid var(--edge); background:#dedede; font:12px "Lucida Console","Courier New",monospace; }
.plot-note { color:var(--red); border:1px solid var(--edge); padding:10px; }
.save-bar { position:sticky; bottom:0; z-index:2; background:var(--panel); border:2px solid; border-color:#ffffff #777770 #777770 #ffffff; padding:12px; box-shadow:0 -2px 0 #a3a397; }
.editor-feedback { width:100%; margin:4px 0 0; color:var(--gold); line-height:1.45; overflow-wrap:anywhere; } .editor-feedback:empty { display:none; }
.toolbar { margin-bottom:14px; padding:10px; border:1px solid #8b8b80; }
.warning { color:var(--gold); } button.danger { color:var(--red); }
dialog { width:min(540px,calc(100% - 32px)); color:#202020; padding:20px; }
dialog::backdrop { background:#20202070; } dialog label { margin:16px 0 6px; } dialog small { display:block; margin-top:8px; }
dl { margin:14px 0 0; } dt { color:#50504a; font-size:12px; margin-top:8px; } dd { margin:3px 0 0; overflow-wrap:anywhere; }
.empty { color:#50504a; padding:16px; border:1px dashed #8b8b80; background:#e3e3dc; }
.notice { color:#474733; line-height:1.5; padding:12px; border:1px solid #8b8b80; background:#e6e6d6; }
footer { font-size:11px; line-height:1.6; border-top:1px solid #8b8b80; }
@media(max-width:1200px) { .workspace { grid-template-columns:210px minmax(0,1fr); } .summary { grid-column:2; } }
@media(max-width:760px) { .workspace,.dashboard { grid-template-columns:minmax(0,1fr); } .summary { grid-column:auto; } .templates { max-height:240px; } header,main,footer { padding:14px; } .command-row { flex-direction:column; } .site-tabs { grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media(max-width:600px) { .rule { grid-template-columns:minmax(0,1fr) 120px; } .rule-state { grid-column:2; } .rule-toolbar input { flex-basis:100%; } }
