/* Colonist Foundry: розмітка поверх спільної теми (theme.css). Акцент інструмента: бузковий. */
:root { --accent: #c98fdc; --accent-hi: #e2bcf0; --accent-glow: rgba(201, 143, 220, .14); }
body { min-height: 100vh; display: flex; flex-direction: column;
  background: radial-gradient(1200px 460px at 50% -120px, rgba(201, 143, 220, .10), transparent 70%), var(--bg); }
header.top { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; padding: 12px 18px;
  background: linear-gradient(180deg, var(--panel), var(--bg-elev)); border-bottom: 1px solid var(--line); position: relative; }
header.top::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px; background: linear-gradient(90deg, transparent, var(--accent), transparent); opacity: .55; }
.brand { display: flex; align-items: center; gap: 9px; font-family: var(--ff-ui); font-weight: 850; text-transform: uppercase; font-size: 20px; white-space: nowrap; letter-spacing: .07em; text-shadow: 0 0 14px color-mix(in srgb, var(--accent, var(--gold)) 50%, transparent); }
.brand svg { width: 24px; height: 24px; color: var(--accent); flex: none; }
.brand span { color: var(--accent); text-shadow: 0 0 14px currentColor; }
.spacer { flex: 1; }
.tabs { display: flex; gap: 4px; }
.toolbar { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; padding: 12px 18px 0; width: 100%; max-width: 1360px; margin: 0 auto; }
.tabs button { border-radius: 99px; padding: 6px 16px; }
.tabs button[aria-selected=true] { background: var(--accent-glow); border-color: var(--accent); color: var(--accent-hi); }
.ctl-inline { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: 12px; }
.ctl-inline input[type=text], .ctl-inline input[type=number] { width: 96px; font-family: var(--ff-mono); }
.ctl-inline input[type=range] { width: 120px; }
.ctl-inline output { font-family: var(--ff-mono); color: var(--text); min-width: 20px; }

main.wrap { flex: 1; width: 100%; max-width: 1360px; margin: 0 auto; padding: 16px 18px 36px; }
section[hidden] { display: none; }
.bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 14px; }
.hint { font-size: 12px; color: var(--faint); line-height: 1.5; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 330px), 1fr)); gap: 14px; }
.ccard { position: relative; background: linear-gradient(180deg, #17151b, #0f0e13); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-1); padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; }
.ccard.locked { border-color: var(--accent); box-shadow: 0 0 0 1px rgba(201, 143, 220, .25), 0 0 28px rgba(201, 143, 220, .1), var(--shadow-1); }
.ctop { display: flex; gap: 12px; align-items: center; }
.ctop svg { width: 64px; height: 64px; flex: none; border-radius: 12px; background: var(--bg-elev); border: 1px solid var(--line); }
.cname { margin: 0; font-family: var(--ff-display); font-size: 20px; font-weight: 600; line-height: 1.15; }
.csub { font-size: 12px; color: var(--muted); margin-top: 2px; }
.cbtns { margin-left: auto; display: flex; flex-direction: column; gap: 4px; }
.cbtns button { padding: 2px 8px; font-size: 13px; }
.cbtns button.on { background: var(--accent-glow); border-color: var(--accent); color: var(--accent-hi); }
.tags { display: flex; flex-wrap: wrap; gap: 5px; }
.tag.tr { border-color: rgba(201, 143, 220, .4); color: var(--accent-hi); }
.story { font-size: 12.5px; color: var(--muted); line-height: 1.5; margin: 0; }
.story b { color: var(--text); font-weight: 600; }
.skills { display: grid; grid-template-columns: 1fr 1fr; gap: 3px 14px; }
.sk { display: grid; grid-template-columns: 1fr 22px; align-items: center; gap: 6px; font-size: 11.5px; color: var(--muted); position: relative; }
.sk .bar2 { grid-column: 1 / 2; height: 5px; border-radius: 3px; background: var(--bg-elev); overflow: hidden; }
.sk .bar2 i { display: block; height: 100%; background: var(--accent); border-radius: 3px; }
.sk b { font-family: var(--ff-mono); font-size: 11px; color: var(--text); text-align: right; font-weight: 500; }
.sk.p1 .nm::after { content: " ✦"; color: var(--accent-hi); }
.sk.p2 .nm::after { content: " ✦✦"; color: #ffb454; }
.sk .nm { grid-column: 1 / 3; }
.sk.dim { opacity: .55; }
.bonds { font-size: 12px; color: var(--muted); }
.bonds span { margin-right: 10px; white-space: nowrap; }
.bonds .rel-spouse { color: #f39ac0; } .bonds .rel-friend { color: #8fd6a0; } .bonds .rel-sibling { color: #8fb7ee; } .bonds .rel-rival { color: #f08a8a; }

.two { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 14px; align-items: start; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-md); box-shadow: var(--shadow-1); padding: 12px 14px 14px; min-width: 0; margin-bottom: 14px; }
.card h2 { margin: 0 0 10px; font-family: var(--ff-ui); font-size: 11px; text-transform: uppercase; letter-spacing: .18em; color: var(--accent); font-weight: 600; display: flex; gap: 8px; align-items: baseline; }
.card h2 .sub { color: var(--faint); letter-spacing: .02em; text-transform: none; font-weight: 400; font-size: 12px; }
#web svg { width: 100%; height: auto; display: block; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 12px; color: var(--muted); margin-top: 8px; }
.legend i { display: inline-block; width: 16px; height: 3px; border-radius: 2px; margin-right: 6px; vertical-align: 3px; }
.tablewrap { overflow: auto; max-height: 560px; border: 1px solid var(--line-soft); border-radius: 8px; }
table { border-collapse: collapse; font-family: var(--ff-mono); font-size: 11.5px; width: 100%; }
th, td { padding: 4px 6px; text-align: center; border-bottom: 1px solid var(--line-soft); white-space: nowrap; }
th { position: sticky; top: 0; background: var(--panel-3); color: var(--accent-hi); font-weight: 600; }
th:first-child, td:first-child { text-align: left; position: sticky; left: 0; background: var(--panel-3); z-index: 1; }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; margin-bottom: 14px; }
.kpi { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; }
.kpi b { display: block; font-family: var(--ff-display); font-size: 26px; font-weight: 600; line-height: 1.1; }
.kpi span { font-size: 11px; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); }
.daygrid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 14px; align-items: start; }
.log { list-style: none; margin: 0; padding: 0; max-height: 420px; overflow: auto; font-size: 13px; }
.log li { display: grid; grid-template-columns: 44px 1fr; gap: 8px; padding: 5px 0; border-bottom: 1px solid var(--line-soft); color: var(--muted); }
.log li time { font-family: var(--ff-mono); color: var(--faint); }
.log li.good { color: #a6e3b4; } .log li.bad { color: #f2a0a0; }
.tl { display: grid; grid-template-columns: 110px repeat(24, 1fr) 40px; gap: 1px; align-items: center; font-size: 11px; margin-bottom: 3px; }
.tl .who { color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tl i { height: 14px; border-radius: 2px; }
.tl .m { font-family: var(--ff-mono); text-align: right; color: var(--text); }
.tl.head i { background: none; height: auto; font-style: normal; color: var(--faint); font-size: 9px; text-align: center; }
.act-сон { background: #3c4b8c; } .act-їжа { background: #cf8d3a; } .act-відпочинок { background: #5a5766; } .act-розвага { background: #d96aa0; } .act-розмова { background: #6fc3a0; } .act-зрив { background: #d9534f; } .act-робота { background: #b79ae0; }
.legend2 { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 11px; color: var(--muted); margin: 8px 0; }
.legend2 i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 5px; vertical-align: -1px; }
.pr1 { color: #ffb454; } .pr2 { color: #e2bcf0; } .pr3 { color: var(--muted); } .pr4 { color: var(--faint); } .pr0 { color: #5b5864; }
.workbars .wb { display: grid; grid-template-columns: 110px 1fr 50px; gap: 8px; align-items: center; font-size: 12px; color: var(--muted); margin-bottom: 4px; }
.workbars .wb .b { height: 8px; background: var(--bg-elev); border-radius: 4px; overflow: hidden; } .workbars .wb .b i { display: block; height: 100%; background: var(--accent); }
.workbars .wb span:last-child { font-family: var(--ff-mono); text-align: right; color: var(--text); }

.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%) translateY(20px); opacity: 0; background: var(--panel-3); color: var(--accent-hi); border: 1px solid var(--accent);
  font-weight: 600; padding: 10px 20px; border-radius: 99px; box-shadow: var(--shadow-2); transition: .25s var(--ease); pointer-events: none; z-index: 50; max-width: calc(100vw - 32px); text-align: center; }
.toast.show { opacity: 1; transform: translateX(-50%); }
@media (max-width: 960px) { .two, .daygrid { grid-template-columns: minmax(0, 1fr); } header.top { padding: 12px 16px; } main.wrap { padding: 12px 16px 28px; } .tl { grid-template-columns: 70px repeat(24, 1fr) 34px; } }
