/* Preview the supplied character presentations intact, with the native UI around them. */
html.cw-open, html.cw-open body { overflow: hidden; }
.cw-dialog {
  --cw-ink:#242138; --cw-secondary:#5d5872; --cw-accent:#5043a4; --cw-line:#d6d2e4;
  position:fixed; inset:0; z-index:30000; max-width:none; max-height:none; width:100%; height:100%; height:100dvh; margin:0; padding:0;
  border:0; color:var(--cw-ink); background:radial-gradient(ellipse at 8% 4%,#fbe1d6 0,transparent 45%),radial-gradient(ellipse at 98% 87%,#ebe0f2 0,transparent 48%),#fbf6f2;
  font:normal 16px/1.45 -apple-system,BlinkMacSystemFont,"Segoe UI",Arial,sans-serif; isolation:isolate; color-scheme:light;
}
.cw-dialog:not([open]),.cw-dialog [hidden] { display:none!important; }
.cw-dialog::backdrop { background:#f5f3fa; }
.cw-dialog *, .cw-dialog *::before, .cw-dialog *::after { box-sizing:border-box; }
.cw-dialog button { font:inherit; color:inherit; cursor:pointer; margin:0; }
.cw-dialog :focus-visible { outline:3px solid #6b5dd8; outline-offset:3px; }
.cw-dialog h1:focus,.cw-dialog h2:focus { outline:none; }
.cw-dialog svg { display:block; width:20px; height:20px; flex:none; fill:none; stroke:currentColor; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; }
.cw-dialog .cw-sr { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0; }
.cw-main {
  height:100%; overflow-y:auto; overscroll-behavior:contain;
  padding: max(22px,env(safe-area-inset-top)) max(18px,env(safe-area-inset-right)) max(22px,env(safe-area-inset-bottom)) max(18px,env(safe-area-inset-left));
}
.cw-page { width:min(100%,866px); min-height:100%; margin-inline:auto; display:flex; flex-direction:column; justify-content:center; gap:clamp(16px,2.6vh,28px); }
.cw-header { display:flex; justify-content:space-between; align-items:flex-start; gap:16px; }
.cw-dialog .cw-header h1 { font:650 clamp(30px,4.6vw,54px)/1.04 -apple-system,BlinkMacSystemFont,"Segoe UI",Arial,sans-serif; letter-spacing:-.055em; color:var(--cw-ink); margin:0; }
.cw-dialog .cw-header p { margin:9px 0 0; font-size:clamp(15px,1.6vw,17px); color:var(--cw-secondary); }
.cw-dialog .cw-icon {
  border:1px solid var(--cw-line); border-radius:50%; width:44px; height:44px; flex:0 0 44px; padding:0; display:inline-grid; place-items:center;
  background:rgba(255,255,255,.8); color:var(--cw-ink);
}
.cw-icon:hover { filter:brightness(.97); }
.cw-cards { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:clamp(12px,2.5vw,26px); border:0; margin:0; padding:0; min-width:0; }
.cw-card {
  position:relative; display:grid; grid-template-rows:auto 1fr; gap:1px; min-width:0; padding:6px; border:2px solid #ffffff;
  border-radius:24px; background:#ffffffd9; box-shadow:0 6px 30px #22163810,0 0 0 1px #aba5c44a;
  transition:box-shadow .18s,border-color .18s;
}
.cw-card.cw-selected { border-color:#7569ca; box-shadow:0 5px 28px #4c389326; }
.cw-dialog .cw-preview {
  position:relative; min-width:0; width:100%; height:clamp(200px,49vh,530px); padding:0; border:0; border-radius:16px; overflow:hidden;
  display:grid; place-items:center; isolation:isolate; color:#fff; background:linear-gradient(145deg,#eeedf4,#e0deeb);
}
.cw-preview img { width:100%; height:100%; object-fit:contain; display:block; }
.cw-expand {
  position:absolute; right:9px; bottom:9px; z-index:1; display:flex; align-items:center; gap:7px; height:35px; padding:0 11px;
  border-radius:30px; color:#fff; background:#201e37dd; backdrop-filter:blur(10px); font-size:13px; font-weight:600; line-height:1;
}
.cw-expand svg { width:15px; height:15px; }
.cw-unavailable { position:absolute; inset:auto 10px; color:var(--cw-secondary); font-size:14px; text-align:center; }
.cw-choice { display:flex; position:relative; min-height:60px; align-items:center; justify-content:space-between; gap:8px; padding:8px 10px; cursor:pointer; color:var(--cw-ink); font-weight:650; font-size:20px; letter-spacing:-.025em; }
.cw-choice input { opacity:0; position:absolute; width:1px; height:1px; }
.cw-choice:has(input:focus-visible) { outline:3px solid #6b5dd8; outline-offset:-1px; border-radius:12px; }
.cw-indicator { width:25px; height:25px; border-radius:50%; display:grid; place-items:center; border:1.5px solid #aaa5b9; color:transparent; background:#fff; }
.cw-indicator svg { width:16px; height:16px; stroke-width:2.5; }
.cw-selected .cw-indicator { background:#5548a8; border-color:#5548a8; color:white; }
.cw-footer { display:flex; flex-direction:column; align-items:center; gap:9px; }
.cw-dialog .cw-confirm,.cw-dialog .cw-alt {
  display:inline-flex; align-items:center; justify-content:center; width:min(100%,320px); min-height:49px; padding:11px 23px; border:1px solid transparent; border-radius:15px;
  background:#302944; color:#fff; box-shadow:0 4px 15px #21173219; font-size:16px; font-weight:630;
}
.cw-dialog .cw-confirm:hover:enabled { background:#423851; }
.cw-dialog .cw-confirm:disabled { background:#e5e1ed; color:#6c657e; border-color:#d6d2e3; box-shadow:none; cursor:default; }
.cw-dialog .cw-error { margin:0; color:#8c294b; font-size:14px; text-align:center; }
.cw-viewer { width:100%; height:100%; display:grid; grid-template-rows:auto minmax(0,1fr) auto; background:#14131b; color:#f3eff8; }
.cw-view-head,.cw-view-foot {
  padding:12px max(14px,env(safe-area-inset-right)) 12px max(14px,env(safe-area-inset-left)); display:flex; align-items:center; justify-content:space-between; gap:12px;
}
.cw-view-head { padding-top:max(12px,env(safe-area-inset-top)); }
.cw-dialog .cw-view-head h2 { color:#f3eff8; font:650 clamp(20px,2.6vw,28px)/1.2 -apple-system,BlinkMacSystemFont,"Segoe UI",Arial,sans-serif; letter-spacing:-.035em; margin:0; }
.cw-view-head .cw-icon,.cw-view-foot .cw-icon { color:#eeeaf9; background:#262432; border-color:#494553; }
.cw-stage {
  position:relative; overflow:auto; min-width:0; min-height:0; overscroll-behavior:contain;
  background:#100f15; scrollbar-width:thin; scrollbar-color:#625f70 transparent;
}
.cw-stage-canvas { min-height:100%; min-width:100%; width:max-content; height:max-content; display:grid; justify-items:center; align-items:center; padding:6px; }
.cw-stage img { display:block; max-width:none; max-height:none; object-fit:contain; }
.cw-retry { color:#e5e1ed; text-align:center; }
.cw-dialog .cw-alt { width:auto; background:#383545; border-color:#565261; font-size:14px; }
.cw-view-foot { padding-bottom:max(12px,env(safe-area-inset-bottom)); }
.cw-browse,.cw-zoom { display:flex; align-items:center; gap:10px; }
.cw-zoom { margin-right:auto; padding-left:16px; border-left:1px solid #433f4c; }
.cw-browse span,.cw-zoom span { font-size:14px; min-width:45px; color:#dfdbe9; text-align:center; }
.cw-dialog .cw-icon:disabled { opacity:.45; cursor:default; }
.cw-dialog .cw-view-foot .cw-confirm { width:auto; background:#ece7fb; color:#272238; }
.cw-dialog .cw-view-foot .cw-confirm:hover { background:#f8f6ff; }
@media(max-width:650px) {
  .cw-page { gap:20px; min-height:100%; }
  .cw-header { align-items:flex-start; }
  .cw-dialog .cw-header h1 { max-width:90%; font-size:clamp(31px,7.8vw,44px); }
  .cw-dialog .cw-header p { max-width:32ch; line-height:1.45; }
  .cw-cards { gap:10px; }
  .cw-card { border-radius:17px; padding:4px; }
  .cw-dialog .cw-preview { border-radius:11px; height:clamp(167px,53vw,270px); }
  .cw-expand { right:6px; bottom:6px; width:32px; height:32px; padding:0; justify-content:center; }
  .cw-expand span { display:none; }
  .cw-choice { min-height:50px; padding:6px; font-size:17px; }
  .cw-indicator { width:21px; height:21px; }
  .cw-dialog .cw-confirm { width:100%; }
  .cw-view-foot { display:grid; grid-template-columns:1fr 1fr; gap:10px; }
  .cw-dialog .cw-view-foot .cw-confirm { width:100%; grid-column:1/-1; }
  .cw-zoom { margin:0; padding:0; border:0; justify-self:end; }
  .cw-browse,.cw-zoom { gap:3px; }
}
@media(max-height:500px) and (min-width:550px) {
  .cw-main { padding-top:12px; padding-bottom:12px; }
  .cw-page { gap:10px; }
  .cw-dialog .cw-header h1 { font-size:30px; }
  .cw-dialog .cw-preview { height:clamp(130px,38vh,195px); }
  .cw-choice { min-height:44px; }
}
@media(prefers-reduced-motion:reduce) { .cw-dialog *,.cw-dialog *::before,.cw-dialog *::after { transition:none!important; } }

.cw-description { display:grid; gap:2px; min-width:0; }
.cw-description small { color:var(--cw-secondary); font-size:13px; font-weight:450; line-height:1.3; letter-spacing:normal; }
.cw-choice .cw-indicator { flex:none; }
@media(max-width:650px) { .cw-description small { font-size:12px; } .cw-choice { min-height:66px; } }

.cw-dialog .cw-header h1 { text-wrap:balance; }
.cw-dialog .cw-preview { display:grid; grid-template-rows:minmax(0,1fr) 29px; align-items:stretch; justify-items:stretch; height:clamp(240px,54vh,570px); background:#f4eff2; }
.cw-picture { position:relative; display:grid; align-items:center; min-height:0; min-width:0; }
.cw-picture img { position:absolute; inset:0; width:100%; height:100%; object-fit:contain; }
.cw-expand { position:static; justify-self:stretch; align-self:stretch; justify-content:center; border-radius:0; background:#f0edf3; color:#454051; backdrop-filter:none; width:auto; height:auto; padding:4px; }
.cw-expand span { display:inline; }
.cw-choice { align-items:flex-start; }
.cw-choice .cw-indicator { align-self:center; }
@media(max-width:650px) {
  .cw-dialog .cw-preview { height:clamp(183px,57vw,295px); grid-template-rows:minmax(0,1fr) 23px; }
  .cw-expand { font-size:11px; gap:4px; }
  .cw-expand svg { width:12px; height:12px; }
}
@media(max-height:500px) and (min-width:550px) { .cw-dialog .cw-preview { height:clamp(140px,40vh,210px); } }

/* MurBot welcome — retain the original complete character presentations. */
.cw-dialog {--cw-ink:#583346;--cw-secondary:#795665;--cw-accent:#ac5b75;--cw-line:#edd1d7;background:radial-gradient(ellipse at 0 0,#ffe1bc,transparent 48%),radial-gradient(ellipse at 100% 15%,#dfc1eb,transparent 60%),linear-gradient(160deg,#fff2e8,#f9dde3 65%,#f1deef);}
.cw-dialog .cw-header h1 {font-family:Georgia,serif;letter-spacing:-.045em;color:#753c52;font-weight:600;}
.cw-card {background:linear-gradient(140deg,#fffaf3ee,#fce9ebd9);border-color:#fff8f5;box-shadow:0 8px 25px #a56b8d20,inset 0 1px 1px #fff;}
.cw-card.cw-selected {border-color:#d38c9d;box-shadow:0 0 0 2px #fff8,0 7px 22px #a76e883b;}
.cw-dialog .cw-preview{background:linear-gradient(140deg,#ffede1,#ead6ef)}
.cw-choice .cw-indicator{border-color:#d0a0ac}.cw-selected .cw-indicator{background:#b56480;border-color:#b56480}
.cw-dialog .cw-main .cw-confirm:enabled{background:linear-gradient(145deg,#e59ba4,#b65976);border:1px solid #fff7ed;color:#fff;box-shadow:inset 0 1px 1px #fff8,0 6px 16px #9958754a}
