/* やり直し英語：マイページ（mp-）。色は app.css の変数だけを使う */
.mp { padding: 6px 0 56px; --mp-r: 20px; }
.mp-load { display: flex; align-items: center; gap: 10px; justify-content: center; padding: 48px 0; color: var(--ink2); font-weight: 700; }
.mp-spin { width: 20px; height: 20px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--brand); animation: mpSpin .8s linear infinite; }
@keyframes mpSpin { to { transform: rotate(360deg); } }
.mp-nojs, .mp-err { background: var(--ng-bg); color: var(--ink); border-radius: 12px; padding: 12px 16px; font-size: 14.5px; }
.mp .ic { width: 1.2em; height: 1.2em; }

/* 見出し */
.mp-sec { margin-top: 34px; }
.mp-h { display: flex; align-items: center; gap: 10px; font-size: clamp(19px, 5vw, 23px); font-weight: 900; margin: 0 0 14px; line-height: 1.35; }
.mp-h-ic { width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; background: var(--brand-bg); color: var(--brand-d); flex: none; }
.mp-h-ic .ic { width: 20px; height: 20px; }
.mp-h small { margin-left: auto; font-size: 12.5px; font-weight: 800; color: var(--ink3); white-space: nowrap; }
.mp-note { font-size: 13px; color: var(--ink3); margin: 10px 0 0; line-height: 1.7; }
.mp-empty { font-size: 14px; color: var(--ink2); background: var(--bg2); border-radius: 12px; padding: 14px 16px; margin: 0; line-height: 1.75; }

/* 輪と棒 */
.mp-ring { display: block; width: 100%; height: 100%; }
.mp-ring-bg { fill: none; stroke: var(--bg2); }
.mp-ring-fg { fill: none; stroke: var(--c, var(--brand)); stroke-linecap: round; animation: mpRing 1.1s cubic-bezier(.2, .8, .2, 1) both; }
.mp-ring.is-brand .mp-ring-fg { stroke: var(--brand); }
@keyframes mpRing { from { stroke-dashoffset: var(--c0); } }
.mp-bar { display: block; height: 8px; background: var(--bg2); border-radius: 99px; overflow: hidden; flex: 1; min-width: 40px; }
.mp-bar i { display: block; height: 100%; background: var(--c, var(--brand)); border-radius: 99px; transform-origin: left; animation: mpBar .9s cubic-bezier(.2, .8, .2, 1) both; min-width: 0; }
.mp-bar.is-thin { height: 5px; }
.mp-bar.is-low i { background: var(--ng); } .mp-bar.is-mid i { background: var(--gold); }
@keyframes mpBar { from { transform: scaleX(0); } }

/* ようこそ（記録がまだ無い人）*/
.mp-welcome { margin-top: 14px; background: linear-gradient(135deg, var(--brand-bg), var(--gold-bg)); border: 1px solid var(--line); border-radius: var(--mp-r); padding: 22px 18px; display: grid; gap: 16px; }
.mp-kick { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 800; color: var(--brand-d); margin: 0 0 4px; letter-spacing: .06em; }
.mp-wel-t h2 { font-size: clamp(19px, 5vw, 24px); font-weight: 900; margin: 0 0 8px; }
.mp-wel-t p:last-child { margin: 0; color: var(--ink2); font-size: 14.5px; }
.mp-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.mp-steps a { display: grid; grid-template-columns: auto 1fr auto; grid-template-rows: auto auto; column-gap: 12px; align-items: center; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; text-decoration: none; color: var(--ink); box-shadow: var(--sh1); transition: transform .15s, box-shadow .15s; min-height: 56px; }
.mp-steps a:hover { transform: translateY(-1px); box-shadow: var(--sh2); }
.mp-step-n { grid-row: span 2; width: 32px; height: 32px; border-radius: 50%; background: var(--brand); color: #fff; display: grid; place-items: center; font: 800 15px var(--en); }
.mp-steps b { font-size: 15px; line-height: 1.4; }
.mp-steps small { grid-column: 2; font-size: 12.5px; color: var(--ink2); line-height: 1.5; }
.mp-steps .ic { grid-column: 3; grid-row: 1 / span 2; color: var(--ink3); }

/* 全体 */
.mp-hero { margin-top: 14px; background: var(--card); border: 1px solid var(--line); border-radius: var(--mp-r); box-shadow: var(--sh1); padding: 20px 16px; display: grid; gap: 20px; position: relative; overflow: hidden; }
.mp-hero::before { content: ""; position: absolute; inset: -40% -20% auto auto; width: 320px; height: 320px; border-radius: 50%; background: radial-gradient(circle, color-mix(in srgb, var(--brand) 12%, transparent), transparent 70%); pointer-events: none; }
.mp-hero-main { display: grid; gap: 18px; justify-items: center; position: relative; }
.mp-big-ring { position: relative; width: 150px; height: 150px; flex: none; }
.mp-big-in { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; line-height: 1.1; }
.mp-big-in b { font: 900 44px/1 var(--en); letter-spacing: -.02em; }
.mp-big-in b small { font-size: 20px; margin-left: 1px; }
.mp-big-in span { font-size: 12.5px; font-weight: 800; color: var(--ink3); margin-top: 4px; }
.mp-hero-txt { width: 100%; min-width: 0; }
.mp-hero-msg { font-weight: 800; font-size: 15px; text-align: center; margin: 0 0 14px; }
.mp-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.mp-stat { background: var(--bg2); border-radius: 14px; padding: 12px 12px 10px; display: grid; grid-template-columns: auto 1fr; column-gap: 8px; align-items: center; min-width: 0; }
.mp-stat-ic { grid-row: span 2; width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; align-self: start; }
.mp-stat-ic .ic { width: 19px; height: 19px; }
.mp-stat-ic.is-brand { background: var(--brand-bg); color: var(--brand-d); } .mp-stat-ic.is-coral { background: var(--orange-bg); color: var(--orange); } .mp-stat-ic.is-teal { background: var(--teal-bg); color: var(--teal); } .mp-stat-ic.is-gold { background: var(--gold-bg); color: var(--gold); }
.mp-stat b { font: 900 26px/1.1 var(--en); letter-spacing: -.01em; white-space: nowrap; }
.mp-stat b small { font: 700 13px var(--jp); color: var(--ink2); letter-spacing: 0; }
.mp-stat > span:last-child { font-size: 12px; font-weight: 700; color: var(--ink2); line-height: 1.4; }
.mp-ms { text-align: center; font-size: 13.5px; color: var(--ink2); margin: 14px 0 0; line-height: 1.7; }
.mp-ms .ic { color: var(--brand); width: 17px; height: 17px; vertical-align: -3px; margin-right: 5px; }
.mp-ms b { font: 900 17px var(--en); color: var(--brand-d); }

/* カレンダー */
.mp-cal { position: relative; min-width: 0; }
.mp-cal-t { display: flex; align-items: center; gap: 7px; font-weight: 800; font-size: 14px; margin: 0 0 8px; }
.mp-cal-t .ic { color: var(--teal); width: 18px; height: 18px; }
.mp-cal-t small { margin-left: auto; font-size: 12.5px; color: var(--ink3); }
.mp-cal-g { display: grid; grid-template-columns: 20px 1fr; grid-template-rows: auto auto; column-gap: 6px; row-gap: 3px; max-width: 360px; margin-inline: auto; }
.mp-cal-m { grid-column: 2; display: grid; grid-template-columns: repeat(8, 1fr); gap: 4px; font-size: 10.5px; font-weight: 700; color: var(--ink3); line-height: 1.2; min-height: 13px; }
.mp-cal-m span { white-space: nowrap; overflow: visible; }
.mp-cal-w { display: grid; grid-template-rows: repeat(7, 1fr); gap: 4px; font-size: 10px; font-weight: 700; color: var(--ink3); line-height: 1; }
.mp-cal-w span { display: flex; align-items: center; }
.mp-cal-c { display: grid; grid-template-rows: repeat(7, 1fr); grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px; }
.mp-cal-c i, .mp-cal-lg i { display: block; aspect-ratio: 1; border-radius: 5px; background: var(--bg2); }
.mp-cal-c i.is-fut { background: transparent; box-shadow: inset 0 0 0 1px var(--line); opacity: .45; }
.mp-cal-c i.l1, .mp-cal-lg i.l1 { background: color-mix(in srgb, var(--ok) 28%, var(--bg2)); }
.mp-cal-c i.l2, .mp-cal-lg i.l2 { background: color-mix(in srgb, var(--ok) 52%, var(--bg2)); }
.mp-cal-c i.l3, .mp-cal-lg i.l3 { background: color-mix(in srgb, var(--ok) 76%, var(--bg2)); }
.mp-cal-c i.l4, .mp-cal-lg i.l4 { background: var(--ok); }
.mp-cal-c i.is-today { box-shadow: 0 0 0 2px var(--card), 0 0 0 3.5px var(--brand); }
.mp-cal-lg { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; font-size: 11px; color: var(--ink3); margin: 10px auto 0; max-width: 360px; }
.mp-cal-lg i { width: 12px; border-radius: 3px; }
.mp-cal-note { flex-basis: 100%; margin-top: 2px; line-height: 1.5; }

/* 今日やること */
.mp-today { display: grid; gap: 12px; }
.mp-next { display: grid; grid-template-columns: 1fr auto; grid-template-rows: auto auto auto; column-gap: 12px; text-decoration: none; color: #fff; background: linear-gradient(135deg, var(--brand), color-mix(in srgb, var(--brand) 60%, var(--gold))); border-radius: var(--mp-r); padding: 18px 18px 16px; box-shadow: 0 10px 24px -12px color-mix(in srgb, var(--brand) 70%, transparent); transition: transform .15s; min-width: 0; }
.mp-next:hover { transform: translateY(-2px); }
.mp-next-k { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 800; letter-spacing: .06em; opacity: .95; }
.mp-next-k .ic { width: 15px; height: 15px; }
.mp-next b { grid-column: 1; font-size: clamp(18px, 4.8vw, 22px); font-weight: 900; line-height: 1.4; margin: 4px 0 2px; }
.mp-next small { grid-column: 1; font-size: 12.5px; font-weight: 700; opacity: .9; }
.mp-next-go { grid-column: 2; grid-row: 1 / span 3; align-self: center; display: inline-flex; align-items: center; gap: 6px; background: rgba(255, 255, 255, .2); border-radius: 99px; padding: 10px 14px; font-weight: 800; font-size: 14px; white-space: nowrap; }
.mp-next.is-all { background: linear-gradient(135deg, var(--gold), color-mix(in srgb, var(--gold) 55%, var(--brand))); }
:root[data-theme="dark"] .mp-next, :root[data-theme="dark"] .mp-step-n { color: #1a1206; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .mp-next, :root:not([data-theme="light"]) .mp-step-n { color: #1a1206; } }
:root[data-theme="dark"] .mp-next-go { background: rgba(0, 0, 0, .14); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .mp-next-go { background: rgba(0, 0, 0, .14); } }
.mp-due { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.mp-due a { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 12px; row-gap: 6px; align-items: center; text-decoration: none; color: var(--ink); background: var(--card); border: 1px solid var(--line); border-left: 5px solid var(--c); border-radius: 16px; padding: 12px 14px; box-shadow: var(--sh1); transition: transform .15s, box-shadow .15s; }
.mp-due a:hover { transform: translateY(-1px); box-shadow: var(--sh2); }
.mp-due-ic { grid-row: span 2; width: 44px; height: 44px; border-radius: 13px; display: grid; place-items: center; background: var(--cb); color: var(--c); }
.mp-due-ic .ic { width: 23px; height: 23px; }
.mp-due-t { display: flex; align-items: baseline; gap: 8px; justify-content: space-between; min-width: 0; }
.mp-due-t small { font-size: 13px; font-weight: 800; color: var(--ink2); }
.mp-due-t b { font: 900 26px/1 var(--en); color: var(--c); white-space: nowrap; }
.mp-due-t b i { font: 700 13px var(--jp); font-style: normal; color: var(--ink2); }
.mp-due-go { display: inline-flex; align-items: center; gap: 2px; justify-self: end; font-size: 13px; font-weight: 800; color: var(--c); }
.mp-due-go .ic { width: 16px; height: 16px; }
.mp-due-none { display: flex; gap: 12px; align-items: flex-start; background: var(--ok-bg); border-radius: 16px; padding: 16px; }
.mp-due-none > .ic { color: var(--ok); width: 26px; height: 26px; flex: none; margin-top: 2px; }
.mp-due-none b { font-size: 15px; }
.mp-due-none p { margin: 4px 0 0; font-size: 13.5px; color: var(--ink2); line-height: 1.7; }

/* コース別 */
.mp-courses { display: grid; gap: 8px; }
.mp-crs { background: var(--card); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.mp-crs > summary { list-style: none; display: grid; grid-template-columns: auto 1fr auto auto; gap: 12px; align-items: center; padding: 12px 12px 12px 14px; cursor: pointer; min-height: 60px; }
.mp-crs > summary::-webkit-details-marker { display: none; }
.mp-crs > summary:hover { background: color-mix(in srgb, var(--cb) 50%, transparent); }
.mp-crs-ic { width: 38px; height: 38px; border-radius: 11px; background: var(--cb); color: var(--c); display: grid; place-items: center; }
.mp-crs-ic .ic { width: 20px; height: 20px; }
.mp-crs-t { display: grid; gap: 6px; min-width: 0; }
.mp-crs-t b { font-size: 14.5px; font-weight: 800; line-height: 1.35; }
.mp-crs-n { font: 700 13px var(--en); color: var(--ink3); white-space: nowrap; }
.mp-crs-n b { font-size: 19px; font-weight: 900; color: var(--ink); }
.mp-chev { color: var(--ink3); width: 18px !important; height: 18px !important; transition: transform .2s; }
.mp-crs[open] .mp-chev { transform: rotate(90deg); }
.mp-crs.is-full .mp-crs-ic { background: var(--c); color: #fff; }
.mp-crs-body { padding: 4px 14px 14px; border-top: 1px dashed var(--line); }
.mp-ch { margin-top: 12px; }
.mp-ch-t { display: flex; gap: 8px; align-items: baseline; justify-content: space-between; font-size: 13px; font-weight: 800; color: var(--c); margin: 0 0 5px; }
.mp-ch-t small { color: var(--ink3); font-family: var(--en); white-space: nowrap; }
.mp-ls { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 1px; }
.mp-ls a { display: flex; align-items: center; gap: 9px; padding: 7px 6px; border-radius: 9px; text-decoration: none; color: var(--ink2); font-size: 14px; line-height: 1.45; min-height: 40px; }
.mp-ls a:hover { background: var(--bg2); color: var(--ink); }
.mp-ck { width: 20px; height: 20px; border-radius: 50%; border: 1.5px solid var(--line2); display: grid; place-items: center; color: transparent; flex: none; }
.mp-ck .ic { width: 13px !important; height: 13px !important; stroke-width: 3; }
.mp-ls a.is-done { color: var(--ink); }
.mp-ls a.is-done .mp-ck { background: var(--ok); border-color: var(--ok); color: #fff; }
.mp-ls-t { flex: 1; min-width: 0; }
.mp-ls em { font: 800 12px var(--en); font-style: normal; color: var(--ok); background: var(--ok-bg); border-radius: 99px; padding: 1px 8px; }
.mp-ls em.is-low { color: var(--ng); background: var(--ng-bg); }
.mp-crs-ft { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 14px 0 0; }
.mp-crs-ft .btn .ic { width: 16px; height: 16px; }
.mp-done-badge { display: inline-flex; align-items: center; gap: 6px; font-weight: 800; color: var(--c); background: var(--cb); padding: 8px 14px; border-radius: 99px; font-size: 14px; }

/* 練習の記録 */
.mp-cards { display: grid; gap: 12px; }
.mp-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--mp-r); padding: 16px; display: flex; flex-direction: column; gap: 12px; box-shadow: var(--sh1); position: relative; overflow: hidden; min-width: 0; }
.mp-card::after { content: ""; position: absolute; inset: 0 0 auto 0; height: 4px; background: var(--c); }
.mp-card header { display: flex; align-items: center; gap: 10px; }
.mp-card-ic { width: 38px; height: 38px; border-radius: 11px; background: var(--cb); color: var(--c); display: grid; place-items: center; flex: none; }
.mp-card-ic .ic { width: 21px; height: 21px; }
.mp-card h3 { font-size: 16px; font-weight: 900; margin: 0; flex: 1; min-width: 0; line-height: 1.35; }
.mp-card h3 a { color: inherit; text-decoration: none; }
.mp-card h3 a:hover { text-decoration: underline; }
.mp-card-due { font-size: 12px; font-weight: 800; color: var(--c); background: var(--cb); border-radius: 99px; padding: 3px 10px; white-space: nowrap; }
.mp-card-main { display: flex; align-items: center; gap: 14px; }
.mp-card-main .mp-ring { width: 64px; height: 64px; flex: none; }
.mp-card-big { margin: 0; display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 4px; min-width: 0; line-height: 1.2; }
.mp-card-big b { font: 900 36px/1 var(--en); letter-spacing: -.02em; color: var(--ink); }
.mp-card-big span { font: 700 14px var(--en); color: var(--ink3); }
.mp-card-big small { flex-basis: 100%; font-size: 12.5px; color: var(--ink2); font-weight: 700; margin-top: 6px; line-height: 1.5; }
.mp-card-rows { margin: 0; display: grid; gap: 6px; }
.mp-card-rows div { display: flex; justify-content: space-between; gap: 10px; font-size: 13.5px; border-top: 1px dashed var(--line); padding-top: 6px; }
.mp-card-rows dt { color: var(--ink2); }
.mp-card-rows dd { margin: 0; font-weight: 800; white-space: nowrap; font-family: var(--en); }
.mp-card-empty { margin: 0; font-size: 13.5px; color: var(--ink2); }
.mp-card.is-empty .mp-card-big b { color: var(--ink3); }
.mp-go { margin-top: auto; align-self: flex-start; display: inline-flex; align-items: center; gap: 6px; font-weight: 800; font-size: 14px; color: var(--c); text-decoration: none; padding: 8px 14px; border-radius: 99px; background: var(--cb); min-height: 40px; }
.mp-go .ic { width: 16px; height: 16px; transition: transform .15s; }
.mp-go:hover .ic { transform: translateX(3px); }
.mp-weak p { margin: 0 0 6px; font-size: 12.5px; font-weight: 800; color: var(--ink2); }
.mp-weak ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.mp-weak a { display: grid; grid-template-columns: 1fr 60px auto; gap: 8px; align-items: center; text-decoration: none; color: var(--ink); font-size: 13px; padding: 5px 4px; border-radius: 8px; min-height: 36px; }
.mp-weak a:hover { background: var(--bg2); }
.mp-weak a span:first-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mp-weak b { font: 800 12.5px var(--en); width: 3em; text-align: right; }
.mp-lv { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 6px 14px; }
.mp-lv li { display: grid; grid-template-columns: auto 1fr auto; gap: 6px; align-items: center; font-size: 11.5px; color: var(--ink2); font-weight: 700; }
.mp-lv small { font-family: var(--en); color: var(--ink3); }
.mp-gm { display: grid; gap: 8px; }
.mp-gm-row { display: grid; gap: 8px; text-decoration: none; color: var(--ink); background: var(--bg2); border-radius: 14px; padding: 12px; }
.mp-gm-row:hover { background: color-mix(in srgb, var(--cb) 70%, var(--bg2)); }
.mp-gm-t { display: grid; gap: 2px; }
.mp-gm-t b { font-size: 14.5px; }
.mp-gm-t small { font-size: 12.5px; color: var(--ink2); line-height: 1.55; }
.mp-dots { display: flex; gap: 5px; flex-wrap: wrap; }
.mp-dots i { width: 18px; height: 18px; border-radius: 6px; background: var(--card); box-shadow: inset 0 0 0 1.5px var(--line2); }
.mp-dots i.on { background: var(--c); box-shadow: none; }
.mp-gm-old summary { cursor: pointer; font-size: 13px; font-weight: 800; color: var(--ink2); padding: 6px 2px; }
.mp-gm-old ul { list-style: none; margin: 4px 0 0; padding: 0; }
.mp-gm-old li { display: flex; justify-content: space-between; gap: 10px; font-size: 13.5px; padding: 5px 2px; border-top: 1px dashed var(--line); }
.mp-gm-old b { font-family: var(--en); white-space: nowrap; }

/* もう一度やるとよい所 */
.mp-two { display: grid; gap: 12px; }
.mp-panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--mp-r); padding: 16px; min-width: 0; }
.mp-panel-t { font-weight: 900; font-size: 15px; margin: 0 0 10px; }
.mp-rows { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.mp-rows a { display: grid; grid-template-columns: 1fr auto auto; gap: 10px; align-items: center; text-decoration: none; color: var(--ink); padding: 9px 6px; border-radius: 10px; min-height: 48px; }
.mp-rows a:hover { background: var(--bg2); }
.mp-rows a > .ic { color: var(--ink3); width: 16px; height: 16px; }
.mp-row-t { display: grid; min-width: 0; line-height: 1.4; }
.mp-row-t b { font-size: 14.5px; font-weight: 800; }
.mp-row-t small { font-size: 12px; color: var(--ink3); }
.mp-pill { font: 800 13px var(--en); font-style: normal; border-radius: 99px; padding: 3px 10px; background: var(--bg2); }
.mp-pill.is-low { color: var(--ng); background: var(--ng-bg); }

/* 修了証 */
.mp-cert { display: grid; gap: 14px; }
.mp-cert-lead { margin: 0; color: var(--ink2); font-size: 14.5px; }
.mp-cert-name { display: grid; gap: 6px; background: var(--gold-bg); border-radius: 16px; padding: 14px 16px; }
.mp-cert-name label { font-weight: 800; font-size: 14px; }
.mp-cert-name input { font: inherit; font-size: 17px; padding: 11px 14px; border-radius: 12px; border: 1.5px solid var(--line2); background: var(--card); color: var(--ink); width: 100%; max-width: 420px; }
.mp-cert-name input:focus { outline: 3px solid var(--gold); outline-offset: 1px; border-color: var(--gold); }
.mp-cert-name small { font-size: 12px; color: var(--ink2); }
.mp-medals { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.mp-medals li { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 14px 12px; display: grid; justify-items: center; text-align: center; gap: 6px; align-content: start; min-width: 0; }
.mp-medals li b { font-size: 13.5px; line-height: 1.4; }
.mp-medals li small { font-size: 12px; color: var(--ink3); font-weight: 700; }
.mp-medals li .mp-bar { width: 100%; flex: none; }
.mp-medal { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; background: var(--bg2); color: var(--ink3); }
.mp-medal .ic { width: 26px; height: 26px; }
.mp-medals li.is-got { border-color: color-mix(in srgb, var(--c) 45%, var(--line)); background: linear-gradient(180deg, var(--cb), var(--card) 70%); }
.mp-medals li.is-got .mp-medal { background: var(--c); color: #fff; box-shadow: 0 0 0 4px var(--card), 0 0 0 6px color-mix(in srgb, var(--c) 40%, transparent); }
.mp-medals li.is-got .btn { margin-top: 4px; font-size: 13px; padding: 9px 12px; }
.mp-medals .btn .ic { width: 15px; height: 15px; }

/* 修了証の画面 */
.mp-lock { overflow: hidden; }
.mp-dlg { position: fixed; inset: 0; z-index: 200; background: rgba(12, 15, 24, .62); display: grid; place-items: center; padding: 12px; animation: mpFade .2s ease-out; }
@keyframes mpFade { from { opacity: 0; } }
.mp-dlg-in { background: var(--card); border-radius: 20px; width: min(100%, 980px); max-height: calc(100vh - 24px); overflow: auto; padding: 12px 14px 16px; box-shadow: var(--sh2); }
.mp-dlg-hd { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.mp-dlg-hd b { font-size: 15px; }
.mp-sheet { background: #fbf7f0; border-radius: 8px; overflow: hidden; box-shadow: 0 2px 10px rgba(0, 0, 0, .12); }
.mp-sheet svg { display: block; width: 100%; height: auto; }
.mp-dlg-note { text-align: center; }
.mp-dlg-btns { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 14px; }
.mp-dlg-btns .ic { width: 17px; height: 17px; }
.mp .btn-ghost.btn-s, .mp-dlg .btn-ghost.btn-s { box-shadow: inset 0 0 0 1.5px var(--line2); }
.mp .btn-ghost.btn-s:hover, .mp-dlg .btn-ghost.btn-s:hover { box-shadow: inset 0 0 0 1.5px var(--ink3); }

/* 記録の保存 */
.mp-data { display: grid; gap: 14px; }
.mp-privacy { display: flex; gap: 12px; background: var(--card); border: 1px solid var(--line); border-radius: var(--mp-r); padding: 16px; }
.mp-privacy > .ic { width: 30px; height: 30px; color: var(--teal); flex: none; margin-top: 2px; }
.mp-privacy b { font-size: 15.5px; }
.mp-privacy p { margin: 6px 0 6px; font-size: 13.5px; color: var(--ink2); line-height: 1.8; }
.mp-privacy small { font-size: 12px; color: var(--ink3); font-weight: 700; }
.mp-data-btns { display: flex; flex-wrap: wrap; gap: 10px; }
.mp-data-btns .btn { min-height: 46px; }
.mp-data-btns .ic { width: 17px; height: 17px; }
.mp-file { position: relative; cursor: pointer; }
.mp-file input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.mp-file:focus-within { outline: 3px solid var(--blue); outline-offset: 2px; }
.mp-danger { color: var(--ng) !important; }
.mp-confirm-in { background: var(--gold-bg); border-radius: 16px; padding: 14px 16px; }
.mp-confirm-in.is-danger { background: var(--ng-bg); }
.mp-confirm-in p { margin: 0 0 6px; font-size: 14px; line-height: 1.75; }
.mp-confirm-btns { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 10px; }
.mp-btn-danger { background: var(--ng); box-shadow: 0 3px 0 color-mix(in srgb, var(--ng) 65%, #000); }
.mp-status { margin: 0; font-size: 14px; font-weight: 700; color: var(--ok); min-height: 1em; }
.mp-status:empty { display: none; }
.mp-status.is-bad { color: var(--ng); }

/* 広い画面 */
@media (min-width: 600px) {
  .mp-hero { padding: 24px; }
  .mp-stats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .mp-stat { grid-template-columns: 1fr; row-gap: 6px; }
  .mp-stat-ic { grid-row: auto; }
  .mp-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mp-medals { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .mp-steps { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .mp-steps a { grid-template-columns: auto 1fr; grid-template-rows: auto auto auto; align-content: start; height: 100%; }
  .mp-steps a .mp-step-n { grid-row: 1; margin-bottom: 4px; }
  .mp-steps b { grid-column: 1 / -1; }
  .mp-steps small { grid-column: 1 / -1; }
  .mp-steps .ic { display: none; }
  .mp-due { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 900px) {
  .mp-welcome { grid-template-columns: 1fr 1.3fr; align-items: center; padding: 26px; }
  .mp-steps { grid-template-columns: 1fr; }
  .mp-steps a { grid-template-columns: auto 1fr auto; grid-template-rows: auto auto; }
  .mp-steps a .mp-step-n { grid-row: span 2; margin: 0; }
  .mp-steps b, .mp-steps small { grid-column: 2; }
  .mp-steps .ic { display: block; }
  .mp-hero { grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); align-items: center; padding: 28px; }
  .mp-hero-main { grid-template-columns: auto 1fr; justify-items: start; gap: 26px; }
  .mp-big-ring { width: 170px; height: 170px; }
  .mp-hero-msg { text-align: left; }
  .mp-ms { text-align: left; }
  .mp-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mp-stat { grid-template-columns: auto 1fr; }
  .mp-stat-ic { grid-row: span 2; }
  .mp-cal { border-left: 1px solid var(--line); padding-left: 24px; }
  .mp-cal-g, .mp-cal-lg { max-width: 300px; }
  .mp-today { grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr); align-items: start; }
  .mp-today > .mp-due-none { align-self: stretch; }
  .mp-due { grid-template-columns: 1fr; }
  .mp-courses { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
  .mp-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .mp-two { grid-template-columns: 1fr 1fr; align-items: start; }
  .mp-medals { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (min-width: 1100px) {
  .mp-stats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .mp-stat { grid-template-columns: 1fr; }
  .mp-stat-ic { grid-row: auto; }
  .mp-due { grid-template-columns: 1fr 1fr; }
  .mp-medals { grid-template-columns: repeat(6, minmax(0, 1fr)); }
}

/* 印刷：修了証だけを出す */
@media print {
  body.mp-print > *:not(.mp-dlg) { display: none !important; }
  body.mp-print .mp-dlg { position: static; background: none; padding: 0; display: block; }
  body.mp-print .mp-dlg-in { box-shadow: none; padding: 0; max-height: none; overflow: visible; width: 100%; }
  body.mp-print .mp-dlg-hd, body.mp-print .mp-dlg-btns, body.mp-print .mp-dlg-note { display: none !important; }
  body.mp-print .mp-sheet { box-shadow: none; border-radius: 0; }
  @page { size: A4 landscape; margin: 8mm; }
}
