/* Crokinole: one look for every screen. Wood, cream and gold, with chunky pixel borders. */

:root {
  --bg: #1e140d;          /* dark walnut */
  --panel: #33231a;
  --panel-dark: #281a12;
  --panel-light: #43301f;
  --edge: #0e0805;        /* the black outline around everything */
  --wood: #6b4423;
  --cream: #f3e7d0;
  --muted: #b8a58a;
  --gold: #ffd27a;
  --red: #b5432d;
  --green: #9fd35a;
  --font: "Courier New", ui-monospace, monospace;
}

html, body { margin: 0; height: 100%; background: var(--bg); overflow: hidden;
             font-family: var(--font); font-weight: bold; color: var(--cream); user-select: none; }
canvas { display: block; touch-action: none; image-rendering: pixelated; }
#screen { position: fixed; inset: 0; }

/* A box with a hard black outline, a lighter inner rim, and a blocky drop shadow. */
.pixel-box { background: var(--panel); border: 3px solid var(--edge);
             box-shadow: inset 0 0 0 3px var(--panel-light), 6px 6px 0 rgba(0, 0, 0, 0.45); }

/* Chunky buttons that press down when clicked. */
.pbtn { font: inherit; font-size: 15px; color: var(--cream); background: var(--wood); cursor: pointer;
        border: 3px solid var(--edge); padding: 7px 16px; text-transform: uppercase;
        box-shadow: inset -3px -3px 0 rgba(0, 0, 0, 0.35), inset 3px 3px 0 rgba(255, 255, 255, 0.18), 3px 3px 0 var(--edge); }
.pbtn:hover { filter: brightness(1.15); }
.pbtn:active { transform: translate(3px, 3px); box-shadow: inset -3px -3px 0 rgba(0, 0, 0, 0.35), inset 3px 3px 0 rgba(255, 255, 255, 0.18); }
.pbtn:disabled { opacity: 0.45; cursor: default; filter: none; transform: none; }
.pbtn.gold { background: var(--gold); color: #3a2412; }
.pbtn.on { background: var(--gold); color: #3a2412; }

/* ---------- home screen ---------- */
#home { position: fixed; inset: 0; overflow-y: auto; display: flex; flex-direction: column; align-items: center;
        padding: 40px 20px; box-sizing: border-box; }
#logo { width: min(640px, 90vw); height: auto; }
.tagline { margin: 10px 0 30px; color: var(--muted); font-size: 16px; text-align: center; }
.home-row { display: flex; gap: 26px; flex-wrap: wrap; justify-content: center; }
.profile { padding: 18px 20px; width: 300px; }
.profile-top { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.profile-top label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--muted); }
.profile input, .linkrow input { font: inherit; font-size: 16px; color: var(--cream); background: var(--panel-dark);
                                 border: 3px solid var(--edge); padding: 5px 8px; width: 170px; }
#home-stats div { display: flex; justify-content: space-between; padding: 6px 2px; border-top: 2px dashed var(--panel-light); font-size: 14px; }
#home-stats span { color: var(--muted); }
#home-stats b { color: var(--gold); }
.avatar { width: 40px; height: 40px; border: 3px solid var(--edge); }
.avatar.big { width: 64px; height: 64px; }
.menu { display: flex; flex-direction: column; gap: 14px; width: 340px; }
.menu-btn { display: flex; align-items: center; gap: 16px; text-align: left; font: inherit; color: var(--cream); cursor: pointer;
            background: var(--panel); border: 3px solid var(--edge); padding: 12px 16px;
            box-shadow: inset 0 0 0 3px var(--panel-light), 5px 5px 0 rgba(0, 0, 0, 0.45); transition: transform 0.08s; }
.menu-btn:hover { background: var(--panel-light); transform: translate(-2px, -2px); }
.menu-btn:active { transform: translate(3px, 3px); box-shadow: inset 0 0 0 3px var(--panel-light); }
.menu-btn b { display: block; font-size: 20px; color: var(--gold); text-transform: uppercase; }
.menu-btn small { display: block; font-size: 13px; color: var(--muted); margin-top: 2px; }
.menu-btn .icon { width: 48px; height: 44px; flex: none; }
.menu-btn .icon.round { width: 44px; height: 44px; image-rendering: auto; }
#friend-box { margin-top: 26px; padding: 18px 24px; width: min(640px, 90vw); box-sizing: border-box; }
#friend-box h2 { margin: 0 0 8px; color: var(--gold); text-transform: uppercase; }
#friend-box p { line-height: 1.5; }
#friend-box .pbtn { margin: 6px 8px 0 0; }
.linkrow { display: flex; gap: 10px; }
.linkrow input { flex: 1; width: auto; font-size: 14px; }
.note { color: var(--muted); font-size: 13px; }
.error { color: #ff8a6a; }
.waiting .dots::after { content: ''; animation: dots 1.2s steps(4) infinite; }
@keyframes dots { 0% { content: ''; } 25% { content: '.'; } 50% { content: '..'; } 75% { content: '...'; } }

/* ---------- club hall ---------- */
#wallet { position: fixed; top: 14px; left: 16px; font-size: 15px; line-height: 1.6; padding: 8px 12px;
          background: rgba(14, 8, 5, 0.75); border: 3px solid var(--edge); }
#wallet b { color: var(--gold); }
.help { position: fixed; top: 14px; right: 16px; font-size: 13px; line-height: 1.6; text-align: right;
        opacity: 0.85; text-shadow: 2px 2px 0 var(--edge); }
#prompt { display: none; position: fixed; bottom: 50px; left: 50%; transform: translateX(-50%);
          background: var(--panel); border: 3px solid var(--gold); padding: 8px 18px; font-size: 18px;
          box-shadow: 4px 4px 0 var(--edge); }
#message { position: fixed; bottom: 14px; left: 0; right: 0; text-align: center; pointer-events: none;
           font-size: 18px; text-shadow: 2px 2px 0 var(--edge), 0 0 8px #000; }
#message.pop-in { animation: popin 0.4s cubic-bezier(.3, 1.6, .6, 1); }
@keyframes popin { from { transform: scale(0.6); opacity: 0; } }

/* ---------- result box after a round ---------- */
#banner { display: none; position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%); z-index: 2;
          background: var(--panel); border: 3px solid var(--edge); padding: 22px 34px; font-size: 18px;
          line-height: 1.8; text-align: center; cursor: pointer;
          box-shadow: inset 0 0 0 3px var(--gold), 8px 8px 0 rgba(0, 0, 0, 0.5); }
#banner big { display: block; font-size: 26px; color: var(--gold); margin: 6px 0; text-transform: uppercase; }

/* ---------- match screen ---------- */
.card { position: fixed; display: flex; align-items: center; gap: 10px; padding: 0 8px; box-sizing: border-box;
        background: var(--panel-dark); border: 3px solid var(--edge); transition: box-shadow 0.3s; }
.card.turn { box-shadow: inset 0 0 0 3px var(--gold); }
.card.turn .who::after { content: ' \25C0 turn'; color: var(--gold); font-size: 12px; animation: blink 1s steps(2) infinite; }
@keyframes blink { 50% { opacity: 0.3; } }
.card .avatar { width: 34px; height: 34px; }
.who { font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.badge { background: var(--red); color: #fff; font-size: 11px; padding: 1px 5px; margin-right: 8px; border: 2px solid var(--edge); }
.rating { color: var(--muted); font-weight: normal; }
.rack { margin-left: auto; display: flex; gap: 3px; padding: 4px 8px;
        background: linear-gradient(#7a5028, #3a2412); border: 3px solid var(--edge);
        box-shadow: inset 0 4px 0 rgba(0, 0, 0, 0.45); }
.slot { width: 24px; height: 24px; image-rendering: auto; transition: transform 0.45s cubic-bezier(.3, 1.6, .6, 1), opacity 0.45s; }
.slot.used { opacity: 0.12; transform: translateY(-10px) scale(0.55); }
.slot.ready { animation: ready 0.7s ease-in-out infinite alternate; }
@keyframes ready { to { transform: translateY(-4px); filter: drop-shadow(0 0 5px var(--gold)); } }
#evalbar { position: fixed; width: 16px; border: 3px solid var(--edge); overflow: hidden; }
#eval-you { position: absolute; left: 0; right: 0; bottom: 0; height: 50%; transition: height 0.9s cubic-bezier(.3, 1.3, .6, 1);
            box-shadow: 0 -3px 0 var(--edge); }
#eval-label { position: absolute; left: -3px; right: -3px; text-align: center; font-size: 10px; color: #fff;
              text-shadow: 1px 1px 0 var(--edge), -1px -1px 0 var(--edge), 1px -1px 0 var(--edge), -1px 1px 0 var(--edge); }
#eval-label.you-ahead { bottom: 4px; }
#eval-label.cpu-ahead { top: 4px; }
#panel { position: fixed; top: 16px; right: 16px; bottom: 16px; width: 300px; display: flex; flex-direction: column; overflow: hidden; }
.panel-head { display: flex; align-items: center; gap: 12px; padding: 12px 14px; background: var(--panel-dark);
              border-bottom: 3px solid var(--edge); font-size: 14px; color: var(--muted); }
.panel-head .tab { color: var(--gold); text-transform: uppercase; border-bottom: 3px solid var(--gold); }
#panel-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.scores { display: flex; align-items: stretch; gap: 6px; padding: 14px; }
.scorebox { position: relative; flex: 1; background: var(--panel-dark); border: 3px solid var(--edge); padding: 8px; text-align: center; }
.scorebox .label { font-size: 13px; color: var(--muted); display: flex; align-items: center; justify-content: center; gap: 6px; }
.swatch { width: 10px; height: 10px; border: 2px solid var(--edge); }
.scorebox .big { font-size: 42px; line-height: 1.15; color: var(--cream); text-shadow: 3px 3px 0 var(--edge); }
.scorebox .small { font-size: 12px; color: var(--muted); }
.scorebox .small b { color: var(--gold); }
.scorebox.flash { animation: flash 1s ease-out; }
@keyframes flash { 0% { box-shadow: 0 0 0 4px var(--gold), 0 0 24px var(--gold); transform: scale(1.07); } 100% { box-shadow: none; transform: none; } }
.pips { display: flex; justify-content: center; gap: 5px; margin-top: 6px; }
.pip { width: 10px; height: 10px; border: 2px solid var(--edge); background: var(--panel-light); transition: background 0.4s; }
.pip.won { background: var(--gold); }
.vs { align-self: center; display: flex; flex-direction: column; align-items: center; font-size: 11px; color: var(--muted); }
.vs b { color: var(--cream); font-size: 22px; }
.float { position: absolute; left: 50%; top: 30%; font-size: 22px; pointer-events: none; text-shadow: 2px 2px 0 var(--edge);
         animation: floatup 1.3s ease-out forwards; }
.float.up { color: var(--green); }
.float.down { color: #ff8a6a; }
@keyframes floatup { from { opacity: 1; transform: translate(-50%, 0) scale(1.3); } to { opacity: 0; transform: translate(-50%, -48px) scale(1); } }
#shots { flex: 1; overflow-y: auto; list-style: none; margin: 0; padding: 0 0 8px; font-size: 13px; }
#shots li { display: flex; align-items: center; gap: 8px; padding: 6px 14px; animation: slidein 0.35s ease-out; }
#shots li.shot:nth-child(even) { background: var(--panel-dark); }
#shots .round-line { color: var(--gold); padding-top: 12px; text-transform: uppercase; border-bottom: 2px dashed var(--panel-light); }
#shots .num { color: var(--muted); width: 24px; }
#shots .dot { width: 10px; height: 10px; flex: none; border: 2px solid var(--edge); }
#shots .text { flex: 1; color: var(--cream); font-weight: normal; }
#shots .twenty .text { color: var(--gold); font-weight: bold; }
#shots .deltas { display: flex; flex-direction: column; align-items: flex-end; font-size: 11px; white-space: nowrap; }
#shots .up { color: var(--green); }
#shots .down { color: #ff8a6a; }
@keyframes slidein { from { opacity: 0; transform: translateX(16px); } }
.howto { padding: 10px 14px; font-size: 12px; font-weight: normal; color: var(--muted); line-height: 1.6; border-top: 3px solid var(--edge); }
.howto summary { cursor: pointer; color: var(--cream); font-weight: bold; }
.panel-foot { padding: 10px 14px; background: var(--panel-dark); border-top: 3px solid var(--edge); }

/* ---------- button shop ---------- */
#shop { display: none; position: fixed; inset: 40px; max-width: 900px; margin: 0 auto; overflow-y: auto; z-index: 3;
        padding: 10px 26px 26px; }
#shop h2 { margin: 0; color: var(--gold); font-size: 26px; text-transform: uppercase; }
#shop h3 { margin: 22px 0 10px; color: var(--gold); text-transform: uppercase; font-size: 16px; }
#shop button { font: inherit; font-size: 14px; color: var(--cream); background: var(--wood); cursor: pointer;
               border: 3px solid var(--edge); padding: 5px 12px; box-shadow: 3px 3px 0 var(--edge); }
#shop button:active { transform: translate(3px, 3px); box-shadow: none; }
#shop button:disabled { opacity: 0.45; cursor: default; transform: none; }
#shop button.on { background: var(--gold); color: #3a2412; }
.shop-top { display: flex; align-items: center; justify-content: space-between; gap: 16px;
            position: sticky; top: -10px; background: var(--panel); padding: 12px 0; border-bottom: 3px dashed var(--panel-light); }
.shop-top b { color: var(--gold); }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 12px; }
.item { background: var(--panel-dark); border: 3px solid var(--edge); padding: 10px; text-align: center; font-size: 14px;
        display: flex; flex-direction: column; align-items: center; gap: 6px; }
.item canvas { image-rendering: auto; }
.item.using { box-shadow: inset 0 0 0 3px var(--gold); }
.designer { display: flex; gap: 26px; align-items: flex-start; flex-wrap: wrap; }
.designer canvas { image-rendering: auto; }
.controls { display: flex; flex-direction: column; gap: 10px; }
.controls label { display: flex; align-items: center; gap: 10px; }
.controls input[type=text] { font: inherit; width: 160px; padding: 4px; background: var(--panel-dark); color: var(--cream);
                             border: 3px solid var(--edge); }
.controls input[type=color] { width: 46px; height: 28px; border: 3px solid var(--edge); padding: 0; background: none; }
.patterns { display: flex; flex-wrap: wrap; gap: 6px; }

/* ---------- character screen ---------- */
#character { display: none; position: fixed; inset: 40px; max-width: 900px; margin: 0 auto; overflow-y: auto; z-index: 3;
             padding: 10px 26px 26px; }
#character h2 { margin: 0; color: var(--gold); font-size: 26px; text-transform: uppercase; }
#character h3 { margin: 16px 0 8px; color: var(--gold); text-transform: uppercase; font-size: 15px; }
#character button { font: inherit; font-size: 14px; color: var(--cream); background: var(--wood); cursor: pointer;
                    border: 3px solid var(--edge); padding: 5px 12px; box-shadow: 3px 3px 0 var(--edge); }
#character button:active { transform: translate(3px, 3px); box-shadow: none; }
#character button:disabled { opacity: 0.45; cursor: default; transform: none; }
#character button.on { background: var(--gold); color: #3a2412; }
#character .swatch-btn { width: 30px; height: 30px; padding: 0; }
#character .swatch-btn.on { outline: 3px solid var(--gold); }
#character label { display: inline-flex; align-items: center; gap: 8px; margin: 0 14px 8px 0; }
#character input[type=color] { width: 46px; height: 28px; border: 3px solid var(--edge); padding: 0; background: none; }
.char-preview { display: flex; flex-direction: column; align-items: center; gap: 12px; position: sticky; top: 70px; }
#char-canvas { width: 192px; height: 240px; background: var(--panel-dark); border: 3px solid var(--edge); }

/* ---------- home extras ---------- */
.menu-btn.peach b { color: #f4a66a; }
.menu .voice-toggle { align-self: flex-start; font-size: 13px; }

/* ---------- coin flip ---------- */
#flip { display: none; position: fixed; transform: translate(-50%, -50%); z-index: 2; width: 360px; text-align: center;
        background: var(--panel); border: 3px solid var(--edge); padding: 18px 20px 20px;
        box-shadow: inset 0 0 0 3px var(--gold), 8px 8px 0 rgba(0, 0, 0, 0.5); }
#flip-coin { margin: 10px auto; image-rendering: auto; }
#flip-text { font-size: 17px; line-height: 1.5; min-height: 52px; }
#flip-choices { margin-top: 10px; display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
#flip-choices .note { width: 100%; }

/* ---------- opponent speech bubble during a match ---------- */
#cpu-bubble { position: fixed; z-index: 1; max-width: 260px; background: #fff; color: #1a1a1a; font-size: 14px;
              padding: 8px 12px; border: 3px solid var(--edge); box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.4);
              opacity: 0; transform: translateY(-6px); transition: opacity 0.25s, transform 0.25s; pointer-events: none; }
#cpu-bubble.show { opacity: 1; transform: none; }
#cpu-bubble::before { content: ''; position: absolute; top: -12px; left: 18px; border: 6px solid transparent;
                      border-bottom-color: var(--edge); }

/* ---------- the newspaper when you win ---------- */
#banner.newspaper { width: min(520px, 90vw); box-sizing: border-box; padding: 16px 22px; text-align: left; line-height: 1.4;
                    background: #efe6d0; color: #1e1a14; border: 3px solid var(--edge);
                    box-shadow: 10px 10px 0 rgba(0, 0, 0, 0.55); transform: translate(-50%, -50%) rotate(-2deg);
                    animation: paper-spin 1.2s steps(16) both; }
@keyframes paper-spin {
  from { transform: translate(-50%, -50%) rotate(-1080deg) scale(0.05); }
  to   { transform: translate(-50%, -50%) rotate(-2deg) scale(1); }
}
.newspaper .masthead { font-size: 30px; text-align: center; text-transform: uppercase; letter-spacing: 2px;
                       border-bottom: 3px double #1e1a14; padding-bottom: 4px; }
.newspaper .dateline { display: flex; justify-content: space-between; font-size: 11px; border-bottom: 2px solid #1e1a14; padding: 3px 0; }
.newspaper .kicker { margin-top: 8px; font-size: 13px; color: #a3202a; text-transform: uppercase; }
.newspaper .headline { font-size: 32px; line-height: 1.05; text-transform: uppercase; margin: 2px 0 10px; }
.newspaper .paper-body { display: flex; gap: 14px; align-items: flex-start; }
.newspaper #paper-photo { width: 168px; height: 105px; flex: none; border: 2px solid #1e1a14;
                          filter: grayscale(1) contrast(1.3) sepia(0.25); }
.newspaper p { margin: 0; font-size: 14px; font-weight: normal; column-rule: 1px solid #1e1a14; }
.newspaper .paper-foot { margin-top: 12px; padding-top: 6px; border-top: 2px solid #1e1a14; font-size: 13px; text-align: center; }

/* ---------- high score table ---------- */
.scores-table { margin: 10px auto 14px; border-collapse: collapse; font-size: 15px; text-align: left; }
.scores-table td { padding: 3px 10px; border-bottom: 2px dashed var(--panel-light); }
.scores-table b { color: var(--gold); }

/* ---------- Club Crokinole lobby ---------- */
#home { padding: 26px 20px 40px; }
/* old-TV scanlines over the whole lobby */
#home::after { content: ''; position: fixed; inset: 0; pointer-events: none; z-index: 5;
               background: repeating-linear-gradient(to bottom, rgba(0, 0, 0, 0.18) 0 2px, transparent 2px 4px);
               box-shadow: inset 0 0 120px rgba(0, 0, 0, 0.6); }
.title { display: flex; flex-direction: column; align-items: center; margin-bottom: 18px; }
#logo-club { width: min(220px, 40vw); height: auto; margin-bottom: -4px; }
#logo { width: min(620px, 90vw); height: auto; filter: drop-shadow(0 0 12px rgba(255, 90, 160, 0.6)); }
.tagline { margin-top: 10px; color: #9fe0ff; letter-spacing: 3px; animation: blink 1.2s steps(2) infinite;
           text-shadow: 2px 2px 0 #3a0a4a; }
#rejoin { display: none; align-items: center; gap: 14px; padding: 10px 18px; margin-bottom: 16px; }
.profile-top { align-items: flex-start; }
#account { display: flex; flex-direction: column; gap: 6px; flex: 1; }
#account input { font: inherit; font-size: 14px; color: var(--cream); background: var(--panel-dark);
                 border: 3px solid var(--edge); padding: 4px 6px; width: 100%; box-sizing: border-box; }
#account .who-line { font-size: 18px; display: flex; align-items: center; gap: 8px; }
.acct-buttons { display: flex; gap: 8px; }
.rating-chip { display: inline-block; background: #2a5aa0; color: #fff; border: 2px solid var(--edge); padding: 0 6px; font-size: 13px; }
.pbtn.small { font-size: 12px; padding: 4px 10px; }
.menu { width: min(560px, 92vw); gap: 8px; }
.menu-group { color: #ff7ac8; text-transform: uppercase; letter-spacing: 2px; font-size: 13px; margin-top: 4px;
              text-shadow: 2px 2px 0 var(--edge); }
.menu-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.menu-btn { padding: 8px 12px; }
.menu-btn.on { background: var(--panel-light); box-shadow: inset 0 0 0 3px var(--gold), 5px 5px 0 rgba(0, 0, 0, 0.45); }
.menu-btn b { font-size: 16px; }
.menu-btn .icon { width: 40px; height: 38px; }
#home-panel { margin-top: 22px; padding: 14px 22px 20px; width: min(860px, 92vw); box-sizing: border-box; }
#home-panel h2 { margin: 0; color: var(--gold); text-transform: uppercase; }
#home-panel h3 { color: var(--gold); text-transform: uppercase; font-size: 14px; margin: 16px 0 8px; }
#home-panel .pbtn { margin: 4px 6px 4px 0; }
.panel-top { display: flex; justify-content: space-between; align-items: center; border-bottom: 3px dashed var(--panel-light);
             padding-bottom: 8px; margin-bottom: 10px; }
.board-picker { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.board-pick { font: inherit; font-size: 11px; color: var(--cream); background: var(--panel-dark); border: 3px solid var(--edge);
              padding: 4px; display: flex; flex-direction: column; align-items: center; gap: 2px; width: 82px; cursor: pointer; }
.board-pick.on { box-shadow: inset 0 0 0 3px var(--gold); }
.board-pick canvas, .mini-board, .menu-btn canvas#icon-online, .menu-btn canvas#icon-tourney, .menu-btn canvas#icon-history { image-rendering: pixelated; }
.board-pick canvas { width: 48px; height: 48px; }
.mini-board { width: 64px; height: 64px; }
.friend-row, .club-row { display: flex; align-items: center; gap: 10px; padding: 8px 4px; border-bottom: 2px dashed var(--panel-light); }
.friend-row .spacer { flex: 1; }
.club-row { justify-content: space-between; }
.status-dot { width: 10px; height: 10px; background: #5a4a3e; border: 2px solid var(--edge); }
.status-dot.on { background: var(--green); }
.status-dot.busy { background: var(--gold); }
#home-panel input[type=range] { width: 100%; accent-color: var(--gold); }
.range-labels { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); }
.field { display: flex; align-items: center; gap: 10px; }
.field input { font: inherit; color: var(--cream); background: var(--panel-dark); border: 3px solid var(--edge); padding: 4px 8px; }
.history td.won { color: var(--green); }
.history td.lost { color: #ff8a6a; }
/* tournament bracket */
.bracket { display: flex; gap: 14px; overflow-x: auto; padding: 6px 0 12px; }
.bracket-round { display: flex; flex-direction: column; justify-content: space-around; gap: 10px; min-width: 150px; }
.bracket-title { color: #ff7ac8; text-transform: uppercase; font-size: 12px; text-align: center; }
.bracket-match { background: var(--panel-dark); border: 3px solid var(--edge); }
.bracket-match.champ { padding: 10px; text-align: center; color: var(--gold); font-size: 16px; }
.slot-name { display: flex; justify-content: space-between; gap: 6px; padding: 4px 8px; font-size: 13px; }
.slot-name + .slot-name { border-top: 2px solid var(--edge); }
.slot-name span { color: var(--muted); font-size: 11px; }
.slot-name.you { color: #9fe0ff; }
.slot-name.won { color: var(--gold); }
.slot-name.lost { opacity: 0.45; text-decoration: line-through; }
.slot-name.tbd { color: var(--muted); }
/* someone challenged you */
#challenge { display: none; position: fixed; top: 20px; left: 50%; transform: translateX(-50%); z-index: 6;
             padding: 14px 20px; text-align: center; line-height: 1.8; }
/* online match status */
#net-status { padding: 0 14px; font-size: 13px; }
#net-status .warn { color: #ffb06a; }
#rating-note { text-align: center; color: var(--gold); font-size: 15px; }
/* shop tabs */
.tabs { display: flex; gap: 6px; }

/* ======================================================================
   The cover (home screen): soft, painted and friendly, over the sunset art
   ====================================================================== */
#home { padding: 16px 20px 40px; font-family: "Trebuchet MS", "Segoe UI", system-ui, sans-serif; }
#home::after { content: none; }                       /* no more TV scanlines */
.soft-box { background: rgba(255, 250, 240, 0.9); color: #4a3424; border-radius: 18px;
            box-shadow: 0 10px 30px rgba(60, 30, 60, 0.25); }
.topbar { width: 100%; display: flex; justify-content: space-between; align-items: center; }
.top-right { display: flex; gap: 10px; }
.top-btn { font: inherit; font-weight: bold; font-size: 15px; color: #4a3424; background: rgba(255, 250, 240, 0.85);
           border: none; border-radius: 999px; padding: 8px 16px; cursor: pointer; display: flex; align-items: center; gap: 8px;
           box-shadow: 0 4px 12px rgba(60, 30, 60, 0.2); transition: transform 0.15s; }
.top-btn:hover { transform: translateY(-2px); background: #fff; }
.top-btn canvas { width: 22px; height: 28px; image-rendering: pixelated; }
#top-shop { width: 26px; height: 26px; image-rendering: auto; }
.hall-options { position: fixed; top: 14px; right: 16px; z-index: 2; }
#account-box { position: fixed; top: 64px; right: 20px; z-index: 6; width: 320px; padding: 16px 18px; }
#account-box #home-stats div { border-top-color: rgba(120, 80, 50, 0.2); }
#account-box #home-stats span { color: #8a6a50; }
#account-box #home-stats b { color: #c0412b; }
#account-box input { background: #fff; color: #4a3424; border: 2px solid #e2c9a8; border-radius: 8px; }
#account-box .note { color: #8a6a50; }

.title { margin: 18px 0 26px; text-align: center; }
.title-club { font-family: Georgia, "Times New Roman", serif; font-style: italic; font-size: clamp(28px, 4vw, 44px);
              color: #fff8ee; text-shadow: 0 3px 0 #c06a4a, 0 6px 16px rgba(80, 30, 60, 0.4); margin-bottom: -10px; }
.title-main { font-family: "Trebuchet MS", "Segoe UI", sans-serif; font-weight: 900; font-size: clamp(54px, 9vw, 110px);
              letter-spacing: 2px; text-transform: uppercase; line-height: 1;
              background: linear-gradient(#ffd27a, #f4874a 60%, #d8506a); -webkit-background-clip: text; background-clip: text;
              color: transparent; -webkit-text-stroke: 3px #fff8ee; filter: drop-shadow(0 6px 10px rgba(80, 30, 60, 0.45));
              animation: title-float 4s ease-in-out infinite; }
@keyframes title-float { 50% { transform: translateY(-6px); } }
#rejoin { display: none; align-items: center; gap: 14px; padding: 10px 18px; margin-bottom: 16px; }

.big-cards { display: flex; gap: 26px; flex-wrap: wrap; justify-content: center; }
.big-card, .sub-card { font: inherit; color: #4a3424; background: rgba(255, 250, 240, 0.92); border: none; border-radius: 24px;
                       cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center;
                       box-shadow: 0 12px 30px rgba(60, 30, 60, 0.28); transition: transform 0.2s, box-shadow 0.2s; }
.big-card { width: 260px; padding: 24px 20px 26px; animation: card-in 0.6s ease-out both; }
.big-card:nth-child(2) { animation-delay: 0.1s; }
.big-card:nth-child(3) { animation-delay: 0.2s; }
@keyframes card-in { from { opacity: 0; transform: translateY(30px); } }
.big-card:hover, .sub-card:hover { transform: translateY(-8px) rotate(-1deg); box-shadow: 0 20px 40px rgba(60, 30, 60, 0.35); background: #fff; }
.big-card .art { width: 192px; height: 144px; image-rendering: pixelated; }
.big-card b { font-size: 26px; color: #c0412b; }
.big-card small, .sub-card small { font-size: 14px; color: #8a6a50; }
#home-sub { display: flex; flex-direction: column; align-items: center; gap: 16px; width: 100%; }
#home-sub[hidden] { display: none; }
.sub-cards { display: flex; gap: 18px; flex-wrap: wrap; justify-content: center; }
.sub-card { width: 190px; padding: 18px 14px; }
.sub-card .art { width: 96px; height: 90px; image-rendering: pixelated; }
.sub-card b { font-size: 20px; color: #c0412b; }
.back-btn { font: inherit; font-weight: bold; color: #4a3424; background: rgba(255, 250, 240, 0.85); border: none; border-radius: 999px;
            padding: 6px 16px; cursor: pointer; box-shadow: 0 4px 12px rgba(60, 30, 60, 0.2); }
#home-panel { margin-top: 10px; padding: 16px 24px 22px; width: min(880px, 94vw); box-sizing: border-box; }
#home-panel h2 { color: #c0412b; text-transform: none; font-size: 26px; }
#home-panel h3 { color: #c0412b; }
#home-panel .note, #home-panel .range-labels { color: #8a6a50; }
#home-panel .panel-top { justify-content: flex-start; gap: 14px; border-bottom-color: rgba(120, 80, 50, 0.25); }
#home-panel .scores-table td { border-bottom-color: rgba(120, 80, 50, 0.2); }
#home-panel .friend-row, #home-panel .club-row { border-bottom-color: rgba(120, 80, 50, 0.2); }
#home-panel input:not([type=range]), #home-panel .field input { background: #fff; color: #4a3424; border: 2px solid #e2c9a8; border-radius: 8px; }
#home-panel .board-pick { background: #fff; color: #4a3424; border: 2px solid #e2c9a8; border-radius: 10px; }
#home-panel .bracket-match { background: #fff; border: 2px solid #e2c9a8; }
#home-panel .slot-name.won { color: #c0412b; }
#home-panel .slot-name.you { color: #2a5aa0; }
.club-row img { width: 90px; flex: none; }
img.club-logo { display: block; width: 220px; margin: 0 auto 10px; }

/* ---------- options ---------- */
#options { display: none; position: fixed; inset: 40px; max-width: 860px; margin: 0 auto; overflow-y: auto; z-index: 7; padding: 10px 26px 26px; }
#options h2 { margin: 0; color: var(--gold); font-size: 26px; text-transform: uppercase; }
#options h3 { color: var(--gold); text-transform: uppercase; font-size: 15px; margin: 18px 0 8px; }
.options-body p { font-weight: normal; line-height: 1.6; }
.options-body b { color: var(--gold); }
table.keys { border-collapse: collapse; font-weight: normal; }
table.keys td { padding: 6px 12px 6px 0; border-bottom: 2px dashed var(--panel-light); }
kbd { display: inline-block; min-width: 18px; text-align: center; padding: 1px 6px; margin-right: 3px; background: var(--panel-dark);
      border: 2px solid var(--edge); box-shadow: 0 2px 0 var(--edge); font-family: var(--font); font-weight: bold; }
.pips .extra { font-size: 11px; color: var(--gold); }
.pip { width: 8px; height: 8px; }

/* ---------- the top 10 introduction ---------- */
#intro { display: none; position: fixed; inset: 0; z-index: 8; align-items: center; justify-content: center; gap: 4vw;
         background: radial-gradient(circle, rgba(60, 10, 20, 0.85), rgba(10, 4, 8, 0.97)); cursor: pointer; overflow: hidden; }
#intro.play { animation: intro-shake 0.4s 1.1s; }
@keyframes intro-shake { 25% { transform: translate(-8px, 4px); } 50% { transform: translate(6px, -6px); } 75% { transform: translate(-4px, 2px); } }
.intro-title { position: absolute; top: 12%; left: 0; right: 0; text-align: center; font-size: clamp(28px, 5vw, 60px); color: var(--gold);
               text-transform: uppercase; letter-spacing: 6px; text-shadow: 4px 4px 0 #6a1010; }
#intro.play .intro-title { animation: intro-title 0.8s ease-out both; }
@keyframes intro-title { from { opacity: 0; letter-spacing: 40px; } }
.intro-side { display: flex; flex-direction: column; align-items: center; gap: 8px; width: 30vw; }
.intro-side canvas { width: min(240px, 22vw); height: auto; aspect-ratio: 24 / 30; image-rendering: pixelated;
                     filter: drop-shadow(0 0 20px rgba(255, 200, 120, 0.4)); }
.intro-name { font-size: clamp(20px, 3vw, 36px); color: #fff; text-transform: uppercase; text-shadow: 3px 3px 0 #000; text-align: center; }
.intro-sub { color: var(--gold); font-size: 15px; }
#intro.play .intro-side.left { animation: intro-left 0.7s cubic-bezier(.2, 1.4, .5, 1) 0.2s both; }
#intro.play .intro-side.right { animation: intro-right 0.7s cubic-bezier(.2, 1.4, .5, 1) 0.5s both; }
@keyframes intro-left { from { transform: translateX(-80vw); } }
@keyframes intro-right { from { transform: translateX(80vw); } }
.intro-vs { font-size: clamp(60px, 10vw, 140px); color: #ff4a3a; text-shadow: 6px 6px 0 #4a0a0a, 0 0 40px rgba(255, 80, 40, 0.8); }
#intro.play .intro-vs { animation: intro-vs 0.45s cubic-bezier(.3, 1.8, .5, 1) 1s both; }
@keyframes intro-vs { from { transform: scale(5) rotate(-20deg); opacity: 0; } }
.intro-skip { position: absolute; bottom: 8%; color: var(--muted); font-size: 14px; animation: blink 1s steps(2) infinite; }

/* ---------- doubles setup ---------- */
#doubles-setup { display: none; position: fixed; inset: 50px; max-width: 760px; margin: 0 auto; overflow-y: auto; z-index: 7; padding: 10px 26px 26px; }
#doubles-setup h2 { margin: 0; color: var(--gold); font-size: 26px; text-transform: uppercase; }
#doubles-setup h3 { color: var(--gold); text-transform: uppercase; font-size: 15px; margin: 18px 0 8px; }
.seat-row { display: flex; flex-direction: column; gap: 6px; padding: 8px 0; border-bottom: 2px dashed var(--panel-light); }
.seat-row input[type=text], .seat-row input:not([type]) { font: inherit; color: var(--cream); background: var(--panel-dark); border: 3px solid var(--edge); padding: 3px 6px; }
.seat-row input[type=range] { width: 260px; accent-color: var(--gold); }
#doubles-setup > .pbtn.gold { margin-top: 18px; font-size: 18px; }
.sub-card #icon-doubles { width: 128px; height: 88px; }

/* ---------- the pixel fight-game intro ---------- */
#intro { display: none; position: fixed; inset: 0; z-index: 8; background: #000; cursor: pointer; }
#intro-canvas { width: 100vw; height: 100vh; object-fit: contain; image-rendering: pixelated; }

/* ---------- wax meter (top-left corner of the match) ---------- */
#wax-meter { position: fixed; top: 12px; left: 12px; z-index: 1; display: flex; align-items: center; gap: 10px; padding: 8px 12px; }
#wax-can { width: 36px; height: 36px; image-rendering: pixelated; }
.wax-top { font-size: 13px; color: var(--muted); }
.wax-top b { color: #9fe0ff; font-size: 16px; }
.wax-bar { width: 80px; height: 8px; background: var(--panel-dark); border: 2px solid var(--edge); margin: 3px 0; }
#wax-fill { height: 100%; background: linear-gradient(90deg, #c8a060, #fff6c8, #9fe0ff); }
.wax-word { font-size: 11px; color: var(--cream); }
.wax-tag { font-size: 10px; color: #6a8aa8; }
.pet-preview { width: 72px; height: 72px; image-rendering: pixelated; }

/* ======================================================================
   Vibrant block style: everything in one bright, blocky look.
   ====================================================================== */
:root {
  --bg: #1b2340;
  --panel: #2c3a6b;
  --panel-dark: #222d55;
  --panel-light: #4256a0;
  --edge: #0d1226;
  --wood: #4c8f3c;          /* buttons: grass green */
  --cream: #f4f6ff;
  --muted: #b4c0f0;
  --gold: #ffd34d;
  --red: #ff6b6b;
  --green: #7ed957;
}
.pixel-box, .soft-box { background: var(--panel); color: var(--cream); border: 3px solid var(--edge); border-radius: 0;
  box-shadow: inset 3px 3px 0 rgba(255, 255, 255, 0.16), inset -3px -3px 0 rgba(0, 0, 0, 0.35), 6px 6px 0 rgba(0, 0, 0, 0.4); }
.pbtn { box-shadow: inset 3px 3px 0 rgba(255, 255, 255, 0.3), inset -3px -3px 0 rgba(0, 0, 0, 0.35), 3px 3px 0 var(--edge); }
.pbtn.gold { background: var(--gold); color: #2a2040; }
.card { background: var(--panel-dark); }
.panel-head { background: var(--panel-dark); }
.panel-head .tab { color: var(--gold); }
.scorebox { background: var(--panel-dark); box-shadow: inset 2px 2px 0 rgba(255, 255, 255, 0.1); }
.scorebox .big { color: #ffffff; }
#shots li.shot:nth-child(even) { background: #33447e; }
#shots li { font-size: 13px; }
#shots .text { color: #ffffff; }
#shots .num { color: #9fb0ff; }
#shots .twenty .text { color: var(--gold); }
#shots .round-line { color: #7ed957; border-bottom-color: #4256a0; }
#shots .up { color: #7ed957; }
#shots .down { color: #ff8a8a; }
.howto, .panel-foot { border-top-color: var(--edge); }
#eval-label { color: #fff; }
.rack { background: linear-gradient(#5a6fb8, #2c3a6b); }

/* chat */
#chat { border-top: 3px solid var(--edge); padding: 8px 12px; background: var(--panel-dark); }
#chat-log { height: 110px; overflow-y: auto; font-size: 13px; line-height: 1.45; font-weight: normal; }
.chat-line b { color: #9fe0ff; }
.chat-line.mine b { color: var(--green); }
.chat-line.system { color: #ffb06a; font-style: italic; }
.chat-quick { display: flex; flex-wrap: wrap; gap: 4px; margin: 6px 0; }
.chat-quick button, #chat-send { font: inherit; font-size: 11px; color: var(--cream); background: var(--panel-light); border: 2px solid var(--edge);
  padding: 2px 6px; cursor: pointer; box-shadow: inset 2px 2px 0 rgba(255, 255, 255, 0.15); }
.chat-row { display: flex; gap: 6px; }
#chat-input { flex: 1; font: inherit; font-size: 13px; color: var(--cream); background: #1b2340; border: 2px solid var(--edge); padding: 4px 6px; }

/* rank badges */
.rank-chip { display: inline-block; font-size: 12px; font-weight: bold; color: #1b2340; background: var(--rank, #b8b8c8);
  border: 2px solid var(--edge); padding: 0 6px; box-shadow: inset 2px 2px 0 rgba(255, 255, 255, 0.45), inset -2px -2px 0 rgba(0, 0, 0, 0.25); }
.placement-pips { display: flex; gap: 8px; margin: 6px 0 10px; }
.placement-pips span { padding: 6px 10px; background: var(--panel-dark); border: 3px solid var(--edge); font-size: 13px; }
.placement-pips span.done { background: var(--green); color: #1b2340; }
.rank-list { display: flex; flex-wrap: wrap; gap: 6px; }

/* ======================================================================
   The cover: a cozy blocky world that changes with the seasons
   ====================================================================== */
#home { font-family: var(--font); font-weight: bold; }
#title-canvas { width: min(760px, 92vw); height: auto; image-rendering: pixelated; margin: 8px 0 20px;
  filter: drop-shadow(0 6px 0 rgba(0, 0, 0, 0.35)); animation: title-float 4s steps(4) infinite; }
.top-btn, .back-btn { font-family: var(--font); color: #fff; background: #6e7488; border: 3px solid #1a1a22; border-radius: 0;
  box-shadow: inset 3px 3px 0 rgba(255, 255, 255, 0.3), inset -3px -3px 0 rgba(0, 0, 0, 0.35); text-shadow: 2px 2px 0 #2a2a33; }
.top-btn:hover, .back-btn:hover { background: #7f8bc8; transform: none; }
.big-card, .sub-card { font-family: var(--font); border-radius: 0; border: 4px solid #1a1a22; color: #fff; text-shadow: 2px 2px 0 rgba(0, 0, 0, 0.55);
  box-shadow: inset 4px 4px 0 rgba(255, 255, 255, 0.18), inset -4px -4px 0 rgba(0, 0, 0, 0.3), 8px 8px 0 rgba(0, 0, 0, 0.35); }
/* the big cards look like grass blocks: a strip of grass over dirt */
.big-card { background:
    linear-gradient(#6cc04a 0 22px, #4c9a36 22px 28px, transparent 28px),
    repeating-linear-gradient(90deg, rgba(0, 0, 0, 0.08) 0 12px, transparent 12px 24px),
    #8a5a32; }
.big-card:hover { background:
    linear-gradient(#7fd85a 0 22px, #5aae40 22px 28px, transparent 28px),
    repeating-linear-gradient(90deg, rgba(0, 0, 0, 0.08) 0 12px, transparent 12px 24px),
    #9c6a3e; transform: translateY(-6px); }
.big-card b, .sub-card b { color: #fff6c8; }
.big-card small, .sub-card small { color: #ffe8c8; }
/* the smaller cards look like stone blocks */
.sub-card { background: repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.05) 0 8px, transparent 8px 16px), #7a7f8e; }
.sub-card:hover { background: repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.05) 0 8px, transparent 8px 16px), #8a92b0; transform: translateY(-6px); }
#home-panel { color: var(--cream); }
#home-panel h2, #home-panel h3 { color: var(--gold); }
#home-panel .note, #home-panel .range-labels { color: var(--muted); }
#home-panel input:not([type=range]), #home-panel .field input, #account-box input { background: var(--panel-dark); color: var(--cream); border: 2px solid var(--edge); border-radius: 0; }
#home-panel .board-pick { background: var(--panel-dark); color: var(--cream); border: 3px solid var(--edge); border-radius: 0; }
#home-panel .bracket-match { background: var(--panel-dark); border: 3px solid var(--edge); }
#home-panel .slot-name.won { color: var(--gold); }
#home-panel .slot-name.you { color: #9fe0ff; }
#home-panel .scores-table td, #home-panel .friend-row, #home-panel .club-row { border-bottom-color: var(--panel-light); }
#account-box #home-stats span { color: var(--muted); }
#account-box #home-stats b { color: var(--gold); }
#account-box .note { color: var(--muted); }
.season-tag { position: fixed; right: 16px; bottom: 12px; color: #fff; text-shadow: 2px 2px 0 #000; font-size: 14px; letter-spacing: 2px; }

/* ---------- CROKINOLE! popup ---------- */
#croki { position: fixed; top: 90px; left: 16px; z-index: 6; padding: 12px 20px; background: #1b2340; text-align: center;
  border: 4px solid transparent; background-clip: padding-box; opacity: 0; transform: scale(0.3) rotate(-12deg); pointer-events: none; }
#croki::before { content: ''; position: absolute; inset: -8px; z-index: -1;
  background: repeating-linear-gradient(45deg, #ffd34d 0 8px, #ff6b6b 8px 16px, #6ec6ff 16px 24px, #7ed957 24px 32px);
  animation: croki-border 0.6s linear infinite; }
@keyframes croki-border { to { background-position: 45px 0; } }
#croki b { display: block; font-size: 30px; color: #ffd34d; letter-spacing: 3px; text-shadow: 3px 3px 0 #a3202a, -2px -2px 0 #000; }
#croki span { font-size: 13px; color: #fff; }
#croki.show { animation: croki-pop 2.6s cubic-bezier(.2, 1.6, .5, 1) forwards; }
@keyframes croki-pop {
  0% { opacity: 0; transform: scale(0.3) rotate(-12deg); }
  12% { opacity: 1; transform: scale(1.15) rotate(3deg); }
  20% { transform: scale(1) rotate(-2deg); }
  85% { opacity: 1; transform: scale(1) rotate(-2deg); }
  100% { opacity: 0; transform: scale(0.8) rotate(-2deg) translateY(-20px); }
}

/* ---------- Clutch Shots ---------- */
.clutch-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.clutch-tile { font: inherit; color: var(--cream); background: var(--panel-light); border: 3px solid var(--edge); padding: 10px; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center;
  box-shadow: inset 3px 3px 0 rgba(255, 255, 255, 0.18), inset -3px -3px 0 rgba(0, 0, 0, 0.3); }
.clutch-tile:hover:not(:disabled) { background: #5468b8; }
.clutch-tile:disabled { opacity: 0.5; cursor: default; }
.clutch-tile.done { background: #3f8f4f; }
.clutch-num { font-size: 26px; color: var(--gold); }
.clutch-tile small { color: var(--muted); font-size: 12px; }

/* Anything switched to hidden stays hidden, even if another style says to show it. */
[hidden] { display: none !important; }

/* ======================================================================
   The cover: the fantasy title, and park-sign option cards
   ====================================================================== */
#title-canvas { width: min(900px, 95vw); height: auto; image-rendering: pixelated; margin: 4px 0 18px;
  filter: drop-shadow(0 8px 0 rgba(20, 6, 30, 0.35)); animation: title-float 4s ease-in-out infinite; }

/* the big cards are dark wooden park signs, with a leafy vine on top and two posts underneath */
.big-card { position: relative; margin-bottom: 26px; border-radius: 10px; border: 4px solid #3a2010;
  background: repeating-linear-gradient(0deg, #6e4423 0 13px, #5e391c 13px 15px), #6e4423;
  box-shadow: inset 0 0 0 4px #6e4423, inset 0 0 0 7px #f3dfb0, 0 10px 0 rgba(30, 15, 5, 0.35); color: #fff1c8;
  text-shadow: 2px 2px 0 #2a1408; transform-origin: top center; animation: card-in 0.6s ease-out both; }
.big-card::before { content: ''; position: absolute; left: -10px; right: -10px; top: -12px; height: 18px; pointer-events: none;
  background: radial-gradient(circle at 8px 9px, #4caf50 7px, transparent 8px) 0 0 / 22px 18px repeat-x,
              radial-gradient(circle at 15px 6px, #7ed957 5px, transparent 6px) 4px 0 / 26px 18px repeat-x; }
.big-card::after { content: ''; position: absolute; bottom: -26px; left: 22%; right: 22%; height: 24px; z-index: -1; pointer-events: none;
  background: linear-gradient(90deg, #4a2a14 0 10px, transparent 10px calc(100% - 10px), #4a2a14 calc(100% - 10px)); }
.big-card:hover { background: repeating-linear-gradient(0deg, #7c4e2a 0 13px, #6a4122 13px 15px), #7c4e2a;
  transform: rotate(-1.5deg) translateY(-3px); }
.big-card b { color: #fff1c8; font-size: 26px; letter-spacing: 1px; }
.big-card small { color: #f0d8a8; }

/* the smaller cards are green park trail signs with a cream border */
.sub-card { border-radius: 8px; border: 4px solid #1e4a2e; color: #fff6dc; text-shadow: 2px 2px 0 #12301c;
  background: linear-gradient(#2f7a4a, #276b40);
  box-shadow: inset 0 0 0 3px #2f7a4a, inset 0 0 0 6px #f3dfb0, 0 8px 0 rgba(10, 30, 15, 0.35); }
.sub-card:hover { background: linear-gradient(#3a8f58, #2f7a4a); transform: translateY(-4px) rotate(1deg); }
.sub-card b { color: #fff6dc; }
.sub-card small { color: #d8ecc8; }

/* top buttons and Back: little wooden signs too */
.top-btn, .back-btn { background: #6e4423; border: 3px solid #3a2010; border-radius: 8px; color: #fff1c8;
  box-shadow: inset 0 0 0 2px #f3dfb0, 0 4px 0 rgba(30, 15, 5, 0.35); text-shadow: 2px 2px 0 #2a1408; }
.top-btn:hover, .back-btn:hover { background: #7c4e2a; }

/* ---------- CROKINOLE! in a spiky comic-book starburst ---------- */
#croki { position: fixed; top: 76px; left: 10px; z-index: 6; width: 300px; height: 210px; padding: 0; background: none; border: none;
  opacity: 0; transform: scale(0.2) rotate(-25deg); pointer-events: none; }
#croki::before { content: none; }
#croki .burst-back, #croki .burst { position: absolute; inset: 0; clip-path: polygon(50.0% 9.0%, 56.3% 20.9%, 65.7% 14.6%, 68.0% 24.4%, 84.1% 16.7%, 77.6% 31.0%, 91.6% 30.3%, 83.8% 39.9%, 103.2% 42.3%, 86.0% 50.0%, 96.3% 56.7%, 83.8% 60.1%, 93.3% 70.5%, 77.6% 69.0%, 79.6% 78.9%, 68.0% 75.6%, 68.1% 90.8%, 56.3% 79.1%, 50.0% 89.4%, 43.7% 79.1%, 31.5% 91.6%, 32.0% 75.6%, 19.8% 79.5%, 22.4% 69.0%, 6.7% 70.5%, 16.2% 60.1%, 4.7% 56.6%, 14.0% 50.0%, -2.2% 42.5%, 16.2% 39.9%, 8.4% 30.3%, 22.4% 31.0%, 15.3% 16.1%, 32.0% 24.4%, 33.9% 13.8%, 43.7% 20.9%); }
#croki .burst-back { background: #1a0a20; transform: scale(1.08); }
#croki .burst-glow { position: absolute; inset: 0; clip-path: polygon(50.0% 9.0%, 56.3% 20.9%, 65.7% 14.6%, 68.0% 24.4%, 84.1% 16.7%, 77.6% 31.0%, 91.6% 30.3%, 83.8% 39.9%, 103.2% 42.3%, 86.0% 50.0%, 96.3% 56.7%, 83.8% 60.1%, 93.3% 70.5%, 77.6% 69.0%, 79.6% 78.9%, 68.0% 75.6%, 68.1% 90.8%, 56.3% 79.1%, 50.0% 89.4%, 43.7% 79.1%, 31.5% 91.6%, 32.0% 75.6%, 19.8% 79.5%, 22.4% 69.0%, 6.7% 70.5%, 16.2% 60.1%, 4.7% 56.6%, 14.0% 50.0%, -2.2% 42.5%, 16.2% 39.9%, 8.4% 30.3%, 22.4% 31.0%, 15.3% 16.1%, 32.0% 24.4%, 33.9% 13.8%, 43.7% 20.9%); transform: scale(1.18);
  background: conic-gradient(#ff6b6b, #ffd34d, #7ed957, #6ec6ff, #c86aff, #ff6b6b); animation: croki-spin 1.2s linear infinite; }
#croki .burst { background: radial-gradient(circle, #fff6b0 0%, #ffd34d 45%, #ff9f2a 100%);
  display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
#croki b { display: block; font-size: 30px; color: #e8302a; letter-spacing: 2px;
  text-shadow: 3px 3px 0 #1a0a20, -2px -2px 0 #fff, 2px -2px 0 #fff, -2px 2px 0 #fff; transform: rotate(-6deg); }
#croki span { font-size: 13px; color: #3a1a10; margin-top: 4px; }
@keyframes croki-spin { to { filter: hue-rotate(360deg); } }

/* ---------- money and points: a wooden sign under the Options button ---------- */
.hall-options { left: 16px; right: auto; }
#wallet { top: 62px; left: 16px; padding: 0; background: none; border: none; line-height: normal; text-shadow: none; }
.top-left { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.wallet-sign { font-family: var(--font); font-weight: bold; color: #fff1c8; background: #6e4423; border: 3px solid #3a2010; border-radius: 8px;
  box-shadow: inset 0 0 0 2px #f3dfb0, 0 4px 0 rgba(30, 15, 5, 0.35); text-shadow: 2px 2px 0 #2a1408; padding: 7px 14px; }
#wallet.wallet-sign { padding: 7px 14px; background: #6e4423; border: 3px solid #3a2010; }
.wallet-row { display: flex; align-items: center; gap: 6px; font-size: 16px; }
.wallet-row b { color: #ffd34d; }
.wallet-sep { color: #b08a5a; margin: 0 4px; }
.wallet-sub { font-size: 11px; color: #f0d8a8; margin-top: 2px; }
.wallet-sub b { color: #ffd34d; }
.coin { width: 12px; height: 12px; background: #ffd34d; border: 2px solid #8a6a10; border-radius: 50%; box-shadow: inset -2px -2px 0 #e0a82a; }
.star { width: 12px; height: 12px; background: #9fe0ff;
  clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%); }

/* rank badges keep their own crisp text (no doubled shadow from the button around them) */
.rank-chip, .top-btn .rank-chip { text-shadow: none; }

/* ---------- your club ---------- */
.club-row.my-club { background: rgba(126, 217, 87, 0.12); border: 3px solid #7ed957; padding: 8px; }
.club-buttons { display: flex; flex-direction: column; gap: 4px; }
.club-members { margin: 4px 0 14px 20px; }
#account select, #options select { font: inherit; font-size: 13px; color: var(--cream); background: var(--panel-dark); border: 2px solid var(--edge); padding: 3px; }
.scores-table tr.me td { color: var(--gold); }

/* ======================================================================
   The newspaper: big, detailed, and spinning in smoothly
   ====================================================================== */
#banner.newspaper { width: min(900px, 94vw); max-height: 94vh; overflow: hidden; box-sizing: border-box;
  padding: 18px 28px 16px; text-align: left; line-height: 1.4; color: #1e1a14; border: 3px solid #1e1a14; border-radius: 2px;
  background:
    linear-gradient(90deg, transparent 49.6%, rgba(60, 40, 20, 0.12) 50%, transparent 50.4%),          /* the fold */
    radial-gradient(ellipse at 20% 10%, rgba(255, 255, 255, 0.5), transparent 60%),
    radial-gradient(ellipse at 90% 100%, rgba(150, 110, 60, 0.18), transparent 55%),
    repeating-linear-gradient(0deg, rgba(0, 0, 0, 0.012) 0 2px, transparent 2px 4px),
    #efe6d0;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.6), inset 0 0 40px rgba(120, 90, 40, 0.25);
  transform: translate(-50%, -50%) rotate(-1.5deg);
  animation: paper-arrive 1.7s cubic-bezier(.15, .75, .3, 1) both; }
@keyframes paper-arrive {
  0%   { transform: translate(-50%, -50%) rotate(-900deg) scale(0.05); opacity: 0; }
  12%  { opacity: 1; }
  72%  { transform: translate(-50%, -50%) rotate(5deg) scale(1.05); }
  86%  { transform: translate(-50%, -50%) rotate(-3deg) scale(0.98); }
  100% { transform: translate(-50%, -50%) rotate(-1.5deg) scale(1); }
}
.newspaper .paper-topline { display: flex; justify-content: space-between; font-size: 11px; letter-spacing: 1px; color: #5a4a3a; }
.newspaper .masthead { font-family: Georgia, 'Times New Roman', serif; font-size: clamp(34px, 5vw, 58px); font-weight: 900;
  text-align: center; letter-spacing: 1px; border-top: 3px double #1e1a14; border-bottom: 3px double #1e1a14; margin: 4px 0; padding: 2px 0; text-transform: none; }
.newspaper .dateline { font-size: 12px; border-bottom: 2px solid #1e1a14; }
.newspaper .kicker { font-size: 14px; letter-spacing: 2px; margin-top: 10px; }
.newspaper .headline { font-family: Georgia, 'Times New Roman', serif; font-size: clamp(30px, 4.6vw, 54px); font-weight: 900; line-height: 1.02; margin: 2px 0 4px; }
.newspaper .deck { font-family: Georgia, serif; font-style: italic; font-size: 17px; color: #4a3a2a; margin-bottom: 10px; padding-bottom: 8px; border-bottom: 1px solid #1e1a14; }
.newspaper .paper-cols { display: grid; grid-template-columns: 2.2fr 1fr; gap: 18px; }
.newspaper .col-main { border-right: 1px solid #1e1a14; padding-right: 16px; }
.newspaper figure { margin: 0 0 8px; }
.newspaper #paper-photo { width: 100%; height: auto; border: 2px solid #1e1a14; filter: grayscale(1) contrast(1.25) sepia(0.3); image-rendering: pixelated; }
.newspaper figcaption { font-size: 11px; font-style: italic; color: #5a4a3a; }
.newspaper p { font-family: Georgia, serif; font-size: 14px; margin: 0 0 8px; text-align: justify; }
.newspaper p.lead::first-letter { float: left; font-size: 44px; line-height: 0.9; font-weight: 900; margin: 2px 6px 0 0; }
.newspaper .paper-box { border: 2px solid #1e1a14; padding: 8px 10px; margin-bottom: 10px; font-size: 13px; }
.newspaper .paper-box h4 { margin: 0 0 6px; font-family: Georgia, serif; font-size: 15px; text-transform: uppercase; border-bottom: 1px solid #1e1a14; }
.newspaper .paper-box div { display: flex; justify-content: space-between; padding: 2px 0; border-bottom: 1px dotted #8a7a62; }
.newspaper .paper-box b { color: #a3202a; }
.newspaper .weather { font-family: Georgia, serif; }
.newspaper .paper-ad { border: 3px dashed #a3202a; padding: 8px; font-size: 12px; text-align: center; color: #a3202a; font-weight: bold; }
.newspaper .paper-foot { margin-top: 8px; font-size: 14px; }

/* the newspaper, pixel style: pixel lettering, hard square edges and shadows, and dithered paper */
#banner.newspaper { font-family: "Courier New", monospace; border: 4px solid #1e1a14; border-radius: 0;
  box-shadow: 12px 12px 0 rgba(0, 0, 0, 0.55), inset 0 0 0 4px #efe6d0, inset 0 0 0 6px #1e1a14;
  background:
    repeating-conic-gradient(rgba(60, 40, 20, 0.05) 0 25%, transparent 0 50%) 0 0 / 4px 4px,
    linear-gradient(90deg, transparent 49.5%, rgba(60, 40, 20, 0.14) 49.5% 50.5%, transparent 50.5%),
    #efe6d0; }
.newspaper .paper-pixel { display: block; margin: 6px auto; height: auto; image-rendering: pixelated; max-width: 100%; }
#paper-masthead { padding: 4px 0; border-top: 4px solid #1e1a14; border-bottom: 4px solid #1e1a14; }
.newspaper .deck, .newspaper p, .newspaper .paper-box h4, .newspaper .weather { font-family: "Courier New", monospace; }
.newspaper p { font-size: 13px; text-align: left; }
.newspaper p.lead::first-letter { font-family: "Courier New", monospace; background: #1e1a14; color: #efe6d0; padding: 0 4px; margin-right: 6px; }
.newspaper .paper-box { border: 3px solid #1e1a14; box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.25); }
.newspaper .paper-box h4 { border-bottom: 3px solid #1e1a14; }
.newspaper .paper-box div { border-bottom: 2px dashed #8a7a62; }
.newspaper .col-main { border-right: 3px solid #1e1a14; }
.newspaper .deck { border-bottom: 3px solid #1e1a14; }
.newspaper .dateline { border-bottom: 3px solid #1e1a14; }
.newspaper #paper-photo { border: 4px solid #1e1a14; box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.25); }

/* ======================================================================
   The membership office (sign up, log in, your membership card)
   ====================================================================== */
.account-btn { margin-top: 30px; font-family: var(--font); font-weight: bold; font-size: 20px; color: #2a1408; cursor: pointer;
  background: linear-gradient(#ffe38a, #ffc23a); border: 4px solid #3a2010; border-radius: 10px; padding: 12px 30px;
  display: flex; align-items: center; gap: 10px; box-shadow: inset 0 0 0 3px #fff3c0, 0 6px 0 rgba(30, 15, 5, 0.4);
  animation: account-glow 2s ease-in-out infinite; }
.account-btn:hover { transform: translateY(-3px); }
.account-btn small { font-size: 12px; color: #6a4424; }
.account-btn canvas { width: 28px; height: 28px; image-rendering: pixelated; border: 2px solid #3a2010; }
@keyframes account-glow { 50% { box-shadow: inset 0 0 0 3px #fff3c0, 0 6px 0 rgba(30, 15, 5, 0.4), 0 0 24px rgba(255, 220, 120, 0.8); } }
#account-page { display: none; position: fixed; inset: 0; z-index: 9; align-items: center; justify-content: center;
  background: rgba(10, 14, 30, 0.75); font-family: var(--font); }
.acct-wrap { display: flex; width: min(1000px, 96vw); max-height: 94vh; background: var(--panel); border: 4px solid var(--edge);
  box-shadow: inset 4px 4px 0 rgba(255, 255, 255, 0.15), inset -4px -4px 0 rgba(0, 0, 0, 0.35), 12px 12px 0 rgba(0, 0, 0, 0.45); }
.acct-art { width: 34%; min-width: 220px; background: #1b2340; border-right: 4px solid var(--edge); display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 16px; }
#acct-scene { width: 100%; height: auto; image-rendering: pixelated; border: 4px solid var(--edge); }
.acct-welcome { margin-top: 12px; font-size: 18px; color: var(--gold); text-align: center; text-shadow: 2px 2px 0 #000; }
.acct-main { position: relative; flex: 1; overflow-y: auto; padding: 18px 26px 24px; color: var(--cream); }
.acct-main h2 { margin: 4px 0 6px; color: var(--gold); text-transform: uppercase; }
.acct-close { position: absolute; top: 8px; right: 12px; font: inherit; font-size: 26px; color: var(--cream); background: none; border: none; cursor: pointer; }
.acct-tabs { display: flex; gap: 6px; margin-bottom: 10px; }
.acct-tabs button { font: inherit; font-size: 15px; padding: 6px 18px; color: var(--cream); background: var(--panel-dark); border: 3px solid var(--edge); cursor: pointer; }
.acct-tabs button.on { background: var(--gold); color: #2a2040; }
.acct-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 18px; margin: 12px 0; }
.acct-grid.one { grid-template-columns: 1fr; max-width: 360px; }
.acct-grid label, .acct-club { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--muted); }
.acct-grid small { font-size: 11px; color: #8a96c8; font-weight: normal; }
.acct-main input, .acct-main select { font: inherit; font-size: 15px; color: var(--cream); background: #1b2340; border: 3px solid var(--edge); padding: 6px 8px; }
.acct-main input:focus, .acct-main select:focus { outline: none; border-color: var(--gold); }
.big-btn { font-size: 18px !important; padding: 10px 28px !important; margin-top: 8px; }
.acct-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: 12px 0; }
.acct-stats div { display: flex; flex-direction: column; background: var(--panel-dark); border: 2px solid var(--edge); padding: 6px 8px; font-size: 12px; }
.acct-stats span { color: var(--muted); }
.acct-stats b { color: var(--gold); font-size: 15px; word-break: break-all; }
.acct-club { max-width: 360px; margin-bottom: 10px; }
.acct-buttons { display: flex; gap: 10px; }
.char-welcome { background: var(--gold); color: #2a2040; padding: 8px 12px; border: 3px solid var(--edge); }
/* the membership card, like a real plastic card */
.member-card { width: min(420px, 100%); margin: 10px 0 6px; border-radius: 14px; overflow: hidden; color: #1b2340; border: 3px solid #0d1226;
  background: linear-gradient(135deg, #fff6d8 0%, #ffd9a8 45%, #9fd8ff 100%); box-shadow: 0 8px 0 rgba(0, 0, 0, 0.35), 0 0 0 4px rgba(255, 255, 255, 0.15); }
.card-top { display: flex; justify-content: space-between; align-items: center; padding: 6px 12px; background: #1b2340; color: var(--gold); font-size: 13px; letter-spacing: 1px; }
.card-top span { color: #9fe0ff; font-size: 11px; }
.card-body { display: flex; gap: 12px; align-items: center; padding: 10px 12px; }
#member-avatar { width: 64px; height: 80px; image-rendering: pixelated; border: 3px solid #1b2340; background: #cfe4ff; }
.card-info { flex: 1; }
.card-name { font-size: 20px; font-weight: 900; }
.card-user { font-size: 14px; color: #3a5aa8; }
.card-club { font-size: 13px; color: #a3202a; margin-top: 4px; }
.card-meta { font-size: 11px; color: #5a4a3a; margin-top: 4px; }
.card-logo { width: 70px; }
.card-barcode { display: flex; gap: 2px; height: 22px; padding: 0 12px 8px; }
.card-barcode span { background: #1b2340; }

/* ---------- the shot clock ---------- */
#shot-clock { position: fixed; left: 12px; top: 92px; z-index: 1; width: 84px; height: 84px; display: none; flex-direction: column;
  align-items: center; justify-content: center; border: 4px solid var(--edge); border-radius: 50%; color: #fff; text-shadow: 2px 2px 0 #000;
  background: conic-gradient(#7ed957 calc(var(--part, 1) * 360deg), #2a2a3a 0); box-shadow: inset 0 0 0 8px var(--panel-dark), 4px 4px 0 rgba(0, 0, 0, 0.4); }
#shot-clock b { font-size: 28px; line-height: 1; }
#shot-clock span { font-size: 8px; letter-spacing: 1px; }
#shot-clock.hurry { background: conic-gradient(#ff4a3a calc(var(--part, 1) * 360deg), #2a2a3a 0); animation: clock-pulse 0.5s steps(2) infinite; }
@keyframes clock-pulse { 50% { transform: scale(1.08); } }

/* ---------- the Custom Game page ---------- */
#custom-page { display: none; position: fixed; inset: 0; z-index: 9; align-items: center; justify-content: center;
  background: rgba(10, 14, 30, 0.75); font-family: var(--font); }
.custom-wrap { width: min(1080px, 96vw); max-height: 94vh; display: flex; flex-direction: column; background: var(--panel); color: var(--cream);
  border: 4px solid var(--edge); box-shadow: inset 4px 4px 0 rgba(255, 255, 255, 0.15), inset -4px -4px 0 rgba(0, 0, 0, 0.35), 12px 12px 0 rgba(0, 0, 0, 0.45); }
.custom-head { position: relative; padding: 12px 22px; background: var(--panel-dark); border-bottom: 4px solid var(--edge); }
.custom-head h2 { margin: 0; color: var(--gold); text-transform: uppercase; }
.custom-grid { flex: 1; overflow-y: auto; display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; padding: 16px 22px; }
.custom-grid section { background: var(--panel-dark); border: 3px solid var(--edge); padding: 10px 14px; }
.custom-grid h3 { margin: 0 0 8px; color: var(--gold); font-size: 15px; text-transform: uppercase; }
.custom-grid h4 { margin: 10px 0 6px; font-size: 12px; color: #9fe0ff; text-transform: uppercase; }
.custom-grid label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--muted); margin: 6px 0; }
.custom-grid label.check { flex-direction: row; align-items: center; }
.custom-grid input[type=range] { accent-color: var(--gold); }
.custom-grid input:not([type]) { font: inherit; color: var(--cream); background: #1b2340; border: 3px solid var(--edge); padding: 4px 6px; }
.custom-grid .pbtn.on { background: var(--gold); color: #2a2040; }
.custom-opponent { display: flex; gap: 12px; align-items: flex-start; }
#custom-cpu-look { width: 72px; height: 90px; image-rendering: pixelated; border: 3px solid var(--edge); }
.custom-friends { display: flex; flex-direction: column; gap: 4px; }
.friend-pick { font: inherit; display: flex; align-items: center; gap: 8px; text-align: left; color: var(--cream); background: #1b2340; border: 3px solid var(--edge); padding: 6px 8px; cursor: pointer; }
.friend-pick.on { border-color: var(--gold); }
.friend-pick:disabled { opacity: 0.5; cursor: default; }
.friend-pick small { margin-left: auto; color: var(--muted); }
.custom-buttons { display: flex; flex-wrap: wrap; gap: 4px; max-height: 120px; overflow-y: auto; }
.button-pick { width: 44px; height: 44px; padding: 0; background: #1b2340; border: 3px solid var(--edge); cursor: pointer; font: inherit; font-size: 11px; color: var(--cream); }
.button-pick canvas { width: 36px; height: 36px; }
.button-pick.on { border-color: var(--gold); box-shadow: 0 0 0 2px var(--gold); }
.custom-foot { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px 22px; background: var(--panel-dark);
  border-top: 4px solid var(--edge); }
#custom-status { word-break: break-all; }

/* ---------- Legends: the top 10, any time ---------- */
.legends { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.legend-card { position: relative; font: inherit; color: var(--cream); background: var(--panel-light); border: 3px solid var(--edge); padding: 10px 6px 8px; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; gap: 4px; box-shadow: inset 3px 3px 0 rgba(255, 255, 255, 0.15), inset -3px -3px 0 rgba(0, 0, 0, 0.3); }
.legend-card:hover { transform: translateY(-3px); background: #5468b8; }
.legend-card canvas { width: 48px; height: 60px; image-rendering: pixelated; }
.legend-card small { color: var(--muted); font-size: 11px; }
.legend-rank { position: absolute; top: 4px; left: 6px; color: var(--gold); font-size: 16px; text-shadow: 2px 2px 0 #000; }
.legend-card.medal-1 { background: linear-gradient(#c9a227, #8a6a10); }
.legend-card.medal-2 { background: linear-gradient(#a8acb8, #6a6e7a); }
.legend-card.medal-3 { background: linear-gradient(#c8784a, #7a4420); }

/* ---------- cancel shot ---------- */
#cancel-shot { display: none; position: fixed; z-index: 3; width: 140px; background: #a3202a; font-size: 14px; }
#cancel-shot:hover { background: #c83a3a; }

/* ======================================================================
   Membership office, round two: a fun pixel font, bright colors, and a big clear rank
   ====================================================================== */
@font-face { font-family: 'Pixelify Sans'; src: url(pixelify-sans.woff2) format('woff2'); font-weight: 400 700; font-display: swap; }
#account-page, #account-page input, #account-page select, #account-page button { font-family: 'Pixelify Sans', var(--font); font-weight: 500; letter-spacing: 0.3px; }
#account-page h2 { font-size: 30px; font-weight: 700; color: #ffe38a; text-shadow: 3px 3px 0 #2a0a3a; letter-spacing: 1px; }
#account-page .note { font-size: 15px; color: #ffe8f4; }
#account-page { background: rgba(20, 6, 40, 0.8); }
.acct-wrap { border-color: #1a0626;
  background:
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.04) 0 4px, transparent 4px 8px),
    linear-gradient(160deg, #4a1a8a 0%, #8a2a9a 45%, #d8456a 100%); }
.acct-art { background: linear-gradient(180deg, #2a0a4a, #5a1a7a); border-right-color: #1a0626; gap: 12px; }
#acct-scene { width: 100%; max-width: 240px; border-color: #1a0626; box-shadow: 6px 6px 0 rgba(0, 0, 0, 0.35); }
.acct-welcome { margin: 0; font-size: 24px; font-weight: 700; color: #ffe38a; text-shadow: 3px 3px 0 #1a0626; }
.acct-edit { font-size: 16px; padding: 6px 14px; color: #2a0a3a; background: #7ef0c8; border: 3px solid #1a0626; cursor: pointer;
  box-shadow: inset 2px 2px 0 rgba(255, 255, 255, 0.5), inset -2px -2px 0 rgba(0, 0, 0, 0.25); }
.acct-edit:hover { background: #a8ffe0; }
.acct-main { color: #fff6fb; }
.acct-tabs button { font-size: 18px; background: #3a0e5a; border-color: #1a0626; }
.acct-tabs button.on { background: #ffd34d; color: #2a0a3a; }
.acct-grid label, .acct-club { font-size: 16px; color: #ffd8ee; }
.acct-grid small { font-size: 13px; color: #f0b8ff; }
.acct-main input, .acct-main select { font-size: 17px; color: #fff; background: #2a0a4a; border-color: #1a0626; }
.acct-main input:focus, .acct-main select:focus { border-color: #ffd34d; }
.acct-stats div { background: rgba(26, 6, 38, 0.55); border-color: #1a0626; font-size: 14px; }
.acct-stats span { color: #ffc8e8; }
.acct-stats b { font-size: 18px; color: #ffe38a; }
#account-page .error { font-size: 16px; color: #fff; background: #c8203a; padding: 2px 8px; }
#account-page .error:empty { display: none; }

/* your rank, big and easy to read */
.rank-banner { display: flex; align-items: center; gap: 14px; margin: 14px 0 6px; padding: 8px 12px; width: min(420px, 100%);
  background: rgba(26, 6, 38, 0.6); border: 3px solid #1a0626; }
.rank-badge { font-size: 24px; font-weight: 700; color: #1a0626; background: var(--rank); padding: 6px 14px; border: 3px solid #1a0626;
  box-shadow: inset 3px 3px 0 rgba(255, 255, 255, 0.5), inset -3px -3px 0 rgba(0, 0, 0, 0.25); white-space: nowrap; }
.rank-info { display: flex; flex-direction: column; font-size: 16px; color: #fff; }
.rank-info b { font-size: 22px; color: #ffe38a; }
.rank-info small { font-size: 13px; color: #ffc8e8; }

/* the membership card, now shiny and bright */
.member-card { border-color: #1a0626; color: #1a0626;
  background:
    repeating-linear-gradient(115deg, rgba(255, 255, 255, 0.0) 0 18px, rgba(255, 255, 255, 0.28) 18px 24px),
    linear-gradient(120deg, #ffe066 0%, #ff8ac0 40%, #8ad8ff 75%, #8affc8 100%); }
.card-top { background: linear-gradient(90deg, #ff3a7a, #ff8a2a); color: #fff; font-size: 16px; font-weight: 700; text-shadow: 2px 2px 0 #7a0a3a; }
.card-top span { color: #fff3a0; font-size: 13px; }
#member-avatar { border-color: #1a0626; background: #fff3a0; }
.card-name { font-size: 24px; font-weight: 700; }
.card-user { font-size: 16px; color: #6a1a9a; }
.card-club { font-size: 15px; color: #c8203a; }
.card-meta { font-size: 13px; color: #3a1a4a; }
.card-barcode span { background: #1a0626; }

/* the Log in / account button sits with Character at the top right, just like Options */
#account-btn canvas#account-face { width: 22px; height: 22px; image-rendering: pixelated; }
#account-btn .rank-chip { margin-left: 4px; }

/* the character screen's preview stays crisp when it's blown up */
#char-canvas, #member-avatar, .custom-look canvas, .legend-card canvas { image-rendering: pixelated; }
