:root {
  --bg: #15110c;
  --panel: #1f1912;
  --panel-2: #2a2219;
  --line: #3b3024;
  --text: #f0e7d6;
  --muted: #a7987f;
  --gold: #e0b04a;
  --gold-dim: #8a6b2c;
  --good: #8bbf5a;
  --bad: #e27a6b;
  --radius: 10px;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --c-levels: #6fa8dc;
  --c-quests: #e0b04a;
  --c-diaries: #8bbf5a;
  --c-combat: #f0875e; /* soft red-orange, kept clear of the Dragon tier's wine red */
  --c-clog: #b48ce0;
  --c-goals: #5fc7b5;
  --c-pets: #e85dd5;
  --c-slayer: #c94a4a; /* slayer helm red */
}

* { box-sizing: border-box; }
html { color-scheme: dark; }
body {
  margin: 0;
  background: radial-gradient(1200px 500px at 50% -200px, #2a2014, var(--bg));
  background-attachment: fixed;
  color: var(--text);
  font: 15px/1.5 var(--sans);
}
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.muted { color: var(--muted); }
.small { font-size: 13px; }
code { background: var(--panel-2); padding: 1px 6px; border-radius: 5px; font-size: 13px; }

/* Header */
.top {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 14px clamp(16px, 4vw, 40px);
  border-bottom: 1px solid var(--line);
  background: rgba(21, 17, 12, .85);
  position: sticky; top: 0; z-index: 5; backdrop-filter: blur(6px);
}
.brand { display: flex; align-items: center; gap: 10px; font: 600 19px var(--serif); letter-spacing: .3px;
  color: inherit; text-decoration: none; }
.brand:hover span { color: var(--gold); }
.mark { width: 26px; height: 26px; display: block; }
.lookup { display: flex; gap: 8px; }
input, select {
  background: var(--panel); color: var(--text); border: 1px solid var(--line);
  border-radius: 8px; padding: 8px 10px; font: inherit; min-width: 0;
}
input:focus-visible, select:focus-visible, button:focus-visible { outline: 2px solid var(--gold); outline-offset: 1px; }
#name { width: 200px; }

.btn {
  background: var(--panel-2); color: var(--text); border: 1px solid var(--line);
  border-radius: 8px; padding: 8px 14px; font: inherit; cursor: pointer; white-space: nowrap;
}
.btn:hover { border-color: var(--gold-dim); }
.btn.primary { background: var(--gold); color: #24190b; border-color: var(--gold); font-weight: 600; }
.btn.primary:hover { filter: brightness(1.08); }
.btn.ghost { background: transparent; }
.btn.tiny { padding: 4px 10px; font-size: 13px; }
.link { background: none; border: 0; color: var(--gold); font: inherit; cursor: pointer; padding: 0; text-decoration: underline; }

main { max-width: 1160px; margin: 0 auto; padding: 28px clamp(16px, 4vw, 40px) 80px; }

/* Intro */
.intro { max-width: 680px; margin: 7vh auto 0; }
.intro h1 { font: 600 clamp(30px, 4.4vw, 44px)/1.1 var(--serif); margin: 0 0 14px; }
.lede { font-size: 17px; color: #d9ccb4; margin: 0 0 22px; }
.steps { margin: 0 0 18px; padding: 0; list-style: none; counter-reset: s; display: grid; gap: 10px; }
.steps li { counter-increment: s; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px 12px 48px; position: relative; }
.steps li::before { content: counter(s); position: absolute; left: 14px; top: 11px; width: 22px; height: 22px; border-radius: 50%;
  background: var(--panel-2); color: var(--gold); display: grid; place-items: center; font-weight: 700; font-size: 13px; }
.error { color: var(--bad); background: #2b1612; border: 1px solid #5b2a22; padding: 10px 12px; border-radius: 8px; }

/* Summary */
.summary { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 18px 28px; align-items: center;
  background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 18px 22px; }
.who h2 { font: 600 26px var(--serif); margin: 0; display: flex; align-items: center; flex-wrap: wrap; }
.who .muted { font-size: 13px; }
/* Account type helm in front of the name, like the game's chat badge (sprites are 10-13 px). */
.who h2 .ghelm { height: 20px; width: auto; image-rendering: pixelated; margin-right: 8px; }
/* Showcase: one item or pet the player picked (or their rarest), framed like a collection log slot. */
.showcase { display: inline-grid; place-items: center; min-width: 40px; height: 38px; margin-left: 12px; padding: 2px 4px;
  border-radius: 8px; border: 1px solid var(--gold-dim); cursor: pointer;
  background: radial-gradient(circle at 50% 40%, rgba(224, 176, 74, .18), var(--panel-2) 70%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.06), 0 1px 0 rgba(0,0,0,.4); }
.showcase:hover, .showcase:focus-visible { border-color: var(--gold); }
.showcase.pet { border-color: color-mix(in srgb, var(--c-pets) 60%, transparent);
  background: radial-gradient(circle at 50% 40%, color-mix(in srgb, var(--c-pets) 22%, transparent), var(--panel-2) 70%); }
.showcase .gicon { max-height: 32px; max-width: 36px; width: auto; height: auto; image-rendering: pixelated; }
.showcase .name { font: 600 12px var(--sans); color: var(--gold); padding: 0 4px; white-space: nowrap; }
.showcase.empty { border-style: dashed; border-color: var(--line); color: var(--muted); background: none; font: 600 16px var(--sans); }
.showcase.empty:hover { color: var(--gold); border-color: var(--gold-dim); }
#showcasefilter { width: 100%; margin: 10px 0; }
.showcasetabs { display: flex; margin-top: 10px; }
.showcasetabs button { flex: 1; padding: 7px 8px; white-space: nowrap; }
.showcasetabs button[aria-selected="true"] { background: var(--panel-2); color: var(--text); box-shadow: inset 0 -2px 0 var(--gold); }
.showcasetabs .dot { color: var(--gold); font-size: 8px; vertical-align: 2px; }
.showcaselist .pick.none { color: var(--muted); font-style: italic; background: none; border: 1px dashed var(--line); }
.showcaselist .pick.none.on { color: var(--text); border-style: solid; }
.showcaselist .tag { font: 600 10px var(--sans); text-transform: uppercase; letter-spacing: .6px; color: var(--gold);
  border: 1px solid var(--gold-dim); border-radius: 999px; padding: 1px 6px; margin-left: 6px; font-style: normal; }
.dlgfoot { display: flex; justify-content: flex-end; gap: 8px; margin: 12px 0 0; }
.btn.primary.danger { background: var(--bad); border-color: var(--bad); }
/* Favourite boss, quest and skill: quiet chips under the name, only for the ones picked. */
.favs { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 6px; }
.favchip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px 3px 6px; border-radius: 999px; cursor: pointer;
  background: var(--panel-2); border: 1px solid var(--line); color: var(--text); font: 500 13px var(--sans); }
.favchip:hover, .favchip:focus-visible { border-color: var(--gold-dim); }
.favchip .gicon { max-height: 18px; width: auto; image-rendering: pixelated; }
.favchip.max span { color: var(--gold); }
.toggle.showcaseedit::before { content: "★"; color: var(--gold-dim); }
.showcaselist { list-style: none; margin: 0; padding: 0; display: grid; gap: 3px; max-height: 40vh; overflow-y: auto; }
.showcaselist .pick { display: flex; align-items: center; gap: 8px; width: 100%; text-align: left; padding: 5px 9px; border-radius: 6px;
  background: var(--panel-2); color: var(--text); border: 1px solid transparent; font: inherit; font-size: 13px; cursor: pointer; }
.showcaselist .pick:hover { border-color: var(--gold-dim); }
.showcaselist .pick.on { border-color: var(--gold); box-shadow: inset 3px 0 0 var(--gold); }
.showcaselist .grow { flex: 1; }
/* ☆ on owned items in the Collection log and Pets tabs. */
.star { background: none; border: 0; padding: 0 6px 0 0; color: var(--muted); cursor: pointer; font-size: 14px; line-height: 1; opacity: .55; }
.star:hover, .star:focus-visible, .star.on { color: var(--gold); opacity: 1; }
:is(.clogitems li, .pet, .sk, .list tr):not(:hover) .star:not(.on):not(:focus-visible) { opacity: 0; }
@media (hover: none) { .star { opacity: .55 !important; } .star.on { opacity: 1 !important; } }
.itemgoal { background: none; border: 1px solid #4a3d2d; border-radius: 4px; padding: 0 6px; margin-right: 8px; color: var(--muted); cursor: pointer; font-size: 11px; font-style: normal; line-height: 16px; }
.itemgoal:hover, .itemgoal:focus-visible, .itemgoal.on { color: var(--gold); border-color: var(--gold); }
.clogitems li:not(:hover) .itemgoal:not(.on):not(:focus-visible) { opacity: 0; }
@media (hover: none) { .itemgoal { opacity: 1 !important; } }
.pet .q, .sk .q { display: inline-flex; align-items: center; }
/* The skill grid is tight: there the ☆ only takes room while hovered (or once it's ★). */
.sk .q { overflow: visible; flex-shrink: 0; }
.sk:not(:hover):not(:focus-within) .star:not(.on) { display: none; }
.sampletype { display: flex; align-items: center; gap: 8px; margin: 6px 0 4px; }
.sampletype select { padding: 4px 8px; font-size: 13px; }
/* Three equal columns, two rows, whatever the name column beside them holds (a showcase, a public
   profile note): the numbers line up the same on the owner's page and on a view-only page. */
.stats { display: grid; grid-template-columns: repeat(3, minmax(92px, max-content)); gap: 10px 26px; justify-content: end; }
.stat { min-width: 92px; }
.stat b { display: block; font: 600 20px var(--serif); font-variant-numeric: tabular-nums; }
.stat span { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .6px; white-space: nowrap; }
.stale { color: var(--gold); }

/* Section head */
.sectionhead { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin: 34px 0 10px; flex-wrap: wrap; }
.sectionhead h2 { font: 600 24px var(--serif); margin: 0; }
.controls { display: flex; gap: 10px; align-items: center; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.seg button { background: var(--panel); color: var(--muted); border: 0; padding: 7px 12px; font: inherit; cursor: pointer; }
.seg button + button { border-left: 1px solid var(--line); }
.seg button[aria-checked="true"] { background: var(--panel-2); color: var(--text); box-shadow: inset 0 -2px 0 var(--gold); }

.tierhint { margin: -4px 0 10px; }
.foot { text-align: center; padding: 0 16px 28px; }
.foot a { color: var(--muted); }
.optin { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: -6px 0 14px; }
.optins { display: inline-flex; gap: 6px; flex-wrap: wrap; }
.toggle { display: inline-flex; align-items: center; gap: 6px; border: 1px dashed var(--line); background: transparent; color: var(--muted);
  border-radius: 999px; padding: 3px 11px; font: 13px var(--sans); cursor: pointer; }
.toggle[aria-pressed="true"] { border-style: solid; border-color: var(--gold-dim); color: var(--text); background: rgba(224,176,74,.08); }
.toggle::before { content: "+"; color: var(--muted); }
.toggle[aria-pressed="true"]::before { content: "✓"; color: var(--gold); }
.optinlinks { margin-left: auto; display: inline-flex; gap: 14px; }
#lockedbtn, #hiddenbtn { color: var(--muted); }
#lockedbtn:hover, #hiddenbtn:hover { color: var(--gold); }
/* "Not for me": the card's buttons turn into how long to hide it. */
.card .actions .hideask { color: var(--muted); align-self: center; }
.dlg { background: var(--panel); color: var(--text); border: 1px solid var(--line); border-radius: 14px; padding: 18px 20px;
  width: min(560px, 92vw); max-height: 80vh; }
.dlg::backdrop { background: rgba(0,0,0,.6); }
.dlghead { display: flex; justify-content: space-between; align-items: center; }
.dlghead h3 { font: 600 20px var(--serif); margin: 0; }
.dlg .x { background: none; border: 0; color: var(--muted); font-size: 22px; cursor: pointer; }
/* Route planner */
#planbtn { margin-left: auto; color: var(--gold); border-color: var(--gold-dim); }
.planfoot { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 14px 0 0; }
.planlist .pt a { color: inherit; text-decoration: none; }
.planlist .pt a:hover { color: var(--gold); text-decoration: underline; }
/* The pinned route on the page */
.goalcol { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.routepanel { border-color: var(--gold-dim); }
.routepanel .panelhead { margin-bottom: 6px; }
.routeacts { margin-left: auto; display: inline-flex; gap: 8px; flex-wrap: wrap; }
.routefor { display: flex; flex-direction: column; margin: 0 0 10px; }
.routefor ul { margin: 4px 0 0; padding-left: 18px; display: grid; gap: 3px; font-size: 13px; max-height: 260px; overflow-y: auto; overflow-wrap: anywhere; }
.routefor li::marker { color: var(--gold-dim); }
.routefor .rfsub { margin: 3px 0 2px; padding-left: 16px; display: grid; gap: 1px; max-height: none; overflow: visible; color: var(--muted); font-size: 12px; list-style: circle; }
.routefor .rfsub li::marker { color: var(--muted); }
.routefor .rftoggle { align-self: flex-end; margin-top: 4px; }
.routemeta { display: flex; align-items: center; gap: 6px 12px; flex-wrap: wrap; margin: 0 0 12px; font-size: 13px; color: var(--muted); }
.routemeta > span:first-child { white-space: nowrap; color: var(--text); }
.routemeta .bar { flex: 1 1 120px; max-width: 260px; }
.routemeta .rt { flex: 1 1 100%; }
.routepanel .planlist li.next { padding: 6px 10px; margin-left: -10px; border-radius: 8px; background: color-mix(in srgb, var(--gold) 9%, transparent); }
.routepanel .planlist li.next::marker { color: var(--gold); }
.routepanel .nexttag { color: #24190b; background: var(--gold); border-radius: 6px; font-size: 11px; font-weight: 700; padding: 1px 6px; margin-right: 6px; text-transform: uppercase; letter-spacing: .04em; }
.routepanel .more { margin: 8px 0 0; font-size: 13px; }
.routedone { color: var(--good); margin: 4px 0 0; }
.plandlg { width: min(680px, 94vw); overflow-x: hidden; }
.planpick { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 8px 0 12px; font-size: 13.5px; }
.planpick label { display: inline-flex; gap: 6px; align-items: center; cursor: pointer; }
.plansum { margin: 0 0 10px; font-size: 13.5px; }
.planlist { margin: 0; padding-left: 26px; display: grid; gap: 7px; }
.planlist li { line-height: 1.35; }
.planlist li::marker { color: var(--muted); font-size: 12.5px; }
.planlist .pt { font-weight: 600; }
.planlist .ph { color: var(--muted); font-size: 12.5px; white-space: nowrap; }
.planlist .pf { display: block; color: var(--muted); font-size: 12.5px; }
.planlist .shared { color: var(--gold); font-size: 11.5px; border: 1px solid currentColor; border-radius: 6px; padding: 0 5px; margin-left: 6px; }
.planlist li.goalstep .pt { color: var(--good); }
/* Ironman supply steps: a grey tag (like the game's Ironman helm) and the items to get. */
.planlist .ironstep { color: var(--muted); font-size: 11.5px; border: 1px solid currentColor; border-radius: 6px; padding: 0 5px; margin-left: 6px; }
.planlist .pitems { margin: 2px 0 0; padding-left: 18px; color: var(--muted); font-size: 12.5px; }
.planlist .pitems b { color: var(--text); font-weight: 600; }
.plannote { color: var(--muted); font-size: 12.5px; margin: 12px 0 0; }
/* Combat achievement planner */
.cacontrols { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; margin: 10px 0 8px; font-size: 13.5px; }
.cacontrols label { display: inline-flex; gap: 6px; align-items: center; }
.casum { display: grid; gap: 6px; margin: 0 0 10px; font-size: 13.5px; }
.casum .ok { color: var(--good); }
.casum .short { color: var(--gold); }
.casum .bar { max-width: 360px; }
.caacts { display: flex; gap: 8px; flex-wrap: wrap; margin: 0 0 10px; }
.cabosses { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; max-height: 44vh; overflow-y: auto; border-top: 1px solid var(--line); }
.cabosses li { border-bottom: 1px solid var(--line); }
.cabosses label { display: grid; grid-template-columns: auto 1fr auto; gap: 2px 10px; align-items: start; padding: 7px 4px; cursor: pointer; }
.cabosses .cn { font-weight: 600; min-width: 0; overflow-wrap: anywhere; }
.cabosses .cp { white-space: nowrap; font-size: 13px; text-align: right; }
.cabosses .cs { grid-column: 2 / 4; color: var(--muted); font-size: 12.5px; }
.cabosses .lock { color: var(--gold); }
.cabosses li.locked .cn { color: var(--muted); }
.cabosses .cahead { display: flex; align-items: start; gap: 6px; }
.cabosses .cahead label { flex: 1; min-width: 0; }
.cabosses .cax { margin: 6px 2px 0 0; white-space: nowrap; }
.cabosses .capick { margin: 0 0 8px; padding-left: 26px; }
.capick li.pick { padding: 0; }
.capick li.pick label { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; padding: 4px 9px; width: 100%; cursor: pointer; }
.capick li.pick label > span:nth-of-type(1) { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.capick li.pick input { margin-top: 2px; flex: none; }
.capick li.pick.on { background: rgba(139, 191, 90, .1); border-color: rgba(139, 191, 90, .3); border-style: solid; }
.cafilters { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; margin: 4px 0 10px; font-size: 13.5px; }
.catasks .q .btn { margin-right: 6px; font-style: normal; }
.catasks .goalmark { color: var(--gold); margin-right: 6px; font-style: normal; }
.cafilters label { display: inline-flex; gap: 6px; align-items: center; }
#cabtn { margin-left: 8px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.chip { --c: var(--muted); display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); background: transparent;
  color: var(--muted); border-radius: 999px; padding: 4px 11px; font: 13px var(--sans); cursor: pointer; }
.chip::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--c); opacity: .35; }
.chip[aria-pressed="true"] { color: var(--text); border-color: color-mix(in srgb, var(--c) 45%, var(--line)); }
.chip[aria-pressed="true"]::before { opacity: 1; }
.chip.complete { cursor: default; color: var(--gold); border-color: var(--gold-dim); background: rgba(224, 176, 74, .08); }
.chip.complete::before { display: none; }

.badges { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 8px; padding-top: 14px; border-top: 1px solid var(--line); }
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 999px;
  font: 600 13px var(--sans); color: #2a1d08; background: linear-gradient(180deg, #f1cb6e, #d29f35);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.35), 0 1px 0 rgba(0,0,0,.4); }

/* Cards */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.card { --c: var(--gold); background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 18px;
  display: flex; flex-direction: column; gap: 10px; position: relative; overflow: hidden; animation: rise .3s ease-out; }
.card::before { content: ""; position: absolute; inset: 0 0 auto; height: 3px; background: var(--c); }
.card .cat { font-size: 12px; text-transform: uppercase; letter-spacing: .8px; color: var(--c); font-weight: 600; display: flex; justify-content: space-between; }
.card .effort { color: var(--muted); font-weight: 500; }
.card .catright { display: inline-flex; align-items: center; gap: 8px; }
.card .est { color: var(--gold); font-weight: 500; white-space: nowrap; text-transform: none; letter-spacing: 0; }
.card h3 { font: 600 20px/1.2 var(--serif); margin: 0; }
.card .detail { color: #d6c8af; margin: 0; font-size: 14px; }
.card ul { margin: 0; padding-left: 18px; color: var(--muted); font-size: 13.5px; }
.card ul li { margin: 2px 0; }
.card .actions { margin-top: auto; display: flex; gap: 8px; padding-top: 6px; }
/* OSRS Wiki quick links: pushed to the right of a card's buttons, and a small one on goals. */
a.btn { text-decoration: none; display: inline-flex; align-items: center; }
.card .actions .wiki { margin-left: auto; color: var(--muted); }
.card .actions .wiki:hover { color: var(--text); }
.wikimini { color: var(--muted); font-size: 12px; text-decoration: none; margin: 0 4px 0 6px; white-space: nowrap; }
.wikimini:hover { color: var(--gold); text-decoration: underline; }
.bar { height: 6px; background: var(--panel-2); border-radius: 99px; overflow: hidden; }
.bar > i { display: block; height: 100%; background: var(--c, var(--gold)); border-radius: 99px; }
/* A bar with a short counter beside it ("30/50 kills"), so the bar says what it measures. */
.barrow { display: flex; align-items: center; gap: 10px; }
.barrow .bar { flex: 1; }
.barrow .counter { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.card .actions { flex-wrap: wrap; }

/* "Since last time": what changed since the previous sync, under the player's name. */
.since { margin: 8px 0 0; line-height: 1.6; }
.since .sincepart { color: var(--text); white-space: nowrap; }
.since .sincepart[title] { border-bottom: 1px dotted var(--muted); cursor: help; }
.since .k-goals { color: var(--gold); }

/* Marking progress by hand (for players who don't sync after every session). */
.manualrow { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 8px; }
#manualbtn::before { content: "✎"; }
#manualbtn[aria-pressed="true"]::before { content: "✓"; }
.markbtn[aria-pressed="true"] { color: var(--good); border-color: color-mix(in srgb, var(--good) 50%, var(--line)); }
.markmini { background: none; border: 1px solid var(--line); color: var(--muted); border-radius: 99px; font: 11.5px var(--sans);
  padding: 0 8px; margin-right: 6px; cursor: pointer; }
.markmini:hover { color: var(--text); border-color: var(--gold-dim); }
.markmini[aria-pressed="true"] { color: var(--good); }
.manualnote { margin: 0 0 8px; color: var(--gold); }
button.tierbox { padding: 0; cursor: pointer; }
button.tierbox:hover { outline: 2px solid var(--gold); outline-offset: 1px; }
/* Done by hand: green, with a dashed edge until a sync confirms it. */
.tierbox.marked { background: color-mix(in srgb, var(--good) 55%, var(--panel-2)); border: 1px dashed #d8f0bf; }

/* Within reach: quests and diary tiers you can do now or nearly can, under the summary. */
.reach { margin-top: 22px; }
.reachhead { display: flex; align-items: end; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.reachhead h2 { font: 600 22px var(--serif); margin: 0; }
.reachhead p { margin: 2px 0 0; }
.reachstate { font-size: 11px; font-weight: 700; letter-spacing: .4px; padding: 1px 8px; border-radius: 99px; text-transform: none; }
.reachstate.ready { background: var(--good); color: #13200a; }
.reachstate.close { background: var(--panel-2); color: var(--gold); border: 1px solid var(--gold-dim); }
.card.reach.ready { border-color: color-mix(in srgb, var(--good) 35%, var(--line)); }
.card.reach h3 { font-size: 18px; }
.card .trigger { margin: -2px 0 0; font-size: 12.5px; font-weight: 600; color: var(--gold); }
.card ul.reqs { list-style: none; padding: 0; display: grid; gap: 3px; font-size: 13px; }
.reqs li { display: flex; gap: 6px; align-items: baseline; }
.reqs li.no { color: #f0c2b9; }
.reqs li.no > span:first-child { color: var(--bad); }
.reqs li.yes { color: var(--muted); }
.reqs li.yes > span:first-child { color: var(--good); }
.reqs li.unk { color: var(--muted); font-style: italic; }
.reqs .have { color: var(--muted); font-size: 12px; margin-left: auto; white-space: nowrap; }
/* Mixed carousel: seven cards across all tiers */
/* Tiers are themed after OSRS metals: Bronze (Quick), Mithril (Balanced), Dragon (Long haul,
   a deep red-wine). Each tier also has a text colour that reads on its fill. */
:root {
  --t-Quick: #c4884f; --t-Quick-ink: #221306;
  --t-Medium: #7d86d4; --t-Medium-ink: #0f1233;
  --t-Long: #8e2440; --t-Long-ink: #fbe8ee;
}
.cards.mix { display: block; }
.mixhead { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.ladder { flex: 1; display: flex; gap: 4px; height: 26px; }
.rung { display: flex; align-items: center; justify-content: center; gap: 5px; border-radius: 6px; font-size: 12px;
  color: #1d150b; font-weight: 600; white-space: nowrap; overflow: hidden; }
.rung b { font-size: 13px; }
.rung.t-Quick { background: var(--t-Quick); color: var(--t-Quick-ink); }
.rung.t-Medium { background: var(--t-Medium); color: var(--t-Medium-ink); }
.rung.t-Long { background: var(--t-Long); color: var(--t-Long-ink); }
.mixnav { display: flex; gap: 6px; }
.mixnav .btn { width: 32px; padding: 4px 0; font-size: 16px; line-height: 1; }
.track { display: flex; gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 2px 2px 12px;
  scrollbar-width: thin; scrollbar-color: var(--line) transparent; }
.track:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; border-radius: 14px; }
.track .card { flex: 0 0 clamp(240px, 31%, 320px); scroll-snap-align: start; }
/* In Mixed, the top stripe, badge and progress bar use the tier colour (matching the tier bar
   above); the category name keeps its own colour, the same as in the single-tier views. */
.cards.mix .card .catname { color: var(--cat); }
.tierbadge { font-size: 11px; font-weight: 700; letter-spacing: .4px; padding: 1px 8px; border-radius: 99px; color: #1d150b; }
.tierbadge.t-Quick { background: var(--t-Quick); color: var(--t-Quick-ink); }
.tierbadge.t-Medium { background: var(--t-Medium); color: var(--t-Medium-ink); }
.tierbadge.t-Long { background: var(--t-Long); color: var(--t-Long-ink); }

/* Challenge tier, above Long haul: themed after Third age (pale silver with gold trim). It isn't a
   grind style; one challenge card sits on its own row under the regular picks. */
:root { --t-Challenge: #d9dde3; --t-Challenge-ink: #1b1f26; --t-Challenge-trim: #e0b04a; }
.tierbadge.t-Challenge { background: linear-gradient(180deg, #eef0f3, var(--t-Challenge)); color: var(--t-Challenge-ink);
  box-shadow: inset 0 0 0 1px var(--t-Challenge-trim); }
.challengerow { margin-top: 16px; }
.card.challenge { border-color: color-mix(in srgb, var(--t-Challenge-trim) 45%, var(--line));
  background: linear-gradient(135deg, color-mix(in srgb, var(--t-Challenge) 7%, var(--panel)), var(--panel) 60%); }
.card.challenge::before { background: linear-gradient(90deg, var(--t-Challenge-trim), var(--t-Challenge), var(--t-Challenge-trim)); }
.challengehead { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.card.challenge .actions { margin-top: 2px; }

/* Current Slayer task: its own card above the picks, with chips for the task's bosses
   (green: you can fight it, red: still locked). */
.slayerrow { margin: 4px 0 16px; }
.slayerhead { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.tierbadge.t-Slayer { background: var(--c-slayer); color: #fff; }
.bosses { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 2px 0 4px; }
.bosschip { padding: 1px 9px; border-radius: 99px; text-decoration: none; border: 1px solid; }
.bosschip.open { color: var(--good); border-color: color-mix(in srgb, var(--good) 55%, transparent); background: color-mix(in srgb, var(--good) 12%, transparent); }
.bosschip.locked { color: var(--bad); border-color: color-mix(in srgb, var(--bad) 55%, transparent); background: color-mix(in srgb, var(--bad) 12%, transparent); }
.bosschip:hover { filter: brightness(1.2); text-decoration: underline; }
.bosschip .need { opacity: .85; }
.card.slayer { border-color: color-mix(in srgb, var(--c-slayer) 40%, var(--line)); }
.card.slayer.nodata { border-style: dashed; }

/* A section this profile doesn't have (an older plugin didn't record it). */
.missing { margin: 6px 0 0; padding: 4px 10px; border-left: 2px solid var(--gold-dim); background: color-mix(in srgb, var(--gold) 6%, transparent); }

/* Opened from the RuneLite panel on one suggestion: a brief gold glow. */
.card.focus { box-shadow: 0 0 0 2px var(--gold), 0 0 24px rgba(224, 176, 74, .45); transition: box-shadow .4s; }

/* Opened from a share link or a public profile: suggestions only, goals can't be changed. */
.publicnote { margin: 4px 0 0; }
.publicnote a { color: inherit; text-decoration: underline; }
.viewonly { display: inline-block; padding: 0 8px; border-radius: 99px; font-size: 12px; font-weight: 600;
  color: var(--t-Medium-ink, #0f1233); background: var(--t-Medium, #7d86d4); }
/* View only (share links, public profiles, the owner's preview): one fixed view, no controls. */
#app.readonly .controls, #app.readonly #chips, #app.readonly .optin, #app.readonly #goalform { display: none; }

/* The owner of an uploaded profile, with a switch to preview the view-only page. */
.ownerpill { display: inline-block; padding: 0 8px; border-radius: 99px; font-size: 12px; font-weight: 600;
  color: var(--gold); border: 1px solid var(--gold-dim); cursor: help; }
#visitorbtn { margin-left: 4px; }

/* Profile import: a paste box, a file button, and drag-and-drop anywhere on the page. */
.importbox { display: grid; gap: 10px; margin: 6px 0 14px; max-width: 640px; }
.pastebox { width: 100%; box-sizing: border-box; resize: vertical; min-height: 64px; padding: 12px 14px;
  background: var(--panel-2); color: var(--text, #e8dcc4); border: 1px dashed var(--line); border-radius: 12px;
  font: 14px var(--sans); }
.pastebox:focus { outline: 2px solid var(--gold); outline-offset: 1px; border-style: solid; }
.importrow { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.importrow label.btn { cursor: pointer; }
.importerr { margin: 0; }
.forgetrow { margin: 4px 0 0; }

/* Wilderness warning badge: a skull and crossbones on any card in PvP-risk areas. */
.wildbadge { align-self: flex-start; display: inline-flex; align-items: center; gap: 6px; padding: 2px 10px 2px 6px;
  border-radius: 99px; font-size: 12px; font-weight: 700; letter-spacing: .3px;
  color: #ffd9d2; background: #3a1210; border: 1px solid #b2382c; }
.wildbadge .skull { font-size: 15px; line-height: 1; color: #f2ede4; font-family: "Segoe UI Symbol", "Noto Sans Symbols 2", sans-serif; }
.card.challenge .wildbadge { margin-top: -2px; }
/* Game icons (web/icons/game, exported from the game cache). Item icons are drawn at their own
   36x32 size; interface sprites are scaled up in whole pixels where they're shown big. */
.gicon { flex: none; }
.titlerow { display: flex; align-items: center; gap: 10px; }
.titlerow .gicon { width: 36px; height: 32px; object-fit: contain; image-rendering: pixelated; }
.titlerow .gicon.sprite { width: 28px; height: 28px; }
.gicon.tiny { width: 18px; height: 16px; object-fit: contain; vertical-align: -3px; margin-right: 6px; }
.goal .t .gicon { width: 20px; height: 18px; object-fit: contain; vertical-align: -4px; margin-right: 6px; }
.wildbadge .gskull { height: 15px; width: auto; }
.toggle .gskull, .bosschip .gskull { height: 14px; width: auto; vertical-align: -2px; }
.clogitems li .gicon, .pet .gicon { opacity: .95; }
.clogitems li.need .gicon, .pet:not(.owned) .gicon { opacity: .45; filter: grayscale(.6); }

/* Hardcore accounts: a death in the Wilderness also ends their Hardcore status. */
.wildbadge.hc { color: #fff; background: #5a0f0c; border-color: #e0483a; box-shadow: 0 0 0 1px rgba(224,72,58,.35); }

.emptycard { grid-column: 1 / -1; text-align: center; padding: 30px; color: var(--muted); border: 1px dashed var(--line); border-radius: 14px; }
@keyframes rise { from { transform: translateY(6px); } }

/* Shuffle: each card spins in like a slot-machine reel, left to right (--i staggers them). */
.cards { perspective: 900px; }
.card.spin {
  animation: reel .4s cubic-bezier(.2, .8, .25, 1.15) calc(var(--i, 0) * 44ms) backwards;
  transform-origin: 50% 50%; backface-visibility: hidden;
}
@keyframes reel {
  0%   { transform: rotateX(110deg); filter: blur(3px); opacity: .25; }
  55%  { transform: rotateX(-14deg); filter: blur(0); opacity: 1; }
  80%  { transform: rotateX(5deg); }
  100% { transform: rotateX(0); }
}
/* The Shuffle icon does a quick quarter turn; the tier bar pulses as the new split lands. */
#shuffle .ico { display: inline-block; margin-right: 6px; transition: transform .3s cubic-bezier(.2, .8, .25, 1.2); }
.ladder.pulse .rung { animation: rungpulse .45s ease-out calc(var(--r, 0) * 60ms + .15s) backwards; }
@keyframes rungpulse { 0% { transform: scaleY(.55); filter: brightness(1.4); } 100% { transform: none; filter: none; } }

@media (prefers-reduced-motion: reduce) {
  .card { animation: none; }
  .card.spin { animation: fadein .2s ease-out backwards; }
  .ladder.pulse .rung { animation: none; }
  #shuffle .ico { transition: none; }
}
@keyframes fadein { from { opacity: 0; } }

/* Lower panels */
.lower { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 16px; margin-top: 34px; align-items: start; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; }
.panelhead { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.panel h3 { font: 600 19px var(--serif); margin: 0; }

.goals { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 8px; }
.goal { display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; align-items: center; background: var(--panel-2); border-radius: 9px; padding: 9px 11px; }
.goal .t { font-weight: 600; }
.goal .t.done { color: var(--good); }
.goal .l { color: var(--muted); font-size: 12.5px; text-align: right; }
.goal .bar { grid-column: 1 / -1; }
/* What the goal actually asks (e.g. a combat achievement's requirement). */
.goal .gd { grid-column: 1 / -1; color: var(--muted); font-size: 12.5px; line-height: 1.35; }
.goal .x { background: none; border: 0; color: var(--muted); cursor: pointer; font-size: 16px; padding: 0 2px; }
.goal .x:hover { color: var(--bad); }
/* Combat achievement goals folded into one block that opens and closes. */
.goalgroup > details > summary { list-style: none; cursor: pointer; }
.goalgroup > details > summary::-webkit-details-marker { display: none; }
.goalgroup > details > summary:hover .t { color: var(--c-goals); }
.goalgroup .chev { display: inline-block; margin-left: 4px; transition: transform .15s; transform: rotate(-90deg); }
.goalgroup > details[open] .chev { transform: none; }
.goals.sub { margin: 0; padding: 8px 0 0 12px; border-left: 2px solid var(--panel-2); }
.goalform { display: flex; flex-wrap: wrap; gap: 8px; }
.gfields { display: contents; }
.goalform input[type=number] { width: 80px; }
.goalform .grow { flex: 1 1 160px; }

.tabs { display: flex; gap: 2px; flex-wrap: wrap; }
.tabs button { background: none; border: 0; color: var(--muted); padding: 5px 9px; border-radius: 6px; cursor: pointer; font: 13px var(--sans); }
.tabs button[aria-selected="true"] { background: var(--panel-2); color: var(--text); }
.tabbody { max-height: 420px; overflow: auto; padding-right: 4px; }

.skillgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 6px; }
.sk { background: var(--panel-2); border-radius: 8px; padding: 6px 9px; display: flex; justify-content: space-between; font-size: 13.5px; }
.sk b { font-variant-numeric: tabular-nums; }
.sk span { display: flex; align-items: center; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sk { gap: 6px; }
.sk.max b { color: var(--gold); }

.petgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 6px; }
.pet { background: var(--panel-2); border-radius: 8px; padding: 6px 9px; display: flex; justify-content: space-between; gap: 6px;
  font-size: 13px; color: var(--muted); border: 1px solid transparent; }
.pet.owned { color: var(--text); border-color: color-mix(in srgb, var(--c-pets) 40%, transparent); }
.pet i { font-style: normal; color: var(--c-pets); font-weight: 700; }

.clogpages { margin-top: 12px; border-top: 1px solid var(--line); }
.clogpage { border-bottom: 1px solid var(--line); }
.clogpage summary { display: flex; justify-content: space-between; align-items: center; gap: 10px;
  padding: 7px 6px; cursor: pointer; font-size: 13.5px; list-style: none; }
.clogpage summary::-webkit-details-marker { display: none; }
.clogpage summary::before { content: "▸"; color: var(--muted); margin-right: 2px; transition: transform .15s; }
.clogpage[open] summary::before { transform: rotate(90deg); }
.clogpage summary > span:first-child { flex: 1; }
.clogpage summary:hover { background: var(--panel-2); }
.clogitems { list-style: none; margin: 0 0 10px; padding: 0 0 0 18px; display: grid; gap: 3px; }
.clogitems li { display: flex; justify-content: space-between; gap: 10px; padding: 4px 9px; border-radius: 6px; font-size: 13px;
  border: 1px solid transparent; }
.clogitems li.have { background: rgba(139, 191, 90, .14); border-color: rgba(139, 191, 90, .28); color: #cfe9b6; }
.clogitems li.have .q { color: var(--good); }
/* Missing items: a recessed, darker row with a dashed edge so they read as empty slots. */
.clogitems li.need { background: #120e09; border: 1px dashed #4a3d2d; color: #a3967f; }
.clogitems li.need .q { color: #7d715f; font-style: italic; }
.clogitems li .q { font-size: 12px; white-space: nowrap; font-variant-numeric: tabular-nums; }
/* Combat achievement task lists (Combat tab): the requirement under each task name. */
.catasks li > span:first-child { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.catasks .catdesc { font-size: 12px; color: #a3967f; }
.catasks li.have .catdesc { color: #a9c79a; }

table.list { width: 100%; border-collapse: collapse; font-size: 13.5px; }
table.list td, table.list th { padding: 5px 6px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
table.list th { color: var(--muted); font-weight: 500; font-size: 12px; text-transform: uppercase; letter-spacing: .5px; }
#lockeddlg { width: min(660px, 92vw); }
td.lockact { text-align: right; white-space: nowrap; }
.lockgoal { color: var(--good); font-size: 13px; }
.lockedask { position: sticky; bottom: -18px; margin: 12px -20px -18px; padding: 12px 20px 16px; background: var(--panel); border-top: 1px solid var(--gold); }
.lockedask p { margin: 0; font-size: 14px; }
.lockedask .planfoot { margin-top: 10px; }
.num { text-align: right !important; font-variant-numeric: tabular-nums; }
.pill { font-size: 11.5px; padding: 1px 8px; border-radius: 99px; background: var(--panel-2); color: var(--muted); white-space: nowrap; }
.pill.ok { color: var(--good); }
.pill.mid { color: var(--gold); }
.note { color: var(--muted); font-size: 13px; margin: 8px 0 0; }

/* Diaries tab: one centred column per tier, each square a link to that tier on the wiki. */
.diarytable .tiercell { width: 64px; text-align: center; vertical-align: middle; }
.diarytable th.tiercell { font-size: 11px; }
.tierbox { display: inline-block; width: 14px; height: 14px; border-radius: 3px; vertical-align: middle;
  background: var(--panel-2); border: 1px solid var(--line); }
a.tierbox:hover { outline: 2px solid var(--gold-dim); outline-offset: 1px; }
.tierbox.done { background: var(--good); border-color: var(--good); }
.tierbox.started { background: var(--gold); border-color: var(--gold); }
.legend .tierbox { width: 11px; height: 11px; margin: 0 2px 0 8px; }
.legend .tierbox:first-child { margin-left: 0; }
.plainlink { color: inherit; text-decoration: none; }
.plainlink:hover { color: var(--gold); text-decoration: underline; }

/* Wide screens: Goals (with the pinned route above them) move into a column on the left and stay
   in view while scrolling; the
   suggestions, challenge and Account panel keep the main column. `.lower` stops being a box of its
   own so its two panels can be placed separately. Below this width, nothing changes. */
@media (min-width: 1440px) {
  main:has(> #app:not([hidden])) { max-width: 1560px; }
  #app:not([hidden]) {
    display: grid;
    grid-template-columns: minmax(300px, 340px) minmax(0, 1fr);
    column-gap: 28px;
    align-items: start;
  }
  #app > *, .lower > * { grid-column: 2; }
  .lower { display: contents; }
  .lower > .panel:last-child { margin-top: 34px; }
  #app .lower > .goalcol {
    grid-column: 1;
    grid-row: 1 / span 40;
    position: sticky;
    top: 84px; /* clear of the sticky header */
    max-height: calc(100vh - 100px);
    overflow: auto;
  }
}

/* Very wide screens: the Account panel gets its own column on the right, also kept in view, so
   the page uses the width instead of growing taller. Its tab list fills the column's height. */
@media (min-width: 1800px) {
  main:has(> #app:not([hidden])) { max-width: 2100px; }
  #app:not([hidden]) { grid-template-columns: minmax(300px, 340px) minmax(0, 1fr) minmax(380px, 460px); }
  #app .lower > section[aria-labelledby="acct-h"] {
    grid-column: 3;
    grid-row: 1 / span 40;
    margin-top: 0;
    position: sticky;
    top: 84px;
    max-height: calc(100vh - 100px);
    display: flex;
    flex-direction: column;
  }
  #app .lower > section[aria-labelledby="acct-h"] .tabbody { max-height: none; flex: 1; min-height: 0; }
}

@media (max-width: 900px) {
  .cards { grid-template-columns: 1fr; }
  .lower { grid-template-columns: 1fr; }
  .summary { grid-template-columns: 1fr; }
  .stats { justify-content: start; }
}
@media (max-width: 560px) {
  .stats { grid-template-columns: repeat(2, minmax(92px, max-content)); }
  .top { flex-direction: column; align-items: stretch; }
  #name { flex: 1; width: auto; }
}
