.mal-root{--mal-ink:#173650;--mal-blue:#2b5678;--mal-gold:#edc866;--mal-border:#d8e7ec;box-sizing:border-box;position:relative;width:100%;height:100vh;height:100dvh;display:flex;flex-direction:column;min-height:0;overflow:hidden;background:#f2f9fa;color:var(--mal-ink);font-family:"BIZ UDGothic","Noto Sans JP",system-ui,sans-serif}
.mal-root *{box-sizing:border-box}
.mal-root [hidden]{display:none!important}
.mal-root button{font:inherit;cursor:pointer}
.mal-root button:focus-visible{outline:3px solid #e4a52d;outline-offset:3px}
.mal-root svg{width:100%;height:100%}
body.admin-bar .mal-root{height:calc(100vh - 32px);height:calc(100dvh - 32px)}
@media(max-width:782px){body.admin-bar .mal-root{height:calc(100vh - 46px);height:calc(100dvh - 46px)}}
.mal-root .mal-bar{flex:none;min-height:62px;padding:7px clamp(12px,2vw,28px);display:flex;align-items:center;gap:14px;background:#213f60;color:#fff;box-shadow:0 2px 10px #17365020;z-index:2}
.mal-root .mal-brand{display:flex;align-items:center;gap:9px;white-space:nowrap;font-size:1.05rem;letter-spacing:.04em}
.mal-root .mal-brand-icon{width:30px;height:30px;color:var(--mal-gold)}
.mal-root .mal-home{flex:1;min-height:0;overflow:hidden;display:flex;flex-direction:column;padding:clamp(9px,2vh,24px) clamp(10px,3vw,40px);background:radial-gradient(ellipse at 10% 0%,#dceff8 0,transparent 40%),radial-gradient(ellipse at 94% 95%,#f6eac8 0,transparent 36%),#f4f9f8}
.mal-root .mal-grid{flex:1;min-height:0;width:100%;max-width:1060px;margin:0 auto;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));grid-template-rows:repeat(2,minmax(0,1fr));gap:clamp(8px,1.5vw,18px)}
.mal-root .mal-card{min-width:0;min-height:0;overflow:hidden;border:1px solid var(--mal-border);border-radius:20px;background:#fff;text-align:left;color:var(--mal-ink);padding:clamp(10px,1.5vw,18px);display:grid;grid-template-rows:minmax(0,1fr);grid-auto-rows:auto;align-items:stretch;box-shadow:0 9px 26px #17365012;transition:transform .18s,box-shadow .18s,border-color .18s}
.mal-root .mal-card:hover:not(:disabled){transform:translateY(-3px);box-shadow:0 15px 32px #17365024;border-color:#83b7cb}
.mal-root .mal-card:disabled{opacity:.6;cursor:not-allowed}
.mal-root .mal-card-image{display:block;min-height:0;width:100%;height:100%;object-fit:cover;border-radius:13px;background:#e7f5fb;pointer-events:none}
.mal-root .mal-card-top{width:100%;display:flex;justify-content:space-between;align-items:center;margin-top:6px}
.mal-root .mal-number{font-size:.8rem;font-weight:900;letter-spacing:.12em;color:#7894a6}
.mal-root .mal-card-name{font-size:clamp(1.15rem,1.9vw,1.45rem);line-height:1.35;font-weight:900;margin:4px 0 5px}
.mal-root .mal-card-summary{color:#5b7589;font-size:.88rem;line-height:1.5;flex:0 0 auto}
.mal-root .mal-card-footer{font-size:.83rem;font-weight:900;color:#23628a;margin-top:5px}
.mal-root .mal-stage{flex:1;min-height:0;position:relative;background:#eaf2f8}
.mal-root .mal-frames,.mal-root .mal-frame{height:100%;width:100%;border:0}
.mal-root .mal-frame{display:block;background:#f7fbfe}
.mal-root .mal-loading{position:absolute;inset:0;display:grid;place-items:center;background:#f3fafc;color:#31536f;font-size:1.1rem;font-weight:800}
.mal-root .mal-switcher{position:absolute;right:14px;bottom:14px;z-index:80}
.mal-root .mal-switch-fab{display:grid;place-items:center;width:56px;height:56px;margin-left:auto;border:1px solid #d4a845;border-radius:50%;background:#f4d579;color:#1c3d5d;box-shadow:0 5px 17px #17365055}
.mal-root .mal-switch-fab svg{width:26px;height:26px}
.mal-root .mal-switch-fab:hover,.mal-root .mal-switch-fab[aria-expanded="true"]{background:#f9e5a9}
.mal-root .mal-switch-menu{position:absolute;bottom:calc(100% + 12px);right:0;width:min(275px,calc(100vw - 28px));max-height:min(65vh,400px);overflow:auto;padding:10px;background:#fff;border:1px solid #bed6e3;border-radius:16px;box-shadow:0 12px 38px #17365044;display:flex;flex-direction:column;gap:5px}
.mal-root .mal-switch-menu button{border:0;border-radius:10px;color:#214460;background:#f5fafc;min-height:43px;padding:8px 10px;text-align:left;display:flex;align-items:center;gap:9px;font-size:.82rem;font-weight:800}
.mal-root .mal-switch-menu button:hover:not(:disabled){background:#e3f0f5}
.mal-root .mal-switch-menu button[aria-pressed="true"]{background:#f8e7b4;color:#173650}
.mal-root .mal-switch-menu button:disabled{opacity:.46;cursor:not-allowed}
.mal-root .mal-menu-home{border-bottom:1px solid #deebf0!important;background:#fff!important}
.mal-root .mal-menu-home svg{width:20px;height:20px}
.mal-root .mal-menu-number{font-size:.7rem;font-weight:900;color:#6994a9}
@media(max-width:650px){
 .mal-root .mal-bar{min-height:54px;gap:8px;padding:6px 10px}
 .mal-root .mal-brand{font-size:.86rem}.mal-root .mal-brand-icon{width:23px;height:23px}
 .mal-root .mal-home{padding:8px 9px}
 .mal-root .mal-grid{grid-template-columns:1fr;grid-template-rows:repeat(4,minmax(0,1fr));gap:7px}
 .mal-root .mal-card{display:flex;flex-direction:row;align-items:center;gap:10px;border-radius:13px;padding:6px}
 .mal-root .mal-card-image{flex:0 0 clamp(82px,33vw,140px);width:clamp(82px,33vw,140px);height:100%;object-fit:contain;border-radius:8px}
 .mal-root .mal-card-top,.mal-root .mal-card-summary,.mal-root .mal-card-footer{display:none}
 .mal-root .mal-card-name{margin:0;font-size:clamp(.82rem,3.2vw,1.05rem);line-height:1.3}
}
@media(max-height:650px){
 .mal-root .mal-card-summary,.mal-root .mal-card-footer,.mal-root .mal-card-top{display:none}
 .mal-root .mal-card-name{font-size:clamp(.84rem,1.6vw,1.1rem);margin-top:4px}
}
@media(prefers-reduced-motion:reduce){.mal-root .mal-card{transition:none}}
