/* Ashfall Bastion — mobile-first styles. Designed at 360px, scales up. */
:root {
  --bg: #121216;
  --panel: #1c1d22;
  --panel2: #25262c;
  --line: #34353d;
  --text: #ebe7df;
  --muted: #9a968c;
  --ember: #ff7a2f;
  --ember-d: #c4521a;
  --safe: #4fc3b0;
  --bad: #f2744c;
  --warn: #f0b429;
  --r: 12px;
  --tab-h: 58px;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--bg); color: var(--text);
  font: 1rem/1.4 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  padding: env(safe-area-inset-top) env(safe-area-inset-right) 0 env(safe-area-inset-left);
  display: flex; flex-direction: column; min-height: 100%;
  overscroll-behavior: none; user-select: none; -webkit-user-select: none;
}
textarea, .log { user-select: text; -webkit-user-select: text; }
button {
  font: inherit; color: var(--text); background: var(--panel2);
  border: 1px solid var(--line); border-radius: 10px; min-height: 44px; padding: 8px 14px;
  cursor: pointer; touch-action: manipulation;
}
button:active:not(:disabled) { transform: scale(.97); }
button:disabled { opacity: .45; cursor: default; }
button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible, [tabindex]:focus-visible { outline: 2px solid var(--safe); outline-offset: 2px; }
h2 { font-size: 1.05rem; margin: 18px 0 10px; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
h2:first-child { margin-top: 6px; }
h3 { font-size: .95rem; margin: 20px 0 8px; color: var(--muted); }

#top { position: sticky; top: 0; z-index: 5; background: var(--bg); border-bottom: 1px solid var(--line); padding: 10px 16px 10px; }
.brand { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin-bottom: 8px; }
.name { font-weight: 800; letter-spacing: .12em; font-size: .95rem; }
.name span { color: var(--ember); }
.clock { font-size: .85rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.clock.night { color: var(--ember); }
.res { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 8px; }
.rcard[hidden] { display: none; }
.rcard { min-width: 0; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 6px 10px; }
.rcard .l { font-size: .75rem; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; display: flex; justify-content: space-between; }
.rcard .rt { text-transform: none; letter-spacing: 0; font-variant-numeric: tabular-nums; }
.rcard .v { font-size: 1.15rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.rcard .v small { font-weight: 400; color: var(--muted); font-size: .8rem; }
.rcard.fuel .bar i { background: #e0b34a; }
.rcard.ammo .bar i { background: #b8c4cf; }
.bar { height: 4px; background: var(--panel2); border-radius: 2px; overflow: hidden; margin-top: 4px; }
.bar i { display: block; height: 100%; background: var(--safe); width: 0; }
.rcard.scrap .bar i { background: var(--ember); }
.pos { color: var(--safe); } .neg { color: var(--bad); }

#main { flex: 1; padding: 8px 16px calc(var(--tab-h) + 20px + env(safe-area-inset-bottom)); }
.panel { display: none; }
.panel.active { display: block; }
.sub { color: var(--muted); font-size: .85rem; margin: 6px 0; }
.list { display: flex; flex-direction: column; gap: 8px; }

.scav {
  width: 100%; min-height: 64px; margin-bottom: 12px; font-weight: 700; font-size: 1.05rem;
  background: linear-gradient(180deg, var(--ember), #d9591a); color: #1a0d05; border: 0;
}
.scav small { display: block; font-weight: 600; }

.item { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 10px 12px; display: flex; align-items: center; gap: 10px; }
.item .info { flex: 1; min-width: 0; }
.item .thumb { width: 54px; height: 46px; object-fit: contain; image-rendering: pixelated; flex: none; }
.item .t { font-weight: 650; }
.item .t b { color: var(--ember); font-weight: 700; margin-left: 6px; }
.item .d { color: var(--muted); font-size: .85rem; }
.item[hidden] { display: none; }
.item .buy { min-width: 92px; text-align: center; background: var(--panel2); }
.item .buy.ok { border-color: var(--ember); color: var(--ember); }
.step { display: flex; align-items: center; gap: 6px; }
.step button { width: 46px; padding: 0; font-size: 1.3rem; }
.step .n { min-width: 34px; text-align: center; font-weight: 700; font-variant-numeric: tabular-nums; }

canvas#strip { width: 100%; height: 200px; display: block; border-radius: var(--r); border: 1px solid var(--line); background: #0d0d11; }
.bar.big { height: 8px; margin: 6px 0 4px; }
.bar.big i { background: var(--safe); }
.bar.big i.low { background: var(--bad); }
.wallcard { margin-top: 8px; }
.card2 { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 10px 12px; font-size: .92rem; }
.card2 b { color: var(--ember); }
.card2 .held { color: var(--safe); font-weight: 700; } .card2 .scarred { color: #f0b429; font-weight: 700; } .card2 .fallen { color: var(--bad); font-weight: 700; }
.shares { margin-top: 8px; display: grid; gap: 5px; }
.shr { display: grid; grid-template-columns: minmax(4.6em, 6em) 1fr 3em; gap: 8px; align-items: center; font-size: .85rem; }
.shr .gauge { margin: 0; }
.shr b { text-align: right; color: var(--text); }
.card2 .adapt { color: #f0b429; }
.gauge { height: 6px; background: var(--panel2); border-radius: 3px; overflow: hidden; margin-top: 6px; }
.gauge i { display: block; height: 100%; background: var(--safe); }
.dreadrow { display: flex; justify-content: space-between; margin-top: 8px; font-weight: 600; }
#powerCard #powerLine, #powerCard #noiseLine { margin-top: 4px; }
.toggle { display: flex; gap: 10px; align-items: center; min-height: 44px; margin-top: 10px; }
.toggle input { width: 22px; height: 22px; accent-color: var(--ember); }

.roster { display: grid; gap: 6px; }
.rost { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; font-size: .9rem; }
.rost b { display: block; }
.rost em { font-style: normal; }
.rost span { color: var(--muted); font-size: .8rem; }
.rost.locked { border-style: dashed; background: transparent; }
.rost .spl { margin-top: 5px; font-size: .82rem; color: var(--text); }
.rost .spl i { font-style: normal; color: var(--muted); }
.rost .spl.dim { color: var(--muted); font-size: .76rem; }
.rost .spl.bond, .bond { color: #e86a8a; font-weight: 700; }
.rost .sph { font-weight: 700; color: var(--ember); margin-bottom: 4px; }
.rost .spb { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.rost .spb button { min-height: 44px; padding: 6px 8px; text-align: left; border-color: var(--ember); }
.rost .spb button b { display: block; font-size: .85rem; }
.rost .spb button small { display: block; color: var(--muted); font-size: .72rem; line-height: 1.25; }
.rost .rsp { margin-top: 6px; min-height: 36px; font-size: .75rem; padding: 4px 10px; }
@media (max-width: 420px) { .rost .spb { grid-template-columns: 1fr; } }
.item.chan { display: block; width: 100%; text-align: left; min-height: 56px; }
.item.chan b { display: block; }
.item.chan small { display: block; color: var(--muted); font-size: .78rem; margin-top: 2px; }
.item.chan.on { border-color: var(--ember); }
.rost.fallen { opacity: .6; }
.daycard { margin-bottom: 10px; }
.daycard .dayrow { font-size: .95rem; }
.daycard .sph { font-weight: 700; color: var(--ember); margin: 8px 0 4px; }
.daycard .lantern { display: block; width: 100%; text-align: left; margin-top: 8px; min-height: 52px; border-color: var(--ember); }
.daycard .lantern b { display: block; font-size: .85rem; }
.daycard .lantern small { display: block; color: var(--muted); font-size: .72rem; }
.item.chan[disabled] { opacity: .55; }
.daycard .hush { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.daycard .hush button { min-height: 52px; padding: 6px 8px; text-align: left; border-color: var(--ember); }
.daycard .hush button b { display: block; font-size: .82rem; }
.daycard .hush button small { display: block; color: var(--muted); font-size: .7rem; line-height: 1.25; }
@media (max-width: 520px) { .daycard .hush { grid-template-columns: 1fr; } }
.daycard .hbar { height: 3px; background: var(--panel2); border-radius: 2px; margin-top: 6px; overflow: hidden; }
.daycard .hbar i { display: block; height: 100%; background: var(--ember); }
.daycard .ctr { display: flex; justify-content: space-between; gap: 8px; font-size: .86rem; padding: 3px 0; border-bottom: 1px solid var(--line); }
.daycard .ctr i { font-style: normal; color: var(--muted); white-space: nowrap; }
.daycard .ctr.done span { color: var(--safe); } .daycard .ctr.fail { opacity: .5; text-decoration: line-through; }
.eventbar.thread { background: #17262a; border-bottom-color: #4aa3b5; }
.eventbar.thread .et { color: #7cc8d8; }
.eventbar.thread .bar i { background: #4aa3b5; }
@media (min-width: 900px) { .eventbar.thread { border-color: #4aa3b5; } }

.log { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column-reverse; gap: 6px; }
.log li { background: var(--panel); border-left: 3px solid var(--ember); border-radius: 6px; padding: 6px 10px; font-size: .9rem; }
.log li time { color: var(--muted); font-size: .75rem; margin-right: 6px; }

.row { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.row button { flex: 1; }
.danger { border-color: var(--bad); color: var(--bad); }
.offer { border-color: var(--ember); margin: 8px 0; }
.offer #importTxt { margin-bottom: 8px; }
.offer .go { border-color: var(--ember); }
textarea { width: 100%; background: var(--panel); color: var(--text); border: 1px solid var(--line); border-radius: 10px; padding: 10px; font: .8rem/1.3 ui-monospace, monospace; resize: vertical; }

#tabs {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 6; display: flex; background: var(--panel);
  border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom);
}
#tabs button { flex: 1; border: 0; border-radius: 0; background: transparent; min-height: var(--tab-h); color: var(--muted); font-weight: 600; }
#tabs button.on { color: var(--ember); box-shadow: inset 0 3px 0 var(--ember); }

.away { position: fixed; inset: 0; background: rgba(0,0,0,.7); display: flex; align-items: center; justify-content: center; padding: 16px; z-index: 20; }
.away[hidden] { display: none; }
.away .card { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 18px; max-width: 420px; width: 100%; }
.away .card h2 { margin-top: 0; color: var(--text); }
.away .card p { margin: 6px 0; }
.away .card button { width: 100%; margin-top: 12px; background: var(--ember); color: #1a0d05; border: 0; font-weight: 700; }

.flash { animation: flash .35s; }
@keyframes flash { from { box-shadow: 0 0 0 3px var(--ember); } to { box-shadow: 0 0 0 0 transparent; } }
@media (prefers-reduced-motion: reduce) { .flash { animation: none; } button:active:not(:disabled) { transform: none; } }

/* Tablet / desktop: same tabs and sub-tabs as the phone, with the tab bar under the header and one section at a time */
@media (min-width: 900px) {
  body > #top { order: 0; }
  body > #tabs { order: 1; position: sticky; top: var(--top-h, 0px); bottom: auto; z-index: 6; max-width: 1252px; width: 100%; margin: 12px auto 0; border: 1px solid var(--line); border-radius: 12px; padding: 3px; gap: 4px; }
  #tabs button { border-radius: 10px; min-height: 46px; font-size: 1rem; }
  #tabs button:hover:not(.on) { color: var(--text); }
  #tabs button.on { background: var(--panel2); box-shadow: inset 0 -3px 0 var(--ember); }
  body > #errBar, body > #eventBar, body > #tutBar, body > #dailyBar { order: 2; }
  body > #eventBar { top: calc(var(--top-h, 0px) + 66px); }
  body > #dailyBar { max-width: 1252px; width: calc(100% - 28px); margin: 12px auto 0; }
  body > #tutBar { position: static; max-width: 1252px; width: 100%; margin: 12px auto 0; border: 1px solid var(--safe); border-radius: var(--r); }
  body > #stage { order: 3; }
  #stage { display: flex; gap: 24px; align-items: flex-start; max-width: 1252px; width: 100%; margin: 0 auto; padding: 16px 24px 40px; }
  #main { display: block; flex: 1; min-width: 0; padding: 0; }
  #side { display: flex; flex-direction: column; gap: 12px; width: clamp(300px, 30vw, 400px); flex: none; position: sticky; top: calc(var(--top-h, 0px) + 78px); max-height: calc(100vh - var(--top-h, 0px) - 94px); }
  .sidebox h3 { margin: 0 0 8px; font-size: .85rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
  .sidebox.grow { flex: 1; min-height: 0; display: flex; flex-direction: column; }
  .sidelog { flex: 1; min-height: 0; overflow-y: auto; }
  .sidelog .log { max-height: none; }
  #side canvas#strip { height: 230px; }
  .subtabs button[data-sub=log] { display: none; }
  #top { padding: 12px 24px; }
  .brand, .res { max-width: 1252px; margin-left: auto; margin-right: auto; }
  .brand { margin-bottom: 10px; }
  .res { grid-template-columns: repeat(auto-fit, minmax(150px, 200px)); }
  button:hover:not(:disabled) { border-color: var(--ember); }
}

#moraleCard { margin: 8px 0 12px; }
.card2.warn { margin: 0 0 12px; border-color: var(--bad); color: var(--text); }
.rcard.med .bar i { background: #d86b8a; }
.rost .lv { float: right; color: var(--ember); font-weight: 700; font-size: .8rem; }
.rost .chip { font-size: .72rem; padding: 1px 6px; border-radius: 8px; background: var(--panel2); color: var(--muted); margin-left: 4px; }
.rost .chip.rest { color: #f0b429; }
.rost .fat { height: 3px; background: var(--panel2); border-radius: 2px; margin-top: 5px; overflow: hidden; }
.rost .fat i { display: block; height: 100%; background: var(--safe); }
#weaponCard { margin-top: 8px; }
#powerCard { margin-top: 12px; }

/* M5 expeditions */
#tab-map { grid-column: 1 / -1; }
.expctl { margin: 6px 0 10px; }
.expctl .step { margin-bottom: 4px; }
.expctl .step .sub { flex: 1; margin: 0; }
.zones .item .d small { color: var(--muted); }
.zones .item.cleared { opacity: .7; }
.zones .item.locked { border-style: dashed; background: transparent; }
.tag { display: inline-block; font-size: .72rem; padding: 1px 6px; border-radius: 8px; background: var(--panel2); color: var(--muted); margin-right: 4px; }
.tag.good { color: var(--safe); } .tag.warn { color: var(--warn); } .tag.bad { color: var(--bad); }
.squad .bar { margin-top: 6px; }
.squad .bar i { background: var(--ember); }
.zonebtns { display: flex; flex-direction: column; gap: 6px; }
@media (min-width: 900px) { .zones { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); } #squads { max-width: 700px; } }
.zonebtns button { min-width: 92px; text-align: center; }
.zonebtns button.ok { border-color: var(--ember); color: var(--ember); }

/* sub-tabs: one pane at a time on phones, everything at once on desktop */
.subtabs { display: flex; overflow-x: auto; scrollbar-width: none; gap: 4px; margin: 0 0 10px; padding: 3px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; }
.subtabs button { flex: 1 0 auto; min-height: 40px; border: 0; background: transparent; color: var(--muted); font-weight: 600; padding: 4px 6px; font-size: .9rem; }
.subtabs button.on { background: var(--panel2); color: var(--ember); box-shadow: inset 0 -2px 0 var(--ember); }
.sub-pane { display: none; }
.sub-pane.on { display: block; }
@media (min-width: 900px) { .subtabs { max-width: 760px; } .sub-pane.on { max-width: 1000px; } }
h3.dh { display: none; }
.rost .desc { display: none; font-style: normal; }
.rost.open .desc { display: inline; }
.rost { cursor: pointer; }
.log { max-height: 62vh; overflow-y: auto; }
@media (min-width: 900px) { .log { max-height: 60vh; } }
@media (max-width: 899px) {
  .res { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 5px; }
  .rcard { padding: 4px 8px; }
  .rcard .l { font-size: .68rem; }
  .rcard .rt { font-size: .68rem; }
  .rcard .v { font-size: 1rem; }
  .rcard .cap { display: none; }
  #top { padding: 8px 12px; }
  .brand { margin-bottom: 6px; }
}
@media (max-width: 899px) { .name { white-space: nowrap; font-size: .85rem; } .clock { font-size: .78rem; text-align: right; } .brand { align-items: center; } }

/* M6 */
.eventbar { position: sticky; top: 0; z-index: 7; margin: 0; padding: 10px 16px; background: #2a1f14; border-bottom: 2px solid var(--ember); }
.eventbar[hidden] { display: none; }
.eventbar .et { font-weight: 800; color: var(--ember); }
.eventbar .ed { font-size: .9rem; margin: 2px 0 8px; }
.eventbar .eb { display: flex; gap: 8px; }
.eventbar .eb button { flex: 1; min-height: 44px; }
.eventbar .bar i { background: var(--ember); }
@media (min-width: 900px) { .eventbar { max-width: 1252px; margin: 0 auto; border: 2px solid var(--ember); border-radius: var(--r); } }
.chips { display: flex; gap: 6px; margin-bottom: 10px; flex-wrap: wrap; }
.chips button { min-height: 36px; padding: 4px 12px; border-radius: 18px; font-size: .88rem; }
.chips button.on { border-color: var(--ember); color: var(--ember); }
.abgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 8px; }
.abgrid button { min-height: 52px; font-size: .88rem; line-height: 1.2; }
.abgrid button.ok { border-color: var(--ember); color: var(--ember); }
.abgrid button.on { background: var(--ember); color: #1a0d05; }
.node.done { opacity: .6; }
.node.done .t::after { content: " \2713"; color: var(--safe); }
.tag.mod { color: var(--ember); }

/* M7 */
.site { cursor: pointer; }
.site.sel { border-color: var(--ember); }
.site.locked { border-style: dashed; background: transparent; cursor: default; }
.card2.dailybar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; justify-content: space-between; margin: 8px 12px; }
.dailybar[hidden] { display: none; }
.card2.locked { border-style: dashed; background: transparent; }
.locked, .locked * { color: var(--muted); }
.locked button:disabled { opacity: 1; }
.exbtn small { display: block; font-weight: 500; opacity: .85; }
.exbtn:disabled { background: var(--panel2); color: var(--muted); }

/* M8: tips, toast, settings, stats, trophies, comfort modes */
.tutbar { position: sticky; top: 0; z-index: 6; display: flex; gap: 10px; align-items: center; padding: 8px 16px; background: #14262a; border-bottom: 1px solid var(--safe); font-size: .88rem; }
.tutbar[hidden], .toast[hidden] { display: none; }
.tutbar .tt { flex: 1; }
.tutbar button { min-height: 36px; padding: 4px 10px; font-size: .78rem; }
.toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(var(--tab-h) + 16px); z-index: 20; background: var(--panel2); border: 1px solid var(--ember); border-radius: 12px; padding: 10px 16px; font-weight: 700; max-width: 90vw; box-shadow: 0 6px 24px rgba(0,0,0,.5); }
.stat { display: flex; justify-content: space-between; gap: 12px; padding: 8px 12px; border-bottom: 1px solid var(--line); font-size: .9rem; }
.stat b { color: var(--ember); font-variant-numeric: tabular-nums; }
.trophy { padding: 8px 12px; border-bottom: 1px solid var(--line); opacity: .45; font-size: .88rem; }
.trophy.got { opacity: 1; } .trophy .n { font-weight: 700; } .trophy.got .n { color: var(--ember); } .trophy .x { color: var(--muted); font-size: .78rem; }
#textSize button.on { border-color: var(--ember); color: var(--ember); }
input[type=range] { flex: 1; accent-color: var(--ember); }
body.cb { --safe: #56b4e9; --bad: #e69f00; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }
body.reduce *, body.reduce *::before, body.reduce *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
@media (max-width: 899px) { body.big .res { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.subtabs::-webkit-scrollbar { display: none; }
@media (max-width: 899px) { body.big #top { position: static; } body.big .tutbar, body.big .eventbar { position: static; } }
.how p { margin: 0 0 8px; font-size: .88rem; } .how p:last-child { margin: 0; }
@media (max-width: 899px) { #side { display: none; } }
#stage { display: block; }
@media (min-width: 900px) { #stage { display: flex; } }
@media (max-width: 480px) { .item .thumb { width: 38px; height: 38px; } }
.rcard .ric { width: 16px; height: 16px; object-fit: contain; image-rendering: pixelated; vertical-align: -3px; margin-right: 4px; }
@media (max-width: 480px) { .rcard .ric { width: 12px; height: 12px; margin-right: 3px; vertical-align: -2px; } }
.item.molcard { flex-wrap: wrap; }
.molcard .info { flex: 1 1 100%; }
.molcard .zonebtns { flex-direction: row; flex: 1 1 100%; }
.molcard .zonebtns button { flex: 1; min-width: 0; }

/* Slice F: Frontier */
.pips { display: inline-flex; gap: 3px; vertical-align: middle; }
.pips i { width: 9px; height: 9px; border-radius: 50%; border: 1px solid var(--muted); display: inline-block; }
.pips i.on { background: var(--ember); border-color: var(--ember); }
.d.mast { font-size: .8rem; color: var(--muted); }
.posts { display: inline-flex; gap: 4px; margin-top: 4px; }
.posts button.post { min-height: 34px; padding: 4px 10px; font-size: .8rem; }
.posts button.post.on { border-color: var(--ember); color: var(--ember); }
.posts button.post.next { border-style: dashed; }
.item.margin { border-style: dashed; }

/* Slice H: Ashfall+ sky tint */
body::before { content: ''; position: fixed; inset: 0; pointer-events: none; z-index: 0; background: rgba(255, 120, 40, calc(var(--plus, 0) * 0.025)); }

/* Wall Sectors (v0.19) */
.secbox { display: block; }
.secbox .secrow { display: flex; align-items: center; gap: 10px; margin-top: 8px; }
.secbox .secrow .sn { flex: 1; min-width: 0; }
.secbox .secrow .bar { height: 6px; margin: 3px 0; }
.secbox .secrow.down b { color: #d9503a; }
.secbox .secrow .buy { min-width: 92px; }
.secbox .secrow .plv { letter-spacing: 1px; font-size: 11px; opacity: .8; }

/* Factions (v0.21) */
#toolsBox .toolrow { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 8px; }
#toolsBox .toolrow .buy { min-width: 96px; }

/* Guard posts (v0.23) */
.secbox .gprow { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 8px; }
.secbox .gprow .buy { min-width: 76px; }
.secbox .gpl { font-size: 12px; margin-top: 2px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.secbox .gpl .plv { letter-spacing: 1px; font-size: 11px; opacity: .9; }
.secbox .mini { min-width: 40px; min-height: 40px; padding: 0 8px; font-size: 16px; line-height: 1; border-radius: 6px; border: 1px solid var(--line, #444); background: transparent; color: inherit; touch-action: manipulation; }
.secbox .mini:disabled { opacity: .35; }

/* Foreman (P-108) */
.fqcard { margin-bottom: 8px; }
.fqhead { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.fqlist { list-style: none; margin: 6px 0; padding: 0; display: grid; gap: 6px; }
.fqlist li { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; background: var(--panel2); border: 1px solid var(--line); border-radius: var(--r); padding: 6px 8px; }
.fqlist .fqn { font-weight: 650; flex: 1 1 140px; }
.fqlist .fqs { color: var(--muted); flex: 1 1 100%; }
.fqlist .fqb { display: flex; gap: 6px; margin-left: auto; }
.fqlist button, .fqadd button, .qbtn { min-height: 44px; min-width: 44px; }
.fqadd { display: flex; gap: 8px; align-items: center; }
.fqadd select { flex: 1; min-height: 44px; min-width: 0; }
.fqres { display: block; margin-top: 6px; }
.fqres input[type=range] { width: 100%; min-height: 32px; }
.qbtn { margin-top: 4px; background: transparent; border: 1px dashed var(--line); color: var(--muted); border-radius: var(--r); padding: 0 10px; font-size: .85rem; }
.qbtn[hidden] { display: none; }

/* Night Dares (P-109) */
.darecard { margin-bottom: 8px; }
.darelist { display: grid; gap: 6px; margin-top: 6px; }
.darebtn { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; text-align: left; min-height: 44px; width: 100%; background: var(--panel2); border: 1px solid var(--line); border-radius: var(--r); padding: 8px 10px; color: inherit; font: inherit; }
.darebtn.on { border-color: var(--ember); box-shadow: inset 0 0 0 1px var(--ember); }
.darebtn:disabled { opacity: .6; }

/* Daily Stamps (P-111): cosmetic calendar */
.dcal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; margin: 6px 0 12px; }
.dcal .dh { font-style: normal; font-size: 11px; opacity: .6; text-align: center; }
.dcal .dc { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 44px; border: 1px dashed rgba(255,255,255,.14); border-radius: 6px; font-weight: 400; font-size: 12px; line-height: 1.1; }
.dcal .dc span { font-size: 11px; min-height: 12px; }
.dcal .dc.void { border-color: transparent; }
.dcal .dc.on { border-style: solid; border-color: rgba(255,255,255,.3); background: rgba(255,255,255,.04); }
.dcal .dc.rim { border-color: #d9a441; box-shadow: 0 0 0 1px #d9a441 inset; }
.dcal .dc.today { outline: 1px solid rgba(255,255,255,.5); }
.stamp { font-size: 12px; letter-spacing: 1px; opacity: .85; }
