body.preview-fullscreen{overflow:hidden}
.is-fullscreen-fallback{position:fixed!important;inset:0!important;z-index:1000;box-sizing:border-box;height:100dvh!important;width:100vw!important}
[hidden]{display:none!important}
.preview-page{max-width:1120px;padding:26px 0 40px}
.preview-switch{display:flex;gap:8px;margin-bottom:20px}
.preview-switch button{border:1px solid #cfbd91;border-radius:99px;padding:9px 20px;background:transparent;color:#10223d;font-weight:700;cursor:pointer}
.preview-switch button.active{background:#10223d;color:#f3d78b;border-color:#10223d}
.preview-heading{display:flex;justify-content:space-between;align-items:center;gap:16px;margin-bottom:18px}
.preview-heading h1{font-size:clamp(2rem,4vw,3rem);margin-top:6px}
.preview-heading .eyebrow{font-size:.72rem}
.preview-library{font-size:.85rem;color:#58667a;text-decoration:none}
.slide-player{background:#0d1d34;border:1px solid #c6a75b;border-radius:14px;overflow:hidden;box-shadow:0 10px 30px #10223d12}
.slide-screen{margin:0;position:relative;aspect-ratio:1600/901;background:#10223d;display:flex;align-items:center;justify-content:center;min-height:0}
.slide-screen>img{width:100%;height:100%;object-fit:contain}
.slide-controls{display:flex;align-items:center;justify-content:center;gap:16px;padding:13px 18px;color:#fbf3df}
.slide-controls button,.memory-topline button,.memory-status button,.memory-feedback-wrap>button{border:1px solid #c5a4576b;border-radius:8px;padding:9px 14px;background:#1a3557;color:#fff9ea;font-size:.85rem;font-weight:600;cursor:pointer;min-height:44px}
.slide-controls button:hover:not(:disabled){background:#284970}
.slide-controls button:disabled{opacity:.4;cursor:default}
#slide-counter{min-width:66px;text-align:center;font-variant-numeric:tabular-nums;font-size:.87rem}
#slide-fullscreen{margin-left:auto}
.presentation-caption{display:flex;justify-content:space-between;gap:15px;padding:10px 4px;font-size:.8rem;color:#5f6a7d}
.presentation-caption>span:last-child{color:#798293}
.slide-error{position:absolute;inset:0;background:#10223d;display:flex;align-items:center;justify-content:center;gap:16px;flex-wrap:wrap;color:#fff;padding:20px}
.slide-error button{border:1px solid #d7b15a;border-radius:8px;color:#10223d;background:#d7b15a;padding:8px 14px;cursor:pointer}
.slide-player:is(:fullscreen,.is-fullscreen-fallback){display:flex;flex-direction:column;border:0;border-radius:0;box-shadow:none;width:100%;height:100%;padding:16px;background:#0d1d34}
.slide-player:is(:fullscreen,.is-fullscreen-fallback) .slide-screen{flex:1;aspect-ratio:auto}
.slide-player:is(:fullscreen,.is-fullscreen-fallback) .slide-controls{width:min(1100px,100%);margin-inline:auto;flex-shrink:0}
.slide-player:is(:fullscreen,.is-fullscreen-fallback) .slide-screen img{width:100%;height:100%;max-height:100%;object-fit:contain}
.memory-stage{background:#10223d;border:1px solid #c6a75b;border-radius:14px;padding:22px;color:#fff9ea;box-shadow:0 10px 30px #10223d12}
.memory-settings{display:flex;gap:20px;justify-content:space-between;align-items:end}
.memory-settings>label{display:flex;flex-direction:column;gap:6px;font-size:.77rem;letter-spacing:.06em;color:#ddc783;flex:1;min-width:0}
.memory-settings select{padding:10px 34px 10px 12px;border:1px solid #d7b15a70;border-radius:8px;background:#1a3557;color:#fff9ea;font:inherit;font-size:.9rem;letter-spacing:0;width:100%;min-height:44px}
.memory-difficulties{display:flex;gap:7px}
.memory-difficulties button{border:1px solid #d7b15a65;border-radius:9px;background:#1a3557;color:#fff9ea;padding:9px 12px;cursor:pointer;min-width:110px}
.memory-difficulties strong,.memory-difficulties span{display:block}
.memory-difficulties strong{font-family:Fraunces,Georgia,serif;font-size:1rem;font-weight:500}
.memory-difficulties span{font-size:.68rem;margin-top:3px;color:#dce5f1;white-space:nowrap}
.memory-difficulties button[data-difficulty=ruby] strong{color:#ffc4cb}
.memory-difficulties button[data-difficulty=sapphire] strong{color:#b6d8ff}
.memory-difficulties button[aria-pressed=true]{background:#d7b15a;border-color:#edce80;color:#10223d}
.memory-difficulties button[aria-pressed=true] strong,.memory-difficulties button[aria-pressed=true] span{color:#10223d}
.memory-topline{display:flex;align-items:center;justify-content:flex-end;gap:18px;margin:18px 0 7px}
.memory-topline button{flex-shrink:0}
.memory-tools{display:flex;align-items:center;gap:8px;flex-shrink:0}.memory-tools button{min-width:44px}
#memory-music[aria-pressed=true]{background:#d7b15a;color:#10223d;border-color:#edce80}
.memory-status{display:flex;align-items:center;gap:20px;margin-bottom:16px;font-size:.83rem;color:#dce5f1;font-variant-numeric:tabular-nums}
.memory-status button{margin-left:auto;background:transparent;font-size:.78rem;padding:5px 11px}
.memory-board{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));grid-auto-rows:minmax(152px,1fr);gap:11px;max-width:850px;width:100%;margin-inline:auto}
.memory-clue{min-width:0;border:1px solid #efd89b;border-radius:10px;background:transparent;color:#10223d;padding:0;font:inherit;cursor:pointer;perspective:1000px}
.memory-clue:focus-visible{outline:3px solid #fffaf0;outline-offset:3px}
.memory-clue-inner{display:grid;width:100%;height:100%;transform-style:preserve-3d;transition:transform .45s ease}
.memory-clue.is-open .memory-clue-inner{transform:rotateY(180deg)}
.memory-clue-front,.memory-clue-back{grid-area:1/1;min-width:0;border-radius:9px;padding:16px 12px;text-align:center;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:9px;backface-visibility:hidden;-webkit-backface-visibility:hidden}
.memory-clue-front{background:linear-gradient(145deg,#e9cf86,#cba349)}
.memory-clue-front img{width:45px;height:45px;object-fit:contain;filter:drop-shadow(0 3px 7px #0002)}
.memory-clue-front strong{font-size:.75rem;letter-spacing:.16em}
.memory-clue:hover .memory-clue-front{background:#f1d991}
.memory-clue-back{background:linear-gradient(145deg,#fbefd0,#eddaa7);transform:rotateY(180deg);font-size:clamp(.88rem,1.5vw,1.05rem);font-weight:600;line-height:1.45}
.memory-clue-back b{font-size:1.1rem;line-height:1;color:#8d6824}

.memory-card{position:relative;min-width:0;min-height:112px;border:1px solid #c9aa60;border-radius:10px;background:linear-gradient(145deg,#234367,#142e50);color:#f5dea0;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:16px 12px;cursor:pointer;transition:background .16s ease,border-color .16s ease}
.memory-card:hover:not(:disabled):not(.is-open):not(.is-matched){border-color:#f4d57d;background:#284b72}
.memory-card .memory-number{position:absolute;left:10px;top:6px;color:#c6bb96;font-size:.68rem}
.memory-card img{width:45px;height:45px;object-fit:contain;filter:drop-shadow(0 3px 7px #0003)}
.memory-card .memory-wordmark{font-size:.63rem;letter-spacing:.2em;margin-top:6px}
.memory-card-label{font-size:.61rem;font-weight:700;letter-spacing:.07em;text-transform:uppercase;color:#65718a;margin-bottom:8px}
.memory-card.is-wrong .memory-card-label{color:#a33b50}
.memory-card.is-matched .memory-card-label{color:#21794c}
.memory-card.is-open,.memory-card.is-matched{background:#fffaf0;color:#10223d;font-size:clamp(.88rem,1.5vw,1.05rem);line-height:1.45;font-weight:600;text-align:center}
.memory-card.is-open .memory-number,.memory-card.is-matched .memory-number{color:#677084}
.memory-card.is-wrong{background:#fff3f3;border:2px solid #ff7288;color:#8b1930}
.memory-card.is-matched{background:#e5f6ec;border:2px solid #46bd7a;cursor:default}
.memory-card .memory-check{position:absolute;right:9px;top:6px;color:#167945;font-size:.85rem}
.memory-feedback-wrap{display:flex;align-items:center;gap:14px;justify-content:space-between;margin-top:15px;min-height:48px}
.memory-feedback{margin:0;font-size:.9rem;line-height:1.5;color:#dfebfa}
.memory-feedback.success{color:#b9ffd2}
.memory-feedback.error{color:#ffb8c3}
.memory-feedback-wrap>button{background:#d7b15a;color:#10223d;flex-shrink:0}
.memory-stage:is(:fullscreen,.is-fullscreen-fallback){border:0;border-radius:0;box-shadow:none;width:100%;height:100%;overflow:auto;display:flex;flex-direction:column;padding:24px max(24px,calc((100vw - 1350px)/2))}
.memory-stage:is(:fullscreen,.is-fullscreen-fallback) .memory-board{max-width:1100px;flex:1;min-height:0}
.memory-stage:is(:fullscreen,.is-fullscreen-fallback) .memory-card{font-size:clamp(1rem,1.6vw,1.45rem);min-height:0}
.memory-stage:is(:fullscreen,.is-fullscreen-fallback) .memory-clue-back{font-size:clamp(1rem,1.6vw,1.45rem)}
.memory-stage:is(:fullscreen,.is-fullscreen-fallback) .memory-settings,.memory-stage:is(:fullscreen,.is-fullscreen-fallback) .memory-topline,.memory-stage:is(:fullscreen,.is-fullscreen-fallback) .memory-status,.memory-stage:is(:fullscreen,.is-fullscreen-fallback) .memory-feedback-wrap{flex-shrink:0}
@media(max-width:800px){.memory-settings{align-items:stretch;flex-direction:column;gap:12px}.memory-difficulties button{flex:1;min-width:0}.memory-card{min-height:125px}.preview-library{display:none}}
@media(max-width:560px){.preview-page{padding-top:18px}.slide-controls{gap:7px;padding:8px}.slide-controls button{padding:8px 11px}#slide-fullscreen span{display:none}.presentation-caption>span:last-child{display:none}.memory-stage{padding:14px}.memory-difficulties{gap:6px}.memory-difficulties button{padding:8px 5px}.memory-difficulties span{font-size:.62rem}.memory-board{gap:8px}.memory-card{padding:16px 6px}.memory-card.is-open,.memory-card.is-matched{font-size:clamp(.72rem,2.6vw,.91rem);line-height:1.4}.memory-card-label{font-size:.52rem;letter-spacing:.02em}.memory-clue-front,.memory-clue-back{padding:12px 6px;gap:6px}.memory-clue-back,.memory-stage:is(:fullscreen,.is-fullscreen-fallback) .memory-clue-back{font-size:clamp(.72rem,2.6vw,.91rem);line-height:1.4}.memory-topline{gap:10px}.memory-topline button span{display:none}.memory-feedback-wrap{align-items:start;flex-direction:column;gap:9px}.memory-stage:is(:fullscreen,.is-fullscreen-fallback){padding:12px;overflow:auto}.memory-stage:is(:fullscreen,.is-fullscreen-fallback) .memory-board{flex:0}.memory-status{gap:12px;flex-wrap:wrap}.preview-heading h1{font-size:2rem}}
@media(prefers-reduced-motion:reduce){.memory-card,.memory-clue-inner{transition:none}}

/* Illustrated storybook cards, shared by every topic and difficulty. */
.memory-stage{background:radial-gradient(ellipse at top,#f0dca84d,transparent 65%),#fff8e8;color:#243852;border-color:#b99858;border-radius:8px;box-shadow:inset 0 0 30px #a57d2614,0 12px 30px #4d361c14}
.memory-settings>label,.memory-status{color:#614c2a}
.memory-settings select{background:#fffdf4;color:#243852;border-color:#b99858}
.memory-difficulties button{background:linear-gradient(145deg,#fff7e2,#eddbb3);border-color:#b99858;color:#243852;box-shadow:0 2px 3px #6c4e1f15}
.memory-difficulties span{color:#655537}
.memory-difficulties button[data-difficulty=ruby] strong{color:#9b283d}
.memory-difficulties button[data-difficulty=sapphire] strong{color:#245b94}
.memory-difficulties button[aria-pressed=true]{outline:2px solid #a98039;outline-offset:2px}
.memory-card:not(.is-open):not(.is-matched){background:#f8e8c8 url('/assets/memory-storybook-card.webp') center/100% 100% no-repeat;border:0;border-radius:5px;color:#243852;box-shadow:0 3px 5px #4d361c20}
.memory-card:hover:not(:disabled):not(.is-open):not(.is-matched){background:#f8e8c8 url('/assets/memory-storybook-card.webp') center/100% 100% no-repeat;filter:brightness(1.04)}
.memory-card .memory-number{color:#64502e;left:14px;top:10px}
.memory-card.is-open{background:#fffaf0;border-color:#b99858;font-family:Georgia,'Times New Roman',serif}
.memory-card.is-matched{background:#d5f2df;border:2px solid #278753;color:#145c33;font-family:Georgia,'Times New Roman',serif}
.memory-card.is-wrong{background:#ffe1dd;border:2px solid #c13b32;color:#9e251c}
.memory-clue{border-color:#ac823c;background:#eeddb6;box-shadow:0 3px 5px #4d361c20}
.memory-clue-front{background:#f8e8c8 url('/assets/memory-storybook-card.webp') center/100% 100% no-repeat}
.memory-clue:hover .memory-clue-front{background:#f8e8c8 url('/assets/memory-storybook-card.webp') center/100% 100% no-repeat;filter:brightness(1.04)}
.memory-clue-back{background:#fff5dc;font-family:Georgia,'Times New Roman',serif}
.memory-feedback{color:#5f4e30}.memory-feedback.success{color:#145c33}.memory-feedback.error{color:#9e251c}
.memory-feedback-wrap{background:#eee2c6;border:1px solid #c6a46a60;padding:10px;border-radius:7px}
.memory-card:focus-visible,.memory-clue:focus-visible{outline:3px solid #245b94;outline-offset:3px}
@media(max-width:650px){
 body:has(#memory-panel:not([hidden])) .site-header{display:none}
 body:has(#memory-panel:not([hidden])) .preview-page{padding:10px 0 14px}
 body:has(#memory-panel:not([hidden])) .preview-switch{margin-bottom:8px;gap:6px}
 body:has(#memory-panel:not([hidden])) .preview-switch button{padding:6px 15px;min-height:36px;font-size:13px}
 #memory-panel .preview-heading{margin-bottom:8px}
 #memory-panel .preview-heading h1{font-size:25px;margin:0}
 #memory-panel .preview-heading .eyebrow{font-size:10px}
 .memory-stage{padding:10px;display:grid;grid-template-columns:minmax(0,1fr) auto;grid-template-areas:'settings settings' 'status tools' 'board board' 'feedback feedback';gap:8px}
 .memory-settings{grid-area:settings;gap:8px}
 .memory-settings>label{font-size:0;gap:0}
 .memory-settings select{font-size:13px;min-height:40px;padding:7px 30px 7px 10px}
 .memory-difficulties{gap:7px}
 .memory-difficulties button{padding:6px 3px;min-height:44px}
 .memory-difficulties strong{font-size:14px}
 .memory-difficulties span{font-size:9px;margin-top:2px}
 .memory-topline{grid-area:tools;margin:0;gap:0}
 .memory-tools{gap:4px}
 .memory-tools button{width:40px;min-width:40px;min-height:40px;padding:5px;font-size:17px}
 .memory-tools button span{display:none}
 .memory-status{grid-area:status;gap:7px;margin:0;flex-wrap:nowrap;font-size:10px}
 .memory-status button{min-height:40px;padding:5px 6px;font-size:10px}
 .memory-board{grid-area:board;gap:7px;grid-auto-rows:minmax(104px,14svh)}
 .memory-card{min-height:0;padding:12px 7px}
 .memory-card img,.memory-clue-front img{width:38px;height:38px}
 .memory-card .memory-wordmark{font-size:8px;letter-spacing:.12em}
 .memory-card-label{font-size:9px;letter-spacing:0;margin-bottom:5px}
 .memory-card.is-open,.memory-card.is-matched,.memory-clue-back{font-size:13px;line-height:1.3;overflow-wrap:anywhere}
 .memory-clue-front,.memory-clue-back{padding:10px 7px;gap:5px}
 .memory-clue-front strong{font-size:10px}
 .memory-feedback-wrap{grid-area:feedback;margin:0;min-height:44px;padding:8px}
 .memory-feedback{font-size:12px;line-height:1.35}
 .memory-stage:is(:fullscreen,.is-fullscreen-fallback){display:grid;padding:10px;grid-template-columns:minmax(0,1fr) auto}
 .memory-stage:is(:fullscreen,.is-fullscreen-fallback) .memory-board{flex:initial}
}

/* Keep the restart control legible on the parchment toolbar. */
.memory-status button{color:#243852;background:#f5e7c8;border-color:#b99858}

/* Short sentences take the full card face, without category labels. */
@media(max-width:650px){.memory-card.is-open,.memory-card.is-matched,.memory-clue-back{font-size:15px;line-height:1.25}.memory-card.is-open,.memory-card.is-matched{padding:10px 6px}}
@media(max-width:650px){.memory-clue-back{font-size:14px;line-height:1.2;padding:6px 5px;gap:4px}}


/* Premium navy Memory clue card */
.memory-clue{border:2px solid #d7b15a;border-radius:12px;box-shadow:0 0 0 3px rgba(215,177,90,.10),0 8px 18px rgba(0,0,0,.14)}
.memory-clue-front{background:
 radial-gradient(circle at 50% 22%,rgba(215,177,90,.16),transparent 32%),
 linear-gradient(145deg,#0b1f38,#17395e);color:#f4d77f}
.memory-clue:hover .memory-clue-front{background:linear-gradient(145deg,#102b4b,#1b456f)}
.memory-clue-front img{filter:drop-shadow(0 3px 8px rgba(0,0,0,.35))}
.memory-clue-front strong{font-size:.86rem;color:#f4d77f;letter-spacing:.18em}
.memory-clue-back{background:
 radial-gradient(circle at 85% 12%,rgba(215,177,90,.12),transparent 28%),
 linear-gradient(145deg,#0c2039,#163a5f);color:#fff8e8;border:1px solid rgba(215,177,90,.35);font-size:clamp(.88rem,1.5vw,1.05rem);font-weight:600;line-height:1.42;padding:14px 12px;gap:6px}
.memory-clue-back-label{display:inline-flex;padding:3px 7px;border-radius:999px;background:#d7b15a;color:#10223d;font-size:.53rem;font-weight:900;letter-spacing:.14em}
.memory-clue-back b{color:#efd477;font-size:1rem}
.memory-clue-note{display:block;margin-top:4px;padding-top:8px;border-top:1px solid rgba(215,177,90,.28);color:#cfe0f3;font-size:.72rem;font-weight:500;line-height:1.4}
.memory-stage:is(:fullscreen,.is-fullscreen-fallback) .memory-clue-note{font-size:clamp(.8rem,1.25vw,1.05rem)}
@media(max-width:800px){
  .memory-clue-back{padding:12px 10px}
  .memory-clue-note{font-size:.68rem}
}


/* Final CLUE containment override — keep all explanation inside the card */
.memory-clue{
  position:relative;
  overflow:hidden;
  box-sizing:border-box;
  border:2px solid #d7b15a !important;
  background:#10223d !important;
  border-radius:12px;
}
.memory-clue-inner{
  width:100%;
  height:100%;
  min-height:0;
}
.memory-clue-front,
.memory-clue-back{
  box-sizing:border-box;
  width:100%;
  height:100%;
  min-height:0;
  overflow:hidden;
}
.memory-clue-front{
  background:
    radial-gradient(circle at 50% 22%,rgba(215,177,90,.17),transparent 34%),
    linear-gradient(145deg,#0b1f38,#17395e) !important;
  color:#f4d77f;
}
.memory-clue:hover .memory-clue-front{
  background:linear-gradient(145deg,#102b4b,#1b456f) !important;
}
.memory-clue-back{
  justify-content:center;
  gap:4px;
  padding:8px 8px !important;
  background:
    radial-gradient(circle at 85% 12%,rgba(215,177,90,.12),transparent 28%),
    linear-gradient(145deg,#0c2039,#163a5f) !important;
  color:#fff8e8 !important;
  font-family:"Public Sans",sans-serif !important;
  font-size:clamp(.68rem,1.15vw,.86rem) !important;
  line-height:1.25 !important;
  overflow-wrap:break-word;
  word-break:normal;
}
.memory-clue-back-label{
  flex:0 0 auto;
  margin:0 0 1px;
}
.memory-clue-back>span:not(.memory-clue-note){
  display:block;
  width:100%;
  line-height:1.2;
}
.memory-clue-back b{
  flex:0 0 auto;
  font-size:.86rem !important;
  line-height:1 !important;
  color:#efd477 !important;
}
.memory-clue-note{
  display:block;
  width:100%;
  min-width:0;
  margin:3px 0 0 !important;
  padding:5px 2px 0 !important;
  border-top:1px solid rgba(215,177,90,.32) !important;
  color:#d5e4f4 !important;
  font-size:clamp(.58rem,.9vw,.7rem) !important;
  font-weight:500 !important;
  line-height:1.25 !important;
  overflow-wrap:break-word;
  word-break:normal;
}
.feedback-clue-card{
  box-sizing:border-box;
  max-width:100%;
  overflow:hidden;
}
.feedback-clue-card strong,
.feedback-clue-card p{
  overflow-wrap:break-word;
  word-break:normal;
}

@media(max-width:560px){
  .memory-board{grid-auto-rows:minmax(164px,1fr)}
  .memory-clue-back{padding:7px 6px !important;font-size:.66rem !important;gap:3px}
  .memory-clue-back-label{font-size:.48rem !important;padding:2px 6px !important}
  .memory-clue-note{font-size:.56rem !important;line-height:1.22 !important;padding-top:4px !important}
}


/* Premium Memory difficulty scrolls */
.memory-settings{
  display:grid;
  grid-template-columns:minmax(180px,260px) minmax(0,1fr);
  gap:18px;
  align-items:start;
}
.memory-scroll-grid{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:10px;
  width:100%;
}
.memory-difficulties.memory-scroll-grid button{
  min-width:0;
  padding:34px 5px 9px;
  border:0;
  border-radius:0;
  background:transparent;
  color:#10223d;
}
.memory-difficulty-scroll{
  --tier:#d7b15a;
  --tier-deep:#785414;
  position:relative;
  min-height:230px;
  display:flex;
  flex-direction:column;
  align-items:center;
  cursor:pointer;
  filter:drop-shadow(0 12px 15px rgba(0,0,0,.20));
  transition:transform .16s ease,filter .16s ease;
}
.memory-difficulty-scroll.difficulty-scroll-ruby{--tier:#c93758;--tier-deep:#7b1731}
.memory-difficulty-scroll.difficulty-scroll-sapphire{--tier:#3a88d7;--tier-deep:#164b87}
.memory-difficulty-scroll:hover{transform:translateY(-3px)}
.memory-difficulty-scroll:focus-visible{outline:3px solid #f2d77f;outline-offset:4px;border-radius:20px}
.memory-difficulty-scroll .difficulty-scroll-gem{
  position:absolute;
  z-index:5;
  top:0;
  left:50%;
  width:62px;
  height:62px;
  transform:translateX(-50%);
  display:grid;
  place-items:center;
  border-radius:50%;
  background:radial-gradient(circle,#ffe787 0 17%,#d29d24 18% 52%,#6c490c 73%);
  border:2px solid #ffe99d;
  box-shadow:0 0 0 5px #d7b15a1f,0 7px 14px #0005;
}
.memory-difficulty-scroll.difficulty-scroll-ruby .difficulty-scroll-gem{
  background:radial-gradient(circle,#ff91a6 0 17%,#c83355 18% 52%,#68142c 73%);
  border-color:#ffb0bf;
}
.memory-difficulty-scroll.difficulty-scroll-sapphire .difficulty-scroll-gem{
  background:radial-gradient(circle,#8dccff 0 17%,#367fca 18% 52%,#143f76 73%);
  border-color:#bddfff;
}
.memory-difficulty-scroll .difficulty-scroll-gem:before{
  content:"";
  position:absolute;
  inset:13px;
  transform:rotate(45deg);
  border:1px solid #fff9;
  border-radius:6px;
}
.memory-difficulty-scroll .difficulty-scroll-gem i{
  position:relative;
  z-index:2;
  font-style:normal;
  color:#fff9dc;
  font-size:1rem;
  text-shadow:0 2px 4px #0006;
}
.memory-difficulty-scroll .difficulty-scroll-paper{
  position:relative;
  width:100%;
  min-height:182px;
  display:flex;
  flex-direction:column;
  align-items:center;
  padding:39px 8px 32px;
  border:2px solid #d2a149;
  border-radius:15px;
  background:
    repeating-linear-gradient(0deg,#79511a08 0 1px,transparent 1px 5px),
    linear-gradient(145deg,#fff2c9,#ebcf91);
  box-shadow:inset 0 0 0 3px #fff8dc70;
}
.memory-difficulty-scroll .difficulty-scroll-paper:before,
.memory-difficulty-scroll .difficulty-scroll-paper:after{
  content:"";
  position:absolute;
  left:-5px;right:-5px;
  height:18px;
  border:1px solid #c69339;
  border-radius:50%;
  background:linear-gradient(#f4d683,#a86c1c 48%,#e7bd62 52%,#8c5816);
}
.memory-difficulty-scroll .difficulty-scroll-paper:before{top:-7px}
.memory-difficulty-scroll .difficulty-scroll-paper:after{bottom:-7px}
.memory-difficulty-scroll .difficulty-scroll-paper strong{
  color:var(--tier-deep);
  font-family:Fraunces,Georgia,serif;
  font-size:clamp(.95rem,2vw,1.45rem);
  line-height:1;
  font-weight:650;
}
.memory-difficulty-scroll.difficulty-scroll-sapphire .difficulty-scroll-paper strong{font-size:clamp(.82rem,1.7vw,1.2rem)}
.memory-difficulty-scroll .difficulty-scroll-paper small{
  margin-top:5px;
  color:#382819;
  font-size:.52rem;
  font-weight:900;
  letter-spacing:.12em;
}
.memory-difficulty-scroll .difficulty-scroll-rule{
  width:70%;
  height:1px;
  margin:8px 0 7px;
  background:linear-gradient(90deg,transparent,var(--tier-deep),transparent);
}
.memory-difficulty-scroll .difficulty-scroll-paper em{
  min-height:2.4em;
  color:#5b4932;
  font-family:Fraunces,Georgia,serif;
  font-size:.62rem;
  font-style:normal;
  line-height:1.25;
}
.memory-difficulty-scroll .difficulty-scroll-meta{
  margin-top:auto;
  color:var(--tier-deep);
  font-size:.55rem;
  font-weight:900;
}
.memory-difficulty-scroll .difficulty-scroll-play{
  position:relative;
  z-index:6;
  margin-top:-21px;
  padding:6px 10px;
  border-radius:999px;
  background:#102d4d;
  border:1px solid #d7b15a;
  color:#f1d478;
  font-size:.53rem;
  font-weight:900;
  letter-spacing:.08em;
}
.memory-difficulty-scroll[aria-pressed=true]{
  transform:translateY(-4px);
  filter:drop-shadow(0 0 18px rgba(215,177,90,.30)) drop-shadow(0 14px 17px rgba(0,0,0,.24));
  background:transparent;
  color:#10223d;
}
.memory-difficulty-scroll[aria-pressed=true] .difficulty-scroll-paper{
  box-shadow:inset 0 0 0 3px #fff8dc70,0 0 0 3px rgba(215,177,90,.18);
}
.memory-difficulty-scroll[aria-pressed=true] strong,
.memory-difficulty-scroll[aria-pressed=true] span{color:inherit}
.memory-difficulty-scroll.difficulty-scroll-ruby[aria-pressed=true] .difficulty-scroll-paper strong,
.memory-difficulty-scroll.difficulty-scroll-ruby[aria-pressed=true] .difficulty-scroll-meta{color:#7b1731}
.memory-difficulty-scroll.difficulty-scroll-sapphire[aria-pressed=true] .difficulty-scroll-paper strong,
.memory-difficulty-scroll.difficulty-scroll-sapphire[aria-pressed=true] .difficulty-scroll-meta{color:#164b87}

@media(max-width:800px){
  .memory-settings{grid-template-columns:1fr;gap:12px}
  .memory-settings>label{max-width:none}
  .memory-scroll-grid{gap:5px}
  .memory-difficulty-scroll{min-height:205px;padding-top:31px!important}
  .memory-difficulty-scroll .difficulty-scroll-gem{width:54px;height:54px}
  .memory-difficulty-scroll .difficulty-scroll-paper{min-height:163px;padding:34px 4px 28px}
  .memory-difficulty-scroll .difficulty-scroll-paper strong{font-size:.96rem}
  .memory-difficulty-scroll.difficulty-scroll-sapphire .difficulty-scroll-paper strong{font-size:.72rem}
  .memory-difficulty-scroll .difficulty-scroll-paper em{display:none}
  .memory-difficulty-scroll .difficulty-scroll-meta{font-size:.49rem}
  .memory-difficulty-scroll .difficulty-scroll-play{font-size:.48rem;padding:5px 6px}
}


/* Real premium Memory artwork */
.memory-difficulties.memory-scroll-grid button.memory-difficulty-scroll{
  position:relative;
  min-width:0;
  min-height:0!important;
  aspect-ratio:360/440;
  display:block;
  padding:0!important;
  border:0!important;
  border-radius:0!important;
  background:transparent!important;
  overflow:visible;
  color:#10223d!important;
  filter:drop-shadow(0 13px 17px rgba(0,0,0,.23));
  transition:transform .16s ease,filter .16s ease;
}
.memory-difficulty-scroll:hover{
  transform:translateY(-4px);
  filter:drop-shadow(0 18px 22px rgba(0,0,0,.28));
}
.memory-difficulty-scroll[aria-pressed=true]{
  transform:translateY(-5px);
  background:transparent!important;
  color:#10223d!important;
  filter:drop-shadow(0 0 13px rgba(228,192,93,.36)) drop-shadow(0 16px 20px rgba(0,0,0,.24));
}
.memory-difficulty-art{
  display:block;
  width:100%;
  height:100%;
  object-fit:contain;
  pointer-events:none;
  user-select:none;
}
.memory-difficulty-data{
  position:absolute;
  z-index:5;
  left:12%;
  right:12%;
  top:68%;
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:5px;
  pointer-events:none;
}
.memory-difficulty-data>span{
  min-width:0;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:4px;
  padding:5px 3px;
  border-radius:9px;
  border:1px solid rgba(135,90,28,.22);
  background:rgba(255,248,220,.73);
  box-shadow:inset 0 1px rgba(255,255,255,.65);
}
.memory-difficulty-data b{
  color:#86621e!important;
  font-size:.7rem;
  line-height:1;
}
.memory-difficulty-data strong{
  color:#302216!important;
  font-family:Fraunces,Georgia,serif!important;
  font-size:.57rem!important;
  line-height:1!important;
  white-space:nowrap;
}
.memory-difficulty-scroll .difficulty-scroll-play{
  position:absolute!important;
  z-index:6;
  left:50%;
  bottom:5.5%;
  transform:translateX(-50%);
  margin:0!important;
  min-width:78px;
  padding:6px 9px;
  border-radius:999px;
  border:1px solid #e0bb60;
  background:#102d4d!important;
  color:#f1d478!important;
  font-size:.49rem;
  font-weight:900;
  letter-spacing:.07em;
  pointer-events:none;
}
.memory-difficulty-scroll.difficulty-scroll-ruby .difficulty-scroll-play{
  background:#68152d!important;
  border-color:#df7890;
  color:#ffe6ec!important;
}
.memory-difficulty-scroll.difficulty-scroll-sapphire .difficulty-scroll-play{
  background:#16477f!important;
  border-color:#75b5ed;
  color:#eef8ff!important;
}
.memory-difficulty-scroll .difficulty-scroll-gem,
.memory-difficulty-scroll .difficulty-scroll-paper,
.memory-difficulty-scroll .difficulty-scroll-rule,
.memory-difficulty-scroll .difficulty-scroll-meta{
  display:none!important;
}
@media(max-width:800px){
  .memory-scroll-grid{gap:4px!important}
  .memory-difficulty-data{left:7%;right:7%;gap:2px}
  .memory-difficulty-data>span{padding:4px 2px;border-radius:6px;gap:2px}
  .memory-difficulty-data b{font-size:.5rem!important}
  .memory-difficulty-data strong{font-size:.42rem!important}
  .memory-difficulty-scroll .difficulty-scroll-play{
    min-width:58px;
    padding:5px 5px;
    font-size:.42rem;
  }
}
