/* Phase 8.8 visual revision: bounded portraits. No quiz or achievement rules change. */
.master88-portrait{display:flex;align-items:center;justify-content:center;min-width:0;min-height:0;width:100%;max-width:100%;padding:10px;overflow:hidden;box-sizing:border-box;isolation:isolate}
.master88-portrait img{display:block;flex:0 1 auto;width:auto;height:auto;min-width:0;min-height:0;max-width:100%;max-height:100%;object-fit:contain;object-position:center;box-sizing:border-box;filter:drop-shadow(0 4px 4px #17384b22)}
.master88-roster-card{display:flex;flex-direction:column;align-items:stretch;min-width:0;overflow:hidden}
.master88-roster-card .master88-portrait{height:218px;flex:none}
.master88-roster-card strong,.master88-roster-card small{min-width:0;overflow-wrap:anywhere}
.master88-tier{min-width:0;overflow:hidden}.master88-tier>div{min-width:0}.master88-tier .master88-portrait{height:220px}
.master88-king-entry{min-width:0;overflow:hidden}.master88-king-entry>div{min-width:0}.master88-king-entry .master88-portrait{width:140px;max-width:40%;flex:none}
.master88-battle .master88-portrait{padding:8px;animation:none!important}
.master88-battle .master88-portrait img{animation:vf88-arrive .55s ease-out 1}
.master88-correct .master88-portrait img{animation:vf88-nod .5s ease-out 1}.master88-incorrect .master88-portrait img{animation:vf88-think .45s ease-out 1}.master88-cleared .master88-portrait img{animation:vf88-win .6s ease-out 1}.master88-retry .master88-portrait img{animation:vf88-nod .5s ease-out 1}.master88-still .master88-portrait img{animation:none!important}
@keyframes vf88-arrive{from{opacity:.4;transform:scale(.92)}to{opacity:1;transform:scale(1)}}@keyframes vf88-nod{0%,100%{transform:rotate(0)}50%{transform:translateY(2px) rotate(2deg)}}@keyframes vf88-think{0%,100%{transform:translateX(0)}35%{transform:translateX(-2px) rotate(-1deg)}70%{transform:translateX(2px) rotate(1deg)}}@keyframes vf88-win{0%{transform:scale(.95)}50%{transform:translateY(-2px) rotate(1deg)}100%{transform:scale(1)}}
@media(max-width:850px){.master88-roster-card .master88-portrait{height:200px}}@media(max-width:500px){.master88-roster-card .master88-portrait{height:164px;padding:8px}.master88-tier{grid-template-columns:110px minmax(0,1fr);gap:12px;padding:14px}.master88-tier .master88-portrait{height:180px;padding:8px}.master88-tier .btn{max-width:100%;white-space:normal;padding:10px;font-size:16px}.master88-king-entry .master88-portrait{width:100px;height:150px;padding:8px}}
@media(prefers-reduced-motion:reduce){.master88-battle .master88-portrait img{animation:none!important}}
/* Bright TOP only; the existing question, collection and record palettes are preserved. */
body.home88-bright{background:radial-gradient(ellipse at 8% 12%,#fffce5 0,transparent 32%),linear-gradient(180deg,#dff5ff 0%,#f1fbff 45%,#eefbea 100%);color:#193f60}
.home88-bright .site-header{background:#effbff;border-bottom:3px solid #b6e5fb}.home88-bright .brand{color:#1268a5}.home88-bright footer{color:#365f77}
.home88{color:#193f60;--home86-muted:#365b6c;--home86-line:#c6e7f7;--home86-green:#126a75}
.home88 .home86-start{background:#fff;border:2px solid #a8daf3;box-shadow:0 6px 0 #b5e2f3,0 10px 24px #347aac0e;border-radius:26px}
.home88 .home86-banner{justify-content:center;text-align:center;min-height:0;padding:20px 26px 25px;background:radial-gradient(ellipse 110px 35px at 6% 15%,#ffffffeb 98%,transparent 100%),radial-gradient(ellipse 120px 35px at 95% 16%,#ffffffeb 98%,transparent 100%),linear-gradient(135deg,#e9f9ff,#fffdf0 70%,#ecfadd);overflow:hidden}
.home88 .home86-start-copy{max-width:760px;position:relative}.home88 .home86-start h1{justify-content:center}.home88 .home86-flower{color:#e5754f}
.home88 .home86-photo{width:25%;opacity:.16}.home88 .home86-photo:after{background:linear-gradient(90deg,#f4fcff,transparent)}
.home88 .home86-subtitle{color:#225477;font-size:18px;margin:9px 0 16px}
.home88 .home86-begin{margin:0 auto;max-width:500px;min-height:84px;border:2px solid #e7a719;background:linear-gradient(#ffe674,#ffd03a);color:#493108;box-shadow:0 6px 0 #dd9b19,0 10px 18px #db9d1522;font-size:24px!important}
.home88 .home86-begin:hover{background:linear-gradient(#ffed94,#ffdb50)}.home88 .home86-begin:active{transform:translateY(3px);box-shadow:0 3px 0 #dd9b19}
.home88 .home86-settings{background:#f5fcff;border-color:#c9e7f4;padding-top:16px;padding-bottom:14px}.home88 .home86-settings select{background:#fff;border:2px solid #acd5ec;color:#214b6b}.home88 .home86-settings label{color:#235877}.home88 .home86-caption{color:#375d70}
.home88-goal{border:2px solid #7fcdb2;background:linear-gradient(130deg,#c9f6df,#effff3);box-shadow:0 5px 0 #96d3bc;color:#1a554a}.home88-goal.master-goal{border:2px solid #e5bb54;background:linear-gradient(130deg,#ffe49a,#fff6d8);box-shadow:0 5px 0 #e4c36e;color:#59451a}.home88-goal:hover{box-shadow:0 6px 0 #7ebfa6,0 10px 20px #407b7020}.home88-goal.master-goal:hover{box-shadow:0 6px 0 #d9b55c,0 10px 20px #a17a3020}.home88-goal small{color:inherit}
.home88 .card88-collect{background:#e7f6ff;border:2px solid #b0dcf4;border-radius:20px}.home88 .card88-collect .btn{background:#faffef;color:#265f45;border:2px solid #8dca9d;box-shadow:0 3px 0 #b2d4ab}.home88 .card88-collect select{background:#fff;border:2px solid #acd5ec;color:#214b6b}
.home88-more-learning,.home88-missions{border:2px solid #b5def3;background:#ffffffed;box-shadow:0 3px 0 #d1e9f6}.home88-more-learning>summary,.home88-missions>summary{color:#255a7e}
.home88-more-learning .home86-secondary{border:2px solid #acd8ee;background:#f5fcff;color:#1d5279;box-shadow:0 3px 0 #c4e3f3;border-radius:14px}.home88-more-learning .home86-secondary:hover:not(:disabled){background:#e1f5ff}.home88-more-learning .home86-secondary:disabled{opacity:.65}.home88-missions>summary span{background:#def4c5;color:#345b20}.home88 .home86-learning{background:#fff;border:2px solid #b5def3;box-shadow:0 3px 0 #d1e9f6}.home88 .home86-stats>div{background:#e8f7ff}.home88 .home86-stats strong{color:#176b9e}.home88 .home86-stats span{color:#345e72}.home88 .home86-text-button{color:#165f88}
.home88 h1,.home88 h2,.home88 strong{font-family:"Hiragino Maru Gothic ProN","Yu Gothic","Noto Sans JP",Meiryo,sans-serif}
@media(max-width:560px){.home88 .home86-banner{padding:16px 15px 22px;min-height:0}.home88 .home86-subtitle{font-size:15px;margin:8px 0 14px}.home88 .home86-begin{font-size:20px!important;min-height:78px}.home88 .home86-photo{width:45%;opacity:.12}.home88 .home86-settings{padding:14px 16px}.home88 .home86-start{border-radius:22px}.home88-goals{gap:12px}}
.home88 .home86-start h1.home88-title{display:block;font-size:0;line-height:1;margin:0 auto 8px;text-align:center}.home88-title-logo{display:block;width:auto;max-width:100%;height:112px;object-fit:contain;margin:0 auto}.home88-title-fallback{font-size:38px;line-height:1.4;color:#145c88}.home88-title-fallback[hidden]{display:none}.home88-title-logo[hidden]{display:none}
@media(max-width:560px){.home88-title-logo{width:100%;height:auto;max-height:108px}.home88-title-fallback{font-size:29px}}
