@font-face { font-family: "Open Sans"; src: url("/fonts/open-sans-latin-wght-normal.woff2") format("woff2"); font-weight: 300 800; font-display: swap; }
:root {
  --bg: #0b0d0a; --bg2: #11140f; --card: #171b15; --card2: #1d221a; --line: #2a3125; --line2: #394232;
  --text: #e7ece2; --muted: #9aa592; --dim: #6c7566;
  --lime: #8be04e; --lime-dim: #4e7f2a; --lime-glow: rgba(139,224,78,.35);
  --orange: #f2892b; --orange-hi: #ffa14a; --red: #ef5b4c; --blue: #5aa9e6;
  --radius: 14px; --shadow: 0 8px 30px rgba(0,0,0,.45);
  --mono: ui-monospace, "SFMono-Regular", "DejaVu Sans Mono", Menlo, Consolas, monospace;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  font-family: "Open Sans", system-ui, -apple-system, "Segoe UI", sans-serif; color: var(--text); background: var(--bg);
  background-image:
    radial-gradient(ellipse at 15% -10%, rgba(139,224,78,.08), transparent 55%),
    radial-gradient(ellipse at 110% 20%, rgba(242,137,43,.06), transparent 50%),
    repeating-linear-gradient(115deg, rgba(255,255,255,.012) 0 2px, transparent 2px 7px),
    repeating-radial-gradient(circle at 30% 40%, rgba(0,0,0,.18) 0 1px, transparent 1px 4px);
  background-attachment: fixed; line-height: 1.45; font-size: 15px;
}
a { color: var(--lime); text-decoration: none; } a:hover { text-decoration: underline; }
h1, h2, h3 { margin: 0 0 .6rem; letter-spacing: .02em; }
h2 { font-size: 1.25rem; text-transform: uppercase; font-weight: 800; }
h3 { font-size: 1rem; text-transform: uppercase; color: var(--muted); font-weight: 700; letter-spacing: .08em; }
small, .muted { color: var(--muted); }
.dim { color: var(--dim); }
[hidden] { display: none !important; }

/* Top bar */
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 1rem; padding: .6rem 1.2rem;
  background: rgba(11,13,10,.88); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: .6rem; }
.brand b { display: block; font-weight: 800; letter-spacing: .12em; font-size: .95rem; }
.brand small { display: block; font-size: .65rem; letter-spacing: .3em; color: var(--lime); }
.tabs { display: flex; gap: .25rem; flex: 1; flex-wrap: wrap; }
.tabs a { padding: .45rem .85rem; border-radius: 999px; color: var(--muted); font-weight: 600; font-size: .9rem; }
.tabs a:hover { color: var(--text); background: var(--card); text-decoration: none; }
.tabs a.active { color: #0b0d0a; background: var(--lime); box-shadow: 0 0 18px var(--lime-glow); }
.who { display: flex; align-items: center; gap: .6rem; font-size: .9rem; }
.live { display: inline-flex; align-items: center; gap: .35rem; font-size: .7rem; text-transform: uppercase; letter-spacing: .15em; color: var(--dim); }
.live i { width: 8px; height: 8px; border-radius: 50%; background: var(--dim); }
.live.on { color: var(--lime); } .live.on i { background: var(--lime); box-shadow: 0 0 8px var(--lime); }

main { max-width: 1280px; margin: 0 auto; padding: 1.2rem; }
.foot { max-width: 1280px; margin: 2rem auto 1rem; padding: 1rem 1.2rem; border-top: 1px solid var(--line); color: var(--dim); font-size: .78rem; }
.foot p { margin: .25rem 0; }

/* LCD (mixer timer style) */
.lcd { font-family: var(--mono); color: var(--lime); background: #0a1006; border: 1px solid #23361a; border-radius: 8px;
  padding: .15rem .5rem; text-shadow: 0 0 6px var(--lime-glow), 0 0 14px rgba(139,224,78,.2); letter-spacing: .06em;
  box-shadow: inset 0 0 12px rgba(0,0,0,.8); }
.brand-lcd { font-weight: 700; font-size: 1.05rem; }

/* Cards & layout */
.card { background: linear-gradient(180deg, var(--card2), var(--card)); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1rem 1.1rem; box-shadow: var(--shadow); position: relative; }
.card + .card { margin-top: 1rem; }
.grid2 { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 1rem; align-items: start; }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
@media (max-width: 960px) { .grid2, .grid3 { grid-template-columns: 1fr; } }
.row { display: flex; gap: .6rem; align-items: center; flex-wrap: wrap; }
.spread { display: flex; justify-content: space-between; align-items: center; gap: .6rem; flex-wrap: wrap; }
.stack > * + * { margin-top: .6rem; }
.sticky { position: sticky; top: 76px; }
@media (max-width: 960px) { .sticky { position: static; } }

/* Buttons & inputs */
.btn { font: inherit; font-weight: 700; border: 1px solid var(--line2); background: var(--card2); color: var(--text); padding: .55rem .95rem;
  border-radius: 10px; cursor: pointer; transition: transform .05s, background .15s, box-shadow .15s; }
.btn:hover { background: #262d22; } .btn:active { transform: translateY(1px); }
.btn.sm { padding: .3rem .6rem; font-size: .8rem; border-radius: 8px; }
.btn.ghost { background: transparent; }
.btn.lime { background: var(--lime); color: #0b0d0a; border-color: var(--lime); }
.btn.cta { background: linear-gradient(180deg, var(--orange-hi), var(--orange)); color: #1b0f02; border: 1px solid #ffb36b; text-transform: uppercase;
  letter-spacing: .12em; font-weight: 800; box-shadow: 0 4px 0 #9b4d0c, 0 0 22px rgba(242,137,43,.25); }
.btn.cta:hover { filter: brightness(1.06); } .btn.cta:active { box-shadow: 0 1px 0 #9b4d0c; transform: translateY(3px); }
.btn.danger { color: var(--red); border-color: rgba(239,91,76,.4); background: transparent; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
input, select, textarea { font: inherit; color: var(--text); background: #0e110c; border: 1px solid var(--line2); border-radius: 10px; padding: .5rem .7rem; outline: none; min-width: 0; }
input:focus, select:focus, textarea:focus { border-color: var(--lime); box-shadow: 0 0 0 3px rgba(139,224,78,.15); }
textarea { width: 100%; resize: vertical; min-height: 60px; }
label.field { display: grid; gap: .25rem; font-size: .8rem; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .06em; }
input[type=checkbox] { accent-color: var(--lime); width: 1.05rem; height: 1.05rem; }

/* Effect pills */
.pills { display: flex; flex-wrap: wrap; gap: .3rem; }
.pill { --c: #999; display: inline-flex; align-items: center; gap: .3rem; padding: .14rem .55rem; border-radius: 999px; font-size: .78rem; font-weight: 700;
  color: var(--c); background: color-mix(in srgb, var(--c) 14%, transparent); border: 1px solid color-mix(in srgb, var(--c) 55%, transparent); white-space: nowrap; }
.pill.solid { color: #0b0d0a; background: var(--c); }
.pill.new { animation: pop .5s ease; }
@keyframes pop { 0% { transform: scale(.6); opacity: 0; } 70% { transform: scale(1.12); } 100% { transform: scale(1); } }
.tag { display: inline-block; padding: .1rem .5rem; border-radius: 6px; font-size: .72rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  background: #232a1f; color: var(--muted); border: 1px solid var(--line2); }
.tag.base { color: #ffd38a; border-color: #6b4a1a; background: #2a1d0b; }
.tag.add { color: var(--lime); border-color: var(--lime-dim); background: #15210d; }
.tag.ok { color: var(--lime); border-color: var(--lime-dim); }
.tag.warn { color: var(--orange); border-color: #7a4512; }
.tag.lock { color: var(--dim); }

/* Mixer */
.choices { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .5rem; }
.choice { text-align: left; background: #12160f; border: 1px solid var(--line); border-radius: 12px; padding: .55rem .65rem; cursor: pointer; color: var(--text); font: inherit; display: grid; gap: .25rem; transition: border-color .15s, transform .08s, background .15s; }
.choice:hover { border-color: var(--lime-dim); background: #161c12; }
.choice:active { transform: scale(.98); }
.choice.sel { border-color: var(--lime); box-shadow: 0 0 0 1px var(--lime), 0 0 16px var(--lime-glow); }
.choice.locked { opacity: .55; }
.choice b { font-size: .92rem; }
.choice .meta { display: flex; justify-content: space-between; align-items: center; font-size: .75rem; color: var(--muted); gap: .3rem; }
.price { font-family: var(--mono); color: var(--lime); font-weight: 700; }
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .5rem; }
@media (max-width: 520px) { .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.stat { background: #0a1006; border: 1px solid #23361a; border-radius: 10px; padding: .5rem .6rem; box-shadow: inset 0 0 14px rgba(0,0,0,.8); }
.stat small { display: block; font-size: .64rem; letter-spacing: .2em; text-transform: uppercase; color: #6f9a52; font-weight: 700; }
.stat .v { font-family: var(--mono); font-size: 1.45rem; color: var(--lime); text-shadow: 0 0 8px var(--lime-glow); font-weight: 700; }
.stat .v.neg { color: var(--red); text-shadow: none; }
.bar { height: 6px; background: #1b2316; border-radius: 99px; overflow: hidden; margin-top: .3rem; }
.bar > i { display: block; height: 100%; background: linear-gradient(90deg, var(--lime-dim), var(--lime)); border-radius: 99px; transition: width .3s; }
.bar.orange > i { background: linear-gradient(90deg, #9b4d0c, var(--orange)); }
.steps { list-style: none; margin: 0; padding: 0; counter-reset: s; }
.steps li { display: grid; grid-template-columns: 2rem minmax(0, 1fr) auto; gap: .6rem; align-items: start; padding: .6rem 0; border-top: 1px dashed var(--line2); }
.steps li:first-child { border-top: 0; }
.steps .n { font-family: var(--mono); color: #0b0d0a; background: var(--lime); border-radius: 8px; text-align: center; font-weight: 800; padding: .15rem 0; font-size: .85rem; }
.steps .n.base { background: #ffd38a; }
.steps .right { text-align: right; font-family: var(--mono); font-size: .85rem; white-space: nowrap; }
.steps .title { font-weight: 700; display: flex; gap: .4rem; flex-wrap: wrap; align-items: center; margin-bottom: .25rem; }
.inter { color: var(--orange-hi); font-weight: 800; }

/* Chain */
.chain { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem; font-size: .85rem; }
.chain .arrow { color: var(--dim); }
.chain .node { padding: .12rem .5rem; border-radius: 8px; background: #12160f; border: 1px solid var(--line2); font-weight: 600; }
.chain .node.base { color: #ffd38a; border-color: #6b4a1a; }
.chain .node.add { color: var(--lime); border-color: var(--lime-dim); }
.chain .node.out { color: #0b0d0a; background: var(--orange); border-color: var(--orange); font-weight: 800; }
.chain .node.mid { color: var(--orange-hi); border-color: #7a4512; }

/* Recipe cards */
.recipes { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 1rem; }
@media (max-width: 420px) { .recipes { grid-template-columns: 1fr; } }
.recipe h3.rname { color: var(--text); font-size: 1.15rem; letter-spacing: .02em; text-transform: none; margin: 0; }
.recipe .sub { font-size: .78rem; color: var(--dim); }
.recipe.flash { animation: flash 1.6s ease; }
@keyframes flash { 0% { box-shadow: 0 0 0 2px var(--lime), 0 0 30px var(--lime-glow); } 100% { box-shadow: var(--shadow); } }
.mini { display: grid; grid-template-columns: repeat(4, 1fr); gap: .35rem; margin: .6rem 0; }
.mini div { background: #0a1006; border: 1px solid #23361a; border-radius: 8px; padding: .25rem .4rem; }
.mini small { display: block; font-size: .58rem; letter-spacing: .16em; text-transform: uppercase; color: #6f9a52; font-weight: 700; }
.mini b { font-family: var(--mono); color: var(--lime); }
details summary { cursor: pointer; color: var(--muted); font-size: .85rem; font-weight: 600; }
.toolbar { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; margin-bottom: 1rem; }
.toolbar input[type=search] { flex: 1; min-width: 200px; }

/* Tables */
.tablewrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .88rem; }
th, td { padding: .5rem .55rem; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: .7rem; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); position: sticky; top: 0; background: var(--card); }
tr:hover td { background: rgba(139,224,78,.03); }
tr.current td { background: rgba(139,224,78,.08); }
td.num, th.num { text-align: right; font-family: var(--mono); }
.subtabs { display: flex; gap: .3rem; flex-wrap: wrap; margin-bottom: 1rem; }
.subtabs button { font: inherit; background: transparent; border: 1px solid var(--line2); color: var(--muted); padding: .35rem .8rem; border-radius: 999px; cursor: pointer; font-weight: 600; font-size: .85rem; }
.subtabs button.active { border-color: var(--lime); color: var(--lime); background: #15210d; }

/* Tracker */
.own { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: .5rem; align-items: center; padding: .4rem 0; border-bottom: 1px solid var(--line); font-size: .9rem; }
.own:last-child { border-bottom: 0; }
.qty { display: inline-flex; align-items: center; gap: .25rem; }
.qty input { width: 3.4rem; text-align: center; padding: .25rem; }
.goal { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; gap: .6rem; align-items: center; padding: .5rem 0; border-bottom: 1px solid var(--line); }
.goal.done .gname { text-decoration: line-through; color: var(--dim); }
.scroll { max-height: 420px; overflow-y: auto; padding-right: .3rem; }
.big { font-family: var(--mono); font-size: 1.8rem; color: var(--lime); text-shadow: 0 0 10px var(--lime-glow); }

/* Login */
.login { max-width: 420px; margin: 8vh auto; }
.login .lcd { display: block; text-align: center; font-size: 2.2rem; padding: .6rem; margin-bottom: 1rem; }
.err { color: var(--red); font-size: .88rem; min-height: 1.2em; }

/* Toasts */
#toasts { position: fixed; z-index: 100; left: 50%; top: 84px; transform: translateX(-50%); display: grid; gap: .5rem; pointer-events: none; width: min(92vw, 420px); }
.toast { pointer-events: auto; background: linear-gradient(180deg, #1c2417, #12170e); border: 1px solid var(--lime-dim); border-radius: 14px; padding: .7rem 1rem;
  box-shadow: 0 0 0 1px rgba(139,224,78,.15), 0 12px 40px rgba(0,0,0,.6), 0 0 30px var(--lime-glow); animation: tin .35s cubic-bezier(.2,1.4,.4,1); }
.toast.out { animation: tout .3s ease forwards; }
.toast .t { font-weight: 800; text-transform: uppercase; letter-spacing: .14em; color: var(--lime); font-size: .82rem; text-shadow: 0 0 8px var(--lime-glow); }
.toast .b { font-size: 1.1rem; font-weight: 800; margin: .15rem 0 .35rem; }
.toast.discover { text-align: center; border-color: var(--lime); padding: 1rem 1.2rem; }
.toast.discover .t { font-size: 1rem; }
.toast.discover .pills { justify-content: center; }
.toast.bad { border-color: rgba(239,91,76,.6); box-shadow: 0 12px 40px rgba(0,0,0,.6); } .toast.bad .t { color: var(--red); text-shadow: none; }
@keyframes tin { from { transform: translateY(-16px) scale(.9); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes tout { to { transform: translateY(-10px); opacity: 0; } }
.empty { padding: 2rem; text-align: center; color: var(--dim); border: 1px dashed var(--line2); border-radius: var(--radius); }
@media (max-width: 700px) {
  .topbar { position: static; padding: .6rem .8rem; gap: .5rem; }
  .brand { flex: 1; }
  .tabs { order: 3; flex-basis: 100%; justify-content: space-between; }
  .tabs a { padding: .4rem .6rem; font-size: .85rem; }
  main { padding: .8rem; }
}

/* ===== Phase 2 ===== */
.nowrap { flex-wrap: nowrap; }
.mono { font-family: var(--mono); }
.lcdnum { font-family: var(--mono); color: var(--lime); text-shadow: 0 0 6px var(--lime-glow); }
.scroll.tall { max-height: 70vh; }
.badge { display: inline-block; min-width: 1.2rem; padding: 0 .35rem; margin-left: .2rem; border-radius: 999px; background: var(--orange); color: #1b0f02;
  font-size: .7rem; font-weight: 800; text-align: center; line-height: 1.2rem; box-shadow: 0 0 10px rgba(242,137,43,.5); }
.tabs a.active .badge { background: #0b0d0a; color: var(--orange); }
.announce { max-width: 1280px; margin: .8rem auto 0; padding: .6rem 1rem; border: 1px solid #7a4512; border-radius: 12px; background: #24170a;
  color: var(--orange-hi); font-weight: 600; white-space: pre-wrap; }
@media (max-width: 1310px) { .announce { margin: .8rem 1.2rem 0; } }

/* role badges */
.role { display: inline-block; padding: .02rem .4rem; border-radius: 6px; font-size: .64rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; border: 1px solid; vertical-align: middle; }
.role-owner { color: var(--orange-hi); border-color: #7a4512; background: #24170a; }
.role-admin { color: var(--lime); border-color: var(--lime-dim); background: #15210d; }
.role-member { color: var(--blue); border-color: #2c5677; background: #0f1a24; }
.role-viewer { color: var(--muted); border-color: var(--line2); background: #1a1d18; }

/* filters / chips */
.booklayout { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 1rem; align-items: start; }
.booklayout > aside { position: sticky; top: 76px; max-height: calc(100vh - 90px); overflow-y: auto; padding-right: .2rem; }
@media (max-width: 960px) { .booklayout { grid-template-columns: 1fr; } .booklayout > aside { position: static; max-height: none; } }
.filters .field + .field { margin-top: .6rem; }
.chips { display: flex; flex-wrap: wrap; gap: .25rem; text-transform: none; letter-spacing: 0; font-weight: 400; }
.chip { font: inherit; font-size: .76rem; font-weight: 600; padding: .14rem .5rem; border-radius: 999px; cursor: pointer; background: #12160f; color: var(--muted); border: 1px solid var(--line2); }
.chip:hover { color: var(--text); border-color: var(--lime-dim); }
.chip.sm { font-size: .7rem; padding: .08rem .4rem; }
.chip.inc { color: #0b0d0a; background: var(--lime); border-color: var(--lime); }
.chip.exc { color: var(--red); background: rgba(239,91,76,.1); border-color: rgba(239,91,76,.55); text-decoration: line-through; }
.chip.eff { --c: #999; color: var(--c); border-color: color-mix(in srgb, var(--c) 40%, transparent); }
.chip.eff.on { color: #0b0d0a; background: var(--c); border-color: var(--c); }
.chip:disabled { cursor: default; opacity: .8; }
.seg { display: inline-flex; border: 1px solid var(--line2); border-radius: 8px; overflow: hidden; vertical-align: middle; margin-left: .3rem; }
.seg button { font: inherit; font-size: .7rem; font-weight: 700; padding: .1rem .5rem; background: transparent; color: var(--muted); border: 0; cursor: pointer; text-transform: uppercase; }
.seg button.on { background: var(--lime); color: #0b0d0a; }
input[type=range] { accent-color: var(--lime); padding: 0; width: 100%; border: 0; background: transparent; box-shadow: none; }
.filters input[type=number] { width: 100%; }

/* folders */
.ftree { margin-top: .5rem; font-size: .88rem; }
.fnode { display: flex; justify-content: space-between; gap: .4rem; padding: .28rem .5rem; border-radius: 8px; cursor: pointer; border: 1px solid transparent; }
.fnode:hover { background: #1b2117; }
.fnode.active { background: #15210d; border-color: var(--lime-dim); color: var(--lime); }
.fnode.dropping { border-color: var(--orange); background: #24170a; box-shadow: 0 0 12px rgba(242,137,43,.3); }
.fsec { font-size: .66rem; text-transform: uppercase; letter-spacing: .14em; color: var(--dim); font-weight: 800; margin: .6rem 0 .15rem .3rem; }
.fempty { font-size: .78rem; padding: .1rem .6rem; }
.fcur { margin-top: .6rem; padding-top: .6rem; border-top: 1px dashed var(--line2); font-size: .88rem; }
.recipes .card + .card { margin-top: 0; }
.recipe.selected { border-color: var(--orange); box-shadow: 0 0 0 1px var(--orange), var(--shadow); }
.recipe[draggable=true] { cursor: grab; }
.recipe.slim .mini { margin: .4rem 0; }

/* comments */
.comments { margin-top: .6rem; border-top: 1px dashed var(--line2); padding-top: .5rem; }
.clist { margin: .5rem 0; display: grid; gap: .45rem; }
.comment { background: #12160f; border: 1px solid var(--line); border-radius: 10px; padding: .4rem .6rem; font-size: .88rem; }
.comment.reply { margin-left: 1.4rem; border-left: 3px solid var(--lime-dim); }
.chead { display: flex; gap: .4rem; align-items: center; flex-wrap: wrap; font-size: .85rem; }
.cbody { white-space: pre-wrap; word-break: break-word; margin: .15rem 0; }
.cact { display: flex; gap: .8rem; font-size: .76rem; }
.cact a.danger, a.danger { color: var(--red); }
.cform textarea, .chatform textarea { min-height: 38px; flex: 1; }

/* chat */
.chat { display: flex; flex-direction: column; height: calc(100vh - 200px); min-height: 360px; padding: 0; overflow: hidden; }
.chatlog { flex: 1; overflow-y: auto; padding: 1rem; display: flex; flex-direction: column; gap: .45rem; }
.msg { max-width: min(80%, 680px); background: #12160f; border: 1px solid var(--line); border-radius: 12px 12px 12px 4px; padding: .4rem .7rem; align-self: flex-start; }
.msg.mine { align-self: flex-end; background: #15210d; border-color: var(--lime-dim); border-radius: 12px 12px 4px 12px; }
.msg .cact { opacity: 0; transition: opacity .15s; } .msg:hover .cact, .msg:focus-within .cact { opacity: 1; }
.daysep { text-align: center; font-size: .7rem; color: var(--dim); text-transform: uppercase; letter-spacing: .14em; margin: .4rem 0; border-bottom: 1px solid var(--line); line-height: 0; }
.daysep span { background: var(--card); padding: 0 .6rem; }
.chatform { padding: .7rem 1rem; border-top: 1px solid var(--line); margin: 0; background: var(--card); }

/* admin */
.utable input, .utable select { padding: .25rem .4rem; font-size: .85rem; }
.utable input[data-uf=name] { width: 9rem; }
tr.disabled td { opacity: .5; }
.dot { display: inline-block; width: .7rem; height: .7rem; border-radius: 50%; vertical-align: middle; }
.audit { padding: .4rem 0; border-bottom: 1px solid var(--line); display: grid; font-size: .85rem; }
.audit .mono { font-size: .72rem; word-break: break-all; }
input[type=color] { padding: 0; width: 2.4rem; height: 2.2rem; }

/* overlay (restart) */
#overlay { position: fixed; inset: 0; z-index: 200; background: rgba(5,7,4,.82); backdrop-filter: blur(6px); display: grid; place-items: center; }
.overlay-card { text-align: center; max-width: 420px; width: 90vw; }
.spin { width: 18px; height: 18px; border-radius: 50%; border: 3px solid var(--line2); border-top-color: var(--lime); animation: spin .8s linear infinite; display: inline-block; }
.big-spin { width: 48px; height: 48px; border-width: 5px; margin: .5rem auto 1rem; display: block; box-shadow: 0 0 20px var(--lime-glow); }
@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 700px) {
  .chat { height: 62vh; height: calc(100dvh - 300px); }
  .msg { max-width: 92%; }
  .utable input[data-uf=name] { width: 6.5rem; }
}
.fnode.home { font-weight: 700; color: var(--orange-hi); border-color: #4a2d10; background: #1c1309; margin-bottom: .2rem; }
.fnode.home.active { color: #1b0f02; background: var(--orange); border-color: var(--orange); }
#overlay .overlay-card:has(#impFile) { max-width: 560px; }

/* floating chat dock */
#chatDock { position: fixed; right: 18px; bottom: 18px; z-index: 90; }
.dock-bubble { position: relative; width: 58px; height: 58px; border-radius: 50%; border: 1px solid var(--lime); cursor: pointer; font-size: 1.6rem;
  background: radial-gradient(circle at 35% 30%, #23361a, #0a1006); color: var(--lime); box-shadow: 0 8px 26px rgba(0,0,0,.6), 0 0 22px var(--lime-glow); transition: transform .12s; }
.dock-bubble:hover { transform: scale(1.06); }
.dock-bubble .badge { position: absolute; top: -4px; right: -4px; margin: 0; }
.dock-panel { position: relative; width: 380px; height: min(520px, calc(100vh - 110px)); display: flex; flex-direction: column; padding: 0; overflow: hidden;
  box-shadow: 0 16px 50px rgba(0,0,0,.7), 0 0 0 1px var(--lime-dim); animation: tin .25s ease; }
.dock-panel.big { width: min(760px, calc(100vw - 36px)); height: calc(100vh - 110px); }
.dock-panel .chatlog { padding: .7rem .8rem; }
.dock-panel .msg { max-width: 88%; }
.dock-head { display: flex; align-items: center; gap: .4rem; padding: .45rem .5rem .45rem .9rem; border-bottom: 1px solid var(--line); background: var(--card2); cursor: default; }
.dock-head b { letter-spacing: .06em; text-transform: uppercase; font-size: .82rem; }
.dock-resize { position: absolute; left: 0; top: 0; width: 16px; height: 16px; cursor: nwse-resize; z-index: 2;
  background: linear-gradient(135deg, var(--lime-dim) 0 30%, transparent 30%); opacity: .7; }
.dock-panel #dockForm .chatform { padding: .55rem .7rem; }
.dock-panel textarea { max-height: 140px; }
@media (max-width: 700px) {
  #chatDock { right: 12px; bottom: 12px; }
  body.dock-sheet { overflow: hidden; }
  body.dock-sheet #chatDock { inset: 0; right: 0; bottom: 0; }
  .dock-panel, .dock-panel.big { position: fixed; inset: 0; width: 100vw; height: 100dvh; border-radius: 0; animation: none; }
  .dock-resize, #dockBig { display: none; }
}
.changelog { max-width: 860px; margin: 0 auto; }
.changelog h2 { font-size: 1.4rem; } .changelog h3 { margin-top: 1.4rem; color: var(--lime); } .changelog h4 { margin: .8rem 0 .3rem; color: var(--orange-hi); text-transform: uppercase; font-size: .8rem; letter-spacing: .1em; }
.changelog ul { margin: .2rem 0 .6rem; padding-left: 1.3rem; } .changelog li { margin: .2rem 0; }
.changelog code { font-family: var(--mono); font-size: .85em; background: #0e110c; padding: .05rem .3rem; border-radius: 5px; }

/* access requests */
.hp { position: absolute !important; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.reqs { display: grid; grid-template-columns: repeat(auto-fill, minmax(380px, 1fr)); gap: 1rem; }
.reqs .card + .card { margin-top: 0; }
.req .rname { font-size: 1.05rem; }
.req.pending { border-color: #7a4512; }
.req.denied { opacity: .75; }
.reqmsg { background: #12160f; border-left: 3px solid var(--lime-dim); padding: .35rem .6rem; border-radius: 6px; margin: .45rem 0; font-size: .9rem; }
.reqact { display: grid; gap: .5rem; margin-top: .6rem; padding-top: .6rem; border-top: 1px dashed var(--line2); }
.seg.big button { font-size: .78rem; padding: .3rem .7rem; }
.subtabs .badge { margin-left: .3rem; }
@media (max-width: 520px) { .reqs { grid-template-columns: 1fr; } }
