/* URMOVE: warm ink, sunny yellow, and a hand-drawn arcade character. */
@import url('/fonts.css');
:root{--paper:#fffcf2;--paper-2:#f6f0df;--ink:#24251f;--ink-soft:#69695e;--line:#e0d9c5;--gold:#ffcc28;--gold-soft:#fff2bd;--ui:'Barlow',system-ui,sans-serif;--display:'Boogaloo',sans-serif;--mono:'Barlow',system-ui,sans-serif}
html,body{background:var(--paper);font-family:var(--ui)}
h1,h2,h3,.king,.kh-gt b,.big-btn,.btn,.cold-2nd,.cold-play,.tool .nm,.touch button,.hub h1,.hub h2,.card h1,.card h2,.ab-play{font-family:var(--display);font-weight:400;letter-spacing:0}
button,input,select,textarea{font-family:var(--ui)}
input,textarea,select{background:#fffef9;border-radius:10px!important;font-size:17px!important;font-weight:500}
button:focus-visible,a:focus-visible{outline:3px solid #4264da;outline-offset:3px}
.big-btn,.btn.primary,.cold-play,.hub-cta{background:linear-gradient(110deg,#ffd740,#ffc422);border:2px solid var(--ink);box-shadow:2px 3px 0 var(--ink);border-radius:12px;color:var(--ink);font-size:23px;letter-spacing:0;padding:13px 20px}
.btn,.chip,.cold-2nd{border:1.5px solid var(--ink);border-radius:10px;background:var(--paper);box-shadow:1px 2px 0 var(--ink);font-size:18px;letter-spacing:0}
.big-btn:active,.btn:active,.cold-2nd:active{transform:translateY(2px);box-shadow:none}
.card,.g-modal,.hill-card,.hub-onb,.hub-create{border-radius:18px;border-width:2px;box-shadow:3px 4px 0 var(--ink);background:var(--paper)}
.kicker,.cold-eyebrow,.hub .kicker{font-size:12px;letter-spacing:1.8px;font-weight:700;color:var(--ink-soft)}
.modal{background:#24251f80;backdrop-filter:blur(4px)}
.kh{background:#fffcf2;border-bottom:1px solid var(--line)}
.kh-home .kh-hand{content:url('/brand/crown.svg');width:34px;height:34px}.kh-home .kh-word{display:none}
.kh-game{background:none!important;border:0!important;box-shadow:none!important;padding:2px 8px!important}.kh-gi{display:none}.kh-gt b{font-size:26px}
/* one top bar on every page */.kh-live{font-size:10px!important;letter-spacing:1px!important}
.kh-clan{border-width:1px;box-shadow:none}
.app-nav{background:#fffcf2f5!important;border-top:1px solid var(--line)!important;backdrop-filter:blur(12px)}.app-nav .nm{font:500 13px var(--ui)!important}.app-nav .on .nm{background:none!important}.app-nav .ico{height:26px}.app-nav .on{color:#24251f}.app-nav .on svg .acc{fill:var(--gold)}
.m-nav{background:var(--paper);border-bottom:1px solid var(--line)}.m-nav .nm{font:500 14px var(--ui)}
.chat{border-left:1px solid var(--line);background:#fffdf7}.chat-head{font-family:var(--display);font-size:23px;border-bottom:1px solid var(--line)}.composer{border-top:1px solid var(--line)}.msg{font-size:15px;background:#f4efdf;border-radius:12px;padding:10px 12px;margin:8px}.msg .who{font-weight:700}.chat-empty{padding:20px;color:var(--ink-soft)}
body.door{display:flex;flex-direction:column;justify-content:flex-start;min-height:100svh;background:#fbf5df url('/brand/hill-landscape.png') center bottom/cover fixed no-repeat;padding:clamp(20px,5vh,55px) 16px 35px}
.door .cold-top{padding:0;max-width:470px}.door .cold{max-width:470px;padding:0 6px;text-align:center}.door .hero-challenge{display:block;margin:0;text-align:center;animation:none}.hero-crown{display:block;width:62px;height:50px;margin:0 auto -4px}.door .hero-ur{font:clamp(49px,12vw,73px)/1.1 'Knewave',sans-serif;letter-spacing:-3px;display:block;transform:rotate(-4deg)}.door .hero-point{display:none}.door .cold-desc{font:26px/1.06 var(--display);max-width:290px;margin:12px auto 0;text-transform:uppercase;transform:rotate(-4deg)}
.door-art{display:block;width:100%;height:148px;object-fit:contain;margin:3px auto 8px}.door .cold-hero{margin-bottom:0}.door-entry{padding:12px;border:1.5px solid var(--ink);border-radius:13px;background:#fffbedeb;box-shadow:2px 3px 0 #24251f}.door-entry label{text-align:left;display:block;font-size:13px;color:var(--ink-soft)}.door-entry input{width:100%;height:44px;padding:8px 12px;border:1px solid #d9d1b8;margin:4px 0 10px;background:#fffdf4}.door-entry .big-btn{width:100%;margin:0}.entry-note{font-size:14px;line-height:1.3;margin:12px 0;text-shadow:0 1px #fff}.entry-error{color:#a93429;font-size:14px}.door .cold-social{gap:10px;margin:15px 0;grid-template-columns:1fr 1fr}.door .cold-2nd{font-size:17px;padding:10px 6px;background:#fffcf2ea;min-height:0}.door .cold-cadence{display:none}.door .cold-account{margin:18px 0 0}.door .cold-signin{font:600 14px var(--ui);letter-spacing:0;background:#fffcf2d9;border-radius:20px;padding:8px 14px}.cold-back{margin:14px 0!important}.cold-groups a{padding:12px!important;background:#fffcf2ed;border-width:1.5px!important;border-radius:12px!important;font-size:18px!important}.cold-groups .go{font:20px var(--display)!important}.cold-eyebrow{margin-bottom:8px}
.opening-scene{background:var(--paper)}
/* Hill home: the owner and their edits are the challenge. */
body.hill-page .screen{max-width:660px}body.hill-page .stage{padding:20px}body.hill-page #gameScreen{max-width:none}
.hill-page .hill-card{display:flex!important;flex-direction:column!important;padding:20px!important;gap:12px!important;position:relative;border:1px solid #dfaf28;box-shadow:0 4px 0 #e3c36340;background:linear-gradient(135deg,#fffef9,#fff6d9)}
.hill-page .hill-main{display:contents!important}.hill-page .hill-card .kicker{display:none}.hill-page .king{order:0;font-size:clamp(28px,5vw,38px);text-align:center;line-height:1.1;margin:0!important}.hill-page .king span{color:var(--ink)!important;font-weight:400!important}.hill-page .reign{order:1;text-align:center;font:23px var(--display);margin:0}.hill-page .version{order:2;font:13px var(--ui);text-align:center;color:var(--ink-soft);margin:-6px 0 3px}.hill-page .thumb{order:3;width:100%!important;height:160px!important;border:2px solid var(--ink);border-radius:9px;max-width:none;align-self:center}.hill-page .changelog{order:4;text-align:center;font-size:15px;line-height:1.4;margin:0}.hill-page .changelog .who{font-weight:500}.hill-page .inks{display:none}.hill-page #playBtn{order:7;width:100%;margin:4px 0 0;font-size:26px}.hill-page .secondary{display:none!important}.hill-page .hill-card .m-share{order:8;margin:0;box-shadow:none;border:0;background:none;text-decoration:underline;font:14px var(--ui);padding:5px}.hill-faces{order:5;display:flex;justify-content:center;gap:6px}.u-avatar{display:inline-flex;width:36px;height:36px;border:2px solid var(--ink);border-radius:50%;background:var(--av,#ffe184);align-items:center;justify-content:center;overflow:hidden;flex:none}.u-avatar svg{width:32px;height:32px}.hill-recent{margin:20px 0}.hill-recent h3{font-size:21px;margin:0 0 10px}.recent-list{display:flex;gap:14px;overflow:auto}.recent-player{display:flex;gap:8px;align-items:center;min-width:100px;font-size:13px}.recent-player small{display:block;color:var(--ink-soft);margin-top:2px}.recent-empty{font-size:14px;color:var(--ink-soft);margin:0}.hill-page .tabs{border-bottom:1px solid var(--line);margin-top:20px}.hill-page .tabs button{font:19px var(--display);padding:9px 14px}.hill-page .tab-body{background:none;border:0;padding:10px 0}.evolution-head{display:flex;align-items:center;justify-content:space-between;gap:10px;margin:8px 0 15px}.evolution-head h2{font-size:27px;margin:0}.evolution-filter{display:flex;background:#eee7d4;padding:3px;border-radius:12px}.evolution-filter button{border:0;background:none;font-size:13px;padding:7px 9px;border-radius:9px}.evolution-filter button.on{background:var(--paper);box-shadow:0 0 0 1px var(--ink)}.evolution-row{display:flex;position:relative;gap:12px;padding:14px 0;border-bottom:1px solid var(--line);align-items:flex-start}.evolution-row .u-avatar{z-index:1}.evolution-row:before{content:'';position:absolute;left:17px;top:48px;bottom:-13px;border-left:1px solid #d7cbb0}.evolution-row:last-child:before{display:none}.evolution-row .grow{min-width:0;font-size:14px}.evolution-row .vnum{font:19px var(--display);margin-right:8px}.evolution-row .changes{font-size:13px;color:var(--ink-soft);line-height:1.5;margin:5px 0}.evolution-row .acts{display:flex;flex-direction:column;align-items:flex-end;gap:8px}.evolution-row .chip{font:12px var(--ui);padding:5px 8px;box-shadow:none}.evo-thumb{width:75px;height:68px;border:1px solid var(--ink);border-radius:10px;background:#fffdf5}.evolution-row .meta{font-size:12px;letter-spacing:0}.stat-superlatives{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin:10px 0 20px}.stat-tile{border:1px solid var(--line);border-radius:13px;padding:14px;background:#fff9e8}.stat-tile small{display:block;font-size:13px;margin-bottom:10px}.stat-tile strong{display:block;font:27px var(--display)}.stat-tile .winner{font-size:15px}.stat-tile.wide{grid-column:1/-1}.stats{font-size:13px}.stats th{font:14px var(--display)}
.hill-page.playing .stage{padding:0}.hill-page.playing .hud{padding:10px 12px;background:var(--paper);border-bottom:1px solid var(--line)}.hill-page .hud .title{font:19px var(--display)}.hill-page .hud .sub{font:12px var(--ui)}.hill-page .hud .btn{font:16px var(--display);padding:8px 10px;box-shadow:none}.hill-page .canvas-wrap{border:0;margin:0}.hill-page #game{border-radius:0;border:0;box-shadow:none}.hill-page .touch{padding:12px;background:var(--paper);gap:8px;border-top:1px solid var(--line)}.hill-page .touch button{border:2px solid var(--ink);border-radius:12px;box-shadow:2px 3px 0 var(--ink);min-height:55px;font-size:23px;background:#fffef8}.hill-page .touch .jump{background:var(--gold);min-width:110px}.hill-page .overlay{background:#232521b8;backdrop-filter:blur(3px)}.hill-page .overlay .card{max-width:420px;width:calc(100% - 24px);padding:25px 20px;text-align:center}.hill-page .overlay .btns{flex-direction:column}.hill-page .overlay .btn{width:100%;min-height:46px}.hill-page .overlay:has(.defeat-title){background:#232521eb}.hill-page .overlay:has(.defeat-title) .card{color:#fff9e7;background:transparent;border:0;box-shadow:none}.defeat-title{font:42px/1.05 var(--display)!important;color:#fa7559;margin:9px 0 15px}.defeat-kicker{font:24px var(--display);transform:rotate(-5deg);color:#fff9e7}.defeat-art{width:150px;height:135px;margin:8px auto;display:block}.win-crown{width:72px;height:60px}.win-title{font:40px/1.03 'Knewave',sans-serif!important;transform:rotate(-5deg);margin:10px 0 20px!important}.win-stats{display:grid;grid-template-columns:repeat(3,1fr);border:1px solid var(--line);border-radius:12px;padding:12px 0;margin-bottom:15px}.win-stats span{font-size:12px}.win-stats b{display:block;font:24px var(--display);margin-top:5px}.hill-page .toolbar{border-bottom:1px solid var(--line);padding:8px}.hill-page .tool{border:1px solid transparent;box-shadow:none;border-radius:10px;min-width:57px;padding:6px}.hill-page .tool.on{border-color:var(--ink);background:var(--gold-soft)}.hill-page .tool .cost{font:11px var(--ui)}
.hub{max-width:820px}.hub h1{font-size:36px}.gp-pfp{border-radius:18px!important;box-shadow:3px 3px var(--ink)}.gp-tabs button{font:20px var(--display);letter-spacing:0}.gp-game,.gp-member,.rank-row{border-radius:14px!important;border-width:1px!important;box-shadow:none!important}.hub-live{max-width:480px;margin:25px auto;text-align:center}.hub-live .hub-cta,.hub-live .hub-2nd{display:block;width:100%;margin:10px 0}.hub .gform label{font-size:13px;letter-spacing:.4px}.hub .gform input{font-size:17px}.hub-3rd{font-size:14px}
@media(min-width:901px){body.door{background-size:auto 100%;background-color:#fcf7e7}.hill-page .hill-card{margin:0 auto;max-width:540px}.hill-recent{max-width:540px;margin:20px auto}.hill-page .tabs,.hill-page .tab-body{max-width:540px;margin-left:auto;margin-right:auto}.hill-page .thumb{height:200px!important}.hill-page .kh-bar{max-width:1500px;margin:auto;width:100%}}
@media(max-width:900px){.hill-page .stage{padding:14px}.hill-page .hill-card{padding:16px!important}.kh-gt b{font-size:23px}.kh-home{width:34px}.kh-me{width:34px;height:34px;border:1.5px solid var(--ink);border-radius:50%;font-size:13px;box-shadow:none}.kh-me.signin{width:auto;padding:5px 9px}.kh-bar{min-height:60px;padding:7px 12px}.kh-clan{font-family:var(--display);font-size:17px;letter-spacing:0;border-radius:999px}.hill-page .hill-card .thumb{height:145px!important}.hill-page .king{font-size:29px}.hill-page .hill-recent{margin:16px 0}.hill-page .layout{min-height:0}.hill-page[data-pane="history"] .hill-recent,.hill-page[data-pane="stats"] .hill-recent,.hill-page[data-pane="community"] .hill-recent{display:none}.hill-page .stats{display:block;overflow:auto}.hill-page .evolution-head h2{font-size:25px}.hill-page .m-nav{display:none}.hill-page:not([data-pane="play"]) .hill-utilities{display:none}.hill-page:not([data-pane="play"]):not(.playing) .hill-back{display:block;flex:none;align-self:flex-start;margin:10px 14px 0;font:14px var(--ui);padding:7px 12px;box-shadow:none;border-color:var(--line)}.hill-page .hud .btns{gap:5px}.hill-page .hud .title{font-size:17px}.hill-page .hud .sub{font-size:11px}.hill-page .hud .btn{font-size:14px}.hill-page .toolbar{order:3}.hill-page .m-hint{order:4}.hill-page .touch{order:5}.hill-page .hud .btn[data-h="done"]{background:var(--gold)}.hub{padding:18px 16px 90px}.hub h1{font-size:32px}.door .cold-top{padding-bottom:0}.door .cold{padding:0 6px}.door .cold-social{grid-template-columns:1fr 1fr}.door .cold-desc{font-size:23px}.door-art{height:130px}.door .hero-ur{font-size:57px}.door .entry-note{font-size:13px}}
@media(prefers-reduced-motion:reduce){*,*:before,*:after{scroll-behavior:auto!important;animation:none!important;transition:none!important}}
.hill-utilities{display:flex;gap:10px;margin:10px 0}.hill-utilities .btn{flex:1;box-shadow:none;border-color:var(--line);font:14px var(--ui);padding:9px 4px}.hill-back{display:none}.hill-page .evolution-row .grow>div:first-of-type{display:inline}.hill-page .defeat-art{border-radius:25px;transform:rotate(-7deg)}
/* Play keeps the hill and group actions together, with breathing room above the app nav. */
.hill-page[data-pane="play"] .topbar{display:none}
.hill-page .hill-card .changelog{display:none}
.hill-page .hill-card .hill-utilities{order:8;margin:4px 0 0;width:100%}
.hill-page .hill-card .hill-utilities .btn{min-width:0;min-height:44px}
.hill-page[data-pane="play"]:not(.playing) .stage{padding-bottom:24px}
.hill-page .hill-card #playBtn{font:26px var(--display);letter-spacing:0;padding:14px 12px}.hill-page .hill-card #playBtn:before{content:none}.hill-page .hill-card .king{text-decoration:none}.invite-landing{max-width:420px;margin:0 auto;text-align:center;padding:15px 10px 90px;background:url('/brand/hill-landscape.png') center bottom/cover;border-radius:22px}.invite-word{font:58px/1.15 'Knewave',sans-serif!important;transform:rotate(-4deg);margin:0!important;letter-spacing:-3px}.invite-landing h2{font:26px/1.1 var(--display);text-transform:uppercase;transform:rotate(-4deg)}.invite-landing .door-entry{text-align:left}.invite-landing .door-art{height:125px}.invite-landing .entry-note{background:#fffbedc9;display:inline-block;padding:5px 12px;border-radius:10px}.modal-card{background:var(--paper);border-width:2px;border-radius:18px;box-shadow:3px 4px var(--ink)}.modal-card .big-btn,.share-btns .big-btn{font:23px var(--display);letter-spacing:0}.modal-card .btn{font:18px var(--display);letter-spacing:0}.share-preview{background:var(--gold-soft);border:1px solid var(--line);font:17px/1.4 var(--ui)}

/* In-game guide: readable on small screens, with the run paused behind it. */
.hill-help{color:var(--ink);background:var(--paper);border:2px solid var(--ink);border-radius:18px;box-shadow:4px 5px 0 #24251f;max-width:480px;width:calc(100% - 32px);max-height:85dvh;box-sizing:border-box;padding:24px;overflow:auto;text-align:left}
.hill-help::backdrop{background:#24251fb8;backdrop-filter:blur(3px)}
.hill-help h2{font:32px var(--display);margin:0 45px 14px 0}.hill-help h3{font:23px var(--display);margin:20px 0 8px}.hill-help p,.hill-help dd{font:16px/1.4 var(--ui);margin:0 0 12px}.hill-help dt{font-weight:700;margin-top:12px}.hill-help dd{margin:3px 0 0;color:var(--ink-soft)}.hill-help .help-close{float:right;padding:6px 10px}.hill-help .help-goal{background:var(--gold-soft);padding:12px;border-radius:10px}.hill-help .help-note{margin-top:18px;color:var(--ink-soft);font-size:14px}.hill-help .big-btn{width:100%;margin-top:8px}
.hill-page .hud .btn[data-h="help"]{min-height:44px;white-space:nowrap}
.hill-page .hud:has([data-h="help"]){display:flex;flex-wrap:nowrap;align-items:center;gap:8px}
.hill-page .hud:has([data-h="help"])>div:first-child{flex:1;min-width:0}
.hill-page .hud:has([data-h="help"]) .btns{display:flex;flex:0 0 auto;flex-wrap:nowrap;gap:5px;width:auto}
.hill-page .hud:has([data-h="help"]) .btns .btn{flex:0 0 auto;min-width:0;margin:0}

/* Shared game help stays alongside each engine's reset/back buttons. */
.hud:has([data-game-help]){display:flex;flex-wrap:nowrap;align-items:center;gap:8px}
.hud:has([data-game-help])>div:first-child{flex:1;min-width:0}
.hud:has([data-game-help]) .btns{display:flex;flex:0 0 auto;flex-wrap:wrap;gap:5px;width:auto;justify-content:flex-end}
.hud:has([data-game-help]) .btns .btn{flex:0 0 auto;min-width:0;margin:0}
.hud .btn[data-game-help]{min-height:44px;white-space:nowrap;color:var(--ink)}
@media(max-width:540px){.hud:has([data-game-help]) .btns{max-width:60%}}

/* Keep navigation labels visible alongside their icons on every screen size. */
.hud .btn:is([data-h="restart"],[data-h="reset"],[data-h="back"]){white-space:nowrap;min-height:44px;padding:8px 10px;letter-spacing:0}
@media(max-width:540px){
  .hill-page .hud:has([data-h="help"]),.hud:has([data-game-help]){flex-wrap:wrap}
  .hill-page .hud:has([data-h="help"])>div:first-child,.hud:has([data-game-help])>div:first-child{flex-basis:100%}
  .hill-page .hud:has([data-h="help"]) .btns,.hud:has([data-game-help]) .btns{width:100%;max-width:none;justify-content:flex-end}
  .hud .btn:is([data-h="restart"],[data-h="reset"],[data-h="back"]){font-size:14px}
}
/* Play subpages share the same back navigation on phones and desktop. */
.hill-page:not([data-pane="attempts"]) #recentAttempts{display:none}
.hill-page[data-pane="attempts"] #homeScreen>.hill-card,.hill-page[data-pane="attempts"] #homeScreen>.tabs,.hill-page[data-pane="attempts"] #tabBody,.hill-page[data-pane="attempts"] #lockBanner{display:none!important}
.hill-page[data-pane="attempts"] .chat{display:none}
.hill-page[data-pane="attempts"] .layout{grid-template-columns:1fr}
.hill-page[data-pane="attempts"] .hill-back{display:block;align-self:flex-start;margin:12px 20px 0;flex:none}
.hill-page #recentAttempts .recent-list{list-style:none;padding:0;margin:0;display:flex;flex-direction:column;gap:0;overflow:visible}
.hill-page #recentAttempts .recent-player{padding:14px 0;border-bottom:1px solid var(--line);font-size:16px}
.hill-page[data-pane="attempts"] .stage{padding-bottom:24px}
/* Compact group identity and borderless live stats. */
.group-detail>.topbar{display:none}
.group-detail .hub{padding-top:16px}
.group-detail .gp-head{display:grid;grid-template-columns:64px minmax(0,1fr) auto;gap:22px 14px;position:relative;align-items:center;padding:0;margin:0}
.group-detail .gp-photo-edit,.group-detail .gp-head>.gp-pfp{grid-column:1;grid-row:1;width:64px;height:64px}
.group-detail .gp-head .gp-pfp{width:64px;height:64px;object-fit:cover}
.group-detail .gp-id{grid-column:2;grid-row:1;min-width:0;gap:8px}
.group-detail .gp-id h1{display:block;overflow:visible;margin:0;font-size:clamp(26px,5vw,36px);line-height:1.1;letter-spacing:0}
.gp-name{display:flex;align-items:center;gap:6px;width:100%;padding:0;border:0;background:none;color:var(--ink);font:inherit;text-align:left;cursor:pointer}
.gp-name>span{min-width:0;overflow-wrap:anywhere}
.gp-name svg{width:16px;height:16px;flex:none;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.group-detail .gp-head>.gp-inv{grid-column:3;grid-row:1;align-self:center;white-space:nowrap;background:var(--gold);border:0;box-shadow:none;border-radius:8px;padding:5px 10px;min-height:30px;font:16px var(--display)}
.gp-header-boxes{grid-column:1 / -1;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));margin:0 0 20px}
.group-detail .gp-header-boxes>*{box-sizing:border-box;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:6px;min-width:0;padding:4px 6px;border:0;border-radius:0;background:none;color:var(--ink);box-shadow:none;text-decoration:none;cursor:pointer}
.group-detail .gp-header-boxes>*+*{border-left:1px solid var(--line)}
.group-detail .gp-header-boxes b{max-width:100%;overflow-wrap:anywhere;text-align:center;font:clamp(26px,7vw,38px)/1.1 var(--display)}
.group-detail .gp-header-boxes small{font:14px/1.2 var(--ui);color:var(--ink-soft);white-space:normal;text-align:center}
.group-detail .gp-header-boxes .gp-rank img,.group-detail .gp-header-boxes .gp-rank i{display:none}
.group-detail .gp-tabs{margin-top:0}
.gp-switcher{position:fixed;box-sizing:border-box;margin:0;width:360px;max-width:calc(100vw - 32px);max-height:calc(100dvh - 32px);overflow:auto;padding:16px;border:2px solid var(--ink);border-radius:16px;background:var(--paper);color:var(--ink);box-shadow:3px 4px 0 #302b39}
.gp-switcher::backdrop{background:#24251f30}
.gp-switcher-title{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:12px}
.gp-switcher-title h2{margin:0;font:25px var(--display)}
.gp-switcher-title button{border:0;background:none;color:var(--ink);font-size:28px;width:40px;height:40px;cursor:pointer}
.gp-switcher nav{display:grid;gap:6px}
.gp-switcher nav a{display:flex;align-items:center;gap:10px;padding:10px;border-radius:10px;color:var(--ink);text-decoration:none;min-height:44px;box-sizing:border-box}
.gp-switcher nav a>span{overflow-wrap:anywhere;min-width:0}
.gp-switcher nav a[aria-current="page"]{background:var(--gold-soft)}
.gp-switcher nav a:hover{background:#eee7f5}
.gp-selected{margin-left:auto;color:#65438f}
@media(max-width:600px){.gp-switcher{inset:auto 0 0!important;width:100%;max-width:none;max-height:75dvh;padding:16px 20px max(20px,env(safe-area-inset-bottom));border-radius:22px 22px 0 0;box-shadow:none}.gp-switcher::backdrop{background:#24251f66}}
.group-detail .gp-body .gp-h,.group-detail .scoreboard-head h3.gp-h{font:23px/1.2 var(--display);letter-spacing:0;margin:0}
.group-detail .gp-body>h3.gp-h{margin:20px 0 12px}
.group-detail .scoreboard-player{padding-bottom:10px}
.group-detail .gp-stats-scroll .stat-superlatives{white-space:normal;padding:10px}

.hill-page .layout{grid-template-columns:minmax(0,1fr)}
@media(max-width:360px){.group-detail .gp-head{column-gap:10px}.group-detail .gp-head>.gp-inv{padding:5px 8px}}

.scoreboard-info{display:grid;place-items:center;flex:none;width:32px;height:32px;padding:6px;border:0;background:none;color:#70657e;border-radius:50%;cursor:pointer}
.scoreboard-info svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round}
.scoreboard-info:hover{background:#eee7f5}
.scoreboard-info-modal{box-sizing:border-box;width:min(440px,calc(100vw - 32px));max-height:calc(100dvh - 32px);overflow:auto;padding:24px;color:var(--ink)}
.scoreboard-info-modal::backdrop{background:#24251f80;backdrop-filter:blur(3px)}
.scoreboard-info-modal h2{margin:0 0 16px;font:28px var(--display)}
.scoreboard-info-modal p{font:16px/1.5 var(--ui);margin:12px 0}
.scoreboard-info-modal .btn{margin-top:8px}
/* Profile: identity first, with secondary controls kept out of the main view. */
body.profile-open .topbar{display:none!important}
.kh-profile-screen{top:0!important;border-top:0}
.kh-profile-screen .kh-sc-in{max-width:640px;padding:20px 18px 28px}
.kh-profile-screen .kh-prof>div{min-width:0}
.kh-profile-screen .kh-h1{overflow-wrap:anywhere;font:32px/1.1 var(--display)}
.kh-profile-screen .kh-sub{font:14px/1.4 var(--ui);margin-top:5px}
.kh-profile-tabs{display:flex;gap:8px;border-bottom:1px solid var(--line);margin:22px 0 20px}
.kh-profile-tabs button{flex:1;border:0;border-bottom:4px solid transparent;background:none;padding:10px 4px;color:var(--ink-soft);font:21px var(--display);cursor:pointer}
.kh-profile-tabs button[aria-pressed="true"]{border-bottom-color:var(--gold);color:var(--ink)}
.kh-profile-screen [data-profile-panel][hidden]{display:none}
.kh-profile-screen .kh-char{margin:0 0 16px;padding:8px 12px;border:1px solid var(--line);background:none;gap:10px}
.kh-profile-screen .kh-char img{width:48px;height:48px}
.kh-profile-screen .kh-char .btn{font:18px var(--display);padding:7px 12px;box-shadow:none;text-decoration:none}
.kh-profile-screen .kh-char>span{font:16px var(--ui)}
.kh-profile-section{border-bottom:1px solid var(--line);padding:0 0 8px;margin:8px 0}
.kh-profile-section>summary{cursor:pointer;padding:12px 0;font:23px var(--display)}
.kh-profile-section>summary small{font:14px var(--ui);margin-left:6px;color:var(--ink-soft)}
.kh-profile-screen .kh-profile-groups-heading{margin:8px 0 12px;justify-content:flex-start}
.kh-profile-screen .kh-profile-groups-heading h2{display:none}
.kh-profile-screen .kh-profile-groups-heading .btn{font-size:16px;min-height:34px;box-shadow:none}
.kh-profile-screen .kh-profile-group{padding:12px;border-width:1px;gap:8px}
.kh-profile-screen .kh-profile-group-actions .btn{width:46px;height:44px;min-height:44px;padding:0;border:1px solid var(--ink);border-radius:10px;font:600 14px var(--ui);letter-spacing:0;box-shadow:none;box-sizing:border-box}
.kh-profile-screen .kh-profile-leave{font:600 14px var(--ui);padding:0;min-height:44px;box-shadow:none}
.kh-global-board{display:block;padding:14px 0;color:var(--ink);font-size:15px}
.kh-profile-screen .kh-stats{margin:12px 0 0}
.kh-profile-screen .kh-stats div{border:1px solid var(--line);padding:14px 8px}
.kh-profile-screen .kh-stats b{font:26px var(--display);overflow-wrap:anywhere}
.kh-profile-screen .kh-set .kh-row{border-width:1px;padding:12px;gap:10px;font-size:15px}
.kh-profile-screen .kh-set .btn{font-size:17px;padding:7px 10px;box-shadow:none;flex-shrink:0}
.kh-profile-screen .kh-note:empty{display:none}
@media(max-width:360px){.kh-profile-screen .kh-h1{font-size:28px}.kh-profile-screen .kh-prof{gap:12px}.kh-profile-screen .kh-char{padding:8px;gap:8px}.kh-profile-screen .kh-char .btn{padding:7px 8px;font-size:16px}}

/* Group creation and paginated global rankings. */
.gp-create-action{display:flex;align-items:center;justify-content:center;gap:12px;margin:24px 0 12px}.gp-create-action .btn{font:18px var(--display);padding:8px 16px;background:var(--gold);color:var(--ink)}.gp-create-action small{color:var(--ink-soft)}
.rank-page>.topbar{display:none}.rank-page .hub{padding-top:20px}.rk-pagination{display:flex;align-items:center;justify-content:space-between;gap:8px;margin:20px 0 24px}.rk-pagination .btn{font:16px var(--display);padding:8px 10px}.rk-pagination span{font:13px var(--ui);text-align:center}.rk-pagination button:disabled{opacity:.4;cursor:default}.rk-b b{overflow-wrap:anywhere}

.kh-profile-identity{flex:1}.kh-profile-name{display:flex;align-items:center;gap:12px}.kh-profile-name .kh-h1{flex:1;min-width:0;margin:0}.kh-profile-settings{display:grid;place-items:center;flex:none;width:40px;height:40px;padding:8px;border:0;border-radius:50%;background:transparent;color:var(--ink);cursor:pointer}.kh-profile-settings svg{width:24px;height:24px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linejoin:round}.kh-profile-settings:hover,.kh-profile-settings[aria-pressed="true"]{background:var(--gold-soft)}.kh-rewards-status{font:15px/1.5 var(--ui);color:var(--ink-soft)}

/* One portrait app layout on phones and desktop browsers. */
:root{--app-width:480px}
body.has-app-nav .hub{width:100%;max-width:var(--app-width);box-sizing:border-box;margin-inline:auto;padding-inline:18px}
body.has-app-nav .app-nav{width:100%;max-width:var(--app-width);left:0;right:0;margin-inline:auto}
body.has-app-nav .kh-screen{width:100%;max-width:var(--app-width);left:0;right:0;margin-inline:auto}
.hill-page #app{width:100%;max-width:var(--app-width);height:100dvh;margin-inline:auto}
.hill-page.playing #app{left:0;right:0;width:100%;max-width:var(--app-width);margin-inline:auto}
.hill-page .layout{display:flex;flex-direction:column;min-height:0;flex:1}
.hill-page .stage{min-width:0;min-height:0;flex:1;overflow-y:auto;padding:14px}
.hill-page.playing .stage{overflow:hidden;padding:0}
.hill-page .m-nav,.hill-page .chat{display:none}
.hill-page[data-pane="play"] #homeScreen>.tabs,.hill-page[data-pane="play"] #tabBody{display:none}
.hill-page[data-pane="history"] #homeScreen>.hill-card,.hill-page[data-pane="stats"] #homeScreen>.hill-card,
.hill-page[data-pane="history"] #lockBanner,.hill-page[data-pane="stats"] #lockBanner{display:none!important}
.hill-page[data-pane="stats"] #homeScreen>.tabs,.hill-page[data-pane="history"] .tabs [data-tab="stats"]{display:none}
.hill-page:not([data-pane="play"]) .hill-utilities{display:none}
.hill-page:not([data-pane="play"]):not(.playing) .hill-back{display:block;flex:none;align-self:flex-start;margin:10px 14px 0;font:14px var(--ui);padding:7px 12px;box-shadow:none;border-color:var(--line)}
.hill-page .hill-card{box-sizing:border-box;width:100%;padding:16px!important}
.hill-page .hill-card .thumb{height:145px!important}
.hill-page .king{font-size:29px}
.hill-page .tab-body{overflow-x:auto}
.hill-page .hud .btns{gap:5px;flex-wrap:wrap}
.hill-page .hud .btn{font-size:14px}
.hill-page .hud .title{font-size:17px}
@media(min-width:901px){
  body.hill-page{overflow:hidden}
  .hill-page #app,body.has-app-nav .hub,body.has-app-nav .kh-screen{border-inline:1px solid var(--line)}
  .hill-page .hud{flex-wrap:wrap}
  .hill-page #gameScreen{display:flex;flex-direction:column}
  .hill-page #gameScreen[hidden]{display:none}
  .hill-page .toolbar{order:3}.hill-page .m-hint{order:4}.hill-page .touch{order:5}
}

/* Gameplay actions stay in one compact row; world decisions live after the run. */
.hill-page #gameScreen > #hud.play-hud{display:flex;flex-direction:row;align-items:center;flex-wrap:nowrap;gap:6px;padding:8px}.hill-page #gameScreen > #hud.play-hud .hud-identity{flex:1;min-width:0;width:auto;padding:0}.hill-page #gameScreen > #hud.play-hud .title{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:16px}.hill-page #gameScreen > #hud.play-hud>.btns{display:flex;flex:none;width:auto;gap:4px;flex-wrap:nowrap}.hill-page #gameScreen > #hud.play-hud>.btns .btn{font:13px var(--ui);min-height:40px;padding:6px;white-space:nowrap}.change-map-note{font-size:14px;line-height:1.4}

/* A summit takeover stays on screen until the winner continues. */
.summit-victory{box-sizing:border-box;position:fixed;inset:0;margin:auto;width:min(100%,480px);height:100dvh;max-width:480px;max-height:100dvh;border:0;padding:0;background:#242033;color:#fffaf0;overflow:auto;isolation:isolate}
.summit-victory::backdrop{background:#242033b3}
.summit-backdrop{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;opacity:.2;filter:blur(2px);z-index:-1;transform:scale(1.08)}
.summit-content{min-height:100%;box-sizing:border-box;display:flex;flex-direction:column;justify-content:center;align-items:center;padding:28px 20px;text-align:center}
.summit-kicker{letter-spacing:4px;color:#ffcc28;font-size:14px;margin:0 0 10px}.summit-victory h1{font:clamp(36px,9vw,52px)/1.05 var(--display);margin:0;text-wrap:balance;color:#ffcc28}.summit-status{font-size:15px;min-height:20px;margin:12px 0 0}.summit-stage{width:100%;max-width:360px}.summit-stage canvas{width:100%;height:auto;display:block}.summit-result{width:100%}.summit-dethroned{font:23px var(--display);margin:0 0 14px;overflow-wrap:anywhere}.summit-stats{display:flex;justify-content:center;gap:40px;font-size:14px;color:#e0d9ed}.summit-stats b{display:block;font:28px var(--display);color:#fff}.summit-next{font-size:14px;line-height:1.4}.summit-continue{width:100%;margin-top:12px}.summit-victory [hidden]{display:none!important}.summit-victory.is-confirmed h1{animation:summit-pop .35s ease-out}.ce-panel .ce-row button{white-space:normal}
@keyframes summit-pop{from{transform:scale(.8)}to{transform:scale(1)}}


.summit-victory{overflow-x:hidden}.summit-backdrop{transform:none}.summit-stage{max-width:400px}
.summit-victory .summit-content{position:relative;gap:0;padding-top:54px;padding-bottom:32px}
.summit-victory .summit-stage{max-width:none;width:calc(100% + 40px);margin:24px -20px;overflow:hidden;box-shadow:0 24px 70px #0005}
.summit-victory.is-confirmed:not(.is-impact) h1,.summit-victory.is-confirmed:not(.is-impact) .summit-status{opacity:0;transform:translateY(12px)}
.summit-victory.is-confirmed h1{animation:none;transition:opacity .5s,transform .5s}
.summit-victory .summit-status{transition:opacity .5s,transform .5s}
.summit-victory .summit-kicker{font-size:12px;letter-spacing:6px}
.summit-skip{position:absolute;top:14px;right:16px;border:1px solid #ffffff40;border-radius:24px;background:#181522aa;color:#fffaf0;padding:9px 14px;font:inherit;font-size:12px;cursor:pointer;z-index:2}
.summit-victory.is-settled .summit-result{animation:summit-results .45s ease-out}
@keyframes summit-results{from{opacity:0;transform:translateY(12px)}to{opacity:1;transform:none}}


/* Victory playback is controlled by Skip intro, independent of OS motion settings. */
.summit-victory.is-confirmed h1{animation:none!important;transition:opacity .5s,transform .5s!important}
.summit-victory .summit-status{transition:opacity .5s,transform .5s!important}
.summit-victory.is-settled .summit-result{animation:summit-results .45s ease-out!important}

/* Proof: one stable row, with secondary actions in a dismissible menu. */
.hill-page #gameScreen > #hud.proof-hud{display:flex;flex-direction:row;flex-wrap:nowrap;align-items:center;gap:4px;height:56px;min-height:56px;box-sizing:border-box;padding:6px 8px}
.hill-page #gameScreen > #hud[hidden]{display:none!important}
.hill-page #hud.proof-hud .proof-title{flex:1;min-width:0;font:clamp(17px,4.5vw,22px)/1.1 var(--display);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.hill-page #hud.proof-hud .timer{flex:none;font:22px/1 var(--display);font-variant-numeric:tabular-nums;min-width:5ch;text-align:center;margin:0}
.hill-page #hud.proof-hud .proof-icon{flex:none;width:44px;height:44px;min-height:44px;padding:0;border:0;box-shadow:none;background:transparent;font:28px/1 var(--ui)}
.proof-menu{position:fixed;inset:62px max(8px,calc((100vw - 480px)/2 + 8px)) auto auto;margin:0;padding:8px;min-width:160px;border:2px solid var(--ink);border-radius:14px;background:var(--paper,#fffaf0);box-shadow:0 4px 0 var(--ink)}
.proof-menu:popover-open{display:flex;flex-direction:column;gap:6px}
.proof-menu .btn{min-height:44px;text-align:left;box-shadow:none;font:18px var(--display)}
.hill-page #hud.proof-hud .timer{font-family:var(--mono);font-size:20px}
.hill-page #hud.proof-hud .proof-menu .btn{font-size:18px!important}
.hill-page #hud.proof-hud .proof-menu .btn::before{content:none}

.kh-profile-identity{width:100%}
.kh-character-card{display:flex;flex-direction:column;align-items:center;gap:8px;padding:12px;border:2px solid var(--line);border-radius:24px;background:var(--paper)}
.kh-character-preview{display:block;width:100%;max-width:280px;height:160px}
.kh-character-card>.btn{min-height:48px;min-width:160px;display:grid;place-items:center;text-decoration:none}

.kh-profile-name .kh-h1{flex:0 1 auto}
.kh-profile-stats-link{flex:none;border:0;background:none;color:var(--ink-soft);font:14px var(--ui);text-decoration:underline;padding:12px 0;min-height:44px;cursor:pointer}
.kh-profile-stats-link[aria-pressed="true"]{color:var(--ink);text-decoration-thickness:2px}
.kh-profile-name .kh-profile-settings{margin-left:auto}

/* On Play, keep the group selector above the hill without the redundant brand bar. */
.hill-page[data-pane="play"]:not(.playing):not(.profile-open) .topbar{display:flex;border:0;background:transparent}
.hill-page[data-pane="play"] .kh-bar{justify-content:flex-start;min-height:44px;padding:0;width:100%;max-width:540px;margin:auto}
.hill-page[data-pane="play"] .kh-bar>.kh-home,.hill-page[data-pane="play"] .kh-bar>.kh-game,.hill-page[data-pane="play"] .kh-bar>.kh-me{display:none}
.hill-page[data-pane="play"] .kh-group-picker{max-width:100%}
.hill-page[data-pane="play"] .kh-group-picker summary{min-height:44px;font-size:22px}

@media(max-width:480px){.kh-profile-tabs{gap:2px}.kh-profile-tabs button{font-size:18px;min-height:48px;white-space:nowrap}}
.kh-store .rs-list .btns{display:flex;gap:6px;flex-wrap:wrap;justify-content:flex-end}.kh-store .rs-list .btn{min-height:44px}.kh-store h1{font-size:32px}

.kh-cosmetic-library{margin-top:20px}.kh-collection-filters{display:flex;gap:6px;flex-wrap:wrap;margin:0 0 18px}.kh-collection-filters .btn{font-size:17px;padding:8px 10px;min-height:44px}.kh-collection-filters .btn[aria-pressed="true"]{background:var(--gold)}[data-collection-category][hidden]{display:none!important}

/* Profile is the navigation hub; keep the gameplay rail as its in-game entry. */
body.profile-navigation .app-nav{display:none!important}
body.profile-navigation:not(:has(#app)){padding-bottom:0}
body.profile-navigation .kh-screen{bottom:0}
body.profile-navigation .kh-close{display:block}
body.profile-navigation .kh-bar>.kh-me{display:flex;align-items:center;justify-content:center;flex:none;min-width:44px;min-height:44px}
body.profile-navigation .hub{padding-bottom:24px}
.kh-profile-rank{margin-bottom:28px}
.kh-profile-rank label{display:grid;gap:6px;font:600 14px var(--ui)}
.kh-rank-select{width:100%;min-height:44px;padding:10px;border:1px solid var(--line);border-radius:10px;background:var(--paper);color:var(--ink);font:16px var(--ui)}
.kh-rank-board{margin-top:16px}
.kh-rank-pages{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-top:12px}

.kh-rank-board .rk{display:grid;gap:8px}
.kh-rank-board .rk-row{display:flex;align-items:center;gap:10px;padding:12px;border:1px solid var(--line);border-radius:12px;color:var(--ink);text-decoration:none}
.kh-rank-board .rk-b{flex:1;min-width:0;overflow-wrap:anywhere}
.kh-rank-board .rk-pts{text-align:right;font-weight:700}
.kh-rank-board .rk-pts small{display:block;font-size:12px;font-weight:400;color:var(--ink-soft)}

.hill-info{padding-top:10px}.hill-info h2{margin:0 36px 12px 0}.hill-info-king{padding:12px;background:var(--gold-soft);border-radius:12px}.hill-info h3{font:600 15px var(--ui);margin:20px 0 12px}.hill-info>ol{list-style:none;padding:0;display:grid;gap:12px}.hill-info>ol>li{border-bottom:1px solid var(--line);padding-bottom:12px}.hill-info small{display:block;color:var(--ink-soft);font-size:12px;margin:4px 0}.hill-info ul{padding-left:20px;font:15px/1.5 var(--ui)}

.game-rail .game-signin{position:relative;margin-bottom:14px}.game-rail .game-signin svg{width:22px;height:22px}.game-signin span{position:absolute;top:100%;left:50%;transform:translateX(-50%);white-space:nowrap;font:600 10px/1.4 var(--ui);color:#fff;text-shadow:0 1px 3px #000}
body.profile-navigation .profile-home .kh-close{display:none}
.kh-last-game{border:1px solid var(--line);border-radius:18px;overflow:hidden;margin:12px 0 24px;background:var(--paper);padding:16px}
.kh-last-game-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:14px}
.kh-last-game small{font:600 12px var(--ui);color:var(--ink-soft);text-transform:uppercase;letter-spacing:.08em}
.kh-last-game h2{font:26px var(--display);margin:6px 0}.kh-last-game p{margin:4px 0 12px;color:var(--ink-soft);font:14px var(--ui)}
.kh-last-game .btn.primary{font:600 14px var(--ui);padding:10px 14px;min-height:44px;box-shadow:none;text-decoration:none}
.kh-last-game img{width:100%;height:140px;object-fit:cover;border-radius:10px;display:block}

/* The hill lobby returns to the profile's group list. */
.kh-back-profile{display:none}
.hill-page[data-pane="play"] .kh-back-profile{display:inline-flex;align-items:center;min-height:44px;padding:8px 14px;font:600 15px var(--ui);box-shadow:none}
.hill-page[data-pane="play"] .kh-group-picker{display:none}
