/* Not Rivals for Catan on the phone: parchment panels on the wooden table, your
   principality in a sideways scroller, the hand fanned in the dock. Dark first, then light. */
body.g-notrivals .h2, body.g-notrivals .rvp-turnbar.me b, body.g-notrivals .rvp-myvp b { font-family: "IM Fell English SC", Georgia, serif; font-weight: 400; letter-spacing: .02em; }
.rvp { display: flex; flex-direction: column; gap: 9px; padding-bottom: 188px; min-width: 0; max-width: 100%; }
.rvp > * { min-width: 0; }
.rvp-turnbar { position: relative; display: flex; align-items: center; gap: 10px; border-radius: 16px; padding: 10px 12px; font-size: 15px; min-height: 58px; }
.rvp-turnbar.me { flex-direction: column; align-items: flex-start; justify-content: center; gap: 2px; padding-right: 96px; background: linear-gradient(120deg, #ffd60a, #ffb000); color: #1b1b1b; box-shadow: 0 10px 30px rgba(255,190,0,.45); animation: rvp-throb 1.6s ease-in-out .4s infinite; }
.rvp-turnbar.me.pop { animation: rvp-pop .35s cubic-bezier(.2,1.4,.4,1) both, rvp-throb 1.6s ease-in-out .4s infinite; }
.rvp-turnbar.me b { font-size: 30px; line-height: 1; }
.rvp-turnbar.me > span { font-size: 15px; font-weight: 700; line-height: 1.25; }
.rvp-turnbar.idle { background: linear-gradient(180deg, rgba(58,43,24,.92), rgba(38,28,15,.94)); border: 1.5px solid #8a6b3a; color: rgba(243,227,191,.75); padding-right: 96px; }
.rvp-turnbar.idle b { color: #f3e3bf; }
.rvp-turnbar.idle small { display: block; font-size: 13px; margin-top: 2px; }
.rvp-dice { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); display: flex; gap: 6px; }
.rvp-dice .rv-die, .rvp-dice .rv-evdie { --ds: 36px; }
@keyframes rvp-pop { from { transform: scale(.85); opacity: 0; } }
@keyframes rvp-throb { 50% { box-shadow: 0 10px 40px rgba(255,190,0,.75); } }
.rvp-opp { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 14px; color: #f3e3bf; background: rgba(0,0,0,.28); border-radius: 14px; padding: 6px 10px 6px 6px; border: 2px solid transparent; }
.rvp-opp.turn { border-color: #ffb800; }
.rvp-opp .nm { font-weight: 800; }
.rvp-chipv { display: inline-flex; align-items: center; gap: 3px; background: rgba(255,255,255,.1); border-radius: 999px; padding: 2px 8px; font-variant-numeric: tabular-nums; }
.rvp-chipv .rv-badge { width: 16px; height: 16px; }
.rvp-tok { display: inline-block; width: 26px; height: 26px; border-radius: 50%; background-size: cover; box-shadow: 0 2px 6px rgba(0,0,0,.45); vertical-align: middle; }
.rvp-tok.t-hero { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 40'%3E%3Cdefs%3E%3CradialGradient id='g' cx='40%25' cy='35%25' r='70%25'%3E%3Cstop offset='0' stop-color='%23e0a37a'/%3E%3Cstop offset='1' stop-color='%23874a26'/%3E%3C/radialGradient%3E%3C/defs%3E%3Ccircle cx='20' cy='20' r='19' fill='url(%23g)' stroke='%235a2e14' stroke-width='2'/%3E%3Cpath d='M13 30l13-19' stroke='%233a1d0c' stroke-width='3' stroke-linecap='round'/%3E%3Cpath d='M22 9c5-3 9-1 10 2-3 0-5 2-6 6z' fill='%233a1d0c'/%3E%3C/svg%3E"); }
.rvp-tok.t-trade { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 40'%3E%3Cdefs%3E%3CradialGradient id='g' cx='40%25' cy='35%25' r='70%25'%3E%3Cstop offset='0' stop-color='%23e0a37a'/%3E%3Cstop offset='1' stop-color='%23874a26'/%3E%3C/radialGradient%3E%3C/defs%3E%3Ccircle cx='20' cy='20' r='19' fill='url(%23g)' stroke='%235a2e14' stroke-width='2'/%3E%3Cpath d='M20 9v20M12 13h16M16 29h8' stroke='%233a1d0c' stroke-width='2.2' stroke-linecap='round'/%3E%3Cpath d='M9 21l3-7 3 7zM25 21l3-7 3 7z' fill='%233a1d0c'/%3E%3C/svg%3E"); }
.rvp-tok.huge { width: min(46vw, 180px); height: min(46vw, 180px); animation: rvp-spin .9s cubic-bezier(.2,1.2,.4,1) both; }
.rvp-tok.huge.gone { filter: grayscale(.7) brightness(.7); }
@keyframes rvp-spin { from { transform: rotateY(540deg) scale(.3); opacity: 0; } }
.rvp-me { display: flex; align-items: stretch; gap: 8px; }
.rvp-myvp { flex: none; width: 62px; display: flex; flex-direction: column; align-items: center; justify-content: center; background: linear-gradient(180deg, rgba(58,43,24,.92), rgba(38,28,15,.94)); border: 1.5px solid #8a6b3a; border-radius: 14px; color: #e6c27a; line-height: 1; padding: 4px; }
.rvp-myvp b { font-size: 34px; }
.rvp-myvp small { font: 700 10px "Inter", Arial, sans-serif; letter-spacing: .12em; text-transform: uppercase; color: rgba(243,227,191,.7); }
.rvp-myvp .rvp-tok { width: 18px; height: 18px; margin-top: 3px; }
.rvp-res { flex: 1; display: grid; grid-template-columns: repeat(6, 1fr); gap: 5px; }
.rvp-rt { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; background: linear-gradient(180deg, rgba(58,43,24,.92), rgba(38,28,15,.94)); border: 1.5px solid #8a6b3a; border-radius: 12px; padding: 6px 2px 5px; color: #f3e3bf; }
.rvp-rt .ic { width: 28px; height: 28px; display: block; }
.rvp-rt b { font: 900 18px/1 "Inter", Arial, sans-serif; }
.rvp-rt i { position: absolute; top: -6px; right: -4px; font: 900 9px/1 "Inter", Arial, sans-serif; font-style: normal; background: #ffb800; color: #1b1b1b; padding: 2px 4px; border-radius: 6px; }
.rvp-stats { display: flex; align-items: center; flex-wrap: wrap; gap: 3px; font-size: 12px; color: rgba(243,227,191,.75); padding: 0 2px; }
.rvp-stats .rv-badge { width: 16px; height: 16px; margin-left: 4px; }
.rvp-stats b { color: #f3e3bf; }
.rvp-prwrap { margin: 0 -16px; position: relative; min-width: 0; max-width: calc(100% + 32px); overflow: hidden; }
.rvp-prwrap.placing { background: rgba(255,184,0,.08); box-shadow: inset 0 0 0 2px rgba(255,184,0,.45); }
.rvp-prin { overflow-x: auto; overflow-y: hidden; -webkit-overflow-scrolling: touch; padding: 10px 16px; scrollbar-width: none; }
.rvp-prin::-webkit-scrollbar { display: none; }
.rvp-grid { display: grid; grid-template-rows: repeat(3, var(--cw)); gap: 5px; width: max-content; margin: 0 auto; }
.rvp-cell { position: relative; display: flex; align-items: center; justify-content: center; border-radius: 8px; }
.rvp-cell.tap { cursor: pointer; z-index: 2; }
.rvp-cell.tap::after { content: ''; position: absolute; inset: -3px; border-radius: 9px; box-shadow: 0 0 0 3px #ffb800, 0 0 16px rgba(255,184,0,.75); animation: rvp-tap 1.1s ease-in-out infinite; pointer-events: none; }
@keyframes rvp-tap { 50% { box-shadow: 0 0 0 4px #ffd60a, 0 0 26px rgba(255,214,10,.95); } }
.rvp-cell.picked::after { content: ''; position: absolute; inset: -3px; border-radius: 9px; box-shadow: 0 0 0 4px #a3e635, 0 0 18px rgba(163,230,53,.8); }
.rvp-cell.lose::after { content: ''; position: absolute; inset: -3px; border-radius: 9px; box-shadow: 0 0 0 3px #ff453a; }
.rvp .rv-site, .rvp .rv-spot { width: var(--cw); aspect-ratio: 1; border-radius: 6px; border: 2px dashed rgba(243,227,191,.32); background: rgba(0,0,0,.14); }
.rvp .rv-spot { display: flex; align-items: center; justify-content: center; border-style: dotted; }
.rvp .rv-spot span { font: 800 10px "Inter", Arial, sans-serif; letter-spacing: .1em; text-transform: uppercase; color: rgba(243,227,191,.55); }
.rvp-cell.tap .rv-site, .rvp-cell.tap .rv-spot { border-color: #ffd60a; background: rgba(255,214,10,.16); }
.rvp-cell.tap .rv-spot span { color: #ffd60a; }
.rvcard.rv-land { animation: rvp-land .5s cubic-bezier(.2,1.3,.4,1) both; }
@keyframes rvp-land { from { transform: translateY(-30px) scale(1.3) rotate(-8deg); opacity: 0; } }
.rvp-hint { display: flex; align-items: center; justify-content: space-between; gap: 8px; background: #ffb800; color: #1b1b1b; font-weight: 800; border-radius: 12px; padding: 4px 4px 4px 12px; }
.rvp-hint .btn.ghost { width: auto; min-height: 40px; color: #1b1b1b; background: rgba(255,255,255,.4); font-weight: 800; }
.rvp-acts { display: flex; flex-direction: column; gap: 8px; }
.rvp-row3 { display: grid; grid-template-columns: 1fr 1fr 1.25fr; gap: 8px; }
.rvp-acts .btn { min-height: 52px; font-weight: 800; }
.btn.rvp-big { min-height: 60px; font-size: 20px; letter-spacing: .04em; }
.btn.rvp-gold { background: linear-gradient(180deg, #f3e3bf, #d9c08a); color: #2a1c08; border: 1.5px solid #8a6b3a; }
.rvp-log { font-size: 13px; line-height: 1.35; color: rgba(243,227,191,.7); padding: 0 2px; }
.rvp-log .l-turn { color: #f3e3bf; font-weight: 700; } .rvp-log .l-gain { color: #b5e36b; } .rvp-log .l-bandit { color: #ff9a8a; } .rvp-log .l-token { color: #ffd166; } .rvp-log .l-event { color: #c9b6ff; }
.rvp.waiting .ndp-fan { opacity: .66; filter: saturate(.75); transition: opacity .3s; }
body.rvp-myturn::after { content: ''; position: fixed; inset: 0; pointer-events: none; z-index: 15; box-shadow: inset 0 0 0 5px #ffc400, inset 0 0 50px rgba(255,196,0,.45); animation: rvp-frame 1.6s ease-in-out infinite; }
@keyframes rvp-frame { 50% { box-shadow: inset 0 0 0 7px #ffc400, inset 0 0 80px rgba(255,196,0,.6); } }

/* the rival's latest build */
.rvp-oppplay { display: flex; align-items: center; gap: 10px; margin-top: -4px; padding: 6px 10px 6px 6px; border-radius: 12px; background: rgba(0,0,0,.24); color: #f3e3bf; font-size: 14px; }
.rvp-oppplay b { font-weight: 800; }
[data-theme="light"] .rvp-oppplay { background: rgba(255,250,235,.8); color: #2a1c08; }

/* the hand */
.rvp-dock { background: linear-gradient(to top, rgba(28,18,8,.96) 72%, rgba(28,18,8,0)); }
.rvp-dock .ndp-fan { height: calc(var(--cw) + 40px); }
.ndp-fan .rvcard { position: absolute; top: 22px; transform-origin: 50% 100%; transition: transform .18s ease, filter .2s; cursor: pointer; }
.ndp-fan .rvcard.peeking { translate: 0 -30px; z-index: 60 !important; filter: none; }
.ndp-fan .rvcard.lit { box-shadow: 0 0 0 3px #ffd60a, 0 0 18px rgba(255,214,10,.55), 0 6px 16px rgba(0,0,0,.4); }
.ndp-fan .rvcard.dim { filter: saturate(.35) brightness(.8); }
.ndp-fan .rvcard.rvp-in { animation: rvp-in .55s cubic-bezier(.2,1.1,.35,1) both; }
@keyframes rvp-in { from { translate: 0 -52vh; scale: .45; opacity: 0; } 60% { opacity: 1; } }
.ndp-peekcard .rvcard { --cw: min(48vw, 190px); }
.rvp-big { --cw: min(56vw, 230px); }
.rvp-ghost { position: fixed; z-index: 70; pointer-events: none; transform-origin: 0 0; }

/* sheets */
.rvp-sheet { gap: 9px; }
.rvp-sheet .h2 { font-size: 26px; }
.rvp-sheet .p.small { font-size: 13px; }
.rvp-sub { font: 800 12px "Inter", Arial, sans-serif; letter-spacing: .12em; text-transform: uppercase; color: var(--label-2); margin-top: 4px; }
.rvp-rgrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; }
.rvp-rgrid.small .rvp-rb { min-height: 52px; }
.rvp-rb { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-height: 76px; border-radius: 14px; border: 1.5px solid rgba(255,255,255,.12); background: rgba(255,255,255,.06); color: var(--text); font: 700 14px "Inter", Arial, sans-serif; cursor: pointer; padding: 6px 4px; }
.rvp-rb .rv-ico { width: 30px; height: 30px; }
.rvp-rb small { font-size: 11px; font-weight: 600; color: var(--label-2); }
.rvp-rb:disabled { opacity: .35; }
.rvp-rb:active { transform: scale(.97); }
.rvp-picked { display: flex; gap: 6px; justify-content: center; min-height: 30px; align-items: center; }
.rvp-picked .rv-ico { width: 28px; height: 28px; }
.rvp-picked.empty { font-size: 13px; color: var(--label-2); }
.rvp-stacks { display: grid; grid-template-columns: repeat(4, 1fr); gap: 7px; }
.rvp-stackbtn { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px 2px; border-radius: 14px; border: 1.5px solid rgba(255,255,255,.12); background: rgba(255,255,255,.06); color: var(--text); cursor: pointer; font-family: "Inter", Arial, sans-serif; }
.rvp-stackbtn b { font-size: 14px; }
.rvp-stackbtn small { font-size: 11px; color: var(--label-2); }
.rvp-stackbtn:disabled { opacity: .35; }
.rvp-cards { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; max-height: 46vh; overflow-y: auto; padding: 4px; }
.rvp-cpick { position: relative; border: none; background: none; padding: 3px; border-radius: 12px; cursor: pointer; }
.rvp-cpick.on { box-shadow: 0 0 0 3px #a3e635, 0 0 18px rgba(163,230,53,.6); }
.rvp-cpick em { position: absolute; left: 50%; bottom: -6px; transform: translateX(-50%); background: #a3e635; color: #0a0d14; font: 900 11px "Inter", Arial, sans-serif; font-style: normal; padding: 2px 6px; border-radius: 6px; }
.rvp-nums { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; }
.rvp-num { border: none; background: rgba(255,255,255,.06); border-radius: 12px; padding: 8px 0; display: flex; justify-content: center; cursor: pointer; }
.rvp-num .rv-die { --ds: 38px; }
.rvp-num.on { box-shadow: 0 0 0 3px #ffb800; background: rgba(255,184,0,.18); }
.rvp-brow { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; border-radius: 14px; border: 1.5px solid rgba(255,255,255,.12); background: rgba(255,255,255,.06); color: var(--text); padding: 8px; cursor: pointer; font-family: "Inter", Arial, sans-serif; }
.rvp-brow:disabled { opacity: .45; }
.rvp-binfo { display: flex; flex-direction: column; gap: 4px; }
.rvp-binfo b { font-size: 17px; }
.rvp-binfo small { font-size: 12px; color: var(--label-2); }
.rvp-bcost { display: flex; gap: 3px; }
.rvp-bcost .rv-ico { width: 22px; height: 22px; }
.rvp-toggle { display: flex; align-items: center; gap: 8px; font-size: 14px; padding: 2px 6px; }
.rvp-toggle input { width: 22px; height: 22px; }

/* full-screen moments */
.rvp-moment { position: fixed; inset: 0; z-index: 90; pointer-events: none; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; background: radial-gradient(circle, color-mix(in srgb, var(--pc) 50%, transparent), rgba(10,6,2,.7) 75%); animation: rvp-moment 2.8s ease both; }
.rvp-moment.k-bandit { background: radial-gradient(circle, rgba(198,40,40,.6), rgba(20,4,4,.8) 75%); }
@keyframes rvp-moment { 0% { opacity: 0; } 8% { opacity: 1; } 80% { opacity: 1; } 100% { opacity: 0; } }
.rvp-mcard { animation: rvp-slam .5s cubic-bezier(.2,1.5,.4,1) both; }
.rvp-mcard .rvcard { box-shadow: 0 30px 60px rgba(0,0,0,.55), inset 0 0 0 3px #8a6b3a; transform: rotate(-3deg); }
.rvp-mdie .rv-evdie { --ds: 150px; animation: rvp-slam .5s cubic-bezier(.2,1.5,.4,1) both; }
@keyframes rvp-slam { from { transform: scale(2.4); opacity: 0; } }
.rvp-moment .who { display: flex; align-items: center; gap: 10px; background: rgba(0,0,0,.72); color: #fff; font: 800 18px/1.25 "Inter", Arial, sans-serif; padding: 8px 16px 8px 8px; border-radius: 999px; max-width: 90vw; }
.rvp-moment .avatar { width: 40px; height: 40px; font-size: 18px; flex: none; }
.rvp-final .rvp-fcard { margin-bottom: 4px; }

/* ---- light theme: daylight parchment on light oak ---- */
[data-theme="light"] .rvp-turnbar.idle, [data-theme="light"] .rvp-myvp, [data-theme="light"] .rvp-rt { background: linear-gradient(180deg, rgba(250,242,222,.97), rgba(238,224,190,.97)); border-color: #a9844a; color: #2a1c08; }
[data-theme="light"] .rvp-turnbar.idle b, [data-theme="light"] .rvp-stats b, [data-theme="light"] .rvp-opp { color: #2a1c08; }
[data-theme="light"] .rvp-turnbar.idle, [data-theme="light"] .rvp-turnbar.idle small, [data-theme="light"] .rvp-myvp small, [data-theme="light"] .rvp-stats { color: rgba(61,42,18,.75); }
[data-theme="light"] .rvp-myvp { color: #9a6410; }
[data-theme="light"] .rvp-opp { background: rgba(255,250,235,.82); box-shadow: 0 4px 14px rgba(90,60,20,.12); }
[data-theme="light"] .rvp-chipv { background: rgba(90,60,20,.1); }
[data-theme="light"] .rvp .rv-site, [data-theme="light"] .rvp .rv-spot { border-color: rgba(90,60,20,.35); background: rgba(255,250,235,.3); }
[data-theme="light"] .rvp .rv-spot span { color: rgba(61,42,18,.6); }
[data-theme="light"] .rvp-cell.tap .rv-site, [data-theme="light"] .rvp-cell.tap .rv-spot { border-color: #d99a00; background: rgba(255,214,10,.25); }
[data-theme="light"] .rvp-cell.tap .rv-spot span { color: #8a5a00; }
[data-theme="light"] .rvp-log { color: rgba(61,42,18,.75); }
[data-theme="light"] .rvp-log .l-turn { color: #2a1c08; } [data-theme="light"] .rvp-log .l-gain { color: #3f7d0e; } [data-theme="light"] .rvp-log .l-bandit { color: #c2410c; } [data-theme="light"] .rvp-log .l-token { color: #9a6410; } [data-theme="light"] .rvp-log .l-event { color: #6b3fa0; }
[data-theme="light"] .rvp-dock { background: linear-gradient(to top, rgba(232,214,178,.97) 72%, rgba(232,214,178,0)); }
[data-theme="light"] .ndp-fan .rvcard.lit { box-shadow: 0 0 0 3px #d99a00, 0 0 16px rgba(255,190,0,.5), 0 6px 16px rgba(90,60,20,.3); }
[data-theme="light"] .rvp-rb, [data-theme="light"] .rvp-stackbtn, [data-theme="light"] .rvp-brow, [data-theme="light"] .rvp-num { background: rgba(120,80,30,.06); border-color: rgba(90,60,20,.18); }
[data-theme="light"] .rvp-prwrap.placing { background: rgba(255,214,10,.14); }
