/* Not Splendor on phones: dark velvet first, then the ivory light overrides. */
body.g-notsplendor { font-family: "Avenir Next", "Inter", -apple-system, "Helvetica Neue", Arial, sans-serif; }
body.g-notsplendor .h1, body.g-notsplendor .h2 { font-family: "Didot", "Bodoni 72", "Spectral", Georgia, serif; font-style: italic; letter-spacing: 0; }
.spp { display: flex; flex-direction: column; gap: 10px; padding-bottom: 330px; }
.spp-round { margin-left: auto; font-size: 13px; color: var(--muted); font-weight: 700; white-space: nowrap; }
.spp-round i { font-style: normal; background: #e9c877; color: #2a1d05; border-radius: 999px; padding: 2px 8px; font-weight: 800; }
.spp-turnbar { display: flex; align-items: center; gap: 10px; border-radius: 18px; padding: 12px 14px; font-size: 16px; }
.spp-turnbar.me { flex-direction: column; align-items: stretch; gap: 3px; background: linear-gradient(120deg, #f6d77a, #e0a82c); color: #2a1d05; box-shadow: 0 10px 30px rgba(224,168,44,.45); animation: spp-popin .35s cubic-bezier(.2,1.4,.4,1) both, spp-throb 1.6s ease-in-out .4s infinite; }
.spp-turnbar.me .row { display: flex; align-items: center; }
.spp-turnbar.me b { font-family: "Didot", "Bodoni 72", "Spectral", Georgia, serif; font-size: 32px; font-weight: 700; font-style: italic; letter-spacing: .01em; line-height: 1; }
.spp-turnbar.me > span { font-size: 15px; font-weight: 700; }
.spp-turnbar.me u { text-decoration: none; background: rgba(42,29,5,.14); border-radius: 999px; padding: 0 6px; }
.spp-turnbar.me .spp-round { color: rgba(42,29,5,.7); }
.spp-turnbar.idle { background: rgba(0,0,0,.3); border: 1px solid rgba(233,200,119,.16); color: var(--label-2); }
.spp-turnbar.idle b { color: var(--text); }
.spp-turnbar.idle small { display: block; font-size: 12px; }
@keyframes spp-popin { from { transform: scale(.85); opacity: 0; } }
@keyframes spp-throb { 50% { box-shadow: 0 10px 40px rgba(224,168,44,.75); transform: scale(1.012); } }
body.spp-myturn::after { content: ''; position: fixed; inset: 0; pointer-events: none; z-index: 15; box-shadow: inset 0 0 0 5px #e9b730, inset 0 0 50px rgba(233,183,48,.45); animation: spp-frame 1.6s ease-in-out infinite; }
@keyframes spp-frame { 50% { box-shadow: inset 0 0 0 7px #e9b730, inset 0 0 80px rgba(233,183,48,.6); } }
.spp.waiting .spp-dock .ndp-fan, .spp.waiting .spp-wait { opacity: .6; filter: saturate(.75); transition: opacity .3s; }
.spp.waiting .ndp-fan .spcard.peeking { opacity: 1; }
.spp-opps { display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); gap: 6px; }
.spp-opp { display: flex; align-items: center; gap: 5px; min-width: 0; background: rgba(0,0,0,.26); border-radius: 999px; padding: 3px 8px 3px 3px; font-size: 13px; font-weight: 700; border: 2px solid transparent; }
.spp-opp .avatar.sm { flex: none; }
.spp-opp.turn { border-color: #e9c877; }
.spp-opp .nm { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.spp-opp .pt { font-family: "Didot", "Bodoni 72", "Spectral", Georgia, serif; font-size: 18px; color: #f3e3b5; }
.spp-opp .ct { display: inline-flex; align-items: center; gap: 3px; background: rgba(255,255,255,.12); border-radius: 999px; padding: 0 7px; font-size: 12px; font-variant-numeric: tabular-nums; }
.spp-opp .ct .dot { width: 8px; height: 8px; border-radius: 50%; background: conic-gradient(#d1203a 0 25%, #2563c9 0 50%, #13945c 0 75%, #e3b23c 0); display: inline-block; }
.spp-opp .ct .rs { width: 7px; height: 10px; border-radius: 2px; background: #8a3346; box-shadow: 0 0 0 1px #c9a24a; display: inline-block; }

.spp-nobles { display: flex; flex-direction: column; gap: 6px; }
.spp-cap { display: flex; justify-content: space-between; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; font-weight: 800; color: rgba(243,227,181,.6); padding: 0 2px; }
.spp-nrow { display: flex; gap: 8px; }
.spp-nrow .spnoble { cursor: pointer; }

.spp-market { display: flex; flex-direction: column; gap: 6px; }
.spp-row { display: flex; gap: 6px; align-items: center; }
.spp-deck { position: relative; width: 46px; flex: none; display: flex; flex-direction: column; align-items: center; gap: 2px; cursor: pointer; margin-right: 4px; }
.spp-deck b { background: rgba(10,8,14,.88); color: #f3e3b5; border-radius: 999px; padding: 0 6px; font-size: 11px; font-weight: 800; line-height: 15px; }
.spp-deck.on .spcard { box-shadow: 0 0 0 3px #e9c877, 0 6px 14px rgba(0,0,0,.4); }
.spp-empty { width: 100%; aspect-ratio: 5 / 7; border-radius: 5px; border: 1.5px dashed rgba(233,200,119,.35); display: block; }
.spp-market .spcard { cursor: pointer; transition: transform .15s, filter .2s, box-shadow .2s; }
.spp-market .spcard.lit { box-shadow: 0 0 0 2.5px #e9c877, 0 0 16px rgba(233,200,119,.55), 0 4px 10px rgba(0,0,0,.4); transform: translateY(-2px); }
.spp-market .spcard.dim { filter: saturate(.75) brightness(.86); }
.spp-market .spcard.picked { box-shadow: 0 0 0 3px #fff, 0 0 0 6px #e9c877, 0 6px 14px rgba(0,0,0,.45); transform: translateY(-3px); }

.spp-purse { background: rgba(0,0,0,.34); border: 1px solid rgba(233,200,119,.2); border-radius: 16px; padding: 7px 10px 8px; display: flex; flex-direction: column; gap: 5px; margin-bottom: 8px; }
.spp-plabel { display: flex; justify-content: space-between; align-items: baseline; white-space: nowrap; gap: 8px; font-size: 10px; letter-spacing: .1em; text-transform: uppercase; font-weight: 800; color: rgba(243,227,181,.65); }
.spp-plabel b { font-family: "Didot", "Bodoni 72", "Spectral", Georgia, serif; font-size: 18px; color: #f3e3b5; letter-spacing: 0; }
.spp-cols { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 0; justify-items: center; }
.spp-col { display: flex; flex-direction: row; align-items: center; gap: 2px; }
.spp-col .sp-mini { width: 20px; height: 28px; border-radius: 4px; font-size: 14px; }
.spp-col .sp-mini.ghost { background: transparent; box-shadow: none; }
.spp-col .sp-tok .sp-tokn { font-size: 12px; }
.spp-mynob { width: 26px; height: 26px; font-size: 13px !important; display: flex; flex-direction: column; align-items: center; justify-content: center; border-radius: 50%; background: radial-gradient(circle, #f3e9d4 0 55%, #c9a24a 56%); color: #3a2a0c; font-family: "Didot", "Bodoni 72", "Spectral", Georgia, serif; font-size: 17px; font-weight: 700; line-height: .9; }
.spp-mynob small { font-family: var(--font); font-size: 6px; letter-spacing: .05em; text-transform: uppercase; }
.spp-plegend { font-size: 11px; color: var(--muted); text-align: center; }
/* the bonus chips (same look as the TV) */
.sp-mini { display: flex; align-items: center; justify-content: center; font-style: normal; font-weight: 800; color: #fff; text-shadow: 0 1px 3px rgba(0,0,0,.6); box-shadow: 0 0 0 1.5px rgba(255,248,232,.85), 0 3px 8px rgba(0,0,0,.4); }
.sp-mini.b-diamond { background: linear-gradient(160deg, #ffffff, #b9c8d6); color: #1d2a33; text-shadow: none; }
.sp-mini.b-sapphire { background: linear-gradient(160deg, #4f86e6, #173f8c); }
.sp-mini.b-emerald { background: linear-gradient(160deg, #2fbb78, #0b5c36); }
.sp-mini.b-ruby { background: linear-gradient(160deg, #ec4a60, #8a0f22); }
.sp-mini.b-onyx { background: linear-gradient(160deg, #57525f, #121016); }
.sp-mini.zero { opacity: .3; }

/* the dock: actions and the reserved fan */
.spp-dock { background: linear-gradient(to top, rgba(14,10,22,.96) 72%, rgba(14,10,22,0)); }
.spp-acts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-bottom: 4px; }
.spp-act { min-height: 62px; border-radius: 14px; border: 1px solid rgba(233,200,119,.45); background: linear-gradient(180deg, rgba(60,40,70,.9), rgba(30,20,40,.95)); color: #f3e3b5; font-size: 13px; font-weight: 800; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; cursor: pointer; padding: 6px 2px; }
.spp-act .ic { display: flex; align-items: center; justify-content: center; gap: 1px; height: 22px; }
.spp-act .ic .sp-gemsvg { width: 18px; height: 18px; }
.spp-act .ic .spcard { box-shadow: 0 1px 3px rgba(0,0,0,.5); }
.spp-act:disabled { opacity: .32; }
.spp-act:active { transform: scale(.97); }
.spp-buyic { min-width: 22px; height: 22px; border-radius: 999px; background: #e9c877; color: #2a1d05; display: inline-flex; align-items: center; justify-content: center; font-size: 13px; padding: 0 6px; }
.spp-wait { text-align: center; font-size: 15px; font-weight: 700; color: var(--muted); padding: 8px 0; min-height: 22px; }
.spp-fan { height: calc(var(--cw) * 1.4 + 22px); }
.ndp-fan .spcard { position: absolute; top: 12px; transform-origin: 50% 100%; transition: transform .18s ease, filter .2s; cursor: pointer; }
.ndp-fan .spcard.peeking { translate: 0 -24px; z-index: 60 !important; }
.ndp-fan .spcard.lit { box-shadow: 0 0 0 3px #e9c877, 0 0 18px rgba(233,200,119,.5), 0 6px 16px rgba(0,0,0,.35); }
.spp-nores { margin-top: 8px; border: 1.5px dashed rgba(233,200,119,.3); border-radius: 12px; padding: 8px; text-align: center; font-size: 12px; color: var(--muted); }

/* sheets */
.spp-sheet { background: #1b1424; border-color: rgba(233,200,119,.35); }
.spp-sheet.wide { max-height: 84vh; }
.spp-big { --cw: min(46vw, 190px); }
.spp-bignoble .spnoble { --nw: min(52vw, 200px); }
.spp-gems { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 4px; }
.spp-gbtn { background: rgba(255,255,255,.05); border: 2px solid transparent; border-radius: 14px; padding: 8px 2px 6px; display: flex; flex-direction: column; align-items: center; gap: 6px; color: var(--text); font-size: 12px; font-weight: 700; cursor: pointer; }
.spp-gbtn.on { border-color: #e9c877; background: rgba(233,200,119,.18); transform: translateY(-3px); }
.spp-gbtn:disabled { opacity: .3; }
.btn.spp-two { display: flex; align-items: center; gap: 4px; text-align: left; min-height: 56px; }
.btn.spp-two span:not(.sp-tok):not(.sp-tokin) { margin-left: 8px; }
.btn.spp-two small { margin-left: auto; color: var(--muted); font-size: 13px; font-weight: 600; }
.spp-drow { display: flex; align-items: center; gap: 10px; }
.spp-drow .nm { flex: 1; font-weight: 700; }
.spp-drow b { width: 26px; text-align: center; font-size: 20px; }
.spp-pm { width: 44px; height: 44px; border-radius: 12px; border: 1px solid rgba(233,200,119,.4); background: rgba(255,255,255,.06); color: var(--text); font-size: 22px; font-weight: 800; }
.spp-pm:disabled { opacity: .3; }
.spp-nchoice { display: flex; gap: 12px; justify-content: center; }
.spp-nbtn { background: none; border: none; padding: 0; cursor: pointer; }
.spp-blist { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.spp-bitem { background: rgba(255,255,255,.04); border: 2px solid transparent; border-radius: 14px; padding: 6px; display: flex; flex-direction: column; align-items: center; gap: 6px; cursor: pointer; color: var(--text); }
.spp-bitem.on { border-color: #e9c877; background: rgba(233,200,119,.16); }
.spp-bitem small { font-size: 11px; color: var(--muted); }
.spp-bpay { display: flex; flex-wrap: wrap; justify-content: center; gap: 1px; max-width: 84px; }
.spp-pi { width: 15px; height: 15px; }
.spp-free { font-size: 12px; font-weight: 800; color: #30d158; }
.spp-sheet .spp-market { align-items: center; }
.spp-sheet .spp-market .spcard.dim { filter: none; }

/* final */
.spp-final .spp-crown { width: 84px; height: 84px; filter: drop-shadow(0 10px 24px rgba(0,0,0,.4)); }
.spp-crown .sp-gemsvg { width: 100%; height: 100%; }
.spp-standing { width: 100%; max-width: 360px; display: flex; flex-direction: column; gap: 6px; }
.spp-strow { display: flex; align-items: center; gap: 10px; background: rgba(0,0,0,.25); border-radius: 14px; padding: 8px 12px; }
.spp-strow .nm { flex: 1; text-align: left; font-weight: 700; }
.spp-strow .pts { font-family: "Didot", "Bodoni 72", "Spectral", Georgia, serif; font-size: 24px; font-weight: 700; }
.spp-strow small { color: var(--muted); width: 60px; text-align: right; }

/* ---- light: ivory silk ---- */
[data-theme="light"] .spp-turnbar.idle, [data-theme="light"] .spp-opp, [data-theme="light"] .spp-purse { background: rgba(255,255,255,.78); border-color: rgba(201,162,74,.3); box-shadow: 0 4px 14px rgba(120,90,30,.08); }
[data-theme="light"] .spp-round i { background: #2a1d05; color: #f3e3b5; }
[data-theme="light"] .spp-opp.turn { border-color: #b98a2c; }
[data-theme="light"] .spp-opp .pt, [data-theme="light"] .spp-plabel b { color: #5a3e0e; }
[data-theme="light"] .spp-opp .ct { background: rgba(0,0,0,.07); }
[data-theme="light"] .spp-cap, [data-theme="light"] .spp-plabel { color: rgba(107,74,18,.75); }
[data-theme="light"] .spp-deck b { background: #fffaf0; color: #5a3e0e; box-shadow: 0 0 0 1px rgba(201,162,74,.6); }
[data-theme="light"] .spp-empty { border-color: rgba(154,109,22,.35); }
[data-theme="light"] .spp-market .spcard.lit { box-shadow: 0 0 0 2.5px #b98a2c, 0 0 14px rgba(185,138,44,.45), 0 4px 10px rgba(80,60,20,.25); }
[data-theme="light"] .spp-market .spcard.dim { filter: saturate(.7) opacity(.78); }
[data-theme="light"] .sp-mini { box-shadow: 0 0 0 1.5px #fff, 0 2px 6px rgba(80,60,20,.25); }
[data-theme="light"] .spp-dock { background: linear-gradient(to top, rgba(250,245,234,.97) 72%, rgba(250,245,234,0)); }
[data-theme="light"] .spp-act { background: linear-gradient(180deg, #fffaf0, #f1e5c9); color: #3a2a0c; border-color: rgba(154,109,22,.5); box-shadow: 0 3px 10px rgba(120,90,30,.12); }
[data-theme="light"] .ndp-fan .spcard.lit { box-shadow: 0 0 0 3px #b98a2c, 0 6px 16px rgba(80,60,20,.25); }
[data-theme="light"] .spp-nores { border-color: rgba(154,109,22,.3); }
[data-theme="light"] .spp-sheet { background: #fffaf2; border-color: rgba(201,162,74,.4); }
[data-theme="light"] .spp-gbtn { background: rgba(120,90,30,.06); }
[data-theme="light"] .spp-gbtn.on, [data-theme="light"] .spp-bitem.on { background: rgba(233,200,119,.3); border-color: #b98a2c; }
[data-theme="light"] .spp-bitem { background: rgba(120,90,30,.05); }
[data-theme="light"] .spp-pm { background: #fff; border-color: rgba(154,109,22,.4); }
[data-theme="light"] .spp-strow { background: rgba(255,255,255,.75); }
[data-theme="light"] .spp-free { color: #1f8f3a; }

/* ---- motion: new cards slide in, gems and cards fly home, big moments ---- */
.spp-market .spcard.spp-in { animation: spp-in .5s cubic-bezier(.2,1.1,.35,1) both; }
.ndp-fan .spcard.spp-in { animation: spp-fanin .55s cubic-bezier(.2,1.1,.35,1) both; }
@keyframes spp-in { from { transform: translateX(-30px) rotateY(70deg); opacity: 0; } }
@keyframes spp-fanin { from { translate: 0 -45vh; scale: .5; opacity: 0; } 60% { opacity: 1; } }
.spp-ghost { position: fixed; left: 0; top: 0; z-index: 70; pointer-events: none; transform-origin: 50% 50%; }
.spp-ghost .spcard { box-shadow: 0 18px 36px rgba(0,0,0,.45); }
.spp-pop { animation: spp-pop .4s cubic-bezier(.2,1.5,.4,1); }
@keyframes spp-pop { 40% { transform: scale(1.3); filter: brightness(1.25); } }
.spp-moment { position: fixed; inset: 0; z-index: 90; pointer-events: none; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding: 24px; text-align: center; background: radial-gradient(circle, color-mix(in srgb, var(--pc) 45%, rgba(20,12,30,.6)), rgba(10,6,16,.82) 75%); animation: spp-moment 2.8s ease both; }
@keyframes spp-moment { 0% { opacity: 0; } 8% { opacity: 1; } 82% { opacity: 1; } 100% { opacity: 0; } }
.spp-moment .art { width: 150px; height: 160px; animation: spp-slam .55s cubic-bezier(.2,1.5,.4,1) both; filter: drop-shadow(0 16px 30px rgba(0,0,0,.5)); }
.spp-moment .art.gem { width: 120px; height: 120px; }
.spp-moment .art svg { width: 100%; height: 100%; display: block; }
.spp-moment .big { font-family: "Didot", "Bodoni 72", "Spectral", Georgia, serif; font-style: italic; font-weight: 700; font-size: 44px; line-height: 1; color: #f3e3b5; text-shadow: 0 3px 0 rgba(0,0,0,.4), 0 0 30px rgba(233,200,119,.45); animation: spp-slam .5s .08s cubic-bezier(.2,1.5,.4,1) both; }
.spp-moment.k-final .big, .spp-moment.k-win .big { font-size: 52px; color: #ffd76a; }
@keyframes spp-slam { from { transform: scale(2.4); opacity: 0; } }
.spp-moment .who { display: flex; align-items: center; gap: 8px; background: rgba(0,0,0,.7); color: #fff; font-size: 17px; font-weight: 800; padding: 8px 16px 8px 8px; border-radius: 999px; max-width: 92vw; border: 1px solid rgba(233,200,119,.5); }
.spp-moment .avatar { width: 38px; height: 38px; font-size: 17px; }

.spp-turnbar.me.steady { animation: spp-throb 1.6s ease-in-out infinite; }
.ndp-ov.noanim, .ndp-ov.noanim .ndp-bigcard { animation: none; }
.spp-sheet .btn.primary { background: linear-gradient(180deg, #f2cf6b, #d9a032); color: #2a1d05; font-weight: 800; }
.spp-sheet .btn.primary:disabled { opacity: .45; }
.spp-sheet .btn { background: rgba(255,255,255,.08); }
.spp-sheet .btn.ghost { background: transparent; color: #e9c877; }
[data-theme="light"] .spp-sheet .btn { background: rgba(120,90,30,.08); }
[data-theme="light"] .spp-sheet .btn.primary { background: linear-gradient(180deg, #f2cf6b, #d9a032); }
[data-theme="light"] .spp-sheet .btn.ghost { background: transparent; color: #8a5a00; }

.spp-opps.n4 .spp-opp .ct { display: none; }
.spp-opp .avatar.sm { width: 24px; height: 24px; font-size: 12px; }
