/* Movement follows the existing ivory, aged brass and green felt palette. */
[data-score-motion]{position:relative}
[data-score-motion] .r-score-feedback{display:block;flex-basis:100%;width:100%;color:#c8d4b9;font-size:11px;line-height:1.55}
[data-score-motion] [data-action="skipMotion"]{min-height:30px;padding:5px 9px}
[data-score-chips],[data-score-fan],[data-score-total],[data-score-bank]{font-variant-numeric:tabular-nums}
[data-score-label]{display:inline-block;min-width:0;color:#edcf89;line-height:1.5}
[data-score-phase="multiply"] [data-score-total],
[data-score-phase="total"] [data-score-total]{color:#ffe2a0;text-shadow:0 1px 12px #e9bc5455;animation:score-number-arrive .24s ease-out}
[data-score-phase="bank"] [data-score-total]{color:#a9d8af;transition:color .2s}
.r-score-final{font-weight:700;color:#ebd9a7;white-space:nowrap}
.r-score-final b{color:#f4d48b;font-size:1.2em}
.r-card.r-triggered .r-card-cover{filter:drop-shadow(0 0 5px #edc8769c)}
.r-card.r-triggered .relic-token{outline:1px solid #eed396;outline-offset:2px}
@keyframes score-number-arrive{from{transform:translateY(3px) scale(.98)}to{transform:translateY(0) scale(1)}}
@media(prefers-reduced-motion:reduce){[data-score-motion] [data-score-total]{animation:none;transform:none}.r-card.r-triggered .r-card-cover{filter:none}}
:root[data-game-motion="fast"] .r-building-changed .r-building-feedback{animation-duration:.35s}
:root[data-game-motion="reduced"] *,
:root[data-game-motion="reduced"] *::before,
:root[data-game-motion="reduced"] *::after{animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important;scroll-behavior:auto!important}

/* Six bamboo lots share one saved draw; only their presentation moves. */
.r-opening-stage{width:100%;max-width:760px}
.r-opening-heading .section-kicker{color:#d5b875;letter-spacing:4px}
.r-opening-stage .r-opening-heading h1{font-size:30px;margin:9px 0 7px;letter-spacing:5px}
.r-opening-heading p{margin:0;color:#b6c7b1;font-size:12px;letter-spacing:1px}
.r-opening-heading p b{color:#e3c78c;font:600 15px var(--mono)}
.r-lot-draw{display:grid;justify-items:center;gap:8px;width:100%;margin-top:7px}
.lot-scene{position:relative;isolation:isolate;width:min(100%,520px);height:244px;perspective:900px;--lot-x:0px;--lot-y:0px;--lot-tilt:0deg;--lot-turn:0deg;--lot-scale:1;--lot-opacity:0}
.lot-table-ring{position:absolute;inset:47px 15px 8px;border:1px solid #bba66b35;border-radius:50%;transform:rotateX(58deg);box-shadow:0 0 0 12px #c0a56507,inset 0 0 0 7px #12392a35;background:radial-gradient(ellipse,#bca6630a,transparent 70%)}
.lot-scene-caption{position:absolute;left:50%;top:28px;writing-mode:vertical-rl;color:#c4b47d77;font:11px/1.8 "Songti SC",serif;letter-spacing:4px}
.lot-vessel{position:absolute;left:calc(50% - 138px);bottom:14px;width:110px;height:196px;transform-origin:50% 95%;filter:drop-shadow(8px 10px 6px #001c2170);z-index:2}
.lot-vessel::after{content:"";position:absolute;bottom:-7px;left:-18px;right:-18px;height:15px;background:#001c18;border-radius:50%;filter:blur(7px);opacity:.55;z-index:-1}
.lot-cup-mouth{position:absolute;top:65px;left:0;width:110px;height:28px;border-radius:50%;border:5px solid #9e8050;background:radial-gradient(ellipse at 50% 90%,#5f432a,#241e16);box-shadow:inset 0 2px 4px #140f0c,0 -1px #e6c887,0 -3px 0 -1px #5a492c,0 -4px 0 -1px #c8ac70;z-index:1}
.lot-bundle{position:absolute;top:2px;left:8px;width:94px;height:150px;z-index:2}
.lot-bundle>i{position:absolute;left:calc(4px + var(--i)*13px);top:calc(var(--i)*3px);width:13px;height:139px;border-radius:6px 6px 1px 1px;border:1px solid #79532e;background:linear-gradient(90deg,#a77c45,#edcf8f 27%,#c89954 75%,#845d32);box-shadow:2px 0 2px #16251b55;transform-origin:50% 95%;transform:rotate(calc((var(--i) - 2.5)*4deg));font-style:normal}
.lot-bundle>i::before{content:"";position:absolute;top:0;left:0;right:0;height:21px;border-radius:5px 5px 0 0;background:linear-gradient(90deg,#60372c,#a34e3d 35%,#813f30 80%);border-bottom:1px solid #d7ac63;box-shadow:inset 1px 1px #d7a86a66,0 2px #6e4a2a,0 3px #d2ac6b}
.lot-bundle>i>span{position:absolute;top:30px;left:1px;font:9px "Songti SC",serif;color:#714724}
.lot-cup-body{position:absolute;top:78px;bottom:0;width:110px;border-radius:4px 4px 35% 35% / 4px 4px 13px 13px;background:repeating-linear-gradient(91deg,transparent 0 4px,#54371717 5px,transparent 6px 13px),repeating-linear-gradient(89deg,transparent 0 16px,#e7c58919 17px,transparent 18px 23px),linear-gradient(90deg,#63472b,#b28f5c 16%,#d4b27b 36%,#b38c54 64%,#765633 90%,#4e3b26);box-shadow:inset 1px 0 #ead39799,inset -3px 0 6px #38261155;border:1px solid #b08b50;z-index:3;overflow:hidden}
.lot-cup-body::before{content:"";position:absolute;inset:20px 13px;border:1px solid #5c3f2526;border-radius:8px;box-shadow:inset 0 0 0 3px #dfbd7a13}
.lot-cup-carving{position:absolute;inset:0;width:100%;height:100%;color:#604326;opacity:.75;filter:drop-shadow(0 .5px #edce9677);pointer-events:none}
.lot-cup-band{position:absolute;left:0;right:0;height:11px;background:linear-gradient(90deg,#514932,#af985f 25%,#ccb57b 45%,#817348 80%,#47422e);border-top:1px solid #e5d18b99;border-bottom:1px solid #584f33;box-shadow:0 2px 3px #33261855,inset 0 2px #65573088,inset 0 -2px #f2d99722}
.lot-cup-band.top{top:5px}.lot-cup-band.bottom{bottom:9px}
.lot-cup-engraving{position:absolute;inset:24px 0 15px;display:grid;justify-items:center;align-content:center;gap:5px;color:#503b24;text-shadow:0 1px #f5d89570}
.lot-cup-engraving small{font:7px "Songti SC",serif;letter-spacing:3px}
.lot-cup-engraving b{font:600 29px/1.2 "Songti SC",serif;width:40px;height:38px;display:grid;place-items:center}
.lot-cup-foot{position:absolute;bottom:-3px;left:5px;width:100px;height:13px;border-radius:50%;background:linear-gradient(#b2975e,#493b25);z-index:0}
.lot-sign{position:absolute;left:calc(50% + 44px);top:27px;width:54px;height:187px;z-index:4;opacity:var(--lot-opacity);transform:translate(var(--lot-x),var(--lot-y)) rotate(var(--lot-tilt)) scale(var(--lot-scale));transform-origin:50% 100%;perspective:700px}
.lot-sign-inner{position:relative;width:100%;height:100%;transform-style:preserve-3d;transform:rotateY(var(--lot-turn))}
.lot-sign-front,.lot-sign-back{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;border:1px solid #bba06c;border-radius:19px 19px 5px 5px;background:repeating-linear-gradient(89deg,transparent 0 8px,#8f642311 9px,transparent 10px 17px),linear-gradient(90deg,#b69a65,#f1dfb5 12%,#f5e6c3 40%,#e4cb97 83%,#b59a64);box-shadow:inset 1px 0 #fff0ce,inset -2px 0 #80613b55,inset 0 -3px #9e784846,2px 4px 1px #08251e99,4px 7px 7px #041e1a55;-webkit-backface-visibility:hidden;backface-visibility:hidden;color:#394635;padding:0}
.lot-sign-front::before,.lot-sign-back::before{content:"";position:absolute;inset:3px;border:1px solid #f6e8c080;border-radius:16px 16px 2px 2px;pointer-events:none}
.lot-sign-front::after,.lot-sign-back::after{content:"";position:absolute;top:5px;left:22px;width:8px;height:3px;border-radius:50%;background:#8e4938;box-shadow:0 1px #f1d6a7}
.lot-sign-engraving{position:absolute;inset:0;width:100%;height:100%;color:#8d6b3a;opacity:.8;pointer-events:none}
.lot-sign-front>span,.lot-sign-back>span{position:absolute;top:33px;font:7px "Songti SC",serif;letter-spacing:2px;white-space:nowrap;color:#7a633d}
.lot-sign-glyph{position:absolute;top:55px;font:600 44px/1.35 "Songti SC","STSong",serif;margin:0;text-shadow:0 1px #fff8,0 -.5px #1d322640;letter-spacing:0}
.lot-sign-front>small{position:absolute;top:121px;font:7px "Songti SC",serif;letter-spacing:1px;color:#8b7147}
.lot-sign-front>i,.lot-sign-back>i{position:absolute;bottom:13px;width:17px;height:18px;border:1px solid #a55e46;color:#96432f;background:#b35a2a08;box-shadow:inset 0 0 0 1px #f0d5a4;font:12px/16px "Songti SC",serif;border-radius:1px;transform:rotate(-3deg)}
.lot-sign-back{transform:rotateY(180deg);background:repeating-linear-gradient(89deg,transparent 0 7px,#6f412914 8px,transparent 9px 14px),linear-gradient(90deg,#94713f,#cfaa70 15%,#e1c48b 45%,#bc965d 85%,#927347);color:#795631}
.lot-sign-back>b{position:absolute;top:62px;font:32px/1.5 "Songti SC",serif;margin:0;border:1px solid #80593455;outline:1px solid #f0d29855;outline-offset:2px;padding:3px 1px}
.lot-sign-shadow{position:absolute;top:216px;left:calc(50% + 38px);width:70px;height:13px;border-radius:50%;background:#001b18;filter:blur(6px);opacity:calc(var(--lot-opacity)*.55)}
.lot-reveal-halo{position:absolute;left:calc(50% + 7px);top:5px;width:128px;height:222px;border-radius:50%;background:radial-gradient(ellipse,#e1bc6538,transparent 68%);opacity:0;z-index:0}
.lot-outcomes{display:flex;justify-content:center;gap:9px}
.lot-outcomes>span{position:relative;display:grid;place-items:center;width:32px;height:33px;border:1px solid #a29c693b;border-radius:6px;background:#112f2733;color:#94ad9a;font:15px "Songti SC",serif;transition:background .2s,color .2s,box-shadow .2s}
.lot-outcomes>span.active{color:#fae2a6;background:#9a813b42;border-color:#d5b66d;box-shadow:0 0 15px #d2ad5135,inset 0 0 0 2px #d2ad5112}
.lot-status{font:600 15px/1.5 "Songti SC",serif;letter-spacing:2px;color:#ebcf92;min-height:23px}
.r-lot-draw>.lot-rule{font-size:11px;line-height:1.7;color:#b4c5ad;margin:0;min-height:20px}
.lot-actions{min-height:44px;display:flex;align-items:center;justify-content:center;margin-top:3px}
.lot-actions .primary-button,.lot-actions .mini-button{min-height:44px;min-width:185px;font-size:13px;letter-spacing:2px}
[data-lot-phase="shake"] .lot-vessel{animation:lot-shake .19s ease-in-out infinite}
[data-lot-phase="shake"] .lot-bundle>i{animation:lot-rattle .16s ease-in-out infinite alternate;animation-delay:calc(var(--i)*-.027s)}
[data-lot-phase="draw"] .lot-vessel{transform:rotate(9deg);transition:transform .16s ease-out}
[data-lot-phase="reveal"] .lot-vessel,[data-lot-phase="settle"] .lot-vessel{transform:rotate(0);transition:transform .2s ease-out}
[data-lot-phase="settle"] .lot-reveal-halo{animation:lot-halo .3s ease-out;opacity:1}
[data-lot-phase="landed"] .lot-reveal-halo{opacity:1}
@keyframes lot-shake{0%,100%{transform:translateX(-3px) rotate(-6deg)}50%{transform:translateX(3px) rotate(6deg)}}
@keyframes lot-rattle{from{transform:translateY(-3px) rotate(calc((var(--i) - 2.5)*4deg - 3deg))}to{transform:translateY(2px) rotate(calc((var(--i) - 2.5)*4deg + 3deg))}}
@keyframes lot-halo{from{opacity:0;transform:scale(.7)}to{opacity:1;transform:scale(1)}}
@media (max-width:699px){
  .r-stage.r-opening-stage{padding:12px 0}
  .r-opening-stage .r-opening-heading h1{font-size:25px;letter-spacing:3px}
  .lot-scene{height:226px}
  .lot-vessel{left:calc(50% - 121px);bottom:10px;transform:scale(.9);transform-origin:50% 100%}
  .lot-sign{left:calc(50% + 43px);top:20px;width:50px;height:182px}
  .lot-sign-shadow{top:205px}
  .lot-scene-caption{font-size:10px;letter-spacing:3px}
  .lot-outcomes{gap:7px}
  .r-lot-draw>.lot-rule{max-width:310px;min-height:38px}
}
@media (orientation:landscape) and (max-height:740px){
  .v6 .r-landscape .r-opening-stage{padding:5px 10px}
  .r-opening-stage .r-opening-heading h1{font-size:26px;margin:6px 0}
  .lot-scene{height:224px}
  .r-lot-draw{gap:6px;margin-top:3px}
}
@media(prefers-reduced-motion:reduce){.lot-vessel,.lot-bundle>i,.lot-reveal-halo{animation:none!important;transition:none!important}.lot-outcomes>span{transition:none}}

/* One of the six sticks leaves the cup when the selected lot emerges. */
[data-lot-phase="draw"] .lot-bundle>i:nth-child(4),[data-lot-phase="reveal"] .lot-bundle>i:nth-child(4),[data-lot-phase="settle"] .lot-bundle>i:nth-child(4),[data-lot-phase="landed"] .lot-bundle>i:nth-child(4){visibility:hidden}

/* Opening owns a viewport budget. Only the artwork shrinks; text and actions do not. */
#app:has(>.r-phase-dice){display:flow-root}
.v6 .r-landscape.r-phase-dice{height:100dvh;min-height:0}
.v6 .r-landscape.r-phase-dice>.game-board,
.v6 .r-landscape.r-phase-dice>.sidebar{height:100dvh;min-height:0}
.r-phase-dice .board-top,.r-phase-dice .round-rail,.r-phase-dice .table-footer{flex-shrink:0}
.v6 .r-phase-dice .r-opening-stage{display:grid;grid-template-rows:auto minmax(0,1fr);align-items:stretch;justify-content:stretch;min-height:0;max-height:560px;flex:1;margin:auto;padding:8px}
.r-opening-heading{align-self:center}
.r-opening-heading .section-kicker{margin-bottom:4px}
.r-phase-dice .r-opening-heading h1{margin:6px 0;line-height:1.3}
.r-phase-dice .r-lot-draw{min-height:0;grid-template-rows:minmax(120px,1fr) auto auto auto auto;margin-top:4px;gap:6px}
.lot-scene-space{position:relative;min-width:0;min-height:120px;width:100%;container:lot-space / size}
.lot-scene-space .lot-scene{position:absolute;left:50%;top:50%;width:100%;max-width:520px;height:244px;transform:translate(-50%,-50%) scale(min(var(--lot-fit,1),var(--lot-fit-width,1)));transform-origin:center}
@container lot-space (max-height:240px){.lot-scene{--lot-fit:.90}}
@container lot-space (max-height:220px){.lot-scene{--lot-fit:.81}}
@container lot-space (max-height:200px){.lot-scene{--lot-fit:.73}}
@container lot-space (max-height:180px){.lot-scene{--lot-fit:.64}}
@container lot-space (max-height:160px){.lot-scene{--lot-fit:.56}}
@container lot-space (max-height:140px){.lot-scene{--lot-fit:.49}}
@container lot-space (max-height:120px){.lot-scene{--lot-fit:.40}}
@container lot-space (max-width:310px){.lot-scene{--lot-fit-width:.85}}
@container lot-space (max-width:260px){.lot-scene{--lot-fit-width:.7}}
.r-phase-dice .lot-actions{margin-top:0}
.r-phase-dice .r-opening-lesson{flex:none;display:flex;align-items:center;gap:8px 14px;padding:7px 10px;margin:0;font-size:11px;order:1}
.r-opening-lesson>span{color:#e3cb8e;white-space:nowrap}
.r-opening-lesson>p{flex:1;font-size:11px;line-height:1.5}
.r-opening-lesson>.mini-button{flex:none;min-height:36px}
.renewal-board.r-phase-dice{width:calc(100% - 12px);height:calc(100dvh - 12px);min-height:0;margin:6px auto;padding:10px;display:flex;flex-direction:column;gap:6px}
.renewal-board.r-phase-dice>.r-top{flex:none;margin:0;padding-bottom:6px;min-height:40px}
.renewal-board.r-phase-dice>.r-opening-lesson{order:0}
.renewal-board.r-phase-dice>.r-wallet{flex:none;margin:0}
.renewal-board.r-phase-dice>.r-wallet button{min-height:36px}
.r-opening-footer{position:relative;display:grid;grid-template-columns:1fr 1.25fr 1.25fr;align-items:center;gap:6px;flex:none;min-height:38px;border-top:1px solid #8da17a36;padding-top:5px}
.r-opening-footer>.mini-button,.r-opening-footer>.r-save-link{min-height:36px;padding:5px;font-size:10px}
.r-opening-footer>.r-settings{margin:0;padding:0;border:0;text-align:center;font-size:10px}
.r-opening-footer>.r-settings>summary{min-height:36px;display:grid;place-items:center;cursor:pointer}
.r-phase-dice .r-settings[open]{position:absolute;z-index:40;bottom:8px;right:8px;width:min(380px,calc(100vw - 32px));max-height:calc(100dvh - 32px);overflow:auto;margin:0;padding:10px 12px;border:1px solid #9f9e6c;border-radius:9px;background:#17382f;box-shadow:0 10px 35px #001b18aa;text-align:left}
.r-phase-dice .sidebar .r-settings[open]{left:8px;right:auto}
.r-phase-dice .r-settings[open]>summary{display:block;font-size:12px;padding:7px 0}
.r-phase-dice .r-settings[open]>summary::after{content:" · 收起";color:#e6ca84}
.renewal-board.r-opening-inventory{width:100%;min-height:0;margin:0;padding:0;border:0;box-shadow:none;background:none;display:block}
.r-opening-inventory .r-loadout{grid-template-columns:1fr;gap:14px}
@media (orientation:portrait) and (max-height:640px){
  .v6 .r-phase-dice .r-opening-stage{padding:4px}
  .r-phase-dice .r-opening-heading .section-kicker{display:none}
  .r-phase-dice .r-opening-heading h1{font-size:22px;margin:4px 0}
  .r-phase-dice .r-lot-draw{grid-template-rows:minmax(100px,1fr) auto auto auto auto;gap:4px}
  .r-phase-dice .lot-scene-space{min-height:100px}
  .r-phase-dice .lot-rule{min-height:0}
}
@media (orientation:landscape) and (min-width:640px) and (max-height:640px){
  .v6 .r-phase-dice .r-opening-stage{padding:4px;gap:4px}
  .r-phase-dice .r-opening-heading h1{font-size:23px;margin:4px 0}
  .r-phase-dice .r-lot-draw{grid-template-columns:minmax(180px,1fr) minmax(185px,.85fr);grid-template-rows:minmax(34px,1fr) auto auto minmax(48px,1fr);column-gap:12px}
  .r-phase-dice .lot-scene-space{grid-column:1;grid-row:1/5;height:100%}
  .r-phase-dice .lot-outcomes,.r-phase-dice .lot-status,.r-phase-dice .lot-rule,.r-phase-dice .lot-actions{grid-column:2}
  .r-phase-dice .lot-outcomes{align-self:end;gap:5px}
  .r-phase-dice .lot-actions{align-self:start}
  .r-phase-dice .lot-rule{max-width:260px;min-height:0}
}
/* Very small windows retain scrolling instead of clipping controls or shrinking text. */
@media (orientation:portrait) and (max-height:550px),(orientation:landscape) and (max-height:400px){
  .renewal-board.r-phase-dice{height:auto;min-height:calc(100dvh - 12px)}
  .v6 .r-landscape.r-phase-dice,.v6 .r-landscape.r-phase-dice>.game-board{height:auto;min-height:100dvh}
  .v6 .r-phase-dice .r-opening-stage{min-height:320px}
}
