.setup { margin-bottom: 14px; }
.setup .note { margin: 8px 0 0; font-size: .85rem; color: rgba(20,73,54,.75); }
.setup .note.bad { color: #b3261e; font-weight: 600; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.small { font-size: .85rem; }
.lg-layout { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(260px, 1fr); gap: 16px; align-items: start; }
@media (max-width: 880px) { .lg-layout { grid-template-columns: 1fr; } }
.lg-layout aside { display: grid; gap: 16px; min-width: 0; }
.lg-main { min-width: 0; }

/* status bar (forked from legendofgrok/log.css) */
.lg-status { display: grid; grid-template-columns: minmax(0, 1.8fr) minmax(70px, 1fr) minmax(0, .8fr) minmax(76px, 1.1fr) minmax(0, .8fr) minmax(0, 1.4fr); gap: 8px; margin-bottom: 10px;
  padding: 8px 12px; border-radius: 12px; background: #0e7a36; color: #eaffef; }
.lg-status .k { display: block; font-size: .65rem; letter-spacing: .14em; text-transform: uppercase; opacity: .8; font-weight: 600; }
.lg-status .v { display: block; font-family: Chango, Georgia, serif; font-size: .9rem; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; line-height: 1.25; }
.lg-status .loc .v { font-size: .95rem; }
#s-score, #s-moves { white-space: nowrap; overflow-wrap: normal; }
.pips { display: inline-flex; gap: 2px; align-items: center; height: 1.2rem; }
.pips i { width: 6px; height: 14px; border-radius: 3px; background: rgba(255,255,255,.22); display: block; }
.pips i.on { background: #7dffa8; box-shadow: 0 0 6px rgba(125,255,168,.7); }
.pips i.low { background: #ffb4a8; box-shadow: 0 0 6px rgba(255,120,100,.7); }
@media (max-width: 560px) { .lg-status { grid-template-columns: 1fr 1fr 1fr; } .lg-status .loc { grid-column: 1 / -1; } .lg-status .rank { grid-column: span 2; } }

/* transcript */
.lg-log { height: clamp(300px, 52vh, 560px); overflow-y: auto; overscroll-behavior: contain; padding: 12px 14px; border-radius: 14px; background: #08150f;
  color: #d3f5de; border: 1px solid #0e7a36; box-shadow: inset 0 0 30px rgba(25,193,85,.12), 0 0 0 1px rgba(25,193,85,.12);
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; font-size: .95rem; line-height: 1.5; }
.lg-log:focus-visible { outline: 3px solid rgba(25,193,85,.5); }
.lg-log p { margin: 0 0 .55em; white-space: pre-line; overflow-wrap: anywhere; }
.lg-log .echo { color: #5dffa0; font-weight: 700; margin-top: .9em; }
.lg-log .room { font-family: Chango, Georgia, serif; color: #7dffa8; font-size: 1.05rem; margin-top: .4em; text-shadow: 0 0 10px rgba(125,255,168,.35); }
.lg-log .exits { color: #7ac8ff; }
.lg-log .items { color: #efe9a0; }
.lg-log .sys, .lg-log .amb { color: #8fb3a1; font-style: italic; }
.lg-log .warn { color: #ffcf6b; }
.lg-log .hint { color: #c8b6ff; }
.lg-log .pts { color: #ffe27a; font-weight: 600; }
.lg-log .trust { color: #7dffa8; }
.lg-log .trustdown { color: #ff9d8f; }
.lg-log .menuq { color: #fff; font-weight: 700; }
.lg-log .menuopt { padding-left: 1.2em; color: #bff3d1; }
.lg-log .choice { color: #bff3d1; }
.lg-log .divider { text-align: center; color: #5b8a70; letter-spacing: .2em; margin: .8em 0; }
.lg-log .endbox { border: 1px solid #7dffa8; border-radius: 12px; padding: 12px 14px; margin: .8em 0; background: rgba(25,193,85,.1); }
.lg-log .endbox h4 { font-family: Chango, Georgia, serif; font-weight: 400; margin: 0 0 .5em; color: #7dffa8; font-size: 1.25rem; }
.lg-log .endbox p { color: #e8fff0; }

/* chips */
.lg-cmd { margin-top: 10px; }
.lg-chips { display: flex; flex-direction: column; gap: 6px; margin: 10px 0; }
@media (max-width: 560px) { .lg-log { height: clamp(220px, 40vh, 420px); font-size: .88rem; padding: 10px 11px; } .chip { padding: 5px 10px; font-size: .85rem; } }
.chiprow { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.chiprow .lab { font-size: .68rem; letter-spacing: .12em; text-transform: uppercase; color: var(--brand-deep); font-weight: 600; min-width: 4.2em; }
.chip { font: inherit; font-size: .9rem; font-weight: 600; cursor: pointer; padding: 6px 12px; min-height: 36px; border-radius: 999px; border: 1px solid var(--brand); background: #fff; color: var(--ink); }
.chip:hover, .chip:focus-visible { background: rgba(25,193,85,.16); outline: none; border-color: var(--brand-deep); }
.chip.exit { background: rgba(25,193,85,.14); }
.chip.verb { border-style: dashed; }
.chip.menu { border-radius: 12px; text-align: left; max-width: 100%; }
.chip:disabled { opacity: .45; cursor: default; }

/* command line */
.lg-cmd { display: flex; align-items: center; gap: 8px; }
.lg-cmd .prompt { font-family: ui-monospace, Menlo, Consolas, monospace; font-weight: 700; color: var(--brand-deep); font-size: 1.2rem; }
.lg-cmd input { margin-top: 0; font-size: 16px; font-family: ui-monospace, Menlo, Consolas, monospace; flex: 1 1 auto; min-width: 0; }
.lg-cmd .btn { flex: 0 0 auto; }
.tools { margin-top: 10px; gap: 8px; }
.tools .btn { flex: 1 1 auto; padding: 7px 12px; }
details.cmds { margin-top: 8px; font-size: .88rem; }
details.cmds summary { cursor: pointer; color: var(--brand-deep); font-weight: 600; }
details.cmds p { margin: 6px 0 0; }

/* side panels */
.slots { display: grid; gap: 6px; }
.slot { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 8px; align-items: center; padding: 8px 10px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.slot .nm { font-weight: 600; }
.slot .det { font-size: .82rem; color: rgba(20,73,54,.75); overflow-wrap: anywhere; }
.slot .acts { display: flex; gap: 4px; flex-wrap: wrap; justify-content: flex-end; }
.slot .acts button { font: inherit; font-size: .8rem; font-weight: 600; cursor: pointer; padding: 4px 9px; border-radius: 999px; border: 1px solid var(--brand); background: #fff; color: var(--brand-deep); }
.slot .acts button:hover:not(:disabled), .slot .acts button.sure { background: var(--brand); color: #fff; }
.slot .acts button:disabled { opacity: .4; cursor: default; }
.slot.empty .det { font-style: italic; }
.endlist { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.endlist li { display: flex; justify-content: space-between; gap: 8px; padding: 5px 9px; border-radius: 10px; border: 1px solid var(--line); background: #fff; font-size: .95rem; }
.endlist li.found { border-color: var(--brand); background: rgba(25,193,85,.12); font-weight: 600; }
.endlist li .kind { font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; color: var(--brand-deep); align-self: center; }
.end-card { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(25,193,85,.18), 0 10px 30px rgba(20,73,54,.1); }
.end-card h3 { margin-bottom: 6px; }
.end-card .big { font-family: Chango, Georgia, serif; font-size: 2rem; color: var(--brand-deep); margin: 4px 0; }
.end-card .btn { margin: 8px 8px 0 0; }
.end-card p { margin: .3em 0; }

/* ---- The Legend of El0n additions ---- */
.loe-title { font-size: clamp(2rem, 5vw, 3rem); margin: 6px 0 4px; }
.loe-tag { margin: 0 0 14px; color: var(--brand-deep); font-weight: 600; }
.lg-log .lesson { color: #9be7ff; font-weight: 700; }
.lg-log .build { color: #ffd27a; font-weight: 700; }
.lg-log .stall { color: #ffb4a8; font-weight: 700; border-left: 3px solid #ff8a7a; padding-left: 8px; }
.lg-log .picnote { color: #c8b6ff; font-style: italic; }
.lessons { margin: 0; padding-left: 1.2em; font-size: .92rem; }
.lessons li { margin: 2px 0; }
.lessons li.no { color: rgba(20,73,54,.45); list-style: circle; }
@media (max-width: 560px) { .lg-status { grid-template-columns: 1fr 1fr 1fr; } }
.lg-status { grid-template-columns: repeat(auto-fit, minmax(88px, 1fr)); }
.lg-status .loc { grid-column: span 2; }
@media (max-width: 560px) { .lg-status { grid-template-columns: 1fr 1fr 1fr; } .lg-status .loc { grid-column: 1 / -1; } }
/* header links + player docs pages (about.html, commands.html) */
.loe-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 16px; }
.loe-links { display: inline-flex; flex-wrap: wrap; gap: 8px; }
.loe-links a { font-weight: 600; color: var(--brand-deep); text-decoration: none; padding: 5px 12px; min-height: 34px; display: inline-flex; align-items: center; border: 1px solid var(--brand); border-radius: 999px; background: #fff; }
.loe-links a:hover, .loe-links a:focus-visible { background: rgba(25,193,85,.16); outline: none; }
.doc-nav { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 14px; }
.doc-nav .back { font-weight: 600; }
.doc { line-height: 1.6; overflow-wrap: anywhere; }
.doc h1 { margin-top: 0; }
.doc h2 { font-family: Chango, Georgia, serif; font-weight: 400; font-size: 1.35rem; margin: 1.4em 0 .5em; color: var(--brand-deep); scroll-margin-top: 12px; }
.doc h3 { font-family: Gluten, Georgia, serif; font-weight: 600; font-size: 1.12rem; margin: 1.1em 0 .3em; scroll-margin-top: 12px; }
.doc ul { padding-left: 1.3em; margin: .4em 0 .8em; }
.doc li { margin: .2em 0; }
.doc code { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: .88em; background: #08150f; color: #7dffa8; padding: 1px 6px; border-radius: 6px; white-space: nowrap; }
.doc hr { border: 0; border-top: 1px dashed rgba(20,73,54,.25); margin: 1.4em 0; }
.doc a { color: var(--brand-deep); }
.doc-table { overflow-x: auto; margin: .6em 0 1em; }
.doc-table table { min-width: 520px; }
.doc-table td code { white-space: normal; }
.doc-toc { margin-bottom: 14px; }
.doc-toc ul { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.doc-toc a { display: inline-block; padding: 4px 10px; border-radius: 999px; border: 1px solid var(--line); background: #fff; text-decoration: none; font-weight: 600; font-size: .9rem; }
.doc-foot { text-align: center; margin-top: 18px; }
.doc-foot .btn { text-decoration: none; display: inline-block; }
@media (max-width: 560px) { .doc { padding: 14px; font-size: .97rem; } .doc code { white-space: normal; } }
/* status grid in a narrower column (chat side rail): rank gets two cells and only breaks between words */
.lg-status .rank { grid-column: span 2; }
.lg-status .rank .v { overflow-wrap: break-word; }
