/* Main Bareng Mimin — hub cards + the four games. Uses the theme's tokens, with fallbacks. */
.rgp, .rgp-hub, .rgp-cards {
  --p-yellow: var(--yellow-500, #F5B41E); --p-yellow-soft: var(--yellow-100, #FFF1C7); --p-yellow-pale: var(--yellow-50, #FFFAEB);
  --p-ink: var(--ink, #2A1B10); --p-muted: var(--muted, #6B5A4A); --p-line: var(--line, #EDE3D2); --p-red: var(--heart, #C2413B); --p-green: var(--success, #2F7D4F);
  --p-r: var(--r-lg, 24px); --p-ease: var(--ease-out, cubic-bezier(.22,1,.36,1));
}
.rgp-sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.rgp-muted { color: var(--p-muted); font-size: 14px; }
.rgp-loading { text-align: center; padding: 64px 16px; color: var(--p-muted); }
.rgp-back { margin-top: 24px; }
.rgp-back a { color: var(--p-muted); font-weight: 700; text-decoration: none; }
.rgp-back a:hover { color: var(--p-ink); text-decoration: underline; }
@keyframes rgp-bob { 50% { transform: translateY(-8px) rotate(-2deg); } }
@keyframes rgp-pop { 0% { transform: scale(.8) rotate(-8deg); } 60% { transform: scale(1.08) rotate(3deg); } 100% { transform: none; } }
@keyframes rgp-in { from { opacity: 0; transform: translateY(12px); } }
.rgp-bob { animation: rgp-bob 4s ease-in-out infinite; }

/* The theme keeps page text narrow for reading; games use the full container. */
.prose:has(.rgp), .prose:has(.rgp-hub), .page-content:has(.rgp) .prose, .page-content:has(.rgp-hub) .prose { max-width: none; }

/* ---------- Hub & cards ---------- */
.rgp-hub-head { display: flex; align-items: center; gap: 20px; margin-bottom: 28px; }
.rgp-hub-head img { width: 110px; height: auto; flex: none; }
.rgp-hub-head p { font-size: 18px; max-width: 640px; color: var(--ink-2, #4A3A2C); }
.rgp-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
@media (max-width: 1180px) { .rgp-cards { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .rgp-cards { grid-template-columns: 1fr; } }
.rgp-card { position: relative; display: grid; grid-template-rows: auto 1fr; gap: 12px; padding: 20px; border-radius: var(--p-r); text-decoration: none; color: var(--p-ink); background: var(--p-yellow-pale); border: 2px solid var(--p-line); overflow: hidden; transition: transform .26s var(--p-ease), box-shadow .26s, border-color .26s; }
.rgp-card:hover, .rgp-card:focus-visible { transform: translateY(-6px) rotate(-.6deg); box-shadow: 0 18px 40px rgba(42,27,16,.14); border-color: var(--p-yellow); }
.rgp-card--kado { background: #FFF0EE; } .rgp-card--dapur { background: #EEF7F0; } .rgp-card--chef { background: #FFF6DC; } .rgp-card--tantangan { background: #EEF3FA; }
.rgp-card-art { display: grid; place-items: center; height: 120px; }
.rgp-card-art img { height: 112px; width: auto; object-fit: contain; filter: drop-shadow(0 8px 10px rgba(42,27,16,.16)); transition: transform .4s var(--p-ease); }
.rgp-card:hover .rgp-card-art img { transform: scale(1.12) rotate(6deg); }
.rgp-card-txt { display: grid; gap: 4px; align-content: start; }
.rgp-card-txt small { font-size: 12px; font-weight: 800; letter-spacing: .02em; color: var(--p-muted); text-transform: uppercase; }
.rgp-card-txt strong { font: 600 22px/1.2 var(--font-display, inherit); }
.rgp-card-txt > span { font-size: 14px; color: var(--ink-2, #4A3A2C); }
.rgp-card-txt em { display: inline-flex; align-items: center; gap: 6px; margin-top: 10px; font-style: normal; font-weight: 800; }
.rgp-card-txt em .i { transition: transform .2s; }
.rgp-card:hover em .i { transform: translateX(4px); }

/* ---------- Stage ---------- */
.rgp-stage { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 24px; align-items: start; }
.rgp-guide { position: sticky; top: calc(var(--header-h, 76px) + 16px); display: grid; justify-items: center; gap: 12px; text-align: center; }
.rgp-mimin { width: 150px; height: auto; filter: drop-shadow(0 14px 16px rgba(120,70,0,.22)); animation: rgp-bob 4s ease-in-out infinite; }
.rgp-mimin.is-pop { animation: rgp-pop .45s var(--p-ease), rgp-bob 4s ease-in-out .45s infinite; }
.rgp-say { position: relative; margin: 0; padding: 12px 16px; border-radius: 18px; background: #fff; border: 2px solid var(--p-ink); font-weight: 700; font-size: 14.5px; line-height: 1.4; }
.rgp-say::before { content: ''; position: absolute; left: 50%; top: -9px; width: 14px; height: 14px; background: #fff; border-left: 2px solid var(--p-ink); border-top: 2px solid var(--p-ink); transform: translateX(-50%) rotate(45deg); }
.rgp-panel { background: #fff; border: 1px solid var(--p-line); border-radius: var(--p-r); padding: clamp(18px, 3vw, 32px); box-shadow: var(--shadow-sm, 0 2px 8px rgba(42,27,16,.05)); min-height: 360px; }
.rgp-panel > * { animation: rgp-in .35s var(--p-ease) both; }
.rgp-panel h2 { font-size: clamp(22px, 3vw, 30px); }
.rgp-panel h2:focus { outline: none; }
.rgp-progress { height: 8px; border-radius: 99px; background: var(--p-yellow-soft); overflow: hidden; margin-bottom: 18px; }
.rgp-progress i { display: block; height: 100%; border-radius: 99px; background: var(--p-yellow); transition: width .4s var(--p-ease); }
.rgp-step-head { margin-bottom: 18px; }
.rgp-step-head small { font-weight: 800; color: var(--p-muted); font-size: 12px; text-transform: uppercase; letter-spacing: .04em; }
.rgp-step-head p { color: var(--p-muted); margin-top: 4px; }

.rgp-opts { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.rgp-opts--faces { grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); }
.rgp-opts--stack { grid-template-columns: 1fr; }
.rgp-opt { display: flex; align-items: center; gap: 12px; min-height: 64px; padding: 12px 16px; text-align: left; border: 2px solid var(--p-line); border-radius: 16px; background: #fff; color: var(--p-ink); cursor: pointer; font: inherit; transition: border-color .16s, background .16s, transform .16s; }
.rgp-opt:hover:not(:disabled) { border-color: var(--p-yellow); background: var(--p-yellow-pale); transform: translateY(-2px); }
.rgp-opt.on { border-color: var(--p-ink); background: var(--p-yellow-soft); }
.rgp-opt:disabled { cursor: default; }
.rgp-opt.has-face { flex-direction: column; text-align: center; padding: 16px 10px; }
.rgp-opt-txt { display: grid; gap: 2px; }
.rgp-opt-txt b { font-size: 15.5px; line-height: 1.3; }
.rgp-opt-txt small { color: var(--p-muted); font-size: 13px; line-height: 1.35; }
.rgp-ico { flex: none; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 14px; background: var(--p-yellow-soft); color: #8A5A00; }
.rgp-letter { flex: none; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--p-yellow-soft); font-weight: 800; }
.rgp-opt.is-right { border-color: var(--p-green); background: #E6F4EA; }
.rgp-opt.is-wrong { border-color: var(--p-red); background: #FDF1F0; }
.rgp-face { width: 72px; height: 72px; object-fit: contain; transition: transform .25s var(--p-ease); }
.rgp-opt:hover .rgp-face, .rgp-opt.on .rgp-face { transform: scale(1.12) rotate(-4deg); }
.rgp-face--lg { width: 96px; height: 96px; }
.rgp-inputs { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.rgp-input { display: grid; gap: 6px; }
.rgp-input label { font-weight: 700; }
.rgp-input input, .rgp textarea { width: 100%; min-height: 48px; padding: 10px 14px; border: 2px solid var(--p-line); border-radius: 14px; font: inherit; font-size: 16px; color: var(--p-ink); background: #fff; }
.rgp-input input:focus, .rgp textarea:focus { border-color: var(--p-ink); outline: 3px solid var(--p-yellow); outline-offset: 1px; }
.rgp-nav { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-top: 24px; }
.rgp-nav--end { justify-content: flex-end; }
.rgp .btn:disabled { opacity: .45; cursor: not-allowed; }
.rgp-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }

.rgp-think { display: grid; justify-items: center; align-content: center; gap: 6px; min-height: 300px; grid-template-columns: repeat(3, 14px); justify-content: center; }
.rgp-think span { width: 12px; height: 12px; border-radius: 50%; background: var(--p-yellow); animation: rgp-dot 1s ease-in-out infinite; }
.rgp-think span:nth-child(2) { animation-delay: .15s; } .rgp-think span:nth-child(3) { animation-delay: .3s; }
.rgp-think p { grid-column: 1 / -1; white-space: nowrap; color: var(--p-muted); font-weight: 700; margin-top: 8px; }
@keyframes rgp-dot { 50% { transform: translateY(-10px); } }

/* ---------- Results ---------- */
.rgp-result-head, .rgp-type { display: flex; gap: 20px; align-items: center; padding: 20px; border-radius: 20px; background: var(--p-yellow-soft); margin-bottom: 20px; }
.rgp-result-head small, .rgp-type small, .rgp-mission small { font-weight: 800; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--p-muted); }
.rgp-type { background: color-mix(in srgb, var(--type, #F5B41E) 14%, #fff); border: 2px solid var(--type, #F5B41E); }
.rgp-type h2 { color: var(--type, inherit); }
.rgp-type-img { width: 130px; height: auto; flex: none; animation: rgp-bob 4s ease-in-out infinite; }
.rgp-type-tag { font: 400 18px/1.3 var(--font-script, cursive); margin: 4px 0 8px; }
.rgp-mission { position: relative; padding: 24px; border-radius: 20px; background: var(--p-ink); color: #fff; margin-bottom: 20px; }
.rgp-mission small { color: var(--yellow-400, #FFC933); }
.rgp-mission h2 { color: #fff; margin: 4px 0; }
.rgp-mission p { color: rgba(255,255,255,.85); }
.rgp-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.rgp-chips span { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 99px; background: rgba(255,255,255,.14); font-size: 13px; font-weight: 700; }
.rgp-crew { display: flex; margin-top: 16px; }
.rgp-crew .rgp-face { width: 60px; height: 60px; margin-right: -8px; background: #fff; border-radius: 50%; padding: 4px; border: 2px solid var(--p-yellow); animation: rgp-bob 3.4s ease-in-out infinite; }
.rgp-crew .rgp-face:nth-child(2n) { animation-delay: .4s; } .rgp-crew .rgp-face:nth-child(3n) { animation-delay: .8s; }
.rgp-sec { margin-top: 20px; }
.rgp-sec h3 { font-size: 18px; margin-bottom: 8px; }
.rgp-sec--tip, .rgp-sec--note, .rgp-sec--warn, .rgp-sec--card, .rgp-sec--today { padding: 16px 18px; border-radius: 16px; }
.rgp-sec--tip { background: var(--p-yellow-pale); border: 1px dashed var(--p-yellow); }
.rgp-sec--note { background: #EEF3FA; border-left: 5px solid #2A6F97; }
.rgp-sec--warn { background: #FDF1F0; border-left: 5px solid var(--p-red); }
.rgp-sec--card { background: #FFFDF7; border: 2px solid var(--p-line); }
.rgp-sec--today { background: var(--p-yellow-soft); border: 2px solid var(--p-yellow); }
.rgp-tip-text { font-size: 17px; line-height: 1.55; }
.rgp-list { margin: 0; padding-left: 20px; display: grid; gap: 6px; }
.rgp-two { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.rgp-two .rgp-sec { margin-top: 20px; }
.rgp-roles { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.rgp-roles li { display: grid; grid-template-columns: 56px 1fr; gap: 12px; align-items: start; padding: 12px; border: 1px solid var(--p-line); border-radius: 16px; }
.rgp-roles .rgp-face { width: 56px; height: 56px; }
.rgp-steps { list-style: none; counter-reset: s; margin: 0; padding: 0; display: grid; gap: 8px; }
.rgp-steps li { counter-increment: s; display: grid; grid-template-columns: 28px 1fr; gap: 10px; align-items: start; padding: 10px 12px; border-radius: 12px; background: var(--p-yellow-pale); }
.rgp-steps input { width: 24px; height: 24px; margin: 2px 0 0; accent-color: var(--p-ink); }
.rgp-steps label::before { content: counter(s) '. '; font-weight: 800; }
.rgp-steps input:checked + label { text-decoration: line-through; color: var(--p-muted); }
.rgp-mix { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.rgp-mix li { display: grid; grid-template-columns: 120px 1fr 44px; gap: 10px; align-items: center; font-size: 14px; }
.rgp-mix i { height: 12px; border-radius: 99px; background: #F1EEE8; overflow: hidden; }
.rgp-mix em { display: block; height: 100%; border-radius: 99px; }
.rgp-mix b { text-align: right; font-variant-numeric: tabular-nums; }
.rgp-mate { display: flex; gap: 12px; align-items: center; }

.rgp-prods { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 14px; }
.rgp-prod { display: grid; grid-template-rows: auto 1fr auto; gap: 8px; padding: 10px; border: 1px solid var(--p-line); border-radius: 18px; background: #fff; }
.rgp-prod-img { position: relative; display: block; border-radius: 12px; overflow: hidden; background: var(--card-bg, #F6F2EA); aspect-ratio: 1; }
.rgp-prod-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s var(--p-ease); }
.rgp-prod:hover .rgp-prod-img img { transform: scale(1.06); }
.rgp-prod-img em { position: absolute; left: 8px; top: 8px; padding: 3px 10px; border-radius: 99px; background: var(--p-ink); color: #fff; font-style: normal; font-size: 11px; font-weight: 800; }
.rgp-prod-txt { display: grid; gap: 2px; align-content: start; }
.rgp-prod-txt small { color: #8A5A00; font-size: 12px; font-weight: 700; }
.rgp-prod-name { font-weight: 700; font-size: 14px; line-height: 1.3; text-decoration: none; color: var(--p-ink); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.rgp-price { font-weight: 800; font-variant-numeric: tabular-nums; font-size: 14px; }
.rgp-price del { color: var(--p-muted); font-weight: 400; font-size: 12px; margin-right: 4px; }
.rgp-price ins { text-decoration: none; }
.rgp-prod .btn { min-height: 44px; padding: 0 10px; font-size: 13px; white-space: normal; text-align: center; }
.rgp-total { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 14px; padding: 14px 16px; border-radius: 16px; background: var(--p-yellow-soft); }

/* ---------- Tantangan ---------- */
.rgp-score { padding: 18px; border-radius: 20px; background: var(--p-ink); color: #fff; }
.rgp-score-nums { display: flex; gap: 28px; margin-bottom: 22px; }
.rgp-score-nums div { display: grid; }
.rgp-score-nums b { font: 600 34px/1 var(--font-display, inherit); color: var(--yellow-400, #FFC933); font-variant-numeric: tabular-nums; }
.rgp-score-nums span { font-size: 13px; opacity: .85; }
.rgp-score .rgp-muted { color: rgba(255,255,255,.8); margin-top: 18px; }
.rgp-meter { position: relative; height: 12px; border-radius: 99px; background: rgba(255,255,255,.18); margin: 0 14px; }
.rgp-meter i { display: block; height: 100%; border-radius: 99px; background: var(--yellow-400, #FFC933); transition: width .6s var(--p-ease); }
.rgp-meter-dot { position: absolute; top: 50%; width: 28px; height: 28px; margin: -14px 0 0 -14px; display: grid; place-items: center; border-radius: 50%; background: #5A4A3C; color: #fff; font-size: 12px; font-weight: 800; border: 2px solid var(--p-ink); }
.rgp-meter-dot.on { background: var(--yellow-400, #FFC933); color: var(--p-ink); }
.rgp-login { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; margin-top: 16px; padding: 14px 16px; border-radius: 16px; background: #EEF3FA; }
.rgp-login p { flex: 1 1 260px; font-size: 14px; }
.rgp-tiers, .rgp-vouchers { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.rgp-tiers li { display: grid; grid-template-columns: 40px 1fr auto; gap: 12px; align-items: center; padding: 12px 14px; border: 2px solid var(--p-line); border-radius: 16px; }
.rgp-tiers li.on { border-color: var(--p-yellow); background: var(--p-yellow-pale); }
.rgp-tiers small, .rgp-vouchers small { display: block; color: var(--p-muted); font-size: 13px; }
.rgp-tier-n { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--p-yellow-soft); font-weight: 800; }
.rgp-tiers li.on .rgp-tier-n { background: var(--p-yellow); }
.rgp-pill { padding: 4px 12px; border-radius: 99px; background: #F1EEE8; color: var(--p-muted); font-size: 12px; font-weight: 800; white-space: nowrap; }
.rgp-pill.on { background: #E6F4EA; color: #1D5C38; }
.rgp-vouchers li { display: flex; justify-content: space-between; gap: 12px; align-items: center; flex-wrap: wrap; padding: 10px 12px; border-radius: 12px; background: #fff; border: 1px dashed var(--p-ink); }
.rgp-vouchers code { font-size: 17px; font-weight: 800; letter-spacing: .04em; background: none; }
.rgp-verdict { margin-top: 16px; padding: 14px 16px; border-radius: 16px; }
.rgp-verdict.is-right { background: #E6F4EA; color: #174A2C; }
.rgp-verdict.is-wrong { background: #FDF1F0; color: #7A2520; }

.rgp-confetti { position: fixed; inset: 0; pointer-events: none; z-index: 300; overflow: hidden; }
.rgp-confetti i { position: absolute; top: -20px; width: 10px; height: 16px; border-radius: 3px; animation: rgp-fall 2s linear forwards; }
@keyframes rgp-fall { to { top: 105%; transform: rotate(720deg) translateX(40px); opacity: .9; } }

@media (max-width: 860px) {
  .rgp-stage { grid-template-columns: 1fr; gap: 12px; }
  .rgp-guide { position: static; grid-template-columns: 76px 1fr; justify-items: start; text-align: left; align-items: center; }
  .rgp-mimin { width: 76px; }
  .rgp-say::before { left: -9px; top: 50%; transform: translateY(-50%) rotate(-45deg); }
  .rgp-result-head, .rgp-type { flex-direction: column; text-align: center; }
  .rgp-hub-head { flex-direction: column; text-align: center; }
  .rgp-mix li { grid-template-columns: 96px 1fr 40px; }
  .rgp-prods { grid-template-columns: repeat(2, 1fr); }
  .rgp-tiers li { grid-template-columns: 40px 1fr; }
  .rgp-tiers li > :last-child { grid-column: 2; justify-self: start; }
}
@media (prefers-reduced-motion: reduce) {
  .rgp-bob, .rgp-mimin, .rgp-mimin.is-pop, .rgp-type-img, .rgp-crew .rgp-face, .rgp-think span, .rgp-panel > * { animation: none; }
  .rgp-card, .rgp-card-art img, .rgp-opt, .rgp-face { transition: none; }
}
@media print {
  .site-header, .site-footer, .announce, .rgc, .rgp-guide, .rgp-nav, .rgp-back, .rgp-sec--prods, .page-head, .page-title, .rg-family-row { display: none !important; }
  .rgp-stage { display: block; } .rgp-panel { border: 0; box-shadow: none; padding: 0; }
  .rgp-mission { background: #fff; color: #000; border: 2px solid #000; } .rgp-mission h2, .rgp-mission p, .rgp-mission small { color: #000; }
}

/* Undo the theme's article typography inside the games. */
.prose .rgp h2, .prose .rgp h3, .prose .rgp-hub h2 { margin-top: 0; }
.prose .rgp ul, .prose .rgp ol { padding-left: 0; }
.prose .rgp .rgp-list { padding-left: 20px; }
.prose .rgp a, .prose .rgp-hub a, .prose .rgp-back a { text-decoration: none; }
.prose .rgp .rgp-prod-name:hover, .prose .rgp-back a:hover { text-decoration: underline; }
.prose .rgp .rgp-sec h3 { font-size: 18px; margin-bottom: 8px; }
