/* ハットモ 体験版: the lesson player's screens (a-plan-player.js), in the production look (index.html, a-plan.css, award.css):
   a dark video stage, then the questions and the result on white. On tablets and PCs they open as a rounded theater over a dark scrim. */
.video-wrap,.quiz-wrap,.result-wrap{position:fixed;inset:0;z-index:50}
body.m-overlay{overflow:hidden}

/* video stage */
.video-wrap{background:#0c0d10;color:#fff;overflow:hidden}
#lessonMedia.ap-media{position:absolute;inset:0;width:100%;height:100%;display:block;object-fit:contain;background:#090b0f;z-index:1}
#lessonMedia.ap-media[hidden],#lessonCanvas{display:none}
.video-scene{position:absolute;inset:0;overflow:hidden}
.scene-sky{position:absolute;inset:0;background:linear-gradient(180deg,#20242e 0%,#2a2318 100%)}
.scene-floor{position:absolute;left:0;right:0;bottom:0;height:34%;background:#3a3f49}
.scene-floor::before{content:"";position:absolute;top:0;left:0;right:0;height:10px;background:#d9a514}
.scene-generic .gi{position:absolute;top:34%;left:50%;transform:translate(-50%,-50%);color:rgba(255,255,255,.85)}
.scene-generic .gi svg{width:110px;height:110px;stroke:currentColor;fill:none;stroke-width:1.2;stroke-linecap:round;stroke-linejoin:round}
.danger-flash{position:absolute;inset:0;pointer-events:none}
.danger-label{position:absolute;top:20%;left:50%;transform:translateX(-50%) rotate(-3deg);font-size:28px;font-weight:800;color:#ff6b6b;white-space:nowrap;text-shadow:0 2px 14px rgba(0,0,0,.6)}
.video-top,.video-cap,.video-bottom,.vskip,.ap-ready,.ap-error{z-index:5}
.video-top{position:absolute;top:0;left:0;right:0;padding:16px;display:flex;gap:8px;align-items:center}
.v-badge{font-size:13px;font-weight:600;border-radius:999px;padding:4px 10px}
.v-badge.theme{background:rgba(0,0,0,.6);color:#fff;border:1px solid rgba(255,255,255,.4)}
.vclose{margin-left:auto;min-height:44px;padding:0 16px;border:1px solid rgba(255,255,255,.28);border-radius:999px;background:rgba(255,255,255,.16);color:#fff;font:inherit;font-size:16px;font-weight:700;cursor:pointer}
.vskip{position:absolute;top:76px;right:16px;min-height:44px;padding:0 18px;border:0;border-radius:999px;background:#fff;color:#1F1F1F;font:inherit;font-size:16px;font-weight:700;cursor:pointer}
.vskip[hidden]{display:none}
.video-cap{position:absolute;left:0;right:0;bottom:150px;padding:0 24px;max-width:720px;margin:0 auto}
.video-cap .jp{font-size:20px;font-weight:700;line-height:1.5;color:#fff;text-shadow:0 1px 6px rgba(0,0,0,.8)}
.video-cap .en{font-size:14px;color:rgba(255,255,255,.8);margin-top:8px}
.video-bottom{position:absolute;left:0;right:0;bottom:0;padding:0 24px 24px;max-width:720px;margin:0 auto}
.vprog{height:5px;border-radius:99px;background:rgba(255,255,255,.25);overflow:hidden}
.vprog i{display:block;height:100%;width:0;background:#fff;border-radius:99px}
.ap-ctrl-row{display:flex;align-items:center;gap:16px;margin-top:12px}
.ap-control{min-height:44px;padding:0 18px;border:1px solid rgba(255,255,255,.28);border-radius:999px;background:transparent;color:#fff;font:inherit;font-size:16px;font-weight:700;cursor:pointer}
.ap-control .ico-play{display:none}.ap-control.is-paused .ico-pause{display:none}.ap-control.is-paused .ico-play{display:inline}
.vtime{font-size:14px;color:rgba(255,255,255,.8);font-variant-numeric:tabular-nums}
.vdone-btn{display:none}
.ap-ready,.ap-error{position:absolute;inset:0;display:flex;flex-direction:column;gap:12px;align-items:center;justify-content:center;padding:32px;text-align:center;background:rgba(6,8,12,.9);color:#fff;font-size:16px}
.ap-ready[hidden],.ap-error[hidden]{display:none}
.ap-player-btn{min-height:44px;padding:0 18px;border:0;border-radius:999px;background:#fff;color:#1F1F1F;font:inherit;font-weight:700;cursor:pointer}

/* questions and result (V17: design 09). Green = right, red = a wrong answer only, the main button orange with dark teal text */
.quiz-wrap,.result-wrap{background:#fff;color:#0B2D33;overflow-y:auto;-webkit-overflow-scrolling:touch}
.quiz-wrap[style*="flex"],.result-wrap[style*="flex"]{display:block!important}
.m-col{max-width:520px;margin:0 auto;padding:16px 16px 32px}
.quiz-top{display:flex;align-items:center;justify-content:space-between;gap:8px}
.quiz-no{display:inline-block;padding:4px 14px;border-radius:999px;background:#EEF5F2;font-size:16px;font-weight:800;color:#0B2D33;font-variant-numeric:tabular-nums;white-space:nowrap}
.quiz-prog{display:flex;gap:6px;margin:12px 0 14px}
.quiz-prog i{flex:1;height:8px;border-radius:4px;background:#D3E1DC}
.quiz-prog i.done{background:#0B2D33}
.quiz-q{font-size:24px;font-weight:900;line-height:1.3;margin:0 0 8px;letter-spacing:-.01em}
.ap-quiz-note{font-size:16px;color:#3C575D;line-height:1.6;margin:0 0 14px}
.ap-quiz-note[hidden]{display:none}
.quiz-opts{display:flex;flex-direction:column;gap:8px}
.opt{display:flex;gap:10px;align-items:center;min-height:52px;padding:8px 12px;border:2px solid #D3E1DC;border-radius:14px;background:#fff;color:#0B2D33;font:inherit;font-size:18px;font-weight:800;line-height:1.3;text-align:left;cursor:pointer;transition:border-color 120ms,background-color 120ms}
.opt:hover{border-color:#9DB5AE}
.opt .key{display:grid;place-items:center;width:32px;height:32px;flex:0 0 32px;border:2px solid #0B2D33;border-radius:50%;background:#fff;color:#0B2D33;font-weight:900;line-height:1}
.opt .m-opt-text{flex:1;min-width:0}
.opt.correct,.opt.wrong{opacity:1}
.opt.correct{border-color:#00A651;background:#E4F5EB}
.opt.wrong{border-color:#D93025;background:#FDECEA}
.opt.correct::after,.opt.wrong::after{content:"";flex:0 0 32px;width:32px;height:32px;margin-left:auto;border-radius:50%;background:#00A651 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12.5 4.5 4.5L19 7.5'/%3E%3C/svg%3E") center/20px no-repeat}
.opt.wrong::after{background:#D93025 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3' stroke-linecap='round'%3E%3Cpath d='M7 7l10 10M17 7 7 17'/%3E%3C/svg%3E") center/18px no-repeat}
.opt.dim{opacity:.45}
.opt:disabled{cursor:default;color:#0B2D33}
.quiz-fb{display:none;margin-top:12px;padding:14px;border:2px solid;border-radius:12px;font-size:16px;line-height:1.6}
.quiz-fb.show{display:flex;flex-direction:column;gap:2px;padding-left:56px;position:relative}
.quiz-fb::before{content:"";position:absolute;left:14px;top:14px;width:30px;height:30px}
.quiz-fb.good{border-color:#00A651;background:#E4F5EB;color:#0B2D33}
.quiz-fb.good::before{background:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2300A651' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12.5 4.5 4.5L19 7.5'/%3E%3C/svg%3E") center/contain no-repeat}
.quiz-fb.bad{border-color:#D93025;background:#FDECEA;color:#0B2D33}
.quiz-fb.bad::before{background:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23D93025' stroke-width='3' stroke-linecap='round'%3E%3Cpath d='M6 6l12 12M18 6 6 18'/%3E%3C/svg%3E") center/contain no-repeat}
.quiz-fb .ap-fb-head{display:block;font-size:20px;font-weight:900;line-height:1.3;margin-bottom:2px}
.quiz-fb.good .ap-fb-head{color:#00743A}
.quiz-fb.bad .ap-fb-head{color:#0B2D33}
.quiz-next{display:none;width:100%;min-height:52px;margin-top:16px;padding:0 20px;border:2px solid #FF8A00;border-radius:14px;background:#FF8A00;color:#0B2D33;font:inherit;font-size:18px;font-weight:800;cursor:pointer;box-shadow:0 2px 0 rgba(11,45,51,.25)}
.quiz-next.show{display:flex;align-items:center;justify-content:center;gap:8px}
.quiz-next.show::before{content:"→";font-weight:900}
.result-wrap .m-col{display:flex;flex-direction:column;align-items:center;gap:16px;text-align:center;padding-top:28px}
.result-head{font-size:28px;font-weight:900;line-height:1.3;margin:0;text-align:center}
/* both right: the green check in a ring; on the level-up day it is smaller so the stage leads */
.result-head::before{content:"";display:block;width:120px;height:120px;margin:0 auto 16px;border-radius:50%;background:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 48' fill='none' stroke='%2300A651' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='24' cy='24' r='20' stroke-width='3'/%3E%3Cpath d='M14 25l7 7 13-15' stroke-width='4'/%3E%3C/svg%3E") center/contain no-repeat;filter:drop-shadow(0 4px 10px rgba(0,166,81,.25))}
.result-wrap.is-up .result-head::before{width:72px;height:72px;margin-bottom:12px}
.result-score{display:inline-block;margin:0;padding:4px 14px;border-radius:999px;background:#EEF5F2;color:#0B2D33;font-size:16px;font-weight:800;line-height:1.5}
.result-saved{font-size:16px;color:#0B2D33;font-weight:500;margin:0;text-align:center;line-height:1.6}
.result-saved:empty{display:none}
.result-saved.result-need{color:#0B2D33;font-weight:500}
.result-level{display:flex;flex-direction:column;gap:16px;align-self:stretch}
.result-level:empty{display:none}
.result-wrap .m-btn{align-self:stretch}
/* not 受講済み this time (a wrong answer): a grey "−", the score grey */
.result-wrap.is-not-done .result-head::before{width:120px;height:120px;background:#5d6f72 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3' stroke-linecap='round'%3E%3Cpath d='M7 12h10'/%3E%3C/svg%3E") center/56px no-repeat;filter:none}
.result-wrap.is-partial .result-score{background:#DCE3E2;color:#22373B}
#resultAgain:not([hidden])+#resultHome{margin-top:0}
.result-home::before{content:"";width:22px;height:22px;flex:0 0 22px;background:currentColor;-webkit-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 10.4 12 4l8 6.4V20h-5.6v-5.6H9.6V20H4z'/%3E%3C/svg%3E") center/contain no-repeat;mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 10.4 12 4l8 6.4V20h-5.6v-5.6H9.6V20H4z'/%3E%3C/svg%3E") center/contain no-repeat}

/* tablets and PCs: a rounded theater over a dark scrim */
@media (min-width:601px){
  .video-wrap,.quiz-wrap,.result-wrap{top:50%;left:50%;right:auto;bottom:auto;width:min(480px,92vw);height:min(760px,calc(100vh - 48px));transform:translate(-50%,-50%);border-radius:20px;box-shadow:0 32px 96px rgba(0,0,0,.5),0 0 0 9999px rgba(10,10,12,.86)}
  /* 4: the questions and the result: as tall as what they hold, in the middle of the screen */
  .quiz-wrap,.result-wrap{height:auto;max-height:calc(100vh - 48px)}
}
