/* ===== "Driftwood & parchment" theme: warm paper panels, plank headers, stitched edges ===== */
:root{
  --ink:#2e2433;--panel:#fcf2dc;--panel-2:#f3e1bd;--panel-3:#ead2a3;--wood:#9a6338;--wood-d:#6e4426;--wood-l:#c58b57;--gold:#f2b632;--teal:#2f8f8a;
  --paper:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .45 0 0 0 0 .3 0 0 0 0 .15 0 0 0 .09 0'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
  --fibers:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='f'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.012 .3' numOctaves='2' seed='4'/%3E%3CfeColorMatrix values='0 0 0 0 .5 0 0 0 0 .32 0 0 0 0 .15 0 0 0 .07 0'/%3E%3C/filter%3E%3Crect width='220' height='220' filter='url(%23f)'/%3E%3C/svg%3E");
  --grain:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='60'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.006 .55' numOctaves='3' seed='9'/%3E%3CfeColorMatrix values='0 0 0 0 .2 0 0 0 0 .1 0 0 0 0 .03 0 0 0 .35 0'/%3E%3C/filter%3E%3Crect width='300' height='60' filter='url(%23g)'/%3E%3C/svg%3E");
}
.mcard{outline:2px dashed rgba(122,78,40,.28);outline-offset:-9px}
.mcard h2{color:var(--wood-d)}
.sheet,.panel,#coach,#info,.mcard{background:var(--paper),var(--fibers),radial-gradient(120% 90% at 50% 0%,#fff9ea 0%,var(--panel) 55%,#f6e6c4 100%);position:relative}
.sheet::after,.panel::after,#coach::after{content:'';position:absolute;inset:6px;border:2px dashed rgba(122,78,40,.28);border-radius:inherit;pointer-events:none}
.sheet::after{border-radius:16px}.panel::after{border-radius:11px}#coach::after{border-radius:11px}
/* plank header */
.sheet header{background:var(--grain),linear-gradient(180deg,var(--wood-l) 0%,var(--wood) 55%,var(--wood-d) 100%);border-bottom:3px solid var(--ink);border-radius:19px 19px 0 0;position:relative;z-index:1;
  box-shadow:inset 0 2px 0 rgba(255,230,190,.45),inset 0 -3px 0 rgba(0,0,0,.18)}
.sheet header::before{content:'';position:absolute;left:10px;right:10px;top:50%;height:2px;background:rgba(60,32,14,.35);box-shadow:0 1px 0 rgba(255,220,170,.25);pointer-events:none}
.sheet header h2{color:#fff6e2;-webkit-text-stroke:5px var(--ink);paint-order:stroke fill;position:relative;letter-spacing:.01em}
.sheet header h2::before{content:'';display:inline-block;width:9px;height:9px;border-radius:50%;background:#d9c19a;border:2px solid var(--ink);margin-right:8px;vertical-align:4px;-webkit-text-stroke:0}
.sheet header .x,.sheet header button{position:relative}
/* section headings as little ribbons */
.cat{display:flex;align-items:center;gap:8px;color:var(--wood-d)}
.cat::before,.cat::after{content:'';height:3px;flex:0 0 14px;border-radius:2px;background:linear-gradient(90deg,transparent,var(--wood-l))}
.cat::after{flex:1;background:linear-gradient(90deg,var(--wood-l),transparent)}
/* cards, rows,.order,.jrow,.tile,.krow,.bcard,.req,.wcard,.partc{background-image:var(--paper),linear-gradient(180deg,#fbeccc,var(--panel-2))}
.order,.jrow,.tile,.krow{box-shadow:inset 0 2px 0 rgba(255,255,255,.55),inset 0 -2px 0 rgba(122,78,40,.12)}
.jrow{border:2px solid rgba(122,78,40,.25)}
.bcard{background-image:var(--paper),linear-gradient(180deg,#fff6e0 0%,#f3dfb6 100%)}
.bcard.hl{box-shadow:0 3px 0 var(--ink),0 0 0 4px var(--gold)}
/* dark info bar becomes a sea-blue banner with a wave edge */
.pts{background:radial-gradient(140% 120% at 0% 0%,#3aa6b0 0%,#226d86 55%,#1b4f6e 100%);color:#fff7e6;border:3px solid var(--ink);position:relative;overflow:hidden}
.pts::after{content:'';position:absolute;left:0;right:0;bottom:-2px;height:10px;opacity:.35;background:radial-gradient(circle at 10px -2px,transparent 9px,#fff 10px,transparent 11px) 0 0/20px 10px repeat-x;pointer-events:none}
.pts b{color:var(--gold);-webkit-text-stroke:4px var(--ink);paint-order:stroke fill}
/* segmented buttons and chips */
.seg{background:var(--panel-3);box-shadow:0 3px 0 var(--ink)}
.seg button{background:transparent}.seg button.on{background:linear-gradient(180deg,#ffd76a,var(--gold));box-shadow:inset 0 -3px 0 rgba(0,0,0,.15)}
.tchips button{background-image:var(--paper),linear-gradient(180deg,#fff7e3,#f1dcb2);box-shadow:0 2px 0 var(--ink)}
.tchips button.on{background:linear-gradient(180deg,#3a7f8f,#22566a);color:#fff7e6}
/* buttons get a tactile top highlight */
.pbtn{background-image:linear-gradient(180deg,rgba(255,255,255,.55),rgba(255,255,255,0) 55%);background-color:var(--panel-2)}
.pbtn.gold{background-color:var(--gold)}.pbtn.go{background-color:var(--leaf)}
/* bottom nav: carved wooden tiles */
.nav button{background:var(--grain),linear-gradient(180deg,#f9e7c4,#e8c99a);box-shadow:0 3px 0 var(--ink),inset 0 2px 0 rgba(255,255,255,.6)}
.nav button.on{background:var(--grain),linear-gradient(180deg,#ffdc7a,var(--gold))}
/* HUD chips and resources */
.chip,.res{background-image:var(--paper),linear-gradient(180deg,#fffaf0,var(--panel))}
.chip.coin{background-image:var(--paper),linear-gradient(180deg,#fff2c4,#ffe08a)}
/* modals dim with a warm vignette */
.modal{background:radial-gradient(ellipse at center,rgba(46,36,51,.35),rgba(46,36,51,.62))}
/* coach card ribbon */
#coach small{color:var(--wood)}
/* scrollbars */
.sheet .body::-webkit-scrollbar{width:10px}.sheet .body::-webkit-scrollbar-thumb{background:var(--wood-l);border:3px solid var(--panel);border-radius:8px}
.hwrap>.harr{background:linear-gradient(180deg,#fff6e0,#f0d7a6)}
