/* RAZ Game — alternate visual system. Loaded only when html[data-design="new"] is active. */
html[data-design="new"] {
  color-scheme: dark;
  --next-bg: #080d17;
  --next-bg-soft: #0d1624;
  --next-panel: #111d2b;
  --next-panel-hi: #172638;
  --next-line: #26394b;
  --next-ink: #edf8fb;
  --next-muted: #9bb2c0;
  --next-teal: #78efdf;
  --next-blue: #80cfff;
  --next-violet: #b59cff;
  --next-gold: #f8d58a;
  --next-red: #ff8c8b;
  --next-shadow: 0 22px 70px #0008;
  --next-radius: 20px;
  --bg: var(--next-bg);
  --panel: var(--next-panel);
  --panel2: var(--next-panel-hi);
  --line: var(--next-line);
  --ink: var(--next-ink);
  --muted: var(--next-muted);
  --cyan: var(--next-teal);
  --red: var(--next-red);
  --gold: var(--next-gold);
  --purple: var(--next-violet);
  --shadow: var(--next-shadow);
  background: var(--next-bg);
  scroll-behavior: smooth;
}

html[data-design="new"] body {
  background:
    radial-gradient(ellipse at 72% -8%, #1b4b5961, transparent 38%),
    radial-gradient(ellipse at 4% 55%, #283d6527, transparent 35%),
    linear-gradient(180deg, #090f1a, #080d17 55%, #0b111e);
  color: var(--next-ink);
  letter-spacing: .005em;
}

html[data-design="new"] ::selection { background: #68dfd94d; color: #fff; }
html[data-design="new"] h1,
html[data-design="new"] h2,
html[data-design="new"] h3 { text-wrap: balance; }
html[data-design="new"] p { color: var(--next-muted); }
html[data-design="new"] .main { padding-top: 19px; }
html[data-design="new"] .sidebar {
  background: linear-gradient(180deg, #0b1420f5, #0b111df7);
  border-right-color: #8bd3e01c;
  box-shadow: 12px 0 42px #0002;
  backdrop-filter: blur(20px);
}
html[data-design="new"] .brand { padding-bottom: 25px; font-size: 24px; }
html[data-design="new"] .brand img { filter: drop-shadow(0 0 12px #7bead788); }
html[data-design="new"] .brand span span,
html[data-design="new"] .accent { color: var(--next-teal); }
html[data-design="new"] .side-label { color: #668596; letter-spacing: .2em; }
html[data-design="new"] .nav-list { gap: 5px; }
html[data-design="new"] .nav-button {
  min-height: 44px; border-radius: 13px; color: #a9bfca;
  transition: background .22s ease, border-color .22s ease, color .22s ease, transform .22s ease;
}
html[data-design="new"] .nav-button:hover { background: #162737; color: #e7ffff; transform: translateX(2px); }
html[data-design="new"] .nav-button.active {
  background: linear-gradient(105deg, #1c3a43, #172b39 75%);
  border-color: #68d7d743; color: #e4ffff;
  box-shadow: inset 3px 0 var(--next-teal), 0 8px 24px #00101555;
}
html[data-design="new"] .nav-button.active .glyph { color: var(--next-teal); }
html[data-design="new"] .season-card {
  border-color: #3a5867; border-radius: 17px;
  background: radial-gradient(circle at 100% 0, #52778b33, transparent 60%), #122230;
  box-shadow: inset 0 1px #ffffff08;
}
html[data-design="new"] .season-card button { background: #193d46; border-color: #4c9d9a; color: #d9fffa; }
html[data-design="new"] .topbar { border-bottom-color: #a7d6e018; min-height: 51px; }
html[data-design="new"] .topbar-title { color: #89a8b9; letter-spacing: .16em; }
html[data-design="new"] .level-pill,
html[data-design="new"] .profile-pill,
html[data-design="new"] .icon-button,
html[data-design="new"] .back-button {
  border-color: #2d4355; background: #101c2a; color: #d9ebf1;
  box-shadow: 0 6px 20px #0002;
}
html[data-design="new"] .level-pill:hover,
html[data-design="new"] .profile-pill:hover,
html[data-design="new"] .icon-button:hover,
html[data-design="new"] .back-button:hover { border-color: #63c8c2; background-color: #142632; }
html[data-design="new"] .page { max-width: 1450px; }

html[data-design="new"] .eyebrow,
html[data-design="new"] .next-kicker {
  color: var(--next-teal); font-size: 10px; font-weight: 900;
  letter-spacing: .22em; text-transform: uppercase;
}
html[data-design="new"] .page-head { margin-top: 32px; }
html[data-design="new"] .page-head h2 { letter-spacing: -.055em; }
html[data-design="new"] .page-head p { max-width: 720px; }
html[data-design="new"] .button,
html[data-design="new"] .button-quiet,
html[data-design="new"] .button-outline {
  min-height: 44px; border-radius: 13px; padding-inline: 17px;
  border-color: #314a5d; background: #132130; color: #d8eaf0;
  font-weight: 760; transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease, filter .2s ease;
}
html[data-design="new"] .button:hover,
html[data-design="new"] .button-quiet:hover,
html[data-design="new"] .button-outline:hover { transform: translateY(-2px); border-color: #79cbd0; box-shadow: 0 10px 24px #0004; }
html[data-design="new"] .button.primary {
  color: #06181d; border-color: transparent;
  background: linear-gradient(110deg, #73eddb, #a8f0c8 55%, #a6ddf4);
  box-shadow: 0 8px 28px #55d6c52b, inset 0 1px #ffffff9c;
}
html[data-design="new"] .button.primary:hover { filter: brightness(1.07); box-shadow: 0 12px 34px #55d6c54d; }
html[data-design="new"] .button.coral { color: #2a1017; background: linear-gradient(110deg, #ffb094, #ff8290); }
html[data-design="new"] .button:focus-visible,
html[data-design="new"] .button-quiet:focus-visible,
html[data-design="new"] .button-outline:focus-visible,
html[data-design="new"] .nav-button:focus-visible,
html[data-design="new"] .tab:focus-visible,
html[data-design="new"] button:focus-visible,
html[data-design="new"] input:focus-visible,
html[data-design="new"] select:focus-visible,
html[data-design="new"] textarea:focus-visible { outline: 2px solid #8ffff0; outline-offset: 3px; }

/* Home: theatrical landing hero, with the existing panorama as the world plate. */
html[data-design="new"] .next-hero {
  position: relative; isolation: isolate; display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(310px, .88fr);
  min-height: 510px; margin-top: 26px; overflow: hidden;
  border: 1px solid #5aa4af4d; border-radius: 30px;
  background: radial-gradient(ellipse at 83% 52%, #1f596229, transparent 38%), linear-gradient(125deg, #0a141f, #101d29 72%, #12252f);
  box-shadow: 0 35px 100px #0008, inset 0 1px #ffffff22;
}
html[data-design="new"] .next-hero::before {
  content: ""; position: absolute; z-index: -1; inset: 0;
  background:
    linear-gradient(90deg, #09121af7 0%, #0a151de8 34%, #0a151d9c 62%, #09131c45 100%),
    linear-gradient(0deg, #07111bf0 0%, transparent 40%, #07111b38 100%);
}
html[data-design="new"] .next-hero::after {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(ellipse at 73% 46%, #71dce02b, transparent 40%),
    linear-gradient(135deg, transparent 48%, #9df5eb0a 48.2%, transparent 48.8%);
}
html[data-design="new"] .next-hero-copy {
  position: relative; z-index: 2; align-self: center;
  padding: clamp(30px, 4vw, 56px); max-width: 790px;
}
html[data-design="new"] .next-kicker {
  display: inline-flex; align-items: center; gap: 9px; margin-bottom: 17px;
  padding: 8px 11px; border: 1px solid #75e3d344; border-radius: 999px;
  background: #082326ad; color: #a4fff1; backdrop-filter: blur(10px);
}
html[data-design="new"] .next-live-dot { width: 7px; height: 7px; flex: none; border-radius: 50%; background: var(--next-teal); box-shadow: 0 0 13px var(--next-teal); }
html[data-design="new"] .next-hero h1 {
  max-width: 720px; margin: 0 0 14px; font-size: clamp(38px, 4vw, 60px);
  font-weight: 820; letter-spacing: -.07em; line-height: 1.02;
  text-shadow: 0 6px 32px #0008;
}
html[data-design="new"] .next-hero h1 em {
  color: transparent; font-style: normal;
  background: linear-gradient(100deg, #83fff0 5%, #baf4e2 38%, #b5d9ff 82%);
  background-clip: text; -webkit-background-clip: text;
}
html[data-design="new"] .next-hero-copy > p {
  max-width: 590px; margin: 0; color: #c1d7de; font-size: clamp(14px, 1.3vw, 17px); line-height: 1.75;
}
html[data-design="new"] .next-hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 11px; margin-top: 22px; }
html[data-design="new"] .next-hero-actions .button { min-height: 49px; padding-inline: 21px; }
html[data-design="new"] .next-hero-actions .button-outline { background: #0916227a; border-color: #b8e6ed42; }
html[data-design="new"] .next-hero-stats { display: flex; align-items: center; gap: 0; margin-top: 21px; }
html[data-design="new"] .next-hero-stat {
  position: static; display: flex; align-items: baseline; gap: 7px; padding: 0 17px;
  border: 0; border-left: 1px solid #c2e5e42e; border-radius: 0; background: transparent;
  box-shadow: none; backdrop-filter: none; color: #b7cbd1;
}
html[data-design="new"] .next-hero-stat:first-child { padding-left: 0; border-left: 0; }
html[data-design="new"] .next-hero-stat b { color: #e8ffff; font-size: 19px; letter-spacing: -.05em; }
html[data-design="new"] .next-hero-stat span { color: #98b2bd; font-size: 11px; }
html[data-design="new"] .next-hero-stat::before { display: none; }
html[data-design="new"] .next-hero-art {
  position: relative; align-self: stretch; min-height: 420px; display: grid; place-items: center;
  perspective: 800px; isolation: isolate; overflow: hidden;
  border-left: 1px solid #8ddbd12a;
  background: linear-gradient(135deg, #13303a, #101d2b 85%);
}
html[data-design="new"] .next-world-image {
  position: absolute; z-index: 1; top: 50%; left: -15%; width: 130%; height: auto; max-width: none;
  object-fit: contain; object-position: center; opacity: .97; transform: translateY(-50%);
  filter: saturate(.91) contrast(1.06) drop-shadow(0 24px 38px #0009);
}
html[data-design="new"] .next-orbit-ring {
  position: absolute; z-index: 2; right: -9%; bottom: -24%; width: min(34vw, 400px); aspect-ratio: 1;
  border: 1px solid #b6f5ee65; border-radius: 50%; pointer-events: none;
  transform: rotateX(69deg) rotate(-24deg); box-shadow: 0 0 25px #61e7db24, inset 0 0 22px #61e7db14;
}
html[data-design="new"] .next-art-label {
  position: absolute; z-index: 3; right: 22px; bottom: 22px; display: grid; gap: 7px; max-width: 235px; padding: 14px 17px;
  border: 1px solid #b8e9eb52; border-radius: 13px; color: #e9ffff;
  background: #0a1b25d9; font-size: 9px; font-weight: 900; letter-spacing: .12em;
  box-shadow: 0 10px 24px #0005; backdrop-filter: blur(10px);
}
html[data-design="new"] .next-art-label span { color: #b4d1d7; }
html[data-design="new"] .next-art-label b { font-size: 22px; letter-spacing: -.06em; }
html[data-design="new"] .next-art-label em { color: var(--next-teal); font-weight: 600; }
html[data-design="new"] .next-world-content { display: grid; align-content: start; gap: 7px; padding: 19px 20px 22px; text-align: left; }
html[data-design="new"] .next-section-heading { margin: 47px 0 18px; }
html[data-design="new"] .next-section-heading .next-kicker { margin-bottom: 10px; }
html[data-design="new"] .next-section-heading h2 { margin: 0 0 7px; font-size: clamp(27px, 3vw, 38px); letter-spacing: -.055em; }
html[data-design="new"] .next-section-heading p { margin: 0; }
html[data-design="new"] .next-world-strip {
  position: relative; z-index: auto; inset: auto; display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px;
}
html[data-design="new"] .next-world-card {
  display: flex; min-width: 0; flex-direction: column; gap: 0; padding: 0; overflow: hidden;
  border: 1px solid #355061; border-radius: 19px; color: #f2ffff; text-align: left;
  background: linear-gradient(155deg, #182b3a, #101c29 85%); backdrop-filter: none;
  box-shadow: 0 12px 30px #0003; transform: translateY(0);
  transition: transform .25s ease, border-color .25s ease, background .25s ease, box-shadow .25s ease;
}
html[data-design="new"] .next-world-card img {
  display: block; width: 100%; height: clamp(145px, 15vw, 210px); max-width: none;
  object-fit: cover; border-radius: 0; box-shadow: none;
  mask-image: linear-gradient(180deg, #000 65%, #0000 100%);
  transition: transform .5s cubic-bezier(.2,.8,.2,1), filter .4s;
}
html[data-design="new"] .next-world-card:hover img { transform: scale(1.055); filter: saturate(1.15); }
html[data-design="new"] .next-world-card.earth { --world-accent: #82db9d; }
html[data-design="new"] .next-world-card.heaven { --world-accent: #8bcbff; }
html[data-design="new"] .next-world-card.hell { --world-accent: #ff9386; }
html[data-design="new"] .next-world-card { border-bottom: 2px solid var(--world-accent, #82db9d); }
html[data-design="new"] .next-world-content .next-kicker { margin-bottom: 0; padding: 0; border: 0; border-radius: 0; background: transparent; backdrop-filter: none; color: var(--world-accent); font-size: 9px; }
html[data-design="new"] .next-world-content h3 { display: flex; justify-content: space-between; gap: 12px; align-items: center; margin: 0; font-size: 23px; letter-spacing: -.045em; }
html[data-design="new"] .next-world-content h3 span { color: var(--world-accent); font-size: 16px; transition: transform .2s ease; }
html[data-design="new"] .next-world-card:hover .next-world-content h3 span { transform: translate(3px,-3px); }
html[data-design="new"] .next-world-content > b { color: #dff5f6; font-size: 13px; }
html[data-design="new"] .next-world-content p { margin: 0; font-size: 12px; line-height: 1.6; }
html[data-design="new"] .next-journey { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-top: 24px; }
html[data-design="new"] .next-journey .next-kicker { margin-bottom: 10px; }
html[data-design="new"] .next-journey h2 { margin: 0 0 8px; font-size: clamp(22px, 3vw, 32px); }
html[data-design="new"] .next-journey p { margin: 0; max-width: 600px; }
html[data-design="new"] .next-journey .button-row { flex: none; }
html[data-design="new"] .next-hero-art::before {
  content: ""; position: absolute; width: min(35vw, 410px); aspect-ratio: 1; border-radius: 50%;
  border: 1px solid #9ef6e458; box-shadow: 0 0 0 18px #87ebdd08, 0 0 0 42px #87ebdd08,
    0 0 0 74px #87ebdd07, inset 0 0 80px #82e6e91d, 0 0 75px #64dee33b;
  background: radial-gradient(circle at 40% 32%, #a1fff02b, transparent 58%);
  animation: next-orbit-breathe 7s ease-in-out infinite;
}
html[data-design="new"] .next-hero-art::after {
  content: ""; position: absolute; width: min(28vw, 316px); aspect-ratio: 1; border-radius: 50%;
  border: 1px dashed #bceaff69; transform: rotateX(67deg) rotate(-25deg);
  box-shadow: 0 0 26px #7fe9e921; animation: next-orbit-turn 24s linear infinite;
}
html[data-design="new"] .next-world-card:hover { transform: translateY(-5px); border-color: #8ffff0; background: #122b32e8; }
html[data-design="new"] .motion-replay {
  position: absolute; right: 17px; top: 17px; z-index: 4; display: inline-flex; align-items: center; gap: 7px;
  padding: 8px 10px; border: 1px solid #b1e3e44c; border-radius: 99px;
  background: #06141dbb; color: #c3e5e9; font-size: 11px; font-weight: 800; backdrop-filter: blur(9px);
  transition: border-color .2s ease, color .2s ease, transform .2s ease;
}
html[data-design="new"] .motion-replay:hover { color: #fff; border-color: var(--next-teal); transform: rotate(-4deg); }
html[data-design="new"] .motion-replay::before { content: none; }

/* Shared surfaces and content cards. */
html[data-design="new"] .panel {
  background: linear-gradient(145deg, #142333, #0f1a27 78%);
  border-color: #2a4052; border-radius: var(--next-radius);
  box-shadow: 0 12px 36px #0003, inset 0 1px #ffffff08;
}
html[data-design="new"] .pad { padding: clamp(17px, 2vw, 25px); }
html[data-design="new"] .section-title { margin: 36px 0 16px; }
html[data-design="new"] .section-title h2 { font-size: clamp(23px, 2.5vw, 29px); }
html[data-design="new"] .realm-card {
  min-height: 222px; padding: 22px; border-radius: 21px; border-color: #355461;
  background: linear-gradient(145deg, #142630, #111c27 72%); box-shadow: 0 14px 30px #0003;
  transition: transform .28s cubic-bezier(.2,.8,.2,1), border-color .28s, box-shadow .28s;
}
html[data-design="new"] .realm-card:hover { transform: translateY(-5px); border-color: #8ceade; box-shadow: 0 24px 46px #0005, 0 0 24px #62dfd80e; }
html[data-design="new"] .realm-card::before { opacity: .8; }
html[data-design="new"] .realm-card .realm-number { color: #a3c3ce; }
html[data-design="new"] .realm-card h3 { font-size: 26px; letter-spacing: -.04em; }
html[data-design="new"] .realm-card img { filter: drop-shadow(0 12px 25px #0008); transition: transform .35s cubic-bezier(.2,.9,.25,1), filter .35s; }
html[data-design="new"] .realm-card:hover img { transform: translateY(-5px) scale(1.1) rotate(-4deg); filter: drop-shadow(0 0 16px #b2fff075); }
html[data-design="new"] .stat-card { border-radius: 16px; background: linear-gradient(145deg, #172a39, #111d2a); }
html[data-design="new"] .stat-card b { color: #e9ffff; }
html[data-design="new"] .info-strip { border-color: #8c71484d; background: linear-gradient(110deg, #302b24, #1e2529); }
html[data-design="new"] .callout { background: #132c34; color: #d3f7f4; border-color: var(--next-teal); }
html[data-design="new"] .feature-list li { color: #c9dbe2; }
html[data-design="new"] .tab {
  border-color: #2e4659; border-radius: 12px; background: #101e2c; color: #9eb8c5;
  transition: background .2s ease, color .2s ease, border-color .2s ease, transform .2s ease;
}
html[data-design="new"] .tab:hover { color: #eaffff; border-color: #6cbab9; transform: translateY(-1px); }
html[data-design="new"] .tab.active { background: linear-gradient(110deg, #7cebdc, #a9e9dc); color: #092028; border-color: transparent; box-shadow: 0 5px 17px #4dd5ca22; }
html[data-design="new"] .rule-article { line-height: 1.7; }
html[data-design="new"] .rule-article h3 { color: #e9fbff; }
html[data-design="new"] .rank-tile,
html[data-design="new"] .inventory-tile,
html[data-design="new"] .shop-card,
html[data-design="new"] .pass-level,
html[data-design="new"] .level-node {
  border-radius: 17px; border-color: #2c4356; background: linear-gradient(145deg, #172839, #111c29);
  transition: transform .24s ease, border-color .24s ease, box-shadow .24s ease;
}
html[data-design="new"] .rank-tile:hover,
html[data-design="new"] .inventory-tile:hover,
html[data-design="new"] .shop-card:hover,
html[data-design="new"] .pass-level:hover,
html[data-design="new"] .level-node:hover { transform: translateY(-4px); border-color: #72d8d3; box-shadow: 0 15px 32px #0005; }
html[data-design="new"] .rank-tile.current { border-color: var(--next-gold); box-shadow: inset 0 0 0 1px #f8d58a66, 0 12px 34px #f8d58a12; }
html[data-design="new"] .rank-tile img { filter: drop-shadow(0 7px 14px #0005); }
html[data-design="new"] .custom-rank-card { border-radius: 20px; background: radial-gradient(ellipse at top, #7d66aa35, transparent 75%), #111c29; }
html[data-design="new"] .custom-rank-card.mellstroy { background: radial-gradient(ellipse at top, #a4486c3d, transparent 75%), #111c29; }
html[data-design="new"] .shop-card .chest-art { border: 1px solid #334a60; background: radial-gradient(circle, #34536a, #142235 68%); }
html[data-design="new"] .shop-card.epic .chest-art { background: radial-gradient(circle, #62477e, #1b2135 68%); }
html[data-design="new"] .inventory-art { border-radius: 13px; background: radial-gradient(circle, #27516547, transparent 70%); }
html[data-design="new"] .profile-hero,
html[data-design="new"] .public-profile-hero { border-radius: 18px; background: linear-gradient(120deg, #1a3342, #152333); border-color: #355a68; }
html[data-design="new"] .profile-hero .avatar { box-shadow: 0 0 0 4px #7de8dc32, 0 0 30px #5ddaca31; }
html[data-design="new"] .profile-hero.premium { border-color: #c2a2fa; }
html[data-design="new"] .public-profile-stats .stat-card { min-width: 0; }
html[data-design="new"] .table-wrap { border: 1px solid #263d50; border-radius: 17px; background: #0f1b28; }
html[data-design="new"] .table th { color: #83a0af; }
html[data-design="new"] .table td { color: #d1e1e8; }
html[data-design="new"] .leaderboard > div { border-color: #293e4e; }
html[data-design="new"] .leaderboard .leader-row { border-radius: 10px; }
html[data-design="new"] .field input,
html[data-design="new"] .field select,
html[data-design="new"] .field textarea { border-color: #31495c; background: #0c1723; }
html[data-design="new"] .field input:focus,
html[data-design="new"] .field select:focus,
html[data-design="new"] .field textarea:focus { border-color: var(--next-teal); box-shadow: 0 0 0 3px #74e9dc17; }
html[data-design="new"] .auth-panel { border-color: #35556a; box-shadow: 0 28px 75px #0007, inset 0 1px #ffffff0a; }
html[data-design="new"] .modal { border-color: #497082; background: #101d2b; }
html[data-design="new"] .site-footer { border-color: #a7d6e018; color: #7593a2; }
html[data-design="new"] .site-footer a { color: #a3e9e5; }

/* Match screen: tactical contrast, crisp target states, and generous hit areas. */
html[data-design="new"] .match-layout { gap: 15px; }
html[data-design="new"] .match-panel,
html[data-design="new"] .side-panel .panel { border-color: #2f485a; }
html[data-design="new"] .realm-tabs button { border-color: #30495b; border-radius: 11px; background: #112333; color: #a9c1cb; }
html[data-design="new"] .realm-tabs button.active { color: #eaffff; border-color: var(--next-teal); background: #173842; box-shadow: inset 0 0 0 1px #7bf1df24; }
html[data-design="new"] .board-wrap { border-color: #314a5b; border-radius: 17px; background: radial-gradient(circle at 50% 45%, #172d39, #0a141f 74%); }
html[data-design="new"] .board-cell { border-radius: 8px; box-shadow: inset 0 1px #ffffff0b; transition: border-color .18s ease, background .18s ease, box-shadow .18s ease; }
html[data-design="new"] .board-cell:hover { transform: none; border-color: #d7ffff; box-shadow: inset 0 0 0 1px #dcffff66, 0 0 17px #65e5d821; }
html[data-design="new"] .board-cell.selected { border: 2px solid #e9ffff; box-shadow: 0 0 0 2px #60e4d94f, 0 0 24px #6aece199; z-index: 2; }
html[data-design="new"] .board-cell.valid { outline: 2px solid #8effe4; outline-offset: -4px; box-shadow: inset 0 0 17px #6cead536, 0 0 12px #7affd844; }
html[data-design="new"] .board-cell.goal { box-shadow: inset 0 0 0 2px #f8d58a, 0 0 13px #f8d58a50; }
html[data-design="new"] .piece-token { box-shadow: 0 4px 13px #000a, 0 0 0 2px #e7ffff6b; }
html[data-design="new"] .piece-token:not(.opponent) { background: linear-gradient(145deg, #a3fff2, #55cbbc); }
html[data-design="new"] .piece-token.opponent { background: linear-gradient(145deg, #ffc2b2, #f36e77); }
html[data-design="new"] .turn-banner { border-radius: 16px; background: linear-gradient(130deg, #172c38, #121e2b); }
html[data-design="new"] .turn-banner.mine { border-color: #66dace; box-shadow: 0 0 24px #66dace12; }
html[data-design="new"] .turn-banner.urgent { border-color: var(--next-red); }
html[data-design="new"] .piece-row { border-color: #2c4354; background: #101e2b; min-height: 40px; }
html[data-design="new"] .piece-row.selected { border-color: var(--next-teal); background: #14323b; }
html[data-design="new"] .ability-button {
  min-height: 73px; border-radius: 12px; background: linear-gradient(145deg, #1b3945, #122432);
  border-color: #36596a; transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}
html[data-design="new"] .ability-button:hover:not(:disabled) { transform: translateY(-2px); border-color: #9ff9ec; box-shadow: 0 8px 22px #0005, 0 0 18px #58dccc19; }
html[data-design="new"] .ability-cost { background: #235660; color: #d3fffa; }
html[data-design="new"] .queue-pulse { border-color: var(--next-teal); box-shadow: 0 0 0 13px #63ded814, 0 0 0 28px #63ded808, 0 0 35px #63ded83a; }

/* Small screens keep the art, labels, navigation, and actions inside the viewport. */
html[data-design="new"] .mobile-nav { background: #0a1420f5; border-top-color: #466271; backdrop-filter: blur(18px); }
html[data-design="new"] .mobile-nav button { color: #96aebb; }
html[data-design="new"] .mobile-nav button.active { color: var(--next-teal); }
html[data-design="new"] .mobile-menu { background: #102130; border-color: #4b7080; }
html[data-design="new"] .mobile-menu-grid button { background: #172c3b; border-color: #345365; }
html[data-design="new"] .mobile-menu-grid button.active { color: var(--next-teal); border-color: var(--next-teal); }

@media (max-width: 1120px) {
  html[data-design="new"] .next-hero { grid-template-columns: minmax(0,1fr) minmax(280px,.8fr); min-height: 470px; }
  html[data-design="new"] .next-hero-copy { padding: 38px; }
  html[data-design="new"] .next-hero h1 { font-size: clamp(38px, 4vw, 54px); }
  html[data-design="new"] .next-hero-art { min-height: 390px; }
  html[data-design="new"] .next-world-content { padding: 17px; }
}
@media (max-width: 1280px) {
  html[data-design="new"] .topbar-title { display: none; }
}
@media (max-width: 760px) {
  html[data-design="new"] .main { padding: 14px 16px 98px; }
  html[data-design="new"] .topbar { min-height: 45px; }
  html[data-design="new"] .next-hero {
    grid-template-columns: 1fr; min-height: 0; margin-top: 17px; border-radius: 23px;
    background-position: center;
  }
  html[data-design="new"] .next-hero::before {
    background: linear-gradient(180deg, #08131af2 0%, #0a171de6 41%, #0a151d8d 75%, #08121dd9 100%);
  }
  html[data-design="new"] .next-hero-copy { padding: 30px 25px 5px; }
  html[data-design="new"] .next-hero h1 { font-size: clamp(35px, 8vw, 52px); }
  html[data-design="new"] .next-hero-copy > p { max-width: 520px; font-size: 14px; }
  html[data-design="new"] .next-hero-art { min-height: 275px; margin-top: 0; }
  html[data-design="new"] .next-hero-art::before { width: 220px; }
  html[data-design="new"] .next-hero-art::after { width: 170px; }
  html[data-design="new"] .next-world-image { left: -15%; width: 130%; }
  html[data-design="new"] .next-orbit-ring { width: 210px; right: -45px; bottom: -95px; }
  html[data-design="new"] .next-art-label { right: 12px; bottom: 12px; padding: 9px 12px; }
  html[data-design="new"] .next-art-label b { font-size: 18px; }
  html[data-design="new"] .next-world-strip { position: relative; inset: auto; grid-template-columns: 1fr; gap: 12px; }
  html[data-design="new"] .next-world-card { min-width: 0; max-width: none; padding: 0; }
  html[data-design="new"] .next-world-card img { height: clamp(150px, 42vw, 220px); }
  html[data-design="new"] .next-world-content { padding: 17px 18px 20px; }
  html[data-design="new"] .next-hero-stat { display: flex; }
  html[data-design="new"] .next-journey { align-items: flex-start; flex-direction: column; gap: 18px; }
  html[data-design="new"] .next-journey .button-row { width: 100%; }
  html[data-design="new"] .next-section-heading { margin: 34px 0 15px; }
  html[data-design="new"] .next-section-heading h2 { font-size: 28px; }
  html[data-design="new"] .motion-replay { right: 11px; top: 11px; }
  html[data-design="new"] .section-title { margin-top: 28px; }
  html[data-design="new"] .three-col,
  html[data-design="new"] .two-col,
  html[data-design="new"] .four-col { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  html[data-design="new"] .realm-card { min-height: 190px; padding: 17px; }
  html[data-design="new"] .realm-card img { width: 100px; height: 100px; }
  html[data-design="new"] .page-head { margin-top: 24px; }
  html[data-design="new"] .match-layout { display: flex; flex-direction: column; }
  html[data-design="new"] .side-panel { display: flex; flex-direction: column; }
  html[data-design="new"] .board-wrap { min-height: 290px; padding: 10px; }
  html[data-design="new"] .ability-button { min-height: 67px; }
  html[data-design="new"] .public-profile-stats { grid-template-columns: repeat(2, minmax(0,1fr)); }
  html[data-design="new"] .mobile-menu { bottom: calc(72px + env(safe-area-inset-bottom)); }
}
@media (max-width: 440px) {
  html[data-design="new"] .main { padding-inline: 11px; }
  html[data-design="new"] .next-hero { border-radius: 20px; }
  html[data-design="new"] .next-hero-copy { padding: 25px 19px 5px; }
  html[data-design="new"] .next-kicker { margin-bottom: 14px; font-size: 9px; }
  html[data-design="new"] .next-hero h1 { font-size: clamp(31px, 8.8vw, 38px); }
  html[data-design="new"] .next-hero-actions { gap: 8px; margin-top: 21px; }
  html[data-design="new"] .next-hero-actions .button { min-height: 44px; padding: 9px 12px; font-size: 12px; }
  html[data-design="new"] .next-hero-actions .button-quiet { font-size: 12px; }
  html[data-design="new"] .next-hero-art { min-height: 236px; }
  html[data-design="new"] .next-hero-art::before { width: 190px; }
  html[data-design="new"] .next-hero-art::after { width: 145px; }
  html[data-design="new"] .next-hero-stat { padding-inline: 11px; }
  html[data-design="new"] .next-world-content { padding: 15px 16px 18px; }
  html[data-design="new"] .three-col,
  html[data-design="new"] .two-col,
  html[data-design="new"] .four-col { grid-template-columns: 1fr; }
  html[data-design="new"] .realm-card { min-height: 174px; }
  html[data-design="new"] .button-row { gap: 8px; }
  html[data-design="new"] .panel.pad { padding: 17px; }
  html[data-design="new"] .page-head h2 { font-size: 30px; }
  html[data-design="new"] .board-wrap { padding: 7px; }
  html[data-design="new"] .board-grid { gap: 3px; }
  html[data-design="new"] .ability-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  html[data-design="new"] .ability-button { gap: 5px; padding-inline: 6px; }
  html[data-design="new"] .ability-button b { font-size: 10px; }
  html[data-design="new"] .ability-button small { font-size: 9px; }
  html[data-design="new"] .profile-hero { align-items: flex-start; }
  html[data-design="new"] .custom-rank-grid { grid-template-columns: 1fr; }
}
@media (max-width: 360px) {
  html[data-design="new"] .main { padding-inline: 8px; }
  html[data-design="new"] .next-hero h1 { font-size: 31px; }
  html[data-design="new"] .next-hero-copy { padding-inline: 16px; }
  html[data-design="new"] .next-world-card { padding-inline: 3px; }
  html[data-design="new"] .next-world-card { padding: 0; }
  html[data-design="new"] .next-world-content { padding-inline: 14px; }
  html[data-design="new"] .next-hero-stat { gap: 5px; padding-inline: 8px; }
  html[data-design="new"] .next-hero-stat b { font-size: 17px; }
  html[data-design="new"] .next-hero-stat span { font-size: 10px; }
  html[data-design="new"] .mobile-nav small { font-size: 9px; }
  html[data-design="new"] .topbar-right .level-pill { display: none; }
}

@keyframes next-orbit-breathe {
  0%, 100% { transform: scale(.98); opacity: .74; }
  50% { transform: scale(1.035); opacity: 1; }
}
@keyframes next-orbit-turn { to { transform: rotateX(67deg) rotate(335deg); } }

html[data-design="new"].reduce-motion *,
html[data-design="new"].reduce-motion *::before,
html[data-design="new"].reduce-motion *::after,
html[data-design="new"] .reduce-motion *,
html[data-design="new"] .reduce-motion *::before,
html[data-design="new"] .reduce-motion *::after {
  animation-duration: .01ms !important; animation-iteration-count: 1 !important;
  transition-duration: .01ms !important; scroll-behavior: auto !important;
}
@media (prefers-reduced-motion: reduce) {
  html[data-design="new"] *,
  html[data-design="new"] *::before,
  html[data-design="new"] *::after {
    animation-duration: .01ms !important; animation-iteration-count: 1 !important;
    transition-duration: .01ms !important; scroll-behavior: auto !important;
  }
}
@media (hover: none) {
  html[data-design="new"] .realm-card:hover,
  html[data-design="new"] .rank-tile:hover,
  html[data-design="new"] .inventory-tile:hover,
  html[data-design="new"] .shop-card:hover,
  html[data-design="new"] .pass-level:hover,
  html[data-design="new"] .level-node:hover,
  html[data-design="new"] .nav-button:hover,
  html[data-design="new"] .button:hover { transform: none; }
}
/* Cosmetic artwork keeps the same identity when changing global design. */
html[data-design="new"] .avatar-avatar-1s{background-image:url('/razgame/assets/avatar-1s.svg')!important}
html[data-design="new"] .avatar-avatar-1s-animated{background-image:url('/razgame/assets/avatar-1s-animated.svg')!important}
html[data-design="new"] .avatar-avatar-1s-animated:before{background-image:url('/razgame/assets/avatar-1s-animated.svg')!important}
html[data-design="new"].reduce-motion .avatar-avatar-1s-animated,html[data-design="new"].reduce-motion .avatar-avatar-1s-animated:before{background-image:url('/razgame/assets/avatar-1s.svg')!important}
html[data-design="new"] .rating-pill,html[data-design="new"] .gift-product{background:#112432;border-color:#375163}

/* pravki6: livelier hero picture for the «Новый» design */
html[data-design="new"] .next-hero-art{overflow:hidden}
html[data-design="new"] .next-world-image{translate:var(--px,0px) var(--py,0px);transition:translate .6s cubic-bezier(.16,1,.3,1)}
html[data-design="new"] .next-hero-art .next-world-glow{position:absolute;top:30%;width:34%;aspect-ratio:1;border-radius:50%;pointer-events:none;mix-blend-mode:screen;z-index:1}
@media (prefers-reduced-motion:no-preference){
  html[data-design="new"] .next-world-image{animation:nextHeroDrift 18s ease-in-out 1.6s infinite alternate}
  html[data-design="new"] .next-orbit-ring{animation:nextRingSpin 40s linear 1.6s infinite}
}
@keyframes nextHeroDrift{from{transform:translateY(-50%) scale(1)}to{transform:translateY(-50%) scale(1.06) translateX(-1.5%)}}
@keyframes nextRingSpin{from{transform:rotateX(69deg) rotate(-24deg)}to{transform:rotateX(69deg) rotate(336deg)}}
