    :root {
      color-scheme: light;
      --ink: #1c2927;
      --muted: #72807a;
      --paper: #f3f2eb;
      --panel: #fffefa;
      --line: #dedfd5;
      --green: #567465;
      --green-dark: #294c3d;
      --wood-light: #ead9b9;
      --wood-dark: #8e6548;
      --gold: #d3a85e;
      --danger: #a64c3c;
      --radius-sm: 10px;
      --radius-md: 18px;
      --radius-lg: 26px;
      --glass-border: rgba(255, 255, 255, .72);
      --glass-shadow: 0 18px 48px rgba(37, 51, 43, .11), 0 2px 8px rgba(37, 51, 43, .05);
      --board-size: min(72vh, 680px, calc(100vw - 42px));
    }
    * { box-sizing: border-box; }
    [hidden] { display: none !important; }
    html, body { max-width: 100%; overflow-x: hidden; }
    body {
      margin: 0;
      min-height: 100vh;
      color: var(--ink);
      background: radial-gradient(ellipse at 12% 8%, rgba(196, 218, 198, .48), transparent 34%), radial-gradient(ellipse at 89% 31%, rgba(237, 211, 170, .3), transparent 30%), linear-gradient(145deg, var(--paper), #e9eee7 64%, #f6f1e7);
      font: 15px/1.5 "Aptos", "Segoe UI Variable", "Segoe UI", system-ui, sans-serif;
      letter-spacing: .005em;
    }
    button, select { font: inherit; }
    button { color: inherit; }
    .topbar {
      position: sticky;
      z-index: 5;
      top: 0;
      min-height: 70px;
      display: grid;
      grid-template-columns: auto minmax(0, 1fr) auto;
      align-items: center;
      gap: 14px;
      padding: 0 clamp(16px, 3vw, 44px);
      color: #f6f3e8;
      background: linear-gradient(112deg, rgba(20, 35, 31, .97), rgba(34, 54, 46, .94) 56%, rgba(28, 44, 39, .96));
      border-bottom: 1px solid rgba(231, 236, 218, .18);
      box-shadow: 0 10px 34px rgba(18, 30, 25, .19), inset 0 1px rgba(255,255,255,.07);
      backdrop-filter: blur(20px) saturate(145%);
      -webkit-backdrop-filter: blur(20px) saturate(145%);
    }
    .brand { display: flex; align-items: center; gap: 12px; min-width: max-content; color: inherit; text-decoration: none; }
    .brand-copy { display: grid; }
    .brand-mark { color: #e8c77d; font: 35px/1 Georgia, serif; filter: drop-shadow(0 2px 6px rgba(232,199,125,.22)); }
    .brand-name { font: 600 20px/1 Georgia, "Times New Roman", serif; letter-spacing: .025em; }
    .brand-sub { margin-top: 4px; color: #aeb8af; font-size: 9px; letter-spacing: .17em; text-transform: uppercase; }
    .top-note { color: #c1c9bf; font-size: 12px; }
    main { width: min(1250px, 100%); margin: 0 auto; padding: 30px clamp(14px, 3vw, 36px) 48px; }
    .page-section { display: none; }
    .page-section.active { display: block; }
    body[data-page="home"] [data-page-section="home"] { display: grid; }
    body[data-page="play"] [data-page-section="play"],
    body[data-page="members"] [data-page-section="members"],
    body[data-page="tournaments"] [data-page-section="tournaments"],
    body[data-page="design"] [data-page-section="design"],
    body[data-page="tournamentGame"] [data-page-section="tournamentGame"],
    body[data-page="watch"] [data-page-section="watch"],
    body[data-page="profile"] [data-page-section="profile"],
    body[data-page="shop"] [data-page-section="shop"],
    body[data-page="rewards"] [data-page-section="rewards"] { display: block; }
    .site-nav { display: flex; justify-content: center; align-items: center; gap: 4px; min-width: 0; }
    .site-nav a { padding: 8px 12px; color: #dce5db; border: 1px solid transparent; border-radius: 12px; font-size: 12px; font-weight: 650; text-decoration: none; white-space: nowrap; transition: background .2s ease, color .2s ease, border-color .2s ease, transform .2s ease; }
    .site-nav a:hover, .site-nav a[aria-current="page"] { color: #fff8e9; border-color: rgba(235, 219, 180, .24); background: linear-gradient(135deg, rgba(255,255,255,.13), rgba(255,255,255,.055)); box-shadow: inset 0 1px rgba(255,255,255,.09); }
    .site-nav a:hover { transform: translateY(-1px); }
    .home-page { min-height: calc(100vh - 70px); display: none; align-items: center; }
    .home-page.active { display: grid; }
    .home-hero { width: 100%; padding: clamp(24px, 6vw, 68px); overflow: hidden; border: 1px solid rgba(255,255,255,.75); border-radius: 34px; background: linear-gradient(135deg, rgba(255,255,255,.82), rgba(233,241,231,.72) 55%, rgba(245,231,201,.68)); box-shadow: var(--glass-shadow); backdrop-filter: blur(20px) saturate(135%); }
    .home-hero h1 { max-width: 760px; font-size: clamp(38px, 6vw, 68px); }
    .home-hero > p { max-width: 630px; margin: 20px 0 0; color: var(--muted); font-size: clamp(15px, 2vw, 18px); }
    .home-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 24px; }
    .home-actions a { text-decoration: none; }
    .home-actions a.quiet-btn { color: var(--ink); }
    .home-actions a.primary-btn { color: #fffdf5; }
    .home-feature-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-top: clamp(32px, 6vw, 62px); }
    .home-feature { display: grid; gap: 5px; min-width: 0; padding: 18px; color: var(--ink); border: 1px solid rgba(255,255,255,.82); border-radius: 20px; background: rgba(255,255,255,.48); text-decoration: none; transition: transform .2s ease, background .2s ease, box-shadow .2s ease; }
    .home-feature:hover { transform: translateY(-3px); background: rgba(255,255,255,.78); box-shadow: 0 12px 26px rgba(37,51,43,.08); }
    .home-feature-icon { color: var(--green); font-size: 24px; }
    .home-feature strong { font: 400 20px/1.2 Georgia, "Times New Roman", serif; }
    .home-feature > span:last-child { color: var(--muted); font-size: 11px; }
    .page-content { min-height: calc(100vh - 70px); }
    .page-card { padding: clamp(18px, 4vw, 32px); border: 1px solid var(--glass-border); border-radius: var(--radius-lg); background: color-mix(in srgb, var(--panel) 82%, transparent); box-shadow: var(--glass-shadow); backdrop-filter: blur(18px) saturate(130%); }
    .page-card > p { color: var(--muted); }
    .page-card .member-results { max-height: none; }
    .coin-balance { display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px; color: #76541b; border: 1px solid rgba(211,168,94,.35); border-radius: 999px; background: linear-gradient(135deg, rgba(250,231,174,.75), rgba(255,255,255,.75)); font-size: 12px; white-space: nowrap; }
    .coin-balance > span:first-child { color: #d2932a; }
    .coin-balance strong { font-size: 16px; }
    .profile-page-card #profileForm { max-width: 680px; }
    .profile-page-actions { margin-top: 20px; }
    .profile-page-actions a { text-decoration: none; }
    .admin-tools { margin-top: 26px; padding: 22px; border: 1px solid rgba(198,151,66,.35); border-radius: 20px; background: linear-gradient(140deg, color-mix(in srgb, var(--panel) 90%, #f5dfb1), color-mix(in srgb, var(--panel) 86%, #e8eee6)); box-shadow: 0 12px 30px rgba(37,51,43,.07); }
    .admin-tools-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
    .admin-tools-heading h2 { margin: 0; font: 400 24px/1.2 Georgia, "Times New Roman", serif; }
    .admin-tools > p { color: var(--muted); font-size: 13px; }
    .admin-tools-status { min-height: 1.4em; margin: 8px 0; color: var(--muted); font-size: 12px; }
    .admin-live-matches { margin: 18px 0; padding: 16px; border: 1px solid var(--line); border-radius: 16px; background: color-mix(in srgb, var(--panel) 76%, transparent); }
    .admin-live-matches .admin-tools-heading { align-items: center; }
    .admin-live-matches h3 { margin: 0; font-size: 15px; }
    .admin-live-matches-list { display: grid; gap: 8px; }
    .admin-live-match { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: color-mix(in srgb, var(--panel) 90%, transparent); }
    .admin-live-match > div { display: grid; min-width: 0; gap: 3px; }
    .admin-live-match strong { overflow-wrap: anywhere; font-size: 12px; }
    .admin-live-match span { color: var(--muted); font-size: 10px; }
    .admin-account-results { display: grid; gap: 7px; max-height: 240px; overflow: auto; margin: 10px 0; }
    .admin-account-result { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; padding: 10px 12px; color: var(--ink); border: 1px solid var(--line); border-radius: 12px; background: color-mix(in srgb, var(--panel) 82%, transparent); text-align: left; cursor: pointer; }
    .admin-account-result[aria-pressed="true"] { border-color: #c7923b; box-shadow: 0 0 0 2px rgba(199,146,59,.18); }
    .admin-account-identity { display: grid; min-width: 0; }
    .admin-account-name-line { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; min-width: 0; }
    .admin-account-name-line .admin-badge { margin: 0; }
    .admin-account-identity > span, .admin-account-inventory { color: var(--muted); font-size: 11px; }
    .admin-account-inventory { flex: 0 0 auto; text-align: right; }
    .admin-account-editor { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
    .admin-account-editor h3 { margin: 0 0 12px; font-size: 15px; overflow-wrap: anywhere; }
    .admin-account-editor form + form { margin-top: 18px; }
    .admin-role-panel { display: grid; gap: 7px; margin: 0 0 16px; padding: 13px; border: 1px solid color-mix(in srgb, #d59b3d 30%, var(--line)); border-radius: 14px; background: color-mix(in srgb, var(--panel) 76%, #f5dfb1); }
    .admin-role-panel > label { color: var(--ink); font-size: 12px; font-weight: 750; }
    .admin-role-controls { display: flex; flex-wrap: wrap; gap: 8px; }
    .admin-role-controls select { flex: 1 1 130px; min-height: 38px; padding: 7px 10px; color: var(--ink); border: 1px solid var(--line); border-radius: 10px; background: var(--panel); font: inherit; }
    .admin-role-panel .hint { margin: 0; }
    .admin-account-identity .admin-badge { margin-left: 4px; }
    .admin-item-fieldset { display: grid; gap: 9px; margin: 0 0 12px; padding: 12px; border: 1px solid var(--line); border-radius: 13px; }
    .admin-item-fieldset legend { padding: 0 6px; font-size: 12px; font-weight: 700; }
    .admin-item-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
    .admin-item-option { display: flex; align-items: center; gap: 8px; min-width: 0; padding: 9px; border: 1px solid var(--line); border-radius: 10px; background: color-mix(in srgb, var(--panel) 76%, transparent); cursor: pointer; }
    .admin-item-option input { flex: 0 0 auto; accent-color: var(--green-dark); }
    .admin-item-option > span { display: grid; min-width: 0; }
    .admin-item-option strong { font-size: 11px; }
    .admin-item-option small { color: var(--muted); font-size: 9px; }
    body[data-theme="dark"] .admin-tools { background: linear-gradient(140deg, rgba(47,57,49,.95), rgba(44,55,49,.9)); }
    .rank-line { display: inline-block; margin-top: 4px; color: var(--green); font-weight: 700; }
    .shop-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 18px; }
    .shop-category-filters { display: flex; flex-wrap: wrap; gap: 7px; margin: 14px 0 7px; }
    .shop-filter-button { min-height: 34px; padding: 6px 11px; color: var(--muted); border: 1px solid var(--line); border-radius: 999px; background: color-mix(in srgb, var(--panel) 82%, transparent); cursor: pointer; font-size: 10px; font-weight: 700; transition: background .2s ease, color .2s ease, border-color .2s ease, transform .2s ease; }
    .shop-filter-button:hover { transform: translateY(-1px); border-color: color-mix(in srgb, var(--green) 48%, var(--line)); }
    .shop-filter-button.is-active { color: #fffdf5; border-color: transparent; background: linear-gradient(120deg, #294c3d, #63816b); box-shadow: 0 4px 12px rgba(41,76,61,.16); }
    .shop-category-count { min-height: 1.4em; margin: 0; color: var(--muted); font-size: 10px; }
    .shop-item { display: grid; grid-template-columns: 58px minmax(0, 1fr) 132px; align-items: center; gap: 12px; min-width: 0; padding: 14px; border: 1px solid color-mix(in srgb, var(--line) 75%, transparent); border-radius: 16px; background: color-mix(in srgb, var(--panel) 75%, transparent); }
    .shop-item-preview { position: relative; display: grid; place-items: center; width: 54px; height: 54px; overflow: hidden; color: var(--green-dark); border: 1px solid var(--glass-border); border-radius: 17px; background: linear-gradient(145deg, #f8f6ec, #e1eadf); font-size: 25px; }
    .shop-item-preview.name-aurora, .shop-item-preview.name-flame { background-clip: padding-box; font: 700 22px/1 Georgia, "Times New Roman", serif; }
    .shop-item-preview.name-aurora { color: #568b84; background-image: linear-gradient(100deg, #dcefe1, #d4d8f1, #c0e0d1); }
    .shop-item-preview.name-flame { color: #b94724; background-image: linear-gradient(100deg, #f1d0a1, #f4a668, #f3d9a1); }
    .shop-item-preview.name-dog-runner, .shop-item-preview.name-star-trail { font: 700 22px/1 Georgia, "Times New Roman", serif; }
    .shop-item-preview.name-dog-runner::after { position: absolute; top: 5px; left: -18px; content: "🐕"; font-size: 17px; animation: dog-preview-run 2.8s ease-in-out infinite; }
    .shop-item-preview.name-star-trail::after { position: absolute; top: 6px; left: -14px; color: #c59637; content: "✦"; font-size: 15px; animation: dog-preview-run 2.4s ease-in-out infinite; }
    .shop-item-preview.rank-gold { color: #9c701f; background: linear-gradient(135deg, #fff1bd, #d9a83b); }
    .shop-item-preview.rank-silver { color: #657079; background: linear-gradient(135deg, #fff, #b9c3c6); }
    .shop-item-preview.rank-bronze { color: #80522e; background: linear-gradient(135deg, #f6d2a7, #a76b3e); }
    .shop-item-preview.rank-platinum, .cosmetic-icon.rank-platinum { color: #496779; background: linear-gradient(135deg, #f2fbff, #a7c7d8 55%, #eef7fa); }
    .shop-item-preview.rank-diamond, .cosmetic-icon.rank-diamond { color: #6554a0; background: linear-gradient(135deg, #fff, #b8b1ed 52%, #8bd2d3); }
    .shop-item-preview.rank-royal, .cosmetic-icon.rank-royal { color: #72511b; background: linear-gradient(135deg, #fff2bd, #d7923b 52%, #763f87); }
    .shop-item-preview.name-comet, .shop-item-preview.name-nebula, .shop-item-preview.name-prism { background-clip: padding-box; font: 700 22px/1 Georgia, "Times New Roman", serif; }
    .shop-item-preview.name-comet { color: #425f9b; background-image: linear-gradient(110deg, #d9e8ff, #98aee4, #f0dcad); }
    .shop-item-preview.name-nebula { color: #713e92; background-image: linear-gradient(110deg, #dfc5fa, #8498e0, #f1a9c5); }
    .shop-item-preview.name-prism { color: #376d78; background-image: linear-gradient(110deg, #a9e3d5, #a7b3ed, #f5c2a8, #e1df9d); }
    .shop-item-details { min-width: 0; }
    .shop-item-details h2 { margin: 0; font-size: 15px; }
    .shop-item-details p { margin: 3px 0 0; color: var(--muted); font-size: 11px; }
    .shop-item[data-price-tier="premium"] { border-color: color-mix(in srgb, #d6aa59 35%, var(--line)); background: linear-gradient(135deg, color-mix(in srgb, var(--panel) 90%, #f5e8c9), color-mix(in srgb, var(--panel) 95%, transparent)); }
    .shop-item-actions { display: grid; gap: 6px; min-width: 0; }
    .shop-item-actions button { min-height: 36px; padding: 6px 8px; font-size: 10px; white-space: nowrap; }
    .member-admin-tools { margin: 14px 0; padding: 14px; border: 1px solid rgba(198,151,66,.35); border-radius: 16px; background: linear-gradient(140deg, color-mix(in srgb, var(--panel) 92%, #f5dfb1), color-mix(in srgb, var(--panel) 86%, #e8eee6)); }
    .member-admin-tools .admin-tools-heading h3 { margin: 0; font-size: 16px; }
    .member-admin-tools > label { display: block; margin: 12px 0 6px; font-size: 12px; font-weight: 700; }
    .member-admin-tools form { margin-top: 12px; }
    .member-admin-tools .admin-item-fieldset { max-height: 210px; overflow: auto; margin: 14px 0 10px; }
    .member-admin-tools .admin-item-options { grid-template-columns: minmax(0, 1fr); }
    .member-admin-tools .field { margin-bottom: 8px; }
    .member-admin-tools .field label { font-size: 11px; }
    .member-admin-tools .field input, .member-admin-tools .admin-role-controls select { min-height: 36px; }
    .player-strip.profile-preview-open { z-index: 20; }
    .player-hover-card { position: fixed; z-index: 1000; display: grid; width: min(340px, calc(100vw - 10px)); max-height: calc(100vh - 24px); gap: 10px; padding: 14px 8px; overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain; color: var(--ink); border: 1px solid var(--glass-border); border-radius: 20px; background: color-mix(in srgb, var(--panel) 96%, transparent); box-shadow: 0 22px 58px rgba(20,35,27,.28), inset 0 1px rgba(255,255,255,.7); backdrop-filter: blur(24px) saturate(155%); -webkit-backdrop-filter: blur(24px) saturate(155%); animation: player-profile-enter .16s ease-out both; }
    .player-hover-card[class*="player-frame-"] { border-color: var(--item-frame-color, #679b72); box-shadow: 0 0 0 2px color-mix(in srgb, var(--item-frame-color, #679b72) 27%, transparent), 0 22px 58px rgba(20,35,27,.28); }
    .player-hover-banner { position: absolute; inset: 0 0 auto; height: 70px; border-radius: 19px 19px 0 0; background: linear-gradient(120deg, #27473a, #77917d 58%, #d2b578); background-position: center; background-size: cover; }
    .player-hover-banner[class*="player-frame-"] { border-bottom: 3px solid var(--item-frame-color, #679b72); }
    .player-hover-banner::after { position: absolute; inset: 0; border-radius: inherit; background: linear-gradient(0deg, rgba(20,33,27,.4), transparent); content: ""; }
    .player-hover-identity { position: relative; z-index: 1; display: flex; align-items: end; gap: 12px; min-height: 98px; padding: 28px 0 0; }
    .player-hover-avatar { position: relative; display: grid; flex: 0 0 auto; width: 62px; height: 62px; place-items: center; color: #f3edda; border: 3px solid var(--panel); border-radius: 18px; background: linear-gradient(145deg, #587361, #293e32); background-position: center; background-size: cover; box-shadow: 0 4px 14px rgba(20,35,27,.2); font: 27px/1 Georgia, serif; }
    .player-hover-details { display: grid; align-content: end; justify-items: start; gap: 4px; min-width: 0; }
    .player-hover-name-row { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; min-width: 0; max-width: 100%; }
    .player-hover-name-row > strong { min-width: 0; max-width: 100%; overflow-wrap: anywhere; font-size: 15px; }
    .player-hover-details > strong.name-dog-runner, .player-hover-details > strong.name-star-trail { position: relative; display: inline-block; overflow: visible; }
    .player-hover-details > strong.name-dog-runner::after { display: inline-block; margin-left: .2em; content: "🐕"; font-size: .88em; line-height: 1; pointer-events: none; filter: drop-shadow(0 1px 2px rgba(0,0,0,.2)); animation: dog-run-name 1.35s ease-in-out infinite; }
    .player-hover-details > strong.name-star-trail::after { display: inline-block; margin-left: .18em; color: #e4ad43; content: "✦"; font-size: .8em; line-height: 1; pointer-events: none; filter: drop-shadow(0 0 3px rgba(228,173,67,.7)); animation: star-trail-name 1.8s ease-in-out infinite; }
    .player-hover-details > .player-hover-username { display: block; max-width: 100%; color: var(--muted); font-size: 10px; line-height: 1.35; overflow-wrap: anywhere; }
    .player-hover-details .player-hover-cosmetics { flex-basis: 100%; }
    .player-hover-cosmetics { position: relative; z-index: 1; display: grid; gap: 7px; }
    .player-hover-cosmetics-title { margin: 0 0 1px; font-size: 11px; }
    .player-hover-cosmetics ul { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; margin: 0; padding: 0; list-style: none; }
    .player-hover-cosmetics li { display: flex; align-items: center; gap: 8px; min-width: 0; min-height: 44px; padding: 6px 9px; border: 1px solid color-mix(in srgb, var(--line) 72%, transparent); border-radius: 11px; background: color-mix(in srgb, var(--panel) 70%, transparent); }
    .player-hover-cosmetics li[data-slot="rank"] > * { transform: translateY(4px); }
    .player-hover-cosmetics li > span:last-child { display: grid; min-width: 0; }
    .player-hover-cosmetics li small { color: var(--muted); font-size: 8px; }
    .player-hover-cosmetics li strong { overflow: hidden; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
    .player-hover-cosmetic-symbol { position: relative; display: grid; flex: 0 0 auto; width: 25px; height: 25px; place-items: center; border-radius: 8px; background: color-mix(in srgb, var(--green) 18%, transparent); font-size: 11px; }
    .player-hover-bio { position: relative; z-index: 1; display: -webkit-box; overflow: hidden; margin: 0 !important; padding: 9px 10px; color: var(--muted); border: 1px solid color-mix(in srgb, var(--line) 75%, transparent); border-radius: 12px; background: color-mix(in srgb, var(--panel) 72%, transparent); font-size: 11px !important; overflow-wrap: anywhere; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
    .player-hover-stats { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 7px; color: var(--muted); }
    .player-hover-stat { display: grid; grid-column: span 2; gap: 3px; min-width: 0; padding: 8px 6px; border: 1px solid color-mix(in srgb, var(--line) 72%, transparent); border-radius: 11px; background: color-mix(in srgb, var(--panel) 70%, transparent); text-align: center; }
    .player-hover-stat:nth-child(4) { grid-column: 2 / span 2; }
    .player-hover-stat:nth-child(5) { grid-column: 4 / span 2; }
    .player-hover-stat strong { color: var(--ink); font-size: 13px; font-variant-numeric: tabular-nums; }
    .player-hover-stat span { overflow: hidden; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
    .player-hover-card > button { position: relative; z-index: 1; min-height: 36px; border-radius: 12px; }
    @keyframes player-profile-enter { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } }
    @media (prefers-reduced-motion: reduce) { .player-hover-card { animation: none; } }
    .system-restart-button { color: #fff8ed !important; border-color: rgba(179,79,63,.45) !important; background: linear-gradient(130deg, #8e3f36, #bd6250) !important; }
    .system-restart-overlay:not([hidden]) { position: fixed; z-index: 10000; inset: 0; display: grid; place-items: center; padding: 24px; color: #f7f2e8; background: radial-gradient(ellipse at 50% 38%, rgba(80,112,91,.94), rgba(20,34,29,.99) 72%); text-align: center; }
    .system-restart-card { width: min(520px, 100%); padding: 34px 26px; border: 1px solid rgba(255,255,255,.2); border-radius: 28px; background: rgba(255,255,255,.08); box-shadow: 0 25px 80px rgba(0,0,0,.25), inset 0 1px rgba(255,255,255,.16); backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px); }
    .system-restart-card h1 { margin: 18px 0 10px; font-size: clamp(26px, 6vw, 42px); }
    .system-restart-card p { margin: 0; color: rgba(247,242,232,.78); line-height: 1.6; }
    .system-restart-spinner { display: inline-block; width: 42px; height: 42px; border: 3px solid rgba(255,255,255,.25); border-top-color: #e8c77d; border-radius: 50%; animation: system-restart-spin .85s linear infinite; }
    @keyframes system-restart-spin { to { transform: rotate(360deg); } }
    .shop-status { min-height: 1.5em; }
    body[data-theme="dark"] .page-card { background: color-mix(in srgb, #242f2b 90%, transparent); }
    body[data-theme="dark"] .home-hero { background: linear-gradient(135deg, rgba(42,56,49,.92), rgba(37,51,45,.88) 55%, rgba(74,61,41,.82)); }
    body[data-theme="dark"] .home-feature { color: var(--ink); background: rgba(255,255,255,.08); }
    body[data-theme="dark"] .home-feature:hover { background: rgba(255,255,255,.13); }
    body[data-theme="dark"] .shop-item { background: rgba(255,255,255,.04); }
    .page-heading { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 20px; }
    h1 { margin: 0; font: 400 36px/1.1 Georgia, "Times New Roman", serif; letter-spacing: -.025em; }
    h2, .settings-title { letter-spacing: -.015em; }
    .eyebrow { margin-bottom: 5px; color: var(--green); font-size: 10px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; }
    .status-line { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; }
    .premove-status { color: #398849; font-size: 11px; font-weight: 700; }
    .premove-cancel { padding: 4px 8px; font-size: 10px; }
    .status-dot { width: 7px; height: 7px; border-radius: 50%; background: #6a9c77; }
    .layout { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 24px; align-items: start; min-width: 0; }
    .play-area { min-width: 0; }
    .player-strip { position: relative; width: var(--board-size); max-width: 100%; display: flex; align-items: center; justify-content: space-between; min-height: 62px; padding: 8px 12px; background: linear-gradient(130deg, color-mix(in srgb, var(--panel) 86%, white), color-mix(in srgb, var(--panel) 94%, var(--green))); border: 1px solid var(--glass-border); border-radius: var(--radius-md); box-shadow: 0 8px 24px rgba(37, 51, 43, .07); }
    .player-strip:focus-visible { outline: 3px solid color-mix(in srgb, var(--green) 65%, white); outline-offset: 3px; }
    .player-strip.player-frame-forest, .profile-banner.player-frame-forest { border-color: #679b72; box-shadow: 0 0 0 2px rgba(75,139,87,.16), 0 8px 24px rgba(42,94,55,.12); }
    .player-strip.player-frame-ocean, .profile-banner.player-frame-ocean { border-color: #5d94b3; box-shadow: 0 0 0 2px rgba(69,142,179,.16), 0 8px 24px rgba(40,100,140,.12); }
    .player-strip.player-frame-ember, .profile-banner.player-frame-ember { border-color: #c97b48; box-shadow: 0 0 0 2px rgba(201,123,72,.17), 0 8px 24px rgba(168,76,37,.12); }
    .player-strip.player-frame-aurora, .profile-banner.player-frame-aurora { border-color: #7d9eae; box-shadow: 0 0 0 2px rgba(110,174,160,.2), 0 8px 24px rgba(79,125,155,.13); }
    .player-strip.player-frame-royal, .profile-banner.player-frame-royal { border-color: #c7a34e; box-shadow: 0 0 0 2px rgba(199,163,78,.2), 0 8px 24px rgba(161,117,43,.14); }
    .player-strip.player-frame-obsidian, .profile-banner.player-frame-obsidian { border-color: #656878; box-shadow: 0 0 0 2px rgba(57,61,75,.18), 0 8px 24px rgba(34,37,48,.15); }
    .player-strip.player-frame-rose, .profile-banner.player-frame-rose { border-color: #ce7f9a; box-shadow: 0 0 0 2px rgba(206,127,154,.18), 0 8px 24px rgba(170,73,109,.12); }
    .player-strip.player-frame-frost, .profile-banner.player-frame-frost { border-color: #83b9cf; box-shadow: 0 0 0 2px rgba(131,185,207,.2), 0 8px 24px rgba(76,144,177,.13); }
    .player-strip.player-frame-cosmic, .profile-banner.player-frame-cosmic { border-color: #9882c7; box-shadow: 0 0 0 2px rgba(152,130,199,.2), 0 8px 24px rgba(112,77,166,.14); }
    .player-strip.player-frame-emerald, .profile-banner.player-frame-emerald { border-color: #44a585; box-shadow: 0 0 0 2px rgba(68,165,133,.18), 0 8px 24px rgba(39,123,95,.13); }
    .player-strip.player-frame-sunset, .profile-banner.player-frame-sunset { border-color: #d88258; box-shadow: 0 0 0 2px rgba(216,130,88,.19), 0 8px 24px rgba(181,84,53,.13); }
    .player-strip.player-frame-silver, .profile-banner.player-frame-silver { border-color: #9daab3; box-shadow: 0 0 0 2px rgba(157,170,179,.22), 0 8px 24px rgba(91,109,125,.12); }
    .player-strip.player-frame-gold, .profile-banner.player-frame-gold { border-color: #e0b84c; box-shadow: 0 0 0 2px rgba(224,184,76,.22), 0 8px 24px rgba(168,126,37,.14); }
    .player-strip.player-frame-prism, .profile-banner.player-frame-prism { border-color: #75aeb1; box-shadow: 0 0 0 2px rgba(117,174,177,.22), 0 8px 24px rgba(119,100,171,.14); }
    .player-strip.player-frame-phoenix, .profile-banner.player-frame-phoenix { border-color: #d55e4f; box-shadow: 0 0 0 2px rgba(213,94,79,.2), 0 8px 24px rgba(180,65,41,.16); }
    .player-frame-moonstone { --item-frame-color: #a7a4bd; }
    .player-frame-jade { --item-frame-color: #4a9b79; }
    .player-frame-sapphire { --item-frame-color: #4b79c3; }
    .player-frame-amethyst { --item-frame-color: #8c69b5; }
    .player-frame-copper { --item-frame-color: #bd7951; }
    .player-frame-pearl { --item-frame-color: #c5bca4; }
    .player-frame-midnight { --item-frame-color: #515e91; }
    .player-frame-blossom { --item-frame-color: #d58ba2; }
    .player-frame-storm { --item-frame-color: #687889; }
    .player-frame-lagoon { --item-frame-color: #47a8a2; }
    .player-frame-citrine { --item-frame-color: #d4ae43; }
    .player-frame-coral { --item-frame-color: #dd786d; }
    .player-frame-starlight { --item-frame-color: #b6a8da; }
    .player-frame-infinity { --item-frame-color: #7c70bc; }
    .player-frame-dragon { --item-frame-color: #c45b37; }
    .player-frame-forest { --item-frame-color: #679b72; }
    .player-frame-ocean { --item-frame-color: #5d94b3; }
    .player-frame-ember { --item-frame-color: #c97b48; }
    .player-frame-aurora { --item-frame-color: #7d9eae; }
    .player-frame-royal { --item-frame-color: #c7a34e; }
    .player-frame-obsidian { --item-frame-color: #656878; }
    .player-frame-rose { --item-frame-color: #ce7f9a; }
    .player-frame-frost { --item-frame-color: #83b9cf; }
    .player-frame-cosmic { --item-frame-color: #9882c7; }
    .player-frame-emerald { --item-frame-color: #44a585; }
    .player-frame-sunset { --item-frame-color: #d88258; }
    .player-frame-silver { --item-frame-color: #9daab3; }
    .player-frame-gold { --item-frame-color: #e0b84c; }
    .player-frame-prism { --item-frame-color: #75aeb1; }
    .player-frame-phoenix { --item-frame-color: #d55e4f; }
    .member-result[class*="player-frame-"] { border-color: var(--item-frame-color); box-shadow: 0 0 0 2px color-mix(in srgb, var(--item-frame-color) 20%, transparent), 0 8px 24px color-mix(in srgb, var(--item-frame-color) 14%, transparent); }
    .member-banner[class*="player-frame-"] { border: 2px solid var(--item-frame-color); }
    .player-strip.player-frame-moonstone, .profile-banner.player-frame-moonstone,
    .player-strip.player-frame-jade, .profile-banner.player-frame-jade,
    .player-strip.player-frame-sapphire, .profile-banner.player-frame-sapphire,
    .player-strip.player-frame-amethyst, .profile-banner.player-frame-amethyst,
    .player-strip.player-frame-copper, .profile-banner.player-frame-copper,
    .player-strip.player-frame-pearl, .profile-banner.player-frame-pearl,
    .player-strip.player-frame-midnight, .profile-banner.player-frame-midnight,
    .player-strip.player-frame-blossom, .profile-banner.player-frame-blossom,
    .player-strip.player-frame-storm, .profile-banner.player-frame-storm,
    .player-strip.player-frame-lagoon, .profile-banner.player-frame-lagoon,
    .player-strip.player-frame-citrine, .profile-banner.player-frame-citrine,
    .player-strip.player-frame-coral, .profile-banner.player-frame-coral,
    .player-strip.player-frame-starlight, .profile-banner.player-frame-starlight,
    .player-strip.player-frame-infinity, .profile-banner.player-frame-infinity,
    .player-strip.player-frame-dragon, .profile-banner.player-frame-dragon { border-color: var(--item-frame-color); box-shadow: 0 0 0 2px color-mix(in srgb, var(--item-frame-color) 20%, transparent), 0 8px 24px color-mix(in srgb, var(--item-frame-color) 14%, transparent); }
    .shop-item-preview.shop-preview-playerFrame { padding: 4px; border: 0; background: transparent; overflow: visible; }
    .shop-frame-sample { display: grid; width: 100%; height: 100%; place-items: center; color: var(--green-dark); border: 2px solid #679b72; border-radius: 12px; background: linear-gradient(145deg, color-mix(in srgb, var(--panel) 90%, white), color-mix(in srgb, var(--panel) 78%, #dce8df)); box-shadow: inset 0 1px rgba(255,255,255,.55), 0 2px 6px rgba(27,43,33,.08); font: 700 14px/1 Georgia, serif; }
    .shop-frame-sample.player-frame-forest { border-color: #679b72; }
    .shop-frame-sample.player-frame-ocean { border-color: #5d94b3; }
    .shop-frame-sample.player-frame-ember { border-color: #c97b48; }
    .shop-frame-sample.player-frame-aurora { border-color: #7d9eae; }
    .shop-frame-sample.player-frame-royal { border-color: #c7a34e; }
    .shop-frame-sample.player-frame-obsidian { border-color: #656878; }
    .shop-frame-sample.player-frame-rose { border-color: #ce7f9a; }
    .shop-frame-sample.player-frame-frost { border-color: #83b9cf; }
    .shop-frame-sample.player-frame-cosmic { border-color: #9882c7; }
    .shop-frame-sample.player-frame-emerald { border-color: #44a585; }
    .shop-frame-sample.player-frame-sunset { border-color: #d88258; }
    .shop-frame-sample.player-frame-silver { border-color: #9daab3; }
    .shop-frame-sample.player-frame-gold { border-color: #e0b84c; }
    .shop-frame-sample.player-frame-prism { border-color: #75aeb1; }
    .shop-frame-sample.player-frame-phoenix { border-color: #d55e4f; }
    .shop-frame-sample.player-frame-moonstone, .shop-frame-sample.player-frame-jade, .shop-frame-sample.player-frame-sapphire, .shop-frame-sample.player-frame-amethyst, .shop-frame-sample.player-frame-copper, .shop-frame-sample.player-frame-pearl, .shop-frame-sample.player-frame-midnight, .shop-frame-sample.player-frame-blossom, .shop-frame-sample.player-frame-storm, .shop-frame-sample.player-frame-lagoon, .shop-frame-sample.player-frame-citrine, .shop-frame-sample.player-frame-coral, .shop-frame-sample.player-frame-starlight, .shop-frame-sample.player-frame-infinity, .shop-frame-sample.player-frame-dragon { border-color: var(--item-frame-color); }
    .player-title { display: inline-flex; align-items: center; gap: 3px; width: fit-content; margin-top: 3px; padding: 3px 7px; color: #536454; border: 1px solid rgba(103,130,102,.24); border-radius: 999px; background: linear-gradient(120deg, rgba(226,237,222,.9), rgba(247,243,224,.9)); font: 700 9px/1.2 system-ui, sans-serif; letter-spacing: .01em; vertical-align: middle; }
    .player-name .player-title { margin: 0 0 0 3px; }
    .player-title.title-tactician, .player-title.title-strategist, .player-title.title-endgame { color: #49675b; border-color: rgba(91,137,111,.35); background: linear-gradient(120deg, #e6f1e8, #d5e5dc); }
    .player-title.title-opening, .player-title.title-guardian, .player-title.title-scholar { color: #4a6680; border-color: rgba(92,135,174,.36); background: linear-gradient(120deg, #e5eff8, #dce5f2); }
    .player-title.title-checkmate, .player-title.title-blitz, .player-title.title-phoenix { color: #99513c; border-color: rgba(191,111,76,.38); background: linear-gradient(120deg, #ffead8, #f7d8cb); }
    .player-title.title-royal, .player-title.title-champion, .player-title.title-immortal { color: #8b681f; border-color: rgba(194,154,63,.42); background: linear-gradient(120deg, #fff2c8, #f0dda0); }
    .player-title.title-grandmaster, .player-title.title-legend, .player-title.title-cosmic { color: #69518d; border-color: rgba(139,112,185,.38); background: linear-gradient(120deg, #f0e7ff, #dce2fa); }
    .player-title.title-fianchetto, .player-title.title-fortress, .player-title.title-sage { color: #49675b; border-color: rgba(91,137,111,.35); background: linear-gradient(120deg, #e6f1e8, #d5e5dc); }
    .player-title.title-gambit, .player-title.title-rapid, .player-title.title-puzzle { color: #99513c; border-color: rgba(191,111,76,.38); background: linear-gradient(120deg, #ffead8, #f7d8cb); }
    .player-title.title-explorer, .player-title.title-nightwatch, .player-title.title-shadow { color: #4a6680; border-color: rgba(92,135,174,.36); background: linear-gradient(120deg, #e5eff8, #dce5f2); }
    .player-title.title-sunrise, .player-title.title-artisan { color: #93662d; border-color: rgba(194,154,63,.38); background: linear-gradient(120deg, #fff2c8, #f0dda0); }
    .player-title.title-monarch, .player-title.title-eternal, .player-title.title-constellation, .player-title.title-dragon { color: #69518d; border-color: rgba(139,112,185,.38); background: linear-gradient(120deg, #f0e7ff, #dce2fa); }
    .shop-item-preview.shop-preview-title { overflow: visible; border: 0; background: transparent; }
    .shop-item-preview.shop-preview-title .player-title { max-width: 100%; max-height: 46px; justify-content: center; overflow: hidden; margin: 0; padding: 4px; font-size: 7px; line-height: 1.15; text-align: center; white-space: normal; overflow-wrap: anywhere; }
    .shop-item-preview.shop-preview-avatarEffect { overflow: visible; border: 0; background: transparent; }
    .shop-avatar-sample { width: 46px; height: 46px; border-radius: 15px; font-size: 24px; }
    .shop-item-preview.shop-preview-companion { overflow: visible; border: 0; background: transparent; }
    .shop-item-preview.shop-preview-companion .player-companion { margin: 0; font-size: 28px; }
    .shop-item-preview.shop-preview-rank { overflow: visible; border: 0; background: transparent; }
    .shop-item-preview.shop-preview-rank .player-rank { max-width: 100%; padding: 4px; font-size: 8px; text-align: center; white-space: normal; }
    .player-title.title-fianchetto, .player-title.title-gambit, .player-title.title-fortress, .player-title.title-explorer, .player-title.title-puzzle, .player-title.title-rapid, .player-title.title-nightwatch, .player-title.title-sage, .player-title.title-shadow, .player-title.title-sunrise, .player-title.title-artisan, .player-title.title-monarch, .player-title.title-eternal, .player-title.title-constellation, .player-title.title-dragon { box-shadow: inset 0 1px rgba(255,255,255,.32), 0 1px 3px rgba(25,35,30,.08); }
    .profile-collection-section { margin-top: 24px; padding-top: 18px; border-top: 1px solid var(--line); }
    .collection-description, .collection-status { margin: -4px 0 10px; color: var(--muted); font-size: 11px; }
    .collection-status { min-height: 1.4em; margin: 0 0 8px; }
    .profile-collection { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 0; }
    .profile-collection .shop-item { grid-template-columns: 58px minmax(0, 1fr) 116px; }
    .profile-collection .shop-item.is-equipped { border-color: color-mix(in srgb, var(--green) 42%, var(--line)); }
    .shop-item-details h3 { margin: 0; font-size: 14px; }
    .collection-item-state { display: block; margin-top: 5px; color: var(--green); font-size: 10px; font-weight: 700; }
    .player-title[hidden], #startAccountButton[hidden] { display: none; }
    body[data-theme="dark"] .player-title { color: #dcebd8; border-color: rgba(182,210,177,.25); background: linear-gradient(120deg, rgba(57,78,62,.94), rgba(73,70,53,.94)); }
    body[data-theme="dark"] .player-title.title-opening, body[data-theme="dark"] .player-title.title-guardian, body[data-theme="dark"] .player-title.title-scholar { color: #d9e9ff; background: linear-gradient(120deg, #304658, #3d4558); }
    body[data-theme="dark"] .player-title.title-checkmate, body[data-theme="dark"] .player-title.title-blitz, body[data-theme="dark"] .player-title.title-phoenix { color: #ffe2d2; background: linear-gradient(120deg, #593d34, #593b43); }
    body[data-theme="dark"] .player-title.title-royal, body[data-theme="dark"] .player-title.title-champion, body[data-theme="dark"] .player-title.title-immortal { color: #fff0bd; background: linear-gradient(120deg, #574a2e, #57483d); }
    body[data-theme="dark"] .player-title.title-grandmaster, body[data-theme="dark"] .player-title.title-legend, body[data-theme="dark"] .player-title.title-cosmic { color: #eee0ff; background: linear-gradient(120deg, #46385e, #3c4564); }
    .player-id { display: flex; flex: 1 1 auto; align-items: center; gap: 10px; min-width: 0; }
    .player-id > div:last-child { min-width: 0; }
    .avatar { position: relative; display: grid; flex: 0 0 auto; place-items: center; width: 40px; height: 40px; overflow: visible; border: 1px solid var(--line); border-radius: 14px; background: linear-gradient(145deg, #f8f6ec, #e7e5d9); background-position: center; background-size: cover; font: 23px/1 Georgia, serif; }
    .avatar.has-image { overflow: visible; border-color: color-mix(in srgb, var(--green) 42%, var(--line)); }
    .avatar.black { color: #f4f0e5; background: #33423e; border-color: #33423e; }
    .player-name { display: flex; align-items: center; flex-wrap: wrap; gap: 4px; min-width: 0; overflow: visible; font-size: 13px; font-weight: 700; white-space: nowrap; }
    .player-name > span:first-child { min-width: 0; max-width: min(190px, 30vw); overflow: visible; white-space: nowrap; }
    .player-name > .name-dog-runner, .member-display-name.name-dog-runner, #memberProfileNickname.name-dog-runner { position: relative; display: inline-block; overflow: visible; padding-top: .35em; }
    .player-name > .name-dog-runner::after, .member-display-name.name-dog-runner::after, #memberProfileNickname.name-dog-runner::after { display: inline-block; margin-left: .2em; content: "🐕"; font-size: .88em; line-height: 1; pointer-events: none; filter: drop-shadow(0 1px 2px rgba(0,0,0,.2)); animation: dog-run-name 1.35s ease-in-out infinite; }
    .player-name > .name-star-trail, .member-display-name.name-star-trail, #memberProfileNickname.name-star-trail { position: relative; display: inline-block; overflow: visible; padding-top: .2em; }
    .player-name > .name-star-trail::after, .member-display-name.name-star-trail::after, #memberProfileNickname.name-star-trail::after { display: inline-block; margin-left: .18em; color: #e4ad43; content: "✦"; font-size: .8em; line-height: 1; pointer-events: none; filter: drop-shadow(0 0 3px rgba(228,173,67,.7)); animation: star-trail-name 1.8s ease-in-out infinite; }
    .player-kind { color: var(--muted); font-size: 10px; }
    .player-rating { color: var(--green-dark); font-size: 10px; font-weight: 650; font-variant-numeric: tabular-nums; }
    .admin-match-controls { display: grid; gap: 7px; margin-top: 16px; padding: 14px; border: 1px solid rgba(198,151,66,.35); border-radius: 16px; background: linear-gradient(135deg, rgba(247,224,164,.35), rgba(255,255,255,.55)); }
    .admin-match-controls > strong { color: #805c1f; font-size: 12px; }
    .admin-match-controls > p, .rating-help { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.5; }
    .rating-help { margin-top: -10px; }
    .admin-match-summary { margin: 12px 0 16px; padding: 11px 13px; color: var(--ink); border: 1px solid var(--line); border-radius: 12px; background: color-mix(in srgb, var(--panel) 82%, transparent); font-size: 12px; font-weight: 700; }
    .admin-match-field { margin-bottom: 16px !important; }
    .admin-match-field label { margin-bottom: 7px; color: var(--ink); font-size: 11px; font-weight: 700; }
    #adminMatchFinishButton:disabled { opacity: .55; cursor: not-allowed; }
    .player-rank, .member-rank { display: inline-flex; flex: 0 0 auto; width: fit-content; padding: 2px 7px; color: #77551e; border: 1px solid rgba(198,151,66,.3); border-radius: 999px; background: linear-gradient(120deg, rgba(247,224,164,.75), rgba(255,255,255,.55)); font-size: 9px; font-weight: 750; }
    .player-rank.rank-silver { color: #59646c; background: linear-gradient(120deg, #fff, #dce2e2); }
    .player-rank.rank-bronze { color: #80522e; background: linear-gradient(120deg, #f8e0c3, #e8ba91); }
    .player-rank.rank-platinum { color: #496779; background: linear-gradient(120deg, #f2fbff, #a7c7d8); }
    .player-rank.rank-diamond { color: #6554a0; background: linear-gradient(120deg, #fff, #b8b1ed 55%, #8bd2d3); }
    .player-rank.rank-royal { color: #72511b; background: linear-gradient(120deg, #fff2bd, #d7923b 55%, #c5a1d1); }
    .player-companion { display: inline-block; flex: 0 0 auto; margin: 0 0 0 1px; font-size: 17px; line-height: 1; filter: drop-shadow(0 2px 2px rgba(20,30,25,.15)); animation: companion-float 2.4s ease-in-out infinite; }
    .companion-dog { animation: companion-dog 1.15s ease-in-out infinite; }
    .companion-cat { transform-origin: 50% 80%; animation: companion-cat 2.1s ease-in-out infinite; }
    .companion-owl { animation: companion-owl 3s ease-in-out infinite; }
    .companion-fox { animation: companion-fox 2s ease-in-out infinite; }
    .companion-dragon { animation: companion-dragon 1.8s ease-in-out infinite; }
    .companion-tiger, .companion-phoenix, .companion-unicorn { animation: companion-float 2s ease-in-out infinite; }
    .name-aurora { color: #3a8470; background: linear-gradient(100deg, #568b84, #7468a1, #4c9f8c, #568b84); background-size: 240% 100%; background-clip: text; -webkit-text-fill-color: transparent; animation: name-glow 4s ease-in-out infinite; }
    .name-flame { color: #d65b2e; background: linear-gradient(100deg, #d74a2e, #f0a332, #c94324, #d74a2e); background-size: 240% 100%; background-clip: text; -webkit-text-fill-color: transparent; animation: name-glow 3s ease-in-out infinite; }
    .name-comet { color: #5271ad; background: linear-gradient(100deg, #647fc0, #b2c8f2, #d9a94c, #647fc0); background-size: 240% 100%; background-clip: text; -webkit-text-fill-color: transparent; animation: name-glow 3.2s ease-in-out infinite; }
    .name-nebula { color: #80529c; background: linear-gradient(100deg, #80529c, #d277b3, #718bd3, #80529c); background-size: 240% 100%; background-clip: text; -webkit-text-fill-color: transparent; animation: name-glow 4.2s ease-in-out infinite; }
    .name-prism { color: #498c8b; background: linear-gradient(100deg, #4aab94, #6e80cf, #dd8aa1, #d9b35d, #4aab94); background-size: 260% 100%; background-clip: text; -webkit-text-fill-color: transparent; animation: name-glow 2.8s ease-in-out infinite; }
    .avatar-sparkle { animation: avatar-sparkle 2.6s ease-in-out infinite; }
    .avatar-sparkle::after { position: absolute; top: -5px; right: -4px; color: #c59637; content: "✦"; font-size: 12px; filter: drop-shadow(0 1px 2px rgba(255,255,255,.8)); animation: paw-bounce 2s ease-in-out infinite; }
    .avatar-orbit { animation: avatar-orbit 4s linear infinite; }
    .avatar-orbit::after { position: absolute; inset: -4px; border: 1px solid rgba(116,166,194,.75); border-radius: 17px; content: ""; pointer-events: none; }
    .avatar-pawprint { position: relative; overflow: visible !important; }
    .avatar-pawprint::after { position: absolute; z-index: 2; right: -5px; bottom: -5px; display: grid; width: 20px; height: 20px; place-items: center; border: 1px solid rgba(255,255,255,.75); border-radius: 50%; background: linear-gradient(145deg, #fff4d5, #e8bd6b); content: "🐾"; font-size: 12px; box-shadow: 0 2px 8px rgba(38,48,38,.22); animation: paw-bounce 1.8s ease-in-out infinite; }
    .avatar-moon { animation: avatar-moon 3s ease-in-out infinite; }
    .avatar-moon::after { position: absolute; inset: -4px; border: 1px solid rgba(182,210,255,.85); border-radius: 18px; content: ""; pointer-events: none; }
    .avatar-constellation { animation: avatar-constellation 3.2s ease-in-out infinite; }
    .avatar-constellation::after { position: absolute; top: -8px; right: -5px; color: #e7d18f; content: "✧"; font-size: 17px; filter: drop-shadow(0 0 5px rgba(231,209,143,.75)); animation: paw-bounce 2.2s ease-in-out infinite; }
    .avatar-crown { animation: avatar-crown 2.5s ease-in-out infinite; }
    .avatar-crown::after { position: absolute; top: -12px; left: 50%; color: #d5a83b; content: "👑"; font-family: "Segoe UI Emoji", sans-serif; font-size: 12px; filter: drop-shadow(0 1px 3px rgba(69,43,11,.4)); transform: translateX(-50%); }
    @keyframes name-glow { 0%, 100% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } }
    @keyframes dog-run-name { 0%, 100% { transform: translateY(0) rotate(-8deg); } 50% { transform: translateY(-2px) rotate(8deg); } }
    @keyframes star-trail-name { 0%, 100% { opacity: .7; transform: scale(.9) rotate(-10deg); } 50% { opacity: 1; transform: scale(1.12) rotate(12deg); } }
    @keyframes dog-preview-run { 0% { left: -18px; } 100% { left: 58px; } }
    @keyframes avatar-sparkle { 0%, 100% { box-shadow: 0 0 0 2px rgba(238,201,112,.25), 0 0 9px rgba(238,201,112,.16); } 50% { box-shadow: 0 0 0 3px rgba(238,201,112,.75), 0 0 17px rgba(238,201,112,.5); } }
    @keyframes avatar-orbit { to { box-shadow: 0 0 0 2px rgba(116,166,194,.8), 0 0 16px rgba(116,166,194,.4); } }
    @keyframes avatar-moon { 0%, 100% { box-shadow: 0 0 0 2px rgba(141,174,230,.25), 0 0 8px rgba(141,174,230,.18); } 50% { box-shadow: 0 0 0 3px rgba(141,174,230,.78), 0 0 18px rgba(141,174,230,.48); } }
    @keyframes avatar-constellation { 0%, 100% { box-shadow: 0 0 0 2px rgba(178,157,221,.25), 0 0 8px rgba(178,157,221,.2); } 50% { box-shadow: 0 0 0 3px rgba(178,157,221,.8), 0 0 18px rgba(178,157,221,.5); } }
    @keyframes avatar-crown { 0%, 100% { box-shadow: 0 0 0 2px rgba(213,168,59,.25), 0 0 8px rgba(213,168,59,.18); } 50% { box-shadow: 0 0 0 3px rgba(213,168,59,.8), 0 0 18px rgba(213,168,59,.5); } }
    @keyframes companion-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-3px); } }
    @keyframes companion-dog { 0%, 100% { transform: translateY(0) rotate(-8deg); } 50% { transform: translateY(-4px) rotate(8deg); } }
    @keyframes companion-cat { 0%, 100% { transform: rotate(0); } 35% { transform: rotate(-12deg) translateY(-2px); } 70% { transform: rotate(9deg); } }
    @keyframes companion-owl { 0%, 100% { transform: translateY(1px); } 50% { transform: translateY(-5px); } }
    @keyframes companion-fox { 0%, 100% { transform: translateY(0) rotate(0); } 50% { transform: translateY(-3px) rotate(-8deg); } }
    @keyframes companion-dragon { 0%, 100% { transform: translateY(0) scale(1); } 50% { transform: translateY(-4px) scale(1.08); } }
    @keyframes paw-bounce { 0%, 100% { transform: translateY(0) rotate(-12deg); } 50% { transform: translateY(-3px) rotate(12deg); } }
    .clock { min-width: 82px; padding: 7px 11px; color: #f5f2e9; background: linear-gradient(145deg, #34413c, #222d29); border: 1px solid rgba(255,255,255,.1); border-radius: var(--radius-sm); font: 700 20px/1.2 "Segoe UI", system-ui, sans-serif; text-align: center; font-variant-numeric: tabular-nums; box-shadow: inset 0 1px rgba(255,255,255,.08); }
    .clock.active { color: #25332d; background: linear-gradient(135deg, #f6dfa3, #dfb75f); }
    .board-frame { position: relative; width: var(--board-size); max-width: 100%; padding: 9px; background: linear-gradient(145deg, rgba(245, 239, 225, .96), rgba(105, 78, 56, .96)); border: 1px solid rgba(255,255,255,.62); border-radius: var(--radius-lg); box-shadow: 0 22px 50px rgba(48, 42, 33, .2), inset 0 1px rgba(255,255,255,.65); }
    .board { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); grid-template-rows: repeat(8, minmax(0, 1fr)); aspect-ratio: 1; overflow: hidden; border: 1px solid rgba(32, 30, 25, .32); border-radius: 15px; user-select: none; touch-action: manipulation; }
    .square { position: relative; display: grid; place-items: center; min-width: 0; min-height: 0; padding: 0; border: 0; border-radius: 0; cursor: pointer; }
    .square.light { background: var(--wood-light); }
    .square.dark { background: var(--wood-dark); }
    .square.last::before { position: absolute; inset: 0; background: rgba(224, 193, 91, .42); content: ""; }
    .square.selected::before { position: absolute; inset: 0; background: rgba(100, 160, 105, .52); content: ""; }
    .square.check::before { position: absolute; inset: 0; background: radial-gradient(ellipse at center, rgba(190, 52, 39, .87), rgba(190, 52, 39, .1) 72%); content: ""; }
    .square.legal::after { position: absolute; width: 23%; aspect-ratio: 1; border-radius: 50%; background: rgba(35, 44, 37, .3); content: ""; }
    .square.capture::after { position: absolute; inset: 5%; border: clamp(3px, .7vw, 7px) solid rgba(35, 44, 37, .3); border-radius: 50%; content: ""; }
    .square.legal.own-move::after { background: rgba(42, 166, 82, .76); box-shadow: 0 0 0 2px rgba(245,255,244,.65); }
    .square.capture.own-move::after { border-color: rgba(42, 166, 82, .82); box-shadow: inset 0 0 0 2px rgba(245,255,244,.55); }
    .square.premove-target::after { opacity: .8; }
    .square.premove-queued::before { position: absolute; inset: 5%; border: 2px dashed #c58b22; border-radius: 12px; content: ""; }
    .piece { position: relative; z-index: 1; display: grid; place-items: center; width: auto; height: auto; max-width: 90%; max-height: 90%; font: normal clamp(24px, calc(var(--board-size) / 10), 60px)/1 "Segoe UI Symbol", "Arial Unicode MS", "Noto Sans Symbols 2", serif; cursor: grab; filter: drop-shadow(0 1px 1px rgba(0, 0, 0, .28)); }
    .piece.white { color: #fffdf4; -webkit-text-stroke: .35px #4e483d; text-shadow: 0 1px 1px #39362f; }
    .piece.black { color: #262c2a; -webkit-text-stroke: .25px #f4e8cf; text-shadow: 0 1px 1px rgba(255,255,255,.35); }
    .piece.in-check { color: #e11d32 !important; -webkit-text-stroke: 1.5px #72121e !important; filter: drop-shadow(0 0 4px rgba(255, 31, 55, .82)) drop-shadow(0 1px 2px rgba(25, 16, 16, .6)); text-shadow: 0 0 8px rgba(255, 55, 55, .72) !important; }
    .coord { position: absolute; z-index: 2; left: 3px; bottom: 1px; color: rgba(35, 42, 34, .68); font: 700 10px/1 "Segoe UI", sans-serif; }
    .dark .coord { color: rgba(250, 239, 213, .78); }
    .coord.file { right: 3px; bottom: auto; top: 2px; left: auto; }
    .under-board { width: var(--board-size); max-width: 100%; display: flex; justify-content: space-between; margin-top: 10px; color: var(--muted); font-size: 11px; }
    .capture-count { min-height: 17px; color: #69756e; font: 16px/1 Georgia, serif; letter-spacing: .04em; }
    .side-panel { overflow: hidden; background: color-mix(in srgb, var(--panel) 78%, transparent); border: 1px solid var(--glass-border); border-radius: var(--radius-lg); box-shadow: var(--glass-shadow); backdrop-filter: blur(18px) saturate(140%); -webkit-backdrop-filter: blur(18px) saturate(140%); }
    .panel-heading { display: flex; align-items: center; justify-content: space-between; padding: 17px 18px 14px; border-bottom: 1px solid color-mix(in srgb, var(--line) 75%, transparent); }
    .panel-heading h2 { margin: 0; font: 19px/1.2 Georgia, serif; font-weight: 400; }
    .moves-count { color: var(--muted); font-size: 11px; }
    .move-list { min-height: 210px; max-height: 34vh; overflow-y: auto; padding: 8px 12px; }
    .move-row { display: grid; grid-template-columns: 30px 1fr 1fr; min-height: 31px; align-items: center; border-bottom: 1px solid #eeeee7; font-size: 13px; }
    .move-number { color: #99a19a; font-size: 11px; }
    .move-san { padding: 4px 8px; border-radius: 8px; cursor: default; }
    .move-san.latest { background: linear-gradient(120deg, #e4eee6, #edf2e8); font-weight: 700; }
    .empty-moves { padding: 16px 8px; color: #8b958e; font-size: 12px; }
    .captured { padding: 13px 16px; border-top: 1px solid var(--line); }
    .label { display: block; margin-bottom: 6px; color: #89938b; font-size: 9px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
    .captured-line { min-height: 18px; color: var(--ink); font: 20px/1 Georgia, serif; }
    .toolbar { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; padding: 14px 16px; border-top: 1px solid var(--line); }
    .tool-btn, .primary-btn, .quiet-btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 42px; padding: 9px 13px; border: 1px solid color-mix(in srgb, var(--line) 88%, white); border-radius: 12px; background: linear-gradient(145deg, color-mix(in srgb, var(--panel) 94%, white), color-mix(in srgb, var(--panel) 94%, #dce8df)); box-shadow: 0 3px 10px rgba(37, 51, 43, .055), inset 0 1px rgba(255,255,255,.8); cursor: pointer; font-size: 12px; font-weight: 650; transition: background .2s ease, border-color .2s ease, box-shadow .2s ease, transform .2s ease; }
    .tool-btn:hover, .quiet-btn:hover { background: linear-gradient(135deg, #fff, #e8f0e8); border-color: #9baa9c; box-shadow: 0 6px 16px rgba(37, 51, 43, .1); }
    .tool-btn:active, .primary-btn:active, .quiet-btn:active { transform: translateY(1px); }
    .tool-btn[disabled] { opacity: .46; cursor: not-allowed; }
    .primary-btn { color: #fffdf5; border-color: transparent; background: linear-gradient(125deg, #315c49, #527e63 58%, #6f9273); box-shadow: 0 7px 18px rgba(42, 84, 62, .2), inset 0 1px rgba(255,255,255,.22); }
    .primary-btn:hover { background: linear-gradient(125deg, #294c3d, #477354 58%, #64896b); box-shadow: 0 9px 22px rgba(42, 84, 62, .27); }
    .quiet-btn { min-height: 36px; padding: 7px 11px; font-size: 11px; }
    .danger { color: var(--danger); }
    .settings { padding: 15px 16px 16px; border-top: 1px solid var(--line); }
    .settings-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
    .settings-title { font: 16px Georgia, serif; }
    .select-row { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
    .field label { display: block; margin-bottom: 4px; color: #7d8981; font-size: 10px; }
    .field select, .field input, .field textarea { width: 100%; min-height: 40px; padding: 9px 11px; color: var(--ink); border: 1px solid var(--line); border-radius: 11px; background: color-mix(in srgb, var(--panel) 90%, transparent); font: inherit; font-size: 12px; box-shadow: inset 0 1px 2px rgba(34, 50, 42, .04); }
    .field textarea { resize: vertical; }
    .start-game { width: 100%; margin-top: 11px; }
    .secondary-actions { display: flex; justify-content: flex-start; gap: 8px; padding: 0 16px 16px; }
    .result-banner { position: absolute; z-index: 5; inset: 9px; display: none; align-content: center; justify-items: center; gap: 10px; padding: clamp(14px, 4vw, 36px); overflow: hidden; color: #fffdf5; border: 1px solid rgba(255,255,255,.45); border-radius: 15px; background: rgba(30, 41, 35, .76); box-shadow: 0 12px 40px rgba(18, 27, 21, .3), inset 0 1px rgba(255,255,255,.2); text-align: center; backdrop-filter: blur(7px) saturate(125%); pointer-events: none; }
    .result-banner.visible { display: grid; animation: outcome-arrive .55s cubic-bezier(.2,.8,.2,1) both; }
    .result-banner.outcome-win { background: linear-gradient(135deg, rgba(16, 95, 55, .88), rgba(27, 55, 39, .82)); }
    .result-banner.outcome-loss { background: linear-gradient(135deg, rgba(150, 36, 39, .9), rgba(66, 29, 34, .84)); }
    .result-banner.outcome-draw { background: linear-gradient(135deg, rgba(148, 105, 24, .9), rgba(67, 53, 30, .84)); }
    .result-banner strong { font: 800 clamp(40px, 9vw, 76px)/1 Georgia, "Times New Roman", serif; letter-spacing: .015em; text-shadow: 0 4px 20px rgba(0,0,0,.4); }
    .result-banner span { max-width: 34ch; font-size: clamp(13px, 2.4vw, 17px); font-weight: 650; text-shadow: 0 2px 8px rgba(0,0,0,.4); }
    .result-banner .rating-outcome-change { max-width: 42ch; margin-top: 5px; padding: 9px 13px; border: 1px solid rgba(255,255,255,.22); border-radius: 12px; background: rgba(0,0,0,.2); font-size: clamp(12px, 2.2vw, 16px); font-weight: 800; font-variant-numeric: tabular-nums; }
    .result-banner .rating-outcome-change.outcome-win { color: #a9ffc2; }
    .result-banner .rating-outcome-change.outcome-loss { color: #ffaaa6; }
    .result-banner .rating-outcome-change.outcome-draw { color: #ffe4a3; }
    @keyframes outcome-arrive { 0% { opacity: 0; transform: translateY(14px) scale(.9); } 70% { opacity: 1; transform: translateY(-2px) scale(1.02); } 100% { opacity: 1; transform: translateY(0) scale(1); } }
    #languageButton { padding: 7px 10px; color: #f3e4bc; font-size: 11px; letter-spacing: .06em; white-space: nowrap; }
    .language-actions { justify-content: stretch; }
    .language-actions button { flex: 1; }
    .modal-backdrop { position: fixed; z-index: 10; inset: 0; display: none; place-items: center; overflow-y: auto; padding: 18px; background: rgba(16, 29, 24, .47); backdrop-filter: blur(9px) saturate(115%); -webkit-backdrop-filter: blur(9px) saturate(115%); }
    .modal-backdrop.visible { display: grid; }
    .modal { position: relative; width: min(440px, 100%); max-height: min(88vh, 800px); overflow-y: auto; padding: 26px; background: color-mix(in srgb, var(--panel) 88%, transparent); border: 1px solid rgba(255,255,255,.72); border-radius: var(--radius-lg); box-shadow: 0 28px 90px rgba(10, 23, 17, .3), inset 0 1px rgba(255,255,255,.72); backdrop-filter: blur(26px) saturate(155%); -webkit-backdrop-filter: blur(26px) saturate(155%); animation: arrive .22s ease-out; }
    .start-modal { width: min(560px, 100%); }
    .modal.profile-mode { padding: 18px; }
    .modal.profile-mode > .modal-heading, .modal.profile-mode > #accountIntro { margin-right: 4px; margin-left: 4px; }
    .modal-heading { display: flex; align-items: start; justify-content: space-between; gap: 16px; margin: 0 0 9px; }
    .modal-heading h2 { margin: 0; }
    .modal-close { display: grid; flex: 0 0 auto; place-items: center; width: 36px; height: 36px; padding: 0; color: var(--muted); border: 1px solid var(--line); border-radius: 12px; background: color-mix(in srgb, var(--panel) 80%, transparent); cursor: pointer; font-size: 22px; line-height: 1; transition: background .2s ease, transform .2s ease; }
    .modal-close:hover { color: var(--ink); background: rgba(120, 140, 125, .15); transform: rotate(4deg); }
    @keyframes arrive { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
    .modal h2 { margin: 0 0 5px; font: 26px Georgia, serif; font-weight: 400; }
    .modal p { margin: 0 0 18px; color: var(--muted); font-size: 12px; }
    .modal .field { margin-bottom: 13px; }
    .modal .field select, .modal .field input, .modal .field textarea { min-height: 40px; font-size: 13px; }
    .modal-actions { display: flex; justify-content: end; gap: 8px; margin-top: 14px; }
    .modal-actions .primary-btn { min-width: 130px; }
    .start-actions { justify-content: space-between; flex-wrap: wrap; margin-top: 15px; }
    .start-description { margin-bottom: 16px !important; }
    .start-section-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 8px; color: var(--ink); font-size: 12px; font-weight: 700; }
    .start-section-heading .hint { margin: 0; font-weight: 400; }
    .time-control-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; }
    .time-control { display: grid; min-width: 0; min-height: 76px; align-content: center; gap: 2px; padding: 9px 5px; color: var(--ink); border: 1px solid var(--line); border-radius: 14px; background: linear-gradient(145deg, color-mix(in srgb, var(--panel) 82%, #d7dfd7), color-mix(in srgb, var(--panel) 96%, #cbd9ce)); cursor: pointer; transition: border-color .2s ease, background .2s ease, transform .2s ease, box-shadow .2s ease; }
    .time-control:hover { transform: translateY(-2px); border-color: #9baa9c; }
    .time-control.selected { color: #fffdf5; border-color: transparent; background: linear-gradient(135deg, #263b32, #52715d 58%, #738c70); box-shadow: 0 8px 18px rgba(37, 65, 48, .2), inset 0 1px rgba(255,255,255,.22); }
    .time-control strong { font: 22px/1.2 Georgia, "Times New Roman", serif; font-weight: 400; font-variant-numeric: tabular-nums; }
    .time-control span { color: var(--muted); font-size: 10px; }
    .time-control.selected span { color: rgba(255,255,255,.78); }
    .start-settings { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 15px; }
    .start-settings .field { min-width: 0; margin-bottom: 0; }
    .start-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 16px; }
    .start-actions > button { min-width: 0; }
    .start-actions #beginButton, .start-actions .start-account-button { grid-column: 1 / -1; }
    .start-actions #beginButton { min-height: 46px; }
    .start-actions .quiet-btn { min-height: 40px; }
    .start-account-button { border-style: dashed; }
    .promotion-options { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
    .promotion-options button { min-height: 64px; border: 1px solid var(--line); background: #f8f6ef; font: 44px/1 Georgia, serif; cursor: pointer; }
    .sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
    .top-actions { display: flex; min-width: 0; align-items: center; justify-content: flex-end; gap: 8px; white-space: nowrap; }
    .top-actions button { display: inline-flex; align-items: center; gap: 7px; min-height: 40px; padding: 7px 12px; color: #f6f3e8; border: 1px solid rgba(225, 238, 226, .2); border-radius: 13px; background: linear-gradient(135deg, rgba(255,255,255,.105), rgba(255,255,255,.035)); box-shadow: inset 0 1px rgba(255,255,255,.12); backdrop-filter: blur(10px); cursor: pointer; font-size: 12px; font-weight: 650; transition: background .2s ease, transform .2s ease, border-color .2s ease; }
    .top-actions button:hover { border-color: rgba(235,219,180,.34); background: linear-gradient(135deg, rgba(255,255,255,.18), rgba(255,255,255,.06)); transform: translateY(-1px); }
    .top-actions #languageButton { min-width: 66px; justify-content: center; font-variant-numeric: tabular-nums; }
    .account-name { max-width: 126px; min-width: 0; overflow: hidden; color: #f0d48f; font-size: 12px; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
    .account-name:not([hidden]) { display: flex; align-items: center; gap: 6px; }
    .account-name-text { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
    .account-name > .admin-badge { flex: 0 0 auto; }
    .account-avatar { display: inline-grid; flex: 0 0 auto; width: 28px; height: 28px; place-items: center; overflow: hidden; color: #f1e7c9; border: 1px solid rgba(255,255,255,.35); border-radius: 50%; background: linear-gradient(145deg, #647d6c, #293e32); background-position: center; background-size: cover; font: 17px/1 Georgia, serif; }
    .account-avatar.has-image { background-color: #293e32; }
    .account-button-label { white-space: nowrap; }
    #accountButton { flex: 0 0 auto; }
    #accountButton { min-width: 88px; justify-content: center; border-color: rgba(212,190,139,.28); background: linear-gradient(135deg, rgba(255,255,255,.13), rgba(255,255,255,.045)); }
    #accountButton .account-avatar { width: 30px; height: 30px; border-radius: 50%; }
    .profile-form, #profileForm { min-width: 0; }
    .profile-banner, .profile-identity, .profile-image-actions, .profile-stats, .profile-actions { min-width: 0; }
    .select-row { grid-template-columns: repeat(auto-fit, minmax(min(100%, 130px), 1fr)); }
    .appearance-row { margin-top: 10px; }
    .blind-setting { display: flex; align-items: start; gap: 8px; margin-top: 11px; color: var(--ink); font-size: 12px; }
    .blind-copy { display: block; min-width: 0; }
    .blind-copy strong, .blind-copy .hint { display: block; }
    .blind-setting input { width: 16px; height: 16px; margin: 0; accent-color: var(--green-dark); }
    .hint { margin-top: 4px; color: var(--muted); font-size: 10px; }
    .settings-status { min-height: 15px; margin: 8px 0 0; color: var(--danger); font-size: 10px; }
    .modal-message { min-height: 18px; margin: 8px 0 0 !important; color: var(--danger) !important; }
    .modal-message.success { color: var(--green-dark) !important; }
    .profile-meta { margin: 0 0 16px; padding: 10px 12px; color: var(--muted); background: rgba(120, 130, 120, .08); font-size: 12px; }
    .profile-meta strong { color: var(--ink); }
    .profile-actions { display: flex; justify-content: space-between; gap: 8px; margin-top: 18px; }
    .profile-banner { position: relative; display: flex; align-items: end; min-height: 112px; overflow: hidden; margin: 0; padding: 14px 20px; color: rgba(255,255,255,.92); background: linear-gradient(125deg, #27473a, #77917d 58%, #d2b578); background-position: center; background-size: cover; border-radius: 16px; font-size: 11px; font-weight: 650; letter-spacing: .08em; text-transform: uppercase; }
    .profile-banner::before { position: absolute; inset: 0; background: linear-gradient(0deg, rgba(20,33,27,.44), transparent 80%); content: ""; }
    .profile-banner span { position: relative; z-index: 1; }
    .profile-banner.has-image > span { visibility: hidden; }
    .profile-identity { display: flex; align-items: end; flex-wrap: wrap; gap: 10px; margin: -25px 0 10px 12px; }
    .profile-avatar { position: relative; z-index: 1; display: grid; flex: 0 0 auto; place-items: center; width: 76px; height: 76px; overflow: hidden; color: #e6d39e; border: 4px solid var(--panel); border-radius: 24px; background: linear-gradient(145deg, #324c3f, #17241e); box-shadow: 0 5px 16px rgba(20,33,27,.2); font: 40px/1 Georgia, serif; }
    .profile-avatar.has-image { background-position: center; background-size: cover; }
    .profile-avatar.has-image > span { visibility: hidden; }
    .profile-identity .profile-meta { max-width: min(230px, calc(100% - 104px)); margin: 0 0 5px; padding: 6px 8px; overflow-wrap: anywhere; background: color-mix(in srgb, var(--panel) 78%, transparent); border-radius: 10px; }
    .profile-image-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 13px; }
    .upload-label { cursor: pointer; }
    .file-input { display: none; }
    .profile-cosmetics { min-width: 0; margin: 15px 0 18px; }
    .profile-cosmetics h2, .profile-cosmetics h3 { display: flex; align-items: center; gap: 8px; margin: 0 0 10px; font-size: 14px; font-weight: 750; letter-spacing: -.01em; }
    .profile-cosmetics h2::after { height: 1px; flex: 1; background: linear-gradient(90deg, var(--line), transparent); content: ""; }
    .cosmetic-gallery { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
    .cosmetic-card { position: relative; display: grid; grid-template-columns: 42px minmax(0, 1fr); align-items: center; gap: 10px; min-width: 0; min-height: 78px; overflow: hidden; padding: 10px; color: var(--ink); border: 1px solid color-mix(in srgb, var(--line) 85%, transparent); border-radius: 17px; background: linear-gradient(145deg, color-mix(in srgb, var(--panel) 95%, white), color-mix(in srgb, var(--panel) 86%, var(--green))); box-shadow: inset 0 1px rgba(255,255,255,.55), 0 5px 16px rgba(27,43,33,.045); text-align: left; cursor: pointer; transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease; }
    .cosmetic-card::before { position: absolute; inset: 0 auto 0 0; width: 3px; background: var(--cosmetic-accent, #77917d); content: ""; opacity: .8; }
    .cosmetic-card.is-equipped { border-color: color-mix(in srgb, var(--cosmetic-accent, var(--green)) 36%, var(--line)); box-shadow: inset 0 1px rgba(255,255,255,.55), 0 8px 22px color-mix(in srgb, var(--cosmetic-accent, var(--green)) 10%, transparent); }
    .cosmetic-card:hover { transform: translateY(-2px); box-shadow: inset 0 1px rgba(255,255,255,.55), 0 10px 24px rgba(27,43,33,.1); }
    .cosmetic-slot-rank { --cosmetic-accent: #d3a344; }
    .cosmetic-slot-companion { --cosmetic-accent: #76a37e; }
    .cosmetic-slot-nameEffect { --cosmetic-accent: #8c82bd; }
    .cosmetic-slot-avatarEffect { --cosmetic-accent: #d08b67; }
    .cosmetic-icon { position: relative; display: grid; width: 42px; height: 42px; place-items: center; color: var(--green-dark); border: 1px solid color-mix(in srgb, var(--cosmetic-accent, var(--green)) 28%, var(--glass-border)); border-radius: 14px; background: radial-gradient(circle at 30% 20%, rgba(255,255,255,.95), transparent 54%), linear-gradient(145deg, color-mix(in srgb, var(--cosmetic-accent, var(--green)) 16%, var(--panel)), color-mix(in srgb, var(--cosmetic-accent, var(--green)) 28%, var(--panel))); box-shadow: inset 0 1px 2px rgba(255,255,255,.7), 0 3px 9px rgba(28,40,31,.08); font-size: 20px; font-weight: 750; }
    .cosmetic-card > .shop-item-preview { width: 42px; height: 42px; border-radius: 14px; }
    .cosmetic-card > .shop-item-preview.shop-preview-playerFrame { width: 42px; height: 42px; padding: 4px; }
    .cosmetic-card > .shop-item-preview.shop-preview-avatarEffect { width: 42px; height: 42px; }
    .cosmetic-card > .shop-item-preview.shop-preview-title { width: 42px; height: 42px; }
    .cosmetic-card > .shop-item-preview.shop-preview-title .player-title { max-height: 36px; font-size: 6px; }
    .cosmetic-card > .shop-item-preview.shop-preview-rank .player-rank { font-size: 6px; }
    .cosmetic-card > .shop-item-preview.shop-preview-companion .player-companion { font-size: 24px; }
    .cosmetic-icon.name-aurora { color: #568b84; background-image: linear-gradient(115deg, rgba(220,239,225,.9), rgba(212,216,241,.9), rgba(192,224,209,.95)); }
    .cosmetic-icon.name-flame { color: #b94724; background-image: linear-gradient(115deg, rgba(241,208,161,.92), rgba(244,166,104,.92), rgba(243,217,161,.95)); }
    .cosmetic-icon.name-dog-runner { animation: companion-dog 1.4s ease-in-out infinite; }
    .cosmetic-icon.name-star-trail { color: #9c701f; animation: star-trail-name 1.8s ease-in-out infinite; }
    .cosmetic-icon.name-comet { color: #5271ad; background-image: linear-gradient(115deg, #d9e8ff, #98aee4, #f0dcad); }
    .cosmetic-icon.name-nebula { color: #713e92; background-image: linear-gradient(115deg, #dfc5fa, #8498e0, #f1a9c5); }
    .cosmetic-icon.name-prism { color: #376d78; background-image: linear-gradient(115deg, #a9e3d5, #a7b3ed, #f5c2a8, #e1df9d); }
    .cosmetic-icon.rank-gold { color: #9c701f; background-image: linear-gradient(135deg, #fff1bd, #d9a83b); }
    .cosmetic-icon.rank-silver { color: #657079; background-image: linear-gradient(135deg, #fff, #b9c3c6); }
    .cosmetic-icon.rank-bronze { color: #80522e; background-image: linear-gradient(135deg, #f6d2a7, #a76b3e); }
    .cosmetic-icon.companion-dog, .cosmetic-icon.companion-cat, .cosmetic-icon.companion-fox, .cosmetic-icon.companion-owl, .cosmetic-icon.companion-dragon, .cosmetic-icon.companion-tiger, .cosmetic-icon.companion-phoenix, .cosmetic-icon.companion-unicorn { font-size: 23px; animation: companion-float 2.4s ease-in-out infinite; }
    .cosmetic-icon.rank-platinum { color: #496779; background-image: linear-gradient(135deg, #f2fbff, #a7c7d8 55%, #eef7fa); }
    .cosmetic-icon.rank-diamond { color: #6554a0; background-image: linear-gradient(135deg, #fff, #b8b1ed 52%, #8bd2d3); }
    .cosmetic-icon.rank-royal { color: #72511b; background-image: linear-gradient(135deg, #fff2bd, #d7923b 52%, #763f87); }
    .cosmetic-icon.avatar-sparkle { animation: avatar-sparkle 2.6s ease-in-out infinite; }
    .cosmetic-icon.avatar-orbit { animation: avatar-orbit 4s linear infinite; }
    .cosmetic-icon.avatar-pawprint { animation: none; }
    .cosmetic-icon.avatar-pawprint::after { width: 16px; height: 16px; font-size: 10px; }
    .cosmetic-icon.avatar-moon, .cosmetic-icon.avatar-constellation, .cosmetic-icon.avatar-crown { animation-duration: 2.8s; }
    .cosmetic-card-details { display: grid; min-width: 0; gap: 3px; }
    .cosmetic-slot-label { color: var(--muted); font-size: 9px; font-weight: 750; letter-spacing: .1em; text-transform: uppercase; }
    .cosmetic-item-name { overflow: hidden; color: var(--ink); font-size: 11px; font-weight: 750; text-overflow: ellipsis; white-space: nowrap; }
    .cosmetic-item-state { color: color-mix(in srgb, var(--cosmetic-accent, var(--muted)) 70%, var(--muted)); font-size: 9px; font-weight: 650; }
    .cosmetic-card.is-empty { background: color-mix(in srgb, var(--panel) 74%, transparent); box-shadow: none; }
    .cosmetic-card.is-empty .cosmetic-icon { color: var(--muted); border-style: dashed; background: color-mix(in srgb, var(--panel) 80%, transparent); box-shadow: none; opacity: .72; }
    .cosmetic-card.is-empty .cosmetic-item-name { color: var(--muted); font-weight: 600; }
    .cosmetic-picker-modal { width: min(760px, 100%); }
    .cosmetic-picker-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; max-height: min(56vh, 500px); overflow: auto; padding: 2px; }
    .cosmetic-picker-card { display: grid; grid-template-columns: 42px minmax(0, 1fr) auto; align-items: center; gap: 10px; min-width: 0; padding: 10px; border: 1px solid color-mix(in srgb, var(--line) 85%, transparent); border-radius: 15px; background: color-mix(in srgb, var(--panel) 87%, transparent); }
    .cosmetic-picker-card > .shop-item-preview { width: 42px; height: 42px; border-radius: 13px; }
    .cosmetic-picker-card > .shop-item-preview.shop-preview-playerFrame { width: 42px; height: 42px; padding: 4px; }
    .cosmetic-picker-card > .shop-item-preview.shop-preview-title { width: 42px; height: 42px; }
    .cosmetic-picker-card > .shop-item-preview.shop-preview-title .player-title { max-height: 36px; font-size: 6px; }
    .cosmetic-picker-card > .shop-item-preview.shop-preview-rank .player-rank { font-size: 6px; }
    .cosmetic-picker-card > .shop-item-preview.shop-preview-companion .player-companion { font-size: 24px; }
    .cosmetic-picker-card.is-current { border-color: color-mix(in srgb, #d3a344 54%, var(--line)); background: linear-gradient(135deg, color-mix(in srgb, var(--panel) 92%, #f5dfb1), color-mix(in srgb, var(--panel) 92%, #e8eee6)); }
    .cosmetic-picker-details { display: grid; min-width: 0; gap: 3px; }
    .cosmetic-picker-details strong { overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
    .cosmetic-picker-details > span { display: -webkit-box; overflow: hidden; color: var(--muted); font-size: 10px; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
    .cosmetic-picker-state { color: var(--green-dark); font-size: 9px; font-weight: 700; }
    .cosmetic-picker-card > button { min-height: 34px; padding: 6px 9px; font-size: 10px; white-space: nowrap; }
    body[data-theme="dark"] .member-admin-tools { background: linear-gradient(140deg, rgba(47,57,49,.95), rgba(44,55,49,.9)); }
    .member-profile-cosmetics { margin: 8px 0 14px; }
    .member-profile-cosmetics .cosmetic-gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .image-crop-modal { width: min(640px, 100%); }
    .crop-stage { position: relative; width: 100%; margin: 12px auto; overflow: hidden; border: 1px solid var(--glass-border); border-radius: 16px; background: linear-gradient(45deg, rgba(80,90,80,.12) 25%, transparent 25%, transparent 75%, rgba(80,90,80,.12) 75%), linear-gradient(45deg, rgba(80,90,80,.12) 25%, transparent 25%, transparent 75%, rgba(80,90,80,.12) 75%); background-position: 0 0, 8px 8px; background-size: 16px 16px; box-shadow: inset 0 0 0 1px rgba(255,255,255,.4); cursor: grab; touch-action: none; }
    .crop-stage[data-kind="avatar"] { width: min(100%, 360px); aspect-ratio: 1; }
    .crop-stage[data-kind="banner"] { aspect-ratio: 5 / 1; }
    .crop-stage:active { cursor: grabbing; }
    .crop-stage img { position: absolute; max-width: none; user-select: none; pointer-events: none; }
    .crop-zoom-label { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 12px; }
    .crop-zoom-label input { flex: 1; accent-color: var(--green-dark); }
    .crop-actions { display: flex; justify-content: space-between; gap: 8px; margin-top: 14px; }
    .crop-actions button { min-height: 40px; }
    .profile-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 0 0 14px; }
    .stat-card { display: grid; justify-items: center; gap: 2px; padding: 10px 6px; border: 1px solid color-mix(in srgb, var(--line) 75%, transparent); border-radius: 13px; background: color-mix(in srgb, var(--panel) 68%, transparent); }
    .stat-card strong { color: var(--green-dark); font-size: 19px; font-variant-numeric: tabular-nums; }
    .stat-card span { color: var(--muted); font-size: 10px; }
    .rating-strip { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: -5px 0 15px; }
    .rating-strip > div { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-width: 0; padding: 9px 12px; border: 1px solid color-mix(in srgb, var(--line) 75%, transparent); border-radius: 13px; background: color-mix(in srgb, var(--panel) 70%, transparent); }
    .rating-strip span { color: var(--muted); font-size: 11px; }
    .rating-strip strong { color: var(--green-dark); font-size: 15px; font-variant-numeric: tabular-nums; }
    .daily-reward-card { display: grid; grid-template-columns: 52px minmax(0, 1fr) auto; align-items: center; gap: 16px; margin: 20px 0; padding: 18px; border: 1px solid rgba(212,171,91,.38); border-radius: 20px; background: linear-gradient(125deg, color-mix(in srgb, var(--panel) 90%, #f5e3ad), color-mix(in srgb, var(--panel) 84%, #e8c879)); box-shadow: 0 12px 30px rgba(67,49,21,.08), inset 0 1px rgba(255,255,255,.55); }
    .daily-reward-icon { display: grid; width: 48px; height: 48px; place-items: center; color: #a76b18; border: 1px solid rgba(198,151,66,.35); border-radius: 16px; background: linear-gradient(145deg, #fff5d6, #eacb77); box-shadow: inset 0 1px rgba(255,255,255,.8), 0 5px 15px rgba(128,87,27,.12); font-size: 25px; }
    .daily-reward-copy { min-width: 0; }
    .daily-reward-copy .eyebrow { margin-bottom: 3px; }
    .daily-reward-copy h2 { margin: 0; font: 600 20px/1.2 Georgia, "Times New Roman", serif; }
    .daily-reward-copy p { margin: 5px 0 0; color: var(--muted); font-size: 12px; }
    .daily-reward-copy .daily-reward-status { font-weight: 650; }
    .daily-reward-card > button { min-width: 178px; }
    body[data-theme="dark"] .daily-reward-card { background: linear-gradient(125deg, rgba(91,74,43,.55), rgba(61,67,48,.65)); }
    body[data-theme="dark"] .daily-reward-icon { color: #ffe4a3; border-color: rgba(233,195,112,.4); background: linear-gradient(145deg, #8b6a37, #594729); }
    .elo-progress-card { margin: 18px 0; padding: clamp(18px, 4vw, 28px); border: 1px solid var(--glass-border); border-radius: 22px; background: linear-gradient(135deg, color-mix(in srgb, var(--panel) 90%, #d9e8d8), color-mix(in srgb, var(--panel) 84%, #f1dfb8)); box-shadow: var(--glass-shadow); }
    .elo-progress-card[hidden] { display: none; }
    .elo-progress-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 22px; }
    .elo-progress-heading h2 { margin: 5px 0 0; color: var(--ink); font: 600 clamp(26px, 5vw, 38px)/1.1 Georgia, "Times New Roman", serif; font-variant-numeric: tabular-nums; }
    .elo-rank { padding: 8px 13px; color: #fff9e9; border: 1px solid rgba(255,255,255,.55); border-radius: 999px; background: linear-gradient(120deg, #446b50, #8b9b52); box-shadow: 0 5px 15px rgba(48,80,54,.18); font-size: 12px; }
    .elo-progress-track { position: relative; height: 18px; overflow: hidden; border: 1px solid color-mix(in srgb, var(--line) 75%, transparent); border-radius: 999px; background: color-mix(in srgb, var(--panel) 60%, #263b30); box-shadow: inset 0 2px 5px rgba(18,30,25,.16); }
    .elo-progress-track::after { position: absolute; top: 0; bottom: 0; left: 3.3333%; width: 2px; background: rgba(255,255,255,.92); box-shadow: 0 0 5px rgba(24,38,28,.7); content: ""; }
    .elo-progress-fill { width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #82976b, #d5b558 52%, #dc8c46 78%, #c75742); box-shadow: 0 0 16px rgba(198,151,66,.32); transition: width .65s cubic-bezier(.2,.8,.2,1); }
    .elo-progress-scale { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 12px; }
    .elo-progress-scale span { display: grid; gap: 2px; color: var(--muted); font-size: 11px; }
    .elo-progress-scale span:nth-child(2) { text-align: center; }
    .elo-progress-scale span:last-child { text-align: right; }
    .elo-progress-scale strong { color: var(--ink); font-variant-numeric: tabular-nums; }
    .elo-progress-scale small { font-size: 10px; }
    .elo-progress-message { margin: 17px 0 0; color: var(--muted); font-size: 13px; }
    .elo-reward-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
    .elo-reward-controls .member-status { margin: 0; }
    .elo-reward-milestones { margin-top: 24px; }
    .elo-reward-milestones h2 { margin: 0; font: 400 24px/1.2 Georgia, "Times New Roman", serif; }
    .elo-reward-milestones > p { color: var(--muted); font-size: 13px; }
    .elo-milestone-list { display: grid; gap: 12px; }
    .elo-milestone-band { padding: 14px; border: 1px solid var(--line); border-radius: 14px; background: color-mix(in srgb, var(--panel) 75%, transparent); }
    .elo-milestone-band h3 { margin: 0 0 10px; font-size: 13px; }
    .elo-milestone-items { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 7px; }
    .elo-milestone { min-height: 34px; padding: 5px; color: var(--ink); border: 1px solid var(--line); border-radius: 9px; background: color-mix(in srgb, var(--panel) 90%, transparent); font-size: 10px; }
    .elo-milestone:disabled { opacity: .72; cursor: default; }
    .elo-milestone.is-available { color: #fff; border-color: #3e8b52; background: linear-gradient(135deg, #287441, #4a9b58); cursor: pointer; }
    .elo-milestone.is-claimed { color: var(--muted); border-style: dashed; }
    .reward-toast { position: fixed; z-index: 20; right: 18px; bottom: 18px; width: min(360px, calc(100vw - 36px)); padding: 14px 16px; color: var(--ink); border: 1px solid var(--glass-border); border-radius: 16px; background: var(--panel); box-shadow: var(--glass-shadow); animation: arrive .25s ease-out both; }
    .reward-toast strong { display: block; margin-bottom: 4px; }
    .leaderboard-table-wrap { overflow-x: auto; }
    .leaderboard-table { font-size: 14px; }
    .leaderboard-table th, .leaderboard-table td { padding: 11px 9px; }
    .leaderboard-table tbody tr:first-child td:first-child { color: #b3872e; font-weight: 800; }
    .leaderboard-table tbody tr:nth-child(2) td:first-child { color: #75828a; font-weight: 800; }
    .leaderboard-table tbody tr:nth-child(3) td:first-child { color: #a76f46; font-weight: 800; }
    .leaderboard-player { padding: 0; color: var(--ink); border: 0; background: transparent; font-weight: 650; text-decoration: none; cursor: pointer; }
    .leaderboard-player:hover { text-decoration: underline; }
    .rewards-actions { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 16px; }
    .member-avatar { display: grid; flex: 0 0 auto; place-items: center; width: 42px; height: 42px; overflow: hidden; color: #f3edda; border: 1px solid var(--glass-border); border-radius: 14px; background: linear-gradient(145deg, #587361, #293e32); background-position: center; background-size: cover; font: 23px/1 Georgia, serif; }
    .admin-badge { position: relative; display: inline-flex; align-items: center; justify-content: center; overflow: hidden; padding: 3px 8px; color: #fff8ec; border: 1px solid rgba(255, 232, 198, .58); border-radius: 999px; background: linear-gradient(115deg, #b84d12, #f28a20 42%, #ffbd52 60%, #d95d13); background-size: 220% 100%; box-shadow: inset 0 1px 0 rgba(255,255,255,.55), 0 2px 9px rgba(199, 91, 23, .28); backdrop-filter: blur(12px) saturate(155%); -webkit-backdrop-filter: blur(12px) saturate(155%); font: 800 9px/1.2 "Segoe UI", system-ui, sans-serif; letter-spacing: .12em; vertical-align: middle; animation: admin-gradient 4s ease-in-out infinite, admin-glow 2.8s ease-in-out infinite; }
    .admin-badge[hidden] { display: none; }
    .admin-badge::after { position: absolute; inset: -40% auto -40% -50%; width: 38%; background: linear-gradient(90deg, transparent, rgba(255,255,255,.58), transparent); content: ""; transform: skewX(-20deg); animation: admin-shine 3.6s ease-in-out infinite; }
    @keyframes admin-gradient { 0%, 100% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } }
    @keyframes admin-glow { 0%, 100% { box-shadow: inset 0 1px 0 rgba(255,255,255,.45), 0 2px 8px rgba(199, 91, 23, .23); } 50% { box-shadow: inset 0 1px 0 rgba(255,255,255,.7), 0 3px 14px rgba(245, 137, 37, .48); } }
    @keyframes admin-shine { 0%, 20% { left: -50%; } 58%, 100% { left: 140%; } }
    .member-result-top { align-items: center; }
    .member-ident { display: flex; align-items: center; gap: 10px; min-width: 0; }
    .member-ident-text { display: grid; min-width: 0; }
    .member-profile-link { display: flex; align-items: center; gap: 10px; min-width: 0; padding: 0; border: 0; background: transparent; text-align: left; cursor: pointer; }
    .member-profile-link:hover .member-display-name { text-decoration: underline; text-underline-offset: 3px; }
    .member-name-line { display: flex; align-items: center; flex-wrap: wrap; gap: 5px; min-width: 0; }
    .member-actions { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 10px; }
    .member-actions button { min-height: 34px; padding: 6px 10px; font-size: 11px; }
    .member-profile-modal { width: min(460px, 100%); }
    .member-profile-modal h2 { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
    .member-profile-banner { margin-top: 8px; }
    .member-profile-banner.has-image > span { visibility: hidden; }
    .member-profile-identity { margin-bottom: 12px; }
    .member-profile-bio { min-height: 1em; overflow-wrap: anywhere; white-space: pre-wrap; }
    #incomingInvitationsButton { white-space: nowrap; }
    #invitationCount { display: inline-grid; min-width: 18px; height: 18px; place-items: center; margin-left: 4px; color: #28342e; border-radius: 999px; background: #e8c77d; font-size: 10px; font-weight: 800; }
    .invitation-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
    .invitation-actions button { min-height: 34px; padding: 6px 11px; font-size: 11px; }
    .member-display-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .member-stats { margin-top: 8px; color: var(--muted); font-size: 10px; }
    .member-banner { height: 66px; margin-top: 10px; border: 1px solid var(--glass-border); border-radius: 12px; background: linear-gradient(125deg, #27473a, #77917d 58%, #d2b578); background-position: center; background-size: cover; }
    body[data-theme="dark"] .stat-card strong { color: #a7cfad; }
    body[data-theme="dark"] .profile-avatar { border-color: #252f2c; }
    .member-search { margin: 15px 0 10px; }
    .member-results { display: grid; gap: 9px; max-height: min(48vh, 430px); overflow-y: auto; margin-top: 14px; }
    .member-result { padding: 13px 14px; border: 1px solid color-mix(in srgb, var(--line) 75%, transparent); border-radius: 14px; background: color-mix(in srgb, var(--panel) 70%, transparent); box-shadow: inset 0 1px rgba(255,255,255,.5); }
    .member-result-top { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
    .member-display-name { color: var(--ink); font-size: 14px; font-weight: 700; }
    .member-username { color: var(--muted); font-size: 11px; }
    .member-bio { margin: 6px 0 0; color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }
    .member-since { margin-top: 7px; color: var(--muted); font-size: 10px; }
    .member-status { min-height: 20px; color: var(--muted); font-size: 12px; }
    .community-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
    .community-actions > button { flex: 1 1 150px; }
    .tournament-list, .tournament-standings { display: grid; gap: 10px; margin-top: 14px; }
    .tournament-card, .tournament-detail { padding: 13px; border: 1px solid color-mix(in srgb, var(--line) 75%, transparent); border-radius: 14px; background: color-mix(in srgb, var(--panel) 75%, transparent); }
    .tournament-card h3, .tournament-detail h3 { margin: 0 0 4px; font-size: 14px; }
    .tournament-card p, .tournament-detail p { margin: 4px 0 9px; }
    .tournament-card-actions { display: flex; flex-wrap: wrap; gap: 7px; }
    .tournament-card-actions button { min-height: 34px; padding: 6px 10px; font-size: 11px; }
    .tournament-start-time { color: var(--green); font-weight: 650; }
    .tournament-schedule-notice { padding: 9px 11px; border-radius: 10px; background: color-mix(in srgb, var(--gold) 20%, var(--panel)); font-size: 12px; }
    .tournament-live-games { display: grid; gap: 6px; margin-top: 10px; }
    .tournament-live-game { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px; border-radius: 9px; background: color-mix(in srgb, var(--green) 8%, var(--panel)); font-size: 11px; }
    .tournament-live-game button { flex: 0 0 auto; padding: 5px 8px; }
    .tournament-table { width: 100%; border-collapse: collapse; font-size: 11px; }
    .tournament-table th, .tournament-table td { padding: 6px 4px; border-bottom: 1px solid var(--line); text-align: left; }
    .tournament-table th:not(:nth-child(2)), .tournament-table td:not(:nth-child(2)) { text-align: center; }
    .tournament-status { min-height: 20px; margin-top: 8px; color: var(--muted); font-size: 12px; }
    .match-status { min-height: 20px; color: var(--muted); font-size: 12px; }
    body[data-theme="dark"] { color-scheme: dark; --ink: #e4e6df; --muted: #a4aea7; --paper: #1b2422; --panel: #252f2c; --line: #3a4741; --green: #88ae91; --green-dark: #4a765d; --danger: #ed9785; --glass-border: rgba(205, 220, 208, .16); --glass-shadow: 0 18px 48px rgba(0, 0, 0, .24); background: radial-gradient(ellipse at 12% 8%, rgba(80, 119, 90, .22), transparent 34%), radial-gradient(ellipse at 89% 31%, rgba(126, 96, 54, .16), transparent 30%), linear-gradient(145deg, #1b2422, #202c28 64%, #252b25); }
    body[data-theme="dark"] .tool-btn, body[data-theme="dark"] .quiet-btn, body[data-theme="dark"] .field select, body[data-theme="dark"] .field input, body[data-theme="dark"] .field textarea { color: var(--ink); background: linear-gradient(145deg, #2b3733, #26322e); border-color: #4a5750; box-shadow: inset 0 1px rgba(255,255,255,.04); }
    body[data-theme="dark"] .move-row { border-color: #35413b; }
    body[data-theme="dark"] .move-san.latest { background: linear-gradient(120deg, #35483a, #303f36); }
    body[data-theme="dark"] .avatar { color: #252f2b; background: #d7d4c8; }
    body[data-theme="dark"] .avatar.black { color: #f4f0e5; background: #33423e; }
    body[data-theme="dark"] .field label, body[data-theme="dark"] .label { color: #b6c0b8; }
    body[data-board="green"] { --wood-light: #eeeed2; --wood-dark: #769656; }
    body[data-board="blue"] { --wood-light: #dee3e8; --wood-dark: #6f879b; }
    body[data-pieces="clean"] .piece { filter: none; -webkit-text-stroke: 0; text-shadow: none; font-family: "Segoe UI Symbol", "Arial Unicode MS", sans-serif; }
    body[data-background="plain"] { background-image: none; }
    body[data-blind-mode="true"] .square:focus-visible { z-index: 3; outline: 4px solid #ffd45a; outline-offset: -4px; }
    .square:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid #d5a951; outline-offset: 2px; }
    body[data-theme="dark"] .square:focus-visible, body[data-theme="dark"] button:focus-visible, body[data-theme="dark"] input:focus-visible, body[data-theme="dark"] select:focus-visible, body[data-theme="dark"] textarea:focus-visible { outline-color: #e8c77d; }
    @media (max-width: 820px) {
      :root { --board-size: min(82vw, 62vh, 620px); }
      main { padding-top: 22px; }
      .layout { grid-template-columns: minmax(0, 1fr); justify-items: center; }
      .page-heading { align-items: start; }
      .side-panel { width: min(100%, 620px); }
      .move-list { min-height: 120px; max-height: 230px; }
      .play-area { width: var(--board-size); }
    }
    @media (max-width: 1050px) {
      .topbar { grid-template-columns: minmax(0, 1fr) auto; gap: 7px 14px; padding-block: 9px; }
      .brand { grid-column: 1; grid-row: 1; }
      .top-actions { grid-column: 2; grid-row: 1; }
      .site-nav { grid-column: 1 / -1; grid-row: 2; justify-content: flex-start; }
      .site-nav a { padding-inline: 12px; }
    }
    @media (max-width: 700px) {
      .top-note { display: none; }
      .topbar { grid-template-columns: minmax(0, 1fr); gap: 7px; padding-block: 9px; }
      .brand { grid-column: 1; grid-row: 1; }
      .site-nav { grid-column: 1; grid-row: 2; width: 100%; gap: 2px; overflow-x: auto; scrollbar-width: thin; }
      .site-nav a { flex: 0 0 auto; padding: 7px 9px; }
      .top-actions { grid-column: 1; grid-row: 3; width: 100%; justify-content: flex-end; gap: 6px; }
      .page-heading { align-items: flex-start; }
      .side-panel { min-width: 0; }
      .home-page { min-height: calc(100vh - 130px); }
      .home-feature-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    }
    @media (max-width: 480px) {
      :root { --board-size: min(calc(100vw - 24px), 56vh); }
      .topbar { min-height: 60px; padding: 7px 13px; }
      .brand-name { font-size: 17px; }
      .top-note { display: none; }
      main { padding: 18px 12px 32px; }
      .page-heading { margin-bottom: 14px; }
      h1 { font-size: 28px; }
      .status-line { font-size: 11px; }
      .play-area { width: var(--board-size); }
      .board-frame { padding: 5px; }
      .player-strip { min-height: 48px; padding: 6px 9px; }
      .avatar { width: 29px; height: 29px; font-size: 20px; }
      .clock { min-width: 70px; padding: 5px 7px; font-size: 18px; }
      .tool-btn { min-height: 42px; }
      .modal-backdrop { padding: 10px; }
      .modal { max-height: calc(100dvh - 20px); padding: 20px; }
      .modal.profile-mode { padding: 16px; }
      .home-hero { padding: 24px 18px; border-radius: 24px; }
      .home-hero h1 { font-size: 38px; }
      .home-feature { padding: 14px; }
      .shop-list { grid-template-columns: minmax(0, 1fr); }
      .daily-reward-card { grid-template-columns: 46px minmax(0, 1fr); gap: 12px; padding: 14px; }
      .daily-reward-icon { width: 44px; height: 44px; }
      .daily-reward-copy h2 { font-size: 18px; }
      .daily-reward-card > button { grid-column: 1 / -1; width: 100%; }
      .admin-tools { padding: 16px; }
      .admin-tools-heading h2 { font-size: 20px; }
      .admin-account-result { align-items: flex-start; flex-direction: column; gap: 2px; }
      .admin-account-inventory { text-align: left; }
      .admin-item-options { grid-template-columns: minmax(0, 1fr); }
      .shop-item { grid-template-columns: 46px minmax(0, 1fr); }
      .shop-item-preview { width: 44px; height: 44px; border-radius: 14px; }
      .shop-item-actions { grid-column: 1 / -1; grid-template-columns: repeat(2, minmax(0, 1fr)); }
      .shop-item-actions button { width: 100%; }
      .profile-banner { min-height: 96px; }
      .profile-identity { margin-left: 4px; }
      .profile-avatar { width: 66px; height: 66px; border-radius: 20px; }
      .profile-identity .profile-meta { max-width: min(240px, calc(100% - 86px)); font-size: 11px; }
      .profile-image-actions { align-items: flex-start; }
      .profile-image-actions .hint { flex-basis: 100%; }
      .cosmetic-gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); }
      .crop-stage[data-kind="avatar"] { width: min(100%, 290px); }
      .crop-actions button { padding: 8px 11px; font-size: 11px; }
      .cosmetic-picker-grid { grid-template-columns: minmax(0, 1fr); }
      .cosmetic-picker-card { grid-template-columns: 40px minmax(0, 1fr); }
      .cosmetic-picker-card > button { grid-column: 1 / -1; width: 100%; }
    }
    @media (max-width: 390px) {
      .brand { gap: 7px; }
      .brand-mark { font-size: 29px; }
      .brand-name { font-size: 15px; }
      .brand-sub { font-size: 8px; }
      .top-actions { gap: 5px; }
      .top-actions button { padding: 6px 8px; font-size: 11px; }
      .account-name { max-width: 96px; }
      .account-button-label { display: none; }
      #accountButton { min-width: 42px; }
    }
    @media (max-width: 560px) {
      .topbar { min-height: 0; grid-template-columns: minmax(0, 1fr); gap: 7px; padding: 9px 13px; }
      .brand { grid-column: 1; grid-row: 1; }
      .site-nav { grid-column: 1; grid-row: 2; }
      .top-actions { grid-column: 1; grid-row: 3; width: 100%; justify-content: space-between; gap: 6px; }
      .top-actions button { min-height: 36px; }
      .elo-milestone-items { grid-template-columns: repeat(3, minmax(0, 1fr)); }
      .account-name { max-width: min(130px, 32vw); }
      .modal-backdrop { align-items: center; padding: 8px; }
      .modal { width: 100%; max-height: calc(100dvh - 16px); padding: 18px; border-radius: 22px; }
      .modal.profile-mode { padding: 14px; }
      .start-modal { padding: 18px; }
      .time-control-grid { gap: 6px; }
      .time-control { min-height: 70px; padding: 8px 3px; }
      .time-control strong { font-size: 20px; }
      .time-control span { font-size: 9px; }
      .start-actions { grid-template-columns: minmax(0, 1fr); }
      .start-actions #beginButton, .start-actions .start-account-button { grid-column: auto; }
      .profile-image-actions { gap: 6px; }
      .profile-image-actions .hint { flex-basis: 100%; }
      .profile-identity .profile-meta { max-width: calc(100% - 86px); overflow-wrap: anywhere; }
      .profile-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 5px; }
      .stat-card { min-width: 0; padding: 9px 3px; }
      .profile-actions { flex-wrap: wrap; }
      .profile-actions button { flex: 1 1 120px; }
      .select-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
      .page-heading { flex-wrap: wrap; gap: 6px; }
      .status-line { max-width: 100%; overflow-wrap: anywhere; }
    }
    @media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; } }

    /* =====================================================================
       Mobil-Redesign (November 2026)
       Allgemeine Ergänzungen + Regeln für Handys (≤ 700 px).
       ===================================================================== */

    /* ---------- Gilt für alle Breiten ---------- */
    .nav-icon { display: none; }
    /* "clip" statt "hidden": verhindert seitliches Scrollen, ohne position: sticky zu brechen */
    html, body { overflow-x: clip; }
    body:has(.modal-backdrop.visible) { overflow: hidden; }

    /* Profil-Kopf */
    .profile-hero { position: relative; margin-bottom: 6px; }
    .profile-hero .profile-banner { min-height: 128px; border-radius: 20px; }
    .profile-hero .profile-identity { position: relative; z-index: 2; display: flex; flex-direction: column; align-items: center; gap: 8px; margin: -44px 0 0; text-align: center; }
    .profile-avatar-wrap { position: relative; }
    .profile-hero .profile-avatar { width: 88px; height: 88px; border-radius: 26px; box-shadow: 0 10px 26px rgba(27, 43, 33, .18); }
    .profile-hero .profile-meta { display: grid; justify-items: center; gap: 4px; max-width: 100%; margin: 0; padding: 0; background: none; color: var(--muted); font-size: 13px; }
    .profile-name-line { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 8px; }
    .profile-display-name { color: var(--ink); font: 400 26px/1.15 Georgia, "Times New Roman", serif; overflow-wrap: anywhere; }
    .profile-handle { color: var(--muted); font-size: 13px; }
    .profile-sub-line { font-size: 13px; }
    .profile-hero .profile-title { margin-top: 0; }
    .media-edit { position: absolute; z-index: 3; display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-width: 40px; min-height: 40px; padding: 0 12px; color: #fffdf5; border: 1px solid rgba(255,255,255,.45); border-radius: 999px; background: rgba(20, 35, 31, .55); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); font-size: 13px; font-weight: 650; cursor: pointer; }
    .media-edit:hover { background: rgba(20, 35, 31, .72); }
    .media-edit:focus-within, .media-edit:focus-visible { outline: 3px solid #d5a951; outline-offset: 2px; }
    .banner-edit { top: 10px; right: 10px; }
    .avatar-edit { right: -8px; bottom: -6px; width: 40px; padding: 0; border-color: var(--panel); background: var(--green-dark); }
    .profile-hero .profile-banner > span { display: none; }
    .profile-banner > span { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; opacity: .55; }

    /* Profil-Abschnitte */
    .profile-section { margin: 22px 0 0; }
    .profile-section > h2, .profile-cosmetics > h2 { display: flex; align-items: center; gap: 8px; margin: 0 0 12px; font-size: 16px; font-weight: 750; }
    .profile-section > h2::after { height: 1px; flex: 1; background: linear-gradient(90deg, var(--line), transparent); content: ""; }
    .profile-stats-section .rating-strip { margin: 0 0 8px; }
    .rating-help-details { color: var(--muted); font-size: 13px; }
    .rating-help-details summary { display: inline-flex; align-items: center; min-height: 36px; color: var(--green-dark); font-weight: 650; cursor: pointer; }
    .rating-help-details .rating-help { margin: 4px 0 0; }
    .field-label-row { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
    .field-label-row label { margin-bottom: 6px; }
    .char-count { color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
    .profile-edit-section .field { margin-bottom: 16px; }
    .profile-edit-section .profile-actions { justify-content: flex-end; }
    .profile-page-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
    .profile-page-actions a { flex: 1 1 160px; color: var(--ink); }
    .profile-logout { margin-top: 26px; padding-top: 14px; border-top: 1px solid var(--line); text-align: center; }
    .logout-link { min-height: 44px; padding: 8px 16px; color: var(--danger); border: 0; background: transparent; font-size: 14px; font-weight: 650; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }

    /* Shop / Picker: Preis & gesperrte Items */
    .shop-item-price { display: block; margin-top: 6px; color: #8a6420; font-size: 12px; font-weight: 750; }
    .shop-item.is-locked .shop-item-preview, .cosmetic-picker-card.is-locked > .shop-item-preview { filter: grayscale(.55); opacity: .75; }
    button.is-locked, button.is-locked:disabled { color: var(--muted) !important; border: 1px dashed var(--line) !important; background: color-mix(in srgb, var(--panel) 80%, transparent) !important; box-shadow: none !important; cursor: not-allowed; opacity: 1; }

    /* Rangliste */
    .leaderboard-rank { font-size: 18px; }
    .leaderboard-table tbody tr.is-self td { background: color-mix(in srgb, var(--gold) 16%, transparent); }
    .leaderboard-table tbody tr.is-self td:first-child { border-radius: 10px 0 0 10px; }
    .leaderboard-table tbody tr.is-self td:last-child { border-radius: 0 10px 10px 0; }
    .leaderboard-podium .leaderboard-player { font-weight: 800; }
    #leaderboardStatus:empty { display: none; }

    /* Turniere */
    .create-tournament { margin-top: 16px; }
    .create-tournament > summary { width: 100%; list-style: none; cursor: pointer; }
    .create-tournament > summary::-webkit-details-marker { display: none; }
    .create-tournament[open] > summary { margin-bottom: 14px; }
    #createTournamentForm .field { margin-bottom: 14px; }
    #tournamentScheduleHint { display: block; margin-top: 6px; line-height: 1.45; }
    .tournament-status:empty { display: none; }

    /* Fremdes Profil */
    .member-profile-bio:empty { display: none; }

    /* ---------- Handy (≤ 700 px) ---------- */
    @media (max-width: 700px) {
      :root { --tabbar-height: 64px; }
      body { padding-bottom: calc(var(--tabbar-height) + env(safe-area-inset-bottom)); font-size: 15px; }

      /* Header: eine Zeile (ohne backdrop-filter, sonst hängt die fixierte Tab-Leiste am Header) */
      .topbar { backdrop-filter: none; -webkit-backdrop-filter: none; background: linear-gradient(112deg, #14231f, #22362e 56%, #1c2c27); }
      .topbar { grid-template-columns: minmax(0, 1fr) auto; gap: 8px; min-height: 0; padding: 8px 14px; padding-top: max(8px, env(safe-area-inset-top)); }
      .brand { grid-column: 1; grid-row: 1; gap: 8px; min-width: 0; }
      .brand-mark { font-size: 28px; }
      .brand-name { font-size: 18px; }
      .brand-sub { display: none; }
      .top-actions { grid-column: 2; grid-row: 1; width: auto; justify-content: flex-end; gap: 6px; }
      .top-actions button { min-height: 44px; padding: 6px 10px; font-size: 13px; }
      .top-actions #languageButton { min-width: 0; }
      .account-name { display: none !important; }
      .account-button-label { display: none; }
      #accountButton { min-width: 44px; justify-content: center; }

      /* Navigation als Tab-Leiste unten */
      .site-nav { position: fixed; z-index: 9; right: 0; bottom: 0; left: 0; display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 0; width: 100%; height: calc(var(--tabbar-height) + env(safe-area-inset-bottom)); padding: 4px 4px env(safe-area-inset-bottom); overflow: visible; background: linear-gradient(180deg, rgba(24, 38, 34, .97), rgba(20, 33, 29, .99)); border-top: 1px solid rgba(231, 236, 218, .16); box-shadow: 0 -10px 30px rgba(18, 30, 25, .18); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); }
      .site-nav a { display: grid; place-items: center; align-content: center; gap: 2px; min-width: 0; min-height: 56px; padding: 4px 2px; color: #b9c5bb; border: 0; border-radius: 14px; font-size: 11px; font-weight: 650; }
      .site-nav a:hover { transform: none; }
      .site-nav a[aria-current="page"] { color: #fff3d6; border: 0; background: rgba(255,255,255,.1); box-shadow: none; }
      .site-nav a[aria-current="page"] .nav-icon { color: #e8c77d; }
      .nav-icon { display: block; font: 22px/1 Georgia, "Segoe UI Symbol", serif; }
      .nav-label { max-width: 100%; overflow: hidden; text-overflow: ellipsis; }

      /* Seitenrahmen: äußere Karte weg */
      main { padding: 16px 16px 28px; }
      .page-card { padding: 4px 0 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; backdrop-filter: none; -webkit-backdrop-filter: none; }
      .page-heading { margin-bottom: 12px; }
      h1, .page-heading h1 { font-size: clamp(28px, 8.5vw, 34px); }
      .eyebrow { font-size: 11px; }
      .page-card > p, .hint, .member-status, .tournament-status, .collection-status { font-size: 14px; }

      /* Lesbare Schrift & große Tippflächen */
      .quiet-btn, .primary-btn, .tool-btn { min-height: 44px; font-size: 14px; }
      .field label { font-size: 13px; margin-bottom: 6px; }
      .field input, .field select, .field textarea,
      .modal .field input, .modal .field select, .modal .field textarea { min-height: 48px; font-size: 16px; }
      .modal p { font-size: 14px; }
      .modal-close { width: 44px; height: 44px; }

      /* Startseite */
      .home-hero { padding: 24px 18px; border-radius: 24px; }
      .home-hero h1 { font-size: clamp(32px, 10vw, 40px); }
      .home-actions { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; }
      .home-actions > * { width: 100%; min-height: 50px; font-size: 15px; }
      .home-feature-grid { grid-template-columns: minmax(0, 1fr); gap: 10px; margin-top: 26px; }
      .home-feature { grid-template-columns: 40px minmax(0, 1fr); grid-template-rows: auto auto; column-gap: 12px; row-gap: 2px; align-items: center; padding: 14px 16px; }
      .home-feature-icon { grid-row: 1 / 3; font-size: 26px; text-align: center; }
      .home-feature strong { font-size: 19px; }
      .home-feature > span:last-child { font-size: 13px; }

      /* Spielen */
      .toolbar { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; padding: 12px; }
      .toolbar .tool-btn { flex-direction: column; gap: 2px; min-height: 56px; padding: 6px 4px; font-size: 18px; line-height: 1; }
      .toolbar .tool-btn span { font-size: 12px; }
      .secondary-actions { padding: 0 12px 12px; }
      .secondary-actions .quiet-btn { width: 100%; }
      .settings-status:empty { display: none; }

      /* Mitglieder */
      .member-search input { font-size: 16px; }

      /* Rangliste */
      .leaderboard-table { font-size: 15px; }
      .leaderboard-table th { font-size: 12px; }

      /* Shop: 2 Spalten, kompakte Kacheln */
      .shop-category-filters { position: sticky; z-index: 4; top: 60px; flex-wrap: nowrap; margin: 10px -16px 6px; padding: 8px 16px; overflow-x: auto; background: color-mix(in srgb, var(--paper) 92%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); scrollbar-width: none; }
      .shop-category-filters::-webkit-scrollbar { display: none; }
      .shop-filter-button { flex: 0 0 auto; min-height: 40px; font-size: 13px; }
      #shopItems.shop-list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
      #shopItems .shop-item { grid-template-columns: minmax(0, 1fr); align-content: start; justify-items: center; gap: 8px; padding: 12px 10px; text-align: center; }
      #shopItems .shop-item-preview { width: 60px; height: 60px; }
      #shopItems .shop-item-details h2 { font-size: 14px; line-height: 1.25; }
      #shopItems .shop-item-details p { display: -webkit-box; overflow: hidden; font-size: 12px; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
      #shopItems .shop-item-actions { grid-column: auto; grid-template-columns: minmax(0, 1fr); width: 100%; align-self: end; }
      #shopItems .shop-item-actions .primary-btn, #shopItems .shop-item-actions button:first-child { min-height: 42px; font-size: 13px; white-space: normal; }
      #shopItems .shop-gift-button { min-height: 36px; border: 0; background: transparent; box-shadow: none; color: var(--green-dark); font-size: 12px; text-decoration: underline; text-underline-offset: 3px; }

      /* Rewards */
      .elo-progress-scale { grid-template-columns: repeat(3, minmax(0, 1fr)); }
      .elo-progress-scale span:not(:first-child):not(:last-child) { display: none; }
      .elo-progress-scale span:last-child { grid-column: 3; }
      .elo-milestone-items { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
      .elo-milestone { min-height: 44px; padding: 4px 2px; font-size: 12px; }

      /* Profil */
      .profile-page-card > .page-heading h1 { font-size: 22px; }
      .profile-stats { gap: 6px; }
      .stat-card strong { font-size: 22px; }
      .stat-card span, .rating-strip span { font-size: 13px; }
      .cosmetic-slot-label { font-size: 11px; letter-spacing: .06em; }
      .cosmetic-item-name { font-size: 14px; white-space: normal; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
      .cosmetic-item-state { font-size: 12px; }
      .profile-collection .shop-item-details h3 { font-size: 15px; }
      .profile-collection .shop-item-details p, .collection-item-state { font-size: 13px; }
      .profile-form-sticky, #profileForm.is-dirty .profile-actions { position: sticky; z-index: 6; bottom: calc(var(--tabbar-height) + env(safe-area-inset-bottom) + 8px); margin: 0 -4px; padding: 8px; border-radius: 18px; background: color-mix(in srgb, var(--panel) 92%, transparent); box-shadow: 0 10px 30px rgba(27, 43, 33, .18); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
      .profile-actions .primary-btn { width: 100%; min-height: 50px; font-size: 15px; }

      /* Fenster als Vollbild-Sheet */
      .modal-backdrop, .modal-backdrop.visible { align-items: stretch; padding: 0; }
      .modal, .start-modal, .modal.profile-mode { width: 100%; max-width: none; height: 100dvh; max-height: none; padding: 16px 16px calc(20px + env(safe-area-inset-bottom)); padding-top: max(16px, env(safe-area-inset-top)); border: 0; border-radius: 0; }
      .modal-heading { position: sticky; z-index: 2; top: calc(-1 * max(16px, env(safe-area-inset-top))); margin: calc(-1 * max(16px, env(safe-area-inset-top))) -16px 10px; padding: max(16px, env(safe-area-inset-top)) 16px 10px; background: color-mix(in srgb, var(--panel) 94%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
      .cosmetic-picker-grid { max-height: none; overflow: visible; grid-template-columns: minmax(0, 1fr); }
      .cosmetic-picker-details strong { font-size: 15px; white-space: normal; }
      .cosmetic-picker-details > span { font-size: 13px; }
      .cosmetic-picker-card > button { min-height: 44px; font-size: 14px; }
      .member-profile-modal .profile-identity { margin-left: 8px; }
      .member-profile-modal .cosmetic-item-name { white-space: normal; }
      .member-invite-bar { position: sticky; z-index: 2; bottom: calc(-20px - env(safe-area-inset-bottom)); margin: 12px -16px calc(-20px - env(safe-area-inset-bottom)); padding: 12px 16px calc(14px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: color-mix(in srgb, var(--panel) 95%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
      .member-invite-bar .field { margin-bottom: 8px; }
      .member-invite-bar .modal-message:empty { display: none; }
      .member-invite-bar .modal-actions { margin-top: 0; }
      .member-invite-bar .modal-actions .primary-btn { width: 100%; min-height: 50px; }
    }
    @media (max-width: 700px) {
      .cosmetic-item-name { hyphens: auto; -webkit-hyphens: auto; overflow-wrap: anywhere; }
      .member-profile-identity { flex-direction: column; align-items: center; margin: -42px 0 12px; text-align: center; }
      .member-profile-identity .profile-meta { max-width: 100%; margin: 0; padding: 0; background: none; text-align: center; font-size: 13px; }
      .member-profile-modal .profile-avatar { width: 80px; height: 80px; }
    }

    /* ---------- Feinschliff Runde 2 ---------- */
    .show-password { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; margin-top: 6px; color: var(--muted); font-size: 13px; cursor: pointer; }
    .field .show-password input { width: 18px; height: 18px; min-height: 0; margin: 0; accent-color: var(--green-dark); }
    .invite-icon { display: none; }
    @media (max-width: 700px) {
      .modal, .start-modal, .modal.profile-mode { background: var(--panel); }
      .modal-backdrop { backdrop-filter: none; -webkit-backdrop-filter: none; }
      .modal-actions { flex-direction: column-reverse; align-items: stretch; }
      .modal-actions > * { width: 100%; min-height: 48px; }
      .language-actions { flex-direction: column; }
      .time-control span { font-size: 12px; }
      .time-control strong { font-size: 21px; }
      .start-actions .quiet-btn, .start-actions .primary-btn { min-height: 48px; font-size: 14px; }
      .start-section-heading .hint { font-size: 13px; }
      .invite-icon { display: inline; font-size: 17px; }
      .invite-label { display: none; }
      #incomingInvitationsButton { gap: 4px; padding-inline: 10px; }
      #invitationCount { min-width: 18px; }
      html[lang="en"] .site-nav a { font-size: 10px; }
      html[lang="en"] .site-nav a[data-page-link="leaderboard"] .nav-label,
      html[lang="en"] .site-nav a[data-page-link="tournaments"] .nav-label { font-size: 0; }
      html[lang="en"] .site-nav a[data-page-link="leaderboard"] .nav-label::after { content: "Top 10"; font-size: 10px; }
      html[lang="en"] .site-nav a[data-page-link="tournaments"] .nav-label::after { content: "Events"; font-size: 10px; }
      .brand { overflow: hidden; }
      .brand-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    }
    @media (max-width: 360px) {
      .brand-name { display: none; }
    }

    @media (min-width: 1051px) { .home-feature-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
    @media (min-width: 701px) and (max-width: 1050px) {
      .home-feature-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }
      .home-feature { grid-column: span 2; }
      .home-feature:nth-child(n+4) { grid-column: span 3; }
    }

    details.elo-milestone-band > summary { display: flex; align-items: center; justify-content: space-between; min-height: 28px; color: var(--muted); font-size: 13px; font-weight: 700; list-style: none; cursor: pointer; }
    details.elo-milestone-band > summary::-webkit-details-marker { display: none; }
    details.elo-milestone-band > summary::after { content: "▾"; font-size: 14px; transition: transform .2s ease; }
    details.elo-milestone-band[open] > summary { margin-bottom: 10px; }
    details.elo-milestone-band[open] > summary::after { transform: rotate(180deg); }
    @media (max-width: 700px) {
      .member-results { max-height: none; overflow: visible; }
      .member-display-name { font-size: 16px; }
      .member-username, .member-bio { font-size: 13px; }
      .member-since { font-size: 12px; }
      .member-result .quiet-btn { min-height: 44px; }
    }
    @media (max-width: 700px) { .member-stats { font-size: 13px; } }
    @media (max-width: 700px) {
      .member-results { overflow-x: clip; overflow-clip-margin: 6px; }
      .rewards-actions a, .profile-page-actions a { text-decoration: none; }
    }
    /* Bildrahmen-Effekte (z. B. Sternenrahmen) an das Profilbild binden statt an die Karte */
    .member-avatar { position: relative; }

    /* =====================================================================
       Profil – Runde 3
       ===================================================================== */
    /* Kopf */
    .profile-hero .profile-avatar { overflow: visible; }
    .profile-hero .profile-avatar.avatar-crown::after { top: -24px; font-size: 24px; }
    .profile-hero .profile-avatar.avatar-sparkle::after { top: -8px; right: -6px; font-size: 20px; }
    .profile-hero .profile-avatar.avatar-constellation::after { top: -12px; right: -8px; font-size: 24px; }
    .profile-hero .profile-avatar.avatar-pawprint::after { right: auto; bottom: -6px; left: -8px; width: 28px; height: 28px; font-size: 15px; }
    .profile-hero .profile-avatar.avatar-orbit::after, .profile-hero .profile-avatar.avatar-moon::after { inset: -6px; border-radius: 31px; }
    .profile-name-line { gap: 6px; }
    .profile-name-line .player-companion { font-size: 24px; }
    .profile-badges { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px; }
    .profile-badges:not(:has(> :not([hidden]))) { display: none; }
    .profile-badges .player-rank, .profile-badges .player-title { margin: 0; font-size: 12px; }
    #profileDisplayName.name-dog-runner, #profileDisplayName.name-star-trail { position: relative; display: inline-block; overflow: visible; }
    #profileDisplayName.name-dog-runner::after { display: inline-block; margin-left: .2em; content: "🐕"; font-size: .8em; line-height: 1; -webkit-text-fill-color: initial; animation: dog-run-name 1.35s ease-in-out infinite; }
    #profileDisplayName.name-star-trail::after { display: inline-block; margin-left: .18em; color: #e4ad43; content: "✦"; font-size: .75em; line-height: 1; -webkit-text-fill-color: #e4ad43; animation: star-trail-name 1.8s ease-in-out infinite; }
    .profile-bio-preview { max-width: 34em; margin: 12px auto 0; padding: 10px 14px; color: var(--ink); border-radius: 14px; background: color-mix(in srgb, var(--panel) 70%, transparent); font-size: 14px; font-style: italic; text-align: center; overflow-wrap: anywhere; white-space: pre-wrap; }
    .profile-media-message { margin: 8px 0 0; text-align: center; }
    .profile-media-message:empty { display: none; }
    .coin-balance { white-space: nowrap; }
    .coin-balance strong { font-variant-numeric: tabular-nums; }
    .profile-required { display: grid; justify-items: start; gap: 12px; }
    .profile-required p { margin: 0; color: var(--muted); }

    /* Statistik */
    .result-bar { display: flex; height: 8px; overflow: hidden; margin: 2px 0 6px; border-radius: 999px; background: var(--line); }
    .result-bar span { display: block; height: 100%; transition: width .4s ease; }
    .result-bar-win { background: var(--green); }
    .result-bar-draw { background: #c9b27a; }
    .result-bar-loss { background: var(--danger); }
    .result-summary { margin: 0 0 12px; color: var(--muted); font-size: 13px; }
    .rating-help-details > summary { list-style: none; gap: 6px; }
    .rating-help-details > summary::-webkit-details-marker { display: none; }
    .rating-help-details > summary::before { display: inline-grid; place-items: center; width: 18px; height: 18px; color: var(--panel); border-radius: 50%; background: var(--green-dark); content: "i"; color: #fffdf5; font: 700 12px/1 Georgia, serif; }
    .rating-help-details[open] > summary { margin-bottom: 2px; }

    /* Sammlung */
    .collection-filters { display: flex; gap: 6px; margin: 0 0 10px; padding-bottom: 2px; overflow-x: auto; scrollbar-width: none; }
    .collection-filters::-webkit-scrollbar { display: none; }
    .collection-filter { flex: 0 0 auto; min-height: 36px; padding: 6px 12px; color: var(--ink); border: 1px solid var(--line); border-radius: 999px; background: color-mix(in srgb, var(--panel) 80%, transparent); font: inherit; font-size: 13px; font-weight: 650; cursor: pointer; }
    .collection-filter[aria-pressed="true"] { color: #fffdf5; border-color: transparent; background: var(--green-dark); }
    .profile-collection { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 8px; margin: 0; }
    .collection-tile { position: relative; display: flex; flex-direction: column; align-items: center; gap: 3px; min-width: 0; min-height: 150px; padding: 12px 6px 10px; color: var(--ink); border: 1px solid color-mix(in srgb, var(--line) 80%, transparent); border-radius: 16px; background: color-mix(in srgb, var(--panel) 80%, transparent); font: inherit; text-align: center; cursor: pointer; transition: transform .15s ease, border-color .15s ease; }
    .collection-tile:hover:not(.is-equipped) { transform: translateY(-2px); border-color: var(--green); }
    .collection-tile:disabled { opacity: .6; }
    .collection-tile > .shop-item-preview { flex: 0 0 auto; width: 52px; height: 52px; margin-bottom: 5px; border-radius: 16px; font-size: 24px; }
    .collection-tile > .shop-item-preview.shop-preview-playerFrame { padding: 4px; }
    .collection-tile > .shop-item-preview.shop-preview-title .player-title { max-height: 46px; font-size: 7px; }
    .collection-tile > .shop-item-preview.shop-preview-rank .player-rank { font-size: 8px; }
    .collection-tile > .shop-item-preview.shop-preview-companion .player-companion { font-size: 30px; }
    .collection-tile-name { display: -webkit-box; width: 100%; overflow: hidden; font-size: 13px; font-weight: 700; line-height: 1.2; overflow-wrap: anywhere; hyphens: auto; -webkit-hyphens: auto; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
    .collection-tile-slot { color: var(--muted); font-size: 11px; }
    .collection-tile-state { margin-top: auto; padding: 3px 10px; color: var(--green-dark); border: 1px solid color-mix(in srgb, var(--green) 45%, transparent); border-radius: 999px; font-size: 12px; font-weight: 700; }
    .collection-tile.is-equipped { border-color: color-mix(in srgb, var(--gold) 70%, var(--line)); background: linear-gradient(160deg, color-mix(in srgb, var(--panel) 82%, #f5dfb1), color-mix(in srgb, var(--panel) 92%, transparent)); cursor: default; }
    .collection-tile.is-equipped .collection-tile-state { color: color-mix(in srgb, var(--gold) 65%, var(--ink)); border-color: color-mix(in srgb, var(--gold) 60%, transparent); }
    body[data-theme="dark"] .collection-tile.is-equipped { background: linear-gradient(160deg, color-mix(in srgb, var(--panel) 80%, #6b5320), var(--panel)); }
    body[data-theme="dark"] .collection-tile-state { color: var(--green); }
    .collection-more { width: 100%; margin-top: 10px; }

    /* Bearbeiten */
    .profile-edit-section .modal-message:empty { display: none; }
    .profile-edit-section .modal-message { margin: 0 0 10px; }

    /* Links, Abmelden und Verwaltung am Seitenende */
    #profileForm[hidden] ~ .profile-after-form { display: none !important; }
    .profile-after-form { margin-top: 22px; }
    .profile-after-form .profile-page-actions { margin-top: 0; }
    .admin-tools-details > summary { display: flex; align-items: center; gap: 10px; list-style: none; cursor: pointer; }
    .admin-tools-details > summary::-webkit-details-marker { display: none; }
    .admin-summary-copy { display: grid; flex: 1; min-width: 0; }
    .admin-summary-copy .eyebrow { display: block; }
    .admin-summary-copy h2 { margin: 0; }
    .details-chevron { color: var(--muted); font-size: 16px; transition: transform .2s ease; }
    .admin-tools-details[open] > summary { margin-bottom: 14px; }
    .admin-tools-details[open] .details-chevron { transform: rotate(180deg); }

    /* Mitglieder-Karten: Bildrahmen-Effekte nicht abschneiden */
    .member-avatar { overflow: visible; }

    @media (max-width: 700px) {
      .profile-page-card > .page-heading { flex-wrap: nowrap; align-items: center; }
      .profile-page-card > .page-heading .eyebrow { display: none; }
      .coin-balance { flex: 0 0 auto; padding: 6px 11px; }
      .coin-balance.is-long strong { font-size: 14px; }
      .coin-balance.is-long > span:last-child { font-size: 11px; }
      .profile-hero .profile-banner { min-height: 120px; }
      .profile-display-name { font-size: 24px; }
      .result-summary, .rating-help-details { font-size: 14px; }
      .profile-collection { grid-template-columns: repeat(3, minmax(0, 1fr)); }
      .admin-tools { padding: 14px; }
      .admin-summary-copy h2 { font-size: 19px; }
    }
    body[data-theme="dark"] .rating-help-details summary { color: var(--green); }
    .profile-page-card:has(#profileForm[hidden]) .coin-balance { display: none; }
    .collection-tile-state { white-space: nowrap; font-size: 11px; padding: 3px 8px; }
    /* Bildrahmen-Effekte auch im Profil anderer Mitglieder vollständig zeigen */
    .member-profile-identity .profile-avatar { overflow: visible; }
    .member-profile-identity .profile-avatar.avatar-crown::after { top: -22px; font-size: 22px; }
    .member-profile-identity .profile-avatar.avatar-sparkle::after { top: -8px; right: -6px; font-size: 18px; }
    .member-profile-identity .profile-avatar.avatar-constellation::after { top: -12px; right: -8px; font-size: 22px; }
    .member-profile-identity .profile-avatar.avatar-pawprint::after { width: 26px; height: 26px; font-size: 14px; }

    /* ===== Turniere (lichess-artig) ===== */
    .tournaments-page { width: min(1400px, 100%); }
    .tour-layout { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 18px; align-items: start; }
    .tour-layout[data-view="detail"] { grid-template-columns: minmax(0, 1fr); }
    .tour-layout[data-view="detail"] .tour-side { display: none; }
    .tour-side { position: sticky; top: 86px; display: grid; gap: 14px; }
    .tour-side-nav { display: grid; gap: 2px; padding: 8px; border: 1px solid var(--glass-border); border-radius: var(--radius-md); background: color-mix(in srgb, var(--panel) 82%, transparent); box-shadow: var(--glass-shadow); }
    .tour-side-nav a { padding: 7px 10px; border-radius: 9px; color: var(--ink); font-size: 13px; text-decoration: none; }
    .tour-side-nav a:hover, .tour-side-nav a.active { background: color-mix(in srgb, var(--green) 14%, transparent); color: var(--green-dark); font-weight: 650; }
    body[data-theme="dark"] .tour-side-nav a:hover, body[data-theme="dark"] .tour-side-nav a.active { color: var(--green); }
    .tour-side-box { padding: 12px; border: 1px solid var(--glass-border); border-radius: var(--radius-md); background: color-mix(in srgb, var(--panel) 82%, transparent); box-shadow: var(--glass-shadow); }
    .tour-side-box h2 { margin: 0 0 8px; color: var(--muted); font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
    .tour-upcoming-side, #tourWinnersSide { display: grid; gap: 2px; max-height: 420px; overflow-y: auto; }
    .tour-side-item, .tour-side-winner { display: flex; align-items: center; gap: 8px; padding: 5px 4px; border-radius: 8px; color: var(--ink); text-decoration: none; }
    .tour-side-item:hover, .tour-side-winner:hover { background: color-mix(in srgb, var(--green) 9%, transparent); }
    .tour-side-item > span { display: grid; min-width: 0; }
    .tour-side-item strong, .tour-side-winner strong { overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
    .tour-side-item small, .tour-side-winner small { color: var(--muted); font-size: 11px; }
    .tour-side-winner { display: grid; grid-template-columns: 18px minmax(0, 1fr); column-gap: 6px; }
    .tour-side-winner small { grid-column: 2; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .tour-side-winner .tour-icon { grid-row: span 2; }
    .tour-more { display: inline-block; margin-top: 8px; color: var(--green); font-size: 12px; font-weight: 700; text-decoration: none; }
    .tour-main { min-width: 0; }
    .tour-icon { width: 18px; height: 18px; flex: 0 0 auto; }
    .tour-icon.tiny { width: 12px; height: 12px; vertical-align: -1px; }
    .tour-trophy { color: var(--gold); }
    .speed-ultrabullet .tour-icon, .speed-bullet .tour-icon, .speed-blitz .tour-icon, .speed-rapid .tour-icon, .speed-classical .tour-icon { color: #c98a2e; }
    .tour-muted { color: var(--muted); }
    .tour-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
    .tour-head h1, .tour-main h1 { margin: 0 0 12px; font: 400 clamp(26px, 4vw, 36px)/1.15 Georgia, "Times New Roman", serif; }
    .tour-head h1 { margin: 0; }
    .tour-create-btn { text-decoration: none; }
    .tour-banner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; padding: 10px 14px; border-radius: 12px; background: color-mix(in srgb, var(--green) 16%, var(--panel)); font-weight: 650; }
    .tour-section-title { margin: 22px 0 8px; color: var(--muted); font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }

    /* Zeitleiste */
    .tour-timeline { border: 1px solid var(--line); border-radius: 14px; background: color-mix(in srgb, var(--panel) 70%, transparent); overflow: hidden; }
    .tour-timeline-scroll { overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: thin; }
    .tour-timeline-inner { position: relative; min-height: 90px; padding: 34px 0 8px; }
    .tour-axis { position: absolute; inset: 0 0 auto; height: 28px; border-bottom: 1px solid var(--line); }
    .tour-tick { position: absolute; top: 6px; transform: translateX(-50%); color: var(--muted); font-size: 11px; white-space: nowrap; }
    .tour-tick.hour { color: var(--ink); font-weight: 700; }
    .tour-lane { position: relative; height: 50px; margin-bottom: 5px; }
    .tour-block { position: absolute; top: 0; height: 50px; display: flex; align-items: center; gap: 8px; padding: 0 9px; overflow: hidden; border-radius: 9px; color: #fff; text-decoration: none; background: #4e8a43; box-shadow: 0 3px 8px rgba(0,0,0,.12); transition: filter .15s ease, transform .15s ease; }
    .tour-block:hover { filter: brightness(1.08); transform: translateY(-1px); }
    .tour-block .tour-icon { width: 26px; height: 26px; color: #fff !important; opacity: .95; }
    .tour-block-text { display: grid; min-width: 0; line-height: 1.25; }
    .tour-block-text strong { overflow: hidden; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
    .tour-block-text small { overflow: hidden; font-size: 11px; opacity: .92; text-overflow: ellipsis; white-space: nowrap; }
    .tour-block.is-community { background: #6b5bd0; }
    .tour-block.is-swiss { background: #a1672b; }
    .tour-block.status-finished, .tour-block.status-aborted { background: #6e7672; opacity: .8; }
    .tour-block.status-running { box-shadow: 0 0 0 2px rgba(255,255,255,.55) inset, 0 3px 10px rgba(0,0,0,.18); }
    .tour-block.is-joined::after { content: "✓"; position: absolute; top: 4px; right: 7px; font-size: 12px; font-weight: 800; }
    .tour-now-line { position: absolute; top: 22px; bottom: 0; width: 2px; background: #e0592a; pointer-events: none; }
    .tour-now-line::before { content: ""; position: absolute; top: -6px; left: -5px; border: 6px solid transparent; border-top-color: #e0592a; }
    .tour-timeline-empty { padding: 10px 16px; }
    .tour-legend { display: flex; flex-wrap: wrap; gap: 14px; padding: 8px 12px; border-top: 1px solid var(--line); color: var(--muted); font-size: 11px; }
    .tour-legend span::before { content: ""; display: inline-block; width: 10px; height: 10px; margin-right: 6px; border-radius: 3px; vertical-align: -1px; }
    .legend-system::before { background: #4e8a43; }
    .legend-community::before { background: #6b5bd0; }
    .legend-swiss::before { background: #a1672b; }

    /* Listen */
    .tour-list { display: grid; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
    .tour-row { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto minmax(110px, auto); align-items: center; gap: 12px; padding: 11px 14px; color: var(--ink); text-decoration: none; background: color-mix(in srgb, var(--panel) 80%, transparent); }
    .tour-row:nth-child(even) { background: color-mix(in srgb, var(--panel) 60%, transparent); }
    .tour-row:hover { background: color-mix(in srgb, var(--green) 10%, var(--panel)); }
    .tour-row-icon { width: 30px; height: 30px; }
    .tour-row-main { display: grid; min-width: 0; }
    .tour-row-main strong { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 15px; font-weight: 600; letter-spacing: .02em; }
    .tour-row-main small, .tour-row-when, .tour-row-side small { color: var(--muted); font-size: 12px; }
    .tour-row-side { display: grid; justify-items: start; }
    .tour-row-winner { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; font-weight: 650; }
    .tour-pill { padding: 1px 7px; border-radius: 99px; background: color-mix(in srgb, var(--gold) 28%, var(--panel)); color: var(--ink); font-size: 10px; font-weight: 700; letter-spacing: .04em; }
    .tour-pill.joined { background: color-mix(in srgb, var(--green) 26%, var(--panel)); }

    /* Turnierseite */
    .tour-detail { display: grid; grid-template-columns: minmax(0, 1fr) minmax(280px, 360px); gap: 18px; align-items: start; }
    .tour-detail-head { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-bottom: 12px; }
    .tour-detail-head h1 { flex: 1 1 auto; margin: 0; color: #c98a2e; font: 400 clamp(24px, 3.4vw, 34px)/1.15 Georgia, "Times New Roman", serif; }
    .tour-head-icon { width: 34px; height: 34px; color: #c98a2e; }
    .tour-clock { font: 600 22px/1 ui-monospace, "SFMono-Regular", Consolas, monospace; color: var(--ink); }
    .tour-standings-box { border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
    .tour-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; padding: 8px; background: color-mix(in srgb, var(--line) 45%, var(--panel)); }
    .tour-ctrl { min-width: 34px; min-height: 34px; padding: 4px 8px; border: 0; border-radius: 8px; background: transparent; color: var(--ink); cursor: pointer; font-size: 14px; }
    .tour-ctrl svg { width: 18px; height: 18px; vertical-align: -3px; }
    .tour-ctrl:hover:not(:disabled) { background: color-mix(in srgb, var(--green) 14%, transparent); }
    .tour-ctrl:disabled { opacity: .35; cursor: default; }
    .tour-me { font-size: 12px; font-weight: 700; }
    .tour-page { min-width: 86px; color: var(--muted); font-size: 13px; text-align: center; }
    .tour-search, .tour-code { min-height: 34px; padding: 6px 10px; border: 1px solid var(--line); border-radius: 9px; background: var(--panel); color: var(--ink); font: inherit; font-size: 13px; }
    .tour-search { flex: 1 1 160px; }
    .tour-code { width: 140px; }
    .tour-ctrl-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-left: auto; }
    .tour-join { min-height: 38px; padding: 8px 18px; font-size: 13px; }
    .tour-standings { width: 100%; border-collapse: collapse; font-size: 14px; }
    .tour-standings tr { cursor: pointer; }
    .tour-standings tr:nth-child(even) { background: color-mix(in srgb, var(--line) 25%, transparent); }
    .tour-standings tr:hover { background: color-mix(in srgb, var(--green) 10%, transparent); }
    .tour-standings tr.is-me { box-shadow: inset 3px 0 0 var(--green); }
    .tour-standings tr.is-selected { background: color-mix(in srgb, var(--green) 18%, transparent); }
    .tour-standings tr.is-paused { opacity: .55; }
    .tour-standings td { padding: 10px 8px; border-bottom: 1px solid color-mix(in srgb, var(--line) 60%, transparent); vertical-align: middle; }
    .tour-rank { width: 36px; color: var(--muted); text-align: center; }
    .tour-name { max-width: 0; width: 38%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .tour-nick { font-weight: 600; }
    .tour-rating { margin-left: 6px; color: var(--muted); font-size: 12px; }
    .tour-playing { margin-left: 6px; padding: 1px 6px; border-radius: 99px; background: color-mix(in srgb, var(--green) 22%, transparent); font-size: 10px; font-weight: 700; }
    .tour-sheet-cell { text-align: right; }
    .tour-sheet { display: inline-flex; flex-wrap: wrap; justify-content: flex-end; gap: 1px; font: 600 13px/1 ui-monospace, Consolas, monospace; letter-spacing: .04em; }
    .tour-g.r-w { color: #3e9a4a; }
    .tour-g.r-d { color: #b98f2c; }
    .tour-g.r-l { color: var(--muted); }
    .tour-g.fire { color: #e2731e; }
    .tour-g.berserk { text-decoration: underline; text-underline-offset: 3px; }
    .tour-sheet-more { color: var(--muted); }
    .tour-score { width: 64px; text-align: right; white-space: nowrap; }
    .tour-score strong { font-size: 15px; }
    .tour-fire { margin-right: 4px; font-size: 13px; }
    .tour-empty { padding: 16px; }
    .tour-podium { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: end; gap: 10px; margin: 6px 0 16px; text-align: center; }
    .tour-podium-place { display: grid; justify-items: center; gap: 4px; }
    .tour-cup { width: 70px; height: 70px; color: #c0c3c5; filter: drop-shadow(0 4px 8px rgba(0,0,0,.18)); }
    .place-1 .tour-cup { width: 104px; height: 104px; color: #e3b23c; }
    .place-3 .tour-cup { color: #d57a43; }
    .tour-podium-name { border: 0; background: none; color: var(--ink); cursor: pointer; font-size: 17px; font-weight: 700; }
    .place-1 .tour-podium-name { font-size: 21px; }
    .tour-podium-stats, .tour-player-stats, .tour-stats { display: grid; grid-template-columns: auto auto; gap: 2px 14px; margin: 0; font-size: 12px; text-align: left; }
    .tour-podium-stats dt, .tour-player-stats dt, .tour-stats dt { color: var(--muted); }
    .tour-podium-stats dd, .tour-player-stats dd, .tour-stats dd { margin: 0; font-weight: 650; text-align: right; }
    .tour-player-panel { margin-top: 14px; padding: 14px; border: 1px solid var(--line); border-radius: 14px; background: color-mix(in srgb, var(--panel) 85%, transparent); }
    .tour-player-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
    .tour-player-head h2 { margin: 0 0 10px; font: 400 22px/1.2 Georgia, serif; }
    .tour-close { border: 0; background: none; color: var(--danger); cursor: pointer; font-size: 24px; line-height: 1; }
    .tour-player-stats { max-width: 340px; margin-bottom: 10px; font-size: 13px; }
    .tour-player-games { width: 100%; margin-top: 12px; border-collapse: collapse; font-size: 13px; }
    .tour-player-games td { padding: 6px 8px; border-top: 1px solid color-mix(in srgb, var(--line) 70%, transparent); }
    .tour-player-games td:last-child { font-weight: 700; text-align: right; }
    .tour-pairings { margin-top: 10px; }
    .tour-pairing { display: grid; grid-template-columns: 80px minmax(0, 1fr) auto; gap: 10px; padding: 6px 8px; border-bottom: 1px solid color-mix(in srgb, var(--line) 60%, transparent); font-size: 13px; }
    .tour-pairing-round { color: var(--muted); }
    .tour-pairing.status-active { background: color-mix(in srgb, var(--green) 9%, transparent); }
    .tour-detail-side { display: grid; gap: 14px; }
    .tour-info, .tour-live, .tour-chat { padding: 14px; border: 1px solid var(--line); border-radius: 14px; background: color-mix(in srgb, var(--panel) 85%, transparent); }
    .tour-info { display: grid; gap: 10px; font-size: 13px; }
    .tour-info-top { display: flex; gap: 12px; }
    .tour-info-top > div { display: grid; gap: 2px; }
    .tour-info-icon { width: 40px; height: 40px; }
    .tour-description { margin: 0; padding: 8px 10px; border-left: 3px solid var(--gold); background: color-mix(in srgb, var(--gold) 10%, transparent); white-space: pre-line; overflow-wrap: anywhere; }
    .tour-conditions { display: grid; gap: 4px; }
    .tour-cond-title { color: var(--muted); font-size: 12px; }
    .tour-cond { display: flex; align-items: center; gap: 6px; font-weight: 600; }
    .tour-cond svg { width: 18px; height: 18px; }
    .tour-cond.ok { color: #3e9a4a; }
    .tour-cond.fail { color: var(--danger); }
    .tour-flags { display: flex; flex-wrap: wrap; gap: 6px; }
    .tour-flags span { padding: 2px 8px; border-radius: 99px; background: color-mix(in srgb, var(--green) 14%, transparent); font-size: 11px; font-weight: 650; }
    .tour-flags span.off { opacity: .45; text-decoration: line-through; }
    .tour-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
    .tour-downloads { width: 100%; }
    .tour-downloads summary { color: var(--green); cursor: pointer; font-size: 12px; font-weight: 700; }
    .tour-downloads a { display: block; padding: 5px 0 0 14px; color: var(--ink); font-size: 12px; }
    .tour-live h3 { margin: 0 0 8px; font-size: 13px; }
    .tour-live-game { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 5px 0; border-top: 1px solid color-mix(in srgb, var(--line) 60%, transparent); font-size: 12px; }
    .tour-live-game button { min-height: 28px; padding: 4px 8px; }
    .tour-chat { display: grid; gap: 8px; }
    .tour-chat-head { display: flex; align-items: center; justify-content: space-between; color: var(--muted); font-size: 13px; }
    .tour-chat-log { display: grid; align-content: start; gap: 4px; height: 260px; overflow-y: auto; font-size: 13px; overflow-wrap: anywhere; }
    .tour-chat-line strong { font-size: 12px; }
    .tour-chat-line strong.is-admin { color: #e2731e; }
    .tour-chat-form input { width: 100%; min-height: 36px; padding: 7px 10px; border: 1px solid var(--line); border-radius: 9px; background: var(--panel); color: var(--ink); font: inherit; font-size: 13px; }
    .tour-switch { position: relative; display: inline-block; width: 38px; height: 22px; }
    .tour-switch input { position: absolute; opacity: 0; }
    .tour-switch span { position: absolute; inset: 0; border-radius: 99px; background: var(--line); cursor: pointer; transition: background .2s; }
    .tour-switch span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .2s; }
    .tour-switch input:checked + span { background: var(--green); }
    .tour-switch input:checked + span::after { transform: translateX(16px); }
    .tour-switch input:focus-visible + span { outline: 3px solid #d5a951; outline-offset: 2px; }

    /* Formular */
    .tour-create { display: grid; gap: 14px; }
    .tour-create h1 { margin-bottom: 4px; }
    .tour-fieldset { border: 1px solid var(--line); border-radius: 14px; background: color-mix(in srgb, var(--panel) 70%, transparent); }
    .tour-fieldset > summary { padding: 12px 16px; cursor: pointer; font-weight: 700; }
    .tour-fieldset[open] > summary { border-bottom: 1px solid var(--line); }
    .tour-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 14px; padding: 14px 16px; }
    .tour-grid .tour-wide { grid-column: 1 / -1; }
    .tour-grid .hint { display: block; margin-top: 5px; line-height: 1.4; }
    .tour-tc-preview { display: block; padding: 0 16px 14px; font-weight: 650; }
    .tour-name-input { display: flex; align-items: center; gap: 8px; }
    .tour-name-input span { color: var(--muted); font-size: 13px; }
    .tour-checks { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 12px; padding: 14px 16px; }
    .tour-checks label { display: flex; align-items: flex-start; gap: 10px; cursor: pointer; }
    .tour-checks input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--green); }
    .tour-checks span { display: grid; gap: 2px; }
    .tour-checks small { color: var(--muted); font-size: 12px; }
    .tour-form-status:empty { display: none; }
    .tour-form-status { margin: 0; color: var(--danger); font-weight: 650; }
    .tour-form-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; }
    .tour-form-actions a { text-decoration: none; }

    /* Tabs, Tabellen, Kalender, Sieger, FAQ */
    .tour-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
    .tour-tabs a { padding: 6px 12px; border: 1px solid var(--line); border-radius: 99px; color: var(--ink); font-size: 12px; text-decoration: none; }
    .tour-tabs a.active, .tour-tabs a:hover { border-color: transparent; background: color-mix(in srgb, var(--green) 18%, transparent); font-weight: 700; }
    .tour-table { width: 100%; border-collapse: collapse; font-size: 13px; }
    .tour-table th { padding: 8px; color: var(--muted); font-size: 11px; font-weight: 700; letter-spacing: .06em; text-align: left; text-transform: uppercase; }
    .tour-table td { padding: 10px 8px; border-top: 1px solid color-mix(in srgb, var(--line) 70%, transparent); }
    .tour-table tr.is-total td { font-weight: 700; }
    .tour-mine tbody tr { cursor: pointer; }
    .tour-mine tbody tr:hover { background: color-mix(in srgb, var(--green) 9%, transparent); }
    .tour-icon-cell { width: 34px; }
    .tour-icon-cell svg { width: 26px; height: 26px; color: #c98a2e; }
    .tour-name-cell { display: grid; }
    .tour-name-cell small { color: var(--muted); }
    .tour-cal-day { margin-bottom: 18px; }
    .tour-cal-grid { position: relative; padding-bottom: 6px; border: 1px solid var(--line); border-radius: 12px; background: repeating-linear-gradient(90deg, transparent 0 calc(100% / 24 - 1px), color-mix(in srgb, var(--line) 70%, transparent) calc(100% / 24 - 1px) calc(100% / 24)); overflow: hidden; }
    .tour-cal-hours { display: grid; grid-template-columns: repeat(24, 1fr); margin-bottom: 4px; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 10px; }
    .tour-cal-hours span { padding: 4px 3px; }
    .tour-cal-row { position: relative; height: 26px; }
    .tour-cal-bar { position: absolute; top: 2px; height: 22px; display: flex; align-items: center; gap: 4px; padding: 0 6px; overflow: hidden; border-radius: 6px; color: #fff; background: #4e8a43; font-size: 11px; font-weight: 650; text-decoration: none; white-space: nowrap; }
    .tour-cal-bar .tour-icon { color: #fff !important; }
    .tour-cal-bar.is-community { background: #6b5bd0; }
    .tour-cal-bar.is-swiss { background: #a1672b; }
    .tour-winners-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }
    .tour-winner-card { padding: 12px; border: 1px solid var(--line); border-radius: 14px; background: color-mix(in srgb, var(--panel) 80%, transparent); }
    .tour-winner-card h2 { display: flex; align-items: center; gap: 8px; margin: 0 0 8px; font-size: 14px; letter-spacing: .06em; text-transform: uppercase; }
    .tour-winner-row { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 0 8px; width: 100%; padding: 7px 4px; border: 0; border-top: 1px solid color-mix(in srgb, var(--line) 60%, transparent); background: none; color: var(--ink); font: inherit; font-size: 13px; text-align: left; text-decoration: none; cursor: pointer; }
    a.tour-winner-row { grid-template-columns: minmax(0, 1fr) auto; }
    a.tour-winner-row .tour-muted:nth-child(2) { grid-column: 1; overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
    .tour-winner-row:hover { background: color-mix(in srgb, var(--green) 9%, transparent); }
    button.tour-winner-row { grid-template-columns: 26px minmax(0, 1fr) auto; }
    .tour-faq { padding: 12px 0; border-bottom: 1px solid var(--line); }
    .tour-faq h2 { margin: 0 0 6px; font: 400 21px/1.3 Georgia, serif; }
    .tour-faq p { margin: 0; line-height: 1.6; }

    /* Turnierpartie auf der Spielseite */
    .tournament-match-panel { display: grid; gap: 8px; margin-top: 12px; padding: 12px; border: 1px solid color-mix(in srgb, var(--gold) 45%, var(--line)); border-radius: 14px; background: color-mix(in srgb, var(--gold) 12%, var(--panel)); }
    .tournament-match-title { display: grid; }
    .tournament-match-title strong { font-size: 14px; }
    #tournamentMatchInfo { margin: 0; color: var(--muted); font-size: 12px; }
    #tournamentMatchInfo:empty { display: none; }
    .tournament-match-actions { display: flex; flex-wrap: wrap; gap: 6px; }
    .berserk-btn { background: linear-gradient(125deg, #a8341f, #d0582c); box-shadow: 0 6px 16px rgba(168, 52, 31, .25); }

    @media (max-width: 960px) {
      .tour-layout { grid-template-columns: minmax(0, 1fr); }
      .tour-side { position: static; order: 2; }
      .tour-side-nav { display: flex; flex-wrap: wrap; }
      .tour-detail { grid-template-columns: minmax(0, 1fr); }
    }
    @media (max-width: 640px) {
      .tour-row { grid-template-columns: 30px minmax(0, 1fr); }
      .tour-row-when, .tour-row-side { grid-column: 2; }
      .tour-row-side { display: flex; flex-wrap: wrap; gap: 8px; }
      .tour-name { width: auto; }
      .tour-sheet-cell { display: none; }
      .tour-podium { gap: 4px; }
      .tour-cup { width: 48px; height: 48px; }
      .place-1 .tour-cup { width: 70px; height: 70px; }
      .tour-podium-stats { display: none; }
      .tour-ctrl-actions { width: 100%; margin-left: 0; }
      .tour-ctrl-actions .tour-join { flex: 1 1 auto; }
    }

    /* ===== Design: Bretter ===== */
    .board-style-wood { --wood-light: #ead9b9; --wood-dark: #8e6548; }
    body[data-board="green"], .board-style-green { --wood-light: #eeeed2; --wood-dark: #769656; }
    body[data-board="blue"], .board-style-blue { --wood-light: #dee3e8; --wood-dark: #6f879b; }
    body[data-board="marble"], .board-style-marble { --wood-light: #efeee9; --wood-dark: #a8a49b; }
    body[data-board="night"], .board-style-night { --wood-light: #7d8aa3; --wood-dark: #34405a; }
    body[data-board="coral"], .board-style-coral { --wood-light: #f7e4d6; --wood-dark: #d07f68; }
    body[data-board="marble"] .square.light, .board-style-marble .square.light { background: radial-gradient(circle at 30% 20%, rgba(255,255,255,.7), transparent 60%), linear-gradient(135deg, #f3f2ee, #e4e1da); }
    body[data-board="marble"] .square.dark, .board-style-marble .square.dark { background: radial-gradient(circle at 70% 80%, rgba(255,255,255,.18), transparent 55%), linear-gradient(135deg, #b3afa6, #96918a); }

    /* ===== Design: Figuren (5 Stile) ===== */
    body[data-pieces="clean"] .piece, .piece-style-clean .piece { filter: none; -webkit-text-stroke: 0; text-shadow: none; font-family: "Segoe UI Symbol", "Arial Unicode MS", sans-serif; }
    .piece-style-classic .piece.white { color: #fffdf4; -webkit-text-stroke: .35px #4e483d; text-shadow: 0 1px 1px #39362f; }
    .piece-style-classic .piece.black { color: #262c2a; -webkit-text-stroke: .25px #f4e8cf; text-shadow: 0 1px 1px rgba(255,255,255,.35); }
    body[data-pieces="marble"] .piece, .piece-style-marble .piece,
    body[data-pieces="royal"] .piece, .piece-style-royal .piece { color: transparent; -webkit-background-clip: text; background-clip: text; text-shadow: none; filter: drop-shadow(0 2px 1.5px rgba(0, 0, 0, .38)); }
    body[data-pieces="marble"] .piece.white, .piece-style-marble .piece.white { background-image: linear-gradient(160deg, #ffffff 0%, #f1ece2 40%, #cfc7b8 100%); -webkit-text-stroke: .7px rgba(70, 62, 50, .55); }
    body[data-pieces="marble"] .piece.black, .piece-style-marble .piece.black { background-image: linear-gradient(160deg, #7a8089 0%, #2e3238 48%, #0d0f12 100%); -webkit-text-stroke: .7px rgba(255, 255, 255, .32); }
    body[data-pieces="royal"] .piece.white, .piece-style-royal .piece.white { background-image: linear-gradient(160deg, #fff7cf 0%, #f3c94f 42%, #a5701a 100%); -webkit-text-stroke: .7px rgba(92, 60, 8, .7); }
    body[data-pieces="royal"] .piece.black, .piece-style-royal .piece.black { background-image: linear-gradient(160deg, #d8dee5 0%, #7b8590 45%, #2d3238 100%); -webkit-text-stroke: .7px rgba(15, 18, 22, .75); }
    body[data-pieces="neon"] .piece, .piece-style-neon .piece { -webkit-text-stroke: 0; filter: none; }
    body[data-pieces="neon"] .piece.white, .piece-style-neon .piece.white { color: #e6fdff; text-shadow: 0 0 3px #4be8ff, 0 0 9px #00b4ff, 0 0 16px rgba(0, 150, 255, .7); }
    body[data-pieces="neon"] .piece.black, .piece-style-neon .piece.black { color: #ffe1fa; text-shadow: 0 0 3px #ff52d9, 0 0 9px #d000ff, 0 0 16px rgba(190, 0, 255, .7); }
    body[data-pieces] .piece.in-check { -webkit-background-clip: border-box; background-clip: border-box; background-image: none; }

    /* ===== Design: Hintergründe ===== */
    body[data-background="forest"] { background: radial-gradient(ellipse at 15% 10%, rgba(126, 170, 120, .45), transparent 40%), radial-gradient(ellipse at 85% 85%, rgba(73, 120, 86, .3), transparent 40%), linear-gradient(160deg, #e3ece0, #cfdfcd 60%, #e8efe1); }
    body[data-theme="dark"][data-background="forest"] { background: radial-gradient(ellipse at 15% 10%, rgba(70, 120, 70, .4), transparent 40%), linear-gradient(160deg, #142219, #1b2d22 60%, #172318); }
    body[data-background="night"] { background: radial-gradient(1.5px 1.5px at 20% 30%, #fff, transparent), radial-gradient(1px 1px at 70% 20%, #fff, transparent), radial-gradient(1.5px 1.5px at 40% 75%, #fff, transparent), radial-gradient(1px 1px at 85% 60%, #fff, transparent), radial-gradient(ellipse at 80% 10%, rgba(140, 150, 230, .35), transparent 45%), linear-gradient(170deg, #c9d0ea, #aeb7dc 55%, #d6d2e8); background-size: 260px 260px, 310px 310px, 230px 230px, 290px 290px, auto, auto; }
    body[data-theme="dark"][data-background="night"] { background: radial-gradient(1.5px 1.5px at 20% 30%, #fff, transparent), radial-gradient(1px 1px at 70% 20%, #dfe6ff, transparent), radial-gradient(1.5px 1.5px at 40% 75%, #fff, transparent), radial-gradient(1px 1px at 85% 60%, #fff, transparent), radial-gradient(ellipse at 80% 10%, rgba(90, 100, 200, .3), transparent 45%), linear-gradient(170deg, #0d1226, #151c38 55%, #1b1630); background-size: 260px 260px, 310px 310px, 230px 230px, 290px 290px, auto, auto; }
    body[data-background="sunset"] { background: radial-gradient(ellipse at 80% 5%, rgba(255, 196, 120, .55), transparent 45%), radial-gradient(ellipse at 10% 90%, rgba(232, 120, 140, .3), transparent 45%), linear-gradient(165deg, #fbe3cf, #f5c9c0 55%, #ead3e6); }
    body[data-theme="dark"][data-background="sunset"] { background: radial-gradient(ellipse at 80% 5%, rgba(200, 110, 60, .35), transparent 45%), linear-gradient(165deg, #2a1720, #3a1f25 55%, #24182c); }
    .bg-swatch-linen { background: radial-gradient(ellipse at 12% 8%, rgba(196, 218, 198, .9), transparent 50%), linear-gradient(145deg, #f3f2eb, #e9eee7 64%, #f6f1e7); }
    .bg-swatch-plain { background: #f3f2eb; }
    .bg-swatch-forest { background: radial-gradient(ellipse at 15% 10%, rgba(126, 170, 120, .8), transparent 55%), linear-gradient(160deg, #e3ece0, #b9d1b7); }
    .bg-swatch-night { background: radial-gradient(1.5px 1.5px at 25% 30%, #fff, transparent), radial-gradient(1.5px 1.5px at 70% 60%, #fff, transparent), radial-gradient(1px 1px at 45% 80%, #fff, transparent), linear-gradient(170deg, #1a2246, #2c3566); }
    .bg-swatch-sunset { background: radial-gradient(ellipse at 80% 5%, rgba(255, 196, 120, .9), transparent 55%), linear-gradient(165deg, #fbd3b4, #ee9fa1 60%, #c9a4d8); }

    /* ===== Seite „Design“ ===== */
    .design-layout { display: grid; grid-template-columns: minmax(240px, 380px) minmax(0, 1fr); gap: 24px; align-items: start; margin-top: 16px; }
    .design-preview-wrap { position: sticky; top: 90px; }
    .design-preview-frame { width: 100%; --board-size: min(360px, calc(100vw - 64px)); }
    .design-preview .square { cursor: default; }
    .design-preview-caption { margin-top: 8px; text-align: center; }
    .design-groups { display: grid; gap: 18px; }
    .design-group-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 10px; margin-bottom: 8px; }
    .design-group-head h2 { margin: 0; font: 400 21px/1.2 Georgia, "Times New Roman", serif; }
    .design-options { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 10px; }
    .design-option { display: grid; justify-items: center; gap: 8px; padding: 10px; border: 2px solid var(--line); border-radius: 14px; background: color-mix(in srgb, var(--panel) 85%, transparent); color: var(--ink); cursor: pointer; font: inherit; transition: border-color .2s, transform .2s, box-shadow .2s; }
    .design-option:hover { transform: translateY(-2px); box-shadow: 0 8px 18px rgba(30, 40, 35, .1); }
    .design-option[aria-checked="true"] { border-color: var(--green); box-shadow: 0 0 0 3px color-mix(in srgb, var(--green) 25%, transparent); }
    .design-option[aria-checked="true"] .design-option-label::before { content: "✓ "; color: var(--green); }
    .design-option-label { font-size: 12px; font-weight: 700; }
    .design-swatch { display: grid; width: 92px; height: 92px; overflow: hidden; border-radius: 10px; box-shadow: inset 0 0 0 1px rgba(0,0,0,.08); }
    .design-swatch-pieces { grid-template-columns: repeat(2, 1fr); --board-size: 200px; }
    .design-swatch-pieces .piece { font-size: 34px; cursor: default; }
    .design-swatch-board { grid-template-columns: repeat(4, 1fr); }
    .design-swatch .square { cursor: default; }
    .design-swatch-background { border: 1px solid var(--line); }
    .design-swatch-theme { gap: 6px; padding: 12px; align-content: center; }
    .design-swatch-theme span { height: 12px; border-radius: 6px; }
    .theme-swatch-light { background: #f3f2eb; }
    .theme-swatch-light span { background: #fffefa; box-shadow: 0 1px 3px rgba(0,0,0,.12); }
    .theme-swatch-light span:first-child { background: #567465; }
    .theme-swatch-dark { background: #1b2422; }
    .theme-swatch-dark span { background: #252f2c; }
    .theme-swatch-dark span:first-child { background: #88ae91; }
    .design-shortcut { display: flex; align-items: center; gap: 8px; margin: 4px 0 12px; padding: 10px 12px; border: 1px dashed var(--line); border-radius: 12px; color: var(--green); font-size: 12px; font-weight: 700; text-decoration: none; }
    .design-shortcut:hover { background: color-mix(in srgb, var(--green) 9%, transparent); }

    /* ===== Ergebnis-Overlay: kommt und geht animiert ===== */
    .result-banner.is-outcome { pointer-events: auto; cursor: pointer; }
    .result-banner.is-outcome.visible { animation: outcome-arrive .6s cubic-bezier(.2, .9, .25, 1.15) both; }
    .result-banner.is-outcome.visible strong { animation: outcome-title .7s .1s cubic-bezier(.2, .9, .3, 1.3) both; }
    .result-banner.is-outcome.leaving { animation: outcome-leave .7s cubic-bezier(.55, 0, .7, .3) forwards; }
    .result-banner .outcome-icon { font: 400 clamp(38px, 8vw, 64px)/1 Georgia, serif; animation: outcome-icon 1.2s ease-out both; }
    .result-banner .outcome-hint { order: 10; margin-top: 4px; font-size: 11px; opacity: .7; letter-spacing: .04em; }
    .result-banner.outcome-win::after { content: ""; position: absolute; inset: -40%; background: conic-gradient(from 0deg, transparent 0 20deg, rgba(255,255,255,.12) 20deg 30deg, transparent 30deg 60deg, rgba(255,255,255,.1) 60deg 70deg, transparent 70deg 120deg, rgba(255,255,255,.12) 120deg 130deg, transparent 130deg 200deg, rgba(255,255,255,.1) 200deg 210deg, transparent 210deg 280deg, rgba(255,255,255,.12) 280deg 290deg, transparent 290deg); animation: outcome-rays 6s linear infinite; pointer-events: none; z-index: -1; }
    @keyframes outcome-title { 0% { opacity: 0; transform: scale(.4); } 100% { opacity: 1; transform: scale(1); } }
    @keyframes outcome-icon { 0% { opacity: 0; transform: translateY(-20px) rotate(-20deg); } 60% { opacity: 1; transform: translateY(4px) rotate(6deg); } 100% { transform: translateY(0) rotate(0); } }
    @keyframes outcome-leave { 0% { opacity: 1; transform: scale(1); filter: blur(0); } 100% { opacity: 0; transform: translateY(-18px) scale(1.08); filter: blur(6px); } }
    @keyframes outcome-rays { to { transform: rotate(360deg); } }
    @media (prefers-reduced-motion: reduce) {
      .result-banner.is-outcome.visible, .result-banner.is-outcome.visible strong, .result-banner .outcome-icon, .result-banner.outcome-win::after { animation: none; }
      .result-banner.is-outcome.leaving { animation: outcome-fade .3s forwards; }
      @keyframes outcome-fade { to { opacity: 0; } }
    }

    /* ===== Live zusehen ===== */
    .live-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: #e0412f; box-shadow: 0 0 0 0 rgba(224, 65, 47, .6); animation: live-pulse 1.6s infinite; vertical-align: 1px; }
    @keyframes live-pulse { 0% { box-shadow: 0 0 0 0 rgba(224, 65, 47, .55); } 70% { box-shadow: 0 0 0 8px rgba(224, 65, 47, 0); } 100% { box-shadow: 0 0 0 0 rgba(224, 65, 47, 0); } }
    .live-badge { padding: 1px 7px; border-radius: 99px; background: #e0412f; color: #fff; font-size: 10px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
    .live-games { margin: 14px 0 18px; padding: 14px; border: 1px solid var(--line); border-radius: 16px; background: color-mix(in srgb, var(--panel) 80%, transparent); }
    .live-games-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
    .live-games-head h2 { margin: 0; font: 400 20px/1.2 Georgia, serif; }
    .live-games-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
    .live-games-list:empty { display: none; }
    .live-game-card { display: grid; grid-template-columns: 84px minmax(0, 1fr); align-items: center; gap: 12px; padding: 10px; border: 1px solid var(--line); border-radius: 14px; background: var(--panel); color: var(--ink); cursor: pointer; font: inherit; text-align: left; transition: transform .2s, box-shadow .2s; }
    .live-game-card:hover { transform: translateY(-2px); box-shadow: 0 10px 22px rgba(30, 40, 35, .12); }
    .live-mini-board { width: 84px; height: 84px; border-radius: 6px; --board-size: 84px; pointer-events: none; }
    .live-mini-board .piece { font-size: 9px; filter: none; cursor: default; }
    .live-game-info { display: grid; gap: 3px; min-width: 0; }
    .live-game-info strong { overflow: hidden; font-size: 14px; text-overflow: ellipsis; white-space: nowrap; }
    .live-game-info small { color: var(--muted); font-size: 11px; }
    .live-watch-cta { justify-self: start; margin-top: 2px; padding: 3px 9px; border-radius: 99px; background: color-mix(in srgb, #e0412f 14%, transparent); color: #c23423; font-size: 11px; font-weight: 800; }
    body[data-theme="dark"] .live-watch-cta { color: #ff8b7c; }
    .live-watch-btn .live-dot { margin-right: 4px; }
    .spectate-panel { display: grid; gap: 6px; margin-top: 12px; padding: 12px; border: 1px solid color-mix(in srgb, #e0412f 40%, var(--line)); border-radius: 14px; background: color-mix(in srgb, #e0412f 7%, var(--panel)); }
    .spectate-title { display: flex; align-items: center; gap: 7px; }
    .spectate-title .eyebrow { margin: 0; color: #c23423; }
    #spectateTitle { font-size: 15px; }
    #spectateInfo { margin: 0; color: var(--muted); font-size: 12px; }
    .spectate-actions { display: flex; flex-wrap: wrap; gap: 6px; }
    @media (max-width: 860px) {
      .design-layout { grid-template-columns: minmax(0, 1fr); }
      .design-preview-wrap { position: static; max-width: 380px; margin: 0 auto; }
    }

    /* Vorschau-Kacheln der Figuren-Stile: unabhängig vom aktiven Stil */
    .design-swatch.design-swatch-pieces .piece { color: inherit; background: none; -webkit-background-clip: border-box; background-clip: border-box; -webkit-text-stroke: 0; text-shadow: none; filter: drop-shadow(0 1px 1px rgba(0, 0, 0, .28)); }
    .design-swatch.design-swatch-pieces.piece-style-classic .piece.white { color: #fffdf4; -webkit-text-stroke: .35px #4e483d; text-shadow: 0 1px 1px #39362f; }
    .design-swatch.design-swatch-pieces.piece-style-classic .piece.black { color: #262c2a; -webkit-text-stroke: .25px #f4e8cf; text-shadow: 0 1px 1px rgba(255,255,255,.35); }
    .design-swatch.design-swatch-pieces.piece-style-clean .piece { filter: none; font-family: "Segoe UI Symbol", "Arial Unicode MS", sans-serif; }
    .design-swatch.design-swatch-pieces.piece-style-clean .piece.white { color: #fffdf4; }
    .design-swatch.design-swatch-pieces.piece-style-clean .piece.black { color: #262c2a; }
    .design-swatch.design-swatch-pieces.piece-style-marble .piece, .design-swatch.design-swatch-pieces.piece-style-royal .piece { color: transparent; -webkit-background-clip: text; background-clip: text; filter: drop-shadow(0 2px 1.5px rgba(0, 0, 0, .38)); }
    .design-swatch.design-swatch-pieces.piece-style-marble .piece.white { background-image: linear-gradient(160deg, #ffffff 0%, #f1ece2 40%, #cfc7b8 100%); -webkit-text-stroke: .7px rgba(70, 62, 50, .55); }
    .design-swatch.design-swatch-pieces.piece-style-marble .piece.black { background-image: linear-gradient(160deg, #7a8089 0%, #2e3238 48%, #0d0f12 100%); -webkit-text-stroke: .7px rgba(255, 255, 255, .32); }
    .design-swatch.design-swatch-pieces.piece-style-royal .piece.white { background-image: linear-gradient(160deg, #fff7cf 0%, #f3c94f 42%, #a5701a 100%); -webkit-text-stroke: .7px rgba(92, 60, 8, .7); }
    .design-swatch.design-swatch-pieces.piece-style-royal .piece.black { background-image: linear-gradient(160deg, #d8dee5 0%, #7b8590 45%, #2d3238 100%); -webkit-text-stroke: .7px rgba(15, 18, 22, .75); }
    .design-swatch.design-swatch-pieces.piece-style-neon .piece { filter: none; }
    .design-swatch.design-swatch-pieces.piece-style-neon .piece.white { color: #e6fdff; text-shadow: 0 0 3px #4be8ff, 0 0 9px #00b4ff, 0 0 16px rgba(0, 150, 255, .7); }
    .design-swatch.design-swatch-pieces.piece-style-neon .piece.black { color: #ffe1fa; text-shadow: 0 0 3px #ff52d9, 0 0 9px #d000ff, 0 0 16px rgba(190, 0, 255, .7); }

    /* ===== turnier-spiel.php ===== */
    .tournament-game-page { padding-top: 22px; }
    .tg-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 14px; margin-bottom: 10px; padding: 14px 18px; border: 1px solid color-mix(in srgb, var(--gold) 45%, var(--line)); border-radius: var(--radius-lg); background: linear-gradient(120deg, color-mix(in srgb, var(--gold) 16%, var(--panel)), color-mix(in srgb, var(--panel) 85%, transparent)); box-shadow: var(--glass-shadow); }
    .tg-title { min-width: 0; }
    .tg-title h1, .tg-title .tg-h1 { margin: 0; font: 400 clamp(24px, 3.6vw, 34px)/1.15 Georgia, "Times New Roman", serif; }
    .tg-title h1 a { color: #b97a22; text-decoration: none; }
    .tg-title h1 a:hover { text-decoration: underline; }
    body[data-theme="dark"] .tg-title h1 a { color: #e8b866; }
    .tg-clock-box { display: grid; justify-items: end; }
    .tg-clock-label { color: var(--muted); font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
    .tg-clock { font: 700 26px/1.1 ui-monospace, "SFMono-Regular", Consolas, monospace; font-variant-numeric: tabular-nums; }
    .tg-status-slot { display: flex; justify-content: flex-end; min-height: 26px; margin-bottom: 10px; }
    .tg-side { display: grid; gap: 0; }
    .tg-card { padding: 14px 16px; border-bottom: 1px solid color-mix(in srgb, var(--line) 80%, transparent); }
    .tg-card:last-child { border-bottom: 0; }
    .tg-me { display: grid; gap: 4px; background: color-mix(in srgb, var(--green) 8%, transparent); }
    .tg-me-row { display: flex; align-items: baseline; justify-content: space-between; }
    .tg-me-label { color: var(--muted); font-size: 12px; }
    .tg-me-row strong { font-size: 18px; }
    .tg-me-sheet:empty { display: none; }
    .tg-info { margin: 0 0 10px; color: var(--muted); font-size: 12px; }
    .tg-info:empty { display: none; }
    .tg-actions { display: flex; flex-wrap: wrap; gap: 7px; }
    .tg-actions .tool-btn { flex: 1 1 90px; }
    .tg-actions-secondary { margin-top: 8px; }
    .tg-actions-secondary .quiet-btn { flex: 1 1 auto; }
    .tg-panel-heading { padding: 0 0 8px; border: 0; }
    .tg-panel-heading h2 { margin: 0; font: 400 18px/1.2 Georgia, serif; }
    .tg-moves { display: grid; grid-template-columns: 34px 1fr 1fr; gap: 2px 6px; max-height: 210px; overflow-y: auto; font-size: 13px; }
    .tg-move-no { color: var(--muted); }
    .tg-move { padding: 2px 6px; border-radius: 6px; font-weight: 600; }
    .tg-move.latest { background: color-mix(in srgb, var(--green) 18%, transparent); }
    .tg-muted { margin: 0; color: var(--muted); font-size: 12px; }
    .tg-standings { display: grid; gap: 2px; margin: 0; padding: 0; list-style: none; font-size: 13px; }
    .tg-standing { display: grid; grid-template-columns: 26px minmax(0, 1fr) auto; align-items: center; gap: 6px; padding: 5px 6px; border-radius: 8px; }
    .tg-standing.is-me { background: color-mix(in srgb, var(--green) 16%, transparent); font-weight: 700; }
    .tg-standing.is-playing .tg-name::after { content: " ●"; color: #3e9a4a; font-size: 9px; vertical-align: 2px; }
    .tg-rank { color: var(--muted); text-align: right; }
    .tg-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .tg-empty { max-width: 640px; margin: 30px auto; text-align: center; }
    .tg-empty .tg-actions { justify-content: center; margin-top: 14px; }
    @media (max-width: 760px) {
      .tg-head { align-items: flex-start; }
      .tg-clock-box { justify-items: start; }
      .tg-status-slot { justify-content: flex-start; }
    }

    /* ===== spielen.php: aufgeräumt ===== */
    .play-start { display: grid; gap: 8px; padding: 14px 16px 16px; border-top: 1px solid color-mix(in srgb, var(--line) 80%, transparent); }
    .play-start .settings-status { margin: 0; }
    .play-start .settings-status:empty { display: none; }
    .play-start-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
    .play-start-actions button { min-height: 44px; }
    .design-column { display: grid; gap: 18px; }
    .design-a11y .blind-setting { margin: 0; }

    @media (max-width: 700px) {
      /* Spielknöpfe immer erreichbar: feste Leiste direkt über dem Menü */
      body[data-page="play"] [data-page-section="play"] .toolbar,
      body[data-page="tournamentGame"] .tg-card > .tg-actions:not(.tg-actions-secondary),
      body[data-page="watch"] .watch-actions-card > .tg-actions {
        position: fixed; z-index: 8; left: 8px; right: 8px; bottom: calc(var(--tabbar-height) + env(safe-area-inset-bottom) + 6px);
        display: flex; gap: 4px; margin: 0; padding: 5px; border: 1px solid var(--glass-border); border-radius: 16px;
        background: color-mix(in srgb, var(--panel) 94%, transparent); box-shadow: 0 8px 26px rgba(20, 32, 26, .22);
        backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
      }
      body[data-page="play"] [data-page-section="play"] .toolbar .tool-btn,
      body[data-page="tournamentGame"] .tg-card > .tg-actions:not(.tg-actions-secondary) > button,
      body[data-page="watch"] .watch-actions-card > .tg-actions > button {
        flex: 1 1 0; display: grid; place-items: center; gap: 1px; min-width: 0; min-height: 46px; padding: 4px 2px; font-size: 16px; line-height: 1.1;
      }
      body[data-page="play"] [data-page-section="play"] .toolbar .tool-btn span:not([aria-hidden]),
      body[data-page="play"] #soundLabel { font-size: 9.5px; font-weight: 700; }
      body[data-page="play"] [data-page-section="play"],
      body[data-page="tournamentGame"] [data-page-section="tournamentGame"],
      body[data-page="watch"] [data-page-section="watch"] { padding-bottom: 76px; }
      /* backdrop-filter würde position: fixed der Leiste auf das Seitenpanel beschränken */
      [data-page-section="play"] .side-panel, .tg-side { backdrop-filter: none; -webkit-backdrop-filter: none; background: color-mix(in srgb, var(--panel) 92%, transparent); }
      [data-page-section="play"] .page-heading { margin-bottom: 8px; }
      [data-page-section="play"] .page-heading h1 { display: none; }
      [data-page-section="play"] .move-list { max-height: 132px; }
      [data-page-section="play"] .panel-heading { padding-top: 10px; padding-bottom: 6px; }
      .tg-moves { max-height: 120px; }
      /* Brett + beide Spielerleisten + Knopfleiste passen ohne Scrollen auf den Bildschirm */
      body[data-page="play"], body[data-page="tournamentGame"], body[data-page="watch"] { --board-size: min(calc(100vw - 24px), calc(100vh - 350px), 620px); }
      @supports (height: 100svh) { body[data-page="play"], body[data-page="tournamentGame"], body[data-page="watch"] { --board-size: min(calc(100vw - 24px), calc(100svh - 350px), 620px); } }
      .play-area { margin-inline: auto; }
      .play-area .player-strip { min-height: 44px; padding: 4px 8px; border-radius: 14px; }
      .play-area .player-strip .avatar { width: 30px; height: 30px; border-radius: 9px; font-size: 17px; }
      .play-area .player-kind { display: none; }
      .play-area .clock { min-width: 66px; padding: 4px 8px; font-size: 17px; }
      .play-area .board-frame { padding: 5px; margin-block: 4px; }
      .play-area .under-board { margin-top: 2px; }
      [data-page-section="play"] .page-heading .eyebrow { margin: 0; }
      [data-page-section="play"] .page-heading { display: flex; flex-wrap: nowrap; align-items: center; justify-content: space-between; gap: 8px; min-width: 0; }
      [data-page-section="play"] .page-heading > div:first-child { min-width: 0; }
      [data-page-section="play"] .page-heading .eyebrow { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 9px; }
      [data-page-section="play"] .status-line, .tg-status-slot .status-line { flex-wrap: wrap; justify-content: flex-end; font-size: 12px; white-space: nowrap; }
      .tg-head { padding: 10px 12px; margin-bottom: 6px; }
      .tg-title h1, .tg-title .tg-h1 { font-size: 21px; }
      .tg-clock { font-size: 20px; }
    }
    .tg-moves .tg-muted { grid-column: 1 / -1; }

    /* ===== Bot-Turniere & zuschauen.php ===== */
    .tour-block.is-bots, .tour-cal-bar.is-bots { background: #2f8a8a; }
    .legend-bots::before { background: #2f8a8a; }
    .tour-pill.bots { background: color-mix(in srgb, #2f8a8a 22%, var(--panel)); }
    .tour-pill.live { background: color-mix(in srgb, #e0412f 16%, var(--panel)); color: #c23423; }
    body[data-theme="dark"] .tour-pill.live { color: #ff8b7c; }
    .watch-page { padding-top: 22px; }
    .watch-overview .page-heading { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 10px; }
    .watch-tournament { margin-top: 16px; padding: 14px; border: 1px solid var(--line); border-radius: 16px; background: color-mix(in srgb, var(--panel) 80%, transparent); }
    .watch-tournament.is-bots { border-color: color-mix(in srgb, #2f8a8a 45%, var(--line)); background: linear-gradient(120deg, color-mix(in srgb, #2f8a8a 9%, var(--panel)), color-mix(in srgb, var(--panel) 85%, transparent)); }
    .watch-tournament-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
    .watch-tournament-head h2 { margin: 0; font: 400 21px/1.2 Georgia, serif; }
    .watch-tournament-head small { color: var(--muted); font-size: 12px; }
    .watch-tournament-head a { text-decoration: none; }
    .watch-tournament-body { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 14px; align-items: start; }
    .watch-mini-standings { padding: 6px; border-radius: 12px; background: color-mix(in srgb, var(--panel) 70%, transparent); }
    .watch-follow { display: flex; align-items: flex-start; gap: 8px; margin-top: 10px; color: var(--muted); font-size: 12px; cursor: pointer; }
    .watch-follow input { margin-top: 2px; accent-color: var(--green); }
    .watch-others { display: grid; gap: 4px; max-height: 220px; overflow-y: auto; }
    .watch-other-game { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 7px 9px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); color: var(--ink); cursor: pointer; font: inherit; font-size: 12px; text-align: left; }
    .watch-other-game:hover { background: color-mix(in srgb, var(--green) 10%, var(--panel)); }
    .live-games-head a { text-decoration: none; }
    @media (max-width: 760px) {
      .watch-tournament-body { grid-template-columns: minmax(0, 1fr); }
      .watch-follow { margin-top: 0; }
    }
    .watch-tournament-head a.quiet-btn { color: var(--ink); }
    @media (max-width: 700px) {
      /* Kompakter Kopf auf turnier-spiel.php und zuschauen.php, damit Brett + Knöpfe auf den Bildschirm passen */
      .tg-head { flex-wrap: nowrap; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 16px; }
      .tg-title { min-width: 0; }
      .tg-title .eyebrow { overflow: hidden; margin: 0; font-size: 8.5px; letter-spacing: .1em; text-overflow: ellipsis; white-space: nowrap; }
      .tg-title h1, .tg-title .tg-h1 { overflow: hidden; font-size: 17px; text-overflow: ellipsis; white-space: nowrap; }
      .tg-clock-box { flex: 0 0 auto; justify-items: end; }
      .tg-clock-label { font-size: 8.5px; }
      .tg-clock { font-size: 17px; }
      .tg-status-slot { justify-content: flex-end; min-height: 0; margin-bottom: 2px; }
      .tg-status-slot .status-line { font-size: 11px; }
    }
    @media (max-width: 700px) {
      .watch-page, .tournament-game-page { padding-top: 10px; }
      body[data-page="tournamentGame"], body[data-page="watch"] { --board-size: min(calc(100vw - 24px), calc(100vh - 378px), 620px); }
      @supports (height: 100svh) { body[data-page="tournamentGame"], body[data-page="watch"] { --board-size: min(calc(100vw - 24px), calc(100svh - 378px), 620px); } }
    }
    @media (max-width: 700px) and (max-height: 620px) {
      [data-page-section="watch"] .tg-head, [data-page-section="tournamentGame"] .tg-head { display: none; }
      body[data-page="tournamentGame"], body[data-page="watch"] { --board-size: min(calc(100vw - 24px), calc(100vh - 318px), 620px); }
      @supports (height: 100svh) { body[data-page="tournamentGame"], body[data-page="watch"] { --board-size: min(calc(100vw - 24px), calc(100svh - 318px), 620px); } }
    }

    /* ===== Überarbeitung nach Seitenprüfung ===== */
    /* Spielen: Brett passt auf Laptop-Höhe, Zugliste direkt daneben */
    @media (min-width: 821px) {
      :root { --board-size: min(max(320px, calc(100vh - 340px)), 680px, calc(100vw - 420px)); }
      body[data-page="tournamentGame"], body[data-page="watch"] { --board-size: min(max(320px, calc(100vh - 425px)), 680px, calc(100vw - 420px)); }
      .layout { grid-template-columns: max-content 330px; justify-content: center; }
    }
    /* Rewards: Skala passend zu den Positionen auf dem Balken, ohne Umbruch */
    .elo-progress-scale { position: relative; display: block; height: 34px; margin-top: 10px; }
    .elo-progress-scale span { position: absolute; top: 0; transform: translateX(-50%); text-align: center !important; white-space: nowrap; }
    .elo-progress-scale span:nth-child(1) { left: 0; transform: none; text-align: left !important; }
    .elo-progress-scale span:nth-child(2) { left: 20%; }
    .elo-progress-scale span:nth-child(3) { left: 40%; }
    .elo-progress-scale span:nth-child(4) { left: 60%; }
    .elo-progress-scale span:nth-child(5) { left: 80%; }
    .elo-progress-scale span:nth-child(6) { left: auto; right: 0; transform: none; text-align: right !important; }
    @media (max-width: 520px) { .elo-progress-scale small { display: none; } .elo-progress-scale { height: 20px; } }
    .elo-milestone.is-start { opacity: .45; text-decoration: line-through; }
    /* Rangliste: Namen als Profil-Links */
    .leaderboard-player { color: var(--green-dark); font-weight: 700; text-decoration: none; border-bottom: 1px dashed color-mix(in srgb, var(--green) 50%, transparent); }
    .leaderboard-player:hover { color: var(--green); border-bottom-style: solid; }
    body[data-theme="dark"] .leaderboard-player { color: var(--green); }
    .leaderboard-rule { margin-top: 10px; }
    /* Mitglieder: leerer Live-Kasten kompakt */
    .live-games.is-empty { padding: 10px 14px; }
    .live-games.is-empty .live-games-head { margin: 0; }
    .live-games.is-empty .live-games-head h2 { font-size: 15px; }
    /* Shop */
    .shop-affordable-filter { display: inline-flex; align-items: center; gap: 6px; margin-left: auto; padding: 6px 10px; border: 1px dashed var(--line); border-radius: 999px; font-size: 12px; font-weight: 650; cursor: pointer; }
    .shop-affordable-filter input { accent-color: var(--green); }
    .shop-gift-button:disabled { opacity: .5; cursor: not-allowed; }
    /* Profil: rechte Spalte */
    .profile-side { display: grid; gap: 14px; align-content: start; }
    .profile-side-card { padding: 14px; border: 1px solid var(--line); border-radius: 16px; background: color-mix(in srgb, var(--panel) 80%, transparent); }
    .profile-side-card h2 { margin: 0 0 10px; font-size: 15px; font-weight: 750; }
    .elo-chart svg { width: 100%; height: auto; display: block; }
    .elo-chart .elo-line { fill: none; stroke: var(--green); stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
    .elo-chart .elo-area { fill: color-mix(in srgb, var(--green) 14%, transparent); }
    .elo-chart circle { fill: var(--green); }
    .elo-chart-scale { margin-top: 4px; color: var(--muted); font-size: 11px; text-align: right; }
    .recent-games { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
    .recent-game { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 10px; background: color-mix(in srgb, var(--panel) 70%, transparent); }
    .recent-result { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 8px; color: #fff; font-weight: 800; }
    .r-win .recent-result { background: #3e9a4a; }
    .r-draw .recent-result { background: #b98f2c; }
    .r-loss .recent-result { background: #9a4a3e; }
    .recent-info { display: grid; min-width: 0; }
    .recent-info strong { overflow: hidden; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
    .recent-info small, .recent-empty { color: var(--muted); font-size: 12px; }
    .recent-change { font-weight: 800; font-variant-numeric: tabular-nums; }
    .recent-change.up { color: #3e9a4a; }
    .recent-change.down { color: var(--danger); }
    @media (min-width: 1100px) {
      .profile-page-card { display: grid; grid-template-columns: minmax(0, 680px) minmax(280px, 1fr); column-gap: 28px; align-items: start; }
      .profile-page-card > * { grid-column: 1; }
      .profile-page-card > .page-heading { grid-column: 1 / -1; }
      .profile-page-card > .profile-side { grid-column: 2; grid-row: 2 / span 6; position: sticky; top: 90px; margin-top: 22px; }
    }
    /* Startseite: Live-Zahlen */
    .home-live { margin-top: 18px; padding: clamp(16px, 3vw, 24px); border: 1px solid var(--glass-border); border-radius: var(--radius-lg); background: color-mix(in srgb, var(--panel) 82%, transparent); box-shadow: var(--glass-shadow); }
    .home-live h2 { display: flex; align-items: center; gap: 8px; margin: 0 0 14px; font: 400 22px/1.2 Georgia, serif; }
    .home-live-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
    .home-stat { display: grid; gap: 2px; padding: 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--panel); color: var(--ink); text-decoration: none; }
    .home-stat strong { font: 700 26px/1.1 Georgia, serif; font-variant-numeric: tabular-nums; }
    .home-stat span { overflow: hidden; color: var(--muted); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
    .home-stat-link:hover { border-color: var(--green); }
    .home-featured { margin-top: 14px; }
    .home-featured h3 { margin: 0 0 8px; font-size: 14px; }
    .home-featured .live-game-card { width: min(100%, 420px); }
    @media (max-width: 560px) { .home-live-stats { grid-template-columns: 1fr; } .home-stat strong { font-size: 22px; } }
    /* Umwandlung: deutlich erkennbare Figuren */
    .promotion-options { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
    .promotion-options .promotion-choice { display: grid; justify-items: center; gap: 6px; min-height: 0; padding: 8px 6px 10px; border: 2px solid var(--line); border-radius: 14px; background: var(--panel); color: var(--ink); font: inherit; cursor: pointer; transition: transform .15s, border-color .15s, box-shadow .15s; }
    .promotion-options .promotion-choice:hover, .promotion-options .promotion-choice:focus-visible { border-color: var(--green); transform: translateY(-2px); box-shadow: 0 8px 18px rgba(30, 40, 35, .15); }
    .promotion-choice .square { display: grid; place-items: center; width: 100%; aspect-ratio: 1; border-radius: 10px; cursor: pointer; }
    .promotion-choice .piece { font-size: clamp(40px, 11vw, 64px); cursor: pointer; }
    .promotion-name { font-size: 13px; font-weight: 750; }
    .tg-empty-title { margin: 6px 0 0; font: 400 clamp(24px, 3.6vw, 32px)/1.15 Georgia, serif; }

    /* En passant: Zielfeld, geschlagener Bauer und kurzer Hinweis */
    .square.en-passant::after { border-color: rgba(214, 120, 30, .9) !important; box-shadow: inset 0 0 0 2px rgba(255, 240, 220, .6) !important; }
    .ep-label { position: absolute; z-index: 2; right: 3px; bottom: 2px; padding: 1px 4px; border-radius: 6px; background: rgba(214, 120, 30, .92); color: #fff; font: 800 9px/1.3 "Segoe UI", sans-serif; letter-spacing: .03em; pointer-events: none; }
    .square.ep-victim::before { position: absolute; inset: 0; background: repeating-linear-gradient(45deg, rgba(214, 120, 30, .38) 0 6px, transparent 6px 12px); content: ""; }
    .en-passant-note { position: absolute; z-index: 6; left: 50%; top: 50%; padding: 10px 18px; border-radius: 14px; background: rgba(214, 120, 30, .95); color: #fff; font: 800 clamp(16px, 3vw, 24px)/1.2 Georgia, serif; box-shadow: 0 10px 30px rgba(0,0,0,.25); opacity: 0; transform: translate(-50%, -50%) scale(.8); pointer-events: none; transition: opacity .25s, transform .25s; }
    .en-passant-note.visible { opacity: 1; transform: translate(-50%, -50%) scale(1); }
    @media (min-width: 821px) and (max-width: 1050px) {
      /* hier steht das Menü in einer zweiten Zeile – das Brett etwas kleiner */
      :root { --board-size: min(max(320px, calc(100vh - 390px)), 680px, calc(100vw - 420px)); }
      body[data-page="tournamentGame"], body[data-page="watch"] { --board-size: min(max(320px, calc(100vh - 470px)), 680px, calc(100vw - 420px)); }
    }
    @media (max-width: 700px) {
      .site-nav { grid-template-columns: repeat(7, minmax(0, 1fr)); }
      .site-nav a[data-page-link="watch"] { display: none; }
    }
