/* d3.css - Direction 3 reskin for the vs-computer page only. Self-hosted fonts (no third-party font requests). */
@font-face{font-family:'Assistant';font-weight:400;font-style:normal;font-display:swap;src:url(/fonts/assistant-400.ttf) format('truetype')}
@font-face{font-family:'Assistant';font-weight:600;font-style:normal;font-display:swap;src:url(/fonts/assistant-600.ttf) format('truetype')}
@font-face{font-family:'Assistant';font-weight:700;font-style:normal;font-display:swap;src:url(/fonts/assistant-700.ttf) format('truetype')}
@font-face{font-family:'Assistant';font-weight:800;font-style:normal;font-display:swap;src:url(/fonts/assistant-800.ttf) format('truetype')}
@font-face{font-family:'Secular One';font-weight:400;font-style:normal;font-display:swap;src:url(/fonts/secular-one-400.ttf) format('truetype')}
/* =====================================================================
   BASRA — DIRECTION 3 "Warm Earth & Woven Band" — reskin override
   Append PART A at the very end of basra.css.
   Append PART B at the very end of computer-dense.css (assumes it loads
   after basra.css, which its rules already rely on).
 
   FONTS: @import is ignored when it is not at the top of a stylesheet,
   so do NOT append an @import. Add this line to the page <head> instead
   (before the stylesheets):
   <link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Assistant:wght@400;600;700;800&family=Secular+One&display=swap">
 
   Scope: colours, gradients, borders, shadows, fonts only. No sizes,
   positions, paddings or markup changes. Secular One ships one weight,
   so elements switched to it get font-weight:400 (avoids fake bold).
   ===================================================================== */
 
/* ---------------------------- PART A ------------------------------- */
 
/* Palette (for reference)
   coffee wood  #7a4a2c / #5a3420 / #3e2314
   sand felt    #f1e2c4 / #e6cfa4 / #d9bd8c
   parchment    #fbf3e3   terracotta #9c4224   deep terracotta #6b2c16
   ochre        #d99a3a   ink brown  #3d2616   secondary brown #5b3e28 */
 
/* Page ground around the table */
body{background:#f4ece0}
.compact-basra .file-card{background:#f4ece0}
.compact-basra .game,
.compact-basra .start-screen{background:radial-gradient(ellipse at 50% 20%,#fbf5ea 0%,#efe3cf 75%)}
 
/* Base type + ink */
.game,.start-screen{font-family:'Assistant',system-ui,sans-serif;color:#3d2616}
.game button{font-family:inherit}
 
/* Non-compact table (full layout) */
.game{background:radial-gradient(ellipse at 50% 45%,#f1e2c4,#d9bd8c);border-color:#5a3420}
.table-stage{background:#e6cfa4}
 
/* The table: wood rim + sand felt (existing pseudo-element) */
.compact-basra .game:before,
.compact-basra .start-screen:before{
  background:radial-gradient(ellipse at 50% 40%,#f1e2c4 0%,#e6cfa4 55%,#d9bd8c 100%);
  border-color:#5a3420;
  border-top-color:#7a4a2c;
  border-bottom-color:#3e2314;
  box-shadow:inset 0 8px 28px rgba(90,52,32,.2),0 10px 24px rgba(62,35,20,.35)
}
 
/* The ONE extra pseudo-element: woven band just inside the wood rim.
   Geometry mirrors the :before box (top/bottom 15px, left/right 5%)
   moved in by its 7px border. If the live :before geometry differs
   from basra.css, change these four offsets to match. */
.compact-basra .game:after,
.compact-basra .start-screen:after{
  content:"";
  position:absolute;
  top:22px;bottom:22px;left:calc(5% + 7px);right:calc(5% + 7px);
  padding:5px;
  border-radius:42%/10%;
  background:repeating-linear-gradient(45deg,#b5532f 0 5px,#f2dcb0 5px 8px,#d99a3a 8px 13px,#f2dcb0 13px 16px);
  -webkit-mask:linear-gradient(#000 0 0) content-box,linear-gradient(#000 0 0);
  -webkit-mask-composite:xor;
          mask:linear-gradient(#000 0 0) content-box exclude,linear-gradient(#000 0 0);
  z-index:-1;
  pointer-events:none
}
.compact-basra .game:has(.table-outcome):after{bottom:25px}
 
/* Text on the felt */
.opponent small,
.game .hand-header,
.game .table-top,
.game .round-instruction,
.game .dealer-beside-table,
.game .opening-specials,
.game .bonus,
.game .empty-message{color:#5b3e28}
.game .table-top>span:last-child{color:#6b2c16}
.compact-basra .game .opponent strong,
.compact-basra .game .hand-header strong{font-family:'Secular One',sans-serif;font-weight:400;color:#3d2616}
.basra-count{color:#5b3e28}
.basra-count b,.game .bonus b{color:#9c4224}
 
/* Settings / language toggles sitting on the page ground */
.game-settings,.language-settings{color:#6b3a22}
 
/* Score bar: parchment badge with terracotta edge (no size change) */
.compact-basra .table-score{color:#3d2616}
.compact-basra .game .table-score{
  background:#fbf3e3;
  border-color:#9c4224;
  box-shadow:0 0 0 1px #9c4224,0 3px 0 1px #6b2c16,0 10px 20px rgba(62,35,20,.25)
}
.compact-basra .game .table-score b{font-family:'Secular One',sans-serif;font-weight:400;color:#7a2f17}
.compact-basra .game .table-score .mini-count{color:#5b3e28}
/* Centre "round / target" label as a terracotta chip. Assumes it is a
   direct <small> child of .table-score; matches nothing otherwise. The
   spread shadow fakes padding so layout does not move. */
.compact-basra .game .table-score>small:not(.mini-count){
  background:#9c4224;color:#fbf0dc;border-radius:4px;box-shadow:0 0 0 3px #9c4224
}
 
/* Cards: cream face, thin inner frame line, warm shadow */
.game .playing-card,
.start-screen .playing-card{
  background:#fffaf1;
  border-color:#cdb48a;
  box-shadow:inset 0 0 0 3px #fffaf1,inset 0 0 0 4px #e3cfa6,0 5px 12px rgba(62,35,20,.3)
}
.compact-basra .game .playing-card,
.compact-basra .start-screen .playing-card{color:#2b1d14}
.game .playing-card.red-suit,
.compact-basra .game .playing-card.red-suit,
.compact-basra .start-screen .playing-card.red-suit{color:#b0302a;border-color:#d8a58e}
.game .playing-card .corner,
.game .playing-card .card-bottom,
.start-screen .playing-card .corner,
.start-screen .playing-card .card-bottom{font-family:'Secular One',sans-serif;font-weight:400}
.playing-card.chosen{outline-color:#9c4224}
.game button:focus-visible,.table-outcome .file-button:focus-visible{outline:3px solid #3d2616;outline-offset:3px}
 
/* Card just played (pending move box) */
.played-move{background:#fbf3e3;border-color:#9c4224}
.played-move>small{color:#5b3e28}
 
/* Instruction strip, empty-table badge, move note */
.compact-basra .game .round-instruction.essential{background:#fbf3e3;color:#3d2616;box-shadow:inset 0 0 0 1px #cdb48a}
.table-stage .empty-table,.table-stage .empty-message{background:#fbf3e3e8}
.game .move-note{background:#fbf3e3;color:#3d2616;border-color:#cdb48a}
 
/* Notices and celebrations */
.dealer-table-notice{background:#fbf3e3;border-color:#9c4224;color:#3d2616}
.dealer-table-notice span,.opening-countdown,.empty-table{color:#9c4224}
.game .basra-praise{background:#fbf3e3;border-color:#9c4224}
.basra-praise strong{font-family:'Secular One',sans-serif;font-weight:400;color:#6b2c16}
.compact-basra .game .last-deal-notice{background:#9c4224;border-color:#6b2c16;color:#fbf0dc;font-family:'Secular One',sans-serif;font-weight:400}
 
/* End-of-round table */
.table-outcome{color:#3d2616}
.table-outcome strong{font-family:'Secular One',sans-serif;font-weight:400;color:#6b2c16}
.table-outcome .outcome-table{background:#fbf3e3;color:#3d2616;border-color:#cdb48a}
.table-outcome .outcome-table th{color:#9c4224}
.table-outcome .outcome-table th,.table-outcome .outcome-table td{border-bottom-color:#cdb48a66}
.table-outcome .outcome-table tr:last-child td{color:#9c4224}
.table-outcome .file-button{background:#9c4224!important;color:#fbf0dc!important;border-color:#6b2c16}
 
/* Start screen */
.start-screen{color:#3d2616}
.start-score{color:#6b2c16;font-family:'Secular One',sans-serif}
.compact-basra .start-screen>.file-button{background:#9c4224!important;color:#fbf0dc!important;border-color:#6b2c16;font-family:'Secular One',sans-serif;font-weight:400}
 
/* OPTIONAL — card backs. Left untouched on purpose (blue in basra.css;
   computer-dense.css mentions an approved card-back choice). Uncomment
   only if the owner wants terracotta backs:
.card-backs i{border-color:#fbf0dc;background:repeating-linear-gradient(45deg,#9c4224,#9c4224 3px,#c96a3c 3px 6px)}
*/
 
/* ---------------------------- PART B ------------------------------- */
/* Append to the END of computer-dense.css. These rules in that file
   would otherwise override Part A with dark/cream colours that are
   unreadable on sand felt. */
 
/* computer-dense line ~10 makes the pending-card box dark green */
body .compact-basra .game .table-stage .table-round .played-move{background:#fbf3e3;border-color:#9c4224}
/* computer-dense line ~69: cream opponent hand count */
.compact-basra .game .opponent small{color:#5b3e28}
/* computer-dense line ~96: light badge; keep it, warm the ink/border */
body .compact-basra .game .table-stage .empty-message{color:#3d2616!important;border-color:#cdb48a!important}
/* computer-dense line ~19: cream header text in landscape */
@media (orientation:landscape) and (max-height:500px){
  body .compact-basra .game .table-top span{color:#3d2616!important}
}
 

/* ===== DESKTOP SCALE OVERRIDE (direction 3 preview only) ===== */
/* Turn label enlargement - all viewports (explicit user request) */
.compact-basra .game .table-top span:last-child{font-size:13px !important;font-weight:700 !important}

@media (min-width:900px){
  .compact-basra .game,.compact-basra .start-screen{height:650px !important;zoom:1.05}
  .compact-basra .game .table-stage .table-round,.compact-basra .game .table-stage .table-round:has(.played-move){top:185px !important;height:238px !important;align-content:center}
  .compact-basra .game .hand-header{top:430px !important}
  .compact-basra .game .round-cards:not(.table-round){top:460px !important}
  .compact-basra .game .round-instruction.essential,.compact-basra .round-error{top:563px !important}
  .compact-basra .game .basra-count{top:610px !important}
  .compact-basra .game .character-scene{top:190px !important}
  .compact-basra .game .table-top span:last-child{font-size:14px !important;font-weight:700 !important}
}
@media (min-width:900px) and (min-height:800px){
  .compact-basra .game,.compact-basra .start-screen{zoom:1.22}
}
@media (min-width:900px) and (max-height:699px){
  .compact-basra .game,.compact-basra .start-screen{zoom:1}
}

/* ===== V5 PREVIEW: computer-side backs + captured piles (local preview only; real binding = owner JS) ===== */
/* move computer hand backs beside the computer label instead of the far left corner */
.compact-basra .game .opponent .card-backs{margin-right:0 !important;margin-left:10px;transform:scale(.75) !important;transform-origin:right center}
/* captured piles beside each player (simulated static state for position review) */
.capture-pile{position:absolute;z-index:6;text-align:center;font-family:Assistant,sans-serif;pointer-events:none}
.capture-pile .stack{position:relative;display:block;width:20px;height:30px;margin:0 auto}
.capture-pile .stack i{position:absolute;inset:0;display:block;border:1.5px solid #214b8e;border-radius:3px;background:repeating-linear-gradient(45deg,#2159a3,#2159a3 3px,#6599df 3px,#6599df 6px)}
.capture-pile .stack i:nth-child(1){transform:translate(4px,-4px)}
.capture-pile .stack i:nth-child(2){transform:translate(2px,-2px)}
.capture-pile b{display:block;margin-top:5px;font-size:11px;font-weight:800;color:#3d2616}
.pile-computer{top:112px;left:12%}
.pile-player{bottom:54px;right:13%}

/* phone: number beside the stack so it does not run into the characters */
@media (max-width:600px){
  .capture-pile .stack{display:inline-block;vertical-align:middle;margin:0 4px 0 0}
  .capture-pile b{display:inline-block;vertical-align:middle;margin:0}
  .pile-computer{top:94px}
  .pile-player{right:56px;bottom:56px}
}
.compact-basra .game:has(.table-outcome) .capture-pile.pile-player{bottom:96px}
.compact-basra .game:has(.table-outcome) .capture-pile.pile-player .stack{display:block;margin:0 auto}
.compact-basra .game:has(.table-outcome) .capture-pile.pile-player b{display:block;margin-top:3px}
@media (max-width:600px){
  .compact-basra .game:has(.table-outcome) .capture-pile.pile-player{bottom:84px}
}

/* Round/target chip text: force cream on terracotta (contrast fix) */
.compact-basra .game .table-score>small:not(.mini-count),
.compact-basra .game .table-score>small:not(.mini-count) *{color:#fbf0dc!important}

/* Short landscape (e.g. 568x320): lift the hand so the card bottoms are not clipped by the frame */
@media (max-height:340px){
  .compact-basra .game .hand-header,
  .compact-basra .game .round-cards:not(.table-round){transform:translateY(-14px)}
}

/* Short landscape: keep both capture piles in the free area beside the table cards, off the characters */
@media (max-height:340px){
  .pile-computer{top:150px;left:150px}
  .pile-player{bottom:30px;right:150px}
}
