/* Guitar Game UI V3.1 — 23 October 2026, map-first + integrated character profile.
   Frontend-only overlay. Scope to .gg-v31 staging/demo. */
.gg-v31{--gg-v31-gold:#f3cc83;--gg-v31-ink:#132d41;--gg-v31-paper:#fff8e7}
.gg-v31 body{background:radial-gradient(ellipse at 6% 32%,#c7dcd9 0,transparent 35%),radial-gradient(ellipse at 94% 68%,#e4dbbd 0,transparent 34%),#f0f3ed}
.gg-v31 #playerArea .gg-internal-views{width:100%;max-width:1380px}
.gg-v31 #gg-view-home{max-width:1380px;gap:17px;position:relative;padding:13px clamp(9px,1.65vw,20px) 32px;border-radius:24px;background:radial-gradient(circle at 2% 18%,#234a4e25,transparent 33%),repeating-radial-gradient(ellipse at 70% 40%,transparent 0 18px,#38564d0c 19px 20px,transparent 21px 41px),linear-gradient(180deg,#dae8dd 0%,#f4f2df 45%,#dde6df);border:1px solid #94ac9e;box-shadow:0 5px 0 #b9c7be,0 22px 34px #274a4523;overflow:hidden}
.gg-v31 #gg-view-home .player-grid[hidden],.gg-v31 #gg-view-home .gg-rpg-intro[hidden],.gg-v31 #gg-view-home .gg-rpg-next-mission[hidden],.gg-v31 #gg-view-home .gg-home-links[hidden]{display:none!important}
.gg-v31 .gg-v31-overview{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,.89fr);gap:11px;align-items:stretch}
.gg-v31 .gg-v31-mini,.gg-v31 .gg-v31-quest{border-radius:16px;min-height:78px;display:flex;align-items:center;gap:12px;text-align:left;cursor:pointer;position:relative;overflow:hidden;padding:10px 17px;transition:transform .18s ease,filter .18s ease,box-shadow .18s ease}
.gg-v31 .gg-v31-mini{background:linear-gradient(115deg,#133e4a,#225e62 76%,#2b6a68);border:2px solid #a9c7a1;box-shadow:0 4px 0 #375d57;color:#fffce6}
.gg-v31 .gg-v31-mini:before{content:"";position:absolute;inset:0;pointer-events:none;background:radial-gradient(circle at 85% 10%,#fff9c524,transparent 31%),repeating-linear-gradient(130deg,transparent 0 17px,#fff5c909 18px 19px,transparent 20px 43px)}
.gg-v31 .gg-v31-mini-avatar{width:52px;height:52px;display:grid;place-items:center;flex:none;border-radius:13px;border:2px solid #f9d47e;background:#f6edc6;color:#2c544e;font-size:30px;box-shadow:0 2px 0 #b59655}
.gg-v31 .gg-v31-mini-words{display:flex;flex-direction:column;align-items:flex-start;gap:2px;min-width:0;flex:1}
.gg-v31 .gg-v31-mini-words small,.gg-v31 .gg-v31-mini-score small{font-size:10px;font-weight:950;letter-spacing:.09em;color:#f6d99c}
.gg-v31 .gg-v31-mini-words strong{display:block;font-size:clamp(17px,1.75vw,23px);font-weight:1000;color:#fffdf1;white-space:nowrap;max-width:100%;overflow:hidden;text-overflow:ellipsis}
.gg-v31 .gg-v31-mini-words>span{font-size:11px;color:#d9f0e9}
.gg-v31 .gg-v31-mini-score{display:flex;flex-direction:column;align-items:center;gap:3px;padding:8px 12px;border:1px solid #eac7839c;border-radius:10px;background:#102d4290}
.gg-v31 .gg-v31-mini-score strong{font-size:23px;font-variant-numeric:tabular-nums;color:#ffde8d}
.gg-v31 .gg-v31-mini-arrow{font-size:27px;font-weight:900}
.gg-v31 .gg-v31-quest{border:2px solid #bd995d;background:linear-gradient(120deg,#ffefc4,#e7c786);box-shadow:0 4px 0 #d1b67d;color:#453622}
.gg-v31 .gg-v31-quest-icon{width:48px;height:48px;flex:none;border-radius:12px;display:grid;place-items:center;background:#305f5a;color:#ffde96;font-size:27px;border:2px solid #b9a471}
.gg-v31 .gg-v31-quest>span:nth-child(2){display:flex;flex-direction:column;gap:4px;min-width:0;flex:1}
.gg-v31 .gg-v31-quest small{font-size:10px;letter-spacing:.09em;font-weight:950;color:#805f35}
.gg-v31 .gg-v31-quest strong{font-size:16px;line-height:1.25;color:#533f28}
.gg-v31 .gg-v31-quest-arrow{font-size:27px;font-weight:900;color:#79582b}
.gg-v31 .gg-v31-mini[data-gg-rpg-skin=cyberpunk]{background:linear-gradient(120deg,#121d43,#203a6f 70%,#452a71);border-color:#20d6df;box-shadow:0 4px 0 #1f3060,0 0 18px #2fdbdf55}
.gg-v31 .gg-v31-mini[data-gg-rpg-skin=retro]{background:linear-gradient(120deg,#30246d,#4f3a92 72%,#31599c);border-color:#f9c56a;box-shadow:0 4px 0 #3b2d7e}
.gg-v31 .gg-v31-mini[data-gg-rpg-skin=neutral]{background:linear-gradient(120deg,#184e78,#2b7cb3);border-color:#92c9e3}
.gg-v31 .gg-v31-map-heading{margin:5px 0 14px}
.gg-v31 .gg-v31-overline{font-size:11px;color:#476452;letter-spacing:.14em;font-weight:1000}
.gg-v31 .gg-v31-map-heading h2{font-size:clamp(25px,3.4vw,40px);color:#264943;font-weight:1000;letter-spacing:-.05em;margin:7px 0 6px;line-height:1.15;text-wrap:balance}
.gg-v31 .gg-v31-map-heading p{font-size:13px;color:#567467;margin:0;line-height:1.6}
.gg-v31 #gg-view-home #gg-balanced-seasons{width:100%;max-width:none;margin:0;padding:15px;background:linear-gradient(165deg,#f8edca,#e8d2a4);border:3px solid #a78e56;box-shadow:0 5px 0 #cfbb8d,0 18px 24px #51644629;border-radius:20px}
.gg-v31 #gg-view-home #gg-balanced-seasons .panel-header{display:none}
.gg-v31 #gg-view-home #gg-rpg-map{width:100%;gap:9px}
.gg-v31 #gg-view-home .gg-rpg-map-viewport{border-radius:15px;overflow:auto hidden;touch-action:pan-x pan-y;scrollbar-color:#bf9969 #f4e6c9;scrollbar-width:thin}
.gg-v31 #gg-view-home .gg-rpg-map-stage{height:auto;min-height:0;aspect-ratio:1518/630;width:100%;border:3px solid #bb955f;border-radius:15px}
.gg-v31 #gg-view-home .gg-rpg-map-landscape{background-size:100% 100%;filter:saturate(1.16) contrast(1.02)}
.gg-v31 #gg-view-home .gg-rpg-map-nav{display:flex;flex-wrap:wrap;justify-content:center;gap:7px}
.gg-v31 #gg-view-home .gg-rpg-map-tab{min-height:43px;font-size:clamp(10px,1vw,13px);padding:8px 12px}
.gg-v31 #gg-view-home .gg-rpg-region{box-shadow:0 5px 0 #5a4934b0,0 9px 23px #0003;transition:transform .2s ease,filter .2s ease}
.gg-v31 #gg-view-home .gg-rpg-region[aria-pressed=true]{filter:brightness(1.09)}
.gg-v31 #gg-view-home .gg-rpg-region-preview{border-radius:15px}
.gg-v31 #gg-view-home .gg-rpg-map-caption{color:#60533d}
.gg-v31 #gg-view-home .gg-rpg-quick-actions{max-width:none;width:100%;padding:20px 24px;border:2px solid #d3b77e;background:linear-gradient(130deg,#153d46,#235c62);border-radius:17px;box-shadow:0 5px 0 #c5c6ae}
.gg-v31 #gg-view-home .gg-rpg-quick-actions>h3{font-size:23px;letter-spacing:-.025em;color:#ffdf9f}
.gg-v31 #gg-view-home .gg-rpg-action-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
.gg-v31 #gg-view-home .gg-rpg-action-tile{min-height:98px}
.gg-v31 #gg-view-home .gg-v31-history{max-width:none;width:100%;background:#fffaf0;border:1px solid #dccba3}
.gg-v31 .gg-v31-history .panel-header h3{font-size:19px}
.gg-v31 #gg-view-profile{max-width:1120px;align-items:stretch;margin:0 auto;gap:15px}
.gg-v31 .gg-v31-profile-kicker{color:#3c6b68;font-size:11px;letter-spacing:.14em;font-weight:1000;margin-top:5px}
.gg-v31 .gg-v31-profile-title{color:#213e46;font-size:clamp(30px,4vw,48px);margin:0;font-weight:1000}
.gg-v31 .gg-v31-profile-intro{font-size:14px;color:#5d7075;line-height:1.55;margin:0}
.gg-v31 .gg-v31-identity-stage{background:radial-gradient(circle at 85% 15%,#f9df9277,transparent 40%),linear-gradient(135deg,#f3e3be,#b9d6d0);border:3px solid #be9b60;box-shadow:0 5px 0 #c6b794;border-radius:22px;padding:clamp(14px,2.2vw,25px);max-width:950px}
.gg-v31 #gg-view-profile #profileCard{display:block;max-width:820px;width:100%;margin:0 auto;grid-area:auto}
.gg-v31 #gg-view-profile #profileCard .gg-balanced-hero-head{min-height:230px;position:relative}
.gg-v31 #gg-view-profile #profileCard .gg-balanced-hero-head .card-top{position:relative;z-index:2}
.gg-v31 .gg-v31-editor-explainer{color:#4a6059;font-size:12px;line-height:1.5;text-align:center;margin:15px auto 2px;max-width:650px}
.gg-v31 #playerArea .gg-balanced-nav{z-index:30}
.gg-v31 #playerArea .gg-balanced-nav-link{min-width:0}
.gg-v31 #playerArea .gg-v31-profile-link{border:1px solid #e5c27980}
.gg-v31 #playerArea .gg-v31-profile-link[aria-current=page]{background:#e5cb92!important;color:#423827!important}
.gg-v31 #playerArea .gg-v31-profile-link .gg-balanced-nav-icon{font-size:20px}
.gg-v31 .gg-v31-editor-themes{margin:17px 0 0;border-top:2px solid #d6e3e9;padding-top:18px;display:flex;flex-direction:column;gap:12px}
.gg-v31 .gg-v31-editor-themes>h3{font-size:19px;color:#273d52;margin:0}
.gg-v31 .gg-v31-editor-themes>p{font-size:12px;line-height:1.5;color:#5d6b84;margin:0}
.gg-v31 .gg-v31-theme-stage{position:relative;display:flex;align-items:center;gap:15px;min-height:160px;overflow:hidden;border:3px solid #d0a861;border-radius:15px;background:linear-gradient(125deg,#2f634e,#4c7252 61%,#b18d58);box-shadow:inset 0 0 0 3px #ffffff32,0 4px 0 #9b987d;padding:13px;isolation:isolate}
.gg-v31 .gg-v31-theme-stage:before{content:"";position:absolute;inset:-20%;z-index:-1;pointer-events:none;background:repeating-radial-gradient(circle at 74% 62%,transparent 0 34px,#fff2b31a 36px 38px,transparent 40px 72px);animation:ggv31-compass-turn 26s linear infinite}
.gg-v31 .gg-v31-theme-stage[data-theme=cyberpunk]{border-color:#39e3ec;background:linear-gradient(120deg,#101d40,#20437b 57%,#6a3b8a);box-shadow:0 0 19px #16dfed66}
.gg-v31 .gg-v31-theme-stage[data-theme=cyberpunk]:before{background:repeating-linear-gradient(90deg,transparent 0 12px,#4df8f426 13px 14px,transparent 16px 49px);animation:ggv31-neon 3.2s ease-in-out infinite}
.gg-v31 .gg-v31-theme-stage[data-theme=retro]{border-color:#ffd570;background:linear-gradient(125deg,#302961,#5e4b9a);box-shadow:0 5px 0 #39295c}
.gg-v31 .gg-v31-theme-stage[data-theme=retro]:before{background:radial-gradient(circle,#ffe082c9 2px,transparent 3px) 5px 8px/38px 34px;animation:ggv31-pixels 8s steps(8,end) infinite}
.gg-v31 .gg-v31-theme-stage[data-theme=neutral]{border-color:#91bcd7;background:linear-gradient(120deg,#19456e,#2f8ca4)}
.gg-v31 .gg-v31-theme-stage[data-theme=neutral]:before{animation:none}
.gg-v31 .gg-v31-theme-portrait{width:122px;height:133px;flex:none;object-fit:cover;border:2px solid #fff2cf;border-radius:13px;box-shadow:0 5px 15px #0004}
.gg-v31 .gg-v31-theme-emblem{font-size:35px;position:absolute;top:6px;right:15px;color:#fff2c7;animation:ggv31-compass-turn 17s linear infinite}
.gg-v31 .gg-v31-theme-details{display:flex;flex-direction:column;gap:5px;align-items:flex-start;min-width:0}
.gg-v31 .gg-v31-theme-details strong{font-size:clamp(17px,3vw,23px);font-weight:1000;color:#fff3c7}
.gg-v31 .gg-v31-theme-details span{font-size:12px;color:#e8f5ed;line-height:1.35}
.gg-v31 .gg-v31-theme-details b{font-size:15px;color:#fff}
.gg-v31 .gg-v31-theme-details small{color:#ffe09e;font-size:11px}
.gg-v31 .gg-v31-editor-themes .gg-rpg-skin-picker{width:100%;padding:12px;border:1px solid #d9cba4;border-radius:13px;background:#fff8e7}
.gg-v31 .gg-v31-editor-themes .gg-rpg-skins{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:7px}
.gg-v31 .gg-v31-editor-themes .gg-rpg-skin{min-height:92px;padding:7px 5px;border:2px solid #d2ba8b;border-radius:12px;box-shadow:0 2px 0 #c1ac82;background:#fff5dc;cursor:pointer}
.gg-v31 .gg-v31-editor-themes .gg-rpg-skin[aria-pressed=true]{border-color:#268775;background:#e2f5ed;box-shadow:0 0 0 2px #3e997965}
.gg-v31 .gg-v31-editor-themes .gg-rpg-skin-preview{width:52px;height:52px;object-fit:cover}
.gg-v31 .gg-v31-theme-notice{background:#f0f5ff;border:1px solid #cad8ef;border-radius:10px;padding:9px 11px;color:#42557a!important}
.gg-v31 #modalBackdrop .modal{max-height:92dvh;overflow-y:auto;overscroll-behavior:contain}
.gg-v31 .gg-v31-mini:focus-visible,.gg-v31 .gg-v31-quest:focus-visible,.gg-v31 .gg-v31-editor-themes button:focus-visible{outline:3px solid #f5c35d;outline-offset:3px}
@keyframes ggv31-compass-turn{to{transform:rotate(360deg)}}
@keyframes ggv31-neon{0%,100%{opacity:.3}50%{opacity:.87}}
@keyframes ggv31-pixels{to{background-position:75px -55px}}
@media(hover:hover) and (pointer:fine){.gg-v31 .gg-v31-mini:hover,.gg-v31 .gg-v31-quest:hover{transform:translateY(-3px);filter:brightness(1.065)}}
@media(max-width:760px){
 .gg-v31 .gg-v31-overview{grid-template-columns:1fr}
 .gg-v31 .gg-v31-map-heading h2{font-size:28px}
 .gg-v31 #gg-view-home #gg-balanced-seasons{padding:10px}
 .gg-v31 #gg-view-home .gg-rpg-map-stage{width:850px;max-width:none;aspect-ratio:1518/630;height:auto}
 .gg-v31 #gg-view-home .gg-rpg-map-viewport{overflow:auto hidden;-webkit-overflow-scrolling:touch}
 .gg-v31 #gg-view-home .gg-rpg-map-nav{display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}
 .gg-v31 #gg-view-home .gg-rpg-map-tab{font-size:11px;white-space:normal}
 .gg-v31 #gg-view-home .gg-rpg-quick-actions{padding:17px}
 .gg-v31 #gg-view-home .gg-rpg-action-grid{grid-template-columns:1fr}
 .gg-v31 #playerArea .gg-balanced-nav-link{min-width:0;gap:2px}
 .gg-v31 .gg-v31-editor-themes .gg-rpg-skins{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:600px){
 .gg-v31 #gg-view-home{padding:11px 7px 18px;gap:12px;border-radius:18px}
 .gg-v31 .gg-v31-mini,.gg-v31 .gg-v31-quest{min-height:66px;padding:9px 11px;gap:9px}
 .gg-v31 .gg-v31-mini-avatar{width:46px;height:46px;font-size:25px}
 .gg-v31 .gg-v31-mini-words strong{font-size:17px}
 .gg-v31 .gg-v31-mini-score{padding:6px 8px}
 .gg-v31 .gg-v31-mini-score strong{font-size:19px}
 .gg-v31 #playerArea .gg-balanced-nav{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));column-gap:2px;padding:6px 3px calc(6px + env(safe-area-inset-bottom, 0px));border-radius:18px 18px 0 0}
 .gg-v31 #playerArea .gg-balanced-nav-link{display:flex;flex-direction:column;justify-content:center;gap:3px;min-width:0;min-height:55px;padding:5px 0;font-size:9px;font-weight:850;border-radius:8px}
 .gg-v31 #playerArea .gg-balanced-nav-icon{font-size:18px}
 .gg-v31 .gg-v31-profile-view{padding:0 4px}
 .gg-v31 .gg-v31-identity-stage{padding:9px;border-radius:15px}
 .gg-v31 #gg-view-profile #profileCard .gg-balanced-hero-head{min-height:175px}
 .gg-v31 #gg-view-home .gg-rpg-quick-actions>h3{font-size:20px}
 .gg-v31 .gg-v31-theme-stage{gap:10px;padding:9px;min-height:135px}
 .gg-v31 .gg-v31-theme-portrait{height:108px;width:88px}
}
@media(max-width:350px){
 .gg-v31 #playerArea .gg-balanced-nav-link{font-size:8px}
 .gg-v31 .gg-v31-mini-score{padding:4px 6px}
 .gg-v31 .gg-v31-mini-arrow{display:none}
}
@media(prefers-reduced-motion:reduce){
 .gg-v31 .gg-v31-mini,.gg-v31 .gg-v31-quest,.gg-v31 .gg-v31-theme-stage:before,.gg-v31 .gg-v31-theme-emblem,.gg-v31 #gg-view-home .gg-rpg-region{transition:none!important;animation:none!important}
}
/* Profile action remains reachable even on small screens with bottom navigation. */
.gg-v31 #gg-view-profile .gg-v31-edit-action{display:inline-flex;align-items:center;justify-content:center;align-self:flex-start;padding:12px 19px;min-height:48px;border:2px solid #be9859;border-radius:13px;background:linear-gradient(#fee3a5,#e5bb6c);box-shadow:0 4px 0 #c49a55;color:#523923;font-weight:950;font-size:14px;cursor:pointer}
.gg-v31 #gg-view-profile .gg-v31-edit-action:focus-visible{outline:3px solid #f6c85c;outline-offset:3px}
.gg-v31 #gg-view-home .gg-rpg-map-tab,.gg-v31 #gg-view-profile #editProfile{scroll-margin-bottom:150px;scroll-margin-top:100px}
.gg-v31 #gg-view-home #gg-balanced-seasons{scroll-margin-top:85px;scroll-margin-bottom:110px}
.gg-v31 #playerArea{scroll-padding-bottom:120px}
@media(max-width:600px){.gg-v31 #gg-view-profile .gg-v31-edit-action{align-self:stretch;width:100%}}

/* Readable theme names independent from any decorative skin overlay. */
.gg-v31 .gg-v31-editor-themes .gg-rpg-skin strong{position:relative;z-index:10;color:#253e45!important;text-shadow:none!important;font-size:13px!important;opacity:1!important}
.gg-v31 .gg-v31-editor-themes .gg-rpg-skin small{position:relative;z-index:10;color:#53616b!important;text-shadow:none!important;font-size:10px!important;opacity:1!important}
.gg-v31 .gg-v31-editor-themes .gg-rpg-skin[aria-pressed=true] strong{color:#114b4c!important}
.gg-v31 .gg-v31-editor-themes .gg-rpg-skin:before,.gg-v31 .gg-v31-editor-themes .gg-rpg-skin:after{pointer-events:none}

/* The illustrated world appears immediately on mobile, before secondary controls. */
@media(max-width:600px){
 .gg-v31 #gg-view-home .gg-v31-map-heading{margin:0 0 9px}
 .gg-v31 #gg-view-home .gg-v31-map-heading h2{font-size:21px;line-height:1.16;margin:4px 0}
 .gg-v31 #gg-view-home .gg-v31-map-heading p{display:none}
 .gg-v31 #gg-view-home .gg-v31-overview{gap:8px}
 .gg-v31 #gg-view-home .gg-v31-mini,.gg-v31 #gg-view-home .gg-v31-quest{min-height:60px}
 .gg-v31 #gg-view-home #gg-rpg-map{display:flex;flex-direction:column}
 .gg-v31 #gg-view-home .gg-rpg-map-viewport{order:1}
 .gg-v31 #gg-view-home .gg-rpg-region-preview{order:2}
 .gg-v31 #gg-view-home .gg-rpg-map-nav{order:3}
 .gg-v31 #gg-view-home .gg-rpg-map-caption{order:4}
}

/* SPRINT 2 — blocking issue: editor must be above the fixed six-tab navigation. */
.gg-v31 #modalBackdrop:not([hidden]){position:fixed!important;inset:0!important;z-index:1000!important;display:flex!important;align-items:center;justify-content:center;overscroll-behavior:contain;padding:calc(12px + env(safe-area-inset-top,0px)) 12px calc(12px + env(safe-area-inset-bottom,0px))!important}
.gg-v31 #modalBackdrop:not([hidden]) .modal{position:relative;z-index:1001;box-sizing:border-box;max-height:calc(100dvh - 24px - env(safe-area-inset-top,0px) - env(safe-area-inset-bottom,0px))!important;overflow-y:auto!important;overscroll-behavior:contain;-webkit-overflow-scrolling:touch;padding-bottom:calc(25px + env(safe-area-inset-bottom,0px))}
.gg-v31 #modalBackdrop:not([hidden]) #editForm button[type=submit]{position:relative;z-index:2;min-height:48px;scroll-margin-bottom:25px}
.gg-v31:has(#modalBackdrop:not([hidden])){overflow:hidden}
.gg-v31:has(#modalBackdrop:not([hidden])) body{overflow:hidden}
