/* Shared by the sidebar picker and the scrollable modal, including index2. */
.rc-die { display: inline-block; width: 28px; height: 28px; flex: none; vertical-align: middle; pointer-events: none; }
.rc-die img { display: block; width: 100%; height: 100%; object-fit: contain; user-select: none; }
.bnav__rc .bubble > .rc-die { width: 40px; height: 40px; }
[data-rc], [data-rcm] { container-type: inline-size; }
.rc.rc--basket {
  display: grid; grid-template-columns: minmax(0,1fr); gap: clamp(8px,2.3cqw,14px);
  padding: clamp(11px,4.1cqw,23px); color: #171510; border: 1px solid #f5cb24;
  border-radius: clamp(18px,5cqw,30px); box-shadow: 0 5px 14px #77581825;
  background: radial-gradient(ellipse at 35% 15%,#fff573 0%,#ffe546 45%,#ffda27 100%);
}
.rc--basket .rc__head { display: grid; grid-template-columns: minmax(0,1.15fr) minmax(0,1fr); align-items: center; gap: 5px 0; padding: 0; }
.rc__intro { min-width: 0; }
.rc__logo { display: block; width: 66%; max-width: 134px; height: auto; margin-bottom: clamp(8px,2cqw,13px); }
.rc--basket .rc__t { margin: 0; color: #151410; font-size: clamp(21px,7.5cqw,40px); font-weight: 900; letter-spacing: -.045em; line-height: .97; text-transform: none; }
.rc--basket .rc__die {
  position: relative; grid-column: 2; grid-row: 1 / span 2; display: grid; place-items: center;
  width: 100%; height: auto; aspect-ratio: 1.02; align-self: center;
}
.rc__portrait { grid-area: 1/1; filter: drop-shadow(0 6px 4px #9c650d30); }
.rc--basket .rc__amount-line { display: flex; width: max-content; align-items: center; gap: .55em; font-size: clamp(13px,4.2cqw,22px); font-weight: 850; z-index: 1; }
.rc__amount-line [data-b] { padding: .2em .65em; border-radius: 2em; background: #1a1916; color: #ffea54; font-size: 1.18em; font-weight: 900; white-space: nowrap; font-variant-numeric: tabular-nums; }
.rc--basket .rc__range { display: block; margin: 7px 0 9px; height: 8px; background: linear-gradient(to right,#1b1915 var(--fill),#fff9de var(--fill)); touch-action: pan-y; }
.rc--basket .rc__range:focus-visible { outline: 2px solid #343021; outline-offset: 5px; }
.rc--basket .rc__range::-webkit-slider-thumb { width: 31.25px; height: 31.25px; background: white; border: 4px solid #e9ac00; box-shadow: 0 2px 5px #8d680f66; }
.rc--basket .rc__range::-moz-range-thumb { width: 23.25px; height: 23.25px; background: white; border: 4px solid #e9ac00; box-shadow: 0 2px 5px #8d680f66; }
.rc--basket .rc__scale { opacity: 1; font-size: clamp(12px,3.2cqw,16px); font-weight: 550; }
.rc--basket .rc__toggle {
  margin: 0; padding: 8px clamp(8px,3cqw,17px); min-height: 42px; gap: 7px;
  background: #fcf3df; box-shadow: 0 2px 4px #8d661728; border-radius: 14px; font-size: clamp(11px,3.5cqw,17px);
}
.rc__toggle > span:first-child { flex: none; padding-right: .8em; border-right: 1px solid #d2c1a0; }
.rc__toggle [data-sel] { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rc--basket.opts-open .rc__opts { display: flex; flex-wrap: wrap; gap: 5px; }
.rc--basket .rc__opts .chip { white-space: normal; }
.rc--basket .rc__opts .chip.on { color: #ffeb52; }
.rc--basket .rc__go, .rc--basket .rc__add {
  height: auto; min-height: 44px; margin: 0; border-radius: 99px; padding: 8px 10px; background: #1b1a18;
  color: #ffe545; font-weight: 850; text-transform: none; line-height: 1.12;
}
.rc--basket .rc__go { font-size: clamp(15px,4.7cqw,24px); box-shadow: 0 3px 6px #89702238; }
.rc--basket .rc__res.show { display: block; position: relative; height: auto; margin: 0 0 3px; padding: clamp(9px,3cqw,16px); background: #fffdfa; border-radius: 14px 14px 5px 5px; box-shadow: 0 4px 8px #95741030; }
.rc--basket .rc__res::after { content: ''; position: absolute; inset: auto 1px -4px; height: 6px; background: radial-gradient(ellipse at 50% 0,#fffdfa 66%,transparent 70%) left top / 15px 7px repeat-x; pointer-events: none; }
.rc--basket .rc__rhead { display: block; margin: 0 0 5px; font-size: clamp(18px,5.5cqw,28px); font-weight: 900; text-align: center; }
.rc--basket .rc__row { display: grid; grid-template-columns: clamp(25px,9cqw,47px) minmax(0,1fr) auto auto; align-items: center; gap: clamp(4px,1.3cqw,8px); border: 0; padding: 6px 0; }
.rc__row + .rc__row { border-top: 2px dotted #d4cfc5; }
.rc--basket .rc__row img { width: 100%; height: auto; aspect-ratio: 1; object-fit: contain; border-radius: 0; background: transparent; mix-blend-mode: multiply; }
.rc__row .nm { min-width: 0; overflow-wrap: anywhere; font-size: clamp(11px,3.25cqw,16px); }
.rc__row .nm strong { font-weight: 800; }
.rc__row .nm span { display: block; font-weight: 500; }
.rc__line-price { display: grid; justify-items: end; font-size: clamp(12px,3.6cqw,18px); }
.rc__line-price .q { font-size: .75em; }
.rc--basket .rc__swap { width: clamp(28px,7.5cqw,40px); height: auto; aspect-ratio: 1; background: #f0eee8; }
.rc__swap svg { width: 55%; height: 55%; }
.rc__total { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; padding: .42em .7em; margin-top: 8px; background: #f8efdc; border-radius: 12px; font-size: clamp(16px,4.5cqw,24px); }
.rc__total b { font-size: 1.17em; font-weight: 900; }
.rc--basket .rc__acts { display: grid; grid-template-columns: minmax(0,.86fr) minmax(0,1.14fr); gap: 6px; margin: 3px 0 0; }
.rc--basket .rc__acts button { display: flex; align-items: center; justify-content: center; gap: 4px; padding: 6px 4px; min-width: 0; min-height: 42px; height: auto; border-radius: 15px; font-size: clamp(11px,3.15cqw,17px); line-height: 1.12; }
.rc--basket .rc__share { background: #fcf3df; border: 2px solid #201e19; }
.rc__share svg { width: 1.6em; height: 1.6em; }
.rc--basket .rc__add.done { background: #248041; color: white; }
.rc--basket .rc__add:disabled:not(.done) { opacity: .58; }
.rc__budget-warning { margin-top: 8px; font-size: 12px; }
/* Replace only the contents of the receipt during a roll. Its frame and controls keep their positions. */
.rc__stage { position: relative; }
.rc__items { height: auto; overflow: visible; }
.rc__empty { padding: 14px 5px; text-align: center; }
.rc__loading { display: none; }
.rc.rolling .rc__loading {
  display: grid; position: absolute; inset: 0; align-content: center; justify-items: center; gap: 4px;
  border-radius: 9px; background: #fffdfaf5; text-align: center; font-size: 13px;
}
.rc__status { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
#rcModal { align-items: flex-start; overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain; padding: 12px; }
#rcModal .modal__box { width: min(100%,480px); max-width: none; max-height: none; padding: 0; overflow: visible; flex: none; margin: clamp(0px,2vh,18px) auto 0; }
#rcModal .modal__x { top: 5px; right: 5px; width: 32px; height: 32px; border: 0; background: #fff6be; color: #29251c; }
#rcModal .rc__die { margin-top: 6px; }
@media (max-width:900px) {
  #rcModal { bottom: calc(70px + env(safe-area-inset-bottom)); padding: 8px; }
}

.rc__ticks { display: grid; grid-template-columns: repeat(7,1fr); padding-inline: 6.25%; height: 6px; color: #6d591d66; }
.rc__ticks > * { justify-self: center; width: 1px; height: 3px; background: currentColor; }
.rc__ticks > b { height: 6px; width: 2px; }
.rc__ticks + .rc__scale { margin-top: -4px; }
#rcModal .modal__box { width: min(100%, 480px, 58dvh); }
@media (max-height:800px) {
  #rcModal .rc { gap: 5px; padding: 10px; }
  #rcModal .rc__head { grid-template-columns: 1.45fr 1fr; }
  #rcModal .rc__die { max-height: 13dvh; }
  #rcModal .rc__logo { width: 37%; margin-bottom: 3px; }
  #rcModal .rc__t { font-size: clamp(18px,5cqw,28px); }
  #rcModal .rc__row { padding-block: 3px; }

}

@media (max-height:650px) and (max-width:900px) {
  #rcModal { bottom: 0; z-index: 150; padding: 5px; }
  #rcModal .modal__box { margin-top: 0; }
}

@media (max-height:500px) and (min-width:560px) {
  #rcModal { bottom: 0; padding: 4px; }
  #rcModal .modal__box { width: min(100%,720px); margin-top: 0; }
  #rcModal .rc { grid-template-columns: repeat(2,minmax(0,1fr)); align-items: start; gap: 7px 14px; }
  #rcModal .rc__head, #rcModal .rc__budget, #rcModal .rc__choice, #rcModal .rc__go { grid-column: 1; }
  #rcModal .rc__res { grid-column: 2; grid-row: 1 / 5; margin-top: 22px; }
  #rcModal .rc__acts { grid-column: 2; }
}

#rcModal .rc--starter .rc__row .nm {
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
@media (max-height:500px) and (min-width:560px) {
  #rcModal .rc__logo { max-width: 75px; }
  #rcModal .rc__res { padding: 8px; }
  #rcModal .rc__rhead { font-size: 18px; }
  #rcModal .rc__row { grid-template-columns: 26px minmax(0,1fr) auto 28px; }
  #rcModal .rc__row .nm { font-size: 12px; }
  #rcModal .rc__swap { width: 28px; }
  #rcModal .rc__total { font-size: 17px; }
  #rcModal .rc__acts { margin-top: 0; }
}
