/* Player hub: the admin panel's look for every player page (sidebar, top bar, panels, tiles). */
:root {
  --basalt: var(--ink-0);
  --basalt-2: var(--ink-1);
  --fern: var(--ink-band);
  --fern-line: var(--line);
  --surface: var(--ink-2);
  --ph-top: 56px;
}
body { font-size: 1rem; background: radial-gradient(1200px 600px at 70% -10%, rgba(179, 38, 30, .07), transparent 60%), var(--basalt); background-attachment: fixed; }
body.ph-no-scroll { overflow: hidden; }
.btn { border-radius: var(--r-1); }
.btn-sm { min-height: 34px; padding: .4rem .8rem; font-size: .9rem; }
.btn-danger { background: transparent; color: var(--danger-text); border: 1px solid var(--danger-line); }
.btn-danger:hover { background: var(--danger-bg); border-color: var(--danger-line-hi); }
.ph-ico { display: block; flex: none; }

/* ---- layout */
.ph-app { display: grid; grid-template-columns: 256px minmax(0, 1fr); min-height: 100svh; }
.ph-top-page, .ph-menu-btn, .ph-mini-coins { display: none; }
.ph-badge { margin-left: auto; min-width: 1.35rem; padding: 0 .4rem; border-radius: 3px; background: var(--blood); color: var(--white); font-size: .74rem; font-weight: 700; line-height: 1.35rem; text-align: center; }
.ph-side-foot { margin-top: auto; padding: .9rem .35rem 0; border-top: 1px solid var(--fern-line); display: grid; gap: .75rem; }
.ph-who { display: flex; align-items: center; gap: .7rem; min-width: 0; }
.ph-who-txt { display: flex; flex-direction: column; align-items: flex-start; gap: .2rem; min-width: 0; line-height: 1.25; }
.ph-who-txt strong { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ph-who-sub { color: var(--lichen); font-size: .84rem; }
.ph-signin { width: 100%; }
.ph-signout { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; min-height: 38px; width: 100%; background: none; border: 1px solid var(--fern-line); border-radius: var(--r-1); color: var(--lichen); font-weight: 600; cursor: pointer; }
.ph-signout:hover { color: var(--bone); border-color: var(--lichen); }
.ph-scrim { display: none; }

.ph-body { display: flex; flex-direction: column; min-width: 0; padding: 1.4rem clamp(1.25rem, 3vw, 2.75rem) 0; max-width: 1300px; width: 100%; }
.ph-main { flex: 1; padding: 0 0 4rem; min-width: 0; min-height: 0; }
.ph-foot { padding: 1.5rem 0 2rem; border-top: 1px solid var(--line-soft); color: var(--dim); font-size: .85rem; }
.ph-foot p { margin: 0; }
.ph-foot .ph-foot-restart { display: inline-flex; align-items: center; gap: .45rem; margin-bottom: .6rem; color: var(--lichen); font-variant-numeric: tabular-nums; }
.ph-foot-restart::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--moss); }
.ph-foot .ph-foot-restart.is-soon { color: var(--warn-text); }
.ph-foot-restart.is-soon::before { background: var(--amber); }
.ph-foot-restart[hidden] { display: none; }
.ph-foot .ph-foot-version { margin-bottom: .6rem; color: var(--dim); font-variant-numeric: tabular-nums; }
.ph-foot-version[hidden] { display: none; }

/* desktop top bar */
.ph-top { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin: 0 0 1.6rem; padding: .55rem .6rem .55rem 1rem; background: rgba(23, 27, 21, .7); border: 1px solid var(--fern-line); border-radius: var(--r-lg); }
.ph-crumb { display: flex; align-items: center; gap: .55rem; margin: 0; color: var(--lichen); font-size: .82rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; }
.ph-crumb strong { color: var(--bone); }
.ph-top-right { display: flex; align-items: center; gap: .5rem; }
.ph-chip { display: inline-flex; align-items: center; gap: .45rem; height: 40px; padding: 0 .85rem; background: var(--field); border: 1px solid var(--fern-line); border-radius: var(--r-1); font-weight: 700; font-variant-numeric: tabular-nums; text-decoration: none; }
a.ph-chip:hover { border-color: var(--amber-line); }
.ph-chip .ph-ico { color: var(--amber); }
.ph-online { color: var(--lichen); font-weight: 600; font-size: .9rem; }
.ph-online.is-on { color: var(--bone); }
.ph-online.is-on .ph-dot { background: var(--moss); box-shadow: 0 0 0 3px rgba(111, 154, 79, .22); }
.ph-acct { display: inline-flex; align-items: center; gap: .6rem; height: 44px; padding: 0 .8rem 0 .3rem; background: var(--field); border: 1px solid var(--fern-line); border-radius: var(--r-1); }
.ph-acct-txt { display: flex; flex-direction: column; line-height: 1.15; }
.ph-acct-txt strong { font-size: .92rem; max-width: 12rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ph-acct-txt span { color: var(--lichen); font-size: .75rem; }
.ph-top .ph-top-signin { margin: 0; }

/* avatars and tiers */
.ph-avatar { --hue: 10; display: inline-grid; place-items: center; flex: none; border-radius: var(--r-1); font: 800 1rem/1 var(--display); letter-spacing: .04em; color: var(--cream);
  background: linear-gradient(135deg, hsl(var(--hue) 45% 34%), hsl(calc(var(--hue) + 40) 40% 20%)); border: 1px solid hsl(var(--hue) 40% 45% / .6); }
.ph-avatar-sm { width: 34px; height: 34px; font-size: .95rem; }
.ph-avatar-md { width: 44px; height: 44px; font-size: 1.2rem; }
.ph-avatar-xl { width: 88px; height: 88px; font-size: 2.4rem; border-radius: var(--r-0); box-shadow: 0 12px 30px -14px rgba(0, 0, 0, .9); }
.ph-tier { --c: var(--lichen); display: inline-block; padding: .1rem .55rem; border-radius: 3px; border: 1px solid color-mix(in srgb, var(--c) 60%, transparent); background: color-mix(in srgb, var(--c) 16%, transparent); color: color-mix(in srgb, var(--c) 70%, white); font-size: .76rem; font-weight: 700; line-height: 1.5; }

/* panels, page heads, tiles (pages use these) */
.ph-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1.25rem; padding-bottom: 1rem; border-bottom: 1px solid var(--line-soft); }
.ph-title { display: flex; align-items: center; gap: 1rem; min-width: 0; }
.ph-title h1 { margin: 0; font: 800 clamp(2rem, 4vw, 2.6rem)/1 var(--display); text-transform: uppercase; letter-spacing: .04em; color: var(--bone); }
.ph-eyebrow { margin: 0 0 .35rem; color: var(--amber); font-size: .7rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; line-height: 1.4; }
.ph-tile { display: inline-grid; place-items: center; width: 52px; height: 52px; flex: none; border: 1px solid var(--amber-line); border-radius: var(--r-0); background: linear-gradient(135deg, var(--amber-soft), rgba(217, 164, 65, .02)); color: var(--amber); }
.ph-tile-sm { width: 34px; height: 34px; border-radius: var(--r-1); }
.ph-panel { padding: 1.3rem 1.4rem 1.4rem; background: var(--card); border: 1px solid var(--fern-line); border-radius: var(--r-lg); box-shadow: var(--shadow); margin-bottom: 1.25rem; min-width: 0; }
.ph-panel-h { display: flex; align-items: center; gap: .7rem; margin: 0 0 .9rem; font: 700 1.08rem/1.2 var(--body); }
.ph-panel-h .ph-count { margin-left: auto; color: var(--lichen); font-weight: 600; font-size: .88rem; }
.ph-cols { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, .75fr); gap: 0 1.25rem; align-items: start; }
.ph-empty { margin: 0; padding: .4rem 0; color: var(--lichen); }
.ph-toast { position: fixed; left: 50%; bottom: 1.5rem; z-index: 90; max-width: min(520px, calc(100% - 2rem)); padding: .8rem 1.1rem; background: var(--ink-3); border: 1px solid var(--fern-line); border-left: 3px solid var(--moss); border-radius: var(--r-1); box-shadow: 0 20px 40px -20px var(--black); font-weight: 600;
  transform: translate(-50%, 1rem); opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; }
.ph-toast.show { opacity: 1; transform: translate(-50%, 0); }
.ph-toast.bad { border-left-color: var(--blood-hi); }
.ph-main label { font-weight: 600; }
.ph-main input:not([type=checkbox]):not([type=radio]), .ph-main textarea, .ph-main select { min-height: 42px; padding: .55rem .75rem; background: var(--field); border: 1px solid var(--fern-line); border-radius: var(--r-1); }
.ph-panel input[type=search] { width: 100%; }
.ph-main input:focus, .ph-main textarea:focus, .ph-main select:focus { outline: none; border-color: var(--amber); box-shadow: 0 0 0 3px rgba(217, 164, 65, .2); }

/* ---- the existing player pages, in panels */
.ph-main .me-title { font: 800 clamp(2.2rem, 5vw, 3.2rem)/1 var(--display); letter-spacing: .03em; }
.ph-main .eyebrow { color: var(--amber); font-size: .72rem; letter-spacing: .16em; }
.ph-main .me-head, .ph-main .inv-head { margin-bottom: 1.25rem; padding-bottom: 1rem; border-bottom: 1px solid var(--line-soft); }
.ph-main .me-h2 { font: 700 1.12rem/1.25 var(--body); text-transform: none; letter-spacing: 0; margin-bottom: .35rem; }
.ph-main .stat-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: .85rem; margin: 0 0 1.25rem; background: none; border: 0; }
.ph-main .stat-strip .stat { padding: 1rem 1.1rem; background: var(--card); border: 1px solid var(--fern-line); border-radius: var(--r-lg); box-shadow: var(--shadow); }
.ph-main .stat-strip .stat:nth-child(n) { border-left: 1px solid var(--fern-line); border-top: 1px solid var(--fern-line); }
.ph-main .stat-strip .stat dt { color: var(--amber); font-size: .68rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
.ph-main .stat-strip .stat dd { font-size: 1.75rem; }
.ph-main .dino-card { background: radial-gradient(600px 220px at 0% 0%, var(--glow), transparent 70%), var(--card); border: 1px solid var(--fern-line); border-top: 3px solid var(--blood); border-radius: var(--r-lg); box-shadow: var(--shadow); }
.ph-main .dino-card.offline { border-top-color: var(--fern-line); }
.ph-main .me-cols { gap: 1.25rem; margin: 1.25rem 0; }
.page-me .ph-main #signed-in > section:not(.ban-box):not([data-pane]), .page-me .ph-main .me-cols > section, .ph-main .inv-card,
.page-inv .ph-main [data-pane] > .now-card, .page-inv .ph-main .inv-cols > section, .page-inv .ph-main .code-box {
  padding: 1.3rem 1.4rem 1.4rem; background: var(--card); border: 1px solid var(--fern-line); border-radius: var(--r-lg); box-shadow: var(--shadow); margin: 0 0 1.25rem;
}
.page-me .ph-main #signed-in > section.me-cols { padding: 0; background: none; border: 0; box-shadow: none; }
.ph-main .records { margin-bottom: 0; }
.ph-main .feed { border-top: 0; }
.ph-main .feed li { border-bottom-color: var(--line-soft); }
.ph-main .feed li:last-child { border-bottom: 0; }
.ph-main .slot { background: var(--field); }
.ph-main #signed-out { max-width: 640px; padding: 2rem; background: radial-gradient(600px 220px at 0% 0%, var(--glow), transparent 70%), var(--card); border: 1px solid var(--fern-line); border-top: 3px solid var(--blood); border-radius: var(--r-lg); box-shadow: var(--shadow); }
.ph-main .me-main, .ph-main.me-main { padding-top: 0; min-height: 0; }
.ph-main .inv-tabs { background: var(--surface); border: 1px solid var(--fern-line); border-radius: var(--r-lg); padding: .35rem; }

/* ---- phones and tablets: top bar with a drawer, like the admin panel */
@media (max-width: 900px) {
  .ph-app { grid-template-columns: 1fr; }
  .ph-side { position: sticky; top: 0; z-index: 40; height: var(--ph-top); overflow: visible; padding: 0 .5rem 0 1rem; gap: 0; justify-content: center;
    background: var(--bar); box-shadow: 0 8px 20px -14px rgba(0, 0, 0, .8); border-right: 0; border-bottom: 1px solid var(--fern-line); }
  .ph-side-top { padding: 0; }
  .ph-side .wordmark { font-size: 1.15rem; flex: none; }
  .ph-top-page { display: block; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding-left: .75rem; border-left: 1px solid var(--fern-line); color: var(--lichen); font-weight: 600; font-size: .95rem; }
  .ph-menu-btn { position: relative; display: inline-grid; place-items: center; width: 44px; height: 44px; margin-left: auto; flex: none; background: none; border: 1px solid transparent; border-radius: var(--r-1); color: var(--bone); cursor: pointer; }
  .ph-menu-btn:hover, .menu-open .ph-menu-btn { background: var(--fern); }
  .ph-menu-badge { position: absolute; top: 3px; right: 1px; min-width: 1.15rem; margin: 0; padding: 0 .3rem; font-size: .68rem; line-height: 1.15rem; }
  .menu-open .ph-menu-badge { display: none; }
  .ph-drawer { position: fixed; top: var(--ph-top); bottom: 0; left: 0; z-index: 41; width: min(300px, 86vw); overflow-y: auto; overscroll-behavior: contain;
    padding: 1rem .9rem calc(1rem + env(safe-area-inset-bottom)); background: var(--bar); border-right: 1px solid var(--fern-line);
    transform: translateX(-102%); visibility: hidden; transition: transform var(--d-drawer) var(--ease-drawer), visibility 0s linear var(--d-drawer); }
  .menu-open .ph-drawer { transform: none; visibility: visible; transition: transform var(--d-drawer) var(--ease-drawer); box-shadow: 20px 0 40px -20px rgba(0, 0, 0, .8); }
  .ph-nav a { padding: .7rem .75rem; font-size: 1rem; }
  .ph-scrim { display: block; position: fixed; inset: var(--ph-top) 0 0 0; z-index: 39; background: rgba(10, 12, 9, .6); }
  .ph-scrim[hidden] { display: none; }
  .ph-body { padding: 1rem 1rem 0; }
  .ph-top { margin-bottom: 1.1rem; padding: .45rem .5rem; }
  .ph-top { display: none; }
  .ph-mini-coins:not([hidden]) { display: inline-flex; align-items: center; gap: .35rem; margin-left: auto; padding: .3rem .6rem; border: 1px solid var(--fern-line); border-radius: 3px; font-weight: 700; font-size: .88rem; text-decoration: none; font-variant-numeric: tabular-nums; }
  .ph-mini-coins .ph-ico { color: var(--amber); }
  .ph-mini-coins + .ph-menu-btn { margin-left: .25rem; }
  .ph-body { padding-top: 1.25rem; }
  .ph-cols { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
  .ph-main .stat-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .6rem; }
  .ph-main .stat-strip .stat dd { font-size: 1.4rem; }
  .ph-panel, .page-me .ph-main #signed-in > section:not(.ban-box):not([data-pane]), .page-me .ph-main .me-cols > section, .page-inv .ph-main [data-pane] > .now-card { padding: 1rem; }
  .ph-head { gap: .75rem; }
  .ph-tile { width: 44px; height: 44px; }
}

.ph-level { display: inline-block; margin-right: .35rem; padding: .05rem .45rem; border-radius: 3px; background: rgba(217, 164, 65, .15); border: 1px solid var(--amber-line); color: var(--warn-text-hi); font-size: .74rem; font-weight: 800; line-height: 1.5; }
.ph-who-sub { display: flex; align-items: center; flex-wrap: wrap; gap: .3rem; }

/* daily gifts window (base) */
.ph-daily { width: min(520px, calc(100% - 2rem)); padding: 1.6rem 1.5rem 1.3rem; overflow: hidden; background: var(--side-0); color: var(--bone); border: 1px solid var(--amber-line); border-radius: var(--r-lg); box-shadow: 0 40px 90px -30px var(--black), 0 0 0 1px rgba(217, 164, 65, .15); text-align: center; }
.ph-daily::backdrop { background: rgba(6, 8, 6, .78); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
.ph-daily[open] { animation: ph-pop .28s var(--ease-out); }
@keyframes ph-pop { from { opacity: 0; transform: translateY(14px) scale(.96); } to { opacity: 1; transform: none; } }
/* the Daily Gifts window (.gf-dialog): header, reward chips and the next-step line; the week itself is .dg */
.gf-dialog { width: min(760px, calc(100% - 2rem)); padding: 0; text-align: left; }
.gf-head { display: flex; align-items: center; gap: .8rem; padding: 1rem 1.2rem; border-bottom: 1px solid var(--glass-edge); }
.gf-head > div { flex: 1; min-width: 0; }
.gf-head h2 { margin: 0; font: 900 1.35rem/1.1 var(--display); text-transform: uppercase; letter-spacing: .05em; }
.gf-sub { margin: .15rem 0 0; color: var(--lichen); font-size: .8rem; }
.gf-cycle { display: inline-flex; align-items: center; gap: .4rem; padding: .4rem .6rem; border: 1px solid var(--amber-line); border-radius: var(--r-0); color: var(--amber); white-space: nowrap; }
.gf-cycle small { font: 800 .62rem/1 var(--body); letter-spacing: .1em; text-transform: uppercase; }
.gf-cycle strong { font: 800 .85rem/1 var(--body); color: var(--gold); }
.gf-close { display: grid; place-items: center; width: 34px; height: 34px; border: 1px solid var(--glass-edge); border-radius: var(--r-0); background: transparent; color: var(--lichen); cursor: pointer; }
.gf-close:hover { color: var(--bone); border-color: var(--glass-edge-hi); }
.gf-next { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .6rem; margin: 0 1.2rem 1.1rem; padding: .6rem .8rem; border: 1px solid var(--glass-well-line); border-radius: var(--r-0); background: var(--glass-well); font-size: .86rem; color: var(--bone-2); }
.gf-next[hidden] { display: none; }
.gf-next p { margin: 0; }

.gf-rewards { display: flex; flex-wrap: wrap; gap: .5rem; }
.gf-reward { display: inline-flex; align-items: center; gap: .55rem; min-width: 140px; padding: .5rem .7rem; border: 1px solid var(--glass-well-line); border-radius: var(--r-0); background: var(--glass-well); }
.gf-reward small { display: block; font: 800 .58rem/1 var(--body); letter-spacing: .12em; text-transform: uppercase; color: var(--lichen); }
.gf-reward strong { display: block; margin-top: .15rem; font: 800 1.1rem/1 var(--display); }
.gf-reward-coins { border-color: color-mix(in srgb, var(--gold) 35%, transparent); }
.gf-reward-coins svg, .gf-reward-coins strong { color: var(--gold); }
.gf-reward-xp { border-color: color-mix(in srgb, var(--rar-rare) 40%, transparent); }
.gf-reward-xp svg, .gf-reward-xp strong { color: var(--rar-rare-text); }
.gf-reward-fossil { border-color: color-mix(in srgb, var(--fo-amber-a) 50%, transparent); }
.gf-reward-fossil strong { font-size: .95rem; }


/* the Daily Gifts: the chosen day on a stage (text and rewards left, the gift right), then the week as seven day
   tiles with the last, biggest day wider. Fills and glows, no outlines. */
.dg { display: grid; gap: .8rem; container-type: inline-size; }
.dg-dialog .dg { padding: 1.1rem 1.2rem 1rem; }

.dg-find { --tone: var(--lichen); position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 1.2rem; padding: 1.2rem 1.3rem; border-radius: 6px; overflow: hidden;
  background: radial-gradient(120% 140% at 100% 50%, color-mix(in srgb, var(--tone) 16%, transparent), transparent 55%), linear-gradient(180deg, rgba(255, 255, 255, .04), rgba(255, 255, 255, .01)), var(--glass-well); }
.dg-find-today { --tone: var(--gold); }
.dg-find-dug { --tone: var(--ok-text); }
.dg-find-missed { --tone: var(--danger-text); }
.dg-find-body { display: grid; gap: .6rem; min-width: 0; }
.dg-find-head { display: flex; flex-wrap: wrap; align-items: center; gap: .45rem .6rem; }
.dg-kicker { font: 900 .78rem/1 var(--body); letter-spacing: .16em; text-transform: uppercase; color: var(--tone); }
.dg-date { color: var(--lichen); font-size: .78rem; }
.dg-find h3 { margin: 0; font: 900 clamp(1.5rem, 4cqi, 2.1rem)/1 var(--display); text-transform: uppercase; letter-spacing: .02em; }
.dg-tag { padding: .22rem .45rem; border-radius: 3px; font: 800 .6rem/1 var(--body); letter-spacing: .1em; text-transform: uppercase; background: color-mix(in srgb, var(--tone) 18%, transparent); color: var(--tone); }
.dg-tag-buried { background: rgba(255, 255, 255, .06); }
.dg-line { margin: 0; color: var(--bone-2); font-size: .88rem; }
.dg-find .gf-rewards { display: grid; grid-template-columns: repeat(auto-fit, minmax(128px, 1fr)); gap: .45rem; }
.dg-find .gf-reward { min-width: 0; border: 0; border-radius: 4px; padding: .55rem .7rem; background: rgba(0, 0, 0, .3); }
.dg-dig { justify-self: start; min-height: 44px; min-width: 150px; margin: .1rem 0 0; }

/* the gift itself */
.dg-find-art { position: relative; display: grid; place-items: center; width: 132px; aspect-ratio: 1; border-radius: 50%; color: var(--tone);
  background: radial-gradient(circle, color-mix(in srgb, var(--tone) 26%, transparent), transparent 68%); }
.dg-find-art .ph-ico { filter: drop-shadow(0 6px 14px rgba(0, 0, 0, .55)); }
.dg-art-today { animation: dg-bob 3s ease-in-out infinite; }
.dg-art-today .ph-ico { filter: drop-shadow(0 0 18px color-mix(in srgb, var(--gold) 70%, transparent)) drop-shadow(0 6px 10px rgba(0, 0, 0, .6)); }
.dg-art-missed, .dg-art-buried { opacity: .55; }
.dg-find-art .gf-stone { width: 70px; height: 70px; border-radius: 8px; }
.dg-art-check { position: absolute; right: 18%; bottom: 18%; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--ok-text); color: var(--black); box-shadow: 0 4px 12px rgba(0, 0, 0, .5); }
.dg-find-art.is-opening { animation: dg-shake .14s linear infinite; }
.dg-find-art.is-fresh > :first-child { animation: dg-pop .6s cubic-bezier(.2, .9, .3, 1.4) both; }
@keyframes dg-bob { 50% { transform: translateY(-5px); } }
@keyframes dg-shake { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(-4deg); } 75% { transform: rotate(4deg); } }
@keyframes dg-pop { from { opacity: 0; transform: scale(.4); } to { opacity: 1; transform: scale(1); } }

/* the week */
.dg-plots { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)) minmax(0, 1.5fr); gap: .4rem; }
.dg-plots > li { min-width: 0; display: grid; }
.dg-plot { --tone: var(--lichen); width: 100%; display: grid; justify-items: center; align-content: start; gap: .4rem; padding: .55rem .25rem .6rem; border: 0; border-radius: 5px; background: var(--glass-well); color: var(--bone); font: inherit; cursor: pointer; transition: background .15s ease, transform .15s ease; }
.dg-plot:hover { background: color-mix(in srgb, var(--bone) 8%, var(--glass-well)); }
.dg-plot:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.dg-plot[aria-pressed=true] { background: color-mix(in srgb, var(--tone) 16%, var(--glass-well)); box-shadow: inset 0 -3px 0 var(--tone); }
.dg-day { display: flex; align-items: baseline; gap: .3rem; font: 800 .6rem/1 var(--body); letter-spacing: .1em; text-transform: uppercase; color: var(--lichen); }
.dg-day strong { font: 900 1rem/1 var(--display); letter-spacing: 0; color: var(--bone); }
.dg-pit { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; color: var(--tone); background: color-mix(in srgb, var(--tone) 12%, transparent); }
.dg-pit .gf-stone { width: 26px; height: 26px; }
.dg-coin { color: var(--gold); }
.dg-amount { display: inline-flex; align-items: center; gap: .2rem; font: 800 .74rem/1 var(--body); color: var(--bone-2); white-space: nowrap; }
.dg-amount .ph-ico { color: var(--gold); }
.dg-today { --tone: var(--gold); background: color-mix(in srgb, var(--gold) 10%, var(--glass-well)); }
.dg-today .dg-day { color: var(--gold); }
.dg-today .dg-pit { animation: dg-bob 2.4s ease-in-out infinite; box-shadow: 0 0 18px -4px var(--gold); }
.dg-dug { --tone: var(--ok-text); }
.dg-dug .dg-pit { background: var(--ok-text); color: var(--black); }
.dg-dug.is-fresh .dg-pit { animation: dg-pop .5s cubic-bezier(.2, .9, .3, 1.4) both; }
.dg-missed { --tone: var(--danger-text); }
.dg-missed .dg-pit { opacity: .7; }
.dg-missed .dg-amount { text-decoration: line-through; opacity: .5; }
.dg-buried .dg-pit { opacity: .45; filter: grayscale(.5); }
.dg-buried .dg-amount { opacity: .6; }
.dg-plot.is-opening .dg-pit { animation: dg-shake .14s linear infinite; }
/* the week's big day */
.dg-plot.is-jackpot .dg-amount { color: var(--gold); }
.dg-last .dg-plot { background: radial-gradient(90% 80% at 50% 45%, color-mix(in srgb, var(--gold) 14%, transparent), transparent 75%), var(--glass-well); }
.dg-last .dg-plot[aria-pressed=true] { background: radial-gradient(90% 80% at 50% 45%, color-mix(in srgb, var(--gold) 22%, transparent), transparent 75%), color-mix(in srgb, var(--tone) 16%, var(--glass-well)); }
.dg-last .dg-pit { width: 48px; height: 48px; }
.dg-last .dg-day::after { content: "Big day"; margin-left: .15rem; color: var(--gold); }
.dg-note { margin: 0; text-align: center; color: var(--lichen); font-size: .76rem; }

@container (max-width: 520px) {
  .dg-find { grid-template-columns: 1fr; padding: 1rem; }
  .dg-find-art { grid-row: 1; justify-self: center; width: 104px; }
  .dg-find-art .ph-ico:first-child { width: 48px; height: 48px; }
  .dg-plots { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .dg-last { grid-column: span 2; }
  .dg-find .gf-rewards { grid-template-columns: 1fr 1fr; }
}
@container (max-width: 360px) { .dg-pit { width: 34px; height: 34px; } .dg-amount { font-size: .66rem; } }
@media (prefers-reduced-motion: reduce) { .dg-art-today, .dg-today .dg-pit, .dg-find-art.is-opening, .dg-plot.is-opening .dg-pit { animation: none; } }

/* a fossil, pressed into its stone (the Fossils minigame look, small) */
.gf-stone { --a: var(--fo-sandstone-a); --b: var(--fo-sandstone-b); display: grid; place-items: center; width: 30px; height: 30px; border-radius: var(--r-0); background: radial-gradient(circle at 32% 26%, var(--a), var(--b) 78%); color: var(--fo-imprint); box-shadow: inset 0 1px 0 var(--glass-hl); }
.gf-stone-iron { --a: var(--fo-slate-a); --b: var(--fo-slate-b); }
.gf-stone-gold { --a: var(--fo-amber-a); --b: var(--fo-amber-b); box-shadow: inset 0 1px 0 var(--glass-hl), 0 0 12px -3px var(--fo-amber-glow); }

/* the top bar's Daily Gifts button: a dot while today's gift waits */
.ph-gifts { position: relative; cursor: pointer; color: var(--gold); }
.ph-gifts-dot { position: absolute; top: 4px; right: 4px; width: 8px; height: 8px; border-radius: 1px; background: var(--danger-text); box-shadow: 0 0 0 2px var(--side-0); }
.ph-gifts-dot[hidden] { display: none; }

@media (max-width: 560px) {
  .gf-head { flex-wrap: wrap; }
  .gf-close { order: 2; }
  .gf-cycle { order: 3; flex-basis: 100%; justify-content: center; }
  .gf-reward { min-width: 0; flex: 1 1 130px; }
}
.ph-daily-next p { margin: 0 auto .8rem; max-width: 36ch; color: var(--bone-2); }
.ph-daily-actions { display: grid; gap: .5rem; }
.ph-daily-actions .btn { width: 100%; min-height: 48px; margin: 0; }

/* a friend's teleport request: Accept / Decline on any hub page */
.ph-tpreq { position: fixed; right: 1.25rem; bottom: 1.25rem; z-index: 95; display: flex; align-items: center; gap: .9rem; width: min(440px, calc(100% - 2rem)); padding: .9rem 1rem; background: var(--card); border: 1px solid rgba(111, 154, 79, .55); border-left: 3px solid var(--moss); border-radius: var(--r-lg); box-shadow: 0 24px 48px -20px var(--black); }
.ph-tpreq[hidden] { display: none; }
.ph-tpreq-ico { display: grid; place-items: center; width: 40px; height: 40px; flex: none; border-radius: 3px; background: rgba(111, 154, 79, .18); color: var(--bone); }
.ph-tpreq-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.3; }
.ph-tpreq-left { color: var(--lichen); font-size: .86rem; font-variant-numeric: tabular-nums; }
.ph-tpreq-acts { display: flex; gap: .4rem; flex: none; }
.ph-tpreq-acts .btn { margin: 0; }
@media (max-width: 560px) { .ph-tpreq { left: 1rem; right: 1rem; width: auto; flex-wrap: wrap; } .ph-tpreq-acts { width: 100%; } .ph-tpreq-acts .btn { flex: 1; } }

/* panel/public/friends-widget.js — external CSS required by style-src 'self' CSP */

  
  
  

/* Global chat dock: external CSS required by CSP */

  .gc-dock{position:fixed;left:12px;bottom:16px;z-index:8990;width:min(340px,calc(100vw - 24px));background:var(--ink-3);color:#f5efdf;border:1px solid #657c65;border-radius:var(--r-lg);box-shadow:0 10px 35px #0009;overflow:hidden}
  .gc-head{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:10px 12px;background:#263d2e;font-weight:700}
  .gc-toggle{border:1px solid #718c75;border-radius:var(--r-1);background:#1c3124;color:var(--white);cursor:pointer;padding:4px 9px}
  .gc-body{height:min(310px,42dvh);overflow:auto;padding:10px;list-style:none;margin:0;display:flex;flex-direction:column;gap:7px}
  .gc-line{overflow-wrap:anywhere;font-size:.87rem}.gc-line strong{color:#d4e9ba}.gc-line time{font-size:.7rem;color:#a8b7a7;margin-left:6px}
  .gc-form{display:flex;gap:6px;padding:9px;border-top:1px solid #415446}.gc-input{min-width:0;flex:1;padding:8px;background:var(--ink-0);color:var(--white);border:1px solid #6d816e;border-radius:var(--r-1)}.gc-send{padding:8px;background:#416a4c;color:var(--white);border:1px solid #79977c;border-radius:var(--r-1);cursor:pointer}
  .gc-dock.gc-closed .gc-body,.gc-dock.gc-closed .gc-form{display:none}
  @media(max-width:700px){.gc-dock{left:12px;bottom:76px;width:min(310px,calc(100vw - 24px))}.gc-body{height:min(230px,35dvh)}}
  

/* Social widgets: native Player Hub visual language. Global chat is part of the left sidebar. */
.ph-side .gc-dock{position:relative;left:auto;bottom:auto;z-index:auto;width:100%;flex:none;overflow:hidden;background:var(--card);border:1px solid var(--fern-line);border-radius:var(--r-lg);box-shadow:var(--shadow);color:var(--bone)}
.ph-side .gc-head{padding:.6rem .7rem;background:transparent;border-bottom:1px solid var(--fern-line);font-size:.85rem;color:var(--bone)}
.ph-side .gc-toggle{background:transparent;border:1px solid var(--fern-line);border-radius:var(--r-1);color:var(--lichen);font-size:1rem;min-width:26px;min-height:26px;padding:0}
.ph-side .gc-body{height:190px;min-height:0;padding:.65rem;gap:.6rem;overflow-y:auto}
.ph-side .gc-line{font-size:.8rem;color:var(--bone)}
.ph-side .gc-line strong{color:var(--bone)}
.ph-side .gc-line time{color:var(--lichen)}
.ph-side .gc-form{padding:.5rem;border-color:var(--fern-line);gap:.35rem}
.ph-side .gc-input{min-width:0;padding:.5rem;background:var(--basalt);color:var(--bone);border:1px solid var(--fern-line);border-radius:var(--r-1);font-size:.78rem}
.ph-side .gc-send{padding:.4rem .55rem;background:var(--fern);color:var(--bone);border:1px solid var(--fern-line);border-radius:var(--r-1);font-size:.78rem}
@media(max-width:700px){.ph-side .gc-dock{position:relative;left:auto;bottom:auto;width:100%}.ph-side .gc-body{height:170px}}

/* Dedicated static chat rail between navigation and main content. */
@media(min-width:1101px){
  .ph-app{grid-template-columns:256px 300px minmax(0,1fr)}
  .ph-chat-rail{grid-column:2;grid-row:1;position:sticky;top:0;height:100svh;min-width:0;overflow:hidden;display:flex;flex-direction:column;padding:1.2rem .7rem;background:var(--basalt-2);border-right:1px solid var(--fern-line)}
  .ph-body{grid-column:3;grid-row:1}
}
.ph-chat-rail .gc-dock{position:relative;left:auto;bottom:auto;z-index:auto;width:100%;height:100%;min-height:0;display:flex;flex-direction:column;background:var(--card);border:1px solid var(--fern-line);border-radius:var(--r-lg);box-shadow:var(--shadow);color:var(--bone)}
.ph-chat-rail .gc-head{flex:none;padding:.75rem;background:transparent;border-bottom:1px solid var(--fern-line);font-size:.9rem;color:var(--bone)}
.ph-chat-rail .gc-toggle{background:transparent;border:1px solid var(--fern-line);border-radius:var(--r-1);color:var(--lichen);min-width:28px;min-height:28px;padding:0}
.ph-chat-rail .gc-body{flex:1;height:auto;min-height:0;overflow:auto;padding:.75rem;gap:.65rem}
.ph-chat-rail .gc-line{font-size:.83rem;color:var(--bone)}
.ph-chat-rail .gc-line strong{color:var(--bone)}
.ph-chat-rail .gc-line time{color:var(--lichen)}
.ph-chat-rail .gc-form{flex:none;padding:.65rem;border-color:var(--fern-line)}
.ph-chat-rail .gc-input{background:var(--basalt);color:var(--bone);border:1px solid var(--fern-line);border-radius:var(--r-1)}
.ph-chat-rail .gc-send{background:var(--fern);color:var(--bone);border:1px solid var(--fern-line);border-radius:var(--r-1)}
.ph-chat-rail .gc-dock.gc-closed{height:auto}
@media(max-width:1100px){
  .ph-chat-rail{display:none}
  .ph-app{grid-template-columns:256px minmax(0,1fr)}
  .ph-body{grid-column:2}
}
@media(max-width:700px){.ph-app{grid-template-columns:minmax(0,1fr)}.ph-body{grid-column:1}}

/* Narrow screens: keep chat accessible above content instead of hiding it. */
@media(max-width:1100px){
  .ph-app{grid-template-rows:auto auto}
  .ph-chat-rail{display:flex;grid-column:2;grid-row:1;min-width:0;padding:.5rem 1rem;max-height:280px;background:var(--basalt-2);border-bottom:1px solid var(--fern-line)}
  .ph-body{grid-column:2;grid-row:2}
  .ph-chat-rail .gc-dock{height:240px}
  .ph-chat-rail .gc-dock.gc-closed{height:auto}
}
@media(max-width:700px){.ph-chat-rail{grid-column:1;grid-row:1;padding:.5rem .8rem}.ph-body{grid-column:1;grid-row:2}}

/* Right-side chat under the full-width Player Hub header. */
.ph-app{grid-template-columns:256px minmax(0,1fr)}
.ph-body{grid-column:2;grid-row:1;max-width:none}
.ph-content-layout{display:grid;grid-template-columns:minmax(0,1fr) 300px;gap:1.25rem;align-items:start;min-width:0;flex:1}
.ph-content-layout>.ph-main{grid-column:1;grid-row:1;min-width:0}
.ph-content-layout>.ph-chat-rail{grid-column:2;grid-row:1;position:sticky;top:1rem;height:calc(100svh - 2rem);min-width:0;padding:0;background:none;border:0;display:flex;max-height:none}
.ph-content-layout .gc-dock{width:100%;height:100%;min-height:0;display:flex;flex-direction:column;position:relative;left:auto;bottom:auto;background:var(--card);border:1px solid var(--fern-line);border-radius:var(--r-lg);box-shadow:var(--shadow);color:var(--bone)}
.ph-content-layout .gc-body{flex:1;min-height:0;height:auto;overflow-y:auto}
.ph-content-layout .gc-head{justify-content:flex-start;gap:.6rem}
.ph-content-layout .gc-head>span{flex:1}
@media(max-width:1100px){
  .ph-app{grid-template-columns:256px minmax(0,1fr);grid-template-rows:auto}
  .ph-body{grid-column:2;grid-row:1}
  .ph-content-layout{grid-template-columns:minmax(0,1fr)}
  .ph-content-layout>.ph-main{grid-column:1;grid-row:1}
  .ph-content-layout>.ph-chat-rail{grid-column:1;grid-row:2;position:relative;top:auto;height:300px;max-height:none;padding:0;background:none;border:0}
  .ph-content-layout .gc-dock{height:300px}
  .ph-content-layout .gc-dock.gc-closed{height:auto}
}
@media(max-width:700px){.ph-app{grid-template-columns:minmax(0,1fr)}.ph-body{grid-column:1;grid-row:1}}

/* Frosted-glass Friends shortcut: bottom-right, immediately left of right-side chat. */

/* Shared right-hand social sidebar: Friends above Global Chat. No floating Friends control. */
.ph-content-layout>.ph-chat-rail{display:flex;flex-direction:column;gap:.7rem}
.ph-chat-rail .ph-chat-controls{display:block;flex:none}
.ph-content-layout .gc-dock{flex:1;height:auto;min-height:240px}
@media(max-width:1100px){.ph-content-layout>.ph-chat-rail{height:auto;min-height:300px}.ph-content-layout .gc-dock{height:300px;flex:none}}

/* Compact static social sidebar: Friends | Global Chat tabs, independently hideable. */
.ph-content-layout>.ph-chat-rail{
  position:sticky;top:1rem;display:flex;flex-direction:column;gap:0;
  height:min(650px,calc(100dvh - 155px));min-height:240px;max-height:calc(100dvh - 110px);
  overflow:hidden;border:1px solid var(--fern-line);border-radius:var(--r-lg);
  background:var(--card);box-shadow:var(--shadow)
}
.ph-chat-rail .ph-chat-controls{display:flex;align-items:stretch;gap:0;flex:none;min-height:45px;border-bottom:1px solid var(--fern-line)}
.ph-chat-rail .ph-social-chat-tab{
  position:static;inset:auto;flex:1;display:flex;align-items:center;justify-content:center;gap:.35rem;
  width:auto;min-width:0;height:auto;min-height:44px;padding:.55rem .35rem;
  border:0;border-radius:0;background:transparent;box-shadow:none;
  backdrop-filter:none;-webkit-backdrop-filter:none;color:var(--lichen);
  font:700 .8rem/1.2 inherit;cursor:pointer
}
.ph-chat-rail .ph-social-chat-tab[aria-selected="true"]{background:var(--fern);color:var(--bone);box-shadow:inset 0 -2px var(--moss)}
.ph-chat-rail .ph-social-hide{flex:none;align-self:center;margin:0 6px 0 2px;width:27px;height:27px;padding:0;border:1px solid var(--fern-line);border-radius:var(--r-1);background:transparent;color:var(--lichen);cursor:pointer;font-size:20px}
.ph-chat-rail .ph-social-hide:hover{color:var(--bone)}
.ph-chat-rail.social-friends-active .gc-dock{display:none}
.ph-chat-rail .gc-dock{flex:1;min-height:0;height:auto;width:100%;border:0;border-radius:0;box-shadow:none;background:transparent}
.ph-chat-rail .gc-head{display:none}
.ph-chat-rail .gc-body{min-height:0;flex:1}
.ph-content-layout.social-hidden{grid-template-columns:minmax(0,1fr) 36px}
.ph-content-layout>.ph-chat-rail.social-collapsed{height:45px;min-height:45px;max-height:45px;overflow:visible;border-radius:var(--r-lg)}
.ph-chat-rail.social-collapsed .ph-chat-controls,.ph-chat-rail.social-collapsed .gc-dock{display:none}
.ph-chat-rail .ph-social-show[hidden]{display:none}
.ph-chat-rail .ph-social-show{display:block;width:100%;height:43px;padding:0;border:0;background:var(--card);color:var(--bone);font-size:24px;cursor:pointer}
@media(max-width:1100px){
  .ph-content-layout>.ph-chat-rail{position:relative;top:auto;height:min(450px,calc(100dvh - 160px));min-height:240px;max-height:calc(100dvh - 110px)}
  .ph-content-layout .gc-dock{height:auto;min-height:0;flex:1}
  .ph-content-layout.social-hidden{grid-template-columns:minmax(0,1fr)}
  .ph-content-layout>.ph-chat-rail.social-collapsed{width:45px;justify-self:end}
}

/* Profile cosmetics: default frame and message-box skin, extensible for Shop items. */
.ph-avatar-bordered{overflow:hidden;border:2px solid var(--fern-line);box-shadow:0 0 0 1px rgba(200,216,185,.22);flex-shrink:0}
.ph-avatar-bordered img{display:block;width:100%;height:100%;object-fit:cover;border-radius:inherit}
.ph-acct{position:relative}
.ph-appearance-open{border:1px solid var(--fern-line);border-radius:var(--r-1);background:var(--fern);color:var(--bone);padding:5px 7px;font-size:.68rem;cursor:pointer}
.ph-appearance-panel[hidden]{display:none}
.ph-appearance-panel{position:fixed;z-index:9990;right:20px;top:90px;width:min(340px,calc(100vw - 30px));max-height:calc(100dvh - 110px);overflow:auto;padding:1.2rem;display:grid;gap:.8rem;border:1px solid var(--fern-line);border-radius:var(--r-lg);background:var(--card);color:var(--bone);box-shadow:var(--shadow)}
.ph-appearance-panel p{margin:0;color:var(--lichen);font-size:.85rem;line-height:1.5}
.ph-appearance-panel input[type=file]{width:100%;max-width:100%;font-size:.8rem}
.ph-appearance-preview{display:flex;justify-content:center}
.ph-appearance-preview .ph-avatar{width:78px;height:78px;font-size:1.5rem}
.ph-appearance-action{padding:.55rem .8rem;border:1px solid var(--fern-line);border-radius:var(--r-1);background:var(--fern);color:var(--bone);cursor:pointer}
@media(max-width:700px){.ph-appearance-panel{right:10px;top:70px}}

/* Right social sidebar mirrors the left navigation rail, starting below Player Hub header. */
@media(min-width:1101px){
  .ph-content-layout{align-items:stretch;column-gap:1.25rem}
  .ph-content-layout>.ph-chat-rail{
    position:sticky;top:16px;align-self:start;
    height:calc(100dvh - 126px);min-height:0;max-height:none;
    display:flex;flex-direction:column;gap:0;
    background:var(--basalt-2);border:1px solid var(--fern-line);
    border-radius:var(--r-lg);box-shadow:none;overflow:hidden;
  }
  .ph-chat-rail .ph-chat-controls{background:transparent}
  .ph-chat-rail .gc-dock{flex:1;min-height:0;overflow:hidden}
  .ph-chat-rail .gc-body{flex:1;min-height:0;overflow-y:auto}
  .ph-content-layout>.ph-chat-rail.social-collapsed{height:45px;min-height:45px;max-height:45px}
}

/* Compact social navigation lives only in the right rail. */
@media(min-width:1101px){
  .ph-content-layout{grid-template-columns:minmax(0,1fr) 260px;gap:1rem}
  .ph-content-layout.social-hidden{grid-template-columns:minmax(0,1fr) 36px}
  .ph-content-layout>.ph-chat-rail{height:calc(100dvh - 116px);min-height:0;max-height:none;top:12px}
}
.ph-chat-rail .ph-chat-controls{min-height:40px}
.ph-chat-rail .ph-social-chat-tab{min-height:39px;padding:.4rem .25rem;font-size:.76rem}
.ph-chat-rail .ph-social-hide{width:24px;height:24px;font-size:18px}
.ph-chat-rail .gc-body{padding:.55rem}
.ph-chat-rail .gc-form{padding:.5rem;gap:.35rem}
.ph-chat-rail .gc-line{font-size:.79rem}

/* Keep the original chat glyph aligned with the right-side social tab. */
.ph-chat-rail .ph-social-chat-tab{display:inline-flex;align-items:center;justify-content:center;gap:.4rem}
.ph-chat-rail .ph-social-chat-tab .ph-ico{width:16px;height:16px;flex:none}

/* Desktop: flush right rail, matching the left navigation's edge-to-edge surface. */
@media(min-width:1101px){
  .ph-body{max-width:none;padding-right:0}
  .ph-top{margin-right:clamp(1.25rem,3vw,2.75rem)}
  .ph-content-layout{grid-template-columns:minmax(0,1fr) 260px;gap:1rem;align-items:stretch}
  .ph-content-layout>.ph-main{min-width:0}
  .ph-content-layout>.ph-chat-rail{
    position:sticky;top:0;align-self:start;height:100dvh;min-height:0;max-height:none;
    padding:0;border:0;border-left:1px solid var(--fern-line);
    border-radius:0;box-shadow:none;overflow:hidden;
    background:linear-gradient(180deg,var(--side-0),var(--side-1));
  }
  .ph-chat-rail .ph-chat-controls{border-bottom:1px solid var(--fern-line);padding:8px 5px}
  .ph-content-layout.social-hidden{grid-template-columns:minmax(0,1fr) 36px}
  .ph-content-layout>.ph-chat-rail.social-collapsed{height:100dvh;max-height:none;min-height:0;border-radius:0}
  .ph-chat-rail .ph-social-show{height:48px;background:transparent}
  .ph-foot{margin-right:clamp(1.25rem,3vw,2.75rem)}
}

/* Spacious, legible right rail: the same navigation scale and spacing as the left. */
@media(min-width:1101px){
  .ph-content-layout{grid-template-columns:minmax(0,1fr) 320px;gap:1.25rem}
  .ph-content-layout.social-hidden{grid-template-columns:minmax(0,1fr) 40px}
}
.ph-chat-rail .ph-chat-controls{min-height:58px;padding:12px 10px;gap:6px}
.ph-chat-rail .ph-social-chat-tab{min-height:40px;padding:9px 10px;font-size:.9rem;line-height:1.35;gap:7px}
.ph-chat-rail .ph-social-chat-tab .ph-ico{width:19px;height:19px}
.ph-chat-rail .ph-social-hide{display:inline-flex;align-items:center;justify-content:center;width:32px;height:32px;margin-left:auto}
.ph-chat-rail .ph-social-hide .ph-ico,.ph-chat-rail .ph-social-show .ph-ico{width:20px;height:20px}
.ph-chat-rail .ph-social-show{display:flex;align-items:center;justify-content:center}
.ph-chat-rail .gc-body{padding:1rem}
.ph-chat-rail .gc-line{font-size:.9rem;line-height:1.5}
.ph-chat-rail .gc-form{padding:.85rem;gap:.6rem}

/* Friend identity and actions occupy separate rows. */

/* Keep each friend's name and live status tightly grouped. */

/* Sent requests: keep the cancel action at the far right of the row. */

/* Simplified friend overview cards. */
.ff-profile-page{display:flex;flex-direction:column;gap:1.25rem;max-width:900px}
.ff-profile-heading{display:flex;align-items:center;gap:1.2rem;padding:1.3rem;background:var(--card);border:1px solid var(--fern-line);border-radius:var(--r-lg)}
.ff-profile-heading h1{margin:0 0 .35rem}
.ff-profile-heading p{margin:.2rem 0;color:var(--lichen)}
.ff-profile-stats{display:grid;grid-template-columns:repeat(auto-fit,minmax(155px,1fr));gap:.8rem}
.ff-profile-stat{display:flex;flex-direction:column;gap:.6rem;padding:1.15rem;background:var(--card);border:1px solid var(--fern-line);border-radius:var(--r-lg)}
.ff-profile-stat small,.ff-profile-meta{color:var(--lichen)}
.ff-profile-stat strong{font-size:1.5rem;color:var(--bone)}

/* Mobile hub: override the later <=1100px desktop/tablet two-column grid.
   Keep the sticky navigation header before the content instead of after the footer. */
@media (max-width: 900px) {
  .ph-app {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto minmax(0, 1fr);
  }
  .ph-app > .ph-side {
    grid-column: 1;
    grid-row: 1;
    width: 100%;
    align-self: start;
  }
  .ph-app > .ph-body {
    grid-column: 1;
    grid-row: 2;
    min-width: 0;
  }
}

/* Player account dropdown trigger and private history/settings modal. */
.ph-acct{gap:.35rem;padding:0 .35rem}
.ph-account-open{display:inline-flex;align-items:center;gap:.6rem;min-width:0;height:100%;padding:.2rem .3rem;border:0;border-radius:var(--r-1);background:transparent;color:var(--bone);cursor:pointer;text-align:left;font:inherit}
.ph-account-open:hover,.ph-account-open:focus-visible{background:var(--fern);outline-offset:2px}
.ph-account-open .ph-avatar{flex:none}
.ph-account-open .ph-acct-txt{min-width:0}
.ph-profile-nav{display:none;align-items:center;gap:.7rem;text-align:left;padding:.65rem .75rem;border:1px solid var(--fern-line);border-radius:var(--r-1);background:var(--fern);color:var(--bone);font:600 .96rem var(--body);cursor:pointer}
.ph-profile-nav svg{width:25px;height:25px;flex:none}
@media(max-width:900px){.ph-profile-nav{display:flex;width:100%;margin-bottom:.4rem}}
.ph-profile-dialog{
  position:fixed;inset:0;margin:auto;width:min(620px,calc(100vw - 28px));max-width:620px;
  max-height:min(88dvh,850px);padding:0;overflow-y:auto;overscroll-behavior:contain;
  border:1px solid var(--fern-line);border-radius:var(--r-lg);background:var(--basalt-2);
  color:var(--bone);box-shadow:0 24px 90px #000b;font-family:var(--body);z-index:9995;
}
.ph-profile-dialog::backdrop{background:rgba(6,11,7,.78);backdrop-filter:blur(4px)}
.ph-profile-head{display:flex;justify-content:space-between;align-items:center;gap:1rem;padding:1.15rem 1.35rem;border-bottom:1px solid var(--fern-line);background:linear-gradient(110deg,var(--line),var(--ink-2))}
.ph-profile-head-label{display:flex;flex-direction:column;gap:.25rem;min-width:0}
.ph-profile-head-label>strong{font:800 1.55rem/1.2 var(--display);overflow-wrap:anywhere}
.ph-profile-eyebrow{text-transform:uppercase;letter-spacing:.12em;color:var(--lichen);font-size:.7rem;font-weight:700}
.ph-profile-close{display:grid;place-items:center;flex:none;width:38px;height:38px;border:1px solid var(--fern-line);border-radius:var(--r-1);background:var(--basalt);color:var(--bone);cursor:pointer}
.ph-profile-identity{display:flex;align-items:center;gap:.85rem;padding:1.2rem 1.35rem;border-bottom:1px solid var(--fern-line)}
.ph-profile-identity .ph-avatar{width:52px;height:52px;font-size:1.3rem;flex:none}
.ph-profile-identity>div{display:flex;flex-direction:column;gap:.3rem;min-width:0}
.ph-profile-identity strong{font-size:1.13rem;overflow-wrap:anywhere}
.ph-profile-identity span:not(.ph-avatar){font-size:.85rem;color:var(--lichen)}
.ph-profile-section{padding:1.2rem 1.35rem;border-bottom:1px solid var(--fern-line)}
.ph-profile-section h3{font:800 1.4rem/1.2 var(--display);margin:0 0 .9rem}
.ph-profile-section h4{font-size:.98rem;margin:1.15rem 0 .6rem}
.ph-profile-dates{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.65rem;margin:0 0 1rem}
.ph-profile-dates>div{display:flex;flex-direction:column;gap:.3rem;min-width:0;padding:.7rem .8rem;background:var(--basalt);border:1px solid var(--fern-line);border-radius:var(--r-1)}
.ph-profile-dates dt{font-size:.73rem;color:var(--lichen)}
.ph-profile-dates dd{margin:0;font-size:.86rem;font-weight:600;overflow-wrap:anywhere}
.ph-profile-stats{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:.6rem}
.ph-profile-stat{display:flex;flex-direction:column;gap:.2rem;padding:.75rem .6rem;text-align:center;border:1px solid var(--fern-line);border-radius:var(--r-1);background:var(--basalt)}
.ph-profile-stat strong{font:800 1.35rem/1.1 var(--display)}
.ph-profile-stat span{font-size:.75rem;color:var(--lichen)}
.ph-profile-dinos{list-style:none;padding:0;margin:0;display:flex;flex-direction:column;gap:.45rem}
.ph-profile-dinos li{display:flex;justify-content:space-between;align-items:center;gap:.75rem;padding:.65rem .8rem;background:var(--basalt);border:1px solid var(--fern-line);border-radius:var(--r-1)}
.ph-profile-dinos li>div{display:flex;flex-direction:column;gap:.25rem;min-width:0}
.ph-profile-dinos li>div>span,.ph-profile-dino-state small{font-size:.75rem;color:var(--lichen)}
.ph-profile-dino-state{align-items:flex-end;text-align:right;white-space:nowrap}
.ph-profile-dino-state span{font-weight:700;font-size:.8rem}
.ph-profile-note{font-size:.75rem;color:var(--lichen);line-height:1.5;margin:.7rem 0 0}
.ph-profile-setting{border:1px solid var(--fern-line);background:var(--basalt);border-radius:var(--r-1);padding:1rem}
.ph-profile-setting>div>p{margin:.35rem 0 .65rem;font-size:.86rem;line-height:1.5;color:var(--lichen)}
.ph-profile-lock-status{font-weight:700;margin:.5rem 0 1rem;font-size:.9rem;color:var(--amber)}
.ph-profile-lock-btn{width:100%;min-height:40px}
.ph-profile-confirm{margin-top:.75rem;padding:.9rem;border:1px solid var(--amber-line);border-radius:var(--r-1);background:rgba(141,93,28,.1)}
.ph-profile-confirm[hidden]{display:none}
.ph-profile-confirm p{font-size:.88rem;margin:0 0 .75rem;line-height:1.5}
.ph-profile-confirm-actions{display:flex;gap:.6rem;flex-wrap:wrap}
.ph-profile-confirm-actions button{flex:1;min-height:40px}
.ph-profile-message{min-height:1.1em;margin:.5rem 0 0;font-size:.84rem}
.ph-profile-appearance{margin-top:.85rem;width:100%}
@media(max-width:520px){
  .ph-profile-dialog{width:calc(100vw - 16px);max-height:calc(100dvh - 24px)}
  .ph-profile-head,.ph-profile-identity,.ph-profile-section{padding:1rem}
  .ph-profile-dates{grid-template-columns:1fr}
  .ph-profile-dinos li{gap:.5rem}
}

/* Compact chat identities, shared player menu and private mute controls. */
.gc-tools { display: flex; align-items: center; gap: .4rem; }
.gc-toggle { display: inline-flex; align-items: center; justify-content: center; }
.ph-chat-rail .gc-body { padding: .5rem; gap: .2rem; }
.gc-body .gc-line { display: grid; grid-template-columns: 36px minmax(0,1fr); gap: .15rem .65rem; padding: .65rem .4rem; border-radius: var(--r-1); }
.gc-body .gc-line:hover { background: rgba(255,255,255,.035); }
.gc-avatar, .cm-avatar-button { position: relative; grid-row: span 2; width: 36px; height: 36px; padding: 0; background: none; border: 0; cursor: pointer; }
.gc-avatar:disabled, .gc-name:disabled, .cm-avatar-button:disabled { cursor: default; opacity: 1; }
.gc-avatar .ph-avatar { width: 36px; height: 36px; border-radius: var(--r-1); }
.gc-level { position: absolute; left: -5px; top: -6px; display: grid; place-items: center; min-width: 18px; height: 18px; padding: 0 3px; border: 1px solid #3d765b; background: #163d2e; border-radius: 3px; color: #9dd4b4; font-size: 9px; font-weight: 700; }
.gc-message-head { min-width: 0; display: flex; justify-content: space-between; gap: .35rem; align-items: baseline; }
.gc-name { padding: 0; border: 0; background: none; color: var(--bone); font: inherit; font-weight: 700; cursor: pointer; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: left; }
.gc-name:hover:not(:disabled) { text-decoration: underline; }
.gc-message-head time { flex: none; font-size: .63rem; opacity: .7; }
.gc-message-text { grid-column: 2; margin: 0; color: var(--lichen); line-height: 1.45; white-space: pre-wrap; overflow-wrap: anywhere; }
/* replies: a Reply button on hover, the quoted message above a reply, "Replying to" above the input */
.gc-body .gc-line { position: relative; }
.gc-line.has-quote .gc-avatar { grid-row: span 3; }
.gc-reply-btn { display: inline-grid; place-items: center; flex: none; width: 24px; height: 22px; margin-left: auto; padding: 0; border: 1px solid transparent; border-radius: var(--r-1); background: none; color: var(--lichen); cursor: pointer; opacity: 0; transition: opacity var(--d-hover) ease, color var(--d-hover) ease, border-color var(--d-hover) ease; }
.gc-line:hover .gc-reply-btn, .gc-line:focus-within .gc-reply-btn, .gc-reply-btn:focus-visible { opacity: 1; }
.gc-reply-btn:hover { color: var(--bone); border-color: var(--line); }
@media (hover: none) { .gc-reply-btn { opacity: .7; } }
.gc-quote { grid-column: 2; display: flex; align-items: center; gap: .35rem; min-width: 0; max-width: 100%; margin: .1rem 0 .15rem; padding: .2rem .45rem; border: 1px solid var(--line); border-radius: var(--r-0); background: var(--glass-well, var(--ink-1)); color: var(--lichen); font: 400 .74rem/1.35 var(--body); text-align: left; cursor: pointer; }
.gc-quote:hover, .gc-quote:focus-visible { color: var(--bone); border-color: var(--line-hi); }
.gc-quote .ph-ico { flex: none; opacity: .7; transform: scaleX(-1); }
.gc-quote strong { flex: none; max-width: 45%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--bone-2); font-weight: 700; }
.gc-quote-text { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* a reply to you: a square amber outline, like the hub's other selected cards (no side stripe) */
.gc-line.gc-to-me { background: var(--amber-soft); box-shadow: inset 0 0 0 1px var(--amber-line); border-radius: var(--r-0); }
.gc-line.gc-flash { animation: gc-flash 1.6s ease-out; }
@keyframes gc-flash { 0%, 30% { background: color-mix(in srgb, var(--amber) 22%, transparent); } 100% { background: transparent; } }
.gc-replying { display: flex; align-items: center; gap: .45rem; min-width: 0; padding: .4rem .65rem; border-top: 1px solid var(--line); background: var(--glass-well, var(--ink-1)); font-size: .78rem; color: var(--lichen); }
.gc-replying[hidden] { display: none; }
.gc-replying-to { display: inline-flex; align-items: center; gap: .3rem; flex: none; max-width: 55%; overflow: hidden; white-space: nowrap; }
.gc-replying-to strong { overflow: hidden; text-overflow: ellipsis; color: var(--bone); }
.gc-replying-text { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gc-replying-cancel { display: inline-grid; place-items: center; flex: none; width: 24px; height: 24px; padding: 0; border: 1px solid transparent; border-radius: var(--r-1); background: none; color: var(--lichen); cursor: pointer; }
.gc-replying-cancel:hover { color: var(--bone); border-color: var(--line); }
.gc-staff-avatar { display: grid; place-items: center; width: 36px; height: 36px; color: var(--amber); border: 1px solid #6b542a; border-radius: var(--r-1); }
.chat-person-menu { position: fixed; z-index: 9999; width: min(260px,calc(100vw - 16px)); border: 1px solid var(--fern-line); border-radius: var(--r-1); padding: .8rem 0 .4rem; background: var(--ink-stage); color: var(--bone); box-shadow: 0 16px 48px #0009; }
.chat-person-identity { display: flex; align-items: center; gap: .75rem; padding: 0 .9rem .8rem; }
.chat-person-identity > div { min-width: 0; display: flex; flex-direction: column; gap: .3rem; }
.chat-person-identity strong { overflow: hidden; text-overflow: ellipsis; }
.chat-person-identity small { color: var(--lichen); font-size: .65rem; text-transform: uppercase; letter-spacing: .08em; }
.chat-person-menu button { display: flex; align-items: center; gap: .75rem; width: 100%; padding: .75rem 1rem; background: none; border: 0; color: var(--lichen); text-align: left; cursor: pointer; font: inherit; font-size: .8rem; }
.chat-person-menu button:first-of-type { border-top: 1px solid var(--fern-line); }
.chat-person-menu button:hover, .chat-person-menu button:focus-visible { background: #223226; color: var(--bone); outline: 2px solid #678c6e; outline-offset: -2px; }
.chat-person-dialog { width: min(440px,calc(100vw - 2rem)); max-height: 80vh; overflow: auto; padding: 1.5rem; border: 1px solid var(--fern-line); border-radius: var(--r-lg); background: var(--ink-stage); color: var(--bone); }
.chat-person-dialog::backdrop { background: #000a; }
.chat-person-dialog .chat-person-identity { padding-left: 0; }
.chat-person-dialog h2, .chat-person-dialog p { margin-top: 0; }
.chat-muted-player { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .6rem 0; }

.ph-chat-controls .gc-mutes { width: 30px; min-width: 30px; height: 30px; padding: 0; color: var(--lichen); background: transparent; border: 1px solid var(--fern-line); border-radius: var(--r-1); }

/* Leave room for both tab names and the mute/collapse controls. */
.ph-chat-rail .ph-chat-controls { align-items: center; flex-wrap: nowrap; }
.ph-chat-rail .ph-social-chat-tab{ flex: 1 1 auto; padding-inline: 6px; gap: 5px; }
.ph-chat-rail .ph-social-chat-tab span{ white-space: nowrap; }
.ph-chat-rail .ph-chat-controls .gc-mutes, .ph-chat-rail .ph-chat-controls .ph-social-hide { flex: none; margin: 0; }

/* Desktop shell: two independent full-height rails around the central content. */
.ph-nav a { padding-block: .55rem; }
.ph-nav-label { display: flex; flex-direction: column; gap: .15rem; min-width: 0; }
.ph-nav-label strong { font-weight: 600; font-size: .93rem; line-height: 1.2; }
.ph-nav-label small { font-weight: 400; font-size: .7rem; line-height: 1.35; color: var(--lichen); white-space: normal; }
@media (min-width: 1101px) {
  .ph-app { grid-template-columns: 256px minmax(0, 1fr) 320px; align-items: start; }
  .ph-app.social-hidden { grid-template-columns: 256px minmax(0, 1fr) 40px; }
  .ph-app > .ph-side { grid-column: 1; grid-row: 1; }
  .ph-app > .ph-body {
    grid-column: 2; grid-row: 1; min-height: 100dvh;
    padding-right: clamp(1.25rem, 3vw, 2.75rem);
  }
  .ph-app > .ph-body .ph-content-layout { grid-template-columns: minmax(0, 1fr); }
  .ph-app > .ph-body .ph-top, .ph-app > .ph-body .ph-foot { margin-right: 0; }
  .ph-app > .ph-body .ph-top { flex-wrap: wrap; }
  .ph-app > .ph-body .ph-top-right { min-width: 0; max-width: 100%; flex-wrap: wrap; }
  .ph-app > .ph-chat-rail {
    grid-column: 3; grid-row: 1; position: sticky; top: 0; align-self: start;
    width: 100%; height: 100dvh; min-height: 0; max-height: none;
    display: flex; flex-direction: column; gap: 0; overflow: hidden;
    padding: 0; border: 0; border-left: 1px solid var(--fern-line);
    border-radius: 0; background: linear-gradient(180deg, var(--side-0), var(--side-1));
    box-shadow: none;
  }
  .ph-app > .ph-chat-rail .gc-dock {
    position: relative; inset: auto; z-index: auto; display: flex; flex-direction: column;
    flex: 1; min-height: 0; height: auto; width: 100%;
  }
  .ph-app > .ph-chat-rail .gc-body { flex: 1; height: auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
  .ph-app > .ph-chat-rail .gc-form { flex: none; }
  .ph-app > .ph-chat-rail.social-collapsed .gc-dock,
  .ph-app > .ph-chat-rail.social-friends-active .gc-dock{ display: none; }
  .ph-app > .ph-chat-rail.social-collapsed { height: 100dvh; }
}

/* Presence is distinct from game-server connectivity. */
.ph-online.is-web .ph-dot { background: var(--amber); box-shadow: 0 0 0 3px rgba(217, 164, 65, .18); }

/* Keep the established theme with a denser main-content rhythm. */
.ph-main .ph-title h1, .ph-main .me-title { font-size: clamp(1.65rem, 2.8vw, 2.1rem); }
.ph-main .ph-title .eyebrow { display: none; }
.ph-main .ph-panel, .page-me .ph-main .me-cols > section { padding: 1rem; }
.ph-main .stat-strip { gap: .65rem; margin-block: 1rem; }
.ph-main .stat-strip .stat { padding: .8rem 1rem; }
.ph-main .stat-strip .stat dd { font-size: 1.5rem; line-height: 1.2; }
.ph-main .stat-strip .stat dd.word { font-size: clamp(1.15rem, 2vw, 1.5rem); overflow-wrap: anywhere; }
.ph-main .dino-card { gap: 1.25rem; padding: 1rem 1.25rem; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.ph-main .dino-card > * { min-width: 0; }
.ph-main .dino-name { font-size: clamp(1.7rem, 3.4vw, 2.5rem); line-height: 1.05; overflow-wrap: normal; }
.ph-main .growth { margin-top: 1rem; }
.ph-main .growth-num { font-size: 1.3rem; }
.ph-main .dino-link { font-size: .85rem; margin-top: .65rem; }
.dino-state { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: baseline; gap: .4rem 1rem; padding-bottom: .7rem; border-bottom: 1px solid var(--fern-line); }
.dino-state strong { color: var(--amber); font-size: .95rem; }
.dino-state span { color: var(--lichen); font-size: .85rem; }
.overview-record { align-self: start; }
.overview-record > summary { color: var(--bone); cursor: pointer; font-size: .85rem; padding: .5rem 0; }
.overview-record[open] > summary { margin-bottom: .75rem; }
@media (max-width: 820px) { .ph-main .dino-card { grid-template-columns: minmax(0, 1fr); gap: 1rem; } }
@media (max-width: 480px) { .ph-main .stat-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.staff-role-badge, .ph-acct-txt .staff-role-badge { display: inline-flex; align-items: center; align-self: flex-start; padding: .12rem .4rem; border: 1px solid var(--amber-line); border-radius: var(--r-1); color: var(--amber); background: var(--amber-soft); font: 700 .67rem/1.35 var(--body); white-space: nowrap; }
.staff-role-badge[data-role=moderator] { color: var(--ok-mute); border-color: #4f6840; background: var(--ink-band); }
.ph-acct-txt:has(.staff-role-badge) { display: grid; grid-template-columns: auto auto; column-gap: .45rem; align-items: center; }
.ph-acct-txt:has(.staff-role-badge) > span:last-child { grid-column: 1 / -1; }
.gc-message-head { flex-wrap: wrap; }
.ph-main .me-head > .eyebrow { display: none; }
/* DM safety controls */

/* ------------------------------------------------------------------
   Phones and tablets (one column): the social panel sits below the page.
   One authoritative block; it wins over the older layered rules above.
   ------------------------------------------------------------------ */
@media (max-width: 1100px) {
  /* no dead space between the page and the panel (the page kept its desktop bottom padding) */
  .ph-content-layout > .ph-main { padding-bottom: 0; }
  /* the panel is as tall as what's in it: the page scrolls, not a box inside the page */
  .ph-content-layout > .ph-chat-rail:not(.social-collapsed) { height: auto; min-height: 0; max-height: none; overflow: visible; }
  /* chat keeps a fixed window: its messages scroll inside, the newest at the bottom */
  .ph-content-layout > .ph-chat-rail .gc-dock { flex: none; height: auto; min-height: 0; }
  .ph-content-layout > .ph-chat-rail .gc-body { flex: none; height: min(380px, 55dvh); overflow-y: auto; overscroll-behavior: contain; }
}
@media (max-width: 900px) {
  /* a squeezed "Apex S…" in the top bar helps nobody: the page shows its own title right below */
  .ph-top-page { display: none; }
  .ph-side .wordmark { margin-right: .5rem; }
}

/* Chat lines: the role badge sits right after the name, the time goes to the right edge. */
.gc-message-head { justify-content: flex-start; align-items: center; gap: .4rem; }
.gc-message-head .staff-role-badge { align-self: center; }
/* one line in the narrow rail: badges keep their size, a long name gives way first */
.gc-message-head { flex-wrap: nowrap; gap: .3rem; }
.gc-message-head .gc-name { flex: 0 1 auto; min-width: 2.5em; }
.gc-message-head .ph-tier, .cm-head .ph-tier { display: inline-flex; align-items: center; align-self: center; padding: .12rem .5rem; border-radius: 3px; font: 700 .67rem/1.35 var(--body); white-space: nowrap; }
.gc-message-head .staff-role-badge, .gc-message-head .ph-tier { flex: none; padding-inline: .35rem; }
.gc-message-head .gc-reply-btn { width: 20px; }
.gc-message-head time { margin-left: auto; }
.gc-reply-btn + time { margin-left: .15rem; }
/* level as a small badge on the avatar's corner, ringed so it doesn't eat the picture */
.gc-level { left: auto; top: auto; right: -6px; bottom: -5px; box-shadow: 0 0 0 2px var(--card, var(--ink-2)); }
.ph-legal { margin-top: .35rem; }
.ph-legal a { color: var(--lichen); }
.ph-legal a:hover { color: var(--bone); }

/* ------------------------------------------------------------------
   Currencies: Anarchy Coins (gold footprint coin) and Anarchy Shards (glowing meteor crystal)
   ------------------------------------------------------------------ */
.ph-cur { flex: none; overflow: visible; }
.ph-cur-coin { filter: drop-shadow(0 1px 1px rgba(0, 0, 0, .45)); }
.ph-cur-shard { filter: drop-shadow(0 0 2px rgba(255, 110, 90, .9)) drop-shadow(0 0 6px rgba(229, 72, 58, .55)); animation: ph-shard-glow 2.8s ease-in-out infinite; }
@keyframes ph-shard-glow {
  0%, 100% { filter: drop-shadow(0 0 2px rgba(255, 110, 90, .85)) drop-shadow(0 0 5px rgba(229, 72, 58, .45)); }
  50% { filter: drop-shadow(0 0 3px rgba(255, 140, 120, 1)) drop-shadow(0 0 11px rgba(229, 72, 58, .8)); }
}
@media (prefers-reduced-motion: reduce) { .ph-cur-shard { animation: none; } }

/* Top bar: one height for every chip, the balances read like the currencies they are */
.ph-top-right { gap: .5rem; }
.ph-top-right > .ph-chip, .ph-top-right > .ph-acct { height: 44px; }
.ph-chip.ph-coins strong { color: var(--gold); }
.ph-chip.ph-shards { border-color: rgba(229, 72, 58, .4); background: linear-gradient(180deg, rgba(229, 72, 58, .1), rgba(14, 17, 13, 1) 70%); }
.ph-chip.ph-shards strong { color: var(--danger-text); }
a.ph-chip.ph-shards:hover { border-color: rgba(255, 120, 100, .75); }
.ph-online.is-web .ph-dot { background: #8aa07c; box-shadow: 0 0 0 3px rgba(138, 160, 124, .18); }

/* Phones: both balances in one pill next to the menu */
.ph-mini-coins:not([hidden]) { gap: .3rem; }
.ph-mini-coins .ph-mini-c { color: var(--gold); }
.ph-mini-coins .ph-mini-s { color: var(--danger-text); }
.ph-mini-coins .ph-cur-shard { margin-left: .35rem; }

/* ---- One hover for every top-bar button: the Coins chip's gold edge ---- */
.ph-chip, .ph-acct, .ph-profile-close, .ph-menu-btn { transition: border-color .15s ease, background-color .15s ease; }
.ph-account-open:hover, .ph-account-open:focus-visible { background: transparent; }
.ph-account-open:focus-visible { outline: none; }
.ph-acct:hover, .ph-acct:focus-within { border-color: var(--amber-line); }
.ph-acct:has(.ph-account-open:focus-visible) { box-shadow: 0 0 0 2px var(--amber-line); }
.ph-profile-close:hover, .ph-profile-close:focus-visible { border-color: var(--amber-line); }
.btn-ghost:hover { border-color: var(--amber-line); }

/* ---- Profile window: menu on the left, the chosen section on the right ---- */
.ph-profile-dialog.pp {
  width: min(1080px, calc(100vw - 28px)); max-width: 1080px; height: min(86dvh, 820px); max-height: none;
  overflow: hidden; display: grid; grid-template-columns: 250px minmax(0, 1fr);
}
.ph-profile-dialog.pp:not([open]) { display: none; }
.pp-side { display: flex; flex-direction: column; min-height: 0; background: linear-gradient(180deg, var(--ink-band), var(--ink-stage)); border-right: 1px solid var(--fern-line); }
.pp-id { display: flex; align-items: center; gap: .75rem; padding: 1.15rem 1rem 1rem; border-bottom: 1px solid var(--fern-line); min-height: 84px; }
.pp-id .ph-avatar { width: 50px; height: 50px; font-size: 1.25rem; flex: none; }
.pp-id-txt { display: flex; flex-direction: column; gap: .25rem; min-width: 0; }
.pp-id-txt strong { font-size: 1.05rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pp-presence { font-size: .78rem; color: var(--lichen); display: inline-flex; align-items: center; gap: .35rem; }
.pp-presence::before { content: ''; width: 7px; height: 7px; border-radius: 3px; background: #8aa07c; }
.pp-presence.is-on::before { background: #6fd36f; box-shadow: 0 0 6px #6fd36f; }
.pp-nav { border: 0; margin: 0; background: none; position: static; display: flex; flex-direction: column; gap: 2px; padding: .6rem; overflow-y: auto; overscroll-behavior: contain; }
.pp-tab { display: flex; align-items: center; gap: .7rem; width: 100%; padding: .62rem .7rem; border: 1px solid transparent; border-radius: var(--r-1); background: transparent; color: var(--lichen); font: 600 .92rem var(--body); text-align: left; cursor: pointer; transition: border-color .15s ease, color .15s ease, background-color .15s ease; }
.pp-nav:focus-visible { outline: none; }
.pp-tab .ph-ico, .pp-tab .ph-cur { flex: none; }
.pp-tab:hover, .pp-tab:focus-visible { border-color: var(--amber-line); color: var(--bone); outline: none; }
.pp-tab.is-active { background: var(--field); border-color: var(--amber-line); color: var(--bone); }
.pp-tab.is-active .ph-ico { color: var(--amber); }
.pp-tab-label { flex: 1; min-width: 0; }
.pp-count { min-width: 1.6rem; padding: .05rem .4rem; border-radius: 3px; background: rgba(255,255,255,.06); color: var(--lichen); font-size: .72rem; font-weight: 700; text-align: center; font-variant-numeric: tabular-nums; }
.pp-tab.is-active .pp-count { background: rgba(244,207,122,.14); color: var(--gold); }
.pp-body { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.pp-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 1rem 1.4rem; border-bottom: 1px solid var(--fern-line); }
.pp-title { margin: .15rem 0 0; font: 800 1.55rem/1.15 var(--display); }
.pp-main { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 1.2rem 1.4rem 1.6rem; display: flex; flex-direction: column; gap: 1.1rem; outline: none; }
.pp-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .6rem; }
.pp-stats-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.pp-stat { display: flex; flex-direction: column; gap: .2rem; padding: .8rem .9rem; border: 1px solid var(--fern-line); border-radius: var(--r-1); background: var(--basalt); min-width: 0; }
.pp-stat-label { font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: var(--lichen); font-weight: 700; }
.pp-stat strong { font: 800 1.45rem/1.15 var(--display); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.pp-stat small { font-size: .75rem; color: var(--lichen); }
.pp-stat-coin strong { color: var(--gold); }
.pp-stat-shard { border-color: rgba(229,72,58,.4); }
.pp-stat-shard strong { color: var(--danger-text); }
.pp-grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.1rem; align-items: start; }
.pp-block { min-width: 0; }
.pp-block > h3 { margin: 0 0 .55rem; font-size: .8rem; text-transform: uppercase; letter-spacing: .1em; color: var(--lichen); font-weight: 800; }
.pp-line { margin: 0 0 .45rem; font-size: .9rem; line-height: 1.5; }
.pp-tier { font-weight: 800; }
.pp-note { margin: .55rem 0 0; font-size: .75rem; color: var(--lichen); line-height: 1.5; }
.pp-empty { margin: 0; padding: .9rem 1rem; border: 1px dashed var(--fern-line); border-radius: var(--r-1); color: var(--lichen); font-size: .88rem; }
.pp-dl { display: grid; gap: .45rem; margin: 0; }
.pp-dl > div { display: flex; justify-content: space-between; gap: 1rem; padding: .5rem .75rem; border: 1px solid var(--fern-line); border-radius: var(--r-1); background: var(--basalt); }
.pp-dl dt { font-size: .8rem; color: var(--lichen); }
.pp-dl dd { margin: 0; font-size: .85rem; font-weight: 600; text-align: right; overflow-wrap: anywhere; }
.pp-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .4rem; }
.pp-row { display: flex; justify-content: space-between; align-items: center; gap: .8rem; padding: .6rem .8rem; border: 1px solid var(--fern-line); border-radius: var(--r-1); background: var(--basalt); }
.pp-row-main { display: flex; flex-direction: column; gap: .18rem; min-width: 0; }
.pp-row-main strong { font-size: .9rem; overflow-wrap: anywhere; }
.pp-row-main span { font-size: .77rem; color: var(--lichen); overflow-wrap: anywhere; }
.pp-row-side { display: flex; flex-direction: column; align-items: flex-end; gap: .2rem; flex: none; text-align: right; }
.pp-row-side time { font-size: .72rem; color: var(--lichen); white-space: nowrap; }
.pp-amt { display: inline-flex; align-items: center; gap: .3rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.pp-plus { color: #9fd98a; }
.pp-minus { color: var(--danger-soft); }
.pp-tag { display: inline-block; padding: .12rem .5rem; border-radius: 3px; border: 1px solid var(--fern-line); font-size: .72rem; font-weight: 700; white-space: nowrap; color: var(--bone); }
.pp-tag-red { border-color: rgba(229,72,58,.5); color: var(--danger-text); background: rgba(229,72,58,.08); }
.pp-tag-amber { border-color: var(--amber-line); color: var(--gold); background: rgba(244,207,122,.07); }
.pp-tag-green { border-color: rgba(120,190,100,.5); color: #b6e3a4; background: rgba(120,190,100,.08); }
.pp-hero { display: flex; align-items: center; gap: .9rem; padding: .9rem 1rem; border: 1px solid var(--amber-line); border-radius: var(--r-1); background: linear-gradient(110deg, rgba(244,207,122,.08), transparent); }
.pp-hero .ph-ico { color: var(--amber); flex: none; }
.pp-hero div { display: flex; flex-direction: column; gap: .2rem; }
.pp-hero strong { font: 800 1.25rem/1.2 var(--display); }
.pp-hero span { font-size: .82rem; color: var(--lichen); }
.pp-skins { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: .6rem; }
.pp-skin { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: .7rem; padding: .7rem .8rem; border: 1px solid var(--fern-line); border-radius: var(--r-1); background: var(--basalt); }
.pp-skin.rar-rare { border-color: rgba(110,160,230,.45); }
.pp-skin.rar-unique { border-color: rgba(190,120,230,.5); }
.pp-skin.rar-legendary { border-color: var(--amber-line); }
.pp-sw { width: 46px; height: 46px; border-radius: var(--r-1); overflow: hidden; display: grid; grid-auto-flow: column; }
.pp-skin-body { display: flex; flex-direction: column; gap: .15rem; min-width: 0; }
.pp-skin-body strong { font-size: .9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pp-skin-body span { font-size: .74rem; color: var(--lichen); overflow-wrap: anywhere; }
.pp-skin-uses { display: flex; flex-direction: column; align-items: flex-end; }
.pp-skin-uses b { font-variant-numeric: tabular-nums; }
.pp-skin-uses small { font-size: .68rem; color: var(--lichen); }
.pp .ph-profile-lock-btn, .pp .ph-profile-appearance { width: auto; min-width: 260px; }

/* tablets and phones: the menu becomes a row of tabs above the content */
@media (max-width: 760px) {
  .ph-profile-dialog.pp { width: calc(100vw - 12px); height: calc(100dvh - 16px); grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); }
  .pp-side { min-width: 0; border-right: 0; border-bottom: 1px solid var(--fern-line); }
  .pp-id { min-height: 0; padding: .8rem 3.8rem .7rem .9rem; }
  .pp-id .ph-avatar { width: 40px; height: 40px; }
  .pp-nav { flex-direction: row; overflow-x: auto; overflow-y: hidden; padding: .45rem .55rem; gap: .35rem; scrollbar-width: none; }
  .pp-nav::-webkit-scrollbar { display: none; }
  .pp-tab { width: auto; flex: none; padding: .5rem .7rem; font-size: .86rem; border-color: var(--fern-line); }
  .pp-head { padding: .7rem 1rem; }
  .pp-head .ph-profile-eyebrow { display: none; }
  .pp-title { font-size: 1.25rem; }
  .pp-head .ph-profile-close { position: absolute; top: .75rem; right: .75rem; }
  .pp-main { padding: .9rem .9rem 1.4rem; }
  .pp-stats, .pp-stats-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pp-grid2 { grid-template-columns: 1fr; }
  .pp .ph-profile-lock-btn, .pp .ph-profile-appearance { width: 100%; min-width: 0; }
}

/* ---- Name tags (level, staff role, membership) share one pill shape ---- */
.staff-role-badge, .ph-acct-txt .staff-role-badge { border-radius: 3px; padding: .12rem .5rem; }
.ph-who-sub { gap: .35rem; }
.ph-who-sub > .ph-level, .ph-who-sub > .staff-role-badge, .ph-who-sub > .ph-tier {
  display: inline-flex; align-items: center; align-self: center; box-sizing: border-box;
  height: 24px; margin: 0; padding: 0 .6rem; border-radius: 3px;
  font: 800 .76rem/1 var(--body); letter-spacing: .01em; white-space: nowrap;
}

/* ---- Social rail: Chat · Friends · Messages (friends-widget.js) */
:is(.ph-chat-rail, .ph-friends-rail) .ph-chat-controls [role=tab] {
  position: relative; flex: 1 1 0; display: flex; align-items: center; justify-content: center; gap: .4rem;
  min-width: 0; min-height: 44px; padding: .5rem .35rem; border: 0; border-radius: 0; background: transparent; box-shadow: none;
  color: var(--lichen); font: 700 var(--t-eyebrow)/1 var(--body); letter-spacing: .08em; text-transform: uppercase; cursor: pointer;
  transition: color var(--d-hover) ease, background-color var(--d-hover) ease;
}
:is(.ph-chat-rail, .ph-friends-rail) .ph-chat-controls [role=tab] .ph-ico { width: 16px; height: 16px; flex: none; }
:is(.ph-chat-rail, .ph-friends-rail) .ph-chat-controls [role=tab] .ff-tab-label, :is(.ph-chat-rail, .ph-friends-rail) .ph-social-chat-tab span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
:is(.ph-chat-rail, .ph-friends-rail) .ph-chat-controls [role=tab]:hover { color: var(--bone); }
:is(.ph-chat-rail, .ph-friends-rail) .ph-chat-controls [role=tab][aria-selected=true] { color: var(--bone); background: var(--ink-band); box-shadow: inset 0 -2px var(--blood-hi); }
.ff-online-count { display: inline-flex; align-items: center; gap: 3px; flex: none; color: var(--ok-bright); font-size: var(--t-eyebrow); letter-spacing: 0; }
.ff-online-count::before { content: ""; width: 6px; height: 6px; border-radius: 3px; background: var(--moss); }
.ff-notification, .ff-msg-count { flex: none; display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; border-radius: var(--r-pill); background: var(--blood); color: var(--cream); font: 700 .68rem/1 var(--body); font-variant-numeric: tabular-nums; letter-spacing: 0; }

:is(.ph-chat-rail, .ph-friends-rail):not(.social-chat-active) .gc-dock,
:is(.ph-chat-rail, .ph-friends-rail):not(.social-friends-active) .ff-drawer,
:is(.ph-chat-rail, .ph-friends-rail):not(.social-messages-active) .ff-inbox,
:is(.ph-chat-rail, .ph-friends-rail).social-collapsed .ff-drawer, :is(.ph-chat-rail, .ph-friends-rail).social-collapsed .ff-inbox { display: none; }
:is(.ph-chat-rail, .ph-friends-rail) .ff-drawer, :is(.ph-chat-rail, .ph-friends-rail) .ff-inbox {
  flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain;
  display: flex; flex-direction: column; gap: 2px; padding: .7rem .6rem 1rem;
}

.ff-search, .ff-dm-input { background: var(--field); color: var(--bone); border: 1px solid var(--line); border-radius: var(--r-1); transition: border-color var(--d-hover) ease, box-shadow var(--d-hover) ease; }
.ff-search { width: 100%; min-height: 38px; margin-bottom: .2rem; padding: .5rem .7rem; font-size: var(--t-small); }
.ff-search:hover, .ff-dm-input:hover { border-color: var(--line-hi); }
.ff-search:focus, .ff-dm-input:focus { outline: none; border-color: var(--amber); box-shadow: 0 0 0 3px var(--amber-soft); }

.ff-group { display: flex; align-items: center; gap: .5rem; margin: .85rem .3rem .3rem; color: var(--dim); font: 700 var(--t-eyebrow)/1 var(--body); letter-spacing: .14em; text-transform: uppercase; }
.ff-group::after { content: ""; flex: 1; height: 1px; background: var(--line-soft); }
.ff-group-n { padding: 2px 5px; border: 1px solid var(--line); border-radius: var(--r-1); color: var(--lichen); font-size: var(--t-eyebrow); letter-spacing: .02em; }
.ff-results:empty, .ff-requests:empty { display: none; }
.ff-empty { margin: 0; padding: .6rem .4rem; color: var(--lichen); font-size: var(--t-small); line-height: 1.5; }

.ff-person { display: flex; align-items: center; gap: .2rem; border-radius: var(--r-1); transition: background-color var(--d-hover) ease; }
.ff-person:hover, .ff-person:focus-within { background: var(--ink-3); }
.ff-person-main, .ff-thread { flex: 1; display: flex; align-items: center; gap: .65rem; min-width: 0; padding: .45rem .4rem; background: none; border: 0; border-radius: var(--r-1); color: inherit; font: inherit; text-align: left; cursor: pointer; }
.ff-person-main.is-static { cursor: default; }
.ff-face { position: relative; flex: none; }
.ff-presence { position: absolute; right: -2px; bottom: -2px; width: 10px; height: 10px; border-radius: 3px; background: var(--ink-2); box-shadow: 0 0 0 2px var(--ink-2), inset 0 0 0 2px var(--dim); }
.ff-face.is-on .ff-presence { background: var(--moss); box-shadow: 0 0 0 2px var(--ink-2); }
.ff-face:not(.is-on) .ph-avatar { opacity: .65; filter: saturate(.4); }
.ff-name { flex: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ff-name strong, .ff-name small { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.ff-name strong { font-size: var(--t-small); font-weight: 600; line-height: 1.25; }
.ff-name small { color: var(--lichen); font-size: var(--t-eyebrow); line-height: 1.25; }
.ff-face.is-on + .ff-name small { color: var(--ok-mute); }
.ff-unread { flex: none; display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; border-radius: var(--r-pill); background: var(--blood); color: var(--cream); font: 700 .68rem/1 var(--body); font-variant-numeric: tabular-nums; }
/* on a friend's avatar: top-right corner, ringed in the rail colour so it reads as a separate mark */
.ff-unread-corner { position: absolute; top: -6px; right: -7px; min-width: 17px; height: 17px; padding: 0 4px; font-size: .64rem; box-shadow: 0 0 0 2px var(--ink-2); }
.has-unread .ff-name strong, .has-unread .ff-thread-top strong { color: var(--white); }
.ff-actions { display: flex; gap: 2px; flex: none; padding-right: .2rem; }
.ff-icon-btn { display: inline-grid; place-items: center; width: 30px; height: 30px; padding: 0; background: transparent; border: 1px solid transparent; border-radius: var(--r-1); color: var(--lichen); cursor: pointer; transition: color var(--d-hover) ease, border-color var(--d-hover) ease, background-color var(--d-hover) ease; }
.ff-icon-btn:hover:not(:disabled) { color: var(--bone); border-color: var(--line); background: var(--ink-band); }
.ff-icon-btn:disabled { opacity: .35; cursor: not-allowed; }
.ff-request .ff-icon-btn[aria-label=Accept] { color: var(--ok-bright); border-color: var(--ok-line); }
.ff-request .ff-icon-btn[aria-label=Decline]:hover, .ff-outgoing-person .ff-icon-btn:hover { color: var(--danger-text); border-color: var(--danger-line); }
.ff-tag { padding: 2px 7px; border: 1px solid var(--line); border-radius: var(--r-pill); color: var(--lichen); font-size: var(--t-eyebrow); }

/* inbox */
.ff-strip-row { display: flex; gap: 2px; overflow-x: auto; padding: 0 0 .3rem; scrollbar-width: none; }
.ff-strip-row::-webkit-scrollbar { display: none; }
.ff-strip-face { flex: none; display: flex; flex-direction: column; align-items: center; gap: .35rem; width: 62px; padding: .45rem .2rem; background: none; border: 0; border-radius: var(--r-1); color: var(--lichen); font: 600 var(--t-eyebrow)/1.1 var(--body); cursor: pointer; }
.ff-strip-face > span:last-child { max-width: 100%; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.ff-strip-face:hover, .ff-thread:hover { background: var(--ink-3); color: var(--bone); }
.ff-thread { flex: none; width: 100%; padding: .55rem .45rem; transition: background-color var(--d-hover) ease; }
.ff-thread-body { flex: 1; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.ff-thread-top { display: flex; align-items: baseline; gap: .5rem; }
.ff-thread-top strong { flex: 1; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: var(--t-small); font-weight: 600; }
.ff-thread-top time { flex: none; color: var(--dim); font-size: var(--t-eyebrow); }
.ff-thread-bottom { display: flex; align-items: center; gap: .5rem; min-width: 0; }
.ff-thread-bottom .ff-thread-preview { flex: 1; min-width: 0; }
.ff-thread-preview { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; color: var(--lichen); font-size: var(--t-small); }
.has-unread .ff-thread-preview { color: var(--bone-2); }
.ff-you { color: var(--dim); }
.ff-empty-inbox { display: flex; flex-direction: column; align-items: center; gap: .6rem; margin: auto 0; text-align: center; }
.ff-empty-inbox p { margin: 0; max-width: 24ch; }

/* one conversation */
:is(.ph-chat-rail, .ph-friends-rail) .ff-inbox:has(> .ff-dm-panel) { padding: 0; overflow: hidden; }
.ff-dm-panel { flex: 1; display: flex; flex-direction: column; min-height: 0; animation: ff-thread-in var(--d-pop) var(--ease-out); }
@keyframes ff-thread-in { from { opacity: 0; transform: translateX(10px); } }
.ff-dm-head { display: flex; align-items: center; gap: .55rem; padding: .5rem .6rem .5rem .4rem; border-bottom: 1px solid var(--line); }
.ff-dm-block { flex: none; padding: .35rem .6rem; background: transparent; border: 1px solid var(--line); border-radius: var(--r-1); color: var(--lichen); font: 700 var(--t-eyebrow)/1 var(--body); letter-spacing: .08em; text-transform: uppercase; cursor: pointer; }
.ff-dm-block:hover { color: var(--danger-text); border-color: var(--danger-line); }
.ff-dm-log { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; display: flex; flex-direction: column; gap: .3rem; padding: .7rem; }
.ff-day { align-self: center; margin: .6rem 0 .25rem; color: var(--dim); font: 700 var(--t-eyebrow)/1 var(--body); letter-spacing: .12em; text-transform: uppercase; }
.ff-dm-message { align-self: flex-start; max-width: 86%; padding: .45rem .65rem .35rem; background: var(--ink-3); border: 1px solid var(--line); border-radius: var(--r-1) var(--r-1) var(--r-1) var(--r-tip); }
.ff-dm-message.mine { align-self: flex-end; background: color-mix(in srgb, var(--blood) 22%, var(--ink-2)); border-color: color-mix(in srgb, var(--blood) 45%, var(--line)); border-radius: var(--r-1) var(--r-1) var(--r-tip) var(--r-1); }
.ff-dm-message p { margin: 0; font-size: var(--t-small); line-height: 1.45; overflow-wrap: anywhere; white-space: pre-wrap; }
.ff-dm-message small { display: flex; justify-content: flex-end; gap: .6rem; margin-top: .2rem; color: var(--dim); font-size: var(--t-eyebrow); }
.ff-dm-report { padding: 0; background: none; border: 0; color: var(--dim); font: inherit; text-decoration: underline; cursor: pointer; opacity: 0; transition: opacity var(--d-hover) ease; }
.ff-dm-message:hover .ff-dm-report, .ff-dm-report:focus-visible { opacity: 1; }
@media (hover: none) { .ff-dm-report { opacity: 1; } }
.ff-dm-report:hover { color: var(--danger-text); }
.ff-dm-start { margin: auto 0; text-align: center; }
.ff-dm-compose { display: flex; align-items: flex-end; gap: .45rem; padding: .6rem; border-top: 1px solid var(--line); }
.ff-dm-input { flex: 1; min-width: 0; min-height: 38px; max-height: 120px; padding: .5rem .65rem; resize: none; font-size: var(--t-small); line-height: 1.4; }
.ff-dm-input:disabled { opacity: .5; }
.ff-send.ff-icon-btn { width: 38px; height: 38px; background: var(--blood); border-color: var(--blood); color: var(--cream); }
.ff-send.ff-icon-btn:hover:not(:disabled) { background: var(--blood-hi); border-color: var(--blood-hi); color: var(--cream); }
@media (max-width: 700px) { .ff-search, .ff-dm-input { font-size: 16px; } }
/* the open tab carries its label; the others show their icon and counts */
:is(.ph-chat-rail, .ph-friends-rail) .ph-chat-controls [role=tab]:not([aria-selected=true]) :is(.ff-tab-label, span:not([class])) { display: none; }
:is(.ph-chat-rail, .ph-friends-rail) .ph-chat-controls [role=tab]:not([aria-selected=true]) { flex: 0 0 auto; padding-inline: .6rem; }
:is(.ph-chat-rail, .ph-friends-rail) .ff-launch[aria-selected=true] .ff-online-count { display: none; }
:is(.ph-chat-rail, .ph-friends-rail) .ph-chat-controls { gap: 2px; padding-inline: 6px; }
:is(.ph-chat-rail, .ph-friends-rail) .ph-chat-controls [role=tab] { letter-spacing: .05em; }

/* ------------------------------------------------------------------
   Desktop top bar with category dropdowns (901px and up).
   Phones and small tablets keep .ph-side as a top bar with a drawer.
   One authoritative block; it wins over the older layout rules above.
   ------------------------------------------------------------------ */
:root { --nav-h: 64px; }
.ph-topnav { display: none; }
@media (min-width: 901px) {
  .ph-app { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto 1fr; }
  .ph-app > .ph-side { display: none; }
  .ph-app > .ph-topnav { grid-column: 1 / -1; grid-row: 1; }
  .ph-app > .ph-body { grid-column: 1; grid-row: 2; margin-inline: auto; padding-top: 1.75rem; min-height: 0; }

  .ph-topnav {
    position: sticky; top: 0; z-index: 60; display: flex; align-items: center; gap: clamp(.75rem, 1.6vw, 1.5rem);
    height: var(--nav-h); margin: 0; padding: 0 clamp(1rem, 2.4vw, 2rem);
    background: color-mix(in srgb, var(--side-1) 94%, transparent); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
    border: 0; border-bottom: 1px solid var(--line); border-radius: 0; box-shadow: 0 12px 30px -26px var(--black);
  }
  /* a thin line in the page's accent fades out from the middle of the bar's lower edge */
  .ph-topnav::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px; pointer-events: none;
    background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--acc) 60%, transparent) 50%, transparent); }
  .ph-topnav .wordmark { display: flex; align-items: center; gap: .55rem; flex: none; text-decoration: none; font: 800 1.35rem/1 var(--display); }

  .ph-cats { display: flex; align-items: stretch; gap: 2px; height: 100%; }
  .ph-cat { position: relative; display: flex; align-items: center; }
  .ph-cat-btn {
    display: inline-flex; align-items: center; gap: .45rem; height: 40px; padding: 0 .8rem;
    background: none; border: 1px solid transparent; border-radius: var(--r-1); color: var(--lichen);
    font: 700 .78rem/1 var(--body); letter-spacing: .1em; text-transform: uppercase; white-space: nowrap; cursor: pointer;
    transition: color var(--d-hover) ease, background-color var(--d-hover) ease, border-color var(--d-hover) ease;
  }
  .ph-cat-btn .ph-ico { color: var(--acc); }
  .ph-cat-btn:hover, .ph-cat.is-open .ph-cat-btn { color: var(--bone); background: var(--ink-3); }
  .ph-cat.is-open .ph-cat-btn { border-color: color-mix(in srgb, var(--acc) 35%, transparent); }
  .ph-cat-btn[aria-current=true], .ph-cat-link[aria-current=page] { color: var(--bone); }
  .ph-cat-link { text-decoration: none; }
  /* the category you're in is underlined in its own colour, flush with the bar's edge */
  .ph-cat:has(> .ph-cat-btn[aria-current=true])::after, .ph-cat:has(> .ph-cat-link[aria-current=page])::after { content: ""; position: absolute; left: .8rem; right: .8rem; bottom: 0; height: 2px; background: var(--acc); }
  .ph-cat-chev { opacity: .55; transform: rotate(90deg); transition: transform var(--d-pop) var(--ease-out); }
  .ph-cat.is-open .ph-cat-chev { transform: rotate(-90deg); }
  .ph-cat-dot { width: 6px; height: 6px; border-radius: 3px; background: var(--blood-hi); }

  .ph-cat-menu {
    position: absolute; top: calc(100% - 8px); left: 0; z-index: 61; min-width: 310px; padding: .45rem;
    border: 1px solid color-mix(in srgb, var(--acc) 30%, var(--line)); border-radius: var(--r-lg);
    background: linear-gradient(180deg, var(--ink-2), var(--ink-1)); box-shadow: inset 0 1px 0 var(--hud-hl), var(--hud-lift);
    visibility: hidden; opacity: 0; transform: translateY(-6px) scale(.98); transform-origin: top left;
    transition: opacity var(--d-pop) var(--ease-out), transform var(--d-pop) var(--ease-out), visibility 0s linear var(--d-pop);
  }
  .ph-cat.is-open .ph-cat-menu { visibility: visible; opacity: 1; transform: none; transition: opacity var(--d-pop) var(--ease-out), transform var(--d-pop) var(--ease-out), visibility 0s; }
  .ph-cat-head { margin: .4rem .6rem .45rem; color: color-mix(in srgb, var(--acc) 68%, var(--bone)); font: 700 var(--t-eyebrow)/1 var(--body); letter-spacing: .16em; text-transform: uppercase; }
  .ph-cat-item {
    display: flex; align-items: center; gap: .75rem; padding: .55rem .6rem; border: 1px solid transparent; border-radius: var(--r-1);
    color: var(--bone); text-decoration: none; transition: background-color var(--d-hover) ease, border-color var(--d-hover) ease;
  }
  .ph-cat-item:hover, .ph-cat-item:focus-visible { background: var(--ink-3); outline: none; border-color: var(--line); }
  .ph-cat-item[aria-current=page] { background: color-mix(in srgb, var(--acc) 12%, transparent); border-color: color-mix(in srgb, var(--acc) 35%, transparent); }
  .ph-cat-txt { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
  .ph-cat-txt strong { font-size: var(--t-small); font-weight: 700; line-height: 1.2; }
  .ph-cat-txt small { color: var(--lichen); font-size: var(--t-eyebrow); line-height: 1.3; }
  .ph-cat-item .ph-badge { margin-left: auto; }
  /* every item wears its own colour (--c): a tinted icon tile, and an edge in that colour on hover */
  .ph-cat-item .ph-nav-ico { color: var(--c); border-color: color-mix(in srgb, var(--c) 34%, transparent); background: color-mix(in srgb, var(--c) 9%, transparent); }
  .ph-cat-item:hover, .ph-cat-item:focus-visible { border-color: color-mix(in srgb, var(--c) 45%, transparent); }
  .ph-cat-item:hover .ph-nav-ico, .ph-cat-item:focus-visible .ph-nav-ico, .ph-cat-item[aria-current=page] .ph-nav-ico {
    color: var(--c); border-color: color-mix(in srgb, var(--c) 55%, transparent); background: color-mix(in srgb, var(--c) 16%, transparent);
  }
  .ph-cat-txt strong { display: flex; align-items: center; gap: .5rem; }
  /* section headings inside a menu: a small square, the name, and a rule that fades out */
  .ph-cat-sec { display: flex; align-items: center; gap: .55rem; margin: .7rem .6rem .3rem; color: color-mix(in srgb, var(--acc) 68%, var(--bone)); font: 700 .66rem/1 var(--body); letter-spacing: .18em; text-transform: uppercase; }
  .ph-cat-sec::before { content: ""; width: 6px; height: 6px; border-radius: 1px; background: var(--acc); }
  .ph-cat-sec::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, var(--line), transparent); }
  .ph-cat-head + .ph-cat-sec { margin-top: .2rem; }
  .ph-cat-chip { padding: .2rem .4rem; border: 1px solid var(--warn-line); border-radius: var(--r-1); background: var(--warn-bg); color: var(--gold); font: 700 .6rem/1 var(--body); letter-spacing: .14em; text-transform: uppercase; white-space: nowrap; }

  .ph-topnav .ph-top-right { display: flex; align-items: center; gap: .45rem; margin-left: auto; min-width: 0; }
  .ph-topnav .ph-top-right > .ph-chip, .ph-topnav .ph-top-right > .ph-acct { height: 40px; }
  .ph-top-status { gap: .4rem; color: var(--lichen); font-variant-numeric: tabular-nums; }
  .ph-top-status.is-on { color: var(--bone); }
  /* players online over the next restart, two short lines */
  .ph-top-lines { display: flex; flex-direction: column; justify-content: center; line-height: 1.15; white-space: nowrap; }
  .ph-top-restart { color: var(--lichen); font-size: .7rem; font-weight: 600; font-variant-numeric: tabular-nums; }
  .ph-top-status.is-soon .ph-top-restart { color: var(--warn-text); }
  .ph-top-status.is-soon { color: var(--warn-text); border-color: var(--amber-line); background: var(--amber-soft); }
  .ph-top-signout { justify-content: center; width: 40px; padding: 0; color: var(--lichen); cursor: pointer; }
  .ph-top-signout:hover { color: var(--bone); border-color: var(--line-hi); }
}
/* the bar sheds detail as it narrows; the social rail takes 320px of it from 1101px up */
@media (min-width: 901px) and (max-width: 1440px) {
  .ph-topnav .ph-acct-txt, .ph-topnav .ph-online > span:last-child { display: none; }
  .ph-topnav .ph-acct { padding: 0 .25rem; }
}
@media (min-width: 901px) and (max-width: 1660px) {
  .ph-topnav .wordmark span, .ph-cat-btn .ph-ico:not(.ph-cat-chev) { display: none; }
  .ph-cat-btn { padding: 0 .6rem; }
}
/* the restart time beside the player count only where the top bar has room (the tooltip always has it) */
@media (max-width: 1250px) { .ph-top-restart { display: none; } .ph-top-status.is-soon .ph-top-restart { display: block; } }
/* My Dino: the first item in the top bar, a straight link to the overview with a live status */
@media (min-width: 901px) {
  .ph-live {
    position: relative; display: flex; align-items: center; gap: .55rem; height: 100%; padding: 0 1rem 0 .2rem; margin-right: .35rem;
    border-right: 1px solid var(--line); color: var(--bone); text-decoration: none;
  }
  .ph-live-ico {
    display: inline-grid; place-items: center; width: 32px; height: 32px; flex: none; border: 1px solid color-mix(in srgb, var(--acc) 45%, transparent);
    border-radius: var(--r-0); background: color-mix(in srgb, var(--acc) 12%, transparent); color: var(--acc);
    transition: border-color var(--d-hover) ease, background-color var(--d-hover) ease;
  }
  .ph-live:hover .ph-live-ico { border-color: var(--acc); background: color-mix(in srgb, var(--acc) 20%, transparent); }
  .ph-live-txt { display: flex; flex-direction: column; gap: 4px; }
  .ph-live-txt strong { font: 700 .78rem/1 var(--body); letter-spacing: .1em; text-transform: uppercase; white-space: nowrap; }
  .ph-live-sub { display: inline-flex; align-items: center; gap: .35rem; color: var(--dim); font: 700 .62rem/1 var(--body); letter-spacing: .12em; text-transform: uppercase; white-space: nowrap; }
  .ph-live-sub::before { content: ""; width: 6px; height: 6px; border-radius: 3px; background: var(--dim); }
  .ph-live.is-on .ph-live-sub { color: var(--ok-bright); }
  .ph-live.is-on .ph-live-sub::before { background: var(--moss); box-shadow: 0 0 0 3px color-mix(in srgb, var(--moss) 25%, transparent); }
  .ph-live[aria-current=page]::after { content: ""; position: absolute; left: .2rem; right: 1rem; bottom: 0; height: 2px; background: var(--acc); }
  /* My Dino shows whether you're in game, so the separate chip goes */
  .ph-topnav .ph-online { display: none; }
}
@media (min-width: 901px) and (max-width: 1100px) { .ph-live-sub { display: none; } }

/* Friends and Messages: a full-height drawer down the right edge, from under the top bar to the
   bottom of the screen, opened from the bottom-right button. It slides over the page, which never reflows. */
.ph-friends-fab {
  position: fixed; right: 20px; bottom: 20px; z-index: 71; /* above the open drawer, so it also closes it */ display: grid; place-items: center; width: 56px; height: 56px; padding: 0;
  border: 1px solid var(--fern-line); border-radius: 50%; background: var(--blood); color: var(--bone); cursor: pointer; box-shadow: 0 14px 32px -14px rgba(0, 0, 0, .85);
}
.ph-friends-fab[hidden] { display: none; }
.ph-friends-fab:hover { filter: brightness(1.12); }
.ph-friends-fab .ph-badge { position: absolute; top: -4px; right: -4px; }
.ph-friends-rail {
  position: fixed; top: var(--nav-h); right: 0; bottom: 0; z-index: 70; width: min(360px, 100vw);
  display: flex; flex-direction: column; min-width: 0; overflow: hidden;
  background: linear-gradient(180deg, var(--side-0), var(--side-1)); border-left: 1px solid var(--fern-line); box-shadow: -24px 0 60px -30px rgba(0, 0, 0, .85);
}
.ph-friends-rail[hidden] { display: none; }
.ph-friends-head { display: flex; align-items: center; gap: .65rem; flex: none; padding: .8rem .8rem .8rem 1rem; border-bottom: 1px solid var(--fern-line); color: var(--bone); }
.ph-friends-title { display: grid; flex: 1; min-width: 0; }
.ph-friends-title h2 { margin: 0; font-size: .95rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; }
.ph-friends-sum { color: var(--lichen); font-size: .75rem; }
.ph-friends-rail .ph-chat-controls { display: flex; align-items: stretch; flex: none; gap: 2px; min-height: 45px; padding-inline: 6px; border-bottom: 1px solid var(--fern-line); }
.ph-friends-rail .ph-social-hide {
  flex: none; display: inline-grid; place-items: center; width: 32px; height: 32px; margin: 0; padding: 0;
  background: transparent; border: 1px solid var(--fern-line); border-radius: var(--r-1); color: var(--lichen); cursor: pointer;
}
.ph-friends-rail .ph-social-hide:hover { color: var(--bone); }
@media (max-width: 900px) {
  .ph-friends-fab { right: 16px; bottom: 16px; }
  .ph-friends-rail { top: var(--ph-top); width: 100%; border-left: 0; }
}

/* desktop: Global Chat sits on the left under the top bar and folds to a 40px strip. */
@media (min-width: 1101px) {
  .ph-app { --chat-col: 320px; grid-template-columns: var(--chat-col) minmax(0, 1fr); grid-template-rows: auto 1fr; }
  .ph-app.social-hidden { --chat-col: 40px; grid-template-columns: var(--chat-col) minmax(0, 1fr); } /* outranks an older .social-hidden grid */
  .ph-app > .ph-body { grid-column: 2; grid-row: 2; min-height: 0; }
  .ph-app > .ph-chat-rail {
    grid-column: 1; grid-row: 2; top: var(--nav-h); height: calc(100dvh - var(--nav-h));
    border-left: 0; border-right: 1px solid var(--fern-line);
  }
  .ph-app > .ph-chat-rail.social-collapsed { height: calc(100dvh - var(--nav-h)); }
  /* hiding folds the rail toward the left edge, so the arrows point the other way */
  .ph-app > .ph-chat-rail .ph-social-hide .ph-ico, .ph-app > .ph-chat-rail .ph-social-show .ph-ico { transform: scaleX(-1); }
}

/* Steady width: the scrollbar's space is always reserved, so switching between a long tab and a
   short one doesn't shift the rails and content sideways. On wide screens the page column stops
   growing and sits centred between the rails instead of stretching. */
html { scrollbar-gutter: stable; }
@media (min-width: 901px) {
  .ph-app > .ph-body { width: 100%; max-width: 1280px; margin-inline: auto; }
}

/* Top bar brand block (wordmark + My Dino): its right edge is the divider, and from 1101px up
   it is exactly as wide as the chat sidebar below, so the two lines meet. */
@media (min-width: 901px) {
  .ph-topnav { padding-left: 0; }
  .ph-brand {
    display: flex; align-items: center; gap: .75rem; flex: none; height: 100%; min-width: 0; overflow: hidden;
    padding: 0 .9rem 0 clamp(1rem, 2.4vw, 2rem); border-right: 1px solid var(--line);
  }
  .ph-brand .ph-live { height: 100%; min-width: 0; margin: 0; padding: 0; border-right: 0; }
  .ph-brand .ph-live-txt { min-width: 0; }
}
@media (min-width: 1101px) { .ph-app:not(.social-hidden) .ph-brand { width: var(--chat-col); } }


/* the next daily restart, under the server line in the side menu */
.ph-server { flex-wrap: wrap; }
.ph-server-next { flex-basis: 100%; padding-left: 1.1rem; color: var(--dim); font-weight: 500; }

/* docked chat: Everyone / Supporters (supporters only) */
.gc-rooms { display: flex; gap: 4px; padding: 6px 8px 0; }
.gc-room { flex: 1; min-height: 32px; padding: 4px 8px; border: 1px solid var(--line, #2b3427); border-radius: 6px; background: transparent; color: var(--lichen, #97a188); font: 600 .8rem/1 Barlow, system-ui, sans-serif; cursor: pointer; }
.gc-room[aria-pressed="true"] { color: var(--bone, #e6dfcb); border-color: var(--acc-supporter, #e5483a); box-shadow: inset 0 -2px 0 var(--acc-supporter, #e5483a); }
.gc-room:focus-visible { outline: 2px solid var(--bone, #e6dfcb); outline-offset: 1px; }

/* earned mastery title, shown on profiles and leaderboards */
.ph-title-badge { margin: .15rem 0 0; font: 700 .76rem/1.2 var(--body); letter-spacing: .02em; color: var(--gold); }
.lb-title { margin-left: .5rem; padding: .08rem .4rem; border-radius: 3px; background: color-mix(in srgb, var(--gold) 16%, transparent); color: var(--gold); font-size: .7rem; font-weight: 700; vertical-align: middle; }

/* "How it works": a quiet button at the top right of a page header, and its dialog */
.ph-head .ph-how-btn { margin-left: auto; align-self: flex-start; gap: .4rem; }
.ph-how { width: min(560px, calc(100% - 2rem)); max-height: min(80vh, 720px); padding: 0; overflow: hidden; display: none; }
.ph-how[open] { display: flex; flex-direction: column; }
.ph-how-head { display: flex; align-items: center; gap: .7rem; padding: 1rem 1.2rem; border-bottom: 1px solid var(--line); }
.ph-how-head h2 { margin: 0; font: 800 1.05rem/1.1 var(--display); letter-spacing: .1em; text-transform: uppercase; }
.ph-how-ico { display: grid; place-items: center; width: 32px; height: 32px; color: var(--amber); border: 1px solid var(--amber-line); background: var(--amber-soft); }
.ph-how-close { display: grid; place-items: center; width: 34px; height: 34px; margin-left: auto; padding: 0; color: var(--lichen); background: none; border: 1px solid var(--line); cursor: pointer; }
.ph-how-close:hover { color: var(--bone); border-color: var(--line-hi); }
.ph-how-body { overflow-y: auto; padding: .4rem 1.2rem 1.2rem; }
.ph-how-body h3 { margin: 1rem 0 .4rem; font: 700 .95rem/1.2 var(--body); color: var(--bone); }
.ph-how-body ul { margin: 0; padding-left: 1.1rem; display: grid; gap: .35rem; color: var(--bone-2); font-size: .9rem; }
.ph-how-body p { margin: 0; color: var(--bone-2); font-size: .9rem; }
.ph-how-code { margin: .5rem 0 0; padding: .6rem .8rem; border: 1px solid var(--line); background: rgba(0, 0, 0, .3); }
.ph-how-code dt { color: var(--lichen); font-size: .7rem; letter-spacing: .08em; text-transform: uppercase; }
.ph-how-code dd { margin: .15rem 0 .5rem; overflow-wrap: anywhere; font: .74rem/1.5 ui-monospace, Menlo, Consolas, monospace; color: var(--bone-2); }

/* Chat / Feed tabs on the global chat, and the live feed (chest unboxes and minigame wins) */
.gc-views { flex: none; display: flex; gap: 1.1rem; padding: 0 .9rem; border-bottom: 1px solid var(--fern-line, #2b3427); }
.gc-views > .gc-view { position: relative; min-height: 42px; padding: 0 .15rem; border: 0; border-radius: 0; background: none; box-shadow: none; color: var(--lichen, #97a188); font: 700 .78rem/1 var(--display, Barlow), system-ui, sans-serif; letter-spacing: .12em; text-transform: uppercase; cursor: pointer; transition: color var(--d-hover, .15s) ease; }
.gc-views > .gc-view:hover { background: none; color: var(--bone, #e6dfcb); }
.gc-views > .gc-view[aria-selected="true"] { background: none; border: 0; box-shadow: none; color: var(--bone, #e6dfcb); }
.gc-views > .gc-view[aria-selected="true"]::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--amber, #d9a441); }
.gc-view:focus-visible { outline: 2px solid var(--bone, #e6dfcb); outline-offset: -2px; }
.gc-dock.gc-feed-view .gc-rooms, .gc-dock.gc-feed-view .gc-body, .gc-dock.gc-feed-view .gc-replying, .gc-dock.gc-feed-view .gc-form { display: none !important; }
.gc-dock.gc-closed .gc-views, .gc-dock.gc-closed .gc-feed { display: none !important; }
.gc-feed { margin: 0; padding: .35rem .4rem; list-style: none; overflow-y: auto; height: min(310px, 42dvh); }
.ph-chat-rail .gc-feed { flex: 1; height: auto; min-height: 0; }
.ph-side .gc-feed { height: 190px; }
.gc-feed-line { display: grid; grid-template-columns: 36px minmax(0, 1fr); gap: .65rem; align-items: center; padding: .5rem .45rem; border-radius: var(--r-1, 4px); }
.gc-feed-line:hover { background: rgba(255, 255, 255, .035); }
.gc-feed-avatar .ph-avatar { width: 36px; height: 36px; border-radius: var(--r-1, 4px); }
.gc-feed-body { min-width: 0; }
.gc-feed-head { display: flex; align-items: baseline; justify-content: space-between; gap: .4rem; }
.gc-feed-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--bone, #e6dfcb); font-weight: 700; font-size: .9rem; }
.gc-feed-head time { flex: none; font-size: .66rem; color: var(--lichen, #97a188); opacity: .75; font-variant-numeric: tabular-nums; }
.gc-feed-text { margin: .1rem 0 0; color: var(--lichen, #97a188); font-size: .8rem; line-height: 1.35; overflow-wrap: anywhere; }
.gc-feed-prize { color: var(--rar, var(--bone, #e6dfcb)); font-weight: 700; }
.gc-feed-prize.rar-common { color: var(--rar-common); }
.gc-feed-prize.rar-uncommon { color: var(--rar-uncommon); }
.gc-feed-prize.rar-rare { color: var(--rar-rare); }
.gc-feed-prize.rar-unique { color: var(--rar-unique); }
.gc-feed-prize.rar-legendary { color: var(--rar-legendary); }
.gc-feed-gold { color: var(--gold, #e0b84a); }
.gc-feed-line.rar-legendary, .gc-feed-line.rar-divine { background: color-mix(in srgb, var(--rar-legendary) 9%, transparent); }
.gc-feed-empty { padding: 1.2rem .8rem; color: var(--lichen, #97a188); font-size: .85rem; text-align: center; }

/* day dividers in chat and the feed: a hairline with the day in the middle */
.gc-day { display: flex; align-items: center; gap: .6rem; margin: .55rem .3rem .25rem; list-style: none; color: var(--lichen, #97a188); font: 700 .66rem/1 var(--display, Barlow), system-ui, sans-serif; letter-spacing: .12em; text-transform: uppercase; }
.gc-day::before, .gc-day::after { content: ""; flex: 1; height: 1px; background: var(--fern-line, #2b3427); }
.gc-day > span { flex: none; opacity: .85; }
.gc-feed .gc-day:first-child, .gc-body .gc-day:first-child { margin-top: .2rem; }

/* the profile's activity log: a divider per day, like chat */
.pp-day { display: flex; align-items: center; gap: .6rem; margin: .7rem .2rem .2rem; list-style: none; color: var(--lichen); font: 700 .66rem/1 var(--display, Barlow), system-ui, sans-serif; letter-spacing: .12em; text-transform: uppercase; }
.pp-day::before, .pp-day::after { content: ""; flex: 1; height: 1px; background: var(--fern-line); }
.pp-list > .pp-day:first-child { margin-top: 0; }

/* ---- the Anarchy Isle mark in place of any dinosaur picture (hub.markArt / hub.dinoPic).
   A square tile with the mark; with a skin's rarity, a border and a glow in that colour, stronger the rarer. */
.ai-mark { --rc: var(--blood-hi, #cf3a2f); --mark-size: 96px; position: relative; z-index: 1; display: grid; place-items: center; width: var(--mark-size); aspect-ratio: 1; flex: none;
  border: 1px solid color-mix(in srgb, var(--line, #2b3427) 80%, transparent); background: radial-gradient(70% 70% at 50% 40%, color-mix(in srgb, var(--rc) 14%, transparent), transparent 75%), var(--glass-well, #0d110d);
  color: var(--rc); }
.ai-mark svg { width: 58%; height: 58%; filter: drop-shadow(0 0 8px color-mix(in srgb, var(--rc) 40%, transparent)); }
.ai-mark.rar-common { --rc: var(--rar-common); } .ai-mark.rar-uncommon { --rc: var(--rar-uncommon); } .ai-mark.rar-rare { --rc: var(--rar-rare); }
.ai-mark.rar-unique { --rc: var(--rar-unique); } .ai-mark.rar-legendary { --rc: var(--rar-legendary); } .ai-mark.rar-divine { --rc: var(--rar-divine); }
.ai-mark.is-rar { border-color: color-mix(in srgb, var(--rc) 70%, transparent); }
.ai-mark.rar-uncommon { box-shadow: 0 0 14px -6px var(--rc); }
.ai-mark.rar-rare { border-width: 2px; box-shadow: 0 0 20px -6px var(--rc), inset 0 0 12px -8px var(--rc); }
.ai-mark.rar-unique { border-width: 2px; box-shadow: 0 0 26px -4px var(--rc), inset 0 0 16px -8px var(--rc); }
.ai-mark.rar-unique svg { filter: drop-shadow(0 0 12px color-mix(in srgb, var(--rc) 70%, transparent)); }
.ai-mark.rar-legendary { border-width: 2px; box-shadow: 0 0 34px -2px var(--rc), inset 0 0 20px -8px var(--rc); animation: ai-mark-pulse 3.2s ease-in-out infinite; }
.ai-mark.rar-legendary svg { filter: drop-shadow(0 0 16px color-mix(in srgb, var(--rc) 85%, transparent)); }
.ai-mark.rar-divine { border-width: 2px; border-color: rgba(255, 244, 214, .8); animation: divine-halo 4s ease-in-out infinite alternate; }
.ai-mark.rar-divine svg { color: #fff4d6; filter: drop-shadow(0 0 14px rgba(143, 243, 255, .7)); }
@keyframes ai-mark-pulse { 0%, 100% { box-shadow: 0 0 28px -4px var(--rc), inset 0 0 18px -8px var(--rc); } 50% { box-shadow: 0 0 42px 0 var(--rc), inset 0 0 24px -6px var(--rc); } }
@media (prefers-reduced-motion: reduce) { .ai-mark.rar-legendary, .ai-mark.rar-divine { animation: none; } }
/* where it stands in for a missing drawing: shop species cards, garage cards, the dinosaur window */
.sd-art .ai-mark { --mark-size: 92px; }
.sd-art:has(.ai-mark) .sd-ground { display: none; }
.page-inv .ph-main .g-stage .ai-mark { --mark-size: 104px; }
.page-inv .ph-main .g-stage:has(.ai-mark)::after { display: none; }
.dd-preview:has(> .ai-mark) { display: grid; place-items: center; }
.dd-preview .ai-mark { --mark-size: 132px; }
@media (max-width: 640px) { .dd-preview .ai-mark { --mark-size: 104px; } }

/* ---- phones: no global chat (chat-widget.js stops polling below 901px too) */
@media (max-width: 900px) {
  .ph-app > .ph-chat-rail, .ph-app .ph-content-layout > .ph-chat-rail { display: none; }
}
