@layer reset, base, layout, components, responsive;

@layer reset {
  body, h1, h2, h3, p { margin: 0; }
  button, input { font: inherit; }
  button { color: inherit; }
  img { display: block; max-width: 100%; }
}

@layer base {
  :root {
    color-scheme: dark;
    --night: #080a15;
    --night-soft: #0d1020;
    --panel: #111426;
    --panel-raised: #171b31;
    --panel-light: #1d213a;
    --line: #292d48;
    --line-bright: #414769;
    --text: #f0f0ff;
    --muted: #a1a5bf;
    --quiet: #747b9a;
    --violet: #ab91ff;
    --cyan: #7ee8e6;
    --gold: #f4d38a;
    --green: #78e7b8;
    --font: Inter, "Noto Sans Thai", "Segoe UI", system-ui, sans-serif;
    font-family: var(--font);
    font-synthesis: none;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
  }

  html { color-scheme: dark; scroll-behavior: smooth; }
  body {
    min-width: 320px;
    min-height: 100dvh;
    color: var(--text);
    background:
      radial-gradient(ellipse at 16% 18%, rgb(39 124 178 / 17%), transparent 33rem),
      radial-gradient(ellipse at 78% 8%, rgb(121 76 205 / 24%), transparent 39rem),
      radial-gradient(ellipse at 53% 48%, rgb(45 78 157 / 14%), transparent 38rem),
      radial-gradient(ellipse at 92% 73%, rgb(173 70 153 / 14%), transparent 34rem),
      radial-gradient(ellipse at 26% 96%, rgb(46 153 166 / 12%), transparent 31rem),
      radial-gradient(ellipse at 67% 108%, rgb(105 77 145 / 10%), transparent 30rem),
      var(--night);
    background-attachment: fixed;
    font-size: 14px;
    line-height: 1.5;
  }
  body::before {
    position: fixed;
    z-index: -1;
    inset: -10%;
    pointer-events: none;
    background:
      radial-gradient(1.5px 1.5px at 8% 18%, rgb(193 177 255 / 48%) 0 55%, transparent 100%),
      radial-gradient(1px 1px at 23% 72%, rgb(126 232 230 / 38%) 0 55%, transparent 100%),
      radial-gradient(2px 2px at 46% 31%, rgb(193 177 255 / 34%) 0 45%, transparent 100%),
      radial-gradient(1px 1px at 72% 64%, rgb(126 232 230 / 36%) 0 55%, transparent 100%),
      radial-gradient(1.5px 1.5px at 91% 23%, rgb(244 211 138 / 35%) 0 50%, transparent 100%);
    opacity: .55;
    animation: archive-drift 28s ease-in-out infinite alternate;
    content: "";
  }
  @keyframes archive-drift { to { transform: translate3d(1.2%, -1%, 0); opacity: .9; } }
  body::after {
    position: fixed;
    z-index: -1;
    inset: -8%;
    pointer-events: none;
    background-image:
      radial-gradient(2px 2px at 14% 29%, rgb(126 232 230 / 75%) 0 45%, transparent 100%),
      radial-gradient(2px 2px at 32% 82%, rgb(193 177 255 / 82%) 0 45%, transparent 100%),
      radial-gradient(1.5px 1.5px at 59% 13%, rgb(244 211 138 / 76%) 0 45%, transparent 100%),
      radial-gradient(2px 2px at 83% 47%, rgb(193 177 255 / 72%) 0 45%, transparent 100%),
      radial-gradient(1.5px 1.5px at 94% 88%, rgb(126 232 230 / 72%) 0 45%, transparent 100%);
    opacity: .25;
    animation: particle-float 19s ease-in-out infinite alternate;
    content: "";
  }
  @keyframes particle-float {
    0% { transform: translate3d(-.5%, .4%, 0); opacity: .18; }
    50% { opacity: .42; }
    100% { transform: translate3d(.8%, -1%, 0); opacity: .28; }
  }

  a { color: inherit; text-decoration: none; }
  button { border: 0; }
  button:focus-visible, input:focus-visible, a:focus-visible, summary:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; }
  ::selection { color: #101021; background: var(--cyan); }
}

@layer layout {
  .symbols { position: absolute; width: 0; height: 0; overflow: hidden; }
  .icon { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex: 0 0 auto; }
  .site-header { position: relative; display: flex; min-height: 75px; align-items: center; justify-content: space-between; gap: 20px; padding: 11px clamp(18px, 4vw, 62px); border-bottom: 1px solid rgb(175 178 220 / 11%); background: rgb(8 10 21 / 76%); }
  .site-header::after { position: absolute; inset-inline: 0; inset-block-end: -1px; height: 1px; background: linear-gradient(90deg, transparent, rgb(172 145 255 / 44%), transparent); content: ""; }
  .main-shell { position: relative; isolation: isolate; width: min(100%, 1500px); min-height: calc(100dvh - 75px); margin-inline: auto; padding: 0 clamp(18px, 4vw, 62px); }
  .main-shell::before { position: absolute; z-index: -1; inset: 0; pointer-events: none; background-image:
      radial-gradient(2px 2px at 8% 18%, rgb(203 187 255 / 75%) 0 55%, transparent 100%),
      radial-gradient(1.5px 1.5px at 21% 61%, rgb(126 232 230 / 68%) 0 55%, transparent 100%),
      radial-gradient(2px 2px at 36% 34%, rgb(203 187 255 / 52%) 0 55%, transparent 100%),
      radial-gradient(1.5px 1.5px at 55% 79%, rgb(244 211 138 / 56%) 0 55%, transparent 100%),
      radial-gradient(2px 2px at 73% 25%, rgb(126 232 230 / 60%) 0 55%, transparent 100%),
      radial-gradient(1.5px 1.5px at 89% 56%, rgb(203 187 255 / 64%) 0 55%, transparent 100%);
    background-size: 100% 520px; background-repeat: repeat-y; opacity: .3; animation: directory-sparkle-drift 32s ease-in-out infinite alternate; content: ""; }
  @keyframes directory-sparkle-drift { to { transform: translate3d(0, -14px, 0); opacity: .62; } }
  .directory-view, .profile-view { padding-block: 39px 26px; }
  .profile-layout { display: grid; grid-template-columns: minmax(238px, 286px) minmax(0, 1fr); align-items: start; gap: clamp(17px, 2vw, 27px); }
  .account-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 325px), 1fr)); gap: 18px; }
  .profile-main { min-width: 0; }
  .resource-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 11px; }
  .overview-lower { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(250px, .9fr); gap: 13px; margin-top: 14px; }
}

@layer components {
  .skip-link { position: fixed; inset-block-start: 8px; inset-inline-start: 8px; z-index: 20; padding: 10px 12px; transform: translateY(-160%); border: 1px solid var(--line-bright); border-radius: 8px; background: var(--panel); color: white; }
  .skip-link:focus { transform: translateY(0); }
  .brand { display: inline-flex; align-items: center; gap: 12px; min-width: 0; }
  .brand-seal { position: relative; display: grid; width: 42px; aspect-ratio: 1; place-items: center; border: 1px solid rgb(174 150 255 / 67%); border-radius: 14px 14px 14px 4px; background: linear-gradient(145deg, #6551a0, #222746 75%); box-shadow: 0 0 23px rgb(135 111 222 / 27%), inset 0 1px rgb(255 255 255 / 17%); color: #f3edff; font-size: 13px; font-weight: 900; letter-spacing: -.1em; transform: rotate(-4deg); }
  .brand-seal-image { overflow: visible; border: 0; background: transparent; box-shadow: none; transform: none; }
  .brand-seal-image > img { display: block; width: 100%; height: 100%; box-sizing: border-box; border: 1px solid rgb(174 150 255 / 67%); border-radius: 12px 12px 12px 4px; object-fit: cover; box-shadow: 0 0 23px rgb(135 111 222 / 27%); }
  .brand-seal i { position: absolute; inset: -5px; border: 1px solid rgb(125 204 222 / 22%); border-radius: 17px 17px 17px 6px; }
  .brand-name { display: grid; gap: 1px; }
  .brand-name strong { font-size: 11px; font-weight: 800; letter-spacing: .11em; white-space: nowrap; }
  .brand-name small { color: #858ba8; font-size: 11px; font-weight: 800; letter-spacing: .23em; }
  .header-mark { display: flex; align-items: center; gap: 10px; color: #69708d; font-size: 11px; font-weight: 800; letter-spacing: .22em; }
  .header-mark-line { width: clamp(20px, 4vw, 64px); height: 1px; background: linear-gradient(90deg, transparent, #484360); }
  .header-mark-line:last-child { transform: rotate(180deg); }
  .header-right { display: flex; min-width: 120px; align-items: center; justify-content: flex-end; gap: 8px; color: #8d96aa; font-size: 11px; font-weight: 800; letter-spacing: .15em; }
  .online-led { width: 6px; height: 6px; border-radius: 50%; background: var(--green); box-shadow: 0 0 10px rgb(120 231 184 / 75%); }
  .main-shell > .site-footer { display: flex; justify-content: space-between; gap: 12px; padding: 17px 0 20px; border-top: 1px solid rgb(175 178 220 / 9%); color: #5e6681; font-size: 11px; font-weight: 700; letter-spacing: .1em; }
  .main-shell > .site-footer span:last-child { color: #737a95; font-weight: 500; letter-spacing: 0; }

  .directory-intro { display: flex; align-items: end; justify-content: space-between; gap: 22px; margin-bottom: 25px; }
  .kicker, .panel-eyebrow, .mini-label { color: #85829f; font-size: 11px; font-weight: 850; letter-spacing: .2em; }
  .kicker { display: flex; align-items: center; gap: 8px; }
  .kicker-star { color: var(--gold); font-size: 13px; text-shadow: 0 0 12px rgb(244 211 138 / 45%); }
  .intro-copy h1 { margin-top: 8px; font-size: clamp(27px, 1.5rem + 1.35vw, 41px); font-weight: 780; letter-spacing: -.055em; line-height: 1.17; }
  .intro-copy h1 em { color: #c7b5ff; font-style: normal; text-shadow: 0 0 23px rgb(169 142 255 / 28%); }
  .intro-description { margin-top: 8px; color: #9297b0; font-size: 11px; }
  .intro-actions { display: flex; align-items: center; gap: 9px; }
  .search-box { display: flex; min-width: min(260px, 29vw); min-height: 39px; align-items: center; gap: 8px; padding: 0 10px; border: 1px solid #292d46; border-radius: 10px; background: rgb(15 18 34 / 86%); color: #8d94af; }
  .search-box .icon { width: 15px; height: 15px; color: #858ca6; }
  .search-box input { width: 100%; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--text); font-size: 11px; }
  .search-box input::placeholder { color: #69708a; }
  .search-box kbd { padding: 1px 5px; border: 1px solid #343954; border-radius: 4px; color: #777f9a; font-size: 11px; }
  .add-id-button, .dialog-action { display: inline-flex; min-height: 39px; align-items: center; justify-content: center; gap: 7px; padding: 0 12px; border: 1px solid rgb(166 142 255 / 40%); border-radius: 10px; background: linear-gradient(125deg, rgb(124 93 210 / 25%), rgb(84 110 164 / 15%)); color: #e9e2ff; font-size: 11px; font-weight: 750; cursor: pointer; transition: border-color 150ms ease, transform 150ms ease, background-color 150ms ease; }
  .add-id-button:hover, .dialog-action:hover { transform: translateY(-1px); border-color: rgb(175 153 255 / 75%); }
  .add-id-button .icon { width: 14px; height: 14px; }
  .directory-meta { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; color: #69708c; font-size: 11px; font-weight: 750; letter-spacing: .16em; }
  .directory-meta strong { color: #c6bcf5; font-size: 11px; }
  .meta-divider { width: 1px; height: 12px; background: #353650; }
  .account-card { position: relative; min-width: 0; overflow: hidden; padding: 15px; border: 1px solid #343750; border-radius: 16px; background: linear-gradient(135deg, rgb(33 34 61 / 96%), rgb(18 21 37 / 97%) 70%); box-shadow: 0 15px 34px rgb(0 0 0 / 20%), inset 0 1px rgb(255 255 255 / 4%); container-type: inline-size; transition: border-color 160ms ease, transform 160ms ease, box-shadow 160ms ease; }
  .account-loading-card { min-height: 246px; }
  .account-open-skeleton { position: relative; z-index: 1; display: grid; grid-template-columns: 77px minmax(0, 1fr); align-items: center; gap: 14px; padding: 17px 0 16px; }
  .skeleton-line, .skeleton-avatar, .skeleton-stat { display: block; overflow: hidden; border-radius: 7px; background: linear-gradient(100deg, rgb(255 255 255 / 5%) 20%, rgb(224 218 255 / 16%) 45%, rgb(255 255 255 / 5%) 70%); background-size: 220% 100%; animation: account-sheen 1.6s ease-in-out infinite; }
  .skeleton-index { width: 60px; height: 8px; }
  .skeleton-status { width: 68px; height: 8px; }
  .skeleton-avatar { position: relative; width: 77px; height: 77px; border: 1px solid rgb(190 161 255 / 30%); border-radius: 17px 17px 17px 5px; background-color: #292844; }
  .skeleton-avatar::before, .skeleton-avatar::after { position: absolute; left: 50%; display: block; transform: translateX(-50%); border-radius: 99px; background: rgb(242 237 255 / 18%); content: ""; }
  .skeleton-avatar::before { top: 16px; width: 22px; height: 22px; }
  .skeleton-avatar::after { bottom: 9px; width: 44px; height: 25px; border-radius: 22px 22px 10px 10px; }
  .account-loading-card .account-main-copy { gap: 9px; }
  .skeleton-label { width: 86px; height: 7px; }
  .skeleton-name { width: min(72%, 156px); height: 20px; }
  .skeleton-level { width: 106px; height: 20px; }
  .account-loading-card .account-card-stats { min-height: 34px; }
  .account-loading-card .account-card-stats > .skeleton-stat { display: block; width: 84%; height: 12px; }
  .loading-caption { position: absolute; inset-inline-end: 16px; inset-block-end: 14px; display: inline-flex; align-items: center; gap: 7px; color: #c8c3df; font-size: 11px; }
  .loading-spark { width: 6px; height: 6px; border-radius: 50%; background: #e5ddff; box-shadow: 0 0 12px #c0a9ff; animation: loading-pulse 1.2s ease-in-out infinite; }
  @keyframes account-sheen { to { background-position: -220% 0; } }
  @keyframes loading-pulse { 50% { opacity: .38; transform: scale(.72); } }
  .account-card:hover, .account-card:focus-within { transform: translateY(-2px); border-color: #66608a; box-shadow: 0 18px 36px rgb(0 0 0 / 28%), 0 0 22px rgb(146 123 219 / 11%); }
  .account-card::before { position: absolute; inset-inline-end: -35px; inset-block-start: -60px; width: 185px; aspect-ratio: 1; border: 1px solid rgb(157 139 213 / 11%); border-radius: 50%; box-shadow: 0 0 0 14px rgb(157 139 213 / 3%), 0 0 0 31px rgb(157 139 213 / 2%); content: ""; pointer-events: none; }
  .card-corner { position: absolute; width: 13px; height: 13px; border-color: rgb(206 184 255 / 64%); pointer-events: none; }
  .corner-a { inset-block-start: 8px; inset-inline-start: 8px; border-block-start: 1px solid; border-inline-start: 1px solid; }
  .corner-b { inset-block-end: 8px; inset-inline-end: 8px; border-block-end: 1px solid; border-inline-end: 1px solid; }
  .account-card-top { position: relative; z-index: 1; display: flex; justify-content: space-between; gap: 10px; color: #767d9d; font-size: 11px; font-weight: 850; letter-spacing: .18em; }
  .connected-tag { display: inline-flex; align-items: center; gap: 6px; color: #8de1ba; font-size: 11px; letter-spacing: .1em; white-space: nowrap; }
  .connected-tag i { width: 6px; height: 6px; flex: 0 0 auto; border-radius: 50%; background: var(--green); box-shadow: 0 0 8px var(--green); }
  .connected-tag.is-offline { color: #ff8b9d; }
  .connected-tag.is-offline i { background: #ff5c78; box-shadow: 0 0 8px #ff5c78; }
  .account-open { position: relative; z-index: 2; display: grid; width: 100%; grid-template-columns: 77px minmax(0, 1fr) 30px; align-items: center; gap: 14px; padding: 17px 0 16px; background: transparent; cursor: pointer; text-align: left; }
  .avatar-frame { position: relative; display: grid; overflow: hidden; place-items: center; border: 1px solid rgb(190 161 255 / 66%); border-radius: 17px 17px 17px 5px; background: radial-gradient(circle at 50% 35%, rgb(190 159 255 / 35%), transparent 57%), linear-gradient(145deg, #383c68, #171a31); box-shadow: 0 0 23px rgb(145 117 221 / 26%), inset 0 0 0 4px rgb(10 12 24 / 50%); aspect-ratio: 1; }
  .avatar-frame::after { position: absolute; inset: 4px; border: 1px solid rgb(202 180 255 / 25%); border-radius: 13px 13px 13px 3px; content: ""; pointer-events: none; }
  .avatar-frame img { position: absolute; inset: 5px; width: calc(100% - 10px); height: calc(100% - 10px); object-fit: cover; border-radius: 12px 12px 12px 3px; opacity: 0; transition: opacity 180ms ease; }
  .avatar-frame.has-image img { opacity: 1; }
  .avatar-fallback { color: #e1d7ff; font-size: 29px; font-weight: 850; text-shadow: 0 0 17px rgb(199 181 255 / 50%); }
  .avatar-sigil { position: absolute; inset-inline-end: 5px; inset-block-end: 4px; z-index: 2; color: var(--gold); font-size: 12px; text-shadow: 0 0 10px rgb(244 211 138 / 60%); }
  .account-main-copy { display: grid; justify-items: start; min-width: 0; }
  .account-label { color: #888aa8; font-size: 11px; font-weight: 800; letter-spacing: .17em; }
  .account-username { overflow: hidden; max-width: 100%; margin-top: 3px; color: #f0efff; font-size: clamp(18px, 1rem + .6vw, 23px); font-weight: 800; letter-spacing: -.045em; text-overflow: ellipsis; }
  .account-level { margin-top: 5px; padding: 3px 7px; border: 1px solid rgb(174 145 255 / 25%); border-radius: 6px; background: rgb(134 106 202 / 12%); color: #9ca2c1; font-size: 11px; font-weight: 750; letter-spacing: .1em; }
  .account-level b { margin-inline-start: 4px; color: #e1d5ff; font-size: 11px; }
  .open-arrow { display: grid; width: 28px; height: 28px; place-items: center; border: 1px solid rgb(186 190 220 / 12%); border-radius: 50%; color: #bcb1e7; transition: transform 160ms ease, background-color 160ms ease; }
  .open-arrow .icon { width: 13px; height: 13px; }
  .account-open:hover .open-arrow { transform: translateX(2px); background: rgb(168 141 243 / 13%); }
  .card-divider { height: 1px; background: linear-gradient(90deg, transparent, rgb(158 152 201 / 21%), transparent); }
  .account-card-stats { position: relative; z-index: 1; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: center; gap: 8px; padding: 12px 4px 10px; }
  .account-card-stats > span { display: grid; grid-template-columns: 16px auto; align-items: center; column-gap: 5px; min-width: 0; }
  .account-card-stats b { overflow: hidden; color: #e6e4f6; font-size: 11px; font-variant-numeric: tabular-nums; text-overflow: ellipsis; white-space: nowrap; }
  .account-card-stats small { grid-column: 2; color: #747b99; font-size: 11px; font-weight: 800; letter-spacing: .12em; }
  .account-card-stats .icon { width: 14px; height: 14px; }
  .gem-mini { color: #c6acff; }
  .coin-mini { color: #f0ce83; }
  .card-activity-panel { position: relative; z-index: 1; display: grid; min-width: 0; grid-template-columns: 32px minmax(0, 1fr) auto; align-items: center; gap: 10px; margin-top: 1px; padding: 8px 10px; border: 1px solid rgb(154 144 203 / 18%); border-radius: 11px; background: linear-gradient(100deg, rgb(34 36 62 / 76%), rgb(20 23 42 / 68%)); }
  .card-activity-icon { display: grid; width: 32px; height: 32px; place-items: center; border: 1px solid rgb(171 150 236 / 25%); border-radius: 9px 9px 9px 3px; background: rgb(133 112 196 / 12%); color: #c8b8ff; }
  .card-activity-icon .icon { width: 15px; height: 15px; }
  .card-activity-copy { display: grid; min-width: 0; gap: 2px; line-height: 1.25; }
  .card-activity-kicker { color: #777e9d; font-size: 11px; font-weight: 800; letter-spacing: .13em; }
  .card-activity-detail { overflow: hidden; color: #e5e2f5; font-size: 11px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
  .card-activity-state { display: inline-flex; min-height: 24px; align-items: center; gap: 6px; padding: 0 8px; border: 1px solid rgb(120 231 184 / 22%); border-radius: 99px; background: rgb(120 231 184 / 7%); color: #a4ebcc; font-size: 11px; font-weight: 850; letter-spacing: .06em; white-space: nowrap; }
  .card-activity-state i { width: 6px; height: 6px; flex: 0 0 auto; border-radius: 50%; background: currentColor; box-shadow: 0 0 8px currentColor; }
  .card-activity-panel[data-state="lobby"] .card-activity-icon { border-color: rgb(244 211 138 / 26%); background: rgb(244 211 138 / 8%); color: #f0d692; }
  .card-activity-panel[data-state="lobby"] .card-activity-state { border-color: rgb(244 211 138 / 24%); background: rgb(244 211 138 / 7%); color: #f0d692; }
  .card-activity-panel[data-state="results"] .card-activity-icon { border-color: rgb(126 232 230 / 25%); background: rgb(126 232 230 / 8%); color: #88e1df; }
  .card-activity-panel[data-state="results"] .card-activity-state { border-color: rgb(126 232 230 / 22%); background: rgb(126 232 230 / 7%); color: #88e1df; }
  .card-activity-panel[data-state="unknown"] .card-activity-state { border-color: #454961; background: #22253a; color: #a1a5bf; }
  .card-activity-panel.is-stale .card-activity-state { border-color: rgb(255 92 120 / 24%); background: rgb(255 92 120 / 7%); color: #ff9aaa; }
  @container (max-width: 360px) {
    .card-activity-panel { grid-template-columns: 29px minmax(0, 1fr) auto; gap: 7px; padding: 7px; }
    .card-activity-icon { width: 29px; height: 29px; }
    .card-activity-state { min-height: 22px; gap: 4px; padding-inline: 6px; font-size: 11px; letter-spacing: .02em; }
  }
  .card-hitarea { position: absolute; inset: 0; z-index: 1; border-radius: inherit; background: transparent; cursor: pointer; }
  .account-open { pointer-events: none; }
  .account-open .open-arrow { visibility: hidden; }
  .account-card:focus-within .card-hitarea, .account-card:hover .card-hitarea { display: block; }
  .add-card { display: grid; min-height: 191px; align-content: center; justify-items: center; gap: 7px; padding: 18px; border: 1px dashed #47435f; border-radius: 16px; background: rgb(16 18 33 / 42%); color: #d7d1ed; cursor: pointer; transition: border-color 160ms ease, background-color 160ms ease, transform 160ms ease; }
  .add-card:hover { transform: translateY(-2px); border-color: #8d7bc1; background: rgb(48 41 75 / 21%); }
  .add-card-sigil { display: grid; width: 36px; height: 36px; margin-bottom: 3px; place-items: center; border: 1px solid rgb(170 147 232 / 34%); border-radius: 50%; color: #c3b3f5; }
  .add-card-sigil .icon { width: 15px; height: 15px; }
  .add-card strong { font-size: 11px; }
  .add-card > span:nth-of-type(2) { color: #838aa6; font-size: 11px; }
  .add-card small { margin-top: 4px; color: #7b719d; font-size: 11px; font-weight: 850; letter-spacing: .18em; }
  .directory-footnote { display: flex; align-items: center; gap: 7px; margin-top: 26px; color: #777d98; font-size: 11px; }
  .footnote-star { color: #d8be7e; }

  .back-link { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 16px; padding: 6px 0; background: transparent; color: #999fbb; font-size: 11px; cursor: pointer; }
  .back-link .icon { width: 14px; height: 14px; color: #b3a4df; }
  .back-link:hover { color: white; }
  .identity-panel { position: relative; overflow: hidden; border: 1px solid #363852; border-radius: 18px; background: linear-gradient(180deg, #1b1d38 0, #15172c 42%, #111426 100%); box-shadow: 0 18px 50px rgb(0 0 0 / 24%), inset 0 1px rgb(255 255 255 / 4%); }
  .identity-art { position: relative; height: 158px; overflow: hidden; border-bottom: 1px solid rgb(179 161 237 / 17%); background: radial-gradient(ellipse at 50% 106%, rgb(125 180 202 / 17%), transparent 44%), linear-gradient(164deg, #30254d, #202442 59%, #161b31); }
  .identity-art::before, .identity-art::after { position: absolute; inset: 20px; border: 1px solid rgb(202 184 255 / 15%); border-radius: 50%; transform: rotate(-23deg) scaleX(1.28); content: ""; }
  .identity-art::after { inset: 34px -24px; border-color: rgb(130 201 216 / 13%); transform: rotate(24deg) scaleX(1.24); }
  .art-moon { position: absolute; inset-block-start: 29px; inset-inline-start: calc(50% - 34px); width: 68px; aspect-ratio: 1; border: 1px solid rgb(240 218 173 / 44%); border-radius: 50%; background: radial-gradient(circle at 42% 38%, rgb(248 224 177 / 20%), rgb(184 153 226 / 7%) 54%, transparent 56%); box-shadow: 0 0 40px rgb(189 160 238 / 14%), inset 0 0 20px rgb(223 191 241 / 12%); }
  .art-orbit { position: absolute; inset-block-start: 54px; inset-inline-start: calc(50% - 74px); width: 148px; height: 49px; border: 1px solid rgb(145 226 223 / 37%); border-radius: 50%; transform: rotate(-18deg); box-shadow: 0 0 16px rgb(105 218 216 / 10%); }
  .orbit-two { inset-block-start: 63px; inset-inline-start: calc(50% - 81px); width: 162px; height: 39px; border-color: rgb(211 166 252 / 27%); transform: rotate(19deg); }
  .art-spark { position: absolute; z-index: 1; color: var(--gold); text-shadow: 0 0 11px rgb(244 211 138 / 75%); }
  .spark-one { inset-block-start: 31px; inset-inline-start: 20%; font-size: 12px; }
  .spark-two { inset-block-start: 95px; inset-inline-end: 17%; color: #b8a5ff; font-size: 17px; }
  .art-glyph { position: absolute; inset-inline: 0; inset-block-end: 14px; color: rgb(206 203 231 / 53%); font-size: 11px; font-weight: 800; letter-spacing: .36em; text-align: center; }
  .identity-body { position: relative; padding: 0 19px 17px; text-align: center; }
  .profile-avatar { width: 103px; margin: -52px auto 12px; border-radius: 25px 25px 25px 7px; }
  .profile-avatar::after { inset: 6px; border-radius: 20px 20px 20px 5px; }
  .profile-avatar img { inset: 7px; width: calc(100% - 14px); height: calc(100% - 14px); border-radius: 18px 18px 18px 5px; }
  .profile-avatar .avatar-fallback { font-size: 40px; }
  .profile-avatar .avatar-sigil { inset-inline-end: 9px; inset-block-end: 8px; font-size: 15px; }
  .identity-kicker { color: #8a88a7; font-size: 11px; font-weight: 850; letter-spacing: .21em; }
  .identity-body h1 { overflow: hidden; margin-top: 3px; color: #f2eeff; font-size: 22px; font-weight: 820; letter-spacing: -.05em; text-overflow: ellipsis; }
  .identity-userid { margin-top: 2px; color: #7c829e; font-size: 11px; font-weight: 750; letter-spacing: .14em; }
  .identity-userid span { color: #a7abc0; letter-spacing: .05em; }
  .identity-level { display: grid; grid-template-columns: 1fr auto; align-items: center; margin-top: 21px; padding: 11px 12px 8px; border: 1px solid rgb(175 162 229 / 15%); border-bottom: 0; border-radius: 11px 11px 0 0; background: rgb(7 9 21 / 30%); text-align: left; }
  .identity-level-label { grid-column: 1; color: #8588a7; font-size: 11px; font-weight: 850; letter-spacing: .15em; }
  .identity-level strong { grid-column: 2; grid-row: 1 / 3; color: #e1d6ff; font-size: 24px; font-weight: 850; line-height: 1; }
  .identity-level-xp { grid-column: 1; margin-top: 3px; color: #a6abc0; font-size: 11px; font-variant-numeric: tabular-nums; }
  .identity-xp-track { height: 5px; margin: 0 12px; overflow: hidden; border: 1px solid rgb(174 162 227 / 12%); border-top: 0; border-radius: 0 0 99px 99px; background: #0b0d1d; }
  .identity-xp-track span { display: block; width: 41.5%; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #69e0df, #b693ff); box-shadow: 0 0 10px rgb(138 194 231 / 55%); }
  .identity-bottom { display: flex; align-items: center; justify-content: center; gap: 7px; margin-top: 15px; color: #8d94aa; font-size: 11px; }
  .identity-dot { width: 5px; height: 5px; border-radius: 50%; background: var(--green); box-shadow: 0 0 8px var(--green); }
  .identity-activity { display: grid; grid-template-columns: 30px minmax(0,1fr) auto; align-items: center; gap: 9px; margin-top: 13px; padding: 9px; border: 1px solid rgb(119 227 184 / 22%); border-radius: 11px; background: linear-gradient(110deg,rgb(54 145 118 / 10%),rgb(10 15 28 / 45%)); text-align: left; }
  .identity-activity[data-state="in_match"] { border-color: rgb(114 190 231 / 25%); background: linear-gradient(110deg,rgb(61 113 164 / 14%),rgb(10 15 28 / 45%)); }
  .identity-activity[data-state="results"] { border-color: rgb(183 149 255 / 25%); background: linear-gradient(110deg,rgb(122 91 181 / 14%),rgb(10 15 28 / 45%)); }
  .identity-activity[data-state="unknown"] { border-color: #30344d; }
  .identity-activity.is-stale { border-color: rgb(255 112 134 / 23%); }
  .identity-activity-icon { display: grid; width: 30px; height: 30px; place-items: center; border: 1px solid rgb(169 151 221 / 25%); border-radius: 9px; color: #aeead0; background: rgb(10 13 25 / 52%); }
  .identity-activity[data-state="in_match"] .identity-activity-icon { color: #9bd6f1; }
  .identity-activity[data-state="results"] .identity-activity-icon { color: #c9b4ff; }
  .identity-activity-icon .icon { width: 16px; height: 16px; }
  .identity-activity-copy { display: grid; min-width: 0; gap: 3px; }
  .identity-activity-copy strong { overflow: hidden; color: #e9e7f7; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
  .identity-activity-copy small { overflow: hidden; color: #9299b0; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
  .identity-activity-live { display: inline-flex; align-items: center; gap: 4px; color: #72dfb2; font-size: 11px; font-weight: 850; letter-spacing: .06em; }
  .identity-activity-live i { width: 5px; height: 5px; border-radius: 50%; background: currentColor; box-shadow: 0 0 8px currentColor; }
  .identity-activity-live i { width: 8px; height: 8px; box-shadow: 0 0 12px currentColor; animation: online-pulse 1.8s ease-in-out infinite; }
  .card-status .online-led { width: 8px; height: 8px; box-shadow: 0 0 12px rgb(120 231 184 / 80%); animation: online-pulse 1.8s ease-in-out infinite; }
  @keyframes online-pulse { 50% { opacity: .55; box-shadow: 0 0 4px currentColor; } }
  .identity-activity.is-stale .identity-activity-live { color: #ff8293; }
  .identity-footer { display: flex; align-items: center; justify-content: space-between; padding: 11px 14px; border-top: 1px solid rgb(171 173 216 / 9%); color: #727995; font-size: 11px; font-weight: 800; letter-spacing: .14em; }
  .identity-footer span:first-child { display: grid; width: 20px; height: 20px; place-items: center; border: 1px solid rgb(177 151 246 / 33%); border-radius: 6px; color: #cfc2ff; letter-spacing: -.1em; }

  .profile-main-heading { display: flex; align-items: end; justify-content: space-between; gap: 14px; margin: 0 2px 13px; }
  .profile-main-title { margin-top: 3px; color: #eeeaff; font-size: 20px; font-weight: 780; letter-spacing: -.04em; }
  .public-seal { display: inline-flex; align-items: center; gap: 7px; padding: 5px 8px; border: 1px solid rgb(119 227 184 / 20%); border-radius: 99px; background: rgb(95 206 162 / 7%); color: #90dabb; font-size: 11px; font-weight: 850; letter-spacing: .12em; }
  .public-seal .online-led { width: 5px; height: 5px; }
  .tab-frame { overflow: hidden; border: 1px solid #30344d; border-radius: 16px; background: linear-gradient(145deg, rgb(19 22 39 / 96%), rgb(13 16 30 / 98%)); box-shadow: 0 18px 42px rgb(0 0 0 / 17%), inset 0 1px rgb(255 255 255 / 3%); }
  .profile-tabs { position: relative; display: flex; gap: 3px; overflow-x: auto; padding: 10px 11px 0; border-bottom: 1px solid rgb(171 173 216 / 11%); scrollbar-width: thin; scrollbar-color: #47415d transparent; }
  .profile-tab { position: relative; display: inline-flex; min-height: 43px; flex: 0 0 auto; align-items: center; gap: 7px; padding: 0 12px; border-radius: 9px 9px 0 0; background: transparent; color: #9298b1; font-size: 11px; font-weight: 700; white-space: nowrap; cursor: pointer; transition: color 140ms ease, background-color 140ms ease; }
  .profile-tab:hover { color: #e2deff; background: rgb(134 113 194 / 8%); }
  .profile-tab::after { position: absolute; inset-inline: 11px; inset-block-end: -1px; height: 2px; transform: scaleX(0); border-radius: 9px 9px 0 0; background: linear-gradient(90deg, #72dedb, #b397ff); box-shadow: 0 0 10px rgb(166 145 255 / 65%); content: ""; transition: transform 140ms ease; }
  .profile-tab.is-selected { color: #f0eaff; background: linear-gradient(180deg, rgb(153 128 231 / 13%), transparent); }
  .profile-tab.is-selected::after { transform: scaleX(1); }
  .tab-num { color: #696e89; font-size: 11px; font-variant-numeric: tabular-nums; }
  .profile-tab.is-selected .tab-num { color: #b3a2ea; }
  .tab-content { min-height: 420px; padding: 18px; }
  .tab-panel[hidden] { display: none; }
  .tab-panel { animation: panel-in 180ms ease-out; }
  @keyframes panel-in { from { opacity: .55; transform: translateY(3px); } to { opacity: 1; transform: translateY(0); } }
  .panel-heading { display: flex; align-items: end; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
  .panel-eyebrow { color: #8386a2; font-size: 11px; }
  .panel-heading h2 { margin-top: 3px; color: #eeeaff; font-size: 16px; font-weight: 750; letter-spacing: -.03em; }
  .sync-note { display: flex; align-items: center; gap: 6px; color: #7d849f; font-size: 11px; white-space: nowrap; }
  .sync-note i { width: 5px; height: 5px; border-radius: 50%; background: #75dec0; box-shadow: 0 0 8px #75dec0; }
  .resource-card { position: relative; display: grid; min-width: 0; min-height: 134px; align-content: start; overflow: hidden; padding: 12px; border: 1px solid #2d314a; border-radius: 12px; background: linear-gradient(145deg, #181b30, #111426); container-type: inline-size; }
  .resource-card::after { position: absolute; inset-inline: 12px; inset-block-end: 0; height: 1px; background: linear-gradient(90deg, transparent, var(--accent), transparent); opacity: .6; content: ""; }
  .resource-gems { --accent: #b59bff; }
  .resource-gold { --accent: #f0cd84; }
  .resource-event { --accent: #7addd8; }
  .resource-trophy { --accent: #a6b0fc; }
  .resource-icon { display: grid; width: 38px; height: 38px; place-items: center; overflow: hidden; border: 1px solid color-mix(in srgb, var(--accent) 29%, transparent); border-radius: 9px; background: #13182b; color: var(--accent); }
  .resource-icon .icon { width: 14px; height: 14px; }
  .game-image-icon { position: relative; }
  .game-image-icon[data-fallback]:not(.has-image)::after { position: absolute; inset: 0; display: grid; place-items: center; content: attr(data-fallback); font-size: 18px; }
  .game-image-icon[data-fallback] img { visibility: hidden; }
  .game-image-icon[data-fallback].has-image img { visibility: visible; }
  .resource-label { margin-top: 12px; color: #7c829d; font-size: 11px; font-weight: 850; letter-spacing: .16em; }
  .resource-card strong { overflow: hidden; margin-top: 1px; color: #f0efff; font-size: clamp(17px, 1rem + .2vw, 22px); font-weight: 840; font-variant-numeric: tabular-nums; letter-spacing: -.04em; text-overflow: ellipsis; white-space: nowrap; }
  .resource-card small { margin-top: 1px; color: #8389a3; font-size: 11px; }
  .latest-clear-card, .pass-summary-card { position: relative; min-width: 0; overflow: hidden; padding: 13px; border: 1px solid #2d3149; border-radius: 12px; background: linear-gradient(140deg, #181b30, #101426); }
  .latest-clear-card { background: radial-gradient(ellipse at 88% 0%, rgb(69 160 153 / 11%), transparent 12rem), linear-gradient(140deg, #181b30, #101426); }
  .latest-clear-top, .pass-summary-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
  .mini-label { color: #8187a3; font-size: 11px; }
  .clear-state { display: inline-flex; align-items: center; gap: 4px; padding: 4px 6px; border: 1px solid rgb(120 231 184 / 22%); border-radius: 99px; background: rgb(85 180 145 / 8%); color: #8ee3ba; font-size: 11px; font-weight: 850; letter-spacing: .1em; white-space: nowrap; }
  .clear-state .icon { width: 10px; height: 10px; stroke-width: 2.4; }
  .stage-art { position: relative; display: grid; min-height: 90px; margin-top: 10px; place-items: center; overflow: hidden; border: 1px solid rgb(143 195 213 / 14%); border-radius: 9px; background: radial-gradient(ellipse at 50% 115%, rgb(87 197 201 / 25%), transparent 42%), linear-gradient(155deg, #2a3152, #161b32 62%, #211d3c); }
  .stage-art::before { position: absolute; inset-inline: 0; inset-block-end: -26px; height: 67px; border-top: 1px solid rgb(124 208 205 / 20%); border-radius: 50%; transform: scaleX(1.3); box-shadow: 0 -8px 30px rgb(101 205 202 / 9%); content: ""; }
  .stage-art-ring { position: absolute; width: 50px; height: 50px; border: 1px solid rgb(191 172 255 / 27%); border-radius: 50%; box-shadow: 0 0 23px rgb(182 155 255 / 12%), inset 0 0 21px rgb(159 132 234 / 14%); }
  .stage-art-code { position: relative; color: #e5dcff; font-size: 20px; font-weight: 900; letter-spacing: .1em; text-shadow: 0 0 15px rgb(203 182 255 / 52%); }
  .stage-art-caption { position: absolute; inset-block-end: 8px; color: #9fa3bd; font-size: 11px; font-weight: 850; letter-spacing: .21em; }
  .stage-art-star { position: absolute; color: #ebd28b; text-shadow: 0 0 10px rgb(235 210 139 / 55%); }
  .star-left { inset-inline-start: 17%; inset-block-start: 19px; font-size: 13px; }
  .star-right { inset-inline-end: 19%; inset-block-start: 31px; color: #c4aeff; font-size: 11px; }
  .latest-clear-info { display: flex; align-items: end; justify-content: space-between; gap: 8px; margin-top: 9px; }
  .latest-clear-info h3 { color: #eeeaff; font-size: 11px; }
  .latest-clear-info p { margin-top: 2px; color: #8990aa; font-size: 11px; }
  .latest-clear-info p span { padding: 0 3px; color: #626983; }
  .inline-tab-link { display: inline-flex; align-items: center; gap: 4px; padding: 4px 0; background: transparent; color: #b8a6eb; font-size: 11px; font-weight: 750; white-space: nowrap; cursor: pointer; }
  .inline-tab-link:hover { color: white; }
  .inline-tab-link .icon { width: 11px; height: 11px; }
  .pass-summary-card { background: radial-gradient(ellipse at 90% -9%, rgb(147 102 210 / 22%), transparent 13rem), linear-gradient(145deg, #211d39, #111426 78%); }
  .pass-summary-top .mini-label { color: #a39abc; }
  .pass-season-icon { display: grid; width: 24px; height: 24px; place-items: center; border: 1px solid rgb(181 145 255 / 24%); border-radius: 7px; color: #d2b9ff; }
  .pass-season-icon img { width: 18px; height: 18px; object-fit: contain; }
  .pass-season-icon[data-fallback]:not(.has-image)::after { font-size: 13px; }
  .resource-card .resource-icon img { width: 100%; height: 100%; padding: 3px; object-fit: contain; }
  .resource-pass .resource-icon img { width: 100%; height: 100%; padding: 3px; object-fit: contain; }
  .pass-season-icon .icon { width: 13px; height: 13px; }
  .pass-season { margin-top: 13px; color: #efe7ff; font-size: 16px; font-weight: 790; text-transform: capitalize; }
  .pass-level-row { display: flex; align-items: baseline; gap: 6px; margin-top: 5px; color: #8e88aa; font-size: 11px; font-weight: 800; letter-spacing: .1em; }
  .pass-level-row strong { color: #d9c7ff; font-size: 18px; letter-spacing: -.05em; }
  .pass-xp-mini { margin-inline-start: auto; color: #a19ab5; font-size: 11px; font-variant-numeric: tabular-nums; letter-spacing: 0; }
  .pass-progress, .pass-detail-track { height: 5px; overflow: hidden; margin-top: 8px; border-radius: 99px; background: #0c0e1f; }
  .pass-progress span, .pass-detail-track span { display: block; width: 86%; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #9b7bee, #d391fa); box-shadow: 0 0 12px rgb(177 128 245 / 47%); }
  .pass-summary-card .inline-tab-link { margin-top: 9px; }

  .empty-state { display: grid; min-height: 300px; align-content: center; justify-items: center; padding: 22px; text-align: center; }
  .empty-symbol { display: grid; width: 48px; height: 48px; margin-bottom: 13px; place-items: center; border: 1px solid rgb(176 152 241 / 22%); border-radius: 16px; background: rgb(133 112 194 / 10%); color: #baabef; }
  .empty-symbol .icon { width: 20px; height: 20px; }
  .empty-state h3 { color: #dcd9f0; font-size: 12px; }
  .empty-state p { max-width: 36ch; margin-top: 5px; color: #858ba4; font-size: 11px; }
  .section-count { padding: 5px 8px; border: 1px solid #30334c; border-radius: 99px; color: #8d92aa; font-size: 11px; font-weight: 800; letter-spacing: .1em; white-space: nowrap; }
  .clear-row { display: flex; align-items: center; gap: 12px; padding: 13px; border: 1px solid #30334c; border-radius: 12px; background: linear-gradient(120deg, rgb(28 33 55 / 85%), rgb(15 18 33 / 90%)); }
  .clear-row-icon { display: grid; width: 42px; height: 42px; flex: 0 0 auto; place-items: center; border: 1px solid rgb(168 148 241 / 31%); border-radius: 12px 12px 12px 4px; background: radial-gradient(circle, rgb(168 148 241 / 22%), rgb(91 81 140 / 10%)); color: #e0d5ff; font-size: 11px; font-weight: 850; }
  .clear-row-main { min-width: 0; }
  .clear-row-main h3 { margin-top: 2px; color: #eeeaff; font-size: 12px; }
  .clear-row-main p { color: #8990aa; font-size: 11px; }
  .clear-row > .clear-state { margin-inline-start: auto; }
  .reward-disclosure { margin-top: 10px; border: 1px solid #2e324b; border-radius: 10px; background: rgb(18 21 37 / 78%); }
  .reward-disclosure summary { display: flex; min-height: 42px; align-items: center; justify-content: space-between; gap: 10px; padding: 0 12px; color: #b8b9cf; font-size: 11px; cursor: pointer; list-style: none; }
  .reward-disclosure summary::-webkit-details-marker { display: none; }
  .disclosure-plus { color: #baa8f5; font-size: 17px; font-weight: 400; }
  .reward-disclosure[open] .disclosure-plus { transform: rotate(45deg); }
  .reward-disclosure p { padding: 0 12px 12px; color: #7f859e; font-size: 11px; }
  .pass-detail { display: grid; grid-template-columns: 46px minmax(90px, 150px) minmax(0, 1fr); align-items: center; gap: 13px; margin-top: 21px; padding: 18px; border: 1px solid #373450; border-radius: 14px; background: radial-gradient(ellipse at 87% 0%, rgb(160 103 215 / 17%), transparent 18rem), #17172c; }
  .pass-detail-emblem { display: grid; width: 42px; height: 42px; place-items: center; border: 1px solid rgb(195 163 255 / 33%); border-radius: 13px; color: #d6b8ff; }
  .pass-detail-emblem .icon { width: 20px; height: 20px; }
  .pass-detail-emblem img { width: 30px; height: 30px; object-fit: contain; }
  .pass-detail-emblem.has-image .icon { display: none; }
  .pass-detail-emblem[data-fallback]:not(.has-image)::after { font-size: 22px; }
  .pass-detail > div:nth-child(2) { display: grid; grid-template-columns: auto auto; align-items: baseline; gap: 2px 6px; }
  .pass-detail .mini-label { grid-column: 1 / -1; }
  .pass-detail > div:nth-child(2) strong { color: #eee3ff; font-size: 25px; line-height: 1; }
  .pass-detail-xp { color: #9892ae; font-size: 11px; }
  .pass-detail-track { grid-column: 3; margin: 0; height: 7px; }
  .panel-note { margin-top: 12px; color: #7f859f; font-size: 11px; }
  .event-detail { display: flex; align-items: center; gap: 13px; margin-top: 21px; padding: 15px; border: 1px solid rgb(116 214 206 / 21%); border-radius: 13px; background: radial-gradient(ellipse at 90% 0%, rgb(72 173 163 / 14%), transparent 15rem), #141a2b; }
  .event-detail-icon { display: grid; width: 40px; height: 40px; flex: 0 0 auto; place-items: center; border: 1px solid rgb(125 225 215 / 29%); border-radius: 12px; color: #89e8dd; }
  .event-detail h3 { color: #eef5f5; font-size: 12px; }
  .event-detail p { color: #8794a8; font-size: 11px; }
  .event-detail > strong { margin-inline-start: auto; color: #a2f0e4; font-size: 19px; font-variant-numeric: tabular-nums; letter-spacing: -.04em; }
  .quest-row { display: flex; align-items: center; gap: 11px; margin-top: 10px; padding: 12px; border: 1px solid #30344b; border-radius: 11px; background: #131629; }
  .quest-done { border-color: rgb(120 231 184 / 19%); background: linear-gradient(100deg, rgb(67 163 128 / 8%), #131629 76%); }
  .quest-check { display: grid; width: 29px; height: 29px; flex: 0 0 auto; place-items: center; border-radius: 9px; background: rgb(121 225 181 / 11%); color: #8de0b8; }
  .quest-check .icon { width: 14px; height: 14px; }
  .quest-check-muted { background: rgb(139 148 181 / 9%); color: #9aa1b9; }
  .quest-row h3 { margin-top: 2px; color: #e3e3f5; font-size: 11px; }
  .quest-row p { color: #8288a2; font-size: 11px; }
  .quest-status { margin-inline-start: auto; color: #83dcb0; font-size: 11px; font-weight: 750; white-space: nowrap; }
  .quest-count { margin-inline-start: auto; color: #d2d4e6; font-size: 14px; font-weight: 750; font-variant-numeric: tabular-nums; white-space: nowrap; }
  .quest-count i { color: #757b96; font-size: 11px; font-style: normal; }

  .connect-dialog { width: min(410px, calc(100% - 28px)); padding: 23px; border: 1px solid #414360; border-radius: 17px; background: #171a30; color: var(--text); box-shadow: 0 28px 90px rgb(0 0 0 / 65%); }
  .connect-dialog::backdrop { background: rgb(5 6 14 / 75%); backdrop-filter: blur(6px); }
  .dialog-close-form { position: absolute; inset-block-start: 12px; inset-inline-end: 12px; }
  .dialog-close { display: grid; width: 29px; height: 29px; place-items: center; border: 1px solid #363a54; border-radius: 8px; background: #20233a; color: #a9afc4; cursor: pointer; }
  .dialog-close .icon { width: 14px; height: 14px; }
  .dialog-sigil { display: grid; width: 39px; height: 39px; margin-bottom: 15px; place-items: center; border: 1px solid rgb(175 147 249 / 26%); border-radius: 13px; background: rgb(143 112 213 / 11%); color: #c5afff; font-size: 22px; }
  .connect-dialog h2 { margin-top: 4px; font-size: 19px; }
  .connect-dialog > p:not(.panel-eyebrow) { margin-top: 7px; color: #a1a6bd; font-size: 11px; line-height: 1.8; }
  .dialog-action { margin-top: 18px; }

  .visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
}

@layer responsive {
  @container (max-width: 240px) {
    .resource-card strong { font-size: 17px; }
    .resource-label { letter-spacing: .09em; }
  }

  @media (max-width: 1020px) {
    .resource-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .overview-lower { grid-template-columns: 1fr; }
    .latest-clear-card { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); column-gap: 13px; }
    .latest-clear-top { grid-column: 1 / -1; }
    .stage-art { grid-column: 1; grid-row: 2 / 4; min-height: 105px; }
    .latest-clear-info { grid-column: 2; align-self: center; flex-direction: column; align-items: start; }
  }

  @media (max-width: 800px) {
    .site-header { min-height: 65px; }
    .main-shell { min-height: calc(100dvh - 65px); }
    .directory-view, .profile-view { padding-top: 28px; }
    .profile-layout { grid-template-columns: minmax(0, 1fr); }
    .identity-panel { display: grid; grid-template-columns: 170px minmax(0, 1fr); }
    .identity-art { grid-row: 1 / 3; height: auto; min-height: 228px; border-right: 1px solid rgb(179 161 237 / 17%); border-bottom: 0; }
    .identity-body { display: flex; flex-direction: column; align-items: start; padding: 15px 17px 13px; text-align: left; }
    .profile-avatar { width: 76px; margin: 0 0 9px; border-radius: 18px 18px 18px 5px; }
    .profile-avatar::after { inset: 5px; border-radius: 14px 14px 14px 3px; }
    .profile-avatar img { inset: 6px; width: calc(100% - 12px); height: calc(100% - 12px); border-radius: 12px 12px 12px 3px; }
    .profile-avatar .avatar-fallback { font-size: 30px; }
    .profile-avatar .avatar-sigil { inset-inline-end: 6px; inset-block-end: 5px; font-size: 12px; }
    .identity-level { width: 100%; box-sizing: border-box; margin-top: 9px; padding: 8px 9px 6px; }
    .identity-xp-track { width: calc(100% - 24px); box-sizing: border-box; }
    .identity-bottom { margin-top: auto; padding-top: 9px; }
    .identity-footer { grid-column: 1 / -1; }
    .profile-main-heading { margin-top: 5px; }
  }

  @media (max-width: 620px) {
    .site-header { padding-inline: 14px; }
    .header-mark { display: none; }
    .header-right { min-width: auto; }
    .main-shell { padding-inline: 14px; }
    .directory-intro { align-items: start; flex-direction: column; gap: 15px; }
    .intro-actions { width: 100%; }
    .search-box { min-width: 0; flex: 1; }
    .account-grid { grid-template-columns: 1fr; }
    .account-card { min-height: 0; }
    .add-card { min-height: 125px; }
    .profile-tabs { padding-inline: 7px; }
    .profile-tab { min-height: 40px; gap: 5px; padding-inline: 9px; font-size: 11px; }
    .tab-num { font-size: 11px; }
    .tab-content { min-height: 370px; padding: 13px; }
    .latest-clear-card { display: block; }
    .stage-art { min-height: 93px; }
    .latest-clear-info { flex-direction: row; align-items: end; }
    .panel-heading { align-items: start; flex-direction: column; gap: 7px; }
    .panel-heading .section-count { align-self: start; }
    .pass-detail { grid-template-columns: 40px minmax(90px, 1fr); gap: 10px; padding: 13px; }
    .pass-detail-track { grid-column: 1 / -1; margin-top: 4px; }
    .main-shell > .site-footer { flex-direction: column; }
  }

  @media (max-width: 410px) {
    .brand-name strong { font-size: 11px; }
    .brand-seal { width: 36px; border-radius: 12px 12px 12px 4px; }
    .header-right { font-size: 11px; }
    .directory-meta { font-size: 11px; letter-spacing: .1em; }
    .account-open { grid-template-columns: 66px minmax(0, 1fr) 24px; gap: 10px; }
    .account-card-stats { gap: 4px; }
    .account-card-stats b { font-size: 11px; }
    .resource-grid { gap: 8px; }
    .resource-card { min-height: 123px; padding: 10px; }
    .resource-card strong { font-size: 17px; }
    .clear-row { gap: 8px; padding: 9px; }
    .clear-state { padding-inline: 5px; font-size: 5px; }
  }

  @media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  }
}

/* Centered, calmer public-site layout and reusable inventory item templates. */
@layer overrides {
  :root { --font: Inter, "Noto Sans Thai", "Segoe UI", system-ui, sans-serif; }
  body { font-size: 16px; }
  .site-header { position: sticky; inset-block-start: 0; z-index: 10; min-height: 68px; justify-content: center; gap: clamp(18px, 4vw, 54px); padding: 10px 20px; backdrop-filter: blur(18px); }
  .site-header > * { flex: 0 0 auto; }
  .brand { margin-inline-end: auto; }
  .top-nav { display: flex; align-items: center; gap: 7px; }
  .top-nav-link { padding: 9px 13px; border-radius: 10px; color: #aeb2c8; font-size: 14px; font-weight: 700; transition: background 140ms ease, color 140ms ease; }
  .top-nav-link:hover, .top-nav-link.is-current { background: rgb(166 145 255 / 12%); color: #eee9ff; }
  .header-actions { display: flex; align-items: center; gap: 9px; margin-inline-start: auto; }
  .language-toggle, .discord-link { display: inline-flex; min-height: 38px; align-items: center; justify-content: center; gap: 7px; padding: 0 12px; border: 1px solid #373b56; border-radius: 10px; background: #15182b; color: #e7e2fa; font-size: 13px; font-weight: 750; cursor: pointer; }
  .language-toggle:hover, .discord-link:hover { border-color: #8b79c7; background: #1d2037; }
  .discord-link { border-color: rgb(112 149 255 / 38%); background: rgb(85 111 207 / 14%); }
  .main-shell { width: min(100% - 32px, 1080px); min-height: calc(100dvh - 68px); padding-inline: 0; }
  .directory-view, .profile-view { padding-block: 34px 24px; }
  .directory-intro { margin-bottom: 28px; }
  .kicker, .panel-eyebrow, .mini-label { font-size: 11px; }
  .intro-description { font-size: 15px; }
  .search-box { min-height: 46px; }
  .search-box input { font-size: 14px; }
  .add-id-button { min-height: 46px; font-size: 14px; }
  .directory-meta { font-size: 11px; }
  .account-grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 360px), 1fr)); gap: 16px; }
  .account-card { padding: 18px; }
  .account-card-top { font-size: 11px; }
  .account-open { grid-template-columns: 82px minmax(0, 1fr) 32px; }
  .account-label, .account-level, .account-card-stats small { font-size: 11px; }
  .account-username { font-size: 21px; }
  .account-card-stats b { font-size: 15px; }
  .add-card strong { font-size: 15px; }
  .add-card > span:nth-of-type(2) { font-size: 13px; }
  .directory-footnote, .back-link { font-size: 13px; }
  .profile-layout { grid-template-columns: minmax(225px, 260px) minmax(0, 1fr); gap: 18px; }
  .identity-art { height: 130px; }
  .identity-body h1 { font-size: 24px; }
  .identity-kicker, .identity-userid, .identity-level-label, .identity-bottom, .identity-footer { font-size: 11px; }
  .identity-level-xp { font-size: 12px; }
  .profile-main-title { font-size: 23px; }
  .profile-tab { min-height: 48px; padding-inline: 13px; font-size: 13px; }
  .tab-num { font-size: 11px; }
  .tab-content { min-height: 420px; padding: 21px; }
  .tab-content.is-compact-history { min-height: 0; }
  .panel-heading h2 { font-size: 20px; }
  .sync-note, .section-count, .resource-card small { font-size: 12px; }
  .resource-label { font-size: 11px; }
  .resource-card { min-height: 145px; padding: 15px; }
  .resource-card strong { font-size: clamp(20px, 1.3rem + .2vw, 25px); }
  .latest-clear-info h3, .event-detail h3, .quest-row h3 { font-size: 16px; }
  .latest-clear-info p, .panel-note, .reward-disclosure, .quest-row p { font-size: 13px; }
  .inventory-template-note, .inventory-edit-note { color: #a9aec5; font-size: 14px; }
  .inventory-edit-note { margin-top: 16px; color: #858ba5; font-size: 12px; }
  .inventory-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-top: 16px; }
  .inventory-item-card { overflow: hidden; border: 1px solid #343852; border-radius: 15px; background: linear-gradient(145deg, #1b1e34, #111426); box-shadow: 0 12px 28px rgb(0 0 0 / 16%); }
  .inventory-item-art { position: relative; display: grid; min-height: 150px; place-items: center; overflow: hidden; border-bottom: 1px solid rgb(190 173 255 / 13%); background: radial-gradient(circle at 50% 45%, rgb(181 155 255 / 18%), transparent 55%), #15172b; }
  .inventory-item-art::before { position: absolute; width: 98px; aspect-ratio: 1; border: 1px solid rgb(199 183 255 / 23%); border-radius: 30px; transform: rotate(45deg); box-shadow: 0 0 0 12px rgb(161 139 219 / 4%), 0 0 40px rgb(163 131 255 / 14%); content: ""; }
  .inventory-item-art > span { z-index: 1; color: #ded4ff; font-size: 48px; text-shadow: 0 0 24px rgb(181 155 255 / 80%); }
  .inventory-item-art img:not([hidden]) { position: absolute; z-index: 2; width: 76px; height: 76px; object-fit: contain; }
  .item-art-star { background: radial-gradient(circle at 50% 45%, rgb(250 218 141 / 17%), transparent 56%), #17182b; }
  .item-art-star::before { border-color: rgb(250 218 141 / 28%); box-shadow: 0 0 0 12px rgb(250 218 141 / 4%), 0 0 40px rgb(250 218 141 / 12%); }
  .item-art-star > span { color: #f6dfa5; text-shadow: 0 0 24px rgb(250 218 141 / 75%); }
  .item-art-reroll { background: radial-gradient(circle at 50% 45%, rgb(112 222 216 / 16%), transparent 56%), #151a2b; }
  .item-art-reroll::before { border-color: rgb(112 222 216 / 28%); }
  .item-art-reroll > span { color: #9ce8df; text-shadow: 0 0 24px rgb(112 222 216 / 75%); }
  .inventory-item-copy { padding: 14px 15px 16px; }
  .inventory-item-type { color: #9298b2; font-size: 11px; font-weight: 800; letter-spacing: .14em; }
  .inventory-item-copy h3 { margin-top: 4px; color: #f0edff; font-size: 18px; }
  .inventory-item-copy p { display: flex; justify-content: space-between; gap: 10px; margin-top: 10px; color: #a7acc1; font-size: 13px; }
  .inventory-item-copy strong { color: #e7dcff; font-variant-numeric: tabular-nums; }
  .main-shell > .site-footer { font-size: 11px; }
  @media (max-width: 760px) {
    .site-header { flex-wrap: wrap; justify-content: space-between; gap: 8px; }
    .brand { margin-inline-end: 0; }
    .top-nav { order: 3; width: 100%; justify-content: center; }
    .header-actions { margin-inline-start: 0; }
    .profile-layout { grid-template-columns: minmax(0, 1fr); }
    .identity-panel { display: grid; grid-template-columns: 130px minmax(0, 1fr); align-items: stretch; }
    .identity-art { grid-row: 1 / 3; height: auto; min-height: 210px; border-right: 1px solid rgb(179 161 237 / 17%); border-bottom: 0; }
    .identity-body { display: flex; flex-direction: column; align-items: start; padding: 18px; text-align: left; }
    .profile-avatar { width: 84px; margin: 0 0 12px; }
    .identity-footer { grid-column: 2; }
  }
  @media (max-width: 560px) {
    .main-shell { width: min(100% - 24px, 1080px); }
    .directory-intro { align-items: stretch; }
    .intro-actions { align-items: stretch; }
    .search-box { min-width: 0; flex: 1; }
    .inventory-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
    .inventory-item-art { min-height: 118px; }
    .inventory-item-copy { padding: 11px; }
    .inventory-item-copy h3 { font-size: 15px; }
    .resource-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .overview-lower { grid-template-columns: minmax(0, 1fr); }
  }
  @media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  }

/* Compact history cards inside a bounded scroll region. */
.match-history-list { display: grid; max-height: min(62vh, 640px); min-height: 0; gap: 7px; overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain; align-content: start; padding: 8px; border: 1px solid #2d3149; border-radius: 13px; background: rgb(8 11 22 / 42%); scrollbar-width: thin; scrollbar-color: #565071 transparent; scrollbar-gutter: stable; }
.match-history-list.has-matches { min-height: 0; }
.match-history-heading { align-items: center; margin-bottom: 10px; }
.match-history-heading h2 { margin: 0; }
.match-history-card { position: relative; isolation: isolate; overflow: hidden; min-width: 0; padding: 9px 11px; border: 1px solid #343750; border-left: 2px solid #8a7cba; border-radius: 11px; background: radial-gradient(ellipse at 100% 0%,rgb(125 104 190 / 10%),transparent 40%),linear-gradient(145deg, rgb(28 31 52 / 88%), rgb(17 20 35 / 92%)); }
.match-history-card::before { position: absolute; z-index: 1; inset: 0; background: linear-gradient(90deg, rgb(13 16 29 / 86%), rgb(13 16 29 / 67%)), linear-gradient(0deg, rgb(13 16 29 / 65%), transparent 82%); content: ""; pointer-events: none; }
.match-history-card > .match-history-art { position: absolute; z-index: 0; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 42%; opacity: .42; filter: saturate(1.16) contrast(1.05); pointer-events: none; }
.match-history-card > :not(.match-history-art) { position: relative; z-index: 2; }
.match-history-card:has(.match-result.is-win) { border-left-color: #68e3a5; }
.match-history-card:has(.match-result.is-loss) { border-left-color: #ff8293; }
.match-history-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.match-result { display: inline-flex; align-items: center; min-height: 25px; padding: 4px 10px; border: 1px solid currentColor; border-radius: 999px; font-size: 11px; font-weight: 800; letter-spacing: .06em; }
.match-result.is-win { color: #68e3a5; background: rgb(49 181 118 / 10%); }
.match-result.is-loss { color: #ff8293; background: rgb(245 103 114 / 9%); }
.match-result.is-unknown { color: #a8b1bf; background: rgb(168 177 191 / 9%); }
.match-result.is-chest { color: #ffd166; background: rgb(255 209 102 / 12%); }
.match-history-card:has(.match-result.is-chest) { border-left-color: #ffd166; }
.match-time { color: #9299b0; font-size: 11px; text-align: right; }
.match-history-title { margin: 5px 0 5px; color: #f0edff; font-size: 14px; line-height: 1.3; overflow-wrap: anywhere; }
.match-history-details { display: flex; flex-wrap: wrap; gap: 4px 12px; padding-bottom: 6px; border-bottom: 1px solid rgb(84 88 119 / 25%); }
.match-history-details span { color: #d5d3e6; font-size: 12px; }
.match-history-details small { color: #8f96af; }
.match-history-section-label { margin: 6px 0 4px; color: #969db5; font-size: 11px; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; }
.match-history-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.history-chip { display: inline-flex; align-items: center; max-width: 100%; padding: 5px 8px; border: 1px solid #393d58; border-radius: 8px; color: #d4d3e5; background: rgb(13 15 28 / 42%); font-size: 11px; overflow-wrap: anywhere; }
.history-chip.is-reward { border-color: rgb(100 198 220 / 30%); color: #8fe2f2; }
.history-chip.is-reward { gap: 5px; min-height: 28px; padding: 4px 8px; }
.history-chip.is-reward .icon { width: 14px; height: 14px; }
.history-chip-game-icon { width: 16px; height: 16px; flex: 0 0 auto; object-fit: contain; }
.history-chip-icon { display: inline-grid; width: 16px; height: 16px; flex: 0 0 16px; place-items: center; overflow: hidden; }
.history-chip-icon::after { font-size: 13px; }
.history-chip.is-reward { flex: 0 0 auto; }
.history-chip.is-reward.is-gem .icon { color: #72d9ff; }
.history-chip.is-reward.is-gold .icon { color: #ffd36e; }
.history-chip.is-reward.is-xp .icon { color: #c6a4ff; }
.history-chip-label { color: #aeb7ce; }
.history-chip-value { color: #e8faff; font-variant-numeric: tabular-nums; }
.history-chip.is-first { border-color: rgb(241 192 108 / 36%); color: #f4cb78; }
.history-chip.is-drop { border-color: rgb(178 145 255 / 28%); color: #d1bdff; }
.match-history-status { padding: 16px; border: 1px dashed #41455f; border-radius: 12px; color: #a1a7bd; font-size: 13px; }
.match-history-status.is-error { color: #ff9ba7; }
.match-history-card hr { display: none; }
.match-result-mark { display: inline-grid; width: 15px; height: 15px; margin-inline-end: 4px; place-items: center; border-radius: 50%; color: currentColor; background: rgb(255 255 255 / 9%); font-size: 11px; line-height: 1; }
@media (max-width: 560px) {
  .tab-content.is-compact-history { min-height: 0; }
  .match-history-list { max-height: 56vh; min-height: 180px; gap: 7px; padding: 6px; }
  .match-history-card { padding: 8px 9px; }
  .match-history-title { font-size: 14px; }
  .match-time { font-size: 11px; }
  .match-history-details { gap: 7px 12px; }
  .match-history-details span, .history-chip { font-size: 11px; }
}
@media (prefers-reduced-motion: reduce) {
  body::before, body::after, .main-shell::before, .identity-activity-live i, .card-status .online-led, .card-activity .online-led { animation: none; }
}
}

@layer game-assets {
  .resource-card .resource-icon { display: grid; width: 38px; height: 38px; place-items: center; overflow: hidden; border: 1px solid color-mix(in srgb, var(--accent) 29%, transparent); border-radius: 9px; background: #13182b; }
  .resource-card .resource-icon img { width: 100%; height: 100%; padding: 3px; object-fit: contain; }
  @media (prefers-reduced-motion: reduce) {
    .skeleton-line, .skeleton-avatar, .skeleton-stat, .loading-spark { animation: none; }
  }
  .game-currency-icon { display: none; }
  .currency-gem { background-position: -83px 0; }
  .currency-gold { background-position: -229px 0; }
  .currency-april { background-position: -355px 0; }
  .inventory-category-scroller { display: flex; gap: 7px; overflow-x: auto; margin: 18px -4px 15px; padding: 4px 4px 10px; scrollbar-width: thin; scrollbar-color: #4a426d transparent; }
  .inventory-category { min-height: 42px; flex: 0 0 auto; padding: 0 18px; border: 1px solid #343850; border-radius: 10px; background: linear-gradient(180deg,#20243b,#171a2d); color: #b8bdd0; font-size: 14px; font-weight: 800; cursor: pointer; transition: color 140ms ease, border-color 140ms ease, transform 140ms ease; }
  .inventory-category:hover { transform: translateY(-1px); border-color: #8274ba; color: #f4f0ff; }
  .inventory-category.is-active { border-color: #76dbdf; background: linear-gradient(110deg,#27bfc5,#595be4); color: #fff; box-shadow: 0 6px 18px rgb(78 139 230 / 20%); }
  .inventory-status-scroller { display: flex; align-items: center; gap: 7px; overflow-x: auto; margin: 0 0 16px; padding: 0 0 5px; }
  .inventory-status-label { flex: 0 0 auto; margin-inline-end: 3px; color: #7e859e; font-size: 11px; font-weight: 850; letter-spacing: .14em; }
  .inventory-status { min-height: 33px; flex: 0 0 auto; padding: 0 12px; border: 1px solid #343850; border-radius: 99px; background: #15182a; color: #aeb4c8; font-size: 12px; font-weight: 750; cursor: pointer; }
  .inventory-status.is-active { border-color: #8a7bc4; background: rgb(135 113 194 / 18%); color: #f0eaff; }
  .inventory-filter-empty { padding: 36px 14px; border: 1px dashed #454a65; border-radius: 12px; color: #a8aec5; font-size: 14px; text-align: center; }
  .inventory-item-card { position: relative; display: block; min-width: 0; padding: 0; color: inherit; font: inherit; text-align: start; cursor: pointer; transition: transform 150ms ease, border-color 150ms ease; }
  .inventory-item-card:hover, .inventory-item-card:focus-visible { transform: translateY(-3px); border-color: #8274ba; }
  .inventory-item-card[hidden] { display: none; }
  .inventory-item-art { min-height: 150px; height: 150px; }
  .item-art-portal { background-color: #111421; background-image: none; }
  .inventory-item-art.item-art-portal::before, .inventory-item-art.item-art-reroll::before { display: none; }
  .inventory-item-art.item-art-portal::after, .inventory-item-art.item-art-reroll::after { content: "Game image pending"; color: #9298b2; font-size: 13px; font-weight: 700; }
  .inventory-item-art .item-count-badge { font-size: 17px; }
  .item-detail-art.item-art-portal::after, .item-detail-art.item-art-reroll::after { display: grid; height: 100%; place-items: center; color: #9298b2; content: "Game image pending"; font-size: 13px; font-weight: 700; }
  .inventory-item-copy { position: relative; display: block; min-height: 90px; padding-inline-end: 54px; }
  .inventory-item-name { display: block; margin-top: 4px; color: #f0edff; font-size: 18px; }
  .inventory-item-quantity { position: absolute; inset-inline-end: 15px; inset-block-end: 15px; color: #f5dc9e; font-size: 16px; font-weight: 850; }
  .item-count-badge { position: absolute; inset-inline-end: 13px; inset-block-end: 12px; z-index: 2; color: #ffdd69; font-size: 17px; font-weight: 900; text-shadow: 1px 1px 2px #121321; }
  .item-art-reroll > span:first-child { color: #fbcb70; }
  .game-image-icon img { width: 100%; height: 100%; object-fit: contain; }
  .event-detail-icon.game-image-icon img { width: 34px; height: 34px; }
  .item-detail-art.item-art-reroll { display: block; }
  .item-detail-dialog { position: fixed; width: min(92vw, 430px); max-height: min(88dvh, 700px); overflow: auto; padding: 26px; border: 1px solid #46445f; border-radius: 18px; background: linear-gradient(155deg,#1e2037,#111423 82%); color: #f0efff; box-shadow: 0 24px 90px rgb(0 0 0 / 58%); }
  .item-detail-dialog::backdrop { background: rgb(5 7 15 / 76%); backdrop-filter: blur(5px); }
  .item-detail-art { display: block; width: 140px; height: 140px; margin: 0 auto 18px; border: 1px solid #454761; border-radius: 14px; }
  .item-detail-art.item-art-reroll { display: grid; place-items: center; color: #f4d38a; font-size: 72px; }
  .item-detail-dialog .panel-eyebrow { text-align: center; }
  .item-detail-dialog h2 { margin-top: 5px; font-size: 24px; text-align: center; }
  .item-detail-description { margin-top: 15px; color: #c2c5d6; font-size: 15px; line-height: 1.65; }
  .item-detail-stats { display: grid; gap: 8px; margin-top: 17px; }
  .item-detail-stats span { display: flex; justify-content: space-between; gap: 12px; padding: 11px 12px; border: 1px solid #383b54; border-radius: 9px; background: #15182a; color: #adb2c8; font-size: 13px; }
  .item-detail-stats strong { color: #dff6a5; }
  @media (max-width: 560px) {
    .inventory-category { min-height: 39px; padding-inline: 14px; font-size: 13px; }
    .inventory-item-art { min-height: 118px; height: 118px; }
    .inventory-item-name { font-size: 16px; }
  }
}

@layer daily-challenge {
  .inventory-search { display: flex; min-height: 43px; align-items: center; gap: 10px; margin-top: 16px; padding: 0 12px; border: 1px solid #343850; border-radius: 11px; background: #111425; color: #8991ad; }
  .inventory-search:focus-within { border-color: #8274ba; box-shadow: 0 0 0 3px rgb(166 145 255 / 9%); }
  .inventory-search .icon { width: 16px; height: 16px; flex: 0 0 auto; }
  .inventory-search input { width: 100%; min-width: 0; border: 0; outline: 0; background: transparent; color: #efedff; font: inherit; font-size: 14px; }
  .inventory-search input::placeholder { color: #777f9b; }
  .inventory-search kbd { padding: 2px 6px; border: 1px solid #383c55; border-radius: 5px; color: #858ca6; font-size: 11px; }
  .inventory-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 11px; margin-top: 14px; }
  .inventory-item-card { overflow: hidden; border-color: #343850; border-radius: 12px; background: linear-gradient(155deg, #1c2035, #111424); box-shadow: 0 10px 23px rgb(0 0 0 / 15%); }
  .inventory-item-art { height: auto; min-height: 0; aspect-ratio: 1.12 / 1; border-bottom-color: rgb(190 173 255 / 12%); }
  .inventory-item-art.item-art-portal::after, .inventory-item-art.item-art-reroll::after { display: grid; width: 62px; aspect-ratio: 1; place-items: center; border: 1px solid rgb(157 178 255 / 36%); border-radius: 20px 20px 20px 6px; background: radial-gradient(circle at 50% 50%, rgb(111 231 225 / 31%), rgb(78 91 184 / 12%) 62%, transparent 70%); color: #a8edeb; content: "◈"; font-size: 42px; font-weight: 800; text-shadow: 0 0 20px rgb(101 227 225 / 65%); box-shadow: 0 0 22px rgb(95 187 223 / 16%), inset 0 0 18px rgb(158 167 255 / 16%); }
  .inventory-item-art.item-art-reroll::after { border-color: rgb(247 211 140 / 40%); background: radial-gradient(circle, rgb(247 211 140 / 25%), rgb(173 106 64 / 10%) 62%, transparent 70%); color: #f3d38e; content: "✦"; text-shadow: 0 0 20px rgb(247 211 140 / 70%); }
  .inventory-item-copy { min-height: 81px; padding: 10px 11px 12px; }
  .inventory-item-type { display: block; overflow: hidden; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
  .inventory-item-name { overflow: hidden; margin-top: 5px; font-size: 14px; text-overflow: ellipsis; white-space: nowrap; }
  .inventory-item-quantity { inset-inline-end: 10px; inset-block-end: 11px; padding: 3px 6px; border: 1px solid rgb(244 213 137 / 25%); border-radius: 7px; background: #29243a; font-size: 12px; }
  .item-count-badge { inset-inline-end: 8px; inset-block-end: 8px; padding: 2px 5px; border-radius: 6px; background: rgb(20 20 34 / 78%); font-size: 12px; }
  .inventory-filter-empty { margin-top: 12px; color: #a8aec5; font-size: 14px; }
  @media (max-width: 820px) { .inventory-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
  @media (max-width: 560px) {
    .inventory-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
    .inventory-item-art { height: auto; min-height: 0; }
    .inventory-item-copy { min-height: 75px; padding: 9px; }
    .inventory-item-name { font-size: 13px; }
  }
  .challenge-heading { display: flex; align-items: start; justify-content: space-between; gap: 14px; margin-bottom: 18px; }
  .challenge-heading h2 { margin-top: 4px; color: #f1edff; font-size: clamp(21px, 1.5rem, 27px); letter-spacing: -.04em; }
  .challenge-heading-copy > p:last-child { margin-top: 5px; color: #9299b3; font-size: 14px; }
  .challenge-sync-pill { display: inline-flex; flex: 0 0 auto; align-items: center; gap: 8px; padding: 8px 11px; border: 1px solid rgb(244 196 122 / 22%); border-radius: 99px; background: rgb(244 196 122 / 7%); color: #eacb91; font-size: 12px; font-weight: 750; }
  .challenge-sync-pill i { width: 7px; height: 7px; border-radius: 50%; background: #eacb91; box-shadow: 0 0 11px rgb(234 203 145 / 65%); }
  .challenge-feature-card { position: relative; display: grid; grid-template-columns: 118px minmax(0,1fr) auto; align-items: center; gap: 20px; overflow: hidden; min-height: 155px; padding: 17px 20px; border: 1px solid #383752; border-radius: 17px; background: radial-gradient(ellipse at 10% 50%, rgb(106 112 229 / 17%), transparent 50%), linear-gradient(115deg, #1c203b, #141729 68%, #19172e); box-shadow: inset 0 1px rgb(255 255 255 / 3%); }
  .challenge-feature-card::after { position: absolute; inset-inline-end: -45px; inset-block-start: -84px; width: 240px; aspect-ratio: 1; border: 1px solid rgb(179 160 239 / 10%); border-radius: 50%; box-shadow: 0 0 0 24px rgb(179 160 239 / 3%), 0 0 0 49px rgb(179 160 239 / 2%); content: ""; pointer-events: none; }
  .challenge-orbit-art { position: relative; display: grid; width: 104px; aspect-ratio: 1; place-items: center; border: 1px solid rgb(173 159 239 / 23%); border-radius: 28px 28px 28px 8px; background: radial-gradient(circle, rgb(174 153 255 / 19%), rgb(48 51 93 / 35%) 62%, rgb(13 17 34 / 70%)); box-shadow: inset 0 0 25px rgb(170 148 255 / 10%), 0 0 27px rgb(136 123 238 / 13%); }
  .challenge-orbit { position: absolute; width: 82px; height: 30px; border: 1px solid rgb(135 219 227 / 35%); border-radius: 50%; transform: rotate(-30deg); }
  .challenge-orbit.orbit-b { width: 72px; height: 57px; border-color: rgb(194 167 255 / 32%); transform: rotate(38deg); }
  .challenge-core { color: #e8dcff; font-size: 35px; text-shadow: 0 0 19px #ae91ff; }
  .challenge-star { position: absolute; color: #f2d58e; text-shadow: 0 0 12px rgb(242 213 142 / 80%); }
  .challenge-star-a { inset-block-start: 11px; inset-inline-start: 15px; }
  .challenge-star-b { inset-block-end: 12px; inset-inline-end: 13px; color: #b9dfff; }
  .challenge-feature-copy { position: relative; z-index: 1; min-width: 0; }
  .challenge-feature-kicker { color: #9d91c4; font-size: 11px; font-weight: 850; letter-spacing: .16em; }
  .challenge-feature-copy h3 { margin-top: 7px; color: #f0edff; font-size: 19px; letter-spacing: -.025em; }
  .challenge-feature-copy p { max-width: 54ch; margin-top: 5px; color: #9ba1b8; font-size: 13px; line-height: 1.55; }
  .challenge-feature-state { position: relative; z-index: 1; display: inline-flex; align-items: center; gap: 6px; padding: 7px 10px; border: 1px solid rgb(174 183 211 / 22%); border-radius: 99px; background: rgb(131 144 180 / 8%); color: #c0c5d8; font-size: 11px; font-weight: 800; white-space: nowrap; }
  .challenge-state-icon { display: inline-grid; width: 14px; height: 14px; flex: 0 0 auto; place-items: center; border: 1px solid currentColor; border-radius: 50%; font-size: 11px; font-weight: 900; line-height: 1; }
  .challenge-feature-state.is-cleared { border-color: rgb(108 224 177 / 34%); background: rgb(77 186 142 / 11%); color: #8de0ba; }
  .challenge-feature-state.is-not-cleared { border-color: rgb(255 104 133 / 34%); background: rgb(224 75 104 / 10%); color: #ff9aac; }
  .challenge-feature-state.is-unknown { color: #c0c5d8; }
  .latest-clear-top .challenge-feature-state { font-size: 11px; padding: 5px 8px; }
  .daily-rewards-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin: 20px 1px 9px; }
  .daily-rewards-note { color: #7f87a2; font-size: 11px; }
  .daily-reward-chips { display: flex; flex-wrap: wrap; gap: 9px; }
  .daily-reward-chip { display: inline-flex; min-height: 42px; align-items: center; gap: 9px; padding: 7px 11px; border: 1px solid #353a56; border-radius: 11px; background: linear-gradient(140deg, rgb(31 36 59 / 95%), rgb(17 21 38 / 96%)); color: #dedaf2; font-size: 12px; }
  .daily-reward-icon { position: relative; display: grid; width: 25px; height: 25px; flex: 0 0 auto; place-items: center; border: 1px solid rgb(172 157 236 / 24%); border-radius: 8px; background: #101426; color: #c8b8ff; }
  .daily-reward-name { line-height: 1.25; }
  .daily-reward-amount { color: #8fe7df; font-variant-numeric: tabular-nums; white-space: nowrap; }
  .daily-reward-empty { color: #9299b3; font-size: 13px; }
  .daily-reward-chips.is-compact { gap: 5px; margin-top: 6px; }
  .daily-reward-chips.is-compact .daily-reward-chip { min-height: 24px; gap: 4px; padding: 3px 6px; border-radius: 7px; font-size: 11px; }
  .daily-reward-chips.is-compact .daily-reward-icon { display: grid; width: 18px; height: 18px; border-radius: 5px; }
  .daily-reward-game-image { position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: contain; image-rendering: auto; }
  .daily-reward-chips.is-compact .daily-reward-amount { font-size: 11px; }
  .daily-challenge-stage { margin-top: 8px !important; color: #c6b6ff !important; font-weight: 750; }
  .latest-clear-info { align-items: center; }
  .latest-clear-info > div { min-width: 0; }
  .latest-clear-info h3, .latest-clear-info p { overflow-wrap: anywhere; }
  .challenge-section-head { display: flex; align-items: end; justify-content: space-between; gap: 12px; margin: 23px 1px 10px; }
  .challenge-section-head h3 { margin-top: 4px; color: #e9e6fa; font-size: 16px; }
  .challenge-count { display: flex; align-items: baseline; gap: 7px; color: #8990aa; font-size: 12px; }
  .challenge-count strong { color: #d5c9ff; font-size: 24px; }
  .challenge-empty { display: flex; align-items: center; gap: 14px; padding: 18px; border: 1px dashed #41455f; border-radius: 14px; background: linear-gradient(110deg, rgb(28 31 52 / 72%), rgb(17 20 35 / 78%)); }
  .challenge-empty.compact { min-height: 150px; justify-content: center; }
  .challenge-empty-mark { display: grid; width: 43px; height: 43px; flex: 0 0 auto; place-items: center; border: 1px solid rgb(180 160 246 / 25%); border-radius: 14px 14px 14px 4px; background: rgb(164 139 230 / 9%); color: #cfc1ff; font-size: 22px; }
  .challenge-empty strong { color: #dcd9f0; font-size: 14px; }
  .challenge-empty p { max-width: 65ch; margin-top: 4px; color: #9299b0; font-size: 13px; line-height: 1.55; }
  .challenge-legend { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 13px; }
  .challenge-status-chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 9px; border: 1px solid #393d55; border-radius: 99px; background: #141729; color: #c2c6d8; font-size: 11px; font-weight: 750; }
  .challenge-status-chip.is-cleared { border-color: rgb(108 224 177 / 26%); background: rgb(77 186 142 / 8%); color: #8de0ba; }
  .challenge-status-chip.is-not-cleared { border-color: rgb(255 104 133 / 25%); background: rgb(224 75 104 / 8%); color: #ff8ca1; }
  .challenge-status-chip.is-unknown { color: #bec4d8; }
  .challenge-footnote { margin-top: 14px; color: #747c98; font-size: 12px; line-height: 1.5; }
  @media (max-width: 620px) {
    .challenge-heading { flex-direction: column; }
    .challenge-feature-card { grid-template-columns: 68px minmax(0,1fr); gap: 13px; padding: 14px; }
    .challenge-orbit-art { width: 66px; border-radius: 20px 20px 20px 6px; }
    .challenge-orbit { width: 53px; height: 21px; }
    .challenge-orbit.orbit-b { width: 49px; height: 39px; }
    .challenge-core { font-size: 26px; }
    .challenge-feature-copy h3 { font-size: 16px; }
    .challenge-feature-copy p { font-size: 12px; }
    .challenge-feature-state { grid-column: 2; justify-self: start; }
    .daily-rewards-heading { align-items: start; flex-direction: column; gap: 3px; }
    .daily-reward-chips { gap: 7px; }
    .daily-reward-chip { min-height: 38px; padding: 6px 8px; font-size: 11px; }
    .challenge-empty { align-items: start; padding: 13px; }
    .challenge-empty strong { font-size: 13px; }
    .challenge-empty p { font-size: 12px; }
  }
}
/* Live account directory status */
.connected-tag.is-offline { color: #ff829a; }
.connected-tag.is-offline i,
.card-status.is-offline .online-led { background: #ff5c78; box-shadow: 0 0 8px #ff5c78; }
.account-card-top { align-items: center; line-height: 1.35; }
.connected-tag { min-height: 18px; gap: 7px; font-size: 11px; font-weight: 800; letter-spacing: .07em; }
.connected-tag i { width: 7px; height: 7px; }
.account-open { min-height: 100px; }
.account-main-copy { gap: 1px; line-height: 1.25; }
.account-label { line-height: 1.4; }
.account-username { line-height: 1.15; }
.account-level { line-height: 1.35; }
.account-card-stats { row-gap: 5px; }
.account-card-stats > span { grid-template-columns: 17px minmax(0, 1fr); row-gap: 2px; }
.account-card-stats small { line-height: 1.3; }
.account-card-stats { grid-template-columns: repeat(4, minmax(0, 1fr)); column-gap: 9px; padding-inline: 2px; }
.account-card-stats > .card-stat { display: grid; grid-template-columns: 27px minmax(0, 1fr); align-items: center; gap: 7px; min-width: 0; }
.card-stat-icon { display: grid; width: 27px; height: 27px; place-items: center; overflow: hidden; border: 1px solid rgb(160 157 201 / 24%); border-radius: 8px; background: rgb(12 15 28 / 70%); }
.card-stat-icon img { width: 100%; height: 100%; padding: 3px; object-fit: contain; }
.card-stat-icon[data-fallback]:not(.has-image)::after { font-size: 14px; }
.card-stat-copy { display: grid; min-width: 0; gap: 2px; }
.card-stat-copy b { overflow: hidden; color: #e6e4f6; font-size: 12px; font-variant-numeric: tabular-nums; text-overflow: ellipsis; white-space: nowrap; }
.card-stat-copy small { grid-column: 1; overflow: hidden; color: #747b99; font-size: 11px; font-weight: 800; letter-spacing: .09em; text-overflow: ellipsis; white-space: nowrap; }
@container (max-width: 420px) {
  .account-card-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 9px; }
  .account-card-stats > .card-stat { grid-template-columns: 25px minmax(0, 1fr); gap: 6px; }
  .card-stat-icon { width: 25px; height: 25px; }
  .card-stat-copy b { font-size: 11px; }
  .card-stat-copy small { font-size: 11px; }
}
.card-activity-panel { gap: 11px; padding: 10px 12px; }
.card-activity-copy { gap: 3px; line-height: 1.35; }
.card-activity-kicker { font-size: 11px; line-height: 1.3; letter-spacing: .1em; }
.card-activity-detail { font-size: 12px; line-height: 1.35; }
.card-activity-state { min-height: 28px; padding-inline: 10px; font-size: 11px; letter-spacing: .035em; }
@container (max-width: 360px) {
  .connected-tag { font-size: 11px; }
  .card-activity-panel { gap: 7px; padding: 8px; }
  .card-activity-kicker { font-size: 11px; }
  .card-activity-detail { font-size: 11px; }
  .card-activity-state { min-height: 25px; padding-inline: 7px; font-size: 11px; }
}
.directory-empty { grid-column: 1 / -1; margin: 0; padding: 28px 20px; border: 1px dashed #454861; border-radius: 14px; color: #9ba2bd; text-align: center; line-height: 1.6; }
.unit-data-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(145px, 1fr)); gap: 12px; margin-top: 16px; }
.unit-data-card { min-width: 0; padding: 14px; border: 1px solid #383b57; border-radius: 13px; background: linear-gradient(145deg,#1d2038,#121526); }
.unit-data-emblem { display: grid; width: 40px; aspect-ratio: 1; place-items: center; border: 1px solid #8171b2; border-radius: 12px 12px 12px 4px; background: #292442; color: #e3d3ff; font-size: 22px; }
.unit-data-kicker,.snapshot-item-note { display: block; margin-top: 10px; color: #9c91c3; font-size: 11px; font-weight: 800; letter-spacing: .12em; }
.unit-data-name { overflow: hidden; margin-top: 5px; color: #f1edff; font-size: 14px; text-overflow: ellipsis; white-space: nowrap; }
.unit-data-stat,.unit-data-traits { margin-top: 7px; color: #a5abc1; font-size: 11px; overflow-wrap: anywhere; }
.snapshot-list { display: grid; gap: 8px; margin-top: 12px; }
.snapshot-row { display: flex; align-items: center; gap: 11px; min-width: 0; padding: 12px; border: 1px solid #30344b; border-radius: 11px; background: #131629; }
.snapshot-row-mark { display: grid; width: 28px; height: 28px; flex: 0 0 auto; place-items: center; border: 1px solid #45415f; border-radius: 9px; color: #cbbcff; }
.snapshot-row-mark.is-done { border-color: #39705e; color: #8de0ba; }
.snapshot-row-copy { display: grid; min-width: 0; gap: 4px; color: #e3e3f5; overflow-wrap: anywhere; }
.snapshot-row-copy small,.snapshot-empty { color: #9299b3; font-size: 12px; }
.snapshot-empty { margin: 0; padding: 13px; border: 1px dashed #41455f; border-radius: 11px; }
.snapshot-item-art { font-size: 40px; }
.snapshot-item-card { cursor: pointer; }
.snapshot-item-note { letter-spacing: normal; }

.admin-nav a { display: inline-flex; align-items: center; gap: 7px; color: #aba4c8; font-size: 11px; }
.admin-nav a:hover { color: #eeeaff; }
.admin-nav .icon { width: 15px; height: 15px; }
.admin-shell { width: min(100%, 1120px); }
.admin-heading { margin-bottom: 23px; }
.admin-heading h1 { margin-top: 7px; color: #f0efff; font-size: clamp(27px, 1.5rem + 1vw, 38px); letter-spacing: -.05em; }
.admin-heading > p:last-child { margin-top: 7px; color: #9297b0; font-size: 13px; }
.admin-login-card { display: grid; grid-template-columns: 46px minmax(0, 1fr); gap: 12px 15px; max-width: 610px; padding: 22px; border: 1px solid #343750; border-radius: 16px; background: radial-gradient(ellipse at 0 0, rgb(151 121 221 / 15%), transparent 22rem), linear-gradient(145deg,#1b1e35,#111426); box-shadow: 0 18px 50px rgb(0 0 0 / 22%); }
.admin-lock { display: grid; width: 42px; height: 42px; place-items: center; border: 1px solid rgb(195 163 255 / 35%); border-radius: 13px; color: #d6b8ff; }
.admin-login-card h2 { color: #f0efff; font-size: 16px; }
.admin-login-card > div:nth-child(2) p { margin-top: 4px; color: #9297b0; font-size: 11px; }
.admin-login-form { display: grid; grid-column: 2; gap: 8px; }
.admin-login-form label { color: #9297b0; font-size: 11px; font-weight: 750; }
.admin-login-form input { min-height: 40px; padding: 0 11px; border: 1px solid #363a55; border-radius: 9px; background: #0e1120; color: #f0efff; }
.admin-login-form .add-id-button { justify-self: start; margin-top: 3px; }
.admin-message { grid-column: 2; min-height: 16px; color: #ff9ba7; font-size: 11px; }
.admin-library[hidden], .admin-login-card[hidden] { display: none; }
.admin-library { margin-top: 20px; padding: clamp(15px, 3vw, 25px); border: 1px solid #30344e; border-radius: 17px; background: linear-gradient(150deg,rgb(24 27 47 / 94%),rgb(13 16 30 / 97%)); }
.admin-library-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 22px; }
.admin-library-actions { display: flex; align-items: center; gap: 7px; }
.admin-library-heading h2 { margin-top: 4px; font-size: 23px; }
.admin-library-heading p:last-child { margin-top: 5px; color: #858ca8; font-size: 11px; }
.admin-refresh { display: inline-flex; min-height: 37px; align-items: center; gap: 7px; padding: 0 11px; border: 1px solid #3e4260; border-radius: 9px; background: #171a2e; color: #d5d2e8; font-size: 11px; cursor: pointer; }
.admin-refresh .icon { width: 14px; height: 14px; }
.admin-folders { display: grid; gap: 24px; }
.admin-folder { min-width: 0; }
.admin-folder-heading { display: flex; align-items: center; gap: 8px; margin-bottom: 11px; }
.admin-folder-mark { color: #b9a7ff; }
.admin-folder-heading h3 { color: #e5e1f8; font-size: 14px; }
.admin-folder-heading small { margin-inline-start: auto; color: #858ca8; font-size: 11px; }
.admin-asset-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(min(100%,220px),1fr)); gap: 12px; }
.admin-asset-card { overflow: hidden; border: 1px solid #303550; border-radius: 12px; background: linear-gradient(145deg,#1a1d33,#111426); }
.admin-asset-art { display: grid; min-height: 150px; place-items: center; border-bottom: 1px solid #2c304a; background: radial-gradient(circle at 50% 44%,rgb(135 115 193 / 15%),transparent 48%),#0e1120; }
.admin-asset-art img { width: 100%; height: 150px; object-fit: contain; padding: 17px; filter: drop-shadow(0 5px 13px rgb(0 0 0 / 40%)); }
.admin-art-pending { color: #8a90aa; font-size: 11px; }
.admin-asset-copy { display: grid; gap: 4px; padding: 12px; }
.admin-asset-category { color: #a99ad5; font-size: 11px; font-weight: 850; letter-spacing: .13em; text-transform: uppercase; }
.admin-asset-copy h4 { overflow: hidden; color: #efedff; font-size: 14px; text-overflow: ellipsis; white-space: nowrap; }
.admin-asset-copy p { overflow-wrap: anywhere; color: #9096ae; font-size: 11px; }
.admin-asset-state { margin-top: 4px; color: #ffbf78; font-size: 11px; }
.admin-asset-state.is-ready { color: #83e4bd; }
.admin-library-stats { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 10px; margin: 0 0 16px; }
.admin-library-stat { padding: 12px 14px; border: 1px solid #303550; border-radius: 11px; color: #eeeaff; background: #111426; font-size: 18px; font-weight: 800; }
.admin-library-stat small { display: block; margin-top: 3px; color: #858ca8; font-size: 11px; font-weight: 600; }
.admin-library-stat.is-ready { color: #83e4bd; }
.admin-library-stat.is-pending { color: #ffbf78; }
.admin-library-filters { display: grid; grid-template-columns: minmax(220px,2fr) minmax(150px,1fr) minmax(150px,1fr); gap: 10px; margin-bottom: 20px; }
.admin-library-filters label { display: grid; gap: 5px; color: #858ca8; font-size: 11px; }
.admin-library-filters input, .admin-library-filters select { min-width: 0; min-height: 40px; padding: 0 11px; border: 1px solid #303550; border-radius: 9px; color: #e9e6fa; background: #101326; font: inherit; }
.admin-library-pagination { display: flex; align-items: center; justify-content: flex-end; gap: 8px; margin-top: 18px; }
.admin-library-pagination span { margin-inline-end: auto; color: #858ca8; font-size: 11px; }
.admin-library-pagination button:disabled { opacity: .45; cursor: not-allowed; }
.admin-empty { padding: 28px; border: 1px dashed #373b56; border-radius: 12px; color: #9299b4; text-align: center; }
.admin-footnote { margin-top: 19px; padding-top: 13px; border-top: 1px solid rgb(175 178 220 / 9%); color: #7f879f; font-size: 11px; }
@media (max-width: 560px) {
  .account-loading-card { min-height: 238px; }
  .admin-login-card { padding: 16px; }
  .admin-library-heading { align-items: start; }
  .admin-library-heading h2 { font-size: 19px; }
  .admin-library-filters { grid-template-columns: 1fr; }
  .admin-library-stats { gap: 6px; }
  .admin-library-stat { padding: 9px; font-size: 15px; }
  .admin-refresh { flex: 0 0 auto; }
  .admin-asset-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; }
  .admin-asset-art, .admin-asset-art img { min-height: 112px; height: 112px; }
  .admin-asset-copy { padding: 9px; }
  .admin-asset-copy h4 { font-size: 12px; }
  .admin-asset-copy p, .admin-asset-state { font-size: 11px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

/* Owner directory and compact admin controls */
.admin-entry-link { display: inline-flex; align-items: center; gap: 7px; color: #b9b1d9; font-size: 11px; font-weight: 750; }
.admin-entry-link span { padding: 4px 7px; border: 1px solid rgb(172 153 236 / 26%); border-radius: 99px; color: #c5adff; font-size: 11px; letter-spacing: .04em; }
.profile-main > .tab-frame > .profile-main-heading { margin: 0; padding: 16px 18px 13px; }
.activity-banner { position: relative; display: grid; grid-template-columns: 118px minmax(0,1fr) 86px auto; align-items: center; gap: 15px; min-height: 100px; overflow: hidden; margin: 0 14px 12px; padding: 14px 18px; border: 1px solid rgb(143 129 207 / 30%); border-radius: 13px; background: linear-gradient(115deg,#171a30,#17182b 70%,#1c1931); box-shadow: inset 0 1px rgb(255 255 255 / 4%); }
.activity-banner::before { position: absolute; inset: 0; background-image: radial-gradient(circle,rgb(211 200 255 / 75%) 0 1px,transparent 1.5px); background-size: 77px 53px; opacity: .17; pointer-events: none; content: ""; }
.activity-banner-map-tile { position: relative; z-index: 1; width: 118px; height: 68px; overflow: hidden; border: 1px solid rgb(177 166 233 / 30%); border-radius: 9px; background: linear-gradient(145deg,#30294d,#151a31 62%,#24314a); box-shadow: 0 5px 14px rgb(0 0 0 / 20%); }
.activity-banner-map-tile::after { position:absolute; inset:0; background:linear-gradient(0deg,rgb(5 7 15 / 76%),transparent 72%); content:""; pointer-events:none; }
.activity-banner-art { position:absolute; inset:0; width:100%; height:100%; object-fit:cover; object-position:center 44%; filter:saturate(1.12) contrast(1.06); }
.activity-banner-map-fallback { position:absolute; inset:0; display:grid; place-items:center; color:#ddd5ff; font-size:19px; font-weight:900; letter-spacing:.04em; text-shadow:0 2px 10px #080a17; }
.activity-banner-map-tile:has(.activity-banner-art:not([hidden])) .activity-banner-map-fallback { display:none; }
.activity-banner-mode-chip { position:absolute; z-index:2; left:6px; bottom:5px; max-width:calc(100% - 12px); overflow:hidden; padding:3px 6px; border:1px solid rgb(255 255 255 / 24%); border-radius:5px; background:rgb(18 21 38 / 82%); color:#e4ddff; font-size:11px; font-weight:900; letter-spacing:.06em; text-overflow:ellipsis; text-transform:uppercase; white-space:nowrap; }
.activity-banner-mode-chip.is-raid { border-color:rgb(255 137 147 / 48%); background:rgb(105 34 57 / 84%); color:#ffdce0; }
.activity-banner-mode-chip.is-dungeon { border-color:rgb(255 197 104 / 54%); background:rgb(104 64 26 / 88%); color:#ffe2ad; }
.activity-banner-copy,.activity-banner-wave { position: relative; min-width: 0; }
.activity-banner-kicker { overflow: hidden; margin: 0 0 5px; color: #c2b5f1; font-size: 11px; font-weight: 850; letter-spacing: .07em; text-overflow: ellipsis; white-space: nowrap; }
.activity-banner-copy h2 { overflow: hidden; margin: 0; color: #f0edff; font-size: clamp(15px,2vw,20px); font-weight: 820; letter-spacing: -.035em; text-overflow: ellipsis; white-space: nowrap; }
.activity-banner-copy > p:last-child { overflow: hidden; margin: 4px 0 0; color: #b3b6cd; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.activity-banner-wave { display: grid; min-width: 72px; justify-items: center; gap: 2px; padding: 8px 10px; border: 1px solid rgb(201 190 255 / 26%); border-radius: 11px; background: rgb(9 12 26 / 44%); }
.activity-banner-wave span { color: #c0b5e9; font-size: 11px; font-weight: 850; letter-spacing: .14em; }
.activity-banner-wave strong { color: #fff; font-size: 24px; line-height: 1.05; font-weight: 900; font-variant-numeric: tabular-nums; text-shadow: 0 0 16px rgb(174 147 255 / 55%); }
.activity-banner-live { position: relative; display: inline-flex; align-items: center; gap: 6px; color: #79e3ba; font-size: 11px; font-weight: 850; white-space: nowrap; }
.activity-banner-live i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; box-shadow: 0 0 10px currentColor; animation: online-pulse 1.8s ease-in-out infinite; }
.activity-banner-live.is-stale { color: #ff8293; }
.dungeon-stat-icon img.dungeon-game-icon { width: 24px; height: 24px; object-fit: contain; image-rendering: pixelated; }
/* Shared in-game map art stays decorative and never competes with text. */
.activity-banner-copy,.activity-banner-wave,.activity-banner-live { z-index:1; }
.activity-banner-team-strip { position:relative; z-index:1; grid-column:1 / -1; display:grid; grid-template-columns:minmax(0,1fr) minmax(132px,190px); align-items:center; gap:12px; padding-top:11px; border-top:1px solid rgb(201 190 255 / 13%); }
.activity-banner-team-strip[hidden] { display:none; }
.activity-banner-team-strip:not(.has-summer-boost) { grid-template-columns:minmax(0,1fr); }
.activity-banner-team-heading { grid-column:1 / -1; display:flex; align-items:center; gap:8px; color:#c8c1e1; font-size:11px; font-weight:800; letter-spacing:.04em; }
.activity-banner-team-heading small { color:#8589a5; font-size:11px; font-variant-numeric:tabular-nums; }
.activity-banner-team-units { grid-column:1; display:grid; grid-template-columns:repeat(6,minmax(0,1fr)); gap:7px; min-width:0; }
.activity-team-unit { display:grid; justify-items:center; align-content:start; gap:4px; min-width:0; }
.activity-team-unit-art { position:relative; width:100%; aspect-ratio:1; overflow:hidden; border-radius:10px; background:#0b0e1a; }
.activity-team-unit-image { position:absolute; inset:0; width:100%; height:100%; object-fit:cover; }
.activity-team-unit-fallback { position:absolute; inset:0; display:grid; place-items:center; border:1px solid rgb(191 177 242 / 30%); border-radius:10px; background:linear-gradient(145deg,#30294d,#121729); color:#c8b9ff; font-size:15px; font-weight:900; }
.activity-team-unit-fallback[hidden] { display:none; }
.activity-team-unit-name { position:absolute; inset:auto 6% 7% 6%; overflow:hidden; color:#fff; font-size:11px; font-weight:850; line-height:1.15; text-align:center; text-overflow:ellipsis; white-space:nowrap; text-shadow:0 1px 2px #000,0 0 3px #000; }
.activity-team-unit-trait-icons { position:absolute; top:9%; left:9%; display:flex; flex-direction:column; gap:2px; width:20%; }
.activity-team-unit-trait-icon { display:block; width:100%; aspect-ratio:1; -webkit-mask:var(--trait-icon) center / contain no-repeat; mask:var(--trait-icon) center / contain no-repeat; background:#d8d8e6; filter:drop-shadow(0 1px 1px #000); }
.activity-team-unit-trait-icon.is-rare { background:linear-gradient(90deg,#0059ff,#14acff); }
.activity-team-unit-trait-icon.is-epic { background:linear-gradient(90deg,#5400ff,#5d00fc 43%,#8e05ed); }
.activity-team-unit-trait-icon.is-legendary { background:linear-gradient(90deg,#fa0,#fff23a); }
.activity-team-unit-trait-icon.is-mythic { background:linear-gradient(90deg,#ff33d1,#ff333e 20%,#ffba33 40%,#faff33 50%,#67ff33 70%,#33ff91 90%,#33ffda); }
.activity-team-unit-trait { max-width:100%; overflow:hidden; padding:2px 5px; border:1px solid rgb(190 145 255 / 38%); border-radius:999px; background:rgb(91 53 139 / 32%); color:#e1caff; font-size:11px; font-weight:850; text-overflow:ellipsis; white-space:nowrap; }
.activity-team-unit-trait.is-skin { border-color:rgb(255 196 84 / 55%); background:rgb(140 92 16 / 35%); color:#ffe2a0; border-radius:8px; line-height:1.15; text-align:center; white-space:normal; }
.activity-team-unit-trait-stats { max-width:100%; overflow:hidden; color:#aeb5d0; font-size:11px; font-weight:750; text-overflow:ellipsis; white-space:nowrap; }
.activity-banner-boost { grid-column:2; grid-row:2 / span 1; display:grid; align-content:center; gap:5px; min-height:68px; padding:10px 12px; border:1px solid rgb(112 206 174 / 27%); border-radius:10px; background:linear-gradient(145deg,rgb(21 51 53 / 37%),rgb(11 22 34 / 65%)); }
.activity-banner-boost[hidden] { display:none; }
.activity-banner-boost span { color:#84d9bd; font-size:11px; font-weight:850; letter-spacing:.13em; }
.activity-banner-boost strong { color:#f0fff8; font-size:18px; line-height:1.1; font-variant-numeric:tabular-nums; }
.activity-banner-boost small { color:#a8b8bd; font-size:11px; }
.stage-art-map { position:absolute; inset:0; width:100%; height:100%; object-fit:cover; object-position:center 45%; opacity:.86; filter:saturate(1.08) contrast(1.08); image-rendering:auto; }
.stage-art:has(.stage-art-map:not([hidden]))::after { position:absolute; inset:0; background:linear-gradient(90deg,rgb(17 21 39 / 12%),rgb(17 21 39 / 34%)); content:""; pointer-events:none; }
.stage-art:has(.stage-art-map:not([hidden])) .stage-art-ring,.stage-art:has(.stage-art-map:not([hidden])) .stage-art-code,.stage-art:has(.stage-art-map:not([hidden])) .stage-art-star { opacity:.3; }
.stage-art-ring,.stage-art-code,.stage-art-caption,.stage-art-star { z-index:1; }
.challenge-feature-card { isolation:isolate; }
.challenge-backdrop-art { position:absolute; z-index:0; inset:0; width:100%; height:100%; object-fit:cover; object-position:center 43%; opacity:.22; filter:saturate(.75); }
.challenge-feature-card:has(.challenge-backdrop-art:not([hidden]))::before { position:absolute; z-index:0; inset:0; background:linear-gradient(90deg,rgb(18 21 39 / 67%),rgb(18 20 37 / 81%) 60%,rgb(20 18 37 / 73%)); content:""; pointer-events:none; }
.challenge-orbit-art,.challenge-feature-copy,.challenge-feature-state { z-index:1; }
img[hidden] { display:none !important; }
@media (max-width: 700px) { .activity-banner { grid-template-columns: 86px minmax(0,1fr) 54px; gap: 9px; margin-inline: 9px; padding: 10px; } .activity-banner-map-tile { grid-column:1; grid-row:1 / span 2; width:86px; height:58px; } .activity-banner-copy { grid-column:2; grid-row:1 / span 2; } .activity-banner-kicker { font-size:11px; } .activity-banner-copy h2 { font-size:14px; } .activity-banner-copy > p:last-child { font-size:11px; } .activity-banner-wave { grid-column:3; grid-row:2; min-width:0; padding:5px 6px; } .activity-banner-wave strong { font-size:18px; } .activity-banner-live { grid-column:3; grid-row:1; font-size:11px; } .activity-banner-team-strip { grid-column:1/-1; grid-template-columns:minmax(0,1fr); gap:8px; } .activity-banner-team-heading { grid-column:1/-1; } .activity-banner-team-units { grid-column:1; grid-template-columns:repeat(3,minmax(0,1fr)); } .activity-team-unit { padding-top:51px; } .activity-team-unit-image,.activity-team-unit-fallback { width:40px; height:40px; } .activity-banner-boost { grid-column:1; grid-row:auto; min-height:62px; padding:8px; } .activity-banner-boost strong { font-size:15px; } }
.admin-console-nav { display: flex; gap: 7px; margin: 0 0 15px; padding: 5px; border: 1px solid #30344e; border-radius: 12px; background: #101326; }
.admin-console-nav[hidden], .admin-accounts[hidden], .admin-library[hidden] { display: none; }
.admin-console-nav button { min-height: 36px; padding: 0 14px; border: 1px solid transparent; border-radius: 8px; background: transparent; color: #9299b3; font: inherit; font-size: 11px; font-weight: 750; cursor: pointer; }
.admin-console-nav button.is-active { border-color: #514879; background: linear-gradient(135deg,#282341,#191b30); color: #e8ddff; }
.admin-accounts { margin-top: 0; padding: clamp(15px,3vw,25px); border: 1px solid #30344e; border-radius: 17px; background: linear-gradient(150deg,rgb(24 27 47 / 94%),rgb(13 16 30 / 97%)); }
.admin-account-add { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr) auto; align-items: end; gap: 10px; margin: 18px 0 12px; padding: 14px; border: 1px solid #303550; border-radius: 12px; background: rgb(12 15 29 / 55%); }
.admin-account-add label { display: grid; gap: 6px; min-width: 0; color: #9299b3; font-size: 11px; font-weight: 750; }
.admin-account-add input, .admin-account-search input { width: 100%; min-width: 0; min-height: 40px; padding: 0 11px; border: 1px solid #353a55; border-radius: 9px; outline: none; background: #0d1020; color: #efedff; font: inherit; font-size: 12px; }
.admin-account-add input:focus, .admin-account-search input:focus { border-color: #8c78d2; box-shadow: 0 0 0 3px rgb(140 120 210 / 13%); }
.admin-account-add .add-id-button { min-height: 40px; white-space: nowrap; }
.admin-account-add .icon { width: 14px; height: 14px; }
.admin-account-search { display: block; margin: 0 0 7px; }
.admin-account-search .search-box { display: block; max-width: 420px; }
.admin-account-search input { padding-inline: 12px; }
.admin-account-message { min-height: 17px; margin: 5px 0 8px; color: #a99be0; font-size: 11px; }
.admin-account-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 11px; }
.admin-account-card { min-width: 0; padding: 14px; border: 1px solid #363a56; border-radius: 13px; background: radial-gradient(circle at 92% 0, rgb(138 111 205 / 12%), transparent 11rem),linear-gradient(145deg,#191c32,#111426); }
.admin-account-card-top { display: grid; grid-template-columns: 42px minmax(0,1fr) auto; align-items: center; gap: 10px; }
.admin-account-seal { display: grid; width: 42px; aspect-ratio: 1; place-items: center; border: 1px solid #74659b; border-radius: 13px 13px 13px 4px; background: #28233f; color: #e6dcff; font-size: 17px; font-weight: 850; }
.admin-account-identity { display: grid; min-width: 0; gap: 4px; }
.admin-account-identity strong { overflow: hidden; color: #eeeaff; font-size: 14px; text-overflow: ellipsis; white-space: nowrap; }
.admin-account-identity small { color: #858ca8; font-size: 11px; }
.admin-account-online { color: #ff8094; font-size: 11px; font-weight: 850; letter-spacing: .06em; white-space: nowrap; }
.admin-account-online.is-online { color: #79e3ba; }
.admin-account-metrics { display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); gap: 6px; margin-top: 14px; padding-top: 12px; border-top: 1px solid rgb(173 176 218 / 10%); }
.admin-account-note-form { display: grid; gap: 6px; margin-top: 12px; }
.admin-account-note-form label { color: #aaa2c8; font-size: 11px; font-weight: 750; }
.admin-account-note-form textarea { width: 100%; min-height: 54px; resize: vertical; padding: 8px 10px; border: 1px solid #353a55; border-radius: 8px; outline: none; background: #0d1020; color: #efedff; font: inherit; font-size: 11px; line-height: 1.5; }
.admin-account-note-form textarea:focus-visible { border-color: #8c78d2; box-shadow: 0 0 0 3px rgb(140 120 210 / 13%); }
.admin-account-note-actions { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 29px; }
.admin-account-note-status { color: #78dfbd; font-size: 11px; }
.admin-account-note-save { min-height: 29px; padding: 0 10px; border: 1px solid rgb(122 222 195 / 28%); border-radius: 8px; background: rgb(107 213 180 / 8%); color: #a7f0d6; font: inherit; font-size: 11px; font-weight: 800; cursor: pointer; }
.admin-account-note-save:disabled { opacity: .6; cursor: wait; }
.admin-account-metric { display: grid; min-width: 0; gap: 4px; }
.admin-account-metric small { overflow: hidden; color: #858ca8; font-size: 11px; font-weight: 800; letter-spacing: .06em; text-overflow: ellipsis; white-space: nowrap; }
.admin-account-metric strong { overflow: hidden; color: #e9e5fa; font-size: 12px; font-variant-numeric: tabular-nums; text-overflow: ellipsis; white-space: nowrap; }
.admin-account-card-footer { display: grid; gap: 10px; margin-top: 12px; color: #858ca8; font-size: 11px; }
.admin-account-actions { display: flex; gap: 7px; }
.admin-account-view, .admin-account-delete { display: inline-flex; min-height: 31px; align-items: center; justify-content: center; padding: 0 10px; border: 1px solid #41435f; border-radius: 8px; background: #171a2e; color: #d9d2f0; font: inherit; font-size: 11px; font-weight: 750; text-decoration: none; cursor: pointer; }
.admin-account-delete { border-color: rgb(250 105 130 / 28%); color: #ff9aaa; }
.admin-account-view:hover { border-color: #8e7ac7; color: #fff; }
.admin-account-delete:hover { background: rgb(250 105 130 / 10%); }
@media (max-width: 720px) { .admin-account-grid { grid-template-columns: 1fr; } }
@media (max-width: 560px) {
  .admin-account-add { grid-template-columns: 1fr; }
  .admin-account-add .add-id-button { justify-self: stretch; }
  .admin-account-metrics { grid-template-columns: repeat(3,minmax(0,1fr)); row-gap: 10px; }
  .admin-account-card-top { grid-template-columns: 38px minmax(0,1fr) auto; gap: 8px; }
  .admin-account-seal { width: 38px; }
  .admin-entry-link { font-size: 0; }
  .admin-entry-link span { font-size: 11px; }
}

/* Compact accessible overflow menu and a clearer admin sign-in guide. */
.header-overflow { position: relative; z-index: 20; }
.overflow-trigger { display: grid; width: 40px; height: 40px; place-items: center; border: 1px solid #373b56; border-radius: 11px; background: #15182b; color: #d9d2f0; cursor: pointer; list-style: none; transition: border-color 150ms ease, background 150ms ease, color 150ms ease; }
.overflow-trigger::-webkit-details-marker { display: none; }
.overflow-trigger:hover, .header-overflow[open] .overflow-trigger { border-color: #8b79c7; background: #201c37; color: #f1eaff; }
.overflow-trigger .icon { width: 19px; height: 19px; fill: currentColor; stroke: none; }
.overflow-trigger:focus-visible, .overflow-popover a:focus-visible { outline: 2px solid #bca0ff; outline-offset: 3px; }
.overflow-popover { position: absolute; inset-block-start: calc(100% + 10px); inset-inline-end: 0; width: 220px; padding: 7px; border: 1px solid #393752; border-radius: 14px; background: linear-gradient(145deg, #211e38, #111426); box-shadow: 0 18px 42px rgb(0 0 0 / 42%), 0 0 28px rgb(139 121 199 / 12%); animation: overflow-in 130ms ease-out; }
.overflow-popover::before { position: absolute; inset-inline-end: 13px; inset-block-start: -5px; width: 9px; height: 9px; transform: rotate(45deg); border-top: 1px solid #393752; border-left: 1px solid #393752; background: #211e38; content: ""; }
.overflow-popover a { position: relative; display: grid; grid-template-columns: 34px minmax(0,1fr) auto; align-items: center; gap: 10px; padding: 9px; border-radius: 9px; color: #eeeaff; text-decoration: none; }
.overflow-popover a:hover { background: rgb(173 151 255 / 10%); }
.overflow-menu-icon { display: grid; width: 34px; height: 34px; place-items: center; border: 1px solid rgb(184 158 255 / 30%); border-radius: 10px; background: rgb(144 112 218 / 13%); color: #c5a9ff; font-size: 17px; }
.overflow-popover strong, .overflow-popover small { display: block; }
.overflow-popover strong { font-size: 13px; }
.overflow-popover small { margin-top: 3px; color: #9994b3; font-size: 11px; }
.overflow-arrow { color: #a99ad5; font-size: 13px; }
@keyframes overflow-in { from { opacity: 0; transform: translateY(-4px) scale(.98); } to { opacity: 1; transform: translateY(0) scale(1); } }
@media (prefers-reduced-motion: reduce) { .overflow-popover { animation: none; } }

.admin-shell { padding-top: 36px; }
.admin-heading { margin: 0 0 24px; padding: 26px clamp(18px,3vw,32px); border: 1px solid rgb(165 146 228 / 20%); border-radius: 18px; background: radial-gradient(ellipse at 88% 0, rgb(144 105 225 / 16%), transparent 24rem), linear-gradient(115deg, rgb(26 28 49 / 95%), rgb(14 17 32 / 97%)); box-shadow: 0 18px 54px rgb(0 0 0 / 17%); }
.admin-access-layout { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(300px, .95fr); align-items: stretch; gap: 16px; }
.admin-access-layout[hidden] { display: none; }
.admin-login-card { display: grid; grid-template-columns: 46px minmax(0, 1fr); align-content: start; gap: 12px 15px; min-width: 0; max-width: none; padding: clamp(18px, 3vw, 26px); border-radius: 17px; }
.admin-login-form { grid-column: 1 / -1; gap: 8px; margin-top: 7px; }
.admin-login-form label { font-size: 11px; }
.admin-login-form input { min-height: 45px; padding-inline: 12px; border-radius: 10px; font: inherit; }
.admin-login-form input:focus-visible { outline: 2px solid #a78bfa; outline-offset: 2px; }
.admin-login-form .add-id-button { justify-self: stretch; margin-top: 4px; }
.admin-message { grid-column: 1 / -1; }
.admin-guide { padding: clamp(18px,3vw,26px); border: 1px solid #30344e; border-radius: 17px; background: radial-gradient(ellipse at 100% 0, rgb(91 128 197 / 13%), transparent 20rem), linear-gradient(150deg, rgb(24 27 47 / 94%), rgb(13 16 30 / 97%)); }
.admin-guide h2 { margin-top: 5px; color: #f0efff; font-size: 19px; letter-spacing: -.03em; }
.admin-guide ol { display: grid; gap: 15px; margin: 18px 0 0; padding: 0; list-style: none; }
.admin-guide li { display: grid; grid-template-columns: 32px minmax(0,1fr); gap: 10px; align-items: start; }
.admin-guide li > span { display: grid; width: 30px; height: 30px; place-items: center; border: 1px solid rgb(181 157 255 / 24%); border-radius: 9px; background: rgb(150 125 227 / 10%); color: #c2adff; font-size: 11px; font-weight: 850; }
.admin-guide li strong { color: #e8e4fa; font-size: 12px; }
.admin-guide li p { margin-top: 3px; color: #969bb3; font-size: 11px; line-height: 1.6; }
.admin-guide-note { margin-top: 17px; padding: 10px 12px; border: 1px solid rgb(255 179 101 / 18%); border-radius: 10px; background: rgb(255 179 101 / 5%); color: #d6b78f; font-size: 11px; line-height: 1.6; }
@media (max-width: 760px) { .admin-access-layout { grid-template-columns: 1fr; } }

/* Dense item thumbnails in the owner library; compact, icon-first match rewards. */
.admin-asset-grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 164px), 1fr)); gap: 9px; }
.admin-folders { gap: 18px; }
.admin-folder-heading { margin-bottom: 8px; }
.admin-asset-card { border-radius: 10px; }
.admin-asset-art, .admin-asset-art img { min-height: 92px; height: 92px; }
.admin-asset-art img { padding: 8px; filter: drop-shadow(0 3px 8px rgb(0 0 0 / 35%)); }
.admin-asset-copy { gap: 3px; padding: 8px 9px 9px; }
.admin-asset-copy h4 { font-size: 12px; }
.admin-asset-copy p, .admin-asset-state { font-size: 11px; }
.match-history-card { padding: 8px 10px; }
.match-history-title { margin-block: 4px; font-size: 13px; }
.match-history-details { gap: 3px 10px; padding-bottom: 5px; }
.match-history-details span { font-size: 11px; }
.match-history-section-label { margin: 5px 0 3px; }
.match-history-chips { flex-wrap: wrap; gap: 5px; overflow: visible; padding-block: 1px 3px; scrollbar-width: none; }
.match-history-chips::-webkit-scrollbar { display: none; }
.history-chip.is-reward { min-height: 27px; padding: 3px 7px; }
.history-chip.is-drop { display: inline-flex; min-height: 29px; flex: 0 0 auto; gap: 5px; max-width: 190px; padding: 3px 7px; white-space: nowrap; }
.history-chip.is-drop .history-drop-fallback, .history-chip.is-drop .history-drop-icon { width: 20px; height: 20px; flex: 0 0 20px; object-fit: contain; }
.history-chip.is-drop .history-drop-fallback { color: #bca6f5; }
.history-chip.is-drop .history-chip-drop-name { overflow: hidden; min-width: 0; text-overflow: ellipsis; }
.history-chip.is-drop .history-chip-value { flex: 0 0 auto; }
@media (max-width: 560px) {
  .admin-asset-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
  .admin-asset-art, .admin-asset-art img { min-height: 72px; height: 72px; }
  .admin-asset-copy { padding: 7px; }
  .admin-asset-copy h4 { font-size: 11px; }
  .admin-asset-copy p, .admin-asset-state { font-size: 11px; }
  .match-history-card { padding: 7px 8px; }
  .match-history-details span, .history-chip { font-size: 11px; }
  .history-chip.is-drop { max-width: 155px; }
}

/* Dungeon snapshot: compact stat tiles and a bounded effects scroller. */
.dungeon-summary-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:9px; margin:12px 0 18px; }
.dungeon-stat-card { display:grid; grid-template-columns:30px minmax(0,1fr); align-items:center; gap:2px 9px; min-width:0; padding:11px 12px; border:1px solid #343750; border-radius:11px; background:linear-gradient(145deg,rgb(31 34 57 / 94%),rgb(15 18 32 / 96%)); }
.dungeon-stat-icon { grid-row:span 2; display:grid; width:30px; height:30px; place-items:center; border:1px solid rgb(174 151 255 / 32%); border-radius:9px; color:#c3aaff; background:rgb(146 117 220 / 10%); font-size:17px; }
.dungeon-game-icon { display:block; width:22px; height:22px; object-fit:contain; image-rendering:auto; }
.dungeon-stat-icon.is-rare { color:#ffc96f; border-color:rgb(255 201 111 / 32%); }
.dungeon-stat-card .mini-label { min-width:0; overflow:hidden; color:#9096b0; font-size:11px; letter-spacing:.08em; text-overflow:ellipsis; white-space:nowrap; }
.dungeon-stat-card strong { color:#f0edff; font-size:16px; line-height:1.15; }
.dungeon-effects-heading { display:flex; align-items:end; justify-content:space-between; gap:12px; margin:0 0 8px; }
.dungeon-effects-heading h3 { margin:3px 0 0; color:#e9e6fa; font-size:15px; }
.dungeon-effects-scroll { position:relative; display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:7px; max-height:min(42vh,330px); min-height:95px; overflow:auto; overscroll-behavior:contain; align-content:start; padding:8px; border:1px solid #2d3149; border-radius:12px; background:rgb(8 11 22 / 38%); scrollbar-width:thin; scrollbar-color:#625982 transparent; scrollbar-gutter:stable; container-type:scroll-state; }
.dungeon-effect-card { display:grid; grid-template-columns:34px minmax(0,1fr) auto; align-items:center; gap:9px; min-width:0; min-height:57px; padding:8px 10px; border:1px solid #353954; border-radius:10px; background:linear-gradient(120deg,rgb(36 39 65 / 92%),rgb(19 22 38 / 92%)); }
/* v162: good (buff) = green, bad (curse) = red, each in its own group with a header row. */
.dungeon-effects-group { grid-column:1 / -1; display:flex; align-items:center; justify-content:space-between; gap:10px; margin-top:6px; padding:7px 11px; border-radius:9px; font-size:12px; font-weight:800; }
.dungeon-effects-group:first-child { margin-top:0; }
.dungeon-effects-group.is-buff { color:#86efac; border:1px solid rgb(74 222 128 / 30%); background:rgb(34 197 94 / 12%); }
.dungeon-effects-group.is-curse { color:#fda4af; border:1px solid rgb(248 113 113 / 32%); background:rgb(239 68 68 / 12%); }
.dungeon-effect-card.is-buff { border-color:rgb(74 222 128 / 30%); background:linear-gradient(120deg,rgb(22 68 48 / 62%),rgb(23 21 39 / 92%)); }
.is-buff .dungeon-effect-icon { color:#86efac; border-color:rgb(74 222 128 / 32%); background:rgb(34 197 94 / 12%); }
.is-buff .dungeon-effect-kind { color:#86efac; }
.is-curse .dungeon-effect-kind { color:#fda4af; }
.dungeon-effect-card.is-curse { border-color:rgb(226 107 144 / 32%); background:linear-gradient(120deg,rgb(58 34 61 / 68%),rgb(23 21 39 / 92%)); }
.dungeon-effect-icon { display:grid; width:34px; height:34px; place-items:center; border:1px solid rgb(177 153 246 / 28%); border-radius:9px; color:#d0b4ff; background:rgb(150 119 221 / 13%); font-size:17px; }
.dungeon-effect-game-image { display:block; width:28px; height:28px; object-fit:contain; image-rendering:auto; filter:drop-shadow(0 2px 5px rgb(0 0 0 / 32%)); }
.dungeon-image-missing { color:#a39abf; font-size:11px; }
.is-curse .dungeon-effect-icon { color:#ff9cad; border-color:rgb(248 126 162 / 30%); background:rgb(218 85 127 / 12%); }
.dungeon-effect-copy { display:grid; gap:2px; min-width:0; }
.dungeon-effect-kind { color:#999fba; font-size:11px; font-weight:800; letter-spacing:.1em; }
.dungeon-effect-copy strong { overflow-wrap:anywhere; color:#edeaff; font-size:12px; line-height:1.2; }
.dungeon-effect-copy small { overflow-wrap:anywhere; color:#a0a5bb; font-size:11px; line-height:1.3; }
.dungeon-effect-quantity { align-self:start; color:#c8b2ff; font-size:11px; font-weight:800; }
.dungeon-effects-scroll > .snapshot-empty,.dungeon-effects-scroll > .challenge-empty { grid-column:1 / -1; }
@container scroll-state(scrollable: top) { .dungeon-effects-scroll::before { position:sticky; z-index:2; top:-8px; grid-column:1 / -1; height:9px; margin-bottom:-16px; background:linear-gradient(#191b2b,transparent); content:""; pointer-events:none; } }
@media (max-width:700px) { .dungeon-summary-grid { grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media (max-width:560px) { .dungeon-effects-scroll { grid-template-columns:minmax(0,1fr); max-height:38vh; } }

/* Farm plan and layout refresh */
.farm-plan { display:grid; gap:9px; margin:0 12px 12px; padding:13px; border:1px solid rgb(152 140 203 / 22%); border-radius:13px; background:rgb(12 15 29 / 55%); }
.farm-plan[hidden] { display:none; }
.farm-plan-heading { display:flex; align-items:center; gap:8px; color:#c8c1e1; font-size:11px; font-weight:800; }
.farm-plan-heading small { color:#8589a5; font-size:11px; }
.farm-job { display:grid; gap:7px; padding:11px 12px; border:1px solid rgb(120 200 255 / 22%); border-radius:11px; background:rgb(18 24 44 / 70%); }
.farm-job-top { display:flex; align-items:baseline; justify-content:space-between; gap:10px; }
.farm-job-top strong { min-width:0; color:#f0eeff; font-size:14px; overflow-wrap:anywhere; }
.farm-job-left { flex:none; color:#7fd8ff; font-size:12px; font-weight:800; font-variant-numeric:tabular-nums; }
.farm-job-bar { display:grid; grid-template-columns:repeat(30,minmax(0,1fr)); gap:2px; }
.farm-job-bar i { height:10px; border-radius:2px; background:rgb(136 142 180 / 16%); }
.farm-job-bar i.is-on { background:#34c990; }
.farm-job-meta { display:flex; align-items:center; justify-content:space-between; gap:8px; color:#8f94b3; font-size:11px; font-variant-numeric:tabular-nums; }
.farm-job-meta b { color:#e6e3f7; font-size:11px; }
.farm-job.is-done { opacity:.72; }
.farm-job.is-done .farm-job-left { color:#ffd479; }
.farm-job.is-done .farm-job-bar i.is-on { background:#e0b24c; }

.admin-farm { display:grid; gap:14px; }
.admin-farm[hidden] { display:none; }
.admin-farm-form,.admin-farm-bulk,.admin-farm-group { display:grid; gap:11px; padding:15px; border:1px solid rgb(152 140 203 / 20%); border-radius:13px; background:rgb(14 17 33 / 72%); }
.admin-farm-form { grid-template-columns:repeat(2,minmax(0,1fr)); }
.admin-farm-form > label { display:grid; gap:5px; color:#b9b5d3; font-size:12px; }
.admin-farm-form input[type=text],.admin-farm-form input[type=datetime-local],.admin-farm-bulk input { width:100%; min-height:42px; padding:0 11px; border:1px solid rgb(152 140 203 / 30%); border-radius:9px; background:#0c0f1e; color:#f0eeff; color-scheme:dark; }
.admin-farm-accounts { grid-column:1 / -1; min-width:0; margin:0; padding:0; border:0; color:#b9b5d3; font-size:12px; }
.admin-farm-accounts legend { margin-bottom:6px; padding:0; }
.admin-farm-all,.admin-farm-account { display:inline-flex; align-items:center; gap:7px; min-height:36px; color:#e6e3f7; }
.admin-farm-account-list { display:grid; grid-template-columns:repeat(auto-fill,minmax(150px,1fr)); gap:2px 10px; }
.admin-farm-account span { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.admin-farm-form > button { grid-column:1 / -1; justify-content:center; }
.admin-farm-bulk strong { color:#f0eeff; font-size:14px; }
.admin-farm-bulk small { color:#8f94b3; }
.admin-farm-bulk-actions { display:flex; flex-wrap:wrap; align-items:center; gap:8px; }
.admin-farm-bulk-actions label { width:90px; }
.admin-farm-bulk-actions button,.admin-farm-job-actions button { min-height:40px; padding:0 13px; border:1px solid rgb(127 216 255 / 35%); border-radius:9px; background:rgb(40 80 120 / 28%); color:#cdeeff; font-weight:750; cursor:pointer; }
.admin-farm-job-actions button:disabled { opacity:.4; cursor:not-allowed; }
.admin-farm-job-actions .admin-farm-remove { border-color:rgb(255 120 130 / 38%); background:rgb(120 30 45 / 25%); color:#ffc4ca; }
.admin-farm-list { display:grid; gap:12px; }
.admin-farm-group h3 { margin:0; color:#f0eeff; font-size:15px; }
.admin-farm-job { display:grid; gap:7px; padding-top:10px; border-top:1px solid rgb(152 140 203 / 13%); }
.admin-farm-job-info { display:flex; flex-wrap:wrap; align-items:baseline; justify-content:space-between; gap:4px 10px; }
.admin-farm-job-info strong { color:#e6e3f7; }
.admin-farm-job-info small { color:#8f94b3; font-variant-numeric:tabular-nums; }
.admin-farm-track { height:9px; overflow:hidden; border-radius:99px; background:rgb(136 142 180 / 16%); }
.admin-farm-track span { display:block; height:100%; border-radius:inherit; background:#34c990; }
.admin-farm-job.is-done .admin-farm-track span { background:#e0b24c; }
.admin-farm-job-actions { display:flex; flex-wrap:wrap; align-items:center; gap:7px; }
.admin-farm-job-actions b { margin-right:auto; color:#e6e3f7; font-variant-numeric:tabular-nums; }

@media (min-width:801px) {
  .profile-layout { align-items:stretch; }
  .identity-panel { display:flex; flex-direction:column; }
  .identity-body { flex:1; }
  .profile-main,.tab-frame { min-height:100%; }
  .resource-grid { grid-auto-rows:1fr; }
  .overview-lower { align-items:stretch; }
}
@media (max-width:800px) {
  .profile-layout { display:flex; flex-direction:column; gap:12px; }
  .identity-panel { display:block; width:100%; }
  .identity-art { display:none; }
  .identity-body { display:grid; grid-template-columns:76px minmax(0,1fr); column-gap:13px; align-items:center; padding:14px; text-align:left; }
  .identity-body > * { grid-column:1 / -1; }
  .identity-body .profile-avatar { grid-column:1; grid-row:1 / span 3; width:76px; margin:0; }
  .identity-body .identity-kicker,.identity-body h1,.identity-body .identity-userid { grid-column:2; margin:0; }
  .identity-body .identity-level { margin-top:12px; }
  .identity-footer { display:none; }
  .farm-plan { margin-inline:9px; padding:10px; }
  .profile-tabs { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); overflow:visible; }
  .profile-tab { justify-content:center; min-height:44px; }
  .activity-banner-team-strip { display:block; }
  .activity-banner-team-heading { margin-bottom:8px; }
  .activity-banner-team-units { grid-template-columns:repeat(3,minmax(0,1fr)); }
  .activity-banner-boost { margin-top:9px; }
  .activity-team-unit-name { font-size:11px; }
  .activity-team-unit-trait { font-size:11px; }
  .activity-team-unit-trait-stats { font-size:11px; white-space:normal; text-align:center; }
  .resource-grid { grid-template-columns:repeat(2,minmax(0,1fr)); grid-auto-rows:1fr; }
  .admin-farm-form { grid-template-columns:minmax(0,1fr); }
}
@media (max-width:800px) {
  .activity-banner-team-units .activity-team-unit { padding:0; border:0; background:none; }
  .activity-banner-team-units .activity-team-unit-image,.activity-banner-team-units .activity-team-unit-fallback { top:0; left:0; width:100%; height:100%; transform:none; }
  .activity-banner-team-units { row-gap:12px; }
}
@media (max-width:800px) { .site-header { position:static; } }

/* Profile strip inside the activity frame, and reward summary */
.profile-layout { display:block; }
.activity-banner > .profile-strip { grid-column:1 / -1; display:grid; grid-template-columns:minmax(190px,240px) minmax(0,1fr); gap:14px; align-items:stretch; padding-top:12px; border-top:1px solid rgb(152 140 203 / 15%); }
.profile-strip .identity-body { display:grid; grid-template-columns:64px minmax(0,1fr); column-gap:11px; align-items:center; align-content:start; padding:0; text-align:left; }
.profile-strip .identity-body > * { grid-column:1 / -1; }
.profile-strip .profile-avatar { grid-column:1; grid-row:1 / span 3; width:64px; margin:0; }
.profile-strip .identity-kicker,.profile-strip h1,.profile-strip .identity-userid { grid-column:2; margin:0; }
.profile-strip h1 { font-size:20px; overflow-wrap:anywhere; }
.profile-strip .identity-level { margin-top:10px; }
.profile-strip .farm-plan { margin:0; align-content:start; }
.farm-plan-empty { margin:0; color:#8f94b3; font-size:12px; }
.rewards-since { margin:0 0 12px; color:#a7abc6; font-size:13px; }
.rewards-empty { color:#a7abc6; }
.rewards-totals { display:grid; grid-template-columns:repeat(auto-fit,minmax(130px,1fr)); gap:9px; }
.rewards-total { display:grid; gap:3px; padding:12px; border:1px solid rgb(152 140 203 / 20%); border-radius:11px; background:rgb(14 17 33 / 72%); }
.rewards-total small { color:#8f94b3; font-size:11px; letter-spacing:.06em; }
.rewards-total strong { color:#f0eeff; font-size:18px; font-variant-numeric:tabular-nums; }
.rewards-heading { margin:18px 0 9px; color:#e6e3f7; font-size:15px; }
.rewards-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(104px,1fr)); gap:9px; }
.rewards-item { display:grid; justify-items:center; align-content:start; gap:5px; padding:9px; border:1px solid rgb(152 140 203 / 18%); border-radius:11px; background:rgb(14 17 33 / 72%); text-align:center; }
.rewards-item-art { position:relative; width:64px; aspect-ratio:1; display:grid; place-items:center; }
.rewards-item-art img { position:absolute; inset:0; width:100%; height:100%; object-fit:contain; border-radius:8px; }
.rewards-item-fallback { color:#6f7392; }
.rewards-item-name { color:#c8c5dc; font-size:11px; line-height:1.2; overflow-wrap:anywhere; }
.rewards-item strong { color:#7fd8ff; font-size:13px; font-variant-numeric:tabular-nums; }
@media (max-width:800px) {
  .activity-banner > .profile-strip { grid-template-columns:minmax(0,1fr); }
  .profile-tabs { grid-template-columns:repeat(3,minmax(0,1fr)); }
}
.profile-strip .identity-body h1 { grid-column:2; margin:0; }

/* Farm bar, home cards, compact rewards, admin fixes */
.profile-strip-right { display:grid; gap:12px; align-content:start; min-width:0; }
.farm-plan { background:none; border:0; padding:0; }
.farm-job-top { align-items:center; }
.farm-job-percent { color:#b9f3dc; font-size:15px; font-variant-numeric:tabular-nums; }
.farm-bar { height:14px; overflow:hidden; border-radius:99px; background:rgb(136 142 180 / 16%); box-shadow:inset 0 1px 2px rgb(0 0 0 / 45%); }
.farm-bar > span { display:block; height:100%; border-radius:inherit; background:linear-gradient(90deg,#7c5cff,#3fb7ff 55%,#34e0a1); box-shadow:0 0 10px rgb(63 183 255 / 55%); }
.farm-job.is-done .farm-bar > span { background:linear-gradient(90deg,#c9963a,#ffd479); box-shadow:none; }
.farm-job-meta { font-size:11px; }
.rewards-panel { padding:12px; border:1px solid rgb(152 140 203 / 18%); border-radius:11px; background:rgb(14 17 33 / 55%); }
.rewards-panel > h3 { margin:0 0 6px; color:#f0eeff; font-size:14px; }
.rewards-panel .rewards-since { margin-bottom:9px; font-size:11px; }
.rewards-panel .rewards-total { padding:8px 10px; }
.rewards-panel .rewards-total strong { font-size:15px; }
.rewards-panel .rewards-heading { margin:12px 0 7px; font-size:12px; }
.rewards-panel .rewards-grid { grid-template-columns:repeat(auto-fill,minmax(84px,1fr)); gap:7px; }
.rewards-panel .rewards-item { padding:7px; }
.rewards-panel .rewards-item-art { width:44px; }
.rewards-panel .rewards-item-name { font-size:11px; }
.home-farm { display:grid; gap:5px; margin-bottom:9px; }
.home-farm-top { display:flex; justify-content:space-between; gap:8px; font-size:11px; }
.home-farm-top strong { min-width:0; overflow:hidden; color:#e6e3f7; text-overflow:ellipsis; white-space:nowrap; }
.home-farm-top span { flex:none; color:#7fd8ff; font-variant-numeric:tabular-nums; }
.home-farm .farm-bar { height:8px; }
.card-more { display:block; width:100%; min-height:38px; margin-top:9px; border:1px solid rgb(158 133 240 / 42%); border-radius:9px; background:rgb(106 80 190 / 22%); color:#ded4ff; font:inherit; font-size:12px; font-weight:800; cursor:pointer; }
.card-more:hover { background:rgb(106 80 190 / 38%); }
.admin-farm,.admin-farm * { box-sizing:border-box; font-family:var(--font); }
.admin-farm-form { gap:14px; }
.admin-farm-form > label,.admin-farm-ends { display:grid; gap:6px; align-content:start; min-width:0; color:#b9b5d3; font-size:13px; }
.admin-farm-form input[type=text],.admin-farm-form input[type=datetime-local] { min-width:0; font-size:14px; }
.admin-farm-quick { display:flex; flex-wrap:wrap; gap:6px; }
.admin-farm-quick button { min-height:34px; padding:0 11px; border:1px solid rgb(127 216 255 / 35%); border-radius:8px; background:rgb(40 80 120 / 28%); color:#cdeeff; font-size:12px; font-weight:750; cursor:pointer; }
.admin-farm-ends small { color:#7fd8ff; }
.admin-farm-bulk-actions label { flex:none; width:90px; }
.admin-farm-bulk-actions input { font-size:14px; }
.admin-farm-bulk-actions button { flex:none; font-size:13px; }
@media (max-width:800px) { .admin-farm-form { grid-template-columns:minmax(0,1fr); } }
.rewards-panel .rewards-grid { grid-template-columns:repeat(auto-fill,minmax(68px,1fr)); gap:5px; }
.rewards-panel .rewards-item { gap:3px; padding:5px; }
.rewards-panel .rewards-item-art { width:34px; }
.rewards-panel .rewards-item-name { font-size:11px; }
.rewards-panel .rewards-item strong { font-size:11px; }

/* Farm job types */
.farm-title { display:inline-flex; align-items:center; gap:7px; min-width:0; }
.farm-title strong { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.farm-icon { flex:none; width:22px; height:22px; object-fit:contain; }
.home-farm-top .farm-icon { width:16px; height:16px; }
.admin-farm-types { grid-column:1 / -1; display:flex; flex-wrap:wrap; gap:7px; }
.admin-farm-types label { display:inline-flex; align-items:center; gap:7px; min-height:44px; padding:0 13px; border:1px solid rgb(152 140 203 / 28%); border-radius:10px; color:#e6e3f7; font-size:13px; font-weight:750; cursor:pointer; }
.admin-farm-types label:has(input:checked) { border-color:#7fd8ff; background:rgb(40 80 120 / 32%); }
.admin-farm-types input { position:absolute; opacity:0; }
.admin-farm-types label:has(input:focus-visible) { outline:2px solid #7fd8ff; outline-offset:2px; }
.admin-farm-types img { width:24px; height:24px; object-fit:contain; }
[data-farm-field][hidden] { display:none !important; }
.admin-farm-form input[type=number] { width:100%; min-height:42px; padding:0 11px; border:1px solid rgb(152 140 203 / 30%); border-radius:9px; background:#0c0f1e; color:#f0eeff; font-size:14px; color-scheme:dark; }
.admin-farm-calendar-wrap { grid-column:1 / -1; display:grid; gap:7px; color:#b9b5d3; font-size:13px; }
.admin-farm-calendar { display:grid; grid-template-columns:repeat(7,minmax(0,1fr)); gap:4px; }
.admin-farm-day { display:grid; place-items:center; min-height:40px; border:1px solid rgb(152 140 203 / 22%); border-radius:8px; color:#c8c5dc; font-size:12px; cursor:pointer; }
.admin-farm-day input { position:absolute; opacity:0; }
.admin-farm-day:has(input:checked) { border-color:#34e0a1; background:rgb(52 224 161 / 22%); color:#fff; font-weight:800; }
.admin-farm-calendar-wrap small { color:#7fd8ff; }

/* Month calendar */
.admin-farm-calendar-wrap { max-width:430px; }
.admin-farm-month-bar { display:flex; align-items:center; justify-content:space-between; gap:8px; }
.admin-farm-month-bar strong { color:#f0eeff; font-size:15px; }
.admin-farm-month-bar button,.admin-farm-end-row button { min-height:38px; min-width:38px; padding:0 10px; border:1px solid rgb(152 140 203 / 30%); border-radius:8px; background:rgb(40 40 80 / 35%); color:#e6e3f7; cursor:pointer; }
.admin-farm-calendar { gap:3px; }
.admin-farm-weekday { padding:3px 0; color:#8f94b3; font-size:11px; text-align:center; }
.admin-farm-day { min-height:40px; padding:0; background:none; font:inherit; font-size:13px; }
.admin-farm-day:disabled { opacity:.28; cursor:not-allowed; }
.admin-farm-day.is-today { border-color:#7fd8ff; }
.admin-farm-day.is-on { border-color:#34e0a1; background:rgb(52 224 161 / 26%); color:#fff; font-weight:800; }
.admin-farm-hint { color:#8f94b3 !important; }
.admin-farm-end-row { display:flex; flex-wrap:wrap; align-items:center; gap:8px; }
.admin-farm-end-row input { min-height:40px; padding:0 10px; border:1px solid rgb(152 140 203 / 30%); border-radius:9px; background:#0c0f1e; color:#f0eeff; font-size:14px; color-scheme:dark; }
.admin-farm-dates-summary { color:#7fd8ff; font-size:14px; }
.admin-farm-end-row select { min-height:40px; padding:0 8px; border:1px solid rgb(152 140 203 / 30%); border-radius:9px; background:#0c0f1e; color:#f0eeff; font-size:14px; color-scheme:dark; }
.admin-farm-dates-summary { display:grid; gap:2px; }
.admin-farm-dates-summary small { color:#a7abc6; font-size:12px; font-weight:600; }

/* Compact phone header: logo and main navigation only */
@media (max-width:800px) {
  body:not(.admin-page) .site-header { display:flex !important; flex-wrap:nowrap !important; align-items:center; justify-content:flex-start; gap:12px; min-height:0 !important; height:auto !important; padding:8px 14px !important; }
  body:not(.admin-page) .site-header .brand { flex:none; }
  body:not(.admin-page) .site-header .brand-seal { width:40px; height:40px; }
  body:not(.admin-page) .site-header .brand-name,
  body:not(.admin-page) .site-header .language-toggle,
  body:not(.admin-page) .site-header .discord-link { display:none !important; }
  body:not(.admin-page) .site-header .header-actions { display:flex !important; flex:none; width:auto; margin:0 0 0 auto; }
  body:not(.admin-page) .overflow-popover .overflow-phone-item { display:flex; }
  body:not(.admin-page) .site-header .top-nav { display:flex; flex:1; order:0; width:auto; margin:0 !important; justify-content:flex-start; gap:4px; }
  body:not(.admin-page) .site-header .top-nav-link { min-height:40px; }
}
@media (max-width:800px) { body:not(.admin-page) .site-header .top-nav-link { display:inline-flex; align-items:center; padding-block:0; } }
.overflow-phone-item { display:none; width:100%; align-items:center; gap:10px; padding:9px 10px; border:0; border-radius:8px; background:none; color:inherit; font:inherit; text-align:left; cursor:pointer; }
.overflow-phone-item:hover { background:rgb(134 113 194 / 12%); }
.overflow-phone-item span:nth-child(2) { display:grid; }
.overflow-phone-item small { opacity:.7; }
.overflow-phone-item .overflow-arrow { margin-left:auto; }
@media (max-width:800px) {
  body:not(.admin-page) .overflow-popover { z-index:50; background:#141830 !important; opacity:1 !important; animation:none !important; border:1px solid rgb(152 140 203 / 35%); border-radius:12px; box-shadow:0 12px 30px rgb(0 0 0 / 60%); }
  body:not(.admin-page) .site-header { position:relative; z-index:40; }
}

@view-transition { navigation: auto; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .22s; animation-timing-function: ease-out; }
@media (prefers-reduced-motion: reduce) { @view-transition { navigation: none; } }

a, button { touch-action: manipulation; }
a:focus-visible, button:focus-visible { outline: 2px solid #5cc8ff; outline-offset: 2px; }

/* particles.js draws the background stars; these two layers only doubled them. */
body::before, body::after { display: none; }
@keyframes online-pulse { 50% { opacity: .55; } }

.winrate-record { color: #5ee0b0; font-size: 12px; font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; }
.winrate-percent { color: #b3b6cd; font-size: 11px; white-space: nowrap; }

/* Adjust time panel: add or reduce, one amount, a required note, one confirm button that says what it will do. */
.adj { gap:14px; }
.adj-target { margin:0; color:#cdeeff; font-weight:700; display:flex; flex-wrap:wrap; align-items:center; gap:10px; }
.adj-target button { min-height:32px; padding:0 11px; border:1px solid rgb(152 140 203 / 30%); border-radius:8px; background:transparent; color:#b9b5d6; cursor:pointer; }
.adj-sign { display:grid; grid-template-columns:1fr 1fr; gap:8px; }
.adj-sign button,.adj-amounts button { min-height:46px; border:1px solid rgb(152 140 203 / 30%); border-radius:10px; background:rgb(14 17 33 / 60%); color:#cfcde6; font-size:15px; font-weight:750; cursor:pointer; }
.adj-sign button.is-on { border-color:#59d99a; background:rgb(60 190 130 / 22%); color:#c9ffe4; }
.adj.is-reduce .adj-sign button.is-on { border-color:#ff9a7a; background:rgb(255 120 90 / 22%); color:#ffe0d6; }
.adj-amounts { display:grid; grid-template-columns:repeat(5,1fr); gap:8px; }
.adj-amounts button.is-on { border-color:#7fd8ff; background:rgb(40 100 150 / 40%); color:#fff; }
.adj-custom { grid-column:1 / -1; display:flex; align-items:center; gap:10px; color:#b9b5d6; }
.adj-custom input { width:120px !important; }
.adj-note { display:grid; gap:6px; color:#e6e3f7; font-weight:700; }
.adj-note em { color:#ffb199; font-style:normal; font-weight:600; }
.adj-note input { width:100%; min-height:46px; padding:0 12px; border:1px solid rgb(152 140 203 / 30%); border-radius:10px; background:#0c0f1e; color:#f0eeff; font-size:15px; }
.adj-go { min-height:52px; border:0; border-radius:12px; background:#59d99a; color:#04281a; font-size:16px; font-weight:800; cursor:pointer; }
.adj.is-reduce .adj-go { background:#ff9a7a; color:#3a0f04; }
.adj-go:disabled { background:rgb(152 140 203 / 22%); color:#8f94b3; cursor:not-allowed; }
.adj button:focus-visible,.adj input:focus-visible { outline:2px solid #7fd8ff; outline-offset:2px; }
.admin-farm-notes { margin-top:6px; color:#b9b5d6; font-size:13px; }
.admin-farm-notes summary { cursor:pointer; color:#cdeeff; }
.admin-farm-notes p { margin:4px 0 0; }
@media (max-width:520px) { .adj-amounts { grid-template-columns:repeat(3,1fr); } }

/* Expired jobs: accounts whose time ran out and were not renewed. */
.admin-expired { display:grid; gap:8px; padding:15px; border:1px solid rgb(255 154 122 / 40%); border-radius:13px; background:rgb(60 24 18 / 40%); }
.admin-expired h3 { margin:0; color:#ffe0d6; font-size:16px; }
.admin-expired h3 span { color:#ff9a7a; font-weight:700; }
.admin-expired p { margin:0; color:#d9b5a8; font-size:13px; }
.admin-expired ul { list-style:none; margin:4px 0 0; padding:0; display:grid; gap:6px; }
.admin-expired li { display:grid; grid-template-columns:minmax(120px,1fr) minmax(100px,1fr) auto; gap:10px; align-items:center; padding:10px 12px; border-radius:10px; background:rgb(14 17 33 / 70%); color:#f0eeff; }
.admin-expired li small { color:#ffb199; }
@media (max-width:620px) { .admin-expired li { grid-template-columns:1fr; gap:2px; } }

.adj-scope { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.adj-scope button { min-height: 42px; border: 1px solid rgb(152 140 203 / 30%); border-radius: 10px; background: rgb(14 17 33 / 60%); color: #cfcde6; font-weight: 700; cursor: pointer; }
.adj-scope button.is-on { border-color: #7fd8ff; background: rgb(40 100 150 / 40%); color: #fff; }
.adj-scope button:focus-visible { outline: 2px solid #7fd8ff; outline-offset: 2px; }
.adj-scope b { margin-left: 4px; padding: 1px 7px; border-radius: 999px; background: #ffffff1f; }

.reset-list { max-height: 260px; overflow-y: auto; display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 4px 10px; padding: 8px; border: 1px solid rgb(152 140 203 / 20%); border-radius: 10px; background: #0c0f1e; }
.reset-row, .reset-groups label { display: flex; align-items: center; gap: 8px; min-height: 34px; color: #e6e3f7; }
.reset-groups { display: grid; gap: 4px; }
.reset-search input, .reset-confirm input { width: 100%; min-height: 42px; padding: 0 11px; border: 1px solid rgb(152 140 203 / 30%); border-radius: 9px; background: #0c0f1e; color: #f0eeff; }
.reset-confirm { max-width: 200px; }
.reset-go { background: #ff9a7a; color: #3a0f04; }
.reset-go:disabled { background: rgb(152 140 203 / 22%); color: #8f94b3; cursor: not-allowed; }
.reset-go:not(:disabled) { cursor: pointer; }
/* v483: the job being farmed vs. the ones waiting their turn */
.farm-job-tag { flex: none; padding: 2px 8px; border-radius: 999px; background: rgb(114 223 178 / 16%); color: #72dfb2; font-size: 11px; font-weight: 800; white-space: nowrap; }
.farm-job-tag.is-queued { background: rgb(255 255 255 / 7%); color: #b7b6cc; }
.farm-job.is-queued { opacity: .78; }
.farm-job-top .farm-title { flex: 1; min-width: 0; }
/* v484: dungeon add-on card above the main job on the profile card */
.hero-addon { border-color: rgb(255 212 121 / 28%); background: linear-gradient(180deg, rgb(255 212 121 / 7%), transparent); }
.hero-addon .hero-tile-icon { display: grid; place-items: center; font-size: 18px; }
.hero-addon .hero-bar i { background: linear-gradient(90deg, #c9963a, #ffd479); }
