.case-builder-module {
  height: auto !important;
  min-height: 492px !important;
  margin: 0 !important;
  padding: 8px 14px 14px !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}
.case-builder-module .event-map-glass {
  width: 100% !important;
  height: auto !important;
  min-height: 472px !important;
  padding: 8px 2px 10px !important;
  overflow: visible !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}
.case-builder-module .map-heading span { display:block; color:#d7b7ea; font:800 8px/1 system-ui,sans-serif; letter-spacing:.16em; }
.case-builder-module .map-heading h1 { margin:6px 0 2px; font-size:clamp(24px,6.8vw,32px); letter-spacing:.04em; }
.case-builder-module .map-heading i { opacity:.72; }
.case-builder-module .ai-disclosure-home { margin:4px 0 13px; color:rgba(255,235,218,.42); font-size:6px; white-space:normal; }
.case-builder-module form { display:grid; gap:8px; }
.scripted-case { display:grid; gap:10px; }
.case-feature {
  display:grid;
  grid-template-columns:39% 1fr;
  min-height:244px;
  overflow:hidden;
  border:1px solid rgba(245,212,168,.28);
  border-radius:22px;
  background:linear-gradient(135deg,rgba(94,55,112,.28),rgba(8,4,18,.18));
  box-shadow:inset 0 1px rgba(255,255,255,.08),0 18px 32px rgba(0,0,0,.2);
  animation:caseFeatureIn .24s ease both;
}
.case-feature-art { position:relative; min-height:244px; background:linear-gradient(180deg,rgba(19,8,32,.02),rgba(13,6,24,.72)),var(--case-art) center/cover no-repeat; }
.case-feature-art::after { content:""; position:absolute; inset:0; background:linear-gradient(90deg,transparent 64%,rgba(26,13,40,.92)); }
.case-feature-art span { position:absolute; z-index:2; top:14px; left:13px; padding:6px 8px; border:1px solid rgba(255,235,200,.45); border-radius:99px; color:#fff0db; background:rgba(12,5,23,.42); font:700 7px/1 system-ui,sans-serif; letter-spacing:.13em; backdrop-filter:blur(8px); }
.case-feature-art i { position:absolute; z-index:2; right:11px; bottom:12px; color:#f0c989; font:13px Georgia,serif; font-style:normal; text-shadow:0 0 12px #f3b8db; }
.case-feature-copy { align-self:end; padding:19px 16px 20px 8px; }
.case-feature-copy small,.selected-case-summary small,.scripted-module-choices small { color:#ddb7e7; font:800 6px/1.2 system-ui,sans-serif; letter-spacing:.16em; }
.case-feature-copy h2,.selected-case-summary h2 { margin:7px 0 11px; color:#fff0d8; font:400 clamp(22px,6vw,29px)/.98 Georgia,serif; }
.case-feature-copy p { margin:0 0 17px; color:rgba(255,241,227,.82); font:italic 13px/1.42 Georgia,serif; }
.case-feature-copy b { color:rgba(237,205,160,.58); font:800 6px/1 system-ui,sans-serif; letter-spacing:.14em; }
.case-picker { display:grid; grid-template-columns:repeat(5,1fr); gap:6px; }
.case-picker>button {
  display:grid; place-items:center;
  gap:4px;
  min-width:0;
  min-height:48px;
  padding:6px 2px;
  border:1px solid rgba(243,210,169,.17);
  border-radius:14px;
  color:#fff0df;
  background:rgba(255,255,255,.025);
  text-align:center;
  cursor:pointer;
  transition:transform .16s ease,border-color .2s ease,background .2s ease,box-shadow .2s ease;
}
.case-picker>button:hover,.case-picker>button:focus-visible { transform:translateY(-2px); outline:0; border-color:rgba(243,210,169,.46); background:rgba(218,166,214,.09); }
.case-picker>button[aria-pressed="true"] { border-color:#f1d39d; background:linear-gradient(145deg,rgba(228,179,220,.2),rgba(255,220,169,.12)); box-shadow:0 0 18px rgba(246,205,143,.13),inset 0 1px rgba(255,255,255,.1); }
.case-picker>button>b { color:#e9c88e; font:11px/1 Georgia,serif; }
.case-picker>button>span { display:block; width:100%; overflow:hidden; color:rgba(255,239,222,.58); font:6px/1.1 system-ui,sans-serif; letter-spacing:.02em; text-overflow:ellipsis; white-space:nowrap; }
.case-picker>button[aria-pressed="true"]>span { color:#fff0dc; }
.evidence-heading { text-align:center; }
.evidence-heading small { color:rgba(229,192,237,.58); font:800 6px/1 system-ui,sans-serif; letter-spacing:.18em; }
.evidence-heading h2 { margin:4px 0 1px; color:#fff0da; font:400 17px/1 Georgia,serif; }
.evidence-picker { grid-template-columns:repeat(2,minmax(0,1fr)); gap:7px; }
.evidence-picker>button {
  position:relative;
  display:block;
  min-height:158px;
  padding:0;
  overflow:hidden;
  border-radius:19px;
  background:radial-gradient(circle at 50% 34%,rgba(192,126,208,.2),transparent 48%),linear-gradient(155deg,rgba(91,53,108,.2),rgba(7,4,15,.42));
  box-shadow:inset 0 1px rgba(255,255,255,.08),0 12px 24px rgba(0,0,0,.16);
}
.evidence-picker>button:hover,.evidence-picker>button:focus-visible { transform:translateY(-3px); }
.evidence-picker>button[aria-pressed="true"] { border-color:#f1d39d; background:radial-gradient(circle at 50% 34%,rgba(222,154,222,.28),transparent 50%),linear-gradient(155deg,rgba(116,68,132,.28),rgba(12,6,23,.5)); box-shadow:0 0 22px rgba(246,205,143,.2),inset 0 1px rgba(255,255,255,.13); }
.evidence-picker>button img { position:absolute; top:7px; left:50%; width:108px; height:108px; object-fit:contain; transform:translateX(-50%) rotate(-2deg); filter:drop-shadow(0 12px 13px rgba(0,0,0,.42)); transition:transform .2s ease,filter .2s ease; }
.evidence-picker>button:nth-child(even) img { transform:translateX(-50%) rotate(2deg); }
.evidence-picker>button[aria-pressed="true"] img { transform:translateX(-50%) translateY(-3px) rotate(0) scale(1.06); filter:drop-shadow(0 12px 16px rgba(0,0,0,.48)) drop-shadow(0 0 12px rgba(237,189,244,.28)); }
.evidence-picker .evidence-number { position:absolute; z-index:4; top:8px; right:8px; display:grid; place-items:center; width:23px; height:23px; border:1px solid rgba(245,217,177,.35); border-radius:50%; color:#e8c68e; background:rgba(11,5,21,.5); font:8px/1 Georgia,serif; backdrop-filter:blur(7px); }
.evidence-picker>button strong { position:absolute; z-index:4; top:10px; left:10px; max-width:90px; overflow:hidden; color:rgba(255,239,223,.7); font:700 6px/1 system-ui,sans-serif; letter-spacing:.08em; text-overflow:ellipsis; text-transform:uppercase; white-space:nowrap; }
.evidence-picker>button em { position:absolute; z-index:5; left:8px; right:8px; bottom:7px; display:-webkit-box; min-height:43px; padding:8px 9px 7px; overflow:hidden; border:1px solid rgba(151,111,83,.25); border-radius:3px; color:#4a304b; background:linear-gradient(145deg,#fff1d9,#ead4bc); box-shadow:0 6px 14px rgba(0,0,0,.28),inset 0 1px rgba(255,255,255,.8); font:italic 9px/1.25 Georgia,serif; text-align:left; transform:rotate(-1.2deg); -webkit-box-orient:vertical; -webkit-line-clamp:3; }
.evidence-picker>button:nth-child(even) em { transform:rotate(1deg); }
.evidence-picker>button em::before { content:""; position:absolute; top:-4px; left:42%; width:25px; height:9px; background:rgba(219,187,151,.72); box-shadow:0 1px 2px rgba(58,32,50,.18); transform:rotate(2deg); }
.evidence-picker>button>i { position:absolute; z-index:6; right:12px; bottom:10px; opacity:0; color:#8e5d6b; font:10px/1 Georgia,serif; font-style:normal; transition:opacity .18s ease; }
.evidence-picker>button[aria-pressed="true"]>i { opacity:1; }
.evidence-picker>.evidence-card {
  position:relative;
  display:grid;
  grid-template-columns:78px minmax(0,1fr);
  align-items:center;
  gap:3px;
  min-height:116px;
  padding:6px 6px 6px 1px;
  overflow:visible;
  border:0;
  border-radius:0;
  background:transparent;
  box-shadow:none;
}
.evidence-picker>.evidence-card:hover,.evidence-picker>.evidence-card:focus-visible { transform:translateY(-2px); background:transparent; }
.evidence-picker>.evidence-card[aria-pressed="true"],.evidence-picker>.evidence-card[aria-current="true"] { border:0; background:radial-gradient(circle at 24% 51%,rgba(237,196,137,.16),transparent 41%); box-shadow:none; }
.evidence-picker>.evidence-card img,.evidence-picker>.evidence-card:nth-child(even) img,.evidence-picker>.evidence-card[aria-pressed="true"] img {
  position:relative;
  top:auto;
  left:auto;
  grid-column:1;
  grid-row:1;
  width:78px;
  height:94px;
  object-fit:contain;
  transform:rotate(-2deg);
  filter:drop-shadow(0 10px 11px rgba(0,0,0,.42));
}
.evidence-picker>.evidence-card:nth-child(even) img { transform:rotate(2deg); }
.evidence-picker>.evidence-card[aria-pressed="true"] img,.evidence-picker>.evidence-card[aria-current="true"] img { transform:translateY(-2px) scale(1.06); filter:drop-shadow(0 11px 13px rgba(0,0,0,.48)) drop-shadow(0 0 10px rgba(237,189,244,.35)); }
.evidence-picker>.evidence-card strong { top:2px; left:2px; max-width:74px; font-size:5px; }
.evidence-picker>.evidence-card em {
  position:relative;
  z-index:5;
  left:auto;
  right:auto;
  bottom:auto;
  grid-column:2;
  grid-row:1;
  display:block;
  min-height:70px;
  padding:14px 8px 8px;
  overflow:visible;
  border:1px solid rgba(151,111,83,.25);
  border-radius:3px;
  color:#4a304b;
  background:linear-gradient(145deg,#fff1d9,#ead4bc);
  box-shadow:0 6px 14px rgba(0,0,0,.28),inset 0 1px rgba(255,255,255,.8);
  font-size:8px;
  line-height:1.28;
  transform:rotate(-1.2deg);
  -webkit-line-clamp:unset;
}
.evidence-picker>.evidence-card:nth-child(even) em { transform:rotate(1deg); }
.evidence-picker>.evidence-card em::before { content:""; position:absolute; top:-4px; left:37%; width:25px; height:9px; background:rgba(219,187,151,.72); box-shadow:0 1px 2px rgba(58,32,50,.18); transform:rotate(2deg); }
.evidence-picker>.evidence-card>i { right:auto; left:61px; bottom:9px; }
.evidence-picker>.evidence-card[aria-current="true"]>i { opacity:1; }
.evidence-picker-locked>.evidence-card { cursor:default; }
.evidence-heading-open h2 { font-size:14px; }
.keepsake-tray { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:5px; margin:0 0 8px; }
.keepsake-tray button { position:relative; display:grid; place-items:center; min-width:0; min-height:76px; padding:3px 1px 13px; border:0; border-radius:14px; color:#fff1dc; background:transparent; cursor:pointer; transition:transform .18s ease,filter .18s ease,background .18s ease; }
.keepsake-tray button:hover,.keepsake-tray button:focus-visible { transform:translateY(-3px); outline:0; background:radial-gradient(circle,rgba(235,190,230,.16),transparent 68%); }
.keepsake-tray button[aria-pressed="true"] { background:radial-gradient(circle,rgba(250,222,164,.22),transparent 66%); filter:drop-shadow(0 0 8px rgba(250,220,170,.42)); }
.keepsake-tray button[aria-pressed="true"]::after { content:"✦"; position:absolute; right:5px; top:5px; color:#f1d296; font:10px/1 Georgia,serif; }
.keepsake-tray img { width:58px; height:58px; object-fit:contain; filter:drop-shadow(0 8px 8px rgba(0,0,0,.38)); }
.keepsake-tray strong { position:absolute; right:0; bottom:1px; left:0; overflow:hidden; color:rgba(255,240,221,.72); font:700 5px/1 system-ui,sans-serif; letter-spacing:.03em; text-overflow:ellipsis; text-transform:uppercase; white-space:nowrap; }
.keepsake-tray.is-open button { opacity:.58; }
.keepsake-tray.is-open button[aria-pressed="true"],.keepsake-tray.is-open button:hover { opacity:1; }
.keepsake-main { position:relative; display:grid; grid-template-columns:43% 1fr; align-items:center; min-height:220px; overflow:visible; }
.keepsake-main-object { position:relative; display:grid; place-items:center; min-height:210px; }
.keepsake-main-object::before { content:""; position:absolute; width:150px; height:150px; border-radius:50%; background:radial-gradient(circle,rgba(241,196,229,.27),rgba(126,77,150,.1) 48%,transparent 70%); filter:blur(2px); }
.keepsake-main-object img { position:relative; z-index:1; width:154px; height:176px; object-fit:contain; filter:drop-shadow(0 18px 18px rgba(0,0,0,.48)) drop-shadow(0 0 14px rgba(239,187,242,.28)); animation:keepsakeFloat 3.5s ease-in-out infinite; }
.keepsake-main-object span { position:absolute; z-index:2; bottom:4px; padding:5px 8px; border:1px solid rgba(243,213,174,.35); border-radius:99px; color:#f0d3a5; background:rgba(12,6,22,.48); font:800 6px/1 system-ui,sans-serif; letter-spacing:.12em; }
.keepsake-main-note { position:relative; margin-right:4px; padding:20px 14px 16px; color:#4b304a; background:linear-gradient(145deg,#fff1d9,#ead4bc); box-shadow:0 13px 25px rgba(0,0,0,.3),inset 0 1px rgba(255,255,255,.85); transform:rotate(1deg); }
.keepsake-main-note::before { content:""; position:absolute; top:-5px; left:38%; width:42px; height:12px; background:rgba(219,187,151,.74); box-shadow:0 1px 2px rgba(58,32,50,.18); transform:rotate(-2deg); }
.keepsake-main-note small { color:#8c6073; font:800 6px/1.2 system-ui,sans-serif; letter-spacing:.12em; }
.keepsake-main-note h2 { margin:6px 0 9px; color:#4a304b; font:400 21px/1 Georgia,serif; }
.keepsake-main-note em { font:italic 11px/1.4 Georgia,serif; }
.keepsake-main-empty { display:grid; grid-template-columns:1fr; place-content:center; min-height:220px; color:rgba(255,238,222,.48); text-align:center; }
.keepsake-main-empty span { color:#dcae69; font:18px/1 Georgia,serif; }
.keepsake-main-empty p { margin:8px 0 0; font:italic 12px/1.5 Georgia,serif; }
.portal-deck-section { display:none !important; }
.keepsake-switch-dialog { width:min(88vw,390px); padding:0; border:1px solid rgba(244,213,174,.42); border-radius:25px; color:#fff0df; background:linear-gradient(150deg,rgba(61,34,79,.98),rgba(15,7,26,.98)); box-shadow:0 28px 70px rgba(0,0,0,.58),inset 0 1px rgba(255,255,255,.14); }
.keepsake-switch-dialog::backdrop { background:rgba(7,3,13,.72); backdrop-filter:blur(8px); }
.keepsake-switch-dialog form { display:grid; justify-items:center; padding:22px; text-align:center; }
.keepsake-switch-dialog img { width:105px; height:105px; object-fit:contain; filter:drop-shadow(0 12px 13px rgba(0,0,0,.42)); }
.keepsake-switch-dialog small { color:#d7b5df; font:800 7px/1 system-ui,sans-serif; letter-spacing:.17em; }
.keepsake-switch-dialog h2 { margin:8px 0 6px; font:400 23px/1.08 Georgia,serif; }
.keepsake-switch-dialog p { margin:0; color:rgba(255,238,224,.66); font:11px/1.5 Georgia,serif; }
.keepsake-switch-dialog div { display:grid; grid-template-columns:1fr 1fr; gap:8px; width:100%; margin-top:18px; }
.keepsake-switch-dialog button { min-height:42px; border:1px solid rgba(246,216,176,.3); border-radius:999px; color:#f9e9d7; background:rgba(255,255,255,.06); font:800 7px/1 system-ui,sans-serif; letter-spacing:.08em; cursor:pointer; }
.keepsake-switch-dialog button[value="confirm"] { color:#35213e; background:linear-gradient(110deg,#f8dfd3,#e8c5ed); }
@keyframes keepsakeFloat { 50% { transform:translateY(-5px) rotate(1deg); } }
.selected-case-summary { display:grid; grid-template-columns:42% 1fr; min-height:190px; overflow:hidden; border:1px solid rgba(239,204,161,.25); border-radius:19px; background:linear-gradient(135deg,rgba(255,235,213,.07),rgba(10,5,22,.38)); box-shadow:inset 0 1px rgba(255,255,255,.08),0 16px 30px rgba(0,0,0,.18); }
.selected-keepsake-visual { position:relative; display:grid; place-items:center; min-height:190px; background:radial-gradient(circle at 50% 43%,rgba(239,184,224,.25),transparent 52%),linear-gradient(155deg,rgba(85,49,102,.2),rgba(8,4,17,.35)); }
.selected-keepsake-visual::after { content:""; position:absolute; inset:0; background:linear-gradient(90deg,transparent 70%,rgba(23,11,36,.72)); pointer-events:none; }
.selected-keepsake-visual img { position:relative; z-index:1; width:136px; height:136px; object-fit:contain; filter:drop-shadow(0 15px 16px rgba(0,0,0,.48)) drop-shadow(0 0 13px rgba(236,187,242,.23)); }
.selected-keepsake-visual span { position:absolute; z-index:2; left:10px; bottom:10px; padding:5px 7px; border:1px solid rgba(244,215,176,.34); border-radius:99px; color:#f0d2a3; background:rgba(10,5,20,.48); font:800 6px/1 system-ui,sans-serif; letter-spacing:.13em; backdrop-filter:blur(7px); }
.selected-keepsake-story { align-self:center; padding:16px 15px 16px 3px; }
.selected-case-summary p { position:relative; margin:8px 0 10px; padding:9px 9px 8px; color:#4a304b; background:linear-gradient(145deg,#fff1d9,#ead4bc); box-shadow:0 7px 15px rgba(0,0,0,.25),inset 0 1px rgba(255,255,255,.8); font:italic 10px/1.35 Georgia,serif; transform:rotate(-.7deg); }
.selected-case-summary p::before { content:""; position:absolute; top:-4px; left:38%; width:29px; height:9px; background:rgba(219,187,151,.72); box-shadow:0 1px 2px rgba(58,32,50,.18); transform:rotate(2deg); }
.selected-case-summary b { color:#e5c49a; font:800 7px/1.3 system-ui,sans-serif; letter-spacing:.1em; }
.case-builder-consent { display:grid; gap:4px; margin-top:1px; }
.case-builder-consent .analytics-confirm { display:none; }
.builder-progress-fallback { display:none; }
.case-active .case-builder-consent { display:none; }
.case-active .case-builder-module .open-case { opacity:.7; }
.game-shell:not(.case-active) .portal-deck-section { display:none; }
.game-shell.case-active .case-builder-module { min-height:250px!important; }
.game-shell.case-active .case-builder-module .event-map-glass { min-height:230px!important; }

.scripted-module-choices {
  position:absolute;
  z-index:25;
  left:12px;
  right:12px;
  bottom:calc(60px + max(4px,env(safe-area-inset-bottom)));
  margin:0;
  padding:11px 12px 12px;
  border:1px solid rgba(239,204,161,.34);
  border-radius:16px;
  background:linear-gradient(120deg,rgba(28,14,45,.94),rgba(73,42,87,.88));
  box-shadow:0 -8px 30px rgba(8,3,17,.3),inset 0 1px rgba(255,255,255,.12);
  backdrop-filter:blur(18px);
}
.scripted-module-choices>p { display:none; }
.issue-selection-prompt { display:grid; grid-template-columns:48px minmax(0,1fr); align-items:center; gap:11px; }
.issue-selection-prompt img {
  width:48px;
  height:48px;
  border:1px solid rgba(246,213,161,.78);
  border-radius:50%;
  object-fit:cover;
  object-position:center 34%;
  background:#102744;
  box-shadow:0 0 0 3px rgba(237,197,142,.1),0 0 18px rgba(122,176,235,.22);
}
.issue-selection-prompt p { margin:0; color:#fff0d9; font:italic 14px/1.25 Georgia,serif; letter-spacing:.01em; }
.scripted-module-choices>div { display:grid; grid-template-columns:1fr; gap:6px; margin-top:8px; counter-reset:storyChoice; }
.scripted-module-choices button { counter-increment:storyChoice; display:grid; grid-template-columns:22px 1fr 12px; align-items:center; gap:8px; min-height:39px; padding:7px 10px; border:1px solid rgba(244,214,167,.25); border-radius:999px; color:#fff3e8; background:linear-gradient(90deg,rgba(125,76,151,.18),rgba(255,255,255,.025)); font:11px/1.2 Georgia,serif; text-align:left; cursor:pointer; transition:transform .16s ease,border-color .16s ease,background .16s ease; }
.scripted-module-choices button::before { content:"0" counter(storyChoice); display:grid; place-items:center; width:20px; height:20px; border:1px solid rgba(242,207,160,.34); border-radius:50%; color:#e7c587; font:7px/1 system-ui,sans-serif; }
.scripted-module-choices button::after { content:"›"; color:#e5c28a; font:18px/1 Georgia,serif; }
.scripted-module-choices button:hover,.scripted-module-choices button:focus-visible { transform:translateX(3px); outline:0; border-color:rgba(244,214,167,.58); background:linear-gradient(90deg,rgba(157,98,181,.3),rgba(255,218,176,.08)); }
.scripted-module-choices button:disabled { opacity:.48; }
.message-strip { display:none!important; }
body:not([data-module="oracle"]) .interaction-stage { bottom:calc(232px + max(4px,env(safe-area-inset-bottom))); }
body:not([data-module="oracle"]) .floating-dialogue { inset:5% 12px 5%; }
@media(max-width:380px) {
  .case-builder-module { min-height:480px!important; }
  .case-feature { grid-template-columns:37% 1fr; min-height:234px; }
  .case-feature-art { min-height:234px; }
  .case-feature-copy { padding-right:12px; }
  .case-feature-copy p { font-size:12px; }
  .scripted-module-choices button { min-height:34px; }
  .issue-selection-prompt { grid-template-columns:42px minmax(0,1fr); gap:9px; }
  .issue-selection-prompt img { width:42px; height:42px; }
  .issue-selection-prompt p { font-size:12.5px; }
  .evidence-picker>.evidence-card { grid-template-columns:70px minmax(0,1fr); min-height:110px; }
  .evidence-picker>.evidence-card img,.evidence-picker>.evidence-card:nth-child(even) img,.evidence-picker>.evidence-card[aria-pressed="true"] img { width:70px; height:86px; }
  .evidence-picker>.evidence-card em { padding-left:7px; padding-right:7px; font-size:7.4px; }
  .selected-case-summary { grid-template-columns:39% 1fr; }
  .selected-keepsake-visual img { width:112px; height:112px; }
  .selected-keepsake-story { padding-right:10px; }
  .keepsake-tray img { width:50px; height:52px; }
  .keepsake-main { grid-template-columns:41% 1fr; min-height:205px; }
  .keepsake-main-object img { width:132px; height:158px; }
  .keepsake-main-note { padding:18px 11px 14px; }
}
@keyframes caseFeatureIn { from { opacity:.5; transform:translateY(4px); } }
