#mode-back{display:none;border:1px solid #91ab8d;background:#f8faedc9;color:#3c6451;padding:9px 14px;border-radius:8px;font-size:12px;min-height:40px}
body:not(.game)[data-screen=story] #mode-back{display:block}
body[data-screen=modes] #menu,body[data-screen=modes] #character-stats,body[data-screen=modes] #scene-label,body[data-screen=modes] #mobile-menu-tabs{display:none!important}
body:not(.game)[data-screen=modes] .vignette,body:not(.game)[data-screen=modes][data-map] .vignette{background:linear-gradient(115deg,#f2f7e6ee,#f2f7e6c9 55%,#d7e5c677)}
#mode-home{position:absolute;top:116px;left:50%;transform:translateX(-50%);width:min(1040px,calc(100% - 48px));bottom:22px;overflow-y:auto;scrollbar-width:none;padding:8px 4px 20px}
.mode-hero{text-align:center}.mode-hero>small{font-size:10px;letter-spacing:3px;color:#7e9277}.mode-hero h1{font-size:38px;letter-spacing:1px;margin:12px 0 8px;line-height:1.4}.mode-hero h1 span{color:#648b69}.mode-hero p{font-size:12px;color:#7d8e75;margin:0 0 20px}
.mode-group-switch{display:grid;grid-template-columns:1fr 1fr;gap:6px;padding:5px;background:#dbe6cfbb;border:1px solid #bbccb0;border-radius:13px;max-width:420px;margin:0 auto}
.mode-group-switch button{border:0;border-radius:9px;min-height:49px;background:transparent;color:#72866a;font-size:15px;letter-spacing:2px}.mode-group-switch small{font-size:8px;letter-spacing:1px;margin-left:9px}.mode-group-switch button[aria-pressed=true]{background:#3c6451;color:#fcf7df;box-shadow:0 3px 8px #2a493d22}
#mode-group-description{text-align:center;font-size:12px;color:#7e8f74;margin:14px 0 20px}
#mode-options{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:15px}
.mode-card{display:flex;align-items:center;text-align:left;gap:19px;padding:24px 22px;min-height:145px;border:1px solid #bccbac;border-radius:15px;background:#f8faedbd;color:#466751;position:relative}
.mode-icon{display:grid;place-items:center;flex:0 0 58px;width:58px;height:68px;font-size:36px;color:#97a57e;border:1px solid #c7d2b5;border-radius:30px 30px 10px 10px;background:#e8eedc}
.mode-card-copy{flex:1;min-width:0}.mode-card-copy small{display:block;font-size:8px;letter-spacing:2px;color:#9caa8d}.mode-card-copy b{display:block;font-size:21px;margin:7px 0;letter-spacing:2px}.mode-card-copy>span{display:block;font-size:11px;line-height:1.8;color:#829175}.mode-card em{position:absolute;right:18px;top:14px;font-size:9px;font-style:normal;color:#99a385;letter-spacing:1px}
.mode-card:disabled{cursor:default;background:#f1f4e7a8}.mode-card:disabled .mode-icon{opacity:.65}.mode-available{border:1px solid #7b9a77;background:linear-gradient(120deg,#fbfdeb,#e4edd7);box-shadow:0 5px 14px #69845a16}.mode-available .mode-icon{color:#587d59;background:#e0e9cb}.mode-available em{color:#6d8356}.mode-available:hover{border-color:#426850;box-shadow:0 5px 20px #53754f33}.mode-card:focus-visible,.mode-group-switch button:focus-visible,#mode-back:focus-visible{outline:3px solid #b3a365;outline-offset:3px}
.mode-footnote{text-align:center;font-size:10px;color:#8c9b80;margin:22px 0 0;letter-spacing:1px}
@media(max-width:700px),(max-width:950px) and (max-height:500px){
 #mode-home{top:80px;bottom:max(10px,env(safe-area-inset-bottom));width:calc(100% - 28px);padding-bottom:20px}.mode-hero h1{font-size:27px;letter-spacing:0}.mode-hero>small{font-size:8px;letter-spacing:2px}.mode-hero p{font-size:11px;margin-bottom:15px}
 .mode-group-switch button{min-height:44px;font-size:14px}.mode-group-switch small{font-size:7px;letter-spacing:0;margin-left:6px}#mode-options{grid-template-columns:1fr;gap:10px}.mode-card{min-height:118px;padding:22px 16px 16px;gap:14px}.mode-icon{flex-basis:45px;width:45px;height:55px;font-size:29px}.mode-card-copy b{font-size:18px}.mode-card-copy>span{font-size:10px}.mode-footnote{font-size:9px;line-height:1.8}#mode-group-description{font-size:11px;margin:12px 0 15px}
 body:not(.game)[data-screen=story] .player-profile{display:none}#mode-back{margin-left:auto;padding:7px 10px;font-size:11px}
}
@media(max-width:950px) and (max-height:500px){#mode-home{top:62px}.mode-hero h1{font-size:24px;margin:5px 0}.mode-hero p{display:none}.mode-group-switch{margin-top:10px;max-width:340px}#mode-options{grid-template-columns:repeat(2,minmax(0,1fr))}.mode-card{min-height:115px}.mode-group-switch button{min-height:38px}#mode-group-description{margin:10px 0}.mode-footnote{margin-top:12px}}

/* Title artwork stays exclusive to the mode screen. */
#mode-art {
  display: none;
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: #edf1df url('assets/title/crystal-oath-home-v2.png') center / cover no-repeat;
}
body:not(.game)[data-screen=modes] #mode-art { display: block; }
body:not(.game)[data-screen=modes] .vignette,
body:not(.game)[data-screen=modes][data-map] .vignette {
  background: linear-gradient(90deg, #f8f7e9b3, #f8f7e966 44%, transparent 68%);
}
body[data-screen=modes] #mode-home {
  z-index: 1;
  left: 4.5%;
  transform: none;
  width: min(740px, 53%);
}
body[data-screen=modes] .mode-hero { text-align: left; }
body[data-screen=modes] .mode-group-switch { margin-left: 0; }
body[data-screen=modes] #mode-group-description { text-align: left; }
body[data-screen=modes] .mode-card {
  background: #fbfaeddf;
  backdrop-filter: blur(8px);
  box-shadow: 0 4px 18px #304d3610;
  padding: 24px 16px 18px;
  gap: 12px;
}
body[data-screen=modes] .mode-available {
  background: linear-gradient(120deg, #fffef2f2, #e4edd7e8);
  border-color: #759471;
}
body[data-screen=modes] .mode-icon { flex-basis: 42px; width: 42px; height: 56px; font-size: 29px; }
body[data-screen=modes] .mode-card-copy b { font-size: 19px; }
body[data-screen=modes] .mode-footnote { text-align: left; line-height: 1.8; }
@media (max-width: 1100px) and (min-width: 701px) and (min-height: 501px) {
  body[data-screen=modes] #mode-home { width: 60%; }
  body[data-screen=modes] .mode-icon { display: none; }
}
@media (max-width:700px), (max-width:950px) and (max-height:500px) {
  #mode-art { background-position: 72% center; }
  body:not(.game)[data-screen=modes] .vignette,
  body:not(.game)[data-screen=modes][data-map] .vignette { background: #f7f8e8b8; }
  body[data-screen=modes] #mode-home { left: 14px; width: calc(100% - 28px); }
  body[data-screen=modes] .mode-hero { text-align: center; }
  body[data-screen=modes] .mode-group-switch { margin-left: auto; }
  body[data-screen=modes] #mode-group-description,
  body[data-screen=modes] .mode-footnote { text-align: center; }
}
