@layer base, layout, controls, responsive, dashboard;
@layer base {
  :root { color-scheme: dark; font-size: clamp(14px, 1.8svh, 21px); font-family: Arial, "Segoe UI", sans-serif; color: #f6f9ff; background: #030a1b; }
  *, *::before, *::after { box-sizing: border-box; }
  body { margin: 0; min-height: 100svh; isolation: isolate; overflow-x: clip; }
  button, input { font: inherit; }
  button { color: inherit; cursor: pointer; }
  button:focus-visible, input:focus-visible { outline: 2px solid #77eaff; outline-offset: 3px; }
  button:disabled { cursor: wait; }
  [hidden] { display: none !important; }
  .sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .icon { width: 1.2em; height: 1.2em; display: inline-block; flex: none; vertical-align: middle; }
}
@layer layout {
  .ambient, .sparks { position: fixed; inset: 0; pointer-events: none; }
  .ambient { z-index: -2; background: url('/assets/backgrounds/royal-night.webp') center / cover no-repeat; }
  .sparks { z-index: -1; background: url('/assets/effects/stardust.svg') center / cover no-repeat; animation: stars 10s ease-in-out infinite alternate; }
  @keyframes stars { from { opacity: .25; } to { opacity: .67; } }
  .stage { display: flex; flex-direction: column; align-items: center; gap: .5rem; width: 100%; padding: clamp(12px, 3.8svh, 72px) 18px 2rem; }
  .brand { position: relative; width: min(28rem, 85vw); aspect-ratio: 614/197; margin: 0; }
  .wordmark { display: block; width: 100%; height: 100%; object-fit: contain; }
  .crown-glint { position: absolute; width: 2.3%; height: 8%; top: 3%; left: 50%; background: radial-gradient(ellipse, #ffed9b 0%, #ffce4688 23%, transparent 72%); mix-blend-mode: screen; animation: glint 8s ease-in-out infinite; pointer-events: none; }
  @keyframes glint { 0%, 72%, 100% { opacity: .15; transform: scale(.7); } 84% { opacity: .85; transform: scale(1.55); } }
  .panel { position: relative; isolation: isolate; width: min(100%, 38rem); padding: 1.55rem clamp(18px, 5vw, 4rem) 1.15rem; }
  .panel-art { position: absolute; z-index: -1; inset: -14px -12px -16px; background: url('/assets/decorations/neon-frame.webp') center / 100% 100% no-repeat; pointer-events: none; }
  .switch { position: relative; isolation: isolate; display: grid; grid-template-columns: 1fr 1fr; width: 100%; height: max(43px, 3.05rem); margin: 0 auto 1.15rem; border: 1px solid #45699e; border-radius: 999px; background: linear-gradient(180deg, #1b376c, #0d1e3dcc 43%, #0a1930e8); }
  .switch::before { position: absolute; z-index: -1; inset: -1px 50% -1px -1px; content: ""; border: 1px solid #00caff; border-radius: inherit; background: url('/assets/effects/blue-button.svg') center / 100% 100% no-repeat, linear-gradient(180deg, #0586ff, #003bcc 35%, #061c7c 80%, #0059ff); box-shadow: inset 0 0 .4rem #06bcffad, 0 0 .85rem #0069ff5c; opacity: 0; transition: transform .3s ease, opacity .2s ease; pointer-events: none; }
  .stage[data-mode="login"] .switch::before, .stage[data-mode="register"] .switch::before { opacity: 1; }
  .stage[data-mode="register"] .switch::before { transform: translateX(100%); }
  .views { max-width: 29rem; margin-inline: auto; }
  .views[data-resizing] { overflow: clip; overflow-clip-margin: 7px; }
  .auth { display: flow-root; margin: 0; font-size: max(13px, .95rem); }
  .auth h2, .auth p { margin: 0; }
  .auth .welcome { margin-bottom: .7rem; text-align: center; color: #d9e9ff; font-size: max(15px, 1.04rem); font-weight: 600; letter-spacing: .02em; }
  .ruled { color: #ffe39c; display: flex; align-items: center; justify-content: center; gap: .85rem; text-align: center; font-weight: 700; font-size: max(17px, 1.28rem); line-height: 1.25; text-shadow: 0 0 .45rem #ffd66335; }
  .ruled::before, .ruled::after { content: ""; height: 2px; flex: 1 1 0; background: linear-gradient(90deg, transparent, #bf8c32, #ffe597); }
  .ruled::after { transform: scaleX(-1); }
  .register .ruled { margin-bottom: .8rem; }
  .auth.standalone { text-align: center; }
  .standalone .intro { margin: .85rem 0 1rem; color: #cfdbf3; line-height: 1.4; }
  .standalone .action { margin: .65rem auto .4rem; width: 79%; }
  .standalone .link { margin-top: .45rem; }
  .game-art { width: min(100%, 22rem); margin: .5rem auto 0; pointer-events: none; }
  .game-art img { display: block; width: 100%; height: auto; mask-image: linear-gradient(to right, transparent, #000 12%, #000 88%, transparent), linear-gradient(to bottom, #000 86%, transparent); mask-composite: intersect; animation: drift 8s ease-in-out infinite alternate; }
  @keyframes drift { to { transform: translateY(-.16rem); } }
}
@layer controls {
  .field { display: flex; align-items: center; gap: 1.19rem; width: 100%; height: max(42px, 2.78rem); margin: 0 0 0.75rem; padding: 0 1.04rem; border: 1px solid #527eb8; border-radius: 0.85rem; background: linear-gradient(117deg, #071a34bb, #07162deb); box-shadow: inset 0 0 0.54rem #5d9bd31a, 0 1px 1px #000a; transition: border-color .2s, box-shadow .2s; font-size: clamp(16px, 0.97rem, 36px); color: #ecf3ff; }
  .field > .icon { width: 1.44em; height: 1.44em; filter: drop-shadow(0 1px 1px #0009); }
  .field:focus-within { border-color: #7bdcff; box-shadow: 0 0 0.54rem #00aaff62, inset 0 0 0.41rem #387fbd31; }
  .field:has([aria-invalid]) { border-color: #ff9da8; }
  .field input { width: 100%; min-width: 0; height: 100%; color: #f6f9ff; background: transparent; border: 0; padding: 0; outline: none; }
  .field input::placeholder { color: #c6d1e5; opacity: 1; }
  .field input:autofill { box-shadow: 0 0 0 100px #091a31 inset; -webkit-text-fill-color: #f6f9ff; }
  .register .field { height: max(40px, 2.55rem); margin-bottom: 0.58rem; font-size: max(16px, .95rem); padding: 0 0.95rem; border-radius: 0.87rem; border-color: #456793; }
  .eye { padding: 0; margin-left: auto; background: transparent; border: 0; color: #aebcd5; line-height: 1; display: grid; place-items: center; }
  .eye:hover { color: #fff; }
  .options { display: flex; align-items: center; justify-content: space-between; gap: 0.48rem; min-height: 1.84rem; margin: 0.27rem 0 0.68rem; white-space: nowrap; }
  .check { position: relative; display: inline-flex; gap: 0.54rem; align-items: center; line-height: 1.3; cursor: pointer; }
  .check input { appearance: none; display: grid; width: 1.1rem; min-width: 16px; height: 1.1rem; min-height: 16px; margin: 0; flex: none; border: 1px solid #00aaff; border-radius: 0.22rem; place-items: center; background: #041931; cursor: pointer; }
  .check input:checked { background: radial-gradient(circle at 48% 60%, #145ffd, #022682 70%); box-shadow: 0 0 0.41rem #006cffb5, inset 0 0 0.2rem #23abffad; }
  .check input:checked::before { content: ""; width: 58%; height: 32%; border-bottom: 2px solid #97f7ff; border-left: 2px solid #97f7ff; transform: translateY(-15%) rotate(-45deg); filter: drop-shadow(0 0 3px #67eaff); }
  .check input[aria-invalid] { border-color: #ff9da8; }
  .link { display: inline; padding: 0; border: 0; background: none; color: #6de7ff; text-decoration: underline; text-underline-offset: .16em; text-decoration-thickness: 1px; }
  .link:hover { color: #c6faff; }
  .terms { display: flex; margin: 0.29rem 0 0.57rem 0.8rem; min-height: 0.72rem; font-size: max(12px, 0.58rem); color: #dbe6f9; }
  .terms input { width: 0.73rem; height: 0.73rem; }
  .switch button, .action { position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 0.78rem; width: 100%; padding: 0 0.68rem; border: 1px solid #45699e; border-radius: 999px; color: #e8eefb; font-size: max(17px, 1.15rem); font-weight: 700; line-height: 1.1; background: linear-gradient(180deg, #1b376c, #0d1e3dcc 43%, #0a1930e8); text-shadow: 0 2px 3px #00101a; transition: filter .2s, box-shadow .25s; }
  .switch button { border: 0; background: none; }
  .switch button[aria-pressed="true"] { color: #fff; }
  .switch button .icon { font-size: 1.16em; }
  .action.blue { border-color: #00caff; background: url('/assets/effects/blue-button.svg') center / 100% 100% no-repeat, linear-gradient(180deg, #0586ff, #003bcc 35%, #061c7c 80%, #0059ff); color: #fff; box-shadow: inset 0 0 0.37rem #06bcffad, 0 0 0.88rem #0069ff5c; }
  .switch button:hover, .action:hover { filter: brightness(1.18); }
  .action:active, .switch button:active { filter: brightness(.96); }
  .action { height: 3.03rem; }
  .login .action { display: flex; margin-inline: auto; width: 99%; font-size: max(21px, 1.39rem); }
  .trailing { position: absolute; right: 7.8%; color: #35f8ff; font-size: 1.22em; filter: drop-shadow(0 0 0.27rem #03c8ff); }
  .action.gold { color: #fff; border: 2px solid #ffd46c; background: url('/assets/effects/gold-button.svg') center / 100% 100% no-repeat, linear-gradient(180deg, #26364b, #0b1828 53%, #121f30); box-shadow: 0 0 0.48rem #ffb33533; }
  .gold .icon { color: #ffe99c; }
  .register .action { display: flex; width: 91.5%; margin-inline: auto; height: 2.64rem; }
  .notice { font-size: max(12px, 0.59rem); line-height: 1.25; color: #ffb9c2; }
  .notice:not(:empty) { margin-top: 0.33rem; padding: .26em .55em; border-radius: 0.26rem; background: #250d24ed; width: fit-content; }
  .notice[data-type="success"] { color: #a4ffe2; background: #063036ee; }
  .register .notice { margin-inline: auto; text-align: center; }
  .login .resend, .register .back { display: block; text-align: center; margin: 0.31rem auto 0; font-size: max(12px, 0.58rem); }
  .standalone .notice { margin-inline: auto; }
  .action[aria-busy="true"] > * { opacity: 0; }
  .action[aria-busy="true"]::after { content: ""; position: absolute; width: 1em; height: 1em; border: 2px solid #ffffff45; border-top-color: #fff; border-radius: 50%; animation: turn .8s linear infinite; }
  @keyframes turn { to { transform: rotate(360deg); } }
  dialog { max-width: min(92vw, 520px); padding: 28px; color: #f4f7ff; background: #07152b; border: 1px solid #528eff; border-radius: 18px; box-shadow: 0 0 32px #0079ff66; }
  dialog::backdrop { background: #010714d4; }
  dialog h2 { color: #ffe39c; margin-top: 0; }
  dialog p { line-height: 1.5; }
  dialog .action { height: 44px; font-size: 17px; margin-top: 8px; }
}
@layer responsive {
  @media (max-width: 560px) {
    :root { font-size: 15px; }
    .ambient { background-image: url('/assets/backgrounds/royal-night.svg'); }
    .stage { padding-inline: 14px; }
    .panel { padding-inline: 18px; }
    .panel-art { inset: 0 -4px -10px; }
    .field, .register .field { height: 46px; }
    .eye { width: 40px; height: 40px; margin-right: -7px; }
    .options { flex-wrap: wrap; }
    .action, .register .action { height: 46px; }
  }
  @media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  }
}
@layer dashboard {
  @media (min-width: 901px) {
    :root:has(.dashboard:not([hidden])) { font-size: clamp(13px, min(.973vw, 1.67svh), 21px); }
  }
  body:has(.dashboard:not([hidden])) .ambient { visibility: hidden; }
  body:has(.dashboard[data-effects="off"]:not([hidden])) .sparks { animation: none; opacity: .25; }
  .dashboard {
    --royal-gold: #ffe397;
    --royal-ink: #020e23;
    --royal-ease: cubic-bezier(.2, .72, .26, 1);
    position: relative; isolation: isolate; display: flex; flex-direction: column;
    min-height: 100svh;
    background: radial-gradient(ellipse at 47% 29%, #0a2345, #040e21 71%);
  }
  .royal-atmosphere {
    position: fixed; inset: 0; z-index: -1; overflow: clip; pointer-events: none;
  }
  .royal-atmosphere::before, .royal-atmosphere::after {
    content: ""; position: absolute; inset: -5%;
  }
  .royal-atmosphere::before {
    background: url('/assets/effects/royal-waves.svg') center / 100% 100% no-repeat;
    opacity: .7;
  }
  .royal-atmosphere::after {
    background: url('/assets/effects/royal-motes.svg') center / cover no-repeat;
    opacity: .53;
  }
  .dashboard-header {
    position: relative; z-index: 3;
    background: linear-gradient(#030b1c, #061832);
  }
  .dashboard-header::before, .dashboard-header::after {
    content: ""; position: absolute; inset: auto 0 -1px; height: 3px; pointer-events: none;
  }
  .dashboard-header::before {
    background: linear-gradient(90deg, transparent, #316a9e 14%, #b88a4a 41%, #ffe0a2 50%, #b88a4a 59%, #316a9e 86%, transparent) center / 100% 1px no-repeat;
    box-shadow: 0 .27rem .75rem #00111e;
  }
  .dashboard-header::after {
    inset-inline: 39%; height: 1.15rem; bottom: -.5rem;
    background: radial-gradient(ellipse 50% .36rem at center, #fff4c3 3%, #e7ad5e9e 23%, transparent 92%) center / min(100%, 11rem) 100% no-repeat;
    opacity: .7;
  }
  .dashboard-bar {
    display: grid; grid-template-columns: minmax(155px, 18.5rem) minmax(0, 1fr) auto;
    align-items: center; gap: clamp(16px, 2.3vw, 2.5rem);
    max-width: 120rem; min-height: 5.8rem; margin: auto; padding: .32rem clamp(18px, 2.5vw, 2.7rem);
  }
  .royal-brand { position: relative; width: 100%; max-width: 17rem; }
  .royal-brand::after {
    content: ""; position: absolute; left: 52%; top: 13%; width: 24%; aspect-ratio: 1;
    transform: translate(-50%, -50%); pointer-events: none;
    background: radial-gradient(ellipse, #fff3c1b0, #ffbd5246 28%, transparent 69%);
    mix-blend-mode: screen; opacity: .36;
  }
  .dashboard-logo { display: block; width: 100%; height: auto; }
  .royal-nav {
    position: relative; display: flex; align-items: center; justify-content: space-between;
    gap: .16rem; padding: .28rem; border: 1px solid #24507e; border-radius: 1.55rem;
    background: linear-gradient(180deg, #091d38, #031128);
    box-shadow: inset 0 0 1.2rem #01395d5c;
  }
  .royal-nav::before, .royal-nav::after {
    content: ""; position: absolute; top: 0; bottom: 0; width: 1px;
    background: linear-gradient(transparent, #148ace 42%, #8ac6f2 50%, #148ace 56%, transparent);
  }
  .royal-nav::before { left: clamp(-1.7rem, -1.75vw, -.8rem); }
  .royal-nav::after { right: clamp(-1.7rem, -1.75vw, -.8rem); }
  .royal-nav button {
    min-width: 0; display: flex; align-items: center; justify-content: center; gap: .63rem;
    background: transparent; border: 1px solid transparent; border-radius: 999px;
    padding: .52rem clamp(.35rem, .8vw, .85rem);
    color: #f4f8ff; font-weight: 600; font-size: max(13px, 1rem); white-space: nowrap;
  }
  .royal-nav button .icon, .royal-panel-heading .icon { width: 1.65em; height: 1.65em; }
  .royal-nav button[aria-current="page"] {
    background: url('/assets/effects/blue-button.svg') center / 100% 100% no-repeat, linear-gradient(#0877ff, #071e8c 75%, #0157eb);
    border-color: #33d9ff; box-shadow: inset 0 0 .65rem #05c7ffad, 0 0 .95rem #027dffa5;
  }
  .royal-nav button:hover, .royal-secondary:hover, .royal-icon-button:hover { color: #9ef0ff; }
  .dashboard-account { display: flex; min-width: 0; align-items: center; gap: clamp(8px, 1.16vw, 1.3rem); }
  .royal-account-menu { min-width: 0; position: relative; }
  .royal-account-menu summary {
    display: flex; align-items: center; gap: .65rem; cursor: pointer; list-style: none;
    font-weight: 700; font-size: max(13px,1.08rem);
  }
  .royal-account-menu summary::-webkit-details-marker { display: none; }
  .royal-account-menu summary:focus-visible, .dashboard [tabindex="0"]:focus-visible { outline: 2px solid #8eeaff; outline-offset: 3px; }
  .dashboard-avatar, .royal-avatar-large {
    display: block; flex: none; border-radius: 50%; object-fit: cover;
    border: 2px solid #ffda75; box-shadow: 0 0 .75rem #ffaa3f70;
  }
  .dashboard-avatar { width: 3.15rem; height: 3.15rem; }
  #dashboard-nickname { max-width: 14ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .royal-account-dropdown {
    display: grid; gap: .9rem; position: absolute; top: calc(100% + .75rem); right: 0;
    z-index: 2; width: max-content; min-width: 11rem; padding: .9rem;
    border: 1px solid #3480b8; border-radius: 1rem; background: #071b37; box-shadow: 0 .6rem 1.75rem #000b;
  }
  .royal-account-menu:not([open]) .royal-account-dropdown { display: none; }
  #logout { height: 2.4rem; font-size: 1rem; }
  .royal-header-balance, .royal-profile-balance {
    display: flex; align-items: center; gap: .4rem; color: #f6f9ff;
    white-space: nowrap; font-weight: 700; font-variant-numeric: tabular-nums;
  }
  .royal-header-balance { padding: .34rem .62rem; border: 1px solid #164471; border-radius: 999px; }
  .diamond-icon { flex: none; width: 1.6rem; height: 1.45rem; object-fit: contain; filter: drop-shadow(0 0 .26rem #28c0ff9b); }
  .royal-icon-button {
    display: inline-grid; place-items: center; flex: none; min-width: 2.3rem; min-height: 2.3rem;
    padding: 0; color: var(--royal-gold); border: 0; border-radius: .45rem; background: none;
  }
  .notification-button { color: #edf6ff; position: relative; }
  .notification-button .icon { width: 1.9rem; height: 1.9rem; }
  .notification-button[data-unread]::after {
    content: ""; position: absolute; right: .13rem; top: .15rem; width: .46rem; height: .46rem; border-radius: 50%;
    background: #ffe690; box-shadow: 0 0 .48rem #ffaa28;
  }
  .dashboard-notice:empty { margin: 0; }
  .dashboard-notice:not(:empty) { margin: 0 auto .7rem; max-width: calc(100% - 30px); }

  .dashboard-content {
    position: relative; width: 100%; max-width: 120rem; margin-inline: auto;
    padding: clamp(13px, 3svh, 2rem) clamp(16px, 1.6vw, 2rem) 0;
  }
  .royal-main-grid {
    display: grid; grid-template-columns: minmax(185px, 16.5rem) minmax(0, 1fr);
    grid-template-areas: "profile welcome" "profile games"; grid-template-rows: auto 1fr;
    gap: 1.05rem 1.1rem;
  }
  .royal-panel {
    --royal-border: #2b82bd;
    --panel-radius: 1.65rem;
    --panel-glint: #91ddff;
    min-width: 0; position: relative; isolation: isolate; border: 1px solid var(--royal-border); border-radius: var(--panel-radius);
    background:
      radial-gradient(ellipse at 2% 0, #2587bc63, transparent 35%),
      radial-gradient(ellipse at 94% 110%, #0964a45c, transparent 54%),
      linear-gradient(146deg, #0a1e38, #050f22 59%, #071a31);
    box-shadow: inset 0 1px #a6d6fa21, inset 0 -1px #2a5b8b81, 0 .35rem 1.1rem #0108148a;
  }
  .royal-panel::after {
    content: ""; display: none; position: absolute; z-index: 2; left: 0; top: 0;
    width: 2.2rem; height: .22rem; pointer-events: none;
    offset-path: inset(0 round var(--panel-radius));
    background: radial-gradient(ellipse, #fff7de 1%, var(--panel-glint) 25%, transparent 73%);
  }
  .royal-profile, .summary-panel:nth-child(even) { --panel-glint: #efb457; }
  .royal-profile {
    grid-area: profile; display: flex; flex-direction: column; padding: .25rem 1.15rem 6.35rem;
    --royal-border: #196aa7;
  }
  .royal-profile::before {
    content: ""; position: absolute; z-index: -1; inset: auto 1.15rem .9rem; height: 5.8rem;
    background: url('/assets/effects/royal-profile-spade.svg') center bottom / contain no-repeat;
    pointer-events: none;
  }
  .royal-panel-heading {
    display: flex; align-items: center; justify-content: space-between; gap: .4rem;
    min-height: 3.55rem; border-bottom: 1px solid #58728758;
  }
  .royal-panel-heading h2 {
    display: flex; align-items: center; gap: .6rem; min-width: 0; margin: 0;
    color: var(--royal-gold); font-size: clamp(1.07rem, 1.46vw, 1.5rem); line-height: 1.17;
  }
  .royal-panel-heading h2 .icon { width: 1.3em; height: 1.3em; }
  .royal-profile-user { display: flex; align-items: center; gap: .95rem; margin: 1.35rem .2rem 1.6rem; }
  .royal-profile-frame { position: relative; flex: none; }
  .royal-avatar-large { width: 5.37rem; height: 5.37rem; }
  .royal-profile-crown {
    position: absolute; right: -.2rem; bottom: -.25rem; width: 1.8rem; height: 1.8rem;
    padding: .17rem; border-radius: 50%; object-fit: contain; border: 1px solid #ffd869; background: #08152a;
  }
  .royal-profile-data { min-width: 0; }
  .royal-profile-data p { margin: 0 0 .45rem; }
  #royal-profile-nickname { overflow-wrap: anywhere; font-size: 1.28rem; font-weight: 700; }
  .royal-secondary {
    display: flex; align-items: center; justify-content: center; gap: .8rem; width: 100%;
    min-height: 2.92rem; margin-bottom: 1.07rem; padding: .35rem .6rem; text-align: center;
    border: 1px solid #4d80b0; border-radius: 1.12rem;
    background: linear-gradient(#0c2649, #04152c 75%);
    box-shadow: inset 0 0 .7rem #0d3b6655;
  }
  .royal-welcome {
    grid-area: welcome; display: grid; align-items: center; min-height: 8.65rem;
    padding: 1rem clamp(16px, 2.85vw, 3.2rem); overflow: clip; --panel-radius: 1.9rem;
  }
  .royal-welcome::before {
    content: ""; position: absolute; inset: 0 0 0 auto; z-index: -1; width: 61%;
    background: url('/assets/banners/royal-welcome.webp') right center / 100% 100% no-repeat;
    mask-image: linear-gradient(90deg, transparent, #000 25%);
  }
  .royal-welcome-light {
    position: absolute; inset: 0 -12% 0 22%; z-index: -1; pointer-events: none;
    background:
      radial-gradient(ellipse 30% .34rem at 73% 2%, #ffde9ba1, transparent),
      radial-gradient(ellipse 33% .6rem at 57% 100%, #178cffad, transparent),
      linear-gradient(112deg, transparent 32%, #9ee9ff0d 41%, #ffe7a739 46%, transparent 54%);
    mix-blend-mode: screen; opacity: .5;
  }
  .royal-welcome h1 {
    margin: 0 0 .25rem; color: #e5efff; font-size: clamp(1.7rem, 2.82vw, 3.45rem); line-height: 1.1;
    font-style: italic; font-weight: 800; text-shadow: 0 2px 0 #415b7a, 0 4px 14px #000b;
    overflow-wrap: anywhere;
  }
  .royal-welcome h1 span { color: #ffd576; text-shadow: 0 3px 0 #5c3925, 0 0 .85rem #ffaa2352; }
  .royal-welcome p { margin: 0; color: #eef4ff; font-size: clamp(1rem, 1.62vw, 1.75rem); line-height: 1.25; text-shadow: 0 2px 5px #040d1d; }
  .royal-welcome-copy { max-width: 65%; }
  .royal-games { grid-area: games; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .66rem; }
  .royal-game {
    min-height: 15.55rem; display: grid; grid-template-rows: minmax(0, 1fr) auto;
    align-items: center; justify-items: center; padding: .17rem .38rem 1.15rem; overflow: hidden;
  }
  .royal-game > img {
    display: block; width: 100%; height: auto; aspect-ratio: 309/182; object-fit: contain;
    mask-image: linear-gradient(90deg, transparent, #000 13%, #000 87%, transparent),
      linear-gradient(180deg, transparent, #000 9%, #000 86%, transparent);
    mask-composite: intersect;
    mix-blend-mode: screen;
  }
  .royal-game::before {
    content: ""; position: absolute; inset: 0 0 2.7rem; z-index: 1; pointer-events: none;
    background: linear-gradient(112deg, transparent 35%, #b0e7ff0a 42%, #dbf7ff3b 49%, #ffdca421 52%, transparent 61%);
    mix-blend-mode: screen;
    opacity: 0; transform: translateX(-85%);
  }
  .royal-game-action {
    width: 69%; min-width: 7.2rem; height: 2.62rem;
    gap: .7rem; font-size: max(15px, 1.27rem); margin-top: .23rem;
  }
  .royal-game-action .icon { color: #45f0ff; width: 1.25em; height: 1.25em; }
  .royal-summary-grid {
    display: grid; grid-template-columns: 1.12fr 1.07fr 1.07fr 1fr;
    gap: .85rem; margin-top: .85rem;
  }
  .summary-panel { display: flex; flex-direction: column; min-height: 17rem; padding: .14rem 1.16rem 1.1rem; }
  .royal-summary-list { display: flex; flex-direction: column; gap: .58rem; min-width: 0; margin: .73rem 0 .8rem; }
  .royal-summary-action { width: 95%; height: 2.68rem; margin: auto auto 0; white-space: nowrap; font-size: max(13px,1rem); gap: .45rem; }
  .royal-empty { margin: .39rem 0; color: #afc5de; font-size: .95rem; line-height: 1.5; }
  .royal-row {
    width: 100%; display: flex; align-items: center; gap: .52rem; padding: .36rem .42rem;
    border-radius: .95rem; border: 1px solid #4273a052; background: #09213b;
    color: #f0f7ff; min-width: 0; text-align: left; font: inherit;
  }
  .royal-row-label { min-width: 0; overflow-wrap: anywhere; flex: 1; }
  .royal-row .icon { color: #ffe18b; }
  .royal-row-avatar { width: 2rem; height: 2rem; flex: none; border-radius: 50%; object-fit: cover; border: 1px solid #ffda75; }
  .royal-row-medal { width: 2.02rem; height: 2.05rem; object-fit: contain; }
  .royal-row-diamonds { color: #caecff; font-variant-numeric: tabular-nums; white-space: nowrap; }
  .royal-row time { display: block; font-size: .85em; color: #b7cce7; margin-top: .18rem; }
  .royal-footer {
    position: relative; display: grid; place-items: center; isolation: isolate;
    flex: none; height: clamp(2.6rem, 7svh, 5rem); margin: auto auto 0;
    width: min(100%, 120rem); overflow: clip; pointer-events: none;
  }
  .royal-footer-track {
    position: absolute; inset: 0 clamp(12px, 3vw, 3rem); z-index: -1;
    background:
      linear-gradient(90deg, transparent, #257bc344 20%, #6dbdf0aa 49%, #6dbdf0aa 51%, #257bc344 80%, transparent) center calc(50% - 4px) / 100% 1px no-repeat,
      linear-gradient(90deg, transparent, #31558a 20%, #9c7138 34%, #ffdc87 48%, #ffdc87 52%, #9c7138 66%, #31558a 80%, transparent) center / 100% 1px no-repeat,
      radial-gradient(ellipse 30% 19% at center, #b385352e, transparent);
  }
  .royal-footer-track::after {
    content: ""; position: absolute; inset: 0 39%;
    background: radial-gradient(ellipse 50% .38rem at center, #fff2bf 3%, #ffbf5cab 18%, transparent 91%) center / min(100%, 13rem) 100% no-repeat;
    opacity: .65;
  }
  .royal-footer-diamond {
    display: block; width: clamp(2rem, 5.5svh, 3.6rem); height: auto;
    filter: drop-shadow(0 0 .48rem #ffab4291);
  }
  .royal-dialog { width: min(30rem, 92vw); }
  .royal-dialog > form + form, .royal-dialog form button, .royal-dialog label, .royal-dialog input { margin-top: .65rem; }
  .royal-dialog input:not([type="checkbox"]) {
    display: block; width: 100%; padding: .65rem; border: 1px solid #3a7cac; border-radius: .6rem; color: #f6fbff; background: #0b2340;
  }
  .royal-dialog:has(#royal-avatar-editor:not([hidden])) {
    border-color: #b48a42;
    background: linear-gradient(155deg, #142a49, #080f23 75%);
  }
  #royal-nickname-help, #royal-avatar-help { color: #b7cce7; font-size: .82rem; line-height: 1.45; }
  #royal-nickname-help:not([hidden]) { display: block; margin-top: .35rem; }
  #royal-avatar-editor { margin-top: 1.25rem; }
  #royal-avatar-title { color: #ffe18b; font-size: 1rem; margin: 0 0 .5rem; }
  .royal-avatar-drop {
    display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center;
    gap: .85rem; padding: .8rem; border: 1px dashed #9f8250; border-radius: .8rem;
    background: #0a1933;
  }
  .royal-avatar-drop[data-dragging] { background: #26334a; border-color: #ffe18b; }
  #royal-avatar-preview { width: clamp(3.4rem, 16vw, 4.75rem); height: auto; aspect-ratio: 1; border-radius: 50%; border: 2px solid #e6bf62; object-fit: cover; }
  .royal-avatar-controls { display: grid; justify-items: start; gap: .3rem; }
  .royal-avatar-controls #royal-avatar-pick { margin: 0; padding: .45rem .65rem; line-height: 1.15; }
  #royal-avatar-filename { font-size: .8rem; color: #ffe18b; overflow-wrap: anywhere; }
  #royal-avatar-filename:empty, #royal-dialog-message:empty, #royal-dialog-status:empty { display: none; }
  #royal-avatar-remove { color: #ffd0bd; text-align: left; }
  .royal-dialog-actions { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: .65rem; margin-top: .65rem; }
  .royal-dialog-actions .action { width: auto; margin-top: 0; padding-inline: 1rem; }
  #royal-dialog-status[data-type="pending"] { color: #ffe18b; background: #342a19; }
  #royal-edit-save:not([hidden]), #royal-dialog-close { min-width: 6.25rem; }
  #royal-edit[aria-busy="true"] ~ .royal-dialog-actions #royal-edit-save { cursor: progress; }
  #royal-dialog-list { display: grid; gap: .45rem; max-height: 45svh; overflow: auto; }
  @media (max-width: 1200px) {
    .dashboard-bar { grid-template-columns: minmax(120px, 12rem) minmax(0, 1fr) auto; gap: 1rem; }
    .royal-nav button { gap: .3rem; }
    .royal-nav button .icon { width: 1.25em; height: 1.25em; }
    .royal-main-grid { grid-template-columns: minmax(155px, 13.8rem) minmax(0, 1fr); }
    .royal-profile-user { gap: .63rem; }
    .royal-avatar-large { width: 4.2rem; height: 4.2rem; }
    .royal-game { min-height: 12.85rem; }
    .royal-game-action { min-width: 5.5rem; }
    .royal-summary-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .summary-panel { padding-inline: .72rem; }
  }
  @media (max-width: 900px) {
    .dashboard-bar { grid-template-columns: minmax(105px, 13rem) minmax(0, 1fr); padding-bottom: .7rem; }
    .royal-nav { grid-row: 2; grid-column: 1 / -1; }
    .royal-nav::before, .royal-nav::after { display: none; }
    .dashboard-account { justify-self: end; }
    .royal-main-grid { grid-template-columns: minmax(160px, 14rem) minmax(0, 1fr); }
    .royal-games, .royal-summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .royal-game { min-height: 0; }
    .royal-summary-grid { margin-top: 1rem; }
  }
  @media (max-width: 560px) {
    .dashboard-bar { gap: .65rem .35rem; padding-inline: 10px; min-height: 5.35rem; }
    .royal-brand { max-width: 10.5rem; }
    .dashboard-avatar { width: 2.05rem; height: 2.05rem; }
    .dashboard-account, .royal-account-menu summary { gap: .34rem; }
    .royal-account-menu summary .icon { width: .85em; }
    #dashboard-nickname { max-width: 8ch; }
    .royal-header-balance { padding-inline: .35rem; font-size: .88rem; }
    .royal-header-balance .diamond-icon { width: 1.15rem; }
    .notification-button { min-width: 1.7rem; }
    .notification-button .icon { width: 1.35rem; }
    .royal-nav button { flex: 1; flex-direction: column; gap: .24rem; padding: .36rem .15rem; border-radius: .85rem; font-size: max(10px,.76rem); }
    .dashboard-content { padding: 1rem .68rem 0; }
    .royal-main-grid { grid-template-columns: minmax(0,1fr); grid-template-areas: "welcome" "games" "profile"; gap: .68rem; }
    .royal-welcome { min-height: 8.4rem; --panel-radius: 1.35rem; padding-inline: .95rem; }
    .royal-welcome-copy { max-width: 68%; }
    .royal-welcome::before {
      width: 72%; opacity: .59; background-size: auto 100%; background-position: 74% center;
      mask-image: linear-gradient(90deg, transparent, #0008 26%, #000 63%);
    }
    .royal-welcome h1 { font-size: clamp(1.5rem, 6vw, 2.35rem); }
    .royal-welcome p { font-size: 1rem; }
    .royal-profile { padding-bottom: .3rem; }
    .royal-profile::before { inset: 3.6rem .75rem auto auto; width: 8.5rem; height: 4rem; opacity: .55; }
    .royal-profile-user { margin: .75rem .25rem; }
    .royal-secondary { margin-bottom: .68rem; }
    .royal-games { gap: .55rem; }
    .royal-game { --panel-radius: 1.25rem; padding-bottom: .7rem; }
    .royal-game-action { height: 2.22rem; width: 77%; gap: .3rem; }
    .royal-summary-grid { grid-template-columns: minmax(0, 1fr); gap: .65rem; }
    .summary-panel { min-height: 10.9rem; padding-inline: .92rem; }
    .royal-footer { height: 2.65rem; }
  }
  @media (max-width: 350px) {
    .royal-account-menu summary .icon { display: none; }
    #dashboard-nickname { max-width: 6ch; }
  }
  @media (min-width: 901px) and (max-height: 760px) {
    .dashboard-bar { min-height: 5.15rem; }
    .royal-welcome { min-height: 7.3rem; }
    .royal-profile { padding-bottom: 3.5rem; }
    .royal-profile::before { height: 3.8rem; bottom: .45rem; }
    .royal-profile-user { margin-block: .85rem 1.1rem; }
    .royal-game { min-height: 11.65rem; padding-bottom: .75rem; }
    .royal-game > img { max-height: clamp(7rem, 21svh, 11rem); }
    .summary-panel { min-height: clamp(11rem, 26svh, 14rem); }
    .royal-footer { height: 2.8rem; }
  }

  .royal-game:focus-within { --royal-border: #e9bd70; }
  .dashboard button:focus-visible, .royal-account-menu summary:focus-visible {
    outline: 2px solid #b0edff; outline-offset: 3px;
  }
  .royal-game-action, .royal-summary-action { overflow: clip; }
  .royal-game-action::before, .royal-summary-action::before {
    content: ""; position: absolute; inset: 0; pointer-events: none;
    background: linear-gradient(110deg, transparent 33%, #a2ecff22 40%, #e7faff72 49%, transparent 62%);
    opacity: 0; transform: translateX(-100%);
  }
  .royal-summary-action::before {
    background: linear-gradient(110deg, transparent 33%, #ffce731a 42%, #ffe7a16b 49%, transparent 62%);
  }
  @media (hover: hover) {
    .royal-game:hover { --royal-border: #e9bd70; box-shadow: inset 0 1px #f5ca8a60, 0 0 1.15rem #1186cb61; }
    .dashboard .royal-secondary:hover, .dashboard .royal-icon-button:hover {
      background-color: #2985c929; box-shadow: 0 0 .75rem #239de34d;
    }
  }

  @media (prefers-reduced-motion: no-preference) {
    .dashboard:not([data-effects="off"]) .royal-atmosphere::before { animation: royal-wave-drift 24s ease-in-out infinite alternate; }
    .dashboard:not([data-effects="off"]) .royal-atmosphere::after { animation: royal-mote-drift 30s ease-in-out infinite alternate; }
    .dashboard:not([data-effects="off"]) .dashboard-header::after { animation: royal-track-sweep 13s ease-in-out infinite; }
    .dashboard:not([data-effects="off"]) .royal-footer-track::after { animation: royal-track-sweep 15s ease-in-out -3s infinite; }
    .dashboard:not([data-effects="off"]) .royal-footer-diamond { animation: royal-gem-pulse 6.5s ease-in-out infinite alternate; }
    .dashboard:not([data-effects="off"]) .royal-brand::after { animation: royal-crown-glow 9s ease-in-out -2s infinite; }
    .dashboard:not([data-effects="off"]) .royal-profile-crown { animation: royal-crown-pulse 7s ease-in-out -2s infinite alternate; }
    .dashboard:not([data-effects="off"]) :is(.royal-avatar-large, .dashboard-avatar) { animation: royal-avatar-glow 8s ease-in-out infinite alternate; }
    .dashboard:not([data-effects="off"]) :is(.royal-header-balance, .royal-profile-balance) .diamond-icon { animation: royal-blue-gem 6.5s ease-in-out infinite alternate; }
    .dashboard:not([data-effects="off"]) .royal-welcome-light { animation: royal-banner-light 12s ease-in-out infinite alternate; }
    .dashboard:not([data-effects="off"]) .royal-panel::after {
      display: block; animation: royal-rim-travel var(--rim-time, 21s) linear var(--rim-delay, -3s) infinite;
    }
    .royal-welcome { --rim-time: 27s; --rim-delay: -12s; }
    .royal-games > :nth-child(2), .royal-summary-grid > :nth-child(3) { --rim-delay: -10s; }
    .royal-games > :nth-child(3), .royal-summary-grid > :nth-child(2) { --rim-delay: -14s; }
    .royal-games > :nth-child(4), .royal-summary-grid > :nth-child(4) { --rim-delay: -17s; }
    .dashboard:not([data-effects="off"]) :is(.royal-profile, .royal-welcome, .royal-game, .summary-panel) {
      animation: royal-panel-enter .48s var(--royal-ease) var(--enter-delay, 0ms) backwards;
    }
    .royal-welcome { --enter-delay: 34ms; }
    .royal-game { --enter-delay: 72ms; }
    .royal-games > :nth-child(2) { --enter-delay: 108ms; }
    .royal-games > :nth-child(3) { --enter-delay: 144ms; }
    .royal-games > :nth-child(4) { --enter-delay: 180ms; }
    .summary-panel { --enter-delay: 158ms; }
    .royal-summary-grid > :nth-child(even) { --enter-delay: 196ms; }
    .dashboard:not([data-effects="off"]) .royal-game-action::before { animation: royal-button-sheen 8.5s var(--royal-ease) var(--rim-delay, -3s) infinite; }
    .dashboard:not([data-effects="off"]) .royal-summary-action:is(:hover,:focus-visible)::before { animation: royal-button-sheen 1.1s var(--royal-ease); }
    .dashboard:not([data-effects="off"]) .royal-game {
      transition: box-shadow .38s ease, border-color .38s ease;
    }
    .dashboard:not([data-effects="off"]) .royal-game > img { transition: transform .55s var(--royal-ease); }
    .dashboard:not([data-effects="off"]) .royal-game:focus-within > img { transform: translateY(-.13rem) scale(1.045); }
    .dashboard:not([data-effects="off"]) .royal-game:focus-within::before { animation: royal-art-sheen 1.15s var(--royal-ease) both; }
    @media (hover: hover) {
      .dashboard:not([data-effects="off"]) .royal-game:hover > img { transform: translateY(-.18rem) scale(1.055); }
      .dashboard:not([data-effects="off"]) .royal-game:hover::before { animation: royal-art-sheen 1.15s var(--royal-ease) both; }
    }
    .dashboard:not([data-effects="off"]) .royal-dialog[open],
    .dashboard:not([data-effects="off"]) .royal-account-menu[open] .royal-account-dropdown {
      animation: royal-dialog-enter .32s var(--royal-ease) both;
    }
    .dashboard:not([data-effects="off"]) .royal-dialog[open]::backdrop { animation: royal-backdrop-in .28s ease-out both; }
  }
  @keyframes royal-wave-drift { from { transform: translate(-1.8%, -1.3%) scale(1.01); opacity: .53; } to { transform: translate(2.2%, 2.4%) scale(1.07); opacity: .8; } }
  @keyframes royal-mote-drift { from { transform: translate(-1.5%, 2%); opacity: .35; } to { transform: translate(2%, -2.3%); opacity: .68; } }
  @keyframes royal-track-sweep { 0% { transform: translateX(-236%); opacity: 0; } 16%, 80% { opacity: calc(.9 * var(--royal-effects-strength,1)); } 100% { transform: translateX(236%); opacity: 0; } }
  @keyframes royal-gem-pulse { from { transform: scale(.96); } to { transform: scale(1.095); } }
  @keyframes royal-crown-glow { 0%, 100% { transform: translate(-50%, -50%) scale(.8); opacity: .23; } 56% { transform: translate(-50%, -50%) scale(1.25); opacity: .7; } }
  @keyframes royal-crown-pulse { from { filter: drop-shadow(0 0 .08rem #edb2634d); } to { filter: drop-shadow(0 0 .38rem #ffcc769c); } }
  @keyframes royal-avatar-glow { from { filter: drop-shadow(0 0 .05rem #df8a2d24); } to { filter: drop-shadow(0 0 .43rem #efb36481); } }
  @keyframes royal-blue-gem { from { transform: scale(.96); filter: drop-shadow(0 0 .18rem #37aaff71); } to { transform: scale(1.09); filter: drop-shadow(0 0 .37rem #7ae2ffaa); } }
  @keyframes royal-banner-light { from { transform: translateX(-13%) skewX(-8deg); opacity: calc(.35 * var(--royal-effects-strength,1)); } to { transform: translateX(13%) skewX(-8deg); opacity: calc(.86 * var(--royal-effects-strength,1)); } }
  @keyframes royal-rim-travel { 0% { offset-distance: 0%; opacity: calc(.66 * var(--royal-effects-strength,1)); } 48% { opacity: calc(.98 * var(--royal-effects-strength,1)); } 100% { offset-distance: 100%; opacity: calc(.66 * var(--royal-effects-strength,1)); } }
  @keyframes royal-panel-enter { from { opacity: 0; transform: translateY(.55rem); } to { opacity: 1; transform: translateY(0); } }
  @keyframes royal-button-sheen { 0% { transform: translateX(-100%); opacity: 0; } 8% { opacity: .82; } 23%, 100% { transform: translateX(100%); opacity: 0; } }
  @keyframes royal-art-sheen { from { transform: translateX(-85%); opacity: 0; } 42% { opacity: .9; } to { transform: translateX(85%); opacity: 0; } }
  @keyframes royal-dialog-enter { from { transform: translateY(9px) scale(.985); opacity: 0; } to { transform: translateY(0) scale(1); opacity: 1; } }
  @keyframes royal-backdrop-in { from { opacity: 0; } to { opacity: 1; } }

  .dashboard[data-particles="off"] .royal-atmosphere::after,
  .dashboard[data-performance="on"] .royal-atmosphere::after {
    animation: none; opacity: .22;
  }
  .dashboard[data-performance="on"] :is(.royal-panel, .royal-atmosphere, .dashboard-header, .royal-footer-track, .royal-brand, .royal-game-action)::after,
  .dashboard[data-performance="on"] :is(.royal-atmosphere, .royal-game, .royal-game-action)::before,
  .dashboard[data-performance="on"] :is(.royal-footer-diamond, .royal-welcome-light, .royal-avatar-large, .dashboard-avatar, .royal-profile-crown, .diamond-icon),
  .dashboard[data-interface-motion="off"] :is(.royal-panel, .royal-dialog, .royal-account-dropdown) {
    animation: none !important;
  }
  .dashboard[data-interface-motion="off"] .royal-game > img,
  .dashboard[data-performance="on"] .royal-game > img { transform: none !important; transition: none !important; }
  .dashboard[data-interface-motion="off"] .royal-game::before { animation: none !important; }
  .dashboard .royal-atmosphere { opacity: var(--royal-effects-strength,1); }
}

#sanction{width:min(480px,calc(100vw - 28px));color:#fff1d2;background:radial-gradient(ellipse at 50% 0,#18335b,#050e20 68%);border:1px solid #dfab50;border-radius:17px;padding:24px;box-shadow:0 0 28px #d996454a}
#sanction::backdrop{background:#020612cf}
#sanction p{white-space:pre-wrap;overflow-wrap:anywhere}
.sanction-crown{object-fit:contain;margin-bottom:9px;filter:drop-shadow(0 0 10px #fcb94f8a)}
