/* V2 independent navigation; original #game CSS and markup are unchanged. */
body.v2-shell .app>header,body.v2-shell .app>footer,body.v2-shell #home{display:none!important}
body.v2-shell{background:radial-gradient(circle at 50% 0%,#1e3460 0%,#0e1b33 40%,#081120 100%)}
.v2-page{max-width:640px;margin:0 auto;padding:12px 5px max(22px,env(safe-area-inset-bottom));}
.v2-flag{border:1px solid #6a7695;border-radius:40px;display:inline-block;color:#d3dced;background:#193153aa;padding:6px 11px;font-size:11px;letter-spacing:.03em}
.v2-brand{text-align:center;margin:15px 0 26px;}
.v2-logo{display:block;width:min(55vw,190px);height:min(55vw,190px);object-fit:contain;border-radius:50%;margin:auto auto 11px;filter:drop-shadow(0 0 15px #06a9d05c)}
.v2-brand h1{font-size:clamp(29px,8.7vw,48px);letter-spacing:.045em;margin:2px 0 8px;color:#fff;font-weight:800;}
.v2-slogan{font-size:clamp(15px,4.25vw,22px);font-weight:730;color:#eef7ff;margin:0;letter-spacing:.02em;}
.v2-label{color:#a6f4ff;font-size:17px;font-weight:780;margin:15px 6px 12px}
.v2-theme-grid{display:grid;gap:11px}.v2-topic,.v2-course-banner{width:100%;display:flex;align-items:center;gap:13px;border:1.6px solid #4d7ca8;background:linear-gradient(115deg,rgba(24,44,82,.96),rgba(16,30,59,.98));border-radius:20px;color:#f5faff;text-align:left;padding:14px 17px;min-height:94px;box-shadow:0 9px 28px #030b1e52;font:inherit;cursor:pointer}
.v2-topic:active,.v2-grade-button:active{transform:scale(.995)}.v2-topic:focus-visible,.v2-grade-button:focus-visible{outline:3px solid #ffe99b;outline-offset:3px}
.v2-topic-icon{width:69px;height:69px;display:grid;place-items:center;border:1px solid #3c799d;border-radius:16px;background:linear-gradient(135deg,#1b5370,#132b4c);font-size:34px;flex-shrink:0}
.v2-topic-info{flex:1;min-width:0}.v2-topic-title{display:block;font-weight:800;font-size:23px;line-height:1.35}.v2-topic-sub{display:block;color:#c3d3e9;font-size:13px;line-height:1.5;margin-top:4px}.v2-chevron{font-size:30px;color:#8debf5;font-weight:400}
.v2-toolbar{display:flex;align-items:center;gap:9px;justify-content:space-between;margin:7px 1px 18px}.v2-back{border:1.5px solid #71d5e8;border-radius:24px;background:#143861;color:#ecfbff;min-height:43px;padding:9px 16px;font-size:15px;font-weight:740}.v2-toolbar-title{font-size:21px;font-weight:840;color:#fff}.v2-toolbar-side{min-width:65px}
.v2-course-banner{min-height:110px;cursor:default;border-color:#54a5e0;background:linear-gradient(140deg,#103a70,#0e2449)}.v2-course-banner .v2-topic-title{font-size:clamp(24px,6vw,32px)}.v2-course-banner .v2-topic-sub{font-size:16px}
.v2-grade-section{border:1.5px solid #467eb8;border-radius:20px;background:#0c2751a6;padding:15px;margin:14px 0}.v2-grade-header{display:flex;align-items:center;gap:12px;font-size:15px;font-weight:760;margin:0 0 12px}.v2-grade-tag{display:inline-block;border-radius:24px;padding:5px 12px;background:#7ae4eb;color:#073052;font-size:14px;font-weight:800}
.v2-grade-grid{display:grid;gap:9px;grid-template-columns:repeat(2,minmax(0,1fr))}.v2-grade-grid.three{grid-template-columns:repeat(3,minmax(0,1fr))}.v2-grade-button{border:1.4px solid #4099ce;background:linear-gradient(145deg,#15446e,#102952);color:#f8fdff;border-radius:15px;min-height:78px;padding:12px 8px;text-align:center;font:inherit;cursor:pointer;box-shadow:inset 0 0 12px #24a8fb28}.v2-grade-button b{display:block;font-size:clamp(13px,4vw,18px);line-height:1.3}.v2-grade-button span{display:block;color:#90e2f5;font-size:12px;margin-top:6px}.v2-grade-button[disabled]{opacity:.5;cursor:not-allowed}.v2-grade-button[disabled] span{color:#b5c7d8}
.v2-info{color:#b8d4e9;font-size:13px;line-height:1.65;margin:15px 9px}.v2-ad-slot{margin-top:24px;min-height:70px;border:1.5px dashed #698fb6;background:#1a3c63a1;color:#b2d5ed;border-radius:18px;display:grid;place-items:center;text-align:center;padding:16px;font-size:14px;pointer-events:none;}
.v2-ad-slot small{font-size:10px;display:block;color:#92bad9;margin-top:3px}.v2-ad-slot[data-enabled='false']{opacity:.7}
.v2-settings-panel{background:#0d2749b9;border:1px solid #4b94bc;border-radius:17px;padding:14px;margin-top:14px}
.v2-settings-panel h2{font-size:17px;margin:0 0 12px;color:#eef8ff}.v2-choices{display:grid;grid-template-columns:1fr 1fr;gap:10px}.v2-choice{min-height:76px;padding:10px 7px;border-radius:14px;background:#152f53;color:#e9f8ff;border:1.6px solid #4a83ba;font:inherit;font-weight:770;cursor:pointer;line-height:1.4}.v2-choice small{display:block;font-weight:400;font-size:11px;margin:5px 0 0;color:#b4c9e5;line-height:1.4}.v2-choice.active{border:2px solid #83e8e8;background:#1a5065}.v2-choice:disabled{opacity:.6}.v2-choice:focus-visible{outline:3px solid #ffeb97;outline-offset:2px}
.v2-primary{display:block;width:100%;min-height:66px;border:none;border-radius:18px;background:linear-gradient(105deg,#72e8f0,#74abff);color:#092c4e;font-size:23px;font-weight:860;margin:22px 0;box-shadow:0 5px 15px #0084cd4a;cursor:pointer}.v2-primary:disabled{opacity:.5;cursor:not-allowed}.v2-support{display:grid;grid-template-columns:1fr 1fr;gap:9px;margin-top:7px}.v2-support button{background:#1c3556;color:#dff5ff;border:1px solid #527da4;min-height:55px;border-radius:13px;font:inherit;font-size:12px;font-weight:700;padding:8px}.v2-status{padding:11px 13px;border-radius:11px;background:#132f4c;color:#c2e6ef;font-size:12px;line-height:1.7;margin-top:12px;white-space:pre-wrap;overflow-wrap:anywhere}.v2-status.warning{color:#ffe5ba;border:1px solid #9a784d}
#v2SoundSlot details,#v2RecordsSlot details{margin:11px 0}#v2SoundSlot{margin-top:11px}#v2RecordsSlot{margin-top:12px}
@media(max-width:390px){.v2-topic{padding:10px 12px;min-height:85px}.v2-topic-icon{width:57px;height:57px;font-size:29px}.v2-topic-title{font-size:20px}.v2-topic-sub{font-size:11px}.v2-grade-grid.three{grid-template-columns:repeat(3,minmax(0,1fr))}.v2-grade-button{padding:10px 4px;min-height:75px}.v2-grade-button b{font-size:13px}.v2-choice{font-size:13px}}
/* Scope: no override of #game gameplay, its 2x2 answers, stats, fonts or timing. */

#gamePanel.v2-memory #wordChip{left:50%!important;transform:translate(-50%,-50%)}

/* The vocabulary index is separate from the frozen four-choice quiz surface. */
.v2-support{grid-template-columns:repeat(3,minmax(0,1fr));gap:7px}
.v2-support button{font-size:clamp(10px,2.8vw,13px);padding:8px 3px;min-height:58px}
.v2-search-label{display:block;color:#b9d9ef;font-size:12px;margin:0 0 6px}
.v2-word-search{width:100%;border:1px solid #5288b9;border-radius:12px;padding:12px 14px;color:#eefbff;background:#102a4b;font:inherit;font-size:16px}
.v2-word-rows{margin-top:9px;max-height:340px;overflow-y:auto;overscroll-behavior:contain}
.v2-word-row{padding:10px 4px;border-bottom:1px solid #365575;display:flex;justify-content:space-between;align-items:start;gap:10px;line-height:1.4}
.v2-word-text{min-width:0;overflow-wrap:anywhere}.v2-word-row strong{font-size:14px}.v2-word-row small{display:block;color:#b8cbe0;font-size:12px;margin-top:2px}
.v2-freq{flex-shrink:0;border-radius:12px;padding:3px 7px;font-size:11px;font-weight:bold;color:#fff}
.v2-freq.freq-4{background:#d8474d}.v2-freq.freq-3{background:#258b51}
.v2-freq.freq-2{background:#3569b9}.v2-freq.freq-1{background:#687487}

/* JLPT-FREQ-DISPLAY-02: challenge + memory share one real badge.
   Centre it over the word (not above its left edge); it travels with the
   original moving chip. Do not alter word size, track motion or answer layout. */
#game #wordChip[data-exam-label]>.v2-exam-chip-badge{
 position:absolute;bottom:calc(100% + 3px);left:50%;transform:translateX(-50%);
 display:block;box-sizing:border-box;white-space:nowrap;max-width:none;
 font-size:clamp(10px,2.6vw,12px);line-height:1.25;font-weight:800;letter-spacing:0;
 border:1px solid currentColor;border-radius:9px;padding:2px 6px;
 background:#10243f;color:#d2dde9;text-shadow:none;box-shadow:0 1px 3px #06162b66;pointer-events:none;
}
#game #wordChip[data-exam-band="1"]>.v2-exam-chip-badge{color:#d1dae5;border-color:#8995a4}
#game #wordChip[data-exam-band="2"]>.v2-exam-chip-badge{color:#9dc6ff;border-color:#4a8eed}
#game #wordChip[data-exam-band="3"]>.v2-exam-chip-badge{color:#9bf2b8;border-color:#28975d}
#game #wordChip[data-exam-band="4"]>.v2-exam-chip-badge{color:#ff9ea7;border-color:#df454e}
.v2-research-details{border:1px solid #4976a2;border-radius:15px;background:#102a4b;color:#dceefb;padding:11px 14px;margin:13px 0;font-size:12px;line-height:1.7}
.v2-research-details summary{cursor:pointer;font-size:13px;font-weight:780;color:#aff5ff;list-style:revert}
.v2-research-body{padding:9px 2px 2px}.v2-research-body p{margin:6px 0 9px}.v2-research-body b{color:#fff}
.v2-research-dots{display:flex;gap:6px;flex-wrap:wrap;margin:9px 0}.v2-research-dots span{border:1px solid #51749e;border-radius:22px;padding:3px 8px;white-space:nowrap}
.v2-research-dots .research-one{color:#d1dae5}.v2-research-dots .research-two{color:#9dc6ff}.v2-research-dots .research-three{color:#9bf2b8}.v2-research-dots .research-four{color:#ff9ea7}
.v2-research-body .v2-research-warning{border-left:3px solid #c69c56;padding-left:9px;color:#ffe0b0}

/* N2 TEST: kana reading above kanji, only for the source-language word. */
#game #wordChip ruby{ruby-position:over;}
#game #wordChip ruby rt{font-size:.24em;font-weight:600;letter-spacing:.07em;line-height:1.1;text-shadow:none;}

/* Accessible one-arrow expandable info control. */
.v2-research-details summary{list-style:none;display:flex;align-items:center;justify-content:space-between;gap:10px;}
.v2-research-details summary::-webkit-details-marker{display:none;}
.v2-research-details summary::after{content:'▼';color:#8cecf0;font-size:14px;flex:0 0 auto;}
.v2-research-details[open] summary::after{content:'▲';}

/* JAPANESE-RUBY-01 TEST: full-word kana directly ABOVE each kanji-bearing
   Japanese answer, using the same ruby placement/size in CSS pixels as the
   already accepted main Japanese word chip. Never change base answer sizing. */
#game .answer ruby.v2-japanese-answer-ruby{ruby-position:over;ruby-align:center;}
#game .answer ruby.v2-japanese-answer-ruby rt{
 font-size:clamp(10.08px,2.928vw,16.8px); /* main Japanese card: .24 × clamp(42px,12.2vw,70px) */
 font-weight:600;letter-spacing:.07em;line-height:1.1;text-shadow:none;
}
@media(max-height:570px){
 #game .answer ruby.v2-japanese-answer-ruby rt{
  font-size:clamp(8.64px,2.64vw,15.6px); /* main word 36px/11vw/65px when short */
 }
}

/* HOME-COMPACT-01 TEST: landing-page-only layout; do not affect other pages or JLPT.
   Reduce redundant top spacing and make the single brand slogan a readable line. */
#v2Landing.v2-page{padding-top:0}
#v2Landing .v2-brand{margin:0 0 14px}
#v2Landing .v2-logo{margin-bottom:8px}
#v2Landing .v2-slogan{font-size:clamp(19px,6.1vw,26px);font-weight:800;letter-spacing:-.045em;line-height:1.35;white-space:nowrap}
#v2Landing>.v2-label{margin-top:15px;margin-bottom:12px}
