.rest-panel{
  overflow:hidden;
  position:fixed;
  inset:0;
  z-index:40;
  width:100vw;
  min-height:100vh;
  margin:0;
  padding:72px 24px 24px;
  border:0;
  border-radius:0;
  display:grid;
  place-items:center;
  align-content:center;
  text-align:center;
  background-color:#0b0d0a !important;
  background-image:url("./rest-area-bg.webp?v=12") !important;
  background-position:center center !important;
  background-size:cover !important;
  background-repeat:no-repeat !important;
  filter:none !important;
  backdrop-filter:none !important;
  -webkit-backdrop-filter:none !important;
  transform:none !important;
  opacity:1 !important;
}

.rest-panel,
.rest-panel *{
  filter:none !important;
  backdrop-filter:none !important;
  -webkit-backdrop-filter:none !important;
}

.rest-panel::before{content:none !important;}
.rest-panel > *{position:relative;z-index:1}
.rest-panel > .eyebrow,
.rest-panel > h2,
.rest-panel > p{
  position:absolute;
  left:50%;
  width:min(760px,calc(100% - 32px));
  transform:translateX(-50%);
  margin:0;
}
.rest-panel > .eyebrow{top:10vh;}
.rest-panel > h2{top:calc(10vh + 28px);}
.rest-panel > p{top:calc(10vh + 94px);}
.rest-panel h2{font-size:clamp(30px,6vw,52px);margin-bottom:10px}
.rest-panel h2,.rest-panel p,.rest-panel .eyebrow{text-shadow:0 2px 5px rgba(0,0,0,.9)}
.rest-panel button{box-shadow:0 10px 24px rgba(0,0,0,.35)}

.rest-action-grid{display:grid;grid-template-columns:repeat(2,minmax(220px,1fr));gap:16px;width:min(720px,100%);margin:26px auto 0}
.rest-action-button{min-height:116px;padding:18px;display:flex;flex-direction:column;justify-content:center;gap:8px}
.rest-action-button strong{font-size:20px}.rest-action-button span{font-size:13px;font-weight:700;opacity:.82}
.rest-action-button:disabled{opacity:.45;cursor:not-allowed}

.rest-upgrade-shell{width:min(1260px,97vw);height:min(86vh,820px);display:flex;flex-direction:column;align-items:center;gap:18px;padding:24px;border:1px solid rgba(255,255,255,.16);border-radius:24px;background:linear-gradient(180deg,rgba(7,10,7,.9),rgba(16,20,14,.82));box-shadow:0 28px 80px rgba(0,0,0,.58)}
.rest-upgrade-heading{flex:0 0 auto}.rest-upgrade-heading .eyebrow{margin:0 0 6px;font-weight:900;letter-spacing:.18em}.rest-upgrade-heading h2{font-size:clamp(28px,4vw,46px);margin:0 0 6px}.rest-upgrade-heading p{margin:0;opacity:.76}
.rest-upgrade-gallery{width:100%;flex:1;min-height:0;overflow:auto;display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:14px;align-content:start;padding:8px 8px 18px}
.rest-upgrade-card-tile{appearance:none;border:0;background:transparent;padding:0;cursor:pointer;transition:transform .16s ease,opacity .16s ease;min-width:0}
.rest-upgrade-card-tile:hover,.rest-upgrade-card-tile:focus-visible{transform:translateY(-7px) scale(1.025);outline:none}
.rest-upgrade-card-tile.is-disabled{cursor:not-allowed;opacity:.45;filter:grayscale(.65)!important}
.rest-upgrade-back{flex:0 0 auto;min-width:150px}

.rest-card-visual{position:relative;width:min(270px,33vw);aspect-ratio:5/7;border:2px solid rgba(229,199,117,.8);border-radius:20px;overflow:hidden;background:linear-gradient(160deg,#28231a 0%,#11150f 54%,#090b08 100%);box-shadow:0 18px 42px rgba(0,0,0,.52),inset 0 0 0 3px rgba(255,255,255,.045);display:flex;flex-direction:column;text-align:left;color:#f7f0dc}
.rest-card-visual.is-compact{width:100%;max-width:none;aspect-ratio:5/7}
.rest-card-visual.is-upgrade-preview{border-color:#d9b74f;box-shadow:0 20px 50px rgba(0,0,0,.6),0 0 30px rgba(217,183,79,.22),inset 0 0 0 3px rgba(255,233,155,.08)}
.rest-card-art-wrap{height:56%;background:#0b0d0a;overflow:hidden;border-bottom:1px solid rgba(255,255,255,.12)}
.rest-card-art{width:100%;height:100%;object-fit:cover;display:block}
.rest-card-art-fallback{width:100%;height:100%;display:grid;place-items:center;font-weight:900;opacity:.4;letter-spacing:.12em}
.rest-card-copy{flex:1;padding:12px 14px 14px;display:flex;flex-direction:column;gap:4px}
.rest-card-name{font-size:clamp(16px,2.1vw,25px);line-height:1.05;color:#fff}.rest-card-type{font-size:11px;font-weight:900;letter-spacing:.13em;opacity:.6}.rest-card-effect{margin:auto 0 0;font-size:clamp(10px,1.2vw,14px);line-height:1.35;opacity:.9}
.rest-card-cost{position:absolute;left:9px;top:9px;z-index:2;width:42px;height:42px;border-radius:50%;display:grid;place-items:center;font-size:20px;font-weight:1000;background:#efe2ad;color:#17160f;border:2px solid rgba(25,24,14,.7);box-shadow:0 5px 16px rgba(0,0,0,.45)}
.rest-card-upgraded-mark{position:absolute;right:8px;top:10px;z-index:2;padding:4px 7px;border-radius:999px;background:#d9b74f;color:#17130a;font-size:8px;font-weight:1000;letter-spacing:.08em}

.rest-upgrade-compare-backdrop{position:absolute;inset:0;z-index:8;display:grid;place-items:center;padding:28px;background:rgba(3,5,3,.72)}
.rest-upgrade-compare-panel{width:min(980px,94vw);max-height:92vh;overflow:auto;padding:22px 28px 24px;border:1px solid rgba(255,255,255,.18);border-radius:26px;background:radial-gradient(circle at 50% 0%,rgba(91,78,38,.25),rgba(11,14,10,.98) 48%);box-shadow:0 30px 90px rgba(0,0,0,.7)}
.rest-upgrade-compare-title span{font-size:11px;font-weight:1000;letter-spacing:.18em;opacity:.65}.rest-upgrade-compare-title h2{margin:4px 0 3px;font-size:clamp(28px,4vw,44px)}.rest-upgrade-compare-title p{margin:0 auto 16px;max-width:760px;font-weight:800;color:#e4c865}
.rest-upgrade-comparison{display:grid;grid-template-columns:1fr auto 1fr;align-items:center;justify-items:center;gap:24px}
.rest-upgrade-side{display:flex;flex-direction:column;align-items:center;gap:9px}.rest-upgrade-side-label{font-size:12px;font-weight:1000;letter-spacing:.18em;opacity:.62}.rest-upgrade-side-label.is-plus{color:#e6c85d;opacity:1}.rest-upgrade-arrow{font-size:48px;color:#e2c55c;text-shadow:0 0 18px rgba(226,197,92,.4)}
.rest-upgrade-confirm{margin-top:20px;min-width:min(360px,85vw);font-size:18px;font-weight:1000}.rest-upgrade-cancel-hint{margin:10px 0 0;font-size:12px;opacity:.55}

@media (max-width:900px){.rest-panel{padding-inline:14px}.rest-upgrade-shell{height:88vh;padding:16px}.rest-upgrade-gallery{grid-template-columns:repeat(5,minmax(0,1fr));gap:9px}.rest-card-copy{padding:8px}.rest-card-cost{width:34px;height:34px;font-size:16px}.rest-card-effect{font-size:9px}}
@media (max-width:700px){.rest-upgrade-comparison{grid-template-columns:1fr 1fr;gap:10px}.rest-upgrade-arrow{display:none}.rest-card-visual{width:42vw;max-width:210px}.rest-upgrade-compare-panel{padding:18px 12px}.rest-upgrade-gallery{grid-template-columns:repeat(5,minmax(0,1fr));gap:6px}.rest-card-copy{padding:6px}.rest-card-name{font-size:12px}.rest-card-type{font-size:8px}.rest-card-cost{width:28px;height:28px;font-size:13px;left:5px;top:5px}.rest-card-effect{font-size:7px}}
@media (max-width:700px) and (orientation:portrait){
  .rest-panel{padding-top:68px;padding-bottom:70px;overflow-y:auto}
  .rest-panel > .eyebrow{top:8vh;}
  .rest-panel > h2{top:calc(8vh + 26px);}
  .rest-panel > p{top:calc(8vh + 84px);}
  .rest-action-grid{grid-template-columns:1fr;width:min(430px,94vw)}
  .rest-upgrade-shell{width:98vw;height:90vh;padding:12px 6px}.rest-upgrade-gallery{grid-template-columns:repeat(5,minmax(0,1fr));gap:5px}.rest-card-visual{width:43vw}.rest-upgrade-compare-backdrop{padding:10px}.rest-upgrade-comparison{gap:6px}.rest-upgrade-confirm{font-size:16px}
}
