/* ============================================================
   SCRIBIA — the 3.25 world: a dark tropical sea, a leather book,
   parchment pages, brass for the main actions, IM Fell lettering.
   Loaded after theme.css; it re-tunes the theme's tokens and restyles
   the frame. The cards stay the brightest thing on screen.
   ============================================================ */
/* The site's lettering: IM Fell English, the original smooth face (the
   pixelated version stays only on the cards themselves). One weight. */
@font-face{font-family:"IM Fell";font-weight:400;font-style:normal;font-display:swap;src:url(imfell.woff2) format("woff2")}
@font-face{font-family:"IM Fell";font-weight:400;font-style:italic;font-display:swap;src:url(imfell-italic.woff2) format("woff2")}
@font-face{font-family:"IM Fell SC";font-weight:400;font-display:swap;src:url(imfellsc.woff2) format("woff2")}
:root{
  --ink:#2a2018; --ink-soft:#5e5040;
  --line:rgba(42,32,24,.5); --line-soft:rgba(42,32,24,.25);
  --shade:rgba(30,18,8,.28); --shade-deep:rgba(0,0,0,.6);
  --paper:#ece4d2; --paper-2:#e2d8c2; --btn:#f4ecda;
  --sea:#0a202a; --gold:#d8c8a0; --gold-hi:#e8dcc0;
  --brass:#b08a3e; --brass-dk:#7a5c22;
  --bold-yellow:#b08a3e;      /* brass: the main action */
  --bold-blue:#3e4c62;        /* slate */
  --bold-red:#6a2f29;         /* brick */
  --bold-pink:#6a2f29;
  --bold-green:#4f6045;       /* sage */
  --ui:"IM Fell",Georgia,serif;
  --head:"IM Fell SC",Georgia,serif;
  --font-serif:var(--ui); --font-display:var(--head);
}
/* one weight: no fake bold smearing the letters (the italic is a real face) */
html{background:var(--sea) !important;font-synthesis:none}
body{-webkit-font-smoothing:antialiased}
body{color:var(--ink)}

/* Titles, tabs and buttons in small caps; reading text in the regular face */
h1,h2,h3,h4,button,.book-left-tab,.book-tab,.landing-logo,.book-left-title,.cc-label,.palette-label,.draw-fs-label,.draw-fs-title,
.posts-compact-bar,.landing-head,.card-creator h3{font-family:var(--head) !important;font-weight:400 !important}

/* ---- header over the sea ---- */
.landing-logo{font-family:var(--head) !important;font-weight:400 !important;text-transform:uppercase;letter-spacing:.14em;color:#e4d6b4 !important;
  text-shadow:0 2px 14px rgba(0,0,0,.7) !important;-webkit-text-stroke:0 !important}
.live-pill{font-family:var(--ui) !important;color:var(--gold) !important;background:rgba(10,24,30,.72) !important;background-image:none !important;
  border:1px solid rgba(216,200,160,.3) !important;box-shadow:none !important;border-radius:3px}
.live-pill b{font-weight:400;color:#f0e4c4}
button.live-pill:hover{border-color:var(--brass) !important;transform:none}

/* ---- the book ---- */
.book-panel{border:0 !important;border-radius:8px !important;box-shadow:0 26px 80px rgba(0,0,0,.75) !important;background:var(--paper) !important}
.book-left-panel{border-right:0 !important;box-shadow:inset -8px 0 14px -10px rgba(0,0,0,.6)}
.book-left-title{font-family:var(--head) !important;font-weight:400 !important;text-transform:uppercase;letter-spacing:.16em !important;font-size:24px !important;
  color:#e4d6b4 !important;text-shadow:0 2px 8px rgba(0,0,0,.6) !important;border-bottom:1px solid rgba(216,200,160,.18) !important}
:root .book-left-tab, :root .book-left-tab:not(.active){font-size:18px !important;color:#e8dcc0 !important;background:rgba(0,0,0,.2) !important;background-image:none !important;
  border:1px solid rgba(216,200,160,.22) !important;border-radius:3px !important;box-shadow:none !important}
:root .book-left-tab:hover{background:rgba(255,240,200,.08) !important;transform:none}
:root .book-left-tab.active{background:linear-gradient(rgba(176,138,62,.5),rgba(122,92,34,.5)) !important;background-image:linear-gradient(rgba(176,138,62,.5),rgba(122,92,34,.5)) !important;
  border-color:rgba(216,190,120,.65) !important;color:#fff3d6 !important}
/* phone: the tab strip on leather */
:root .book-tab{color:#e8dcc0 !important;background:transparent !important;background-image:none !important;border:1px solid transparent !important;box-shadow:none !important}
:root .book-tab.active{background:linear-gradient(rgba(176,138,62,.5),rgba(122,92,34,.5)) !important;background-image:linear-gradient(rgba(176,138,62,.5),rgba(122,92,34,.5)) !important;
  border:1px solid rgba(216,190,120,.65) !important;color:#fff3d6 !important;border-radius:3px}
.book-tab-arrow{color:#e8dcc0 !important}
.book-right-panel > .leather-panel, .book-panel > .leather-panel{border-bottom:0 !important;box-shadow:inset 0 -8px 14px -10px rgba(0,0,0,.6)}

/* ---- brass: the main action ---- */
:root .landing-btn.primary,:root .game-btn.confirm,:root .game-btn.rematch,:root .game-btn.claim-confirm,:root .game-btn.ready,:root .pvp-create-btn,:root .card-btn-generate,:root .card-btn-save,:root .anon-submit,:root .print-done,:root .draw-fullscreen-done {
  background:linear-gradient(#c49b4c,#9c7832) !important;background-image:linear-gradient(#c49b4c,#9c7832) !important;color:#24180a !important;
  border:1px solid #5c4316 !important;box-shadow:inset 0 1px 0 rgba(255,240,200,.5),0 2px 0 rgba(0,0,0,.3) !important;border-radius:3px !important}
/* other selected states: a quiet brass wash, not a solid block */
:root .book-subnav-btn.active,:root .book-sort-btn.active,:root .cc-icon-btn.active,:root .draw-m-tool.active,:root .draw-m-size.active,:root .swirl-modes .cc-icon-btn.active,:root .draw-fullscreen-toolbar .cc-icon-btn.active {
  background:linear-gradient(#d2b06a,#b08a3e) !important;background-image:linear-gradient(#d2b06a,#b08a3e) !important;color:#24180a !important}
/* light buttons are parchment, not white */
:root .landing-btn:not(.primary), :root .overlay-btn-cancel, :root .card-btn-cancel, :root .cc-icon-btn, :root .library-back-btn, :root .book-subnav-btn:not(.active){
  border-radius:3px !important}

/* ---- section bars: leather strips instead of the striped primary bars ---- */
:root .posts-compact-bar,:root .landing-head.blue,:root .landing-head.pink {
  background:#3e3428 !important;background-image:var(--leather-grain) !important;background-size:960px 480px !important;color:#e8dcc0 !important;border-radius:3px}

/* ---- drawing overlay and dialogs sit on the dark sea, not slate ---- */
.draw-fullscreen-overlay, #drawFullscreenOverlay{background:rgba(6,18,24,.94) !important}
.draw-fs-title{background:#3e3428 !important;background-image:var(--leather-grain) !important;background-size:960px 480px !important;color:#e8dcc0 !important}
.landing-foot, .landing-foot a{color:rgba(216,200,160,.75) !important}

/* the Battle tab's two "go" buttons are the main actions there: brass */

.posts-compact-title{text-transform:none !important;font-weight:400 !important;color:#e8dcc0 !important}
.posts-compact-toggle{color:#e8dcc0 !important}

/* twelve books on the sign-up shelf (was ten): slimmer spines so they all fit */
.cx-shelf{gap:3px !important;padding:0 10px !important}
.cx-spine{width:calc(var(--sw,54px)*.64) !important}
.cx-spine .ttl{font-size:12px !important}
/* phones: sixteen books on two shelves of eight (each row stands on its own plank) */
@media (max-width:760px){
  .cx-shelf{flex-wrap:wrap !important;gap:16px 0 !important;padding:0 6px !important;height:auto !important;align-content:flex-end}
  .cx-spinebtn{flex:0 0 12.5%;display:flex !important;justify-content:center;align-items:flex-end;height:180px;
    border-bottom:12px solid #4a3a2c;box-shadow:0 4px 0 rgba(0,0,0,.45)}
  .cx-spine{width:calc(var(--sw,54px)*.56) !important;height:calc(var(--sh,240px)*.56) !important}
  .cx-spine .ttl{font-size:10px !important;top:30px !important;bottom:30px !important}
  .cx-plank{display:none !important}
}

/* notices: a dark sea slip with gold lettering, brass or brick edge */
.notification{background:rgba(10,26,32,.95) !important;color:#ecdfc0 !important;border:1px solid rgba(216,200,160,.35) !important;border-left:4px solid var(--brass) !important;
  border-radius:3px !important;box-shadow:0 8px 24px rgba(0,0,0,.45) !important;font-family:var(--ui) !important}
.notification.success{border-left-color:#8fae6e !important}
.notification.error{border-left-color:#b0543f !important;color:#f2d6c8 !important}
.pick-timer .pick-ready{color:#4f6045 !important;font-weight:400 !important}

/* theme books in Settings: two rows of six, the chosen one lifted in brass */
.theme-books{display:grid !important;grid-template-columns:repeat(8,minmax(0,1fr));gap:6px !important;width:100%;max-width:300px;margin-left:auto !important;margin-right:auto !important;box-sizing:border-box}
.theme-book{width:100% !important;height:auto !important;aspect-ratio:3/4}
.theme-book.active{outline:2px solid #d2b06a !important}
.posts-compact-title{font-family:var(--head) !important}
.posts-compact-title{font-size:20px !important;letter-spacing:.04em !important}
.posts-compact-title::first-letter{text-transform:uppercase}

/* your picture's "+" (add) and pencil (change): just the mark, semi-transparent, no box */
.plate .pfp-plus{background:none !important;border:0 !important;box-shadow:none !important;color:rgba(255,250,235,.72) !important;font-weight:400 !important;
  text-shadow:0 1px 3px rgba(0,0,0,.55)}
.plate .pfp-empty .pfp-plus{width:48px !important;height:48px !important;font-size:46px !important;opacity:1 !important}
.plate .pfp-editable:hover .pfp-plus{color:rgba(255,250,235,.95) !important}
/* the empty-picture "+" drawn as two chunky pixel bars instead of the thin font glyph */
.plate .pfp-empty .pfp-plus{font-size:0 !important;color:transparent !important;text-shadow:none !important}
.plate .pfp-empty .pfp-plus::before,.plate .pfp-empty .pfp-plus::after{content:"";position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);
  background:rgba(255,250,235,.62);box-shadow:0 1px 3px rgba(0,0,0,.35)}
.plate .pfp-empty .pfp-plus::before{width:34px;height:8px}
.plate .pfp-empty .pfp-plus::after{width:8px;height:34px}
.plate .pfp-empty:hover .pfp-plus::before,.plate .pfp-empty:hover .pfp-plus::after{background:rgba(255,250,235,.9)}

/* card creator: the zoom / rotate row as small parchment buttons on one line */
.card-creator .cc-tool-row .cc-icon-btn{width:auto !important;height:auto !important;min-width:0 !important;white-space:nowrap;padding:4px 9px !important;
  font-family:var(--head) !important;font-size:14px !important;color:var(--ink) !important;background:var(--btn) !important;border:1px solid var(--line) !important;border-radius:3px !important;cursor:pointer}
.card-creator .cc-tool-row{flex-wrap:wrap;gap:5px !important}

/* Profile pictures are squares everywhere, exactly as drawn (a slight soften on the corners) */
.pfp, img.pfp, .pfp-profile, .pfp-match, .pfp-profile-header{border-radius:3px !important}

/* Settings: your saved pictures (up to 4), the worn one in brass */
.pfp-slots-wrap{margin:12px auto 4px;max-width:300px}
.pfp-slots-label{font-size:13px !important;margin-bottom:6px}
.pfp-slots{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px}
.pfp-slot{display:flex;flex-direction:column;align-items:center;gap:4px}
.pfp-slot-pic{width:100%;aspect-ratio:1;padding:0;border:1px solid rgba(216,200,160,.35);border-radius:3px;background:rgba(0,0,0,.25);cursor:pointer;overflow:hidden;
  color:rgba(255,250,235,.6);font-size:28px;line-height:1;font-family:var(--ui)}
.pfp-slot-pic img{width:100%;height:100%;display:block;image-rendering:pixelated}
.pfp-slot.active .pfp-slot-pic{outline:2px solid #d2b06a;outline-offset:2px;border-color:#d2b06a}
.pfp-slot-pic:hover{border-color:rgba(216,190,120,.8)}
.pfp-slot-act{background:none;border:0;padding:0;color:#d8c8a0;font-family:var(--head);font-size:13px;text-decoration:underline;text-underline-offset:2px;cursor:pointer}
.pfp-slot-tag{font-size:12px;color:#d2b06a;min-height:14px;line-height:14px}
.pfp-slots-hint{font-size:12px;color:rgba(232,220,192,.7);margin-top:4px}
.pfp-slots-label{color:#e8dcc0 !important;text-shadow:none !important;filter:none !important;opacity:1 !important;font-family:var(--head) !important;letter-spacing:.04em}
.anon-modal .book-muted-text{font-style:normal !important;font-family:var(--head) !important}

/* Settings / sign-in window: when it's taller than the screen (phones, or with
   Security open), the page behind it scrolls instead of cutting it off */
.anon-modal-overlay.active{overflow-y:auto;-webkit-overflow-scrolling:touch;align-items:flex-start !important;padding:16px 0}
.anon-modal-overlay .anon-modal{margin:auto !important;flex:none}

/* "Scribia has been updated" bar */
.update-bar{position:fixed;left:50%;top:12px;transform:translate(-50%,-160%);z-index:9900;display:flex;align-items:center;gap:12px;
  background:rgba(10,26,32,.96);color:#ecdfc0;border:1px solid rgba(216,200,160,.35);border-left:4px solid var(--brass);border-radius:3px;
  box-shadow:0 8px 24px rgba(0,0,0,.45);padding:8px 10px 8px 14px;font-family:var(--ui);font-size:15px;transition:transform .25s ease-out;max-width:calc(100vw - 24px);box-sizing:border-box}
.update-bar.show{transform:translate(-50%,0)}
.update-bar-go{font-family:var(--head);font-size:15px;color:#24180a;background:linear-gradient(#c49b4c,#9c7832);border:1px solid #5c4316;border-radius:3px;padding:5px 12px;cursor:pointer;
  box-shadow:inset 0 1px 0 rgba(255,240,200,.5)}
.update-bar-later{font-family:var(--ui);font-size:14px;color:rgba(232,220,192,.75);background:none;border:0;cursor:pointer;text-decoration:underline;padding:4px}
.update-bar span{white-space:nowrap}

/* card creator: the swirl preview with its "New swirl" shuffle, and the print note */
.swirl-pattern{display:flex;align-items:center;gap:10px;max-width:420px;margin:8px auto 0}
.swirl-pattern .palette-preview-strip{flex:1;min-width:0;margin:0 !important}
.cc-print-note{text-align:center;font-size:14px;color:var(--ink-soft);margin-top:6px}
#bgRerollBtn{width:auto !important;height:auto !important;min-width:0 !important;white-space:nowrap;padding:5px 12px !important;flex:none;
  font-family:var(--head) !important;font-size:14px !important;color:var(--ink) !important;background:var(--btn) !important;border:1px solid var(--line) !important;border-radius:3px !important;cursor:pointer}
.card-actions .card-btn-save,.card-actions .card-btn-cancel{width:auto !important;white-space:nowrap;padding-left:18px !important;padding-right:18px !important}
.cc-print-note{color:rgba(232,220,192,.78)}
.bst-spend{color:#5e5040}
/* Phone tab bar: all five tabs fit, so no arrows and no sideways scroll */
.book-tab-arrow{display:none !important}
.book-tabs{overflow:hidden;justify-content:space-evenly;padding:0 4px}
:root .book-tab{flex:0 1 auto;padding:8px 9px !important;min-width:0}
@media (max-width:359px){:root .book-tab{padding:8px 5px !important;font-size:13.5px !important}}
/* Book plate: palette (book color) + gear (settings), side by side */
.plate-tools{display:flex;gap:8px;align-self:start}
.plate-palette svg{width:26px;height:26px}
.book-colors .theme-books{margin:4px auto 2px}
.book-colors-note,.my-pics-note{font-size:14px;color:rgba(232,220,192,.82) !important;margin-top:8px}
@media (max-width:720px){
  .plate-tools{position:absolute;right:10px;top:10px}
  .plate-tools .plate-gear{position:static}
  .plate .book-profile-name{padding-right:140px}
}
/* Music switch in the top bar: a pixel note; crossed out when off */
.music-pill{padding:6px 9px !important;min-width:36px;justify-content:center}
.music-pill svg{width:16px;height:16px;fill:var(--gold)}
.music-pill .mp-slash{display:none}
.music-pill.off .mp-note{opacity:.45}
.music-pill.off .mp-slash{display:inline;fill:#c0705a}
/* Home (book open): the backdrop is only shade there (the book can't be
   closed), so taps go through it to the top bar's buttons (music, challenges) */
body.home-mode .book-backdrop.active{pointer-events:none}
/* Phones: the top bar holds the logo, two pills and the music note */
@media (max-width:430px){
  .landing-top{gap:6px !important}
  .landing-live{gap:5px !important}
  .landing-live .live-pill{padding:6px 7px !important;gap:5px !important}
  .music-pill{min-width:32px;padding:6px 7px !important}
  .landing-logo{font-size:26px !important}
}
@media (max-width:379px){ .landing-logo{font-size:22px !important;letter-spacing:.1em} }
@media (max-width:340px){ .lp-word{display:none} }
/* Match bar: the score chips never squeeze (their numbers stayed outside
   the box when zoomed in); whose turn sits in the middle, round info under it */
.score-label{flex:none !important}
#turnIndicator{flex:1 1 auto;min-width:0;display:flex;flex-direction:column;align-items:center;justify-content:center;white-space:normal;text-align:center;line-height:1.15;font-size:15px !important;overflow-wrap:anywhere}
#turnIndicator .ti-main{display:inline-flex;align-items:center;justify-content:center;flex-wrap:wrap;gap:4px}

#gameScoreBar{min-width:0;max-width:100%;box-sizing:border-box}
.turn-timer.theirs{opacity:.7}
#gameScoreBar{display:grid !important;grid-template-columns:auto minmax(0,1fr) auto;grid-template-rows:auto auto;align-items:center;column-gap:8px;row-gap:3px}
#gameScoreBar.hidden{display:none !important}
#scoreRed{grid-column:1;grid-row:1 / 3}
#scoreBlue{grid-column:3;grid-row:1 / 3}
#turnIndicator{grid-column:2;grid-row:1}
#turnTimer{grid-column:2;grid-row:2;justify-self:center;font-size:14px !important;padding:0 6px !important;min-width:0 !important}
/* Sign-up finish: welcome + what you can do now */
.cx-welcome{display:flex;flex-direction:column;gap:4px;min-width:0;flex:1 1 260px}
.cx-welcome-sub{font-size:17px;color:#5e5040}
.cx-done-btns{display:flex;gap:10px;flex-wrap:wrap}
/* One line at the top of a tab saying what it's for */

/* Which layer you're drawing on (shown once there are 2+ layers) */
.draw-on-pill{position:absolute;right:10px;top:10px;z-index:3;pointer-events:none;font-family:var(--ui);font-size:13px;color:#2a2018;
  background:rgba(236,228,210,.92);border:1px solid rgba(42,32,24,.35);box-shadow:0 1px 2px rgba(0,0,0,.25);padding:3px 9px;border-radius:2px;white-space:nowrap}
.draw-on-pill.hidden{display:none}
@media (min-width:721px){ .draw-on-pill{right:auto;left:26px;top:22px} }
/* A deck is 12 cards now: the hand shows as two rows of six */
@media (min-width:601px){
  .hand-drawer .player-hand-container{grid-template-columns:repeat(6,80px) !important}
  .hand-drawer .hand-card{width:80px !important;height:95px !important}
}
@media (min-width:601px) and (max-height:820px){
  .hand-drawer .player-hand-container{grid-template-columns:repeat(6,76px) !important}
  .hand-drawer .hand-card{width:76px !important;height:90px !important}
}
@media (max-width:600px){ .hand-drawer .player-hand-container{grid-template-columns:repeat(6,minmax(0,1fr)) !important} }
.cx-sleeves{grid-template-columns:repeat(6,minmax(0,1fr)) !important}
/* The game screen: nothing is text-selectable (a drag across it used to
   leave a blue selection tint on buttons and cards) */
.arena-layer.game-active, .hand-drawer, #handPickerOverlay{-webkit-user-select:none;user-select:none}
/* Level: small tally marks in the card's top-left corner (replaces the gems
   that hung under the card). --gem sets their height per view. */

.rar-tally{display:none !important;position:absolute;left:10%;top:10%;display:flex;gap:calc(var(--gem) * .35);z-index:3;pointer-events:none;line-height:0;opacity:.92}
.rar-tally b{display:flex;gap:max(1px,calc(var(--gem) * .14))}
.rar-tally i{display:block;width:max(2px,calc(var(--gem) * .2));height:var(--gem);background:var(--gc);box-shadow:0 0 0 1px rgba(20,14,8,.8)}
.rar-t6 .rar-tally i{animation:rarGemHue 1.6s steps(1) infinite}
@media (prefers-reduced-motion:reduce){.rar-tally i{animation:none !important}}
.guide-rung .gem{width:4px !important;height:16px !important;transform:none !important;margin-left:8px !important;margin-right:4px;box-shadow:0 0 0 1px rgba(20,14,8,.8);border:0 !important}
/* ---- The lobby (Battle tab) ---- */

.ch-dots{display:inline-flex;gap:3px;margin-left:3px}
.ch-dots i{width:4px;height:4px;background:#b08a3e;animation:chDot 1.2s infinite ease-in-out}
.ch-dots i:nth-child(2){animation-delay:.15s}.ch-dots i:nth-child(3){animation-delay:.3s}
@keyframes chDot{50%{transform:translateY(-3px)}}

@media (prefers-reduced-motion:reduce){.ch-dots i{animation:none}}

/* Winning a match: the result card rises and a red wax seal stamps its corner */
#resultDialog,#claimScreen .game-dialog{position:relative}
.game-dialog.fx-rise{animation:winRise .5s ease-out both}
.win-seal{position:absolute;right:-18px;top:-22px;z-index:5;width:68px;height:68px;border-radius:50%;pointer-events:none;
  background:radial-gradient(circle at 38% 34%,#b8493c,#7a2219 60%,#5a1710);box-shadow:0 3px 8px rgba(0,0,0,.5),inset 0 0 0 5px rgba(0,0,0,.12);
  display:flex;flex-direction:column;align-items:center;justify-content:center;gap:1px;color:#f2d9c8;text-align:center;line-height:1;
  font-family:"IM Fell English SC","IM Fell English",Georgia,serif;animation:sealStamp .45s .35s cubic-bezier(.3,1.6,.5,1) both}
.win-seal b{font-weight:400;font-size:18px}
.win-seal small{font-size:11px;opacity:.85;letter-spacing:.06em}
@keyframes winRise{from{transform:translateY(22px);opacity:.2}}
@keyframes sealStamp{from{transform:scale(2.4) rotate(-25deg);opacity:0}}
@media (max-width:520px){.win-seal{right:-8px;top:-18px;width:58px;height:58px}.win-seal b{font-size:16px}}
@media (prefers-reduced-motion:reduce){.game-dialog.fx-rise,.win-seal{animation:none}}

.plate .book-profile-highlights-grid{grid-template-columns:repeat(4,minmax(0,86px)) !important;min-width:0}
.plate-hl{min-width:0}
/* ---- Tab header: title + a small "?" with a one-line note ---- */
.tab-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:10px 0 12px;padding-bottom:8px;border-bottom:1px solid rgba(42,32,24,.28)}
.tab-title{font-family:"IM Fell English",Georgia,serif;font-weight:400;font-size:30px;line-height:1.05;margin:0;color:#2a2018}
.tab-q{display:inline-flex;align-items:center;gap:7px;flex:none;font-family:"IM Fell English",Georgia,serif;font-size:15px;color:#2a2018;background:rgba(255,250,235,.7);border:1px solid rgba(42,32,24,.3);padding:4px 10px 5px;cursor:pointer;text-transform:none;letter-spacing:0}
.tab-q b{display:inline-flex;align-items:center;justify-content:center;width:18px;height:18px;border-radius:50%;background:#3e3428;color:#efe6d2;font-size:13px;font-weight:400}
.tab-q[aria-expanded="true"]{background:rgba(176,138,62,.2);border-color:#b08a3e}
.tab-q:focus-visible{outline:2px solid #2a2018;outline-offset:2px}
.tab-note{margin:-4px 0 14px;padding:8px 12px;background:rgba(176,138,62,.14);border-left:3px solid #b08a3e;font-size:16px;line-height:1.4;color:#2a2018}
.drops-page .tab-head,.drops-page .tab-note{text-align:left;width:100%}

@media (max-width:720px){.tab-title{font-size:26px}.tab-head{margin-top:4px}}

/* ---- Featured artist ---- */
.feat-artist{display:grid;grid-template-columns:auto minmax(0,1fr);gap:12px 18px;align-items:center;padding:14px;margin-bottom:14px;border:1px solid rgba(42,32,24,.28);background:rgba(62,52,40,.05)}
.feat-artist.hidden{display:none}
.feat-k{grid-column:1/-1;font-family:"IM Fell English SC",Georgia,serif;font-size:14px;letter-spacing:.12em;color:#7a5c22}
.feat-who{display:flex;flex-direction:column;align-items:center;gap:6px;width:120px}
.feat-pic{display:block;width:96px;height:96px;background:#d9cfb9;border:1px solid rgba(42,32,24,.4);overflow:hidden}
.feat-pic img,.feat-pic svg{display:block;width:100%;height:100%;object-fit:cover;image-rendering:pixelated}
.feat-txt{display:flex;flex-direction:column;align-items:center;text-align:center;min-width:0}
.feat-name{font-size:22px;line-height:1.1;color:#2a2018;overflow-wrap:anywhere}
.feat-stat{font-size:14px;color:#5e5040}
.feat-strip{display:flex;gap:10px;overflow-x:auto;padding:4px 2px 8px;min-width:0}
.feat-card{position:relative;flex:none;width:104px;padding:4px;background:#f6f0e2;border:1px solid rgba(42,32,24,.2);box-shadow:0 1px 3px rgba(0,0,0,.2);cursor:pointer;--gem:9px}
.feat-card img{display:block;width:100%;height:auto;image-rendering:pixelated}
.feat-card:focus-visible{outline:2px solid #2a2018;outline-offset:2px}
.feat-acts{grid-column:2;display:flex;gap:8px;flex-wrap:wrap}
.feat-acts button{font-family:"IM Fell English SC",Georgia,serif;font-size:15px;padding:6px 12px;cursor:pointer;border:1px solid rgba(42,32,24,.35);background:rgba(255,250,235,.75);color:#2a2018}
@media (max-width:560px){
  .feat-artist{grid-template-columns:minmax(0,1fr)}
  .feat-who{width:auto;flex-direction:row;justify-content:flex-start}
  .feat-pic{width:60px;height:60px}
  .feat-txt{align-items:flex-start;text-align:left}
  .feat-acts{grid-column:1}
  .feat-card{width:84px}
}

/* ---- Battle: one frame, two halves, buttons along the bottom ---- */

/* the guide-step stripe and frame around the old boxes go; the halves are the frame now */

/* the tab title and its "?" are plain words, not small caps */
.tab-title,.tab-q{text-transform:none !important;font-variant:normal !important;letter-spacing:0 !important}
/* Cards tab: its sections run full width, so the header and featured artist get a margin */
#libraryMainView > .tab-head,#libraryMainView > .tab-note,#libraryMainView > .feat-artist{margin-left:12px;margin-right:12px}
.tab-head .tab-title{font-family:"IM Fell English",Georgia,serif !important;font-size:30px !important;font-weight:400 !important}
@media (max-width:720px){.tab-head .tab-title{font-size:26px !important}}
.tab-head .tab-q{font-family:"IM Fell English",Georgia,serif !important}

/* ---- The Create tab: the creator IS the page (no box). Desktop: the
   drawing on the left (with the board-size check), the card (preview,
   swirls, print) on the right. Phones: one column, the check under the card. */
.create-page{display:flex;flex-direction:column;gap:12px}
.create-page .card-creator{max-width:none;width:100%;box-sizing:border-box;margin:0;padding:4px 12px 24px !important;background:none !important;border:0 !important;box-shadow:none !important;max-height:none !important;overflow:visible !important}
.create-page .card-creator.hidden,.create-page .hidden{display:none !important}
.cc-col{display:flex;flex-direction:column;gap:8px;min-width:0}
.create-page .cc-col-draw .cc-board-preview{margin-top:10px}
@media (min-width:900px){
  .create-page .card-creator{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:0 32px;align-items:start;padding:8px 24px 28px !important}
  .create-page .cc-col-card{position:sticky;top:8px}
}
@media (max-width:899px){
  /* one column in the old order: the board-size check sits under the card */
  .create-page .card-creator{display:flex;flex-direction:column;gap:8px}
  .create-page .cc-col{display:contents}
  .create-page .cc-col-draw > *{order:1}
  .create-page .cc-col-card > *{order:3}
  .create-page .cc-card-stage{order:2}
  .create-page .cc-col-draw > .cc-board-preview{order:3;margin-top:0}   /* first of the card side's items: right under the card */
}
.create-out{max-width:520px;margin:0 auto;text-align:center;display:flex;flex-direction:column;align-items:center;gap:12px;padding:18px;border:1px solid var(--line);background:rgba(255,250,235,.55)}
.create-out p{margin:0;font-size:17px}
.create-page .tab-title .create-left{font-family:var(--ui);font-size:13px;vertical-align:4px}
.create-page .card-actions{justify-content:center}

/* ---- Every tab gets the breathing room Battle has (the titles sat on the binder's edge) ---- */
.book-page[data-page="1"],.book-page[data-page="2"],.book-page[data-page="3"]{padding:18px 22px 22px !important;box-sizing:border-box}
@media (max-width:600px){.book-page[data-page="1"],.book-page[data-page="2"],.book-page[data-page="3"]{padding:14px 14px 18px !important}}
.tab-head{margin-top:0 !important}

/* ---- The "?" on each tab: a round button, nothing else ---- */
.tab-head .tab-q{width:32px;height:32px;padding:0 !important;border-radius:50%;justify-content:center;gap:0;background:#3e3428;border:1px solid #2a2018;color:#efe6d2}
.tab-head .tab-q b{width:auto;height:auto;background:none;color:inherit;font-size:19px;line-height:1}
.tab-head .tab-q:hover{background:#4e4232}
.tab-head .tab-q[aria-expanded="true"]{background:#b08a3e;border-color:#5c4316;color:#24180a}

/* ---- Create: one spacing rhythm (12px inside a group, 20px between groups) ---- */
.create-page .card-creator{padding:0 !important}
.create-page .cc-col{gap:12px}
.create-page .cc-col > *{margin-top:0 !important;margin-bottom:0 !important}
.create-page .cc-col > .cc-label,.create-page .cc-col > label{margin-bottom:-6px !important}
.create-page .cc-col-draw > .cc-draw-wrap,.create-page .cc-col-draw > .cc-board-preview,.create-page .cc-col-card > .palette-section,.create-page .cc-col-card > .card-actions {margin-top:8px !important}
.create-page .kard-limit-display:empty{display:none}
.create-page .cc-board-preview{justify-content:flex-start}
.create-page .cc-draw-wrap{display:flex;justify-content:center}
.create-page .palette-section{display:grid;grid-template-columns:auto 1fr;align-items:center;gap:10px 12px}
.create-page .palette-section > *{margin:0 !important}
.create-page .palette-section .swirl-modes{justify-content:flex-end}
.create-page .palette-section .swirl-pattern,.create-page .palette-section .swirl-hint,.create-page .palette-section .swirl-grid{grid-column:1 / -1;max-width:none}
.create-page .swirl-hint:empty{display:none}

.create-page .cc-print-note{margin-top:-4px !important}
@media (min-width:900px){
  .create-page .card-creator{gap:0 32px}
  .create-page .cc-col-card{position:static}
  /* the card side fits the book's height: a smaller preview, a tighter swatch grid */
  .create-page #cardPreviewCanvas{width:236px;height:236px;margin:0 !important}
  .create-page .cc-col-draw .cc-board-preview{margin-top:4px !important}
  .create-page .swirl-grid{gap:3px !important}
  .create-page .swirl-grid .card-color-swatch{aspect-ratio:auto !important;height:22px !important}
}
.create-page .card-status:empty{display:none}
/* shorter laptop screens (e.g. 1366 x 768): a little smaller still, so nothing scrolls */
@media (min-width:900px) and (max-height:820px){
  .book-page[data-page="1"]{padding-top:12px !important;padding-bottom:14px !important}
  .create-page .tab-head{margin-bottom:8px !important}
  .create-page #cardPreviewCanvas{width:200px;height:200px;margin:0 !important}
  .create-page .cc-draw-preview-wrap{width:240px !important;height:240px !important}
  .create-page .swirl-grid .card-color-swatch{height:19px !important}
}

/* ---- The card's corner handles: move (top-left), turn (top-right), resize (bottom-right) ---- */
.cc-card-stage{position:relative;align-self:center;line-height:0;margin:4px 0 6px !important}
.cc-card-stage #cardPreviewCanvas{margin:0 !important;display:block}
.cc-h{transform:translate(-50%,-50%);left:0;top:0;width:30px !important;height:30px !important;box-shadow:0 1px 4px rgba(0,0,0,.45) !important}
.cc-h{position:absolute;width:34px;height:34px;padding:0;border-radius:50%;display:flex;align-items:center;justify-content:center;cursor:grab;touch-action:none;z-index:2;
  background:#efe6d2;color:#2a2018;border:2px solid #2a2018;box-shadow:0 2px 5px rgba(0,0,0,.35)}
.cc-h svg{width:18px;height:18px;fill:currentColor}
.cc-h:hover{background:#d2b06a}
.cc-h.active{background:#b08a3e;cursor:grabbing;transform:translate(-50%,-50%) scale(1.08)}
.cc-h:focus-visible{outline:3px solid #b08a3e;outline-offset:2px}
.cc-h svg{width:16px !important;height:16px !important}
.cc-h-move{cursor:move}.cc-h-zoom{cursor:nwse-resize}
@media (pointer:coarse){.cc-h{width:36px !important;height:36px !important}.cc-h svg{width:19px !important;height:19px !important}}
.cc-art-clip{position:absolute;left:2%;top:2%;right:2%;bottom:2%;overflow:hidden;pointer-events:none}
.cc-art-frame{position:absolute;box-sizing:border-box;border:1px dashed rgba(42,32,24,.85);outline:1px dashed rgba(255,250,235,.85);outline-offset:-2px;transform-origin:50% 50%}
.cc-card-stage.no-art .cc-h,.cc-card-stage.no-art .cc-art-clip{display:none}
.cc-stage-foot{display:flex;align-items:center;justify-content:center;gap:10px;flex-wrap:wrap;font-family:var(--ui);font-size:13px;color:#4a3e30;text-align:center}
.cc-reset{font-family:var(--ui);font-size:13px;color:#2a2018;background:none;border:0;padding:2px 4px;text-decoration:underline;text-underline-offset:3px;cursor:pointer}
@media (max-width:899px){.create-page .cc-col-card > .cc-stage-foot{order:3}}

/* ---- Signed out: a blank drawing pad under a soft veil, two buttons on top ---- */
.create-page{position:relative}
.create-pad-demo{display:grid;grid-template-columns:minmax(0,1fr) 340px;gap:20px;align-items:start;margin-top:6px;pointer-events:none;user-select:none;opacity:.82;filter:saturate(.9)}
.create-pad-demo.hidden{display:none !important}
.cpd-canvas{width:100%;max-width:min(100%,72vh);aspect-ratio:1;justify-self:center;box-sizing:border-box;border:1px solid var(--line);box-shadow:0 6px 18px rgba(0,0,0,.25);
  background:repeating-conic-gradient(#ebe4d4 0% 25%,#fff 0% 50%) 0 0/3.125% 3.125%}
.create-pad-demo .cpd-tools{display:block !important;padding:0 !important;flex:none !important;max-width:none !important;width:auto !important}
@media (max-width:899px){.create-pad-demo{grid-template-columns:1fr;gap:14px}.cpd-canvas{max-width:100%}}
.create-lock{position:absolute;inset:64px 0 0 0;display:flex;align-items:flex-start;justify-content:center;padding-top:clamp(90px,24vh,260px);z-index:4;background:rgba(236,228,210,.28)}
.create-lock.hidden{display:none !important}
.create-lock-card{width:max-content;max-width:calc(100% - 32px);box-sizing:border-box;margin:0 16px;padding:18px 20px;background:#efe7d4;border:1px solid rgba(42,32,24,.35);box-shadow:0 12px 34px rgba(0,0,0,.3);display:flex;flex-direction:column;align-items:center;gap:12px}
.create-lock-icon{width:30px;height:30px;fill:#2a2018}
.create-lock-btns{display:flex;gap:10px;flex-wrap:wrap;justify-content:center}
.create-lock-btns button{flex:none !important;min-width:170px;padding:11px 20px !important;font-size:17px !important;line-height:1.2 !important;height:auto !important;margin:0 !important}
@media (max-width:420px){.create-lock-btns{flex-direction:column;align-items:stretch}}

/* ---- Sign-in window: cream Cancel, gold Sign In, both carrying the
   book's leather grain (doubled so it reads at button size) ---- */
:root .anon-modal-actions button.anon-cancel,:root .anon-modal-actions .anon-submit{color:#24180a !important;border:1px solid #5c4316 !important;
  text-shadow:none !important;opacity:1 !important;image-rendering:pixelated}
:root .anon-modal-actions button.anon-cancel{background:var(--leather-grain,none) 0 0/960px 480px,var(--leather-grain,none) 13px 7px/960px 480px,#efe5cd !important;box-shadow:inset 0 1px 0 rgba(255,250,235,.6),0 2px 4px rgba(0,0,0,.3) !important}
:root .anon-modal-actions button.anon-cancel:hover{background:var(--leather-grain,none) 0 0/960px 480px,var(--leather-grain,none) 13px 7px/960px 480px,#f7efdc !important}
:root .anon-modal-actions .anon-submit{background:var(--leather-grain,none) 0 0/960px 480px,var(--leather-grain,none) 13px 7px/960px 480px,linear-gradient(#d2aa58,#a47e36) !important;box-shadow:inset 0 1px 0 rgba(255,240,200,.5),0 2px 4px rgba(0,0,0,.3) !important}
:root .anon-modal-actions .anon-submit:hover{background:var(--leather-grain,none) 0 0/960px 480px,var(--leather-grain,none) 13px 7px/960px 480px,linear-gradient(#dcb565,#b08a40) !important}

/* ---- The copy number ("2/4") sits in the bottom-left corner of the banner ---- */
.ed-tag:not(.ed-small){left:4% !important;right:auto !important;transform:none !important;bottom:3.1% !important}
.cx-tagline .cx-tl2{white-space:nowrap}

/* ============================================================
   BATTLE SCREEN (fixes50): the umber table, a two-line header,
   square hand cards, and the once-a-match Boost
   ============================================================ */
/* header: "Your turn" big in the middle; timer + who/what on a small line */
#gameScoreBar{display:flex !important;align-items:center !important;gap:10px !important;min-height:0 !important;
  background:transparent !important;border:0 !important;box-shadow:0 1px 0 rgba(255,220,160,.06) !important;border-bottom:1px solid rgba(214,172,88,.4) !important;padding:2px 2px 12px !important;margin:0 0 14px !important}
#gameScoreBar.hidden{display:none !important}
.turn-mid{flex:1;min-width:0;display:flex;flex-direction:column;align-items:center;gap:5px}
#turnIndicator{flex:none !important;font-size:25px !important;line-height:1.05 !important;font-weight:400 !important;letter-spacing:.01em !important;white-space:nowrap;
  color:#f3e6c6 !important;text-shadow:0 2px 0 rgba(0,0,0,.45) !important}
#turnIndicator .ti-main{gap:6px}
#turnIndicator .pfp-match{width:26px;height:26px}
.turn-sub{display:flex;align-items:center;justify-content:center;gap:8px;flex-wrap:wrap;min-height:20px}
.turn-sub-text{font-family:var(--ui);font-size:13px;color:#cdb88e;white-space:nowrap}
.turn-sub-text:empty{display:none}
#turnTimer{font-size:13px !important;padding:1px 8px !important;min-width:0 !important;border-radius:999px;background:rgba(0,0,0,.35) !important;color:#f3e6c6 !important;border:1px solid rgba(214,172,88,.6) !important}
#turnTimer.warning{background:#8a6a1e !important}
#turnTimer.danger{background:#a5521a !important}
#turnTimer.urgent{background:var(--theirs) !important;color:#fff !important}
.score-label{border-color:#140c06 !important;box-shadow:0 0 0 1px rgba(214,172,88,.55),0 2px 4px rgba(0,0,0,.5) !important}
@media (max-width:600px){ #turnIndicator{font-size:21px !important} .turn-sub-text{font-size:12px} }

/* the umber table: the card backs' leather, a brass rim, sunken slots */
.arena-layer.game-active .grid-panel{background:radial-gradient(ellipse at 50% 42%,rgba(214,150,70,.22),transparent 62%),var(--leather-grain,none) 0 0/960px 480px,linear-gradient(#4a311c,#2c1c10) !important;
  border:1px solid #140c06 !important;box-shadow:0 0 0 3px #7a5a2a,0 0 0 4px #140c06,0 14px 34px rgba(0,0,0,.55) !important;padding:12px 14px 14px !important;position:relative}
.arena-layer.game-active .kardic-grid{gap:10px !important;padding:0 !important}
.board-cell:not(.occupied){background:rgba(0,0,0,.30) !important;border:1px solid rgba(214,172,88,.20) !important;box-shadow:inset 0 3px 8px rgba(0,0,0,.6),inset 0 -1px 0 rgba(255,220,160,.06) !important}
.board-cell.valid-target{background:rgba(214,172,88,.10) !important;border:1px solid rgba(214,172,88,.75) !important}
.board-cell.valid-target:hover,.board-cell.drop-highlight{background:rgba(214,172,88,.24) !important;border-color:#e8c87a !important}
.board-cell.occupied{box-shadow:0 4px 10px rgba(0,0,0,.6) !important}

/* hand: cards are square (a leftover 80x95 size made bars above and below) */
.hand-drawer .hand-card{height:auto !important;aspect-ratio:1/1 !important}
.hand-head{grid-template-columns:150px minmax(0,1fr) 150px !important}
.hand-head-right{display:flex;align-items:center;justify-content:flex-end;gap:6px}
@media (max-width:600px){ .hand-head{grid-template-columns:0 minmax(0,1fr) auto !important} .hand-head .game-hand-hint{text-align:left !important;font-size:13px !important;padding-left:2px} }

/* Boost button */
.boost-btn{display:inline-flex;align-items:center;gap:6px;font-family:var(--ui);font-size:14px;color:#24180a;cursor:pointer;padding:4px 10px 4px 7px;white-space:nowrap;
  background:var(--leather-grain,none) 0 0/960px 480px,var(--leather-grain,none) 13px 7px/960px 480px,linear-gradient(#7fa06a,#557544);border:1px solid #2a3a20;box-shadow:inset 0 1px 0 rgba(230,255,210,.4),0 2px 3px rgba(0,0,0,.4);image-rendering:pixelated}
.boost-btn svg{width:16px;height:18px}
.boost-btn small{font-size:12px;opacity:.85}
.boost-btn.hidden{display:none !important}
.boost-btn:disabled{filter:grayscale(1);opacity:.45;cursor:default}
.boost-btn.ready{outline:2px solid #e8d48a;outline-offset:1px;box-shadow:0 0 12px rgba(232,212,138,.7)}
.boost-btn:not(:disabled):hover{filter:brightness(1.08)}

/* a boosted side: the new number on a dark stamp + green arrow, drawn over the card */
.boost-mark{position:absolute !important;left:0;top:0;width:100%;height:100%;pointer-events:none;z-index:3;border:0 !important;box-shadow:none !important;image-rendering:auto !important}

/* the roll: the card big on the board, its four sides lighting in turn */
.boost-stage{position:absolute;z-index:20;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:44px;pointer-events:none;
  background:radial-gradient(circle at 50% 50%,rgba(0,0,0,.4),rgba(0,0,0,.08) 70%);opacity:0;transition:opacity .18s}
.boost-stage.on{opacity:1}
.boost-spin{position:relative;width:min(46%,170px);aspect-ratio:1}
.boost-spin > .bs-card{width:100%;height:100%;display:block;border:1px solid #140c06;box-shadow:0 10px 26px rgba(0,0,0,.65);image-rendering:pixelated;object-fit:cover}
.boost-spin > .bs-back{background:#3e3428 var(--card-back) center/cover no-repeat}
.bs-side{position:absolute;font-family:var(--ui);font-size:14px;letter-spacing:.06em;text-transform:uppercase;color:#cdb88e;background:rgba(20,12,6,.85);border:1px solid rgba(214,172,88,.35);padding:3px 8px 2px;white-space:nowrap}
.bs-side.s-top{left:50%;top:-30px;transform:translateX(-50%)}
.bs-side.s-bottom{left:50%;bottom:-30px;transform:translateX(-50%)}
.bs-side.s-left{right:calc(100% + 8px);top:50%;transform:translateY(-50%)}
.bs-side.s-right{left:calc(100% + 8px);top:50%;transform:translateY(-50%)}

.bs-side.lit{color:#24180a;background:linear-gradient(#e8c87a,#b08a40);border-color:#140c06;box-shadow:0 0 12px rgba(240,200,110,.8)}
.bs-side.won{color:#f4f8ea;background:var(--leather-grain,none) 0 0/960px 480px,linear-gradient(#7fb064,#4e7a3a);border-color:#1f2e17;box-shadow:0 0 14px rgba(150,220,110,.8)}
.bs-side.fade{opacity:.55}
.bs-caption{font-family:var(--ui);font-size:17px;color:#f3e6c6;background:rgba(20,12,6,.86);border:1px solid rgba(214,172,88,.6);padding:6px 14px;box-shadow:0 4px 10px rgba(0,0,0,.5);white-space:nowrap;max-width:94%;overflow:hidden;text-overflow:ellipsis}
.bs-caption b{color:#bfe3a5;font-weight:700}
@media (max-width:600px){ .boost-stage{gap:38px} .bs-side{font-size:12px;padding:2px 6px 1px} .bs-side.s-top{top:-26px} .bs-side.s-bottom{bottom:-26px} .bs-caption{font-size:14px;padding:5px 10px} }
@media (prefers-reduced-motion:reduce){ .boost-stage{transition:none} }
/* phones: the picked card lifts less, so it doesn't cover the hint or Boost;
   touch screens don't keep a "hover" lift after a tap; the bar stays on top */
.hand-head{position:relative;z-index:12}
@media (hover:none){ .hand-drawer .hand-card:hover:not(.selected){transform:none !important} }
@media (max-width:600px){ .hand-drawer .hand-card.selected{transform:translateY(-7px) scale(1.05) !important} }

/* ---- Coins: the Upgrade panel on your profile (was a lone "Edit card") ---- */
#myKardsSignedIn .book-actions-list{display:block !important;width:100%}
.coin-panel{display:flex;align-items:center;gap:16px;padding:12px 16px;margin:2px 0 4px;background:var(--paper-tex,none) 0 0/960px 960px,#efe6d1;border:1px solid rgba(42,32,24,.4);box-shadow:0 3px 10px rgba(0,0,0,.18);box-sizing:border-box}
.coin-ico{width:18px;height:18px;flex:none}
.coin-bal{display:flex;align-items:center;gap:10px;padding-right:16px;border-right:1px solid rgba(42,32,24,.25);flex:none}
.coin-bal .coin-ico{width:34px;height:34px}
.coin-bal b{display:block;font-family:"IM Fell English",Georgia,serif;font-size:30px;line-height:1;color:#24180a;font-weight:400}
.coin-bal small{font-family:var(--ui);font-size:12px;color:#5a4c3a;letter-spacing:.06em;text-transform:uppercase}
.coin-txt{flex:1;min-width:0;font-family:var(--ui);font-size:15px;color:#3e3428;line-height:1.35}
.coin-txt strong{color:#24180a}
.coin-txt em{font-style:normal;color:#6a5a44;font-size:13px;display:block;margin-top:2px}
.coin-btn{flex:none;font-family:var(--ui);font-size:16px;color:#24180a;padding:9px 16px;cursor:pointer;
  background:var(--leather-grain,none) 0 0/960px 480px,linear-gradient(#d2aa58,#a47e36);border:1px solid #5c4316;box-shadow:inset 0 1px 0 rgba(255,240,200,.5),0 2px 4px rgba(0,0,0,.3);image-rendering:pixelated}
.coin-btn:hover{filter:brightness(1.06)}
.coin-btn:active{transform:translate(1px,1px)}
@media (max-width:600px){ .coin-panel{flex-wrap:wrap;gap:10px 12px;padding:12px} .coin-bal{border-right:0;padding-right:0} .coin-txt{flex:1 1 100%;order:3;font-size:14px} .coin-btn{margin-left:auto} }
/* what a player vs player match paid you */
.result-coins{display:inline-flex;align-items:center;gap:6px;margin:8px auto 0;font-family:var(--ui);font-size:16px;color:#24180a;padding:4px 12px 4px 8px;
  background:var(--leather-grain,none) 0 0/960px 480px,linear-gradient(#e2bd6a,#b08a40);border:1px solid #5c4316;box-shadow:0 2px 6px rgba(0,0,0,.35);image-rendering:pixelated}
.result-coins.hidden{display:none !important}
/* the profile name: one line, shrinks to fit (two icons on the plate now) */
.plate .book-profile-name{overflow-wrap:normal !important;word-break:normal !important;white-space:nowrap;overflow:hidden}
@media (max-width:720px){ .plate .book-profile-name{padding-right:92px} }
@media (max-width:720px){ .plate #bookProfileRecord{padding-right:92px} }

/* ---- The wall: one per round, between two squares (never the outer edge).
   Brass from the board's rim, with the leather grain and a pin at each end. ---- */
.board-wall{position:absolute;z-index:5;pointer-events:none;image-rendering:pixelated;box-sizing:border-box;
  border:1px solid #140c06;box-shadow:0 0 0 1px rgba(255,226,160,.25),0 4px 9px rgba(0,0,0,.7),0 0 16px rgba(240,190,90,.5)}
.board-wall.v{background:var(--leather-grain,none) 0 0/960px 480px,linear-gradient(90deg,#5c4316,#b08a40 22%,#f0d58e 45%,#c9a254 60%,#7a5a2a 85%,#3e2c10)}
.board-wall.h{background:var(--leather-grain,none) 0 0/960px 480px,linear-gradient(180deg,#5c4316,#b08a40 22%,#f0d58e 45%,#c9a254 60%,#7a5a2a 85%,#3e2c10)}
.board-wall::before,.board-wall::after{content:"";position:absolute;width:16px;height:16px;background:linear-gradient(#f0d58e,#8a6a2a);border:1px solid #140c06;box-shadow:inset 0 0 0 2px rgba(60,40,10,.35),0 1px 2px rgba(0,0,0,.6)}
.board-wall.v::before{left:50%;top:-7px;transform:translateX(-50%)}
.board-wall.v::after{left:50%;bottom:-7px;transform:translateX(-50%)}
.board-wall.h::before{top:50%;left:-7px;transform:translateY(-50%)}
.board-wall.h::after{top:50%;right:-7px;transform:translateY(-50%)}
/* a new round's wall drops in */
.board-wall.arrive{animation:wallIn .55s cubic-bezier(.2,.9,.3,1.3)}
@keyframes wallIn{from{opacity:0;transform:scale(1.6)}60%{opacity:1}to{opacity:1;transform:scale(1)}}
/* it blocked something: a quick brass flash */
.board-wall.flash{animation:wallFlash .8s ease-out}
@keyframes wallFlash{0%{filter:brightness(1)}18%{filter:brightness(1.9);box-shadow:0 0 0 1px rgba(255,226,160,.6),0 4px 9px rgba(0,0,0,.7),0 0 30px 6px rgba(255,214,120,.9)}100%{filter:brightness(1)}}
@media (prefers-reduced-motion:reduce){ .board-wall.arrive{animation:none} .board-wall.flash{animation:none;outline:2px solid #f0d58e} }
/* handles glide onto the upright box when you let go */
.cc-card-stage.settle .cc-h,.cc-card-stage.settle .cc-art-frame{transition:left .2s ease-out,top .2s ease-out,width .2s ease-out,height .2s ease-out,transform .2s ease-out}
@media (prefers-reduced-motion:reduce){ .cc-card-stage.settle .cc-h,.cc-card-stage.settle .cc-art-frame{transition:none} }
/* Boost "ready": same size as always; a brighter green with a slow glow
   inside instead of an outline around it */
.boost-btn.ready{outline:none !important;background:var(--leather-grain,none) 0 0/960px 480px,var(--leather-grain,none) 13px 7px/960px 480px,linear-gradient(#9cc47e,#62884c) !important;
  animation:boostReady 1.8s ease-in-out infinite}
@keyframes boostReady{0%,100%{box-shadow:inset 0 1px 0 rgba(230,255,210,.45),inset 0 0 0 rgba(230,255,200,0),0 2px 3px rgba(0,0,0,.4)}
  50%{box-shadow:inset 0 1px 0 rgba(230,255,210,.6),inset 0 0 12px rgba(230,255,200,.75),0 2px 3px rgba(0,0,0,.4)}}
@media (prefers-reduced-motion:reduce){ .boost-btn.ready{animation:none;box-shadow:inset 0 0 10px rgba(230,255,200,.7),0 2px 3px rgba(0,0,0,.4)} }
/* desktop: the picked card (and a hovered one) lifts less, so it stays below the bar */
@media (min-width:601px){
  .hand-drawer .hand-card.selected{transform:translateY(-7px) scale(1.04) !important}
  .hand-head{margin-bottom:12px !important}
  .hand-drawer .hand-card:hover:not(.selected){transform:translateY(-6px) scale(1.03) !important}
}

/* ---- Battle tab: the PvP table (leather, like the game board) ---- */
.arena{position:relative;margin:4px 0 18px;padding:16px 18px 14px;color:#f3e6c6;
  background:radial-gradient(ellipse at 50% 30%,rgba(214,150,70,.22),transparent 65%),var(--leather-grain,none) 0 0/960px 480px,linear-gradient(#4a311c,#2c1c10);
  border:1px solid #140c06;box-shadow:0 0 0 3px #7a5a2a,0 0 0 4px #140c06,0 12px 28px rgba(0,0,0,.4)}
.arena-hd{display:flex;align-items:center;gap:14px;padding-bottom:12px;border-bottom:1px solid rgba(214,172,88,.4);margin-bottom:12px}
.arena-hd-text{flex:1;min-width:0}
.arena-hd h3{margin:0;font-family:"IM Fell English",Georgia,serif;font-weight:400;font-size:28px;color:#f3e6c6;text-shadow:0 2px 0 rgba(0,0,0,.45)}
.arena-hd p{margin:2px 0 0;font-family:var(--ui);font-size:14px;color:#cdb88e}
.arena-act{flex:none;margin:0 !important;width:auto !important;max-width:360px}
.arena-btn{font-family:var(--ui);font-size:17px;color:#24180a;padding:10px 18px;cursor:pointer;background:var(--leather-grain,none) 0 0/960px 480px,linear-gradient(#e2bd6a,#a47e36);border:1px solid #5c4316;box-shadow:inset 0 1px 0 rgba(255,240,200,.55),0 3px 6px rgba(0,0,0,.45)}
.arena-btn:hover{filter:brightness(1.07)}
.arena-btn:disabled{opacity:.6;cursor:default}
.arena .battle-live{display:flex;align-items:center;gap:10px;padding:8px 12px;background:rgba(0,0,0,.25);border:1px solid rgba(214,172,88,.4)}
.arena .battle-live-text{display:flex;flex-direction:column;font-family:var(--ui);font-size:13px;color:#cdb88e}
.arena .battle-live-text b{font-weight:600;font-size:15px;color:#f3e6c6}
.arena-online{display:flex;align-items:center;gap:8px;margin:0 0 12px;font-family:var(--ui);font-size:13px;color:#cdb88e}
.arena-online .dot{width:8px;height:8px;flex:none;background:#7cc25e;box-shadow:0 0 6px #7cc25e}
.arena-faces{display:inline-flex;padding-left:4px}
.arena-faces .face{display:block;width:24px;height:24px;margin-left:-4px;border:1px solid #140c06;box-shadow:0 0 0 1px rgba(214,172,88,.5);background:#2c3646;overflow:hidden}
.arena-faces .face img,.arena-faces .face svg{display:block;width:100%;height:100%;object-fit:cover;image-rendering:pixelated}
.seats{display:flex;flex-direction:column;gap:10px}
.seat{display:grid;grid-template-columns:auto minmax(0,1fr) auto auto;align-items:center;gap:14px;padding:10px 12px;
  background:linear-gradient(rgba(0,0,0,.28),rgba(0,0,0,.36));border:1px solid rgba(214,172,88,.28);box-shadow:inset 0 2px 6px rgba(0,0,0,.5)}
.seat-pic{display:block;width:54px;height:54px;border:2px solid #140c06;box-shadow:0 0 0 2px #b08a40;background:#2c3646;overflow:hidden}
.seat-pic img,.seat-pic svg{display:block;width:100%;height:100%;object-fit:cover;image-rendering:pixelated}
.seat-who{min-width:0}
.seat-who b{display:block;font-family:"IM Fell English",Georgia,serif;font-weight:400;font-size:21px;color:#f3e6c6;line-height:1.1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.seat-who span{font-family:var(--ui);font-size:13px;color:#cdb88e}
.seat-who .streak{color:#f0c46a}
.seat-who .ch-dots i{background:#d6ac58}
.seat-deck{display:flex;align-items:center;gap:10px}
.seat-best{display:flex;flex-direction:column;align-items:center}
.seat-deck .top{width:58px;height:58px;border:1px solid #140c06;box-shadow:0 3px 8px rgba(0,0,0,.6);image-rendering:pixelated;object-fit:cover}
.seat-deck small{display:block;font-family:var(--ui);font-size:11px;color:#cdb88e;text-transform:uppercase;letter-spacing:.06em;text-align:center;margin-top:3px}
.backs{position:relative;width:46px;height:44px}
.backs i{position:absolute;top:4px;width:30px;height:36px;background:#3e3428 var(--card-back) center/cover;border:1px solid #140c06;box-shadow:0 2px 4px rgba(0,0,0,.5)}
.backs i:nth-child(1){left:0;transform:rotate(-10deg)}.backs i:nth-child(2){left:8px}.backs i:nth-child(3){left:16px;transform:rotate(10deg)}
.seat-go{font-family:var(--ui);font-size:15px;color:#24180a;padding:8px 16px;background:var(--leather-grain,none) 0 0/960px 480px,linear-gradient(#e2bd6a,#a47e36);border:1px solid #5c4316;box-shadow:inset 0 1px 0 rgba(255,240,200,.55),0 2px 4px rgba(0,0,0,.45);cursor:pointer}
.seat-go:hover{filter:brightness(1.07)}
.seat-go:disabled{opacity:.6;cursor:default}
.seat.own{border-style:dashed;border-color:rgba(214,172,88,.55)}
.seat.own .seat-go{background:var(--leather-grain,none) 0 0/960px 480px,#efe6d1}
.seat.empty{grid-template-columns:auto minmax(0,1fr);opacity:.75;border-style:dashed}
.seat.empty .seat-pic{background:rgba(0,0,0,.25);box-shadow:0 0 0 1px rgba(214,172,88,.35);border-style:dashed}
.seat.empty .seat-who span{white-space:normal}
.arena-recent{margin-top:14px;padding-top:10px;border-top:1px solid rgba(214,172,88,.3);display:flex;flex-direction:column;gap:6px;font-family:var(--ui);font-size:14px;color:#e0d2b2}
.arena-recent .lbl{font-size:12px;color:#cdb88e;text-transform:uppercase;letter-spacing:.08em}
.arena-recent > div:not(.lbl){display:flex;align-items:center;gap:8px}
.arena-recent img.c{width:26px;height:26px;flex:none;border:1px solid #140c06;image-rendering:pixelated;object-fit:cover}
.arena-recent b{color:#f3e6c6;font-weight:600}
.arena-recent i{color:#f0c46a;font-style:normal}
/* ---- Practice (parchment) beside Top players ---- */
.battle-below{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.2fr);gap:18px;align-items:start}
.practice{padding:14px 16px;background:#efe6d1;border:1px solid rgba(42,32,24,.4);box-shadow:0 3px 10px rgba(0,0,0,.18)}
.practice h4{margin:0 0 4px;font-family:"IM Fell English",Georgia,serif;font-weight:400;font-size:22px;color:#24180a}
.practice p{margin:0 0 10px;font-family:var(--ui);font-size:14px;color:#4a3e30}
.practice .practice-diff{display:flex !important;gap:0 !important;margin:0 0 10px !important}
.practice .practice-diff button{flex:1;font-family:var(--ui) !important;font-size:14px !important;padding:6px 0 !important;border:1px solid rgba(42,32,24,.4) !important;background:#f6efdd !important;color:#3e3428 !important;cursor:pointer;min-height:0 !important;box-shadow:none !important;border-radius:0 !important}
.practice .practice-diff button + button{border-left:0 !important}
.practice .practice-diff button.active{background:var(--leather-grain,none) 0 0/960px 480px,linear-gradient(#6a86a8,#3f5a7c) !important;color:#fff !important}
.practice-go{width:100%;font-family:var(--ui);font-size:16px;padding:9px;border:1px solid #2a3a50;color:#fff;cursor:pointer;background:var(--leather-grain,none) 0 0/960px 480px,linear-gradient(#5a7aa0,#34507a);box-shadow:0 2px 4px rgba(0,0,0,.3)}
.practice-go:hover{filter:brightness(1.08)}

@media (max-width:700px){
  .arena{padding:14px 12px 12px}
  .arena-hd{flex-wrap:wrap} .arena-act{width:100% !important;max-width:none} .arena-btn{width:100%}
  .seat{grid-template-columns:auto minmax(0,1fr) auto;gap:10px}
  .seat-deck .backs{display:none} .seat-deck{grid-column:3;grid-row:1}
  .seat-go{grid-column:1 / -1;width:100%}
  .seat-pic{width:46px;height:46px} .seat-deck .top{width:48px;height:48px}
  .battle-below{grid-template-columns:1fr}
}

/* ---- Phone draw pad: Undo / Redo at the end of the pen-size row ---- */
.draw-m-sizerow{display:flex;align-items:center;gap:6px;width:100%}
.draw-m-sizerow .draw-m-sizes{flex:1;min-width:0}
.draw-m-hist{display:inline-flex;align-items:center;justify-content:center;width:46px;height:40px;flex:none;padding:0;cursor:pointer;color:#24180a;border:1px solid var(--line);background:var(--btn);box-shadow:0 1px 2px var(--shade)}
.draw-m-hist svg{width:22px;height:22px;image-rendering:pixelated}
.draw-m-hist.redo svg{transform:scaleX(-1)}
.draw-m-hist.is-empty{opacity:.4}
.draw-m-hist:active{transform:translate(2px,2px);box-shadow:none}
.arena .battle-live-cancel{flex:none;font-family:var(--ui);font-size:14px;color:#24180a;padding:6px 12px;cursor:pointer;border:1px solid #5c4316;background:var(--leather-grain,none) 0 0/960px 480px,#efe6d1;box-shadow:0 2px 4px rgba(0,0,0,.4)}
.arena-online.hidden{display:none}

/* ---- The binder: light and edges like the battle leather (on top of
   whatever colour the binder is) ---- */
/* light pooled near the top, falling off to the bottom and outer edge (works on any binder colour) */
.leather-panel::after{content:"";position:absolute;inset:0;pointer-events:none;z-index:0;
  background:radial-gradient(ellipse 140% 34% at 50% 4%,rgba(255,206,140,.24),transparent 72%),
    linear-gradient(rgba(0,0,0,0) 30%,rgba(0,0,0,.38)),
    linear-gradient(90deg,rgba(0,0,0,.28),transparent 22%)}
/* a brass rule where the leather meets the paper */
.book-left-panel.leather-panel::after{background:linear-gradient(90deg,transparent calc(100% - 6px),#140c06 calc(100% - 6px),#140c06 calc(100% - 5px),#b08a40 calc(100% - 5px),#7a5a2a calc(100% - 2px),#140c06 calc(100% - 2px)),
    radial-gradient(ellipse 140% 34% at 50% 4%,rgba(255,206,140,.24),transparent 72%),linear-gradient(rgba(0,0,0,0) 30%,rgba(0,0,0,.38)),linear-gradient(90deg,rgba(0,0,0,.28),transparent 22%,transparent 80%,rgba(0,0,0,.3) calc(100% - 6px))}
.book-panel > .leather-panel::after{background:linear-gradient(transparent calc(100% - 5px),#140c06 calc(100% - 5px),#140c06 calc(100% - 4px),#b08a40 calc(100% - 4px),#7a5a2a calc(100% - 1px),#140c06 calc(100% - 1px)),
    radial-gradient(ellipse 80% 120% at 50% 0%,rgba(255,206,140,.2),transparent 70%),linear-gradient(rgba(0,0,0,0) 40%,rgba(0,0,0,.3))}
.book-left-panel.leather-panel{box-shadow:inset -1px 0 0 #140c06,inset -4px 0 0 #8a6a32,inset -5px 0 0 #140c06,inset -16px 0 16px -10px rgba(0,0,0,.6) !important}
.book-panel > .leather-panel{box-shadow:inset 0 -1px 0 #140c06,inset 0 -4px 0 #8a6a32,inset 0 -5px 0 #140c06 !important}
.book-left-title{text-shadow:0 2px 0 rgba(0,0,0,.5),0 0 18px rgba(255,200,130,.25) !important}
/* tabs pressed into the leather, like the lobby seats */
:root .book-left-tab,:root .book-left-tab:not(.active){background:linear-gradient(rgba(0,0,0,.26),rgba(0,0,0,.36)) !important;border:1px solid rgba(214,172,88,.3) !important;box-shadow:inset 0 2px 6px rgba(0,0,0,.5),0 1px 0 rgba(255,230,180,.06) !important;color:#f3e6c6 !important}
:root .book-left-tab:hover{background:linear-gradient(rgba(255,230,180,.06),rgba(0,0,0,.2)) !important}
:root .book-left-tab.active{background:var(--leather-grain,none) 0 0/960px 480px,linear-gradient(#e2bd6a,#a47e36) !important;border:1px solid #5c4316 !important;color:#24180a !important;text-shadow:none !important;box-shadow:inset 0 1px 0 rgba(255,240,200,.55),0 3px 6px rgba(0,0,0,.45) !important}
:root .book-tab.active{background:var(--leather-grain,none) 0 0/960px 480px,linear-gradient(#e2bd6a,#a47e36) !important;border:1px solid #5c4316 !important;color:#24180a !important;text-shadow:none !important}

/* "Post a challenge" also carries the old pvp-create-btn class (the code
   finds it by that), whose theme rules painted plain gold over the grain */
:root .arena .arena-btn{background:var(--leather-grain,none) 0 0/960px 480px,linear-gradient(#e2bd6a,#a47e36) !important;color:#24180a !important;
  border:1px solid #5c4316 !important;border-radius:0 !important;box-shadow:inset 0 1px 0 rgba(255,240,200,.55),0 3px 6px rgba(0,0,0,.45) !important;text-shadow:none !important;
  font-family:var(--ui) !important;font-size:17px !important;font-weight:400 !important;padding:10px 18px !important;text-transform:none !important;letter-spacing:0 !important}
:root .arena .arena-btn:hover{filter:brightness(1.07);transform:none !important}

/* Collection / Gallery: both tabs stand ON the line (no overlap); the
   chosen one is the gold one, a little taller */
:root #bookSubnav{align-items:flex-end}
:root #bookSubnav .book-subnav-btn{margin-bottom:0 !important;padding:6px 16px !important;border-bottom:1px solid var(--line) !important;border-radius:3px 3px 0 0 !important}
:root #bookSubnav .book-subnav-btn.active{padding:9px 18px 7px !important;border-bottom-color:#5c4316 !important}

/* Top players: the same parchment box as Practice, heading inside */

/* ---- Practice: a little board (two top players' decks) ---- */
.mini-board-btn{display:block;width:min(240px,80%);margin:4px auto 6px;padding:0;border:0;background:none;cursor:pointer}
.mini-board-btn:focus-visible{outline:2px solid #24180a;outline-offset:4px}
.mini-board{position:relative;display:grid;grid-template-columns:repeat(4,1fr);gap:4px;padding:8px;aspect-ratio:1;box-sizing:border-box;
  background:radial-gradient(ellipse at 50% 40%,rgba(214,150,70,.25),transparent 65%),var(--leather-grain,none) 0 0/960px 480px,linear-gradient(#4a311c,#2c1c10);
  border:1px solid #140c06;box-shadow:0 0 0 3px #7a5a2a,0 0 0 4px #140c06,0 8px 18px rgba(0,0,0,.35)}
.mini-board i{position:relative;display:block;background:rgba(0,0,0,.3);box-shadow:inset 0 2px 4px rgba(0,0,0,.55);border:1px solid rgba(214,172,88,.18)}
.mini-board i img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;image-rendering:pixelated;box-sizing:border-box;border:3px solid var(--t);box-shadow:0 2px 4px rgba(0,0,0,.5)}
.mini-board i.b{--t:#3e4c62}.mini-board i.r{--t:#6a2f29}
.mini-wall{position:absolute;left:calc(50% - 2px);top:calc(8px + (100% - 16px) * .25 + 2px);width:5px;height:calc((100% - 16px) * .25 - 4px);background:linear-gradient(#e2bd6a,#8a6a32);border:1px solid #140c06;box-shadow:0 2px 4px rgba(0,0,0,.6)}
.mini-board-btn:hover .mini-board{filter:brightness(1.06)}
.mini-cap{text-align:center;font-family:var(--ui);font-size:14px;color:#4a3e30;margin:0 0 12px;min-height:1px}
.mini-cap b{font-weight:600;color:#24180a}

/* ---- Welcome (after the starter pack): just the cards, bigger, and the
   message; then on to the profile by itself ---- */
.cx-spread.cx-spread-one{grid-template-columns:1fr !important;min-height:0 !important}
.cx-spread-one .cx-pg+.cx-pg{border:0 !important}
.cx-spread-one .cx-sleeves{grid-template-columns:repeat(6,minmax(0,1fr)) !important;gap:14px !important}
.cx-spread-one .cx-ph{margin-bottom:12px}
.cx-done{flex-direction:column !important;justify-content:center !important;text-align:center;gap:4px}
.cx-welcome{display:flex;flex-direction:column;align-items:center;gap:6px}
.cx-done.on{cursor:pointer}
.cx-step[data-step="open"]:has(.cx-done.on){cursor:pointer}
.cx-next{display:flex;flex-direction:column;align-items:center;gap:6px;margin-top:10px;font-family:var(--ui);font-size:14px;color:#5e5040}
.cx-nextbar{width:180px;height:3px;background:rgba(42,32,24,.15);overflow:hidden}
.cx-nextbar i{display:block;height:100%;width:0;background:#a47e36}
.cx-done.on .cx-nextbar i{width:100%;transition:width 5.5s linear}
@media (max-width:700px){ .cx-spread-one .cx-sleeves{grid-template-columns:repeat(3,minmax(0,1fr)) !important;gap:10px !important} }
@media (prefers-reduced-motion:reduce){ .cx-done.on .cx-nextbar i{transition:none} }
.cx-spread.cx-spread-one:has(.cx-openwrap:not(.gone)){min-height:440px !important}

/* Sign out, at the foot of the binder (desktop; phones use Settings) */
.binder-signout{display:none;position:relative;z-index:1;margin:auto 14px 4px;align-items:center;justify-content:center;gap:8px;padding:7px 10px;cursor:pointer;
  font-family:var(--ui);font-size:15px;color:#e8dcc0;background:linear-gradient(rgba(0,0,0,.18),rgba(0,0,0,.28));border:1px solid rgba(214,172,88,.22);box-shadow:inset 0 2px 5px rgba(0,0,0,.4)}
.binder-signout svg{width:16px;height:16px;flex:none;image-rendering:pixelated}
.binder-signout:hover{color:#fff3d6;border-color:rgba(214,172,88,.45)}
body.signed-player .binder-signout{display:flex}
.feat-acts .feat-prof{border-color:#5c4316;color:#24180a;background:var(--leather-grain,none) 0 0/960px 480px,linear-gradient(#e2bd6a,#a47e36);box-shadow:inset 0 1px 0 rgba(255,240,200,.55),0 2px 4px rgba(0,0,0,.25)}

/* a long one-word card name breaks onto the next line instead of running
   out of the confirm window ("Print \"...\"?") */
.confirm-dialog .picker-title{overflow-wrap:anywhere}

/* Claiming a card: warm brass rays (the bright white sunburst predates the book look) */
.claim-celebrate-rays{background:repeating-conic-gradient(rgba(226,189,106,.26) 0 10deg,transparent 10deg 20deg) !important}

/* the coin icon: a 16px pixel coin (the toss coin's brass + emblem), shown at whole-pixel sizes */
.coin-ico{width:16px !important;height:16px !important;image-rendering:pixelated}
.coin-bal .coin-ico{width:32px !important;height:32px !important}

/* sign-up: the password warning asks you to confirm you wrote it down */
:root .cx-step .onboard-warn.cx-warn{background:linear-gradient(#ecd59a,#e2c47c) !important;background-image:linear-gradient(#ecd59a,#e2c47c) !important;color:#24180a !important;border:1px solid #5c4316 !important;box-shadow:inset 0 1px 0 rgba(255,245,215,.6),0 2px 4px rgba(0,0,0,.2) !important}
.cx-ack{display:flex;align-items:center;gap:8px;margin-top:8px;font-weight:600;cursor:pointer}
.cx-ack input{width:18px;height:18px;margin:0;accent-color:#24180a;flex:none;cursor:pointer}

/* the sign-up books: the cover title in capitals, like the SCRIBIA wordmark */
.cx-emboss{text-transform:uppercase;letter-spacing:.12em !important;font-size:24px !important}
@media (max-width:700px){ .cx-emboss{font-size:19px !important} }
/* Music volume: a small leather tab under the note, with a brass slider.
   The left end is off. */
.music-vol-pop{position:fixed;z-index:9600;display:none;align-items:center;gap:10px;padding:9px 12px;
  background:var(--leather-grain,none) 0 0/960px 480px,linear-gradient(#4a3a2a,#33271c);border:2px solid #000;border-radius:6px;
  box-shadow:inset 0 1px 0 rgba(255,235,190,.18),0 4px 10px rgba(0,0,0,.45);color:#e8dcc0;font-family:var(--ui);font-size:13px}
.music-vol-pop.on{display:flex}
.music-vol-pop .mv-lbl{opacity:.85}
.music-vol-pop .mv-val{min-width:26px;text-align:right;color:var(--gold);font-variant-numeric:tabular-nums}
.music-vol-pop input[type=range]{-webkit-appearance:none;appearance:none;width:130px;height:8px;margin:0;border-radius:4px;border:1px solid #000;
  background:linear-gradient(90deg,#c9a44e 0,#b08a3e var(--p,70%),#1d150e var(--p,70%));cursor:pointer}
.music-vol-pop input[type=range]::-webkit-slider-thumb{-webkit-appearance:none;width:16px;height:16px;border-radius:50%;border:2px solid #000;background:radial-gradient(circle at 35% 35%,#f1d98a,#b08a3e 60%,#7a5c22)}
.music-vol-pop input[type=range]::-moz-range-thumb{width:14px;height:14px;border-radius:50%;border:2px solid #000;background:radial-gradient(circle at 35% 35%,#f1d98a,#b08a3e 60%,#7a5c22)}
.music-vol-pop input[type=range]:focus-visible{outline:2px solid #e8d48a;outline-offset:3px}
.picker-fix{display:flex;justify-content:center;margin-top:12px;grid-column:1/-1}
/* Battle header: a fixed height, so the board never moves when the timer
   or the small line changes length (it used to wrap onto a second line) */
.turn-mid{height:58px;justify-content:center}
#turnIndicator{height:28px;max-width:100%;overflow:hidden}
#turnIndicator .ti-main{flex-wrap:nowrap !important;white-space:nowrap}
.turn-sub{flex-wrap:nowrap !important;height:20px;min-height:0;max-width:100%;overflow:hidden}
.turn-sub-text{min-width:0;overflow:hidden;text-overflow:ellipsis}
#turnTimer{flex:none;font-variant-numeric:tabular-nums}
@media (max-width:600px){ .turn-mid{height:52px} #turnIndicator{height:24px} }
/* "Your turn": a brass glow and a small lift as the turn comes to you */
.turn-mid.ti-flash #turnIndicator{animation:tiFlash 1.4s ease-out}
@keyframes tiFlash{0%{transform:scale(1);filter:none}
  18%{transform:scale(1.12);filter:brightness(1.25) sepia(.35) drop-shadow(0 0 8px rgba(240,200,110,.95)) drop-shadow(0 0 2px rgba(255,230,160,.9))}
  100%{transform:scale(1);filter:none}}
@media (prefers-reduced-motion:reduce){ .turn-mid.ti-flash #turnIndicator{animation:tiFlashCalm 1.4s ease-out} }
@keyframes tiFlashCalm{20%{filter:brightness(1.25) drop-shadow(0 0 8px rgba(240,200,110,.9))}}
/* Boost: green all match until used. On their turn it rests (no glow);
   pressed before a card is picked it waits for one, ringed in brass. */
.boost-btn.ready.waiting{animation:none;filter:saturate(.8) brightness(.92)}
.boost-btn.ready.armed{box-shadow:0 0 0 2px #140c06,0 0 0 4px #e8d48a,0 0 14px rgba(232,212,138,.8) !important;animation:none}

/* ============================================================
   BATTLE TAB (fixes67): three leather tables. Practice and Top players
   side by side on top, Player vs Player under them. Phones stack them
   Top players, Practice, PvP.
   ============================================================ */
.battle .battle-below{gap:22px;margin:4px 4px 22px;align-items:start}
.battle .battle-below > .arena{margin:0;padding:14px 16px 16px;color:#f3e6c6;
  background:radial-gradient(ellipse at 50% 30%,rgba(214,150,70,.22),transparent 65%),var(--leather-grain,none) 0 0/960px 480px,linear-gradient(#4a311c,#2c1c10);
  border:1px solid #140c06;box-shadow:0 0 0 3px #7a5a2a,0 0 0 4px #140c06,0 12px 28px rgba(0,0,0,.4)}
.battle-below .arena h4{margin:0 0 12px;padding-bottom:8px;border-bottom:1px solid rgba(214,172,88,.4);font-family:"IM Fell English",Georgia,serif;font-weight:400;font-size:22px;color:#f3e6c6;text-shadow:0 2px 0 rgba(0,0,0,.45)}
/* Practice, in leather: brass-ringed board, brass button and difficulty */
.practice.arena p{color:#cdb88e}
.practice.arena .mini-cap{color:#cdb88e} .practice.arena .mini-cap b{color:#f3e6c6}
.practice.arena .mini-board{box-shadow:0 0 0 2px #140c06,0 0 0 4px #b08a40,0 0 0 5px #140c06,0 8px 18px rgba(0,0,0,.6) !important}
.practice.arena .mini-board-btn:focus-visible{outline-color:#e8d48a}
.practice.arena .practice-diff button{background:rgba(0,0,0,.28) !important;color:#cdb88e !important;border:1px solid rgba(214,172,88,.45) !important}
.practice.arena .practice-diff button.active{background:var(--leather-grain,none) 0 0/960px 480px,linear-gradient(#e2bd6a,#a47e36) !important;color:#24180a !important;border-color:#5c4316 !important}
.practice.arena .practice-go{background:var(--leather-grain,none) 0 0/960px 480px,linear-gradient(#e2bd6a,#a47e36);color:#24180a;border:1px solid #5c4316;box-shadow:inset 0 1px 0 rgba(255,240,200,.55),0 2px 4px rgba(0,0,0,.45)}
/* Top players: seats like the lobby's */
.lb-seats .battle-lb{margin:0 !important;border:0 !important;background:transparent !important;box-shadow:none !important;padding:0 !important}
.lb-seats .lb-expandable{max-height:none !important;overflow:visible !important}
#lbList.seats{display:flex;flex-direction:column;gap:10px;margin:0;border:0;padding:0}
#lbList .seat.lb-entry{display:grid !important;grid-template-columns:auto auto minmax(0,1fr) auto !important;align-items:center;gap:12px !important;padding:8px 10px !important;border-bottom:1px solid rgba(214,172,88,.35) !important;border-radius:0 !important}
#lbList .seat.lb-entry:hover{background:inherit}
#lbList .seat.lb-you{background:inherit !important;border:1px solid #e8d48a !important}
#lbList .seat-pic{width:44px;height:44px;box-shadow:0 0 0 2px #b08a40,0 0 10px var(--aura,transparent)}
#lbList .lb-letter{display:grid;place-items:center;width:100%;height:100%;font-family:var(--ui);font-size:22px;color:#f3e6c6;background:#3e4c62}
#lbList .seat-who b{font-size:19px;color:#f3e6c6 !important;cursor:pointer;text-decoration:none !important}
#lbList .seat-who b:hover{text-decoration:underline}
#lbList .lb-meta{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:#cdb88e !important;font-size:13px !important;opacity:1 !important}
#lbList .lb-rankm{width:30px;height:30px;min-width:0 !important;border-radius:50%;display:grid;place-items:center;font-family:var(--ui) !important;font-weight:700 !important;font-size:15px !important;color:#24180a !important;border:2px solid #140c06;
  background:radial-gradient(circle at 35% 35%,#e8dcc0,#9c8f78)}
#lbList .lb-rankm.gold{background:radial-gradient(circle at 35% 35%,#f6dc8c,#b08a3e 60%,#7a5c22)}
#lbList .lb-rankm.silver{background:radial-gradient(circle at 35% 35%,#f0f0ea,#a8a89c 60%,#6e6e64)}
#lbList .lb-rankm.bronze{background:radial-gradient(circle at 35% 35%,#e8b07a,#a8643a 60%,#6e3e1e)}
#lbList .lb-wins{text-align:center;font-family:var(--ui);color:#cdb88e;font-size:11px;text-transform:uppercase;letter-spacing:.06em}
#lbList .lb-wins b{display:block;font-size:22px;color:#f0c46a;font-weight:700;letter-spacing:0;line-height:1.1}
#lbList .lb-empty{font-family:var(--ui);font-size:14px;color:#cdb88e;padding:6px 2px}
@media (max-width:700px){
  .battle .battle-below{display:flex;flex-direction:column}
  .battle .battle-below > .lb-seats{order:-1}
  .battle .battle-below > .arena{padding:14px 12px 14px}
  #lbList .seat.lb-entry{gap:10px !important}
  #lbList .lb-meta{white-space:normal}
}
/* A profile picture, big */
[data-pfp-zoom],.pfp-zoomable{cursor:zoom-in}
.pfp-zoom{position:fixed;inset:0;z-index:9800;display:none;align-items:center;justify-content:center;background:rgba(4,14,18,.82);cursor:zoom-out;padding:16px}
.pfp-zoom.on{display:flex;animation:pfpZoomIn .18s ease-out}
.pfp-zoom figure{margin:0;display:flex;flex-direction:column;align-items:center;gap:12px}
.pfp-zoom img{width:min(78vw,62vh,420px);height:min(78vw,62vh,420px);object-fit:cover;image-rendering:pixelated;border:3px solid #140c06;box-shadow:0 0 0 4px #b08a40,0 0 0 5px #140c06,0 18px 40px rgba(0,0,0,.6);background:#2c3646}
.pfp-zoom figcaption{font-family:"IM Fell English",Georgia,serif;font-size:26px;color:#f3e6c6;text-shadow:0 2px 0 rgba(0,0,0,.5)}
@keyframes pfpZoomIn{from{opacity:0}to{opacity:1}}
@media (prefers-reduced-motion:reduce){.pfp-zoom.on{animation:none}}
/* Scrollbars: a brass bar in a dark leather groove, no arrow buttons.
   (Chrome / Edge / Safari on computers; phones keep their own thin
   overlay bars, which sites can't restyle.) Areas that hide their
   scrollbar on purpose keep hiding it. */
::-webkit-scrollbar{width:12px;height:12px}
::-webkit-scrollbar-track{background:#2c1c10;box-shadow:inset 1px 0 0 #140c06,inset -1px 0 0 #140c06}
::-webkit-scrollbar-thumb{background:linear-gradient(90deg,#e2bd6a,#b08a3e 55%,#7a5c22);border:2px solid #2c1c10;border-radius:6px}
::-webkit-scrollbar-thumb:horizontal{background:linear-gradient(180deg,#e2bd6a,#b08a3e 55%,#7a5c22)}
::-webkit-scrollbar-thumb:hover{background:linear-gradient(90deg,#f0cf80,#c09a48 55%,#8a6a2a)}
::-webkit-scrollbar-button{display:none;width:0;height:0}
::-webkit-scrollbar-corner{background:#2c1c10}
.posts-expandable::-webkit-scrollbar,.lb-expandable::-webkit-scrollbar{width:12px}
.posts-expandable::-webkit-scrollbar-track,.lb-expandable::-webkit-scrollbar-track{background:#2c1c10}
.posts-expandable::-webkit-scrollbar-thumb,.lb-expandable::-webkit-scrollbar-thumb{background:linear-gradient(90deg,#e2bd6a,#b08a3e 55%,#7a5c22);border:2px solid #2c1c10;border-radius:6px}
/* Firefox only understands two colors */
@supports (-moz-appearance:none){ *{scrollbar-color:#b08a3e #2c1c10} }
/* Claim screen: the 60-second countdown */
.claim-timer{font-family:var(--ui);font-size:14px;color:#cdb88e;text-align:center;min-height:1.3em;margin:4px 0 8px;font-variant-numeric:tabular-nums}
.claim-timer.low{color:#f0a070}
/* A long name in the header line: shortened with "...", so the rest (like
   the timer) always shows */
#turnIndicator .ti-name{display:inline-block;max-width:8.5em;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;vertical-align:bottom}
/* The two score tabs: always the same width */
#scoreRed,#scoreBlue{min-width:86px;justify-content:space-between;box-sizing:border-box}
@media (max-width:600px){ #scoreRed,#scoreBlue{min-width:68px} }
/* Battle tab: Practice and Top players line up with the PvP table's edges */
.battle .battle-below{margin-left:0 !important;margin-right:0 !important}
/* Fill with: Color | Clear (only while Fill is picked). On phones it sits
   where the pen sizes are, which already hide for Fill. */
.fill-mode{display:none;align-items:center;gap:6px}
#drawFullscreenOverlay[data-tool="fill"] .fill-mode{display:flex}
.fill-mode .fm-lbl{font-family:var(--ui);font-size:13px;opacity:.8;white-space:nowrap}
.fill-mode .fm-seg{display:flex;border:1px solid rgba(42,32,24,.5)}
.fill-mode button{font-family:var(--ui);font-size:14px;padding:6px 14px;border:0;background:#f6efdd;color:#3e3428;cursor:pointer;min-height:0;box-shadow:none;border-radius:0}
.fill-mode button + button{border-left:1px solid rgba(42,32,24,.5)}
.fill-mode button.on{background:linear-gradient(#e2bd6a,#a47e36);color:#24180a}
.fill-mode .fm-sw,.fill-mode .fm-chk{display:inline-block;width:12px;height:12px;margin-right:6px;vertical-align:-1px;border:1px solid #1c1a17}
.fill-mode .fm-chk{background:repeating-conic-gradient(#c8c0b0 0 25%,#fff 0 50%) 0 0/6px 6px}
.draw-m-sizerow{position:relative}
.draw-m-sizerow .fill-mode-m{position:absolute;left:0;top:50%;transform:translateY(-50%)}
.draw-fs-body .fill-mode-fs{margin:8px 0 4px}
