/* Layout of the approved Manabi Quest screens. The shared header and tabs stay in view. */
:root {
  --ink: #101636;
  --navy: #101941;
  --purple: #8128ef;
  --blue: #0566dc;
  --green: #109330;
  --border: #d8dceb;
  --u: clamp(.57px, min(.2174vw, .10dvh), 1.12px);
  background: #eff1f8;
}
[hidden] { display: none !important; }
html { height: 100%; -webkit-text-size-adjust: 100%; }
body.v1-active, body.v1-active[data-route=home] {
  width:100%; margin:0; color: var(--ink); background: white;
  font-family: Arial, "Hiragino Sans", "Yu Gothic UI", Meiryo, "Noto Sans CJK JP", sans-serif;
  line-height: 1.42; font-synthesis: weight; --page-accent: #7738cd;
}
body[data-mqpage=sets], body[data-mqpage=intro], body[data-mqpage=quiz], body[data-mqpage=results] { --page-accent: #0868df; }
body[data-mqpage=history] { --page-accent: #1ba339; }
button, a, summary, input, select { touch-action: manipulation; }
button:focus-visible, a:focus-visible, summary:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 3px solid #625add; outline-offset: 2px;
}
button:disabled { cursor: default; }
button svg, a svg, .mq-heading-icon svg { flex: none; }
body.v1-active .q-header {
  background: linear-gradient(110deg,#141f4e,#0c153b 65%,#131e4f);
  border: none; min-height: 0; color: white; width: 100%;
  padding-top: env(safe-area-inset-top);
}
body.v1-active .q-header-inner {
  width: 100%; height: max(42px,calc(67 * var(--u))); min-height: 0;
  padding-inline:max(clamp(10px,1.8vw,28px),env(safe-area-inset-left)) max(clamp(10px,1.8vw,28px),env(safe-area-inset-right));
  justify-content:flex-start; gap:8px;
}
body.v1-active .q-brand { color: white; align-items: center; gap: calc(11 * var(--u)); }
.mq-original { display: flex; flex-direction: column; justify-content: center; gap: 2px; line-height: 1.14;
  font: 500 max(11px,calc(16 * var(--u)))/1.2 Arial,sans-serif; letter-spacing: .035em; border-right: 1.5px solid #fff;
  padding: 1px calc(21 * var(--u)) 1px 0; margin-right: calc(10 * var(--u)); }
.mq-original strong { letter-spacing: .21em; font-weight: 700; }
.mq-cap { width: calc(50 * var(--u)); height: calc(43 * var(--u)); }
.mq-wordmark { display:grid; justify-items:start; text-align:left; gap: 2px; line-height: 1.12; }
.mq-wordmark strong { font-size: max(16px,calc(25 * var(--u))); font-weight: 800; letter-spacing: .01em; }
.mq-wordmark small { font: 500 max(10px,calc(15 * var(--u)))/1.2 Arial,sans-serif; letter-spacing: .07em; }
body.v1-active .q-header-inner .mq-head-tools { display: none; }
body.v1-active[data-mqpage=home] .mq-head-tools { display: flex; gap: 6px; }
.mq-head-tools a:first-child { border: 1px solid #cbd1e6; border-radius: 24px; padding-inline: 10px; }
.mq-head-tools a svg { width: 20px; height: 20px; }
body.v1-active #app, body.v1-active[data-route=home] #app {
  margin: 0; width: 100%; padding: calc(12 * var(--u)) calc(21 * var(--u)) calc(14 * var(--u)); max-width: none;
}
.v1-screen { gap: calc(11 * var(--u)); }
.v1-heading { min-height: calc(63 * var(--u)); gap: calc(13 * var(--u)); align-items: flex-start; justify-content: flex-start; padding: 0 calc(6 * var(--u)); }
.v1-heading h1 { color: #101633; font-size: max(18px,calc(30 * var(--u))); line-height: 1.23; letter-spacing: -.02em; font-weight: 800; }
.v1-heading p { margin: calc(6 * var(--u)) 0 0; color: #17203c; font-size: max(11px,calc(15 * var(--u))); font-weight: 600; line-height: 1.4; }
.mq-heading-icon { color: var(--page-accent); line-height: 1; }
.mq-heading-icon svg { width: calc(46 * var(--u)); height: calc(46 * var(--u)); }
.v1-heading > button { margin-left: auto; }
.v1-bottom {
  height: max(50px,calc(88 * var(--u) + env(safe-area-inset-bottom))); padding: calc(5 * var(--u)) 3px max(calc(6 * var(--u)),env(safe-area-inset-bottom));
  gap: 0; border-top: 1px solid #daddea; background: linear-gradient(#f9f9fc,#f1f2f5); box-shadow: none;
}
.v1-bottom a { gap: calc(6 * var(--u)); min-height: 0; font-weight: 750; color: #151c40; border-radius: calc(13 * var(--u)); }
.v1-bottom a svg { width: max(19px,calc(32 * var(--u))); height: max(19px,calc(32 * var(--u))); }
.v1-bottom a span { font-size: max(10px,calc(15 * var(--u))); letter-spacing: 0; }
.v1-bottom a.current { background: #eae0ff; color: #6824c3; }
.v1-bottom [data-v1-tab=sets].current { background: #d6ecff; color: #0068ca; }
.v1-bottom [data-v1-tab=history].current { background: #dcf2df; color: #107928; }
.v1-bottom a:hover { background-color: #e8e9f3; }
.mq-create { display: flex; flex: 1; min-height: 0; flex-direction: column; justify-content: space-between; gap: calc(9 * var(--u)); overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; }
.mq-create > * { flex: none; }
.mq-config { display: grid; gap: 1px; padding: 0 calc(6 * var(--u)); }
.mq-config-row { display: grid; align-items: center; grid-template-columns: 46% minmax(0,1fr); min-height: calc(45 * var(--u)); padding: calc(2 * var(--u)) calc(8 * var(--u));
  background: linear-gradient(102deg,#f6f1fd,#faf9fe); }
.mq-config-row:first-child { border-radius: calc(13 * var(--u)) calc(13 * var(--u)) 0 0; }
.mq-config-row:last-child { border-radius: 0 0 calc(13 * var(--u)) calc(13 * var(--u)); }
.mq-config-row > span:first-child, .mq-option-row > span, .mq-options-head {
  display: flex; align-items: center; gap: calc(14 * var(--u)); font-size: max(13px,calc(19 * var(--u))); font-weight: 750; color: var(--ink);
}
.mq-config-row > span > svg, .mq-option-row > span > svg, .mq-options-head svg:first-child {
  width: calc(31 * var(--u)); height: calc(31 * var(--u)); color: var(--purple);
}
.mq-select { display: block; position: relative; min-width: 0; }
.mq-select select, .mq-session-select select { appearance: none; width: 100%; border: 1.5px solid #ccd0e3; border-radius: calc(11 * var(--u));
  background: #fff; box-shadow: 0 1px 2px #1b22440a; padding: 0 calc(31 * var(--u)) 0 calc(13 * var(--u)); min-height: calc(39 * var(--u));
  color: #101629; font-size: max(13px,calc(18 * var(--u))); font-weight: 650; text-overflow: ellipsis; }
.mq-select > svg { pointer-events: none; position: absolute; right: calc(12 * var(--u)); top: 50%; transform: translateY(-50%); color: #081132; }
.mq-options { padding: 0 calc(5 * var(--u)) calc(5 * var(--u)); background: linear-gradient(110deg,#f3edff,#f8f5ff); border-radius: calc(15 * var(--u)); overflow: hidden; }
.mq-options-head { width: 100%; border: 0; background: transparent; text-align: left; gap: calc(12 * var(--u)); min-height: calc(42 * var(--u)); padding: calc(3 * var(--u)) calc(14 * var(--u)); }
.mq-options-head svg:last-child { margin-left:auto; color:#7e63ae; }
.mq-option-row { display:flex; justify-content:space-between; align-items:center; min-height:calc(48 * var(--u)); padding:0 calc(19 * var(--u)); background:#fff; }
.mq-option-row + .mq-option-row { border-top:1px solid #efedf6; border-radius:0 0 9px 9px; }
.mq-option-row:nth-child(2) { border-radius:9px 9px 0 0; }
.mq-option-row:last-child > span svg { color:#ffa500; }
.mq-radios { display:flex; align-items:center; gap:calc(24 * var(--u)); margin-right:calc(16 * var(--u)); }
.mq-radios label { display:flex; align-items:center; gap:calc(8 * var(--u)); font-size:max(12px,calc(18 * var(--u))); font-weight:700; }
.mq-radios input { appearance:none; width:calc(25 * var(--u)); height:calc(25 * var(--u)); background:white; border:2px solid #bcc2d7; border-radius:50%; margin:0; }
.mq-radios input:checked { border-color:#943aef; background:radial-gradient(circle,#9130ff 0 42%,white 45%); }
.mq-switch { min-width:calc(96 * var(--u)); height:calc(32 * var(--u)); padding:2px calc(5 * var(--u)) 2px calc(18 * var(--u)); display:flex; align-items:center; justify-content:space-between; gap:6px; border:0; border-radius:30px; color:white; background:#6c7187; font:bold max(11px,calc(15 * var(--u))) Arial; }
.mq-switch[aria-checked=true] { background:linear-gradient(100deg,#8b38e7,#a742fc); }
.mq-switch i { background:white; border-radius:50%; width:calc(26 * var(--u)); height:calc(26 * var(--u)); box-shadow:0 1px 3px #4a1b7b42; }
.mq-switch[aria-checked=false] { flex-direction:row-reverse; padding:2px calc(12 * var(--u)) 2px calc(5 * var(--u)); }
.mq-reference { display:flex; align-items:center; gap:calc(18 * var(--u)); min-height:calc(56 * var(--u)); border-radius:calc(14 * var(--u)); padding:calc(5 * var(--u)) calc(19 * var(--u)); background:#fff3cf; font-size:max(11px,calc(15.5 * var(--u))); font-weight:650; line-height:1.45; }
.mq-reference svg { flex:none;color:#ffa800;width:calc(30 * var(--u));height:calc(30 * var(--u)); }
.mq-transfer { position:relative; }
.mq-split, .mq-primary, .mq-import, .mq-secondary, .v1-intro-start { width:100%; min-height:max(34px,calc(55 * var(--u))); border-radius:calc(14 * var(--u)); }
.mq-split { display:grid; grid-template-columns:minmax(0,1fr) 20%; align-items:stretch; color:#fff; background:linear-gradient(#9e32de,#67069d); box-shadow:inset 0 1px 1px #ffffff29; overflow:hidden; }
.mq-split button { color:inherit; background:transparent; border:0; padding:0; font-size:max(15px,calc(22 * var(--u))); font-weight:750; display:flex; align-items:center; justify-content:center; gap:calc(14 * var(--u)); }
.mq-split button:last-child { position:relative; }
.mq-split button:last-child::before { content:""; position:absolute; top:20%; bottom:20%; left:0; border-left:1px solid #ffffffc2; }
.mq-split button svg { width:calc(33 * var(--u)); height:calc(33 * var(--u)); }
.mq-split button:hover { background:#ffffff16; }
.mq-key { display:flex; align-items:center; justify-content:center; gap:min(4.5%,24px); margin:calc(8 * var(--u)) 0 0;
  font-size:max(10px,calc(14.5 * var(--u))); font-weight:650; color:var(--ink); white-space:nowrap; }
.mq-transfer-status { position:absolute; clip-path:inset(50%); width:1px; height:1px; overflow:hidden; }
.mq-transfer .v1-share-dropdown { position:absolute; right:0; bottom:calc(100% + 5px); z-index:2; padding:8px; background:#fff; border:1px solid var(--border); border-radius:12px; box-shadow:0 4px 16px #18264b30; }
.mq-primary, .mq-import, .mq-secondary, .v1-primary, .v1-intro-start {
  display:inline-flex; justify-content:center; align-items:center; gap:calc(11 * var(--u)); padding:5px 10px; font-weight:750; line-height:1.25; font-size:max(15px,calc(22 * var(--u)));
}
.mq-import, .mq-secondary { color:#063784; border:1.6px solid #0965ff; background:linear-gradient(#fff,#f5f8ff); }
.mq-import { gap:calc(35 * var(--u)); }
.mq-import svg { width:calc(38 * var(--u));height:calc(38 * var(--u)); }
.mq-primary,.v1-primary,.v1-intro-start { background:linear-gradient(#0874ff,#0050cb); color:white; border:0; }
.mq-primary:hover:not(:disabled),.v1-primary:hover:not(:disabled) { filter:brightness(1.06); }
.mq-primary:disabled { background:#9eb7dc;color:white;opacity:1; }
.mq-secondary { border:1px solid #ccd2e3; color:#18243d; background:#fff; }
.mq-sites { border-top:1px solid #ececf6; padding-top:calc(6 * var(--u)); }
.mq-sites h2 { display:flex; align-items:center; gap:calc(8 * var(--u)); margin:0 0 calc(8 * var(--u)) calc(7 * var(--u)); font-size:max(13px,calc(19 * var(--u))); font-weight:750; }
.mq-sites h2 svg { width:calc(25 * var(--u)); height:calc(25 * var(--u)); }
.mq-sites h2 small { font-size:max(10px,calc(14 * var(--u))); }
.mq-sites-row { display:grid; grid-auto-columns:minmax(0,1fr); grid-auto-flow:column; gap:calc(8 * var(--u)); }
.mq-sites-row a { min-width:0; min-height:max(42px,calc(72 * var(--u))); display:flex; flex-direction:column; align-items:center; justify-content:center; gap:calc(2 * var(--u)); border:1px solid #d3d7e6; box-shadow:0 1px 2px #19264712; border-radius:calc(12 * var(--u)); background:linear-gradient(#fff,#fafafa); text-decoration:none; color:#101322; font-size:max(11px,calc(16 * var(--u))); font-weight:750; }
.mq-sites-row a img,.mq-sites-row a svg { width:calc(40 * var(--u)); height:calc(40 * var(--u)); object-fit:contain; }
.mq-sites-row a span { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; max-width:95%; }
.mq-sites-row a:hover,.mq-import:hover,.mq-secondary:hover { background:#f2f5ff; }
.mq-dialog { margin:auto; padding:0; width:min(91%,calc(419 * var(--u))); min-width:min(290px,92%); max-width:calc(100vw - 18px); max-height:88dvh; flex-direction:column;
  background:#fff; color:#101a3c; border:2px solid #dbdff4; border-radius:max(15px,calc(24 * var(--u))); box-shadow:0 5px 14px #19203e57,0 0 0 1px #999fb2; overflow:hidden; font-family:inherit; }
.mq-dialog[open] { display:flex; }
.mq-dialog::backdrop { background:#1a1c3a5e; }
.mq-dialog-head { background:linear-gradient(110deg,#fbfaff,#f5f6fc); border-bottom:1px solid #eef0f7; display:flex; flex:none; align-items:center; justify-content:space-between; gap:7px; padding:calc(15 * var(--u)) calc(24 * var(--u)) calc(11 * var(--u)); }
.mq-dialog-head h2 { display:flex; gap:calc(13 * var(--u)); align-items:center; margin:0; font-size:max(18px,calc(25 * var(--u))); color:#121839; letter-spacing:0; }
.mq-dialog-head h2 svg { width:calc(40 * var(--u)); height:calc(40 * var(--u)); color:#0a3180; }
.mq-close,.mq-ready button { display:grid; place-items:center; border:0; background:transparent; color:#122044; padding:0; min-width:30px; min-height:30px; }
.mq-dialog-body { min-height:0; overflow:auto; padding:calc(9 * var(--u)) calc(21 * var(--u)) calc(20 * var(--u)); }
.mq-dialog-intro { width:86%; margin:0 auto calc(15 * var(--u)); font-size:max(12px,calc(16 * var(--u))); font-weight:650; line-height:1.5; }
.mq-drop { width:100%; min-height:calc(171 * var(--u)); display:flex; flex-direction:column; align-items:center; justify-content:center; gap:calc(9 * var(--u));
  color:#101b46; font-weight:650; background:#fff; border:1.5px dashed #5889d4; border-radius:calc(13 * var(--u)); }
.mq-drop > span:nth-child(2) { display:grid; gap:3px; }
.mq-drop svg { width:calc(42 * var(--u)); height:calc(42 * var(--u)); }
.mq-drop strong { font-size:max(16px,calc(22 * var(--u))); }
.mq-drop b { font-size:max(12px,calc(17 * var(--u))); }
.mq-drop small { font-size:max(10px,calc(14 * var(--u))); }
.mq-drop.dragging,.mq-drop:hover { background:#f0f6ff; border-color:#0266e7; }
.mq-drop.has-file { min-height:calc(76 * var(--u)); flex-direction:row; gap:calc(18 * var(--u)); }
.mq-drop.has-file small { display:none; }
.mq-drop.has-file strong { font-size:max(14px,calc(18 * var(--u))); }
.mq-ready { display:flex; gap:calc(13 * var(--u)); align-items:center; padding:calc(11 * var(--u)); min-height:calc(76 * var(--u)); background:#eefae9; border:1px solid #b6e9a8; border-radius:calc(13 * var(--u)); margin-bottom:calc(15 * var(--u)); }
.mq-ready > div { flex:1; min-width:0; display:grid; }
.mq-ready strong { font-size:max(13px,calc(18 * var(--u))); overflow-wrap:anywhere; }
.mq-ready > div > span { font-size:max(11px,calc(15 * var(--u))); font-weight:650; }
.mq-good,.mq-score-mark,.mq-result-note summary i,.mq-analysis-card h2 i { display:inline-grid; place-items:center; flex:none; border-radius:50%; }
.mq-good { background:#14b600; color:white; width:calc(34 * var(--u)); height:calc(34 * var(--u)); }
.mq-paste { margin:calc(4 * var(--u)) 3px; font-size:max(10px,calc(12 * var(--u))); color:#526382; }
.mq-paste summary,.mq-photo-list summary,.mq-record summary,.mq-result-note summary,.mq-review-item summary { cursor:pointer; }
.mq-paste label { display:grid; margin:6px 0; }
.mq-paste textarea { width:100%; border:1px solid #c4cbe0; border-radius:7px; padding:8px; }
.mq-photo-list { font-size:13px; margin:6px 0; }
.mq-photo-list label { display:grid; grid-template-columns:auto 1fr; align-items:center; gap:4px 7px; margin:6px 0; }
.mq-photo-list img { width:56px; height:42px; object-fit:contain; }
.mq-photo-list input { grid-column:1/-1; width:100%; }
.mq-file-status { font-size:13px; padding:7px 9px; border-radius:7px; margin:5px 0; background:#eaf3fc; }
.mq-file-status.mq-error { background:#fff0ed; color:#9c261a; }
.mq-dialog .mq-primary { min-height:max(34px,calc(51 * var(--u))); border-radius:calc(12 * var(--u)); margin-top:calc(4 * var(--u)); }
.mq-advanced { width:min(93%,480px); }
.mq-advanced-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); align-items:end; gap:8px 12px; padding:8px 0 12px; }
.mq-advanced-grid .mq-wide { grid-column:1/-1; }
.mq-hint-text { white-space:pre-wrap; overflow-wrap:anywhere; }
/* Dashboard and recovery use the two-column compositions of their reference screens. */
.mq-dashboard { display:grid; grid-template-rows:auto minmax(0,1fr) auto; gap:clamp(5px,1.2dvh,13px); flex:1; min-height:0; }
body.v1-active[data-mqpage=home] #app,body.v1-active[data-mqpage=review] #app { padding:clamp(7px,1.5dvh,17px) clamp(8px,2vw,22px); }
body[data-mqpage=home] .v1-heading { min-height:0; align-items:center; }
body[data-mqpage=home] .v1-heading > div { display:flex; gap:clamp(8px,2vw,28px); align-items:center; }
body[data-mqpage=home] .v1-heading p { margin:0; }
.mq-dash-stats,.mq-dash-panel,.mq-review-card,.mq-progress-card { background:#fff; border:1px solid #d9dcef; border-radius:clamp(9px,1.6vw,19px); box-shadow:0 2px 4px #1723330b; }
.mq-dash-stats { display:grid; grid-template-columns:.75fr 1.27fr 1.25fr; gap:clamp(5px,1.3vw,15px); align-items:stretch; padding:clamp(5px,1dvh,13px); }
.mq-ring { position:relative; align-self:center; justify-self:center; display:grid; place-items:center; width:clamp(63px,11.6dvh,143px); aspect-ratio:1; border-radius:50%; background:conic-gradient(#22a243 var(--progress),#d9deea 0); }
.mq-ring > span { display:flex; flex-direction:column; justify-content:center; align-items:center; width:87%; height:87%; border-radius:50%; background:#fff; font-weight:700; font-size:clamp(9px,1.3dvh,16px); }
.mq-ring b { font-size:clamp(19px,3.6dvh,39px); line-height:1.1; color:#0c8334; font-variant-numeric:tabular-nums; }
.mq-ring b small { font-size:.65em; }
.mq-goals { display:flex; flex-direction:column; justify-content:center; gap:2px; min-width:0; }
.mq-goals > div { display:flex; align-items:center; gap:clamp(3px,1vw,13px); min-width:0; padding:clamp(3px,.7dvh,9px) 1px; font-size:clamp(10px,1.8dvh,17px); font-weight:650; }
.mq-goals > div + div { border-top:1px solid #e0e4ee; }
.mq-goals svg { color:#6256c6; }
.mq-goals b { margin-left:auto; white-space:nowrap; font-size:clamp(12px,2.5dvh,24px); }
.mq-goals b small { font-size:.65em; }
.mq-goals div:last-child b { color:#108331; }
.mq-level { display:flex; flex-direction:column; justify-content:center; align-items:center; gap:4px; min-width:0; padding:5px; background:linear-gradient(120deg,#f5f1ff,#ece7fa); border:0; border-radius:12px; color:var(--ink); }
.mq-level small,.mq-level span { font-size:clamp(9px,1.6dvh,15px); font-weight:650; }
.mq-level b { font-size:clamp(14px,2.6dvh,26px); line-height:1.25; color:#284fb9; }
.mq-level span { color:#655090; }
.v1-action-grid { gap:clamp(3px,1.1vw,13px); grid-template-columns:repeat(4,minmax(0,1fr)); }
.v1-action-card { background:linear-gradient(#fff,#f4eeff); border-color:#dfd8f1; padding:clamp(4px,.8dvh,12px) 2px; gap:2px; border-radius:clamp(9px,1.6vw,17px); box-shadow:0 2px 3px #2539540d; }
.v1-action-card .v1-action-icon { width:auto;height:auto;background:none;color:#7a39cc; }
.v1-action-card .v1-action-icon svg { width:clamp(23px,4.4dvh,44px);height:clamp(23px,4.4dvh,44px); }
.v1-action-card b { font-size:clamp(12px,2.3dvh,22px); }
.v1-action-card small { color:#273449; font-size:clamp(8px,1.4dvh,14px); }
.v1-accent-blue { background:linear-gradient(#fff,#eef6ff); border-color:#d4e2f5; }
.v1-accent-blue .v1-action-icon { color:#0768df; }
.v1-accent-green { background:linear-gradient(#fff,#edf9ef); border-color:#d2e8d6; }
.v1-accent-green .v1-action-icon,.v1-accent-green b { color:#11962d; }
.v1-accent-orange { background:linear-gradient(#fff,#fff0fa); border-color:#f2d4e7; }
.v1-accent-orange .v1-action-icon,.v1-accent-orange b { color:#bc286e; }
.mq-dash-panels { display:grid; grid-template-columns:1fr 1fr; grid-template-rows:1fr 1fr; min-height:0; gap:clamp(5px,1dvh,13px); }
.mq-dash-panel { display:flex; flex-direction:column; min-height:0; min-width:0; padding:clamp(5px,1.2dvh,14px) clamp(6px,1.1vw,15px); }
.mq-dash-panel h2,.mq-review-card h2,.mq-record-list h2 { display:flex; align-items:center; gap:clamp(2px,.6vw,8px); font-size:clamp(12px,2.1dvh,21px); margin:0 0 clamp(3px,.7dvh,9px); color:#171b3a; }
.mq-dash-panel h2 > svg,.mq-review-card h2 svg { flex:none; color:#592f9b; }
.mq-dash-panel h2 small { font-size:.72em; }
.mq-dash-panel h2 button { margin-left:auto; border:0; background:transparent; color:#6835ad; font-size:clamp(9px,1.25dvh,14px); padding:1px; white-space:nowrap; }
.mq-dash-list { min-height:0; overflow:auto; }
.mq-dash-list p,.mq-review-card > p { font-size:clamp(11px,1.55dvh,15px); color:#59647d; margin:7px 1px; }
.mq-recent,.mq-weak-stat { width:100%;display:flex; gap:6px; align-items:center; text-align:left; border:0; border-bottom:1px solid #e7e9f2; padding:3px 1px; color:#1b223b; background:white; font-size:clamp(10px,1.7dvh,16px); }
.mq-recent i,.mq-weak-stat i { flex:none; font-size:.8em; font-style:normal; color:#fff; background:#8f71d4; padding:1px 5px; border-radius:4px; }
.mq-recent span,.mq-weak-stat span { flex:1; overflow:hidden; white-space:nowrap; text-overflow:ellipsis; }
.mq-recent b { color:#107c39; }
.mq-weak-stat { background:#fff0e6; border-radius:6px; padding:4px; margin-bottom:3px; }
.mq-weak-stat i { border-radius:50%; background:#dc6846; }.mq-weak-stat b { color:#a14020; }
.mq-segment { display:flex; padding:2px; gap:2px; background:#f0eff7; border-radius:14px; }
.mq-segment button { flex:1; border:0; border-radius:14px; color:#172044; background:transparent; padding:3px 2px; font-size:clamp(9px,1.4dvh,14px); font-weight:650; }
.mq-segment button[aria-pressed=true] { background:#7240b9; color:white; }
[data-trend-plot] { position:relative; min-height:0; flex:1; display:grid; }
[data-trend-plot] svg { width:100%; height:100%; min-height:0;overflow:visible; }
[data-trend-plot] text { fill:#45516b; font:9px Arial,sans-serif; }
.mq-plot-value { position:absolute; top:0; right:0; font-size:10px; font-weight:bold; color:#693cab; background:#fff; padding:1px 3px; border-radius:4px; }
.mq-chart-empty { display:grid; place-items:center; padding:4px; background:repeating-linear-gradient(to top,transparent,transparent calc(25% - 1px),#efeff7 25%); }
.mq-chart-empty span { font-size:clamp(10px,1.5dvh,14px); color:#646e84; background:#fff; text-align:center; }
.mq-quick { min-height:0; flex:1; display:grid; grid-template-columns:1fr 1fr; grid-template-rows:1fr 1fr; gap:5px; }
.mq-quick button { display:flex; align-items:center; gap:5px; text-align:left; background:white; border:1px solid #d4d8e6; border-radius:9px; min-width:0; padding:4px 6px; }
.mq-quick button > svg:first-child { color:#6545a7; }
.mq-quick button > svg:last-child { margin-left:auto; }
.mq-quick button span { min-width:0; display:grid; }
.mq-quick b { font-size:clamp(10px,1.9dvh,16px); }
.mq-quick small { font-size:clamp(8px,1.35dvh,13px); }
.mq-next { display:flex; align-items:center; gap:clamp(4px,1.4vw,17px); padding:clamp(4px,1dvh,11px); border:1px solid #e1d7f5; border-radius:12px; background:linear-gradient(100deg,#f2eaff,#fff); }
.mq-next > span,.mq-next button { display:inline-flex; gap:5px; align-items:center; }
.mq-next > span,.mq-next b { font-weight:700; font-size:clamp(10px,1.8dvh,16px); }
.mq-next > span { color:#60309d; }
.mq-next b { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.mq-next button { flex:none; margin-left:auto; color:white; background:linear-gradient(#8c4cce,#6233a7); border:0; border-radius:22px; padding:5px 10px; font-size:clamp(10px,1.6dvh,15px); font-weight:700; }
.mq-result-body,.mq-analysis-body,.mq-review-body { display:flex; flex:1; flex-direction:column; min-height:0; gap:calc(13 * var(--u)); }
.mq-score { flex:none; display:flex; align-items:center; gap:calc(12 * var(--u)); min-height:calc(83 * var(--u)); border:1px solid #cee2fa; background:linear-gradient(105deg,#f6fbff,#fff); border-radius:calc(14 * var(--u)); padding:calc(10 * var(--u)) calc(15 * var(--u)); }
.mq-score-mark { background:linear-gradient(#2cc586,#00a359); color:white; width:calc(38 * var(--u)); height:calc(38 * var(--u)); }
.mq-score > div { font-size:calc(23 * var(--u)); font-weight:700; white-space:nowrap; }
.mq-score strong { font-size:max(22px,calc(37 * var(--u))); }
.mq-score small { font-size:max(11px,calc(16 * var(--u))); }
.mq-score > div:last-child { display:flex; justify-content:center; align-items:center; gap:6px; border-left:1px solid #cdd9e8; padding-left:calc(13 * var(--u)); margin-left:auto; }
.mq-score > div:last-child strong { color:#0864d3; }
.mq-score-green { border-color:#d5ecd7; background:#f9fdf8; }
.mq-score-green .mq-score-mark { color:#117924; background:#eaf7e9; border-radius:7px; width:calc(52 * var(--u)); height:calc(50 * var(--u)); font-weight:750; font-size:max(11px,calc(15 * var(--u))); text-align:center; }
.mq-score-green > div:last-child { flex-direction:column; gap:0; line-height:1.1; }
.mq-score-green strong,.mq-score-green > div:last-child strong { color:#117c2b; }
.mq-result-scroll,.mq-analysis-scroll,.mq-review-scroll,.mq-record-list { min-height:0; flex:1; overflow:auto; overscroll-behavior:contain; scrollbar-width:thin; padding:2px; }
.mq-result-note,.mq-analysis-card,.mq-record { border:1px solid #e2e2f1; border-radius:calc(12 * var(--u)); margin:0 0 calc(9 * var(--u)); overflow:hidden; }
.mq-result-note summary,.mq-analysis-card h2,.mq-record summary { display:flex; align-items:center; gap:calc(9 * var(--u)); font-size:max(13px,calc(18 * var(--u))); font-weight:700; min-height:calc(40 * var(--u)); padding:calc(4 * var(--u)) calc(13 * var(--u)); margin:0; }
.mq-result-note summary i,.mq-analysis-card h2 i { color:white;width:calc(25 * var(--u));height:calc(25 * var(--u));background:#8587a3; }
.mq-result-note > div,.mq-analysis-card p,.mq-analysis-card ul,.mq-record p,.mq-summary { margin:0; padding:calc(9 * var(--u)) calc(16 * var(--u)); color:#273047; font-size:max(12px,calc(16 * var(--u))); line-height:1.5; overflow-wrap:anywhere; }
.mq-result-note > div p { margin:2px 0; }.mq-result-note > div small { color:#566075; font-size:.85em; }
.mq-result-note.is-error,.mq-analysis-card.is-error { border-color:#f6d1d6;background:#fff9fa; }
.mq-result-note.is-error summary,.mq-analysis-card.is-error h2 { background:#fce7eb; }
.mq-result-note.is-error summary i { background:#e63749; }.mq-analysis-card.is-error h2 i { background:#dc5689; }
.mq-result-note.is-good,.mq-analysis-card.is-good { border-color:#d5e8d6;background:#fbfef9; }
.mq-result-note.is-good summary,.mq-analysis-card.is-good h2 { background:#eff8ed; }
.mq-result-note.is-good summary i,.mq-analysis-card.is-good h2 i { background:#19a431; }
.mq-analysis-card ul { padding-left:calc(36 * var(--u)); }.mq-summary { white-space:pre-line; margin:0 0 8px; background:#f6f9fe; border-radius:9px; }
.mq-record { background:#f5f7fc; }.mq-record summary { color:#425573; font-size:max(11px,calc(14 * var(--u))); }.mq-record .v1-outline,.mq-record .v1-estimate { margin:0 8px 8px; }
.mq-result-actions { display:flex; flex-direction:column; gap:calc(10 * var(--u)); }
.is-result .mq-split { background:linear-gradient(#2a86f8,#0755be); }
.mq-green { background:linear-gradient(#37b936,#0a9128); }
.mq-purple { background:linear-gradient(#8360c8,#573b9d); }
.mq-session-select { display:flex; align-items:center; gap:8px; font-size:12px; }.mq-session-select span { white-space:nowrap; }.mq-session-select select { font-size:13px; appearance:auto; padding:5px; }
.mq-empty-page { padding:clamp(15px,4dvh,44px) 15px; text-align:center; border:1px solid #d5e9d9; border-radius:14px; background:#fafdf9; }
.mq-empty-page > svg { color:#199c38; }.mq-empty-page h2 { font-size:clamp(16px,2.6dvh,22px); }.mq-empty-page p { font-size:14px; }.mq-empty-page button { margin-top:12px; }
.mq-record-row,.mq-review-suggestion { width:100%; border:1px solid #e1e5f0; border-radius:8px; display:flex; align-items:center; gap:6px; padding:9px; background:white; color:var(--ink); margin:3px 0; text-align:left; font-size:14px; }
.mq-record-row span,.mq-review-suggestion b { flex:1; }
.mq-record-row b { color:#188638; }
.mq-review-body > .mq-primary { flex:none; }
.mq-progress-card { display:grid; grid-template-columns:1.5fr 1fr 1fr; padding:clamp(6px,1.4dvh,14px); align-items:center; gap:clamp(2px,1vw,13px); }
.mq-progress-card > div > b { display:block; font-size:clamp(12px,2dvh,19px); }
.mq-progress-card strong { font-size:clamp(20px,3.7dvh,36px); color:#6042af; }.mq-progress-card small { font-size:12px; }
.mq-progress-card .v1-meter { width:99%; margin:4px 0; }.mq-progress-card .v1-meter i { background:#7956c4; }
.mq-progress-card > span { text-align:center; background:#edf8f3; border-radius:10px; padding:7px 3px; font-size:clamp(10px,1.8dvh,16px); font-weight:650; }
.mq-progress-card > span:last-child { background:#eef4fc; }.mq-progress-card > span b { display:block; font-size:clamp(17px,3dvh,28px); }
.mq-review-body > .mq-segment button { font-size:clamp(11px,1.9dvh,17px); min-height:32px; }
.mq-review-card { padding:clamp(7px,1.4dvh,16px); margin:0 0 8px; }
.mq-review-card h2 select { margin-left:auto; font-size:12px; border:1px solid #c9cee1; color:#39455e; border-radius:8px; padding:4px; }
.mq-review-item { display:flex; align-items:center; gap:9px; font-size:13px; padding:8px 0; border-top:1px solid #e1e5ef; }
.mq-review-item > i { color:#6059b4; background:#f0edfa; border-radius:6px; padding:6px; }.mq-review-item > div { min-width:0; flex:1; }
.mq-review-item small,.mq-review-item b { display:block; }.mq-review-item summary { color:#555c76; font-size:11px; }
.mq-review-item p { overflow-wrap:anywhere; margin:4px 0; }.mq-review-item button { font-size:12px; }
body[data-mqpage=sets] .v1-list-layout,body[data-mqpage=intro] .v1-intro-card { background:white; }
.v1-set-row { min-height:50px; }.v1-intro-card { border-color:#d2e2f8; }
.v1-intro-start { flex:none; }.v1-intro-card h3 { color:#154e93; }
body[data-mqpage=quiz] .v1-heading { display:none; }
.v1-quiz-layout { flex:1; gap:calc(6 * var(--u)); }
.v1-quiz-top { min-height:18px; color:#23324b; font-size:max(11px,calc(14 * var(--u))); }
.v1-source-zone { flex:1 1 0; min-height:45px; border:3px solid #e92c39; border-radius:calc(16 * var(--u)); background:white; }
.v1-source-grow { flex:1 1 0; }
.v1-zone-head { background:#f9fafc; padding:calc(6 * var(--u)) calc(10 * var(--u)); }
.v1-zone-head strong { font-size:max(12px,calc(16 * var(--u))); }
.v1-source-scroll { overflow:auto; padding:calc(9 * var(--u)) calc(12 * var(--u)); font-size:max(13px,calc(16 * var(--u))); scrollbar-width:thin; }
.v1-source-scroll p { margin:4px 0; }.v1-question-img { max-height:235px; margin:auto; }
.v1-quiz-metrics { border-color:#dee7f2; background:#f4f8fd; }
.v1-answer-panel { flex:0 1 auto; max-height:49%; min-height:44px; overflow:hidden; border:1.5px solid #c4d9ff; border-radius:calc(12 * var(--u)); background:white; }
.v1-answer-panel.v1-answer-closed { min-height:0; max-height:none; border-color:#dce1eb; }
.mq-answer-toolbar { display:flex; justify-content:flex-end; padding:1px 4px; border-bottom:1px solid #f1f3f8; flex:none; }
.mq-answer-toggle,[data-v1-hint] { display:flex; align-items:center; gap:3px; border:0; background:#fff; color:#394466; font-weight:650; font-size:max(10px,calc(12 * var(--u))); min-height:23px; }
.mq-answer-toggle[aria-expanded=true] svg { transform:rotate(180deg); }
.v1-answer-scroll { padding:calc(6 * var(--u)); }
.mq-question { display:flex; align-items:flex-start; gap:calc(7 * var(--u)); margin-bottom:calc(7 * var(--u)); }
.mq-question > b { display:inline-grid; place-items:center; flex:none; background:linear-gradient(#ab6bec,#773bd0); color:white; border-radius:6px; min-width:calc(27 * var(--u)); padding:1px 3px; font-size:max(11px,calc(15 * var(--u))); }
.mq-question > strong { flex:1; min-width:0; font-size:max(13px,calc(18 * var(--u))); overflow-wrap:anywhere; }
[data-v1-hint] { background:#fff8da; color:#8d5f00; border-radius:7px; padding:1px 4px; }
.v1-answer-list { gap:calc(5 * var(--u)); }
.v1-answer-list button { min-height:max(27px,calc(37 * var(--u))); padding:calc(5 * var(--u)) calc(10 * var(--u)); gap:calc(12 * var(--u)); border:1px solid #ccd2df; box-shadow:none; border-radius:calc(9 * var(--u)); font-size:max(12px,calc(16 * var(--u))); }
.v1-answer-list button span { overflow-wrap:anywhere; }
.v1-answer-list i { width:calc(21 * var(--u)); height:calc(21 * var(--u)); border:2px solid #b7bfce; }
.v1-answer-list button.chosen { border-color:#be99e9; background:#eee5fa; box-shadow:none; }
.v1-answer-list button.chosen i { border-color:#0877de; background:radial-gradient(circle,#087aff 0 45%,white 48%); }
.v1-quiz-next { margin-top:auto; }.v1-quiz-next button { min-height:max(32px,calc(45 * var(--u))); font-size:max(12px,calc(16 * var(--u))); font-weight:650; }
body.v1-active[data-mqpage=settings] .v1-settings-layout,body.v1-active[data-mqpage=help] .v1-list-panel,body.v1-active[data-mqpage=scoreGuide] .v1-list-panel { overflow:auto; }
.toast { max-width:min(92vw,440px); z-index:60; }
@media (max-width:580px) {
  .mq-head-tools span,.mq-head-tools a:first-child { display:none !important; }
  .mq-head-tools a { min-width:28px !important; }
  body[data-mqpage=home] .v1-heading > div { display:block; }
  body[data-mqpage=home] .mq-cap { width:calc(40 * var(--u)); }
  .mq-dash-panel h2 { flex-wrap:wrap; gap:3px; font-size:clamp(11px,3.1vw,16px); }
  .mq-dash-panel h2 > svg { width:16px; height:16px; }
  .mq-dash-panel h2 small { display:none; }
  .mq-dash-panel h2 button { font-size:9px; }
  .mq-quick { gap:3px; }.mq-quick small,.mq-quick button > svg:last-child { display:none; }
  .mq-quick button { flex-direction:column; justify-content:center; text-align:center; padding:2px; gap:1px; }
  .mq-quick button svg { width:16px; height:16px; }.mq-quick b { font-size:11px; }
  .mq-goals svg { display:none; }.mq-segment button { line-height:1.3; }
  .mq-next > span { max-width:38%; }.mq-next > span svg { width:16px; height:16px; }
}
@media (max-height:650px) {
  .mq-dashboard { gap:4px; }.mq-dashboard .v1-action-card small { display:none; }
  .mq-ring { width:59px; }.mq-dash-panel h2 { margin-bottom:3px; }
  .mq-create { gap:3px; }.mq-key { margin-top:2px; }
  .mq-reference { min-height:calc(48 * var(--u)); }
}
@media (max-height:450px) {
  body.v1-active #app { overflow-y:auto; }
  .mq-dashboard { display:flex; flex-direction:column; overflow:auto; }.mq-dash-panels { min-height:255px; }
  .mq-quiz-metrics { padding:1px 3px; }
}
.mq-config-row .mq-select > svg { width:calc(20 * var(--u)); height:calc(20 * var(--u)); color:#111c40; }
.mq-question-dialog,.mq-report-dialog { width:min(91vw,max(405px,42.6dvh)); }
@media (min-height:540px) {
  .mq-question-dialog,.mq-report-dialog { transform:translateY(-3.3dvh); }
}
body[data-mqpage=create] .v1-heading p { font-size:max(10px,calc(14.4 * var(--u))); letter-spacing:-.025em; }
.mq-result-actions .mq-key { margin:0; font-size:max(9px,calc(13 * var(--u))); }
.mq-result-actions:has(.v1-share-dropdown:not([hidden])) { position:relative;z-index:3; }
.v1-source-empty { color:#1c2743; font-size:max(13px,calc(16 * var(--u)));line-height:1.65; }

/* Selectable test sections and the learner's goal track. */
.q12-parts { min-width:0; margin:6px 0; border:1px solid var(--border); border-radius:12px; padding:2px 10px 5px; }
.q12-parts legend { padding:0 5px; font-size:13px; font-weight:700; color:#4e327a; }
.q12-parts label { display:flex; gap:9px; align-items:center; min-height:42px; padding:5px 0; cursor:pointer; }
.q12-parts label + label { border-top:1px solid #e7e5ee; }
.q12-parts input,.q12-diagnose input { width:18px;height:18px; flex:none; accent-color:#763dc1; }
.q12-parts label > span { flex:1; min-width:0; line-height:1.35; }
.q12-parts b,.q12-parts small { display:block; }.q12-parts b {font-size:14px;}.q12-parts small {font-size:12px;color:#4b526c;}
.q12-parts em,.q12-count { font-size:12px; color:#494064; font-style:normal; }
.q12-count { margin:3px 6px 7px; }.q12-number {display:flex;align-items:center;gap:8px;padding:6px;}
.q12-number input {width:6em;padding:6px;border:1px solid var(--border);border-radius:6px;}
.q12-row,.q12-item-actions,.q12-filters,.q12-report-links { display:flex;align-items:center;gap:6px;flex-wrap:wrap; }
.q12-row { border-bottom:1px solid var(--border);padding:6px 0; }.q12-open {flex:1;min-width:6em;text-align:left;overflow-wrap:anywhere; }
.q12-row button,.q12-filters select,.q12-report-links button,.q12-item-actions button { min-height:40px;padding:5px 9px;border:1px solid #ccd3e6;border-radius:8px;background:white;color:#283359; }
.q12-item-actions {justify-content:flex-end;}.q12-filters label {display:flex;align-items:center;gap:4px;font-size:13px;}
.q12-report-links {margin:8px 0;}.q12-diagnose {display:inline-flex; align-items:center; gap:5px; padding:5px; font-size:13px;font-weight:600;white-space:nowrap;}
.q12-track {padding:8px;gap:2px;line-height:1.25;}.q12-track small {overflow-wrap:anywhere;}
.q12-rail { display:block;position:relative;width:90%;height:6px;background:#d7cde9;border-radius:20px;margin:6px auto 3px;}
.q12-rail > i { display:block; width:var(--place);height:100%;background:#743cc2;border-radius:inherit; }
.q12-rail::after {content:'';position:absolute;top:50%;left:var(--place);transform:translate(-50%,-50%);width:11px;height:11px;border:2px solid white;background:#5530a9;border-radius:50%;box-shadow:0 0 0 1px #68439c;}
.mq-level .q12-ticks { width:96%;display:flex;justify-content:space-between;align-items:end;gap:2px;}.mq-level .q12-ticks span {font-size:clamp(9px,1.4vw,12px);line-height:1.13;}
[data-track-form] p {font-size:13px;line-height:1.5;}[data-track-status]:empty {display:none;}
[data-v1-copy=create] {user-select:none;-webkit-touch-callout:none;}
body[data-mqpage=create] .mq-create {justify-content:flex-start;}
@media(min-width:700px) {
 body[data-mqpage=create] .q12-parts {margin-block:8px;}
}
@media(min-width:860px) and (orientation:landscape) {
 body[data-mqpage=quiz] .v1-quiz-layout {display:grid;grid-template-columns:minmax(0,1.1fr) minmax(0,1fr);grid-template-rows:auto minmax(0,1fr) auto auto;grid-template-areas:"top top" "source answer" "metrics answer" "next next";gap:10px;}
 .v1-quiz-top {grid-area:top;} .v1-source-zone {grid-area:source;} .v1-quiz-metrics {grid-area:metrics;} .v1-answer-panel {grid-area:answer;max-height:none;}
 .v1-quiz-next {grid-area:next;} .v1-question-img {max-height:52vh;}
}
@media(max-width:450px){
 .mq-review-item {flex-wrap:wrap;}.q12-item-actions {margin-left:auto;}
 .q12-track small {font-size:10px;}.q12-track b {font-size:15px;}
 .v1-quiz-top {flex-wrap:wrap;} .v1-quiz-top strong {flex:1;min-width:65px;}
}
.mq-key {flex-wrap:wrap;justify-content:center;column-gap:8px;row-gap:2px;}
.mq-create {overflow-x:hidden;}
@media(max-width:520px){
 .mq-dash-stats {grid-template-columns:64px minmax(80px,.93fr) minmax(102px,1.3fr);gap:7px;}
 .mq-goals > div {display:block;font-size:11px;line-height:1.25;}
 .mq-goals b {display:block;font-size:15px;}
 .mq-goals svg {display:none;}
 .mq-dashboard .v1-action-card b {font-size:clamp(12px,3.6vw,17px);}
 .mq-config-row {grid-template-columns:41% minmax(0,1fr);}
 .q12-track .q12-ticks {padding-inline:2px;}
 .mq-create .mq-key span {white-space:normal;}
}
@media(max-width:520px){
 .mq-ring {width:62px;max-width:100%;}
 .mq-ring b {font-size:20px;}
 .mq-ring > span {font-size:9px;}
}

.mq-photo-list label,.mq-photo-list small,.mq-photo-list p,[data-import-count] {min-width:0;overflow-wrap:anywhere}
.mq-photo-list select {min-width:0;max-width:100%}
[data-pack-download] {margin:6px 0}
[data-pack-download][hidden] {display:none}

.mq-photo-source{background:#fbf9ff;border:1px solid #dcd3ef;border-radius:.8rem;margin:.45rem 0;padding:.5rem .8rem;color:#182047;min-width:0}
.mq-photo-source legend{font-weight:700;font-size:.86rem}.mq-photo-source p{font-size:.8rem;margin:.35rem 0}
.mq-photo-modes{display:flex;gap:.35rem .9rem;flex-wrap:wrap}.mq-photo-modes label,.mq-author-item label{display:flex;align-items:center;gap:.3rem;font-size:.86rem}
.mq-photo-source details{margin-top:.4rem}.mq-photo-source summary{cursor:pointer;font-size:.85rem}
.mq-author-thumbs{display:grid;grid-template-columns:repeat(auto-fill,minmax(95px,1fr));gap:.5rem;max-height:250px;overflow:auto}
.mq-author-thumbs figure{margin:0}.mq-author-thumbs img{width:100%;height:74px;object-fit:contain}.mq-author-thumbs figcaption{font-size:.74rem}
.mq-author-item{display:grid;grid-template-columns:52px minmax(0,1fr) auto;gap:.5rem;align-items:center;padding:.45rem 0;border-bottom:1px solid #ddd}
.mq-author-item img{width:52px;height:52px;object-fit:contain}.mq-author-item label:last-child{align-items:stretch;flex-direction:column;font-size:.75rem}
.mq-author-item input[type=text]{width:100%;box-sizing:border-box;padding:.4rem}.mq-author-item span{overflow-wrap:anywhere}
.mq-choose-photos{display:block;margin:.5rem 0}.mq-choose-photos input{display:block;max-width:100%;margin:.3rem 0}

.v1-bottom [data-v1-tab="review"].current{background:#ffe2ef;color:#a71960}
.v1-bottom [data-v1-tab="create"].current{background:#eee4ff;color:#6227ac}
.mq-hide-photos,.mq-export-type{display:flex;align-items:center;gap:.55em;font-size:.92em}
.mq-hide-photos{margin:.65em 0 .4em;font-weight:650}
.mq-export-type{justify-content:space-between;margin:.55em 0}.mq-export-type select{max-width:78%;padding:.5em;border:1px solid #cfcde2;border-radius:8px;background:white}

/* Main navigation palette, in display order. */
#v1-bottom {
  grid-template-columns:repeat(4,minmax(0,1fr)); height:auto; align-items:stretch;
  gap:clamp(4px,1.2vw,13px); padding:6px clamp(5px,1.8vw,18px) max(7px,env(safe-area-inset-bottom));
  background:#fff; border-top:1px solid #e4deef; container-type:inline-size;
}
#v1-bottom a {
  background:linear-gradient(#fff,var(--tint)); color:var(--accent); border:1px solid var(--edge);
  gap:3px; min-height:64px; padding:5px 1px; border-radius:clamp(9px,1.55vw,17px); box-shadow:0 2px 3px #2625400d;
}
#v1-bottom [data-nav=home]    {--accent:#55585d; --tint:#e9eaec; --edge:#c5c6c9; --title:#383a3e;}
#v1-bottom [data-nav=create]  {--accent:#c52f36; --tint:#ffe8e8; --edge:#edb5b7; --title:#982229;}
#v1-bottom [data-nav=sets]    {--accent:#0868ca; --tint:#e6f2ff; --edge:#afcfee; --title:#104e93;}
#v1-bottom [data-nav=history] {--accent:#168136; --tint:#e5f5e9; --edge:#add7b7; --title:#14652b;}
#v1-bottom [data-nav=review]  {--accent:#b95500; --tint:#ffeddc; --edge:#edbd92; --title:#924003;}
#v1-bottom a svg{width:25px;height:25px;}
#v1-bottom a b{color:var(--title);font-size:14px;line-height:1.2;}
#v1-bottom a small{font-size:10px;line-height:1.25;color:#263149;font-weight:500;white-space:normal;text-align:center;}
#v1-bottom a:is(:hover,.current){border-color:var(--accent);}
#v1-bottom a.current{box-shadow:inset 0 -3px var(--accent);}
@container(min-width:620px){
 #v1-bottom a{min-height:clamp(78px,12dvh,114px);gap:4px;}
 #v1-bottom a svg{width:clamp(28px,4.5dvh,42px);height:clamp(28px,4.5dvh,42px);}
 #v1-bottom a b{font-size:clamp(17px,2.4dvh,22px);}
 #v1-bottom a small{font-size:clamp(11px,1.45dvh,14px);}
}
@container(max-width:340px){#v1-bottom a small{font-size:9px;}}
@media(max-height:480px){#v1-bottom a{min-height:44px;gap:1px;padding:2px;}#v1-bottom a svg{width:18px;height:18px;}#v1-bottom a small{display:none;}}
.mq-home-link{display:inline-flex;align-items:center;gap:4px;color:#fff;text-decoration:none;font-weight:650;font-size:13px;padding:5px 9px;min-height:34px;border:1px solid #ffffff70;border-radius:20px;}
.mq-home-link svg{width:15px;height:15px;}
body[data-mqpage=home] .mq-home-link{display:none;}
.mq-dashboard{grid-template-rows:auto auto minmax(0,1fr);}
.mq-next > span {font-weight:650;}
.mq-next button{white-space:nowrap;}
.mq-zip-help,.mq-pending-photo{padding:8px 10px;border:1px solid #d9d9ed;border-radius:10px;color:#303857;font-size:13px;}
.mq-zip-help summary{cursor:pointer;color:#50329a;font-weight:650;}
.mq-zip-help p,.mq-pending-photo p{margin:5px 0 8px;}
.mq-pending-photo{background:#f7f5ff;}
.mq-link-button{display:block;background:none;border:0;color:#563980;text-decoration:underline;margin:5px auto 0;}
@media(max-width:600px){
 body[data-mqpage=home] .v1-screen{overflow:auto;overscroll-behavior:contain;padding:0 2px 6px;}
 .mq-dashboard{display:flex;flex-direction:column;overflow:visible;flex:0 0 auto;gap:8px;}
 .mq-dash-panels{grid-template-columns:minmax(0,1fr);grid-template-rows:auto;gap:8px;}
 .mq-dash-panel{padding:12px;}
 .mq-dash-panel h2{font-size:16px;margin-bottom:6px;}
 .mq-dash-panel h2 button{font-size:12px;padding:5px;}
 .mq-dash-panel.mq-trend{min-height:150px;}
 .mq-quick button{min-height:42px;}
 .mq-dash-panel .mq-quick button{flex-direction:row;justify-content:flex-start;padding-left:8px;}
 .mq-recent,.mq-weak-stat{font-size:13px;min-height:32px;}
 .mq-next{min-height:44px;}
}

.q-header-actions {display:flex; margin-inline-start:auto; align-items:center; gap:clamp(4px,1vw,12px);}
body.v1-active .q-header-actions nav {margin:0;}
.q-header-actions .mq-home-link {min-height:40px;}
.mq-fullscreen {color:white; display:inline-flex; align-items:center; justify-content:center; min-height:40px;
  border:1px solid #ffffff70; border-radius:20px; background:transparent; padding:5px 12px; font-size:13px; font-weight:650;}
@media(max-width:599px){.mq-fullscreen{display:none;}}
.mq-dialog-head h2 {flex:1;min-width:0; overflow-wrap:anywhere;}
.mq-dialog-head .mq-dialog-home {flex:none; display:inline-flex; align-items:center; justify-content:center; min-height:36px; padding:4px 8px; border:1px solid #cfc6e6; border-radius:10px; font-size:13px; font-weight:650; color:#50358b; background:white;}
@media(min-width:700px){
 .mq-dialog {width:min(680px,86vw);}
 .q13-placement,.q13-bank {width:min(820px,88vw);}
}
