/* Three distinct reference-style game pages. Parent header and footer never remount. */
#game.rk-fixed-shell #rk-feature-page{position:absolute;inset:93px 0 92px;z-index:58;display:flex;flex-direction:column;overflow:hidden;direction:rtl;background:linear-gradient(#172e43,#0c1c2b 63%,#061420);border-left:1px solid #997d50;border-right:1px solid #997d50;color:#f5e8cc}
#game #rk-feature-page[hidden]{display:none!important}
#rk-feature-page .rk-feature-header{height:73px;flex:0 0 73px;display:flex;align-items:center;gap:9px;padding:8px 10px;border-bottom:2px solid #bfa173;background:linear-gradient(180deg,#223f55,#122a40)}
#rk-feature-page .rk-feature-stamp{width:54px;height:54px;border:2px solid #bba16c;border-radius:7px;background:#101f2d;display:grid;place-items:center}
#rk-feature-page .rk-feature-title-icon{width:44px;height:44px;object-fit:contain}
#rk-feature-page .rk-feature-title{flex:1;min-width:0;display:flex;flex-direction:column;gap:4px;color:#f8daa1;text-shadow:0 1px #000}
#rk-feature-page .rk-feature-title strong{font:bold 21px Tahoma,Arial}
#rk-feature-page .rk-feature-title small{font:12px Tahoma;color:#e3d5b5}
#rk-feature-page .rk-feature-close{width:42px;height:42px;border:2px solid #b79b6c;border-radius:7px;background:#182838;color:#ffe2a6;font:bold 29px Tahoma}
#rk-feature-page .rk-feature-navigation{flex:0 0 auto;display:flex;align-items:center;gap:5px;padding:9px 8px 7px;overflow-x:auto;min-height:50px;background:linear-gradient(#111f30,#1a344a);scrollbar-width:thin}
#rk-feature-page .rk-feature-navigation button{flex:1;min-width:76px;min-height:42px;white-space:nowrap;padding:6px 8px;border:1px solid #826c4a;border-radius:5px;background:linear-gradient(#253f50,#132737);color:#e6ceb1;font:12px Tahoma}
#rk-feature-page .rk-feature-navigation button.active{background:linear-gradient(#b78a46,#69441f);border:1px solid #efcc7d;color:#fff6de;font-weight:bold}
#rk-feature-page .rk-feature-content{flex:1;min-height:0;overflow:auto;overscroll-behavior:contain;padding:10px 11px 25px;-webkit-overflow-scrolling:touch;scrollbar-width:thin}
#rk-feature-page .rk-feature-status{position:absolute;right:10px;left:10px;bottom:12px;z-index:4;border:1px solid #c0a16b;border-radius:6px;background:#203d52f5;padding:13px;color:#ffebbe;text-align:center;font:13px Tahoma;box-shadow:0 4px 8px #0008}
#rk-feature-page .rk-feature-status[hidden]{display:none}
#rk-feature-page .rk-feature-loading{color:#efd4a0;text-align:center;margin:36px 0;font:14px Tahoma}
#rk-feature-page .rk-feature-hero{display:block;width:100%;max-height:173px;object-fit:contain;margin:0 auto 11px;filter:drop-shadow(0 3px 6px #0009)}
#rk-feature-page .rk-feature-subheading{font:bold 17px Tahoma;color:#ffdc98;margin:12px 2px;padding-bottom:7px;border-bottom:1px solid #8b7352}
#rk-feature-page .rk-feature-empty{display:flex;flex-direction:column;align-items:center;justify-content:center;min-height:150px;gap:9px;background:radial-gradient(ellipse at center,#2a4254,#152839);border:1px solid #746a57;border-radius:8px;padding:14px;text-align:center;font:13px/1.8 Tahoma;color:#dfd0ae}
#rk-feature-page .rk-feature-empty p{margin:0}
#rk-feature-page .rk-feature-empty-icon{width:65px;height:65px;object-fit:contain}
#rk-feature-page .rk-feature-events,#rk-feature-page .rk-feature-task-list,#rk-feature-page .rk-feature-reward-list{display:flex;flex-direction:column;gap:10px}
#rk-feature-page .rk-feature-event-card{border:1px solid #ad8c59;border-radius:7px;background:linear-gradient(105deg,#203a4d,#102537);padding:8px;display:flex;align-items:center;gap:11px;min-height:94px;box-shadow:0 2px 7px #0004}
#rk-feature-page .rk-feature-event-art{flex:0 0 82px;width:82px;height:75px;object-fit:contain;filter:drop-shadow(0 2px 4px #0009)}
#rk-feature-page .rk-feature-event-text{min-width:0;flex:1;display:flex;flex-direction:column;gap:5px}
#rk-feature-page .rk-feature-event-text strong{font:bold 15px Tahoma;color:#ffdf9c}
#rk-feature-page .rk-feature-event-text span{font:12px/1.55 Tahoma;color:#e6e1cf}
#rk-feature-page .rk-feature-event-text small{align-self:start;border:1px solid #777364;border-radius:4px;padding:3px 7px;font:11px Tahoma;color:#ead7a7}
#rk-feature-page .rk-feature-task-card{padding:12px;border:1px solid #ab895b;border-radius:7px;background:linear-gradient(110deg,#2c3e46,#192c3b);display:flex;flex-direction:column;gap:10px}
#rk-feature-page .rk-feature-task-title{display:flex;align-items:center;gap:11px}
#rk-feature-page .rk-feature-task-icon{width:63px;height:60px;object-fit:contain;flex:0 0 63px}
#rk-feature-page .rk-feature-task-info{display:flex;flex-direction:column;gap:6px;min-width:0}
#rk-feature-page .rk-feature-task-info strong{font:bold 15px Tahoma;color:#ffdaa0}
#rk-feature-page .rk-feature-task-info span{font:12px Tahoma;color:#e6d7bd}
#rk-feature-page .rk-feature-progress{height:12px;border:1px solid #b59b70;border-radius:8px;background:#070f1b;overflow:hidden}
#rk-feature-page .rk-feature-progress i{display:block;height:100%;background:linear-gradient(90deg,#ac742e,#f3c664);border-radius:8px}
#rk-feature-page .rk-feature-task-detail{display:flex;justify-content:space-between;color:#e8d1a7;font:12px Tahoma}
#rk-feature-page .rk-feature-action{border:2px solid #dab05b;border-radius:6px;background:linear-gradient(#ab692e,#743b13);color:#fff0c9;min-height:40px;padding:8px 12px;font:bold 13px Tahoma;touch-action:manipulation;align-self:stretch}
#rk-feature-page .rk-feature-action:disabled{background:linear-gradient(#4a535c,#273741);color:#c3b9a9;border-color:#80775f;opacity:.8}
#rk-feature-page .rk-feature-hint{font:12px/1.7 Tahoma;color:#dac7a9;text-align:center;margin:8px 0}
#rk-feature-page .rk-feature-login-day{text-align:center;background:linear-gradient(#67452a,#412919);color:#f6dca8;border:1px solid #bb945c;border-radius:6px;padding:9px;font:bold 15px Tahoma}
#game.rk-feature-open #rk-apk-right-actions,#game.rk-feature-open #rk-city-outside-timers,#game.rk-feature-open #rk-apk-more,#game.rk-feature-open #rok-audio-holder,#game.rk-feature-open .fab{display:none!important}
@media(max-width:360px){#rk-feature-page .rk-feature-header{gap:5px;padding:6px}#rk-feature-page .rk-feature-title strong{font-size:18px}#rk-feature-page .rk-feature-title small{font-size:10px}#rk-feature-page .rk-feature-event-art{flex-basis:68px;width:68px}#rk-feature-page .rk-feature-event-text strong{font-size:13px}#rk-feature-page .rk-feature-content{padding:8px}}
@media(max-height:650px){#game.rk-fixed-shell #rk-feature-page{bottom:81px}#rk-feature-page .rk-feature-header{height:62px;flex-basis:62px}#rk-feature-page .rk-feature-stamp{width:45px;height:45px}#rk-feature-page .rk-feature-title-icon{width:38px;height:38px}}

/* Music controller is attached to body, not #game: hide it over internal screens. */
body:has(#game.rk-feature-open) #rok-audio-holder,
body:has(#game.rk-feature-open) #rok-audio-settings{display:none!important}

/* Scheduled events and 31-day attendance grid. */
#rk-feature-page .rk-feature-events .rk-feature-event-card{flex-wrap:wrap}
/* Keep the claim buttons below the card description on narrow phone screens. */
#rk-feature-page .rk-feature-reward-list>.rk-feature-event-card{flex-wrap:wrap;align-items:center}
#rk-feature-page .rk-feature-reward-list>.rk-feature-event-card .rk-feature-event-text{overflow-wrap:anywhere}
#rk-feature-page .rk-feature-reward-list>.rk-feature-event-card .rk-feature-event-goal{flex:1 0 100%;margin:3px 5px;color:#f0d8a5;font:12px/1.7 Tahoma}
#rk-feature-page .rk-feature-reward-list>.rk-feature-event-card .rk-feature-action{flex:1 0 100%;margin:4px 5px 3px;max-width:100%}
#rk-feature-page .rk-feature-events .rk-feature-event-card .rk-feature-event-goal,
#rk-feature-page .rk-feature-events .rk-feature-event-card .rk-feature-event-deadline{flex:1 0 100%;margin:3px 5px;color:#f0d8a5;font:12px/1.7 Tahoma}
#rk-feature-page .rk-feature-events .rk-feature-event-card .rk-feature-progress{flex:1 0 100%}
#rk-feature-page .rk-feature-events .rk-feature-event-card .rk-feature-action{flex:1 0 100%;margin:4px 5px 3px}
#rk-feature-page .rk-feature-events .rk-feature-event-card .rk-feature-go-action{flex:1 0 100%;margin:4px 5px 5px;border:1px solid #9aafbc;background:linear-gradient(#263f4c,#142637);color:#efd9a4;border-radius:6px;padding:9px;font:13px Tahoma;touch-action:manipulation}
#rk-feature-page .rk-feature-calendar{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:7px;padding:5px 0 18px}
#rk-feature-page .rk-feature-calendar-day{min-width:0;min-height:115px;position:relative;display:flex;flex-direction:column;align-items:center;gap:3px;background:linear-gradient(#283b48,#102332);border:1px solid #897453;border-radius:6px;padding:6px 4px;color:#d8c9ae;text-align:center}
#rk-feature-page .rk-feature-calendar-day strong{color:#e9cd8c;font:bold 14px Tahoma}
#rk-feature-page .rk-feature-calendar-day .rk-feature-calendar-art{width:44px;height:43px;max-width:100%;object-fit:contain}
#rk-feature-page .rk-feature-calendar-day small{font:10px/1.35 Tahoma;color:#eee1c4;overflow-wrap:anywhere}
#rk-feature-page .rk-feature-calendar-current{border:2px solid #e8c063;box-shadow:inset 0 0 5px #e7c46855}
#rk-feature-page .rk-feature-calendar-mark{background:#a77a35;color:#fff3ce;border-radius:3px;padding:3px 5px;font:10px Tahoma}
@media(max-width:355px){#rk-feature-page .rk-feature-calendar{gap:5px}#rk-feature-page .rk-feature-calendar-day{min-height:104px;padding:5px 3px}#rk-feature-page .rk-feature-calendar-day .rk-feature-calendar-art{width:37px;height:35px}}
#rk-apk-right-actions .rk-feature-counter{position:absolute;top:-4px;right:-2px;min-width:18px;height:18px;border:2px solid #fff1bd;border-radius:50%;background:#ad2a2f;color:#fff;font:bold 11px Tahoma;display:grid;place-items:center;padding:1px 3px;pointer-events:none}
/* Reference-styled event standings; persistent game header/footer unaffected. */
#rk-feature-page .rk-feature-rank-action{flex:1 0 100%;margin:3px 5px 6px;border:1px solid #a98c51;background:linear-gradient(#415268,#1c3143);color:#f5dfb8;border-radius:7px;padding:10px;font:13px Tahoma;touch-action:manipulation}
#rk-feature-page .rk-feature-ranking{display:flex;flex-direction:column;gap:12px;min-height:0}
#rk-feature-page .rk-feature-rank-return{align-self:flex-start;border:1px solid #d0ac70;border-radius:6px;background:linear-gradient(#664728,#30291f);color:#fce7bd;font:13px Tahoma;padding:9px 16px;touch-action:manipulation}
#rk-feature-page .rk-feature-rank-meta{margin:0;border:1px solid #90764d;border-radius:6px;background:#25384c;color:#ebd2a4;padding:10px;text-align:center;font:13px Tahoma}
#rk-feature-page .rk-feature-ranking-rows{display:flex;flex-direction:column;gap:6px}
#rk-feature-page .rk-feature-ranking-row{display:flex;align-items:center;gap:11px;min-width:0;border:1px solid #7d6c51;border-radius:6px;padding:9px 11px;background:linear-gradient(105deg,#213b4f,#132a40);color:#eee1c8}
#rk-feature-page .rk-feature-ranking-row:nth-child(-n+3){border-color:#cdac65}
#rk-feature-page .rk-feature-ranking-position{width:37px;text-align:center;color:#f7cd7a;font:bold 18px Tahoma}
#rk-feature-page .rk-feature-ranking-name{flex:1;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font:13px Tahoma}
#rk-feature-page .rk-feature-ranking-score{font:bold 15px Tahoma;color:#f4d698;white-space:nowrap}
#rk-feature-page .rk-feature-ranking-self{border:2px solid #77b6a3!important;background:linear-gradient(#213f43,#123033)}
#rk-feature-page .rk-feature-ranking-my-position{border:2px solid #b79b68;background:#2c3d4b;color:#ffe3a4;padding:14px 10px;text-align:center;border-radius:7px;font:bold 14px Tahoma}

/* FEATURE_TABS_ALL_VISIBLE_BATCH31: expose every task/event/reward square on small phones. */
@media(max-width:440px){
 #rk-feature-page .rk-feature-navigation{
  display:grid;grid-auto-flow:row;overflow-x:visible;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:5px;padding:6px 7px;
 }
 #rk-feature-page[data-section="events"] .rk-feature-navigation,
 #rk-feature-page[data-section="tasks"] .rk-feature-navigation{
  grid-template-columns:repeat(2,minmax(0,1fr));
 }
 #rk-feature-page .rk-feature-navigation button{
  flex:none;min-width:0;min-height:42px;white-space:normal;
  padding:7px 4px;
 }
}

/* Multiple reward integrations add four shortcuts to five source-inspired tabs.
   Render all nine buttons, without hidden horizontal overflow at 600px on desktop. */
#rk-feature-page[data-section="rewards"] .rk-feature-navigation{
 display:grid;grid-template-columns:repeat(3,minmax(0,1fr));grid-auto-flow:row;
 overflow-x:visible;gap:5px;
}
#rk-feature-page[data-section="rewards"] .rk-feature-navigation button{
 min-width:0;min-height:42px;white-space:normal;
}
