:root{color-scheme:dark;--bg:#100b1d;--panel:#1c142f;--panel2:#261b3c;--stroke:#463654;--muted:#b6a9c9;--text:#f9f5ff;--pink:#fc80b9;--purple:#b383fc;--gold:#ffcf83;--good:#79dbbc;--red:#ff8b9b;--glow:0 24px 70px #0904129c;--gradient:linear-gradient(135deg,#ba89ff,#ff8ebd);font-family:Inter,ui-sans-serif,system-ui,-apple-system,'Segoe UI',sans-serif}*{box-sizing:border-box}html{scroll-behavior:smooth}body{margin:0;color:var(--text);background:radial-gradient(ellipse at 90% 0%,#3a1a57 0%,transparent 40%),radial-gradient(ellipse at 10% 70%,#25143b 0%,transparent 43%),var(--bg);min-height:100vh;font-size:15px}h1,h2,h3,h4,p{margin-top:0}h1{font-size:clamp(2.4rem,6vw,5rem);line-height:1.08;letter-spacing:-.05em}h2{font-size:clamp(1.6rem,3vw,2.3rem);letter-spacing:-.035em}h3{letter-spacing:-.02em}p{line-height:1.62}.muted{color:var(--muted)}.small{font-size:.86rem}.tiny{font-size:.75rem}a{color:#e4b8ff;text-decoration:none}a:hover{text-decoration:underline}button,input,select,textarea{font:inherit}button{cursor:pointer;transition:transform .2s,background .2s,border .2s;border:0}button:hover:not(:disabled){transform:translateY(-1px)}button:disabled{opacity:.48;cursor:not-allowed}button:focus-visible,input:focus-visible,textarea:focus-visible,select:focus-visible,a:focus-visible{outline:3px solid var(--gold);outline-offset:3px}input,select,textarea{color:var(--text);background:#140e23;border:1px solid var(--stroke);padding:12px 14px;border-radius:12px;width:100%;max-width:100%}select option{background:#1c142f}input[type=color]{width:64px;height:46px;padding:4px}input[type=checkbox]{width:auto;accent-color:#bd86ff}input[type=file]{padding:8px}.field{display:grid;gap:7px;font-weight:600;font-size:.9rem}.field small{font-weight:400}.btn{display:inline-flex;align-items:center;justify-content:center;gap:9px;padding:12px 19px;border-radius:13px;white-space:normal;text-align:center;font-weight:700;color:white;background:#35234d;border:1px solid #654c81}.btn:hover{background:#47325f;text-decoration:none}.btn.primary{background:var(--gradient);color:#210f34;border:0;box-shadow:0 8px 26px #9c5bdf3a}.btn.secondary{background:#3b2955;color:#f8efff}.btn.ghost{background:transparent;border:1px solid #594566;color:#e9dcf8}.btn.danger{color:#ffb0bd;border-color:#7e4357}.btn.small{font-size:.83rem;padding:8px 12px;border-radius:10px}.btn.wide{width:100%}.tag{display:inline-flex;align-items:center;gap:6px;background:#503259;color:#ffddf0;padding:6px 11px;border-radius:100px;font-size:.75rem;font-weight:700;letter-spacing:.035em}.tag.good{background:#224c43;color:#b5fce5}.tag.warn{background:#624624;color:#ffe4a7}.tag.draft{background:#3a3150;color:#cab6dd}.tag.bad{background:#612e43;color:#ffd0da}.brand{display:flex;gap:12px;align-items:center;color:white;font-weight:900;font-size:1.17rem;letter-spacing:-.04em}.brand img{height:43px;width:43px}.gradient-text{background:var(--gradient);-webkit-background-clip:text;background-clip:text;color:transparent}.site-header{max-width:1280px;margin:auto;padding:22px 28px;display:flex;justify-content:space-between;align-items:center}.site-header .links{display:flex;align-items:center;gap:12px}.shell{display:grid;grid-template-columns:250px 1fr;min-height:100vh}.sidebar{border-right:1px solid #3e2b50;background:#140e23e6;padding:25px 18px;display:flex;flex-direction:column;gap:28px;position:sticky;top:0;height:100vh}.sidebar-nav{display:grid;gap:9px}.nav-link{display:flex;gap:11px;align-items:center;width:100%;border-radius:13px;padding:13px 14px;font-weight:600;color:#cdbfde;background:transparent;text-align:left}.nav-link.active,.nav-link:hover{background:#39254c;color:white}.sidebar-bottom{margin-top:auto}.main{min-width:0;padding:28px clamp(17px,3vw,50px);max-width:1450px;width:100%;margin:auto}.topline{display:flex;justify-content:space-between;align-items:center;gap:15px;flex-wrap:wrap;margin-bottom:24px}.topline h2{margin:0}.eyebrow{text-transform:uppercase;font-size:.75rem;letter-spacing:.15em;color:#e4a5da;font-weight:800;margin-bottom:12px}.hero{max-width:1240px;margin:45px auto 15px;padding:20px 28px;display:grid;grid-template-columns:1fr .85fr;gap:35px;align-items:center}.hero p{max-width:580px;color:#cfc1db;font-size:1.1rem}.hero-visual{display:grid;place-items:center;min-height:350px;border:1px solid #50326e;border-radius:30px;background:radial-gradient(circle at 50% 35%,#693a8e,#261535 57%,#160f24);position:relative;overflow:hidden;box-shadow:var(--glow)}.hero-visual:before,.hero-visual:after{content:'✦';position:absolute;color:#ffe1b3;font-size:36px;left:18%;top:19%;animation:float 5s ease-in-out infinite}.hero-visual:after{left:78%;top:67%;font-size:24px;animation-delay:-2s}.gift-emoji{font-size:clamp(6rem,15vw,12rem);filter:drop-shadow(0 22px 25px #0501097f);animation:float 3.8s ease-in-out infinite}.container{max-width:1200px;margin:auto;padding:30px 28px}.cards{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:17px}.card{border:1px solid var(--stroke);background:linear-gradient(150deg,#291b3e,#1a132b);border-radius:20px;padding:23px;box-shadow:0 10px 30px #08041122}.card h3{margin-bottom:9px}.feature-icon{display:grid;place-items:center;font-size:2rem;border-radius:15px;height:65px;width:65px;background:#422955;margin-bottom:17px}.price{font-size:2rem;font-weight:900;letter-spacing:-.04em}.muted-line{border-top:1px solid var(--stroke);margin:24px 0}.auth-wrap{max-width:475px;margin:55px auto;padding:0 18px}.auth-card{padding:31px}.stack{display:grid;gap:17px}.row{display:flex;align-items:center;gap:12px;flex-wrap:wrap}.space-between{justify-content:space-between}.section{margin-bottom:32px}.statgrid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:16px;margin:22px 0 30px}.stat .value{font-size:2rem;font-weight:900;letter-spacing:-.05em;margin-top:8px}.create-card{border:1px dashed #ad80cf;background:#281a3f;border-radius:18px;min-height:230px;display:grid;place-items:center;text-align:center;gap:12px;padding:25px}.reveal-card{display:grid;grid-template-rows:115px auto;border:1px solid var(--stroke);border-radius:20px;overflow:hidden;background:#1d152d}.reveal-cover{display:grid;place-items:center;background:radial-gradient(circle at 50% 70%,#714c8d,#302145 80%);font-size:3.4rem}.reveal-info{padding:17px}.reveal-info h3{margin:10px 0 4px;font-size:1.1rem}.reveal-actions{display:flex;gap:8px;flex-wrap:wrap;margin-top:16px}.editor-head{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:15px;padding-bottom:20px;border-bottom:1px solid var(--stroke);margin-bottom:22px}.tab-row{display:flex;gap:8px;overflow-x:auto;padding-bottom:8px;margin-bottom:18px}.tab{padding:11px 17px;background:#241936;color:#cbbde0;border:1px solid #423057;border-radius:12px;white-space:nowrap;font-weight:700}.tab.active{background:#654482;color:white;border-color:#9564bf}.editor-grid{display:grid;grid-template-columns:minmax(0,1fr) minmax(310px,.65fr);gap:22px;align-items:start}.side-preview{position:sticky;top:25px}.preview-phone{width:min(100%,340px);min-height:495px;margin:auto;border:8px solid #5a4670;border-radius:37px;background:#160e27;box-shadow:0 25px 70px #0803138c;overflow:hidden;padding:18px}.preview-phone .recipient-demo{height:380px;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;gap:16px}.scene-card{padding:19px;margin:15px 0}.scene-head{display:flex;gap:10px;align-items:center;justify-content:space-between;margin-bottom:16px}.scene-fields{display:grid;grid-template-columns:1fr 1fr;gap:13px}.scene-fields .full{grid-column:1/-1}.scene-kind{color:#edbaf0;font-weight:800;font-size:.83rem}.scene-actions{display:flex;gap:6px;flex-wrap:wrap}.kind-grid,.theme-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}.kind-btn,.theme-card{border:1px solid var(--stroke);border-radius:16px;background:#2b1e41;padding:14px;text-align:center;color:white}.kind-btn:hover,.theme-card:hover,.theme-card.selected{border-color:#e4acf2;background:#48305f}.kind-btn .emoji{font-size:2.2rem;display:block;margin-bottom:6px}.theme-swatch{height:70px;border-radius:10px;margin-bottom:10px}.theme-card.selected:after{content:'✓ Selected';display:block;color:#b5fce5;font-size:.72rem;margin-top:7px}.form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}.full{grid-column:1/-1}.subhead{margin-top:23px;margin-bottom:15px;font-size:1rem;color:#ecbfed}.hint{font-size:.79rem;color:var(--muted);line-height:1.5}.empty-state{text-align:center;padding:60px 20px}.empty-state .emoji{font-size:4rem}.modal-layer{position:fixed;inset:0;z-index:100;display:grid;place-items:center;padding:16px;background:#0a0716cc;backdrop-filter:blur(10px)}.modal-layer[hidden]{display:none}.modal{width:min(100%,590px);max-height:91vh;overflow-y:auto;border:1px solid #715487;border-radius:24px;padding:25px;background:#241835;box-shadow:0 30px 120px #000a}.modal h2{margin-bottom:12px}.toast{position:fixed;bottom:24px;right:24px;z-index:200;background:#47325e;color:white;padding:15px 22px;border-radius:15px;box-shadow:var(--glow);max-width:380px;opacity:0;pointer-events:none;transform:translateY(20px);transition:all .3s}.toast.show{opacity:1;transform:translateY(0)}.loading{min-height:70vh;display:flex;align-items:center;justify-content:center;gap:14px;color:#dcc5eb}.loader{border:4px solid #563c66;border-top-color:#efb2ff;border-radius:50%;width:26px;height:26px;animation:spin 1s linear infinite}.demo-banner{background:#553743;padding:11px 18px;text-align:center;font-size:.85rem;color:#ffe4e4;border-bottom:1px solid #946577}.public-page{min-height:100vh;display:flex;flex-direction:column;align-items:center;padding:24px 12px 38px;background:radial-gradient(circle at 50% 15%,var(--accent-bg,#3f225a),#120b21 63%)}.public-top{width:100%;max-width:600px;display:flex;justify-content:space-between;align-items:center;margin-bottom:20px}.public-stage{width:min(100%,560px);min-height:610px;border:1px solid #a77db25c;border-radius:30px;background:linear-gradient(155deg,#48305baa,#160f26 55%,#211431);padding:32px clamp(15px,4vw,38px);box-shadow:0 20px 100px #0008;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;position:relative;overflow:hidden}.public-stage:before{content:'✦';color:#dcb5ff66;position:absolute;left:12%;top:12%;font-size:70px;pointer-events:none}.public-stage h1{font-size:clamp(1.9rem,7vw,3.6rem);margin:15px 0}.public-stage p{font-size:1.1rem;max-width:420px;color:#e7d9ed;white-space:pre-wrap}.big-symbol{font-size:clamp(5rem,15vw,9rem);line-height:1.1;filter:drop-shadow(0 25px 24px #04010666);animation:float 4.1s ease-in-out infinite}.reveal-progress{display:flex;gap:6px;width:100%;max-width:480px;margin:0 auto 20px}.reveal-progress span{height:5px;flex:1;background:#655078;border-radius:9px}.reveal-progress span.passed{background:var(--gradient)}.stage-controls{margin-top:20px;display:flex;gap:12px;justify-content:center;flex-wrap:wrap}.stage-image{max-width:100%;max-height:320px;border-radius:15px;box-shadow:0 18px 38px #0c081c88}.stage-video{max-width:100%;max-height:330px;border-radius:15px}.scratch-box{width:100%;max-width:400px;height:180px;position:relative;border-radius:20px;overflow:hidden;background:linear-gradient(135deg,#efacde,#9d7adc);color:#28182e;display:grid;place-items:center;margin:15px auto}.scratch-box canvas{position:absolute;inset:0;width:100%;height:100%;touch-action:none;cursor:crosshair}.clue-input{max-width:300px}.choice-grid{display:grid;gap:9px;width:min(100%,350px)}.choice-grid button{white-space:normal}.reaction-row{display:flex;gap:9px;justify-content:center;flex-wrap:wrap}.reaction{font-size:1.5rem;background:#38224d;padding:10px 16px;border-radius:13px}.confetti{position:absolute;inset:0;pointer-events:none;overflow:hidden}.confetti span{position:absolute;width:8px;height:16px;background:var(--color);left:var(--x);top:-25px;transform:rotate(var(--angle));animation:confetti-drop var(--speed) ease-in forwards}.intro-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px}.legal-notice{padding:14px;border:1px solid #6e4c5e;border-radius:13px;background:#452b3d;color:#ffe4ed;font-size:.9rem}.success-notice{border:1px solid #3f876f;border-radius:13px;background:#213e37;color:#c1ffeb;padding:14px}.footer{text-align:center;color:#aa97b6;font-size:.82rem;margin:55px auto 30px;padding:0 24px}.home-features{display:grid;grid-template-columns:repeat(3,1fr);gap:18px}.home-section{max-width:1240px;margin:55px auto;padding:0 28px}.how-step{display:flex;gap:14px;align-items:start}.how-number{display:grid;place-items:center;border-radius:50%;min-width:43px;height:43px;background:#4c315f;font-weight:900;color:#ffc9ed}kbd{background:#2f223e;border:1px solid var(--stroke);padding:2px 5px;border-radius:5px} .no-print{}@keyframes float{0%,100%{transform:translateY(0) rotate(-3deg)}50%{transform:translateY(-13px) rotate(3deg)}}@keyframes spin{to{transform:rotate(360deg)}}@keyframes confetti-drop{to{top:110%;transform:rotate(690deg)}}@media(max-width:1100px){.cards{grid-template-columns:repeat(2,minmax(0,1fr))}.editor-grid{grid-template-columns:1fr}.side-preview{position:static;display:none}.kind-grid,.theme-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}@media(max-width:760px){.hero{grid-template-columns:1fr;text-align:center;margin-top:15px}.hero p{margin:auto}.hero .row{justify-content:center}.hero-visual{min-height:240px}.shell{grid-template-columns:1fr}.sidebar{position:relative;height:auto;padding:13px 16px;flex-direction:row;justify-content:space-between;align-items:center;gap:10px}.sidebar .brand{font-size:.93rem}.sidebar .brand img{height:33px;width:33px}.sidebar-nav{display:flex;overflow-x:auto;gap:5px}.nav-link{padding:10px 12px;width:auto;font-size:.83rem;white-space:nowrap}.sidebar-bottom{display:none}.main{padding:18px 14px}.statgrid{grid-template-columns:repeat(2,1fr)}.form-grid,.intro-grid{grid-template-columns:1fr}.full{grid-column:1}.cards,.home-features{grid-template-columns:1fr}.kind-grid,.theme-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.scene-fields{grid-template-columns:1fr}.scene-fields .full{grid-column:1}.site-header{padding:16px}.public-stage{min-height:500px;padding:25px 18px}.site-header .links .hide-mobile{display:none}}@media(max-width:390px){.sidebar{display:block}.sidebar-nav{margin-top:12px}.tab{padding:9px 12px}.public-stage{padding:17px 12px}.hero{padding:12px}.kind-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(prefers-reduced-motion:reduce){*,*:before,*:after{animation:none!important;transition:none!important;scroll-behavior:auto!important}}@media print{.no-print,.sidebar,.site-header,.stage-controls,.demo-banner{display:none!important}body{background:white;color:black}}

/* Accessible, always-visible controls for creator-only preview mode. */
.preview-toolbar{position:fixed;z-index:90;top:12px;right:16px;max-width:calc(100vw - 32px);display:flex;align-items:center;gap:12px;padding:8px 9px 8px 16px;border:1px solid #9d78bb;border-radius:17px;background:#241835f5;box-shadow:0 10px 32px #07030d9c;backdrop-filter:blur(10px)}
.preview-toolbar .btn{min-height:44px;white-space:nowrap}
.preview-label{font-weight:800;color:#efc9fa;font-size:.85rem;white-space:nowrap}
.public-page.preview-player{padding-top:86px}
.player-feedback{margin:20px auto 0;padding:13px 17px;border-radius:14px;max-width:420px;font-size:.92rem;line-height:1.55}
.player-feedback[hidden]{display:none}
.player-feedback.success{color:#d5ffef;background:#183e35;border:1px solid #55b79b}
.player-feedback.preview{color:#ffe7b2;background:#3d2e21;border:1px solid #c69d60}
.feedback-confirmation{text-align:center;padding:8px 2px}
.feedback-confirmation h2{margin:10px 0 12px}
.feedback-confirmation p{max-width:490px;margin:0 auto 23px;line-height:1.65;color:#e5d6ed}
.feedback-confirmation-icon{margin:auto;display:grid;place-items:center;width:66px;height:66px;border-radius:50%;background:#264a3e;color:#c6ffe9;font-size:2.2rem;font-weight:900}
.form-error{color:#ffd2d6;padding:12px;border:1px solid #d67b88;background:#45212d;border-radius:11px}
@media(max-width:600px){.preview-toolbar{top:auto;bottom:12px;left:12px;right:12px;justify-content:space-between;max-width:none}.preview-toolbar .btn{flex:1}.preview-label{font-size:.75rem}.public-page.preview-player{padding-top:27px;padding-bottom:110px}}

/* SECRET2REVEAL_COMPACT_MEDIA_FRAMES_V2_BEGIN */
/* Compact, matching photo and video frames. No stretching, cropping or upscaling. */
.public-stage > .stage-image,
.public-stage > .stage-video {
  display: block;
  box-sizing: border-box;
  width: min(100%, 240px);
  height: 220px;
  min-width: 0;
  max-width: 100%;
  max-height: none;
  flex: 0 0 auto;
  margin: 12px auto 0;
  border: 1px solid #735484;
  border-radius: 16px;
  background: #130c22;
  box-shadow: 0 10px 24px #09041377;
  object-position: center center;
}
/* scale-down means a low-resolution photo is NEVER enlarged beyond its actual size. */
.public-stage > .stage-image {
  padding: 8px;
  object-fit: scale-down;
}
/* Keep video proportional and preserve the browser's playback controls. */
.public-stage > .stage-video {
  padding: 0;
  object-fit: contain;
}
@media (max-width: 600px) {
  .public-stage > .stage-image,
  .public-stage > .stage-video {
    width: min(100%, 220px);
    height: 210px;
  }
}
/* SECRET2REVEAL_COMPACT_MEDIA_FRAMES_V2_END */

/* SECRET2REVEAL_CLEAN_AUTOMATIC_GALLERY_V1_BEGIN */
/* Unified, uncluttered gallery in preview and published recipient pages. */
.sr-gallery {
  display:flex; flex-direction:column; align-items:center; justify-content:center;
  width:100%; max-width:500px; min-width:0; margin:14px auto 6px; gap:11px;
}
.sr-gallery-frame {
  display:block; box-sizing:border-box; width:240px; height:220px;
  min-width:0; max-width:100%; max-height:none;
  border:1px solid #735484; border-radius:16px; background:#130c22;
  box-shadow:0 10px 24px #09041377; object-position:center;
}
.sr-gallery-photo { padding:8px; object-fit:scale-down; }
.sr-gallery-video { padding:0; object-fit:contain; }
.sr-gallery-pair {
  display:grid; grid-template-columns:repeat(2,minmax(0,1fr));
  align-items:center; justify-items:center; gap:12px; max-width:492px;
}
.sr-gallery-pair > .sr-gallery-frame { width:100%; max-width:240px; }
.sr-gallery-current { display:flex; justify-content:center; width:100%; min-width:0; }
.sr-gallery-controls { display:flex; width:100%; align-items:center; justify-content:center; flex-wrap:wrap; gap:9px; }
.sr-gallery-controls .btn { min-width:104px; }
.sr-gallery-count {font-weight:750; font-size:.85rem; color:#e7d3ff; white-space:nowrap; }
.sr-gallery-dots { display:flex; align-items:center; justify-content:center; gap:5px; flex-wrap:wrap; max-width:200px; }
.sr-gallery-dots span { width:6px; height:6px; border-radius:50%; background:#78618a; }
.sr-gallery-dots span.current { background:#ffacd8; width:9px; height:9px; }
.sr-creator-media {grid-column:1/-1; width:100%; min-width:0; padding:14px; border-radius:14px; border:1px solid #6b5078; background:#211630;}
.sr-media-upload-actions {align-items:center; flex-wrap:wrap; gap:9px;}
.sr-media-total {color:#cab6d5; font-size:.82rem; margin-left:auto;}
.sr-media-edit-list {display:grid; gap:9px; margin-top:14px;}
.sr-media-edit-row {display:flex; flex-wrap:wrap; gap:9px; align-items:center; border:1px solid #5c456b; padding:9px; border-radius:13px; background:#2b1d3b; min-width:0;}
.sr-media-edit-thumb { width:56px; height:54px; flex:0 0 56px; border-radius:9px; background:#160f21; display:grid; place-items:center; overflow:hidden;}
.sr-media-edit-thumb img { width:100%; height:100%; object-fit:scale-down;}
.sr-media-edit-thumb span {font-size:1.7rem;}
.sr-media-edit-info {display:flex; flex-direction:column; gap:2px; min-width:65px; flex:1;}
.sr-media-edit-buttons {display:flex; flex-wrap:wrap; gap:5px; align-items:center;}
.sr-media-edit-buttons .btn {padding:7px 10px;}
.sr-audio-area { display:flex; align-items:center; flex-wrap:wrap; gap:9px; margin-top:12px; padding-top:11px; border-top:1px solid #604c6f; }
@media(max-width:600px){
  .sr-gallery-frame{width:min(100%,220px);height:210px;}
  .sr-gallery-pair{grid-template-columns:minmax(0,1fr);gap:12px;}
  .sr-gallery-pair > .sr-gallery-frame{width:min(100%,220px);}
  .sr-media-edit-row{gap:8px;}
  .sr-media-edit-info{flex:1;}
  .sr-media-edit-buttons{width:100%;justify-content:flex-start;}
  .sr-gallery-controls{gap:6px;}
}
/* SECRET2REVEAL_CLEAN_AUTOMATIC_GALLERY_V1_END */

/* SECRET2REVEAL_SAFE_ACTIONS_V1_BEGIN - Uses existing purple and pink palette. */
.safety-summary{background:#170f25;border:1px solid #76558b;border-radius:15px;padding:16px 18px;display:grid;gap:5px;margin:16px 0;overflow-wrap:anywhere}
.safety-summary strong{font-size:1.05rem;color:#fff4ff}
.safety-title-label{font-size:.77rem;font-weight:800;letter-spacing:.09em;text-transform:uppercase;color:#e7b3ea}
.safety-divider{height:1px;background:#634a76;margin:9px 0}
.safety-note{border-left:3px solid #ee9bd5;background:#301c42;border-radius:8px;padding:11px 13px;color:#f5e6fa;line-height:1.5;font-size:.9rem}
.safety-check{display:flex;align-items:flex-start;gap:10px;margin:17px 0;color:#f6e7fb;font-size:.94rem;cursor:pointer}
.safety-check input{accent-color:#da91eb;width:19px;height:19px;flex:0 0 19px;margin-top:1px}
.safety-buttons{justify-content:flex-end;gap:12px;flex-wrap:wrap}
.safety-buttons button:disabled{opacity:.45;cursor:not-allowed}
.sr-archive-section{margin-top:28px}
.sr-archive-list{display:grid;gap:10px}
.sr-archive-item{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:13px;border:1px solid #654674;background:#1e142c;border-radius:12px}
@media(max-width:600px){.safety-buttons{display:grid;grid-template-columns:1fr}.safety-buttons .btn{width:100%}.sr-archive-item{align-items:flex-start;flex-direction:column}.sr-archive-item .btn{width:100%}}
/* SECRET2REVEAL_SAFE_ACTIONS_V1_END */


/* SECRET2REVEAL_MOBILE_LAYOUT_20261110_V2_BEGIN
   Responsive-only adjustments; intentionally no edits to JavaScript, PHP,
   media behavior, colors, themes, animations, or saved content.
*/
@media (max-width: 760px) {
  /* Grid tracks must shrink to the actual device viewport. */
  .shell { width: 100%; max-width: 100%; min-width: 0; grid-template-columns: minmax(0, 1fr); }
  .main { width: 100%; max-width: 100%; min-width: 0; padding: 18px 14px; }
  .main > .section, .main > .topline, .main > .statgrid,
  .main > .cards, .main > .editor-grid, .main > .tab-row,
  .main > .footer { max-width: 100%; min-width: 0; }

  /* The old flex-row navigation widened the whole page on phones.
     Show all destinations in an accessible two-column grid instead. */
  .sidebar { position: relative; display: flex; flex-direction: column;
    align-items: stretch; justify-content: flex-start; width: 100%;
    max-width: 100%; min-width: 0; height: auto; gap: 12px; padding: 14px; }
  .sidebar .brand { min-width: 0; max-width: 100%; overflow-wrap: anywhere; }
  .sidebar-nav { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%; max-width: 100%; min-width: 0; overflow: visible;
    gap: 8px; margin-top: 0; }
  .sidebar-nav .nav-link { width: 100%; min-width: 0; min-height: 44px;
    padding: 11px 10px; gap: 8px; white-space: normal; flex-wrap: wrap;
    overflow-wrap: anywhere; text-align: left; font-size: .83rem; }
  .sidebar-bottom { display: none; }

  /* Centered, non-overflowing cards and readable controls. */
  .statgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px; }
  .cards, .home-features { grid-template-columns: minmax(0, 1fr); }
  .stat, .card, .create-card, .reveal-card, .reveal-info,
  .sr-archive-item { min-width: 0; max-width: 100%; }
  .stat { padding: 16px; }
  .reveal-info h3, .reveal-info p, .stat .value,
  .topline h2, .topline h3, .scene-kind { overflow-wrap: anywhere; }
  .topline { min-width: 0; max-width: 100%; align-items: flex-start; }
  .topline > * { min-width: 0; max-width: 100%; }
  .reveal-actions { min-width: 0; max-width: 100%; gap: 8px; }
  .reveal-actions .btn { min-width: 0; max-width: 100%; white-space: normal; }

  /* Editor, scene actions, tabs and dialogs remain within the screen. */
  .editor-grid, .form-grid, .scene-fields, .intro-grid {
    grid-template-columns: minmax(0, 1fr); }
  .editor-grid > *, .scene-fields > *, .form-grid > * { min-width: 0; }
  .scene-head { flex-wrap: wrap; align-items: flex-start; }
  .scene-head > *, .scene-actions { min-width: 0; max-width: 100%; }
  .scene-actions { justify-content: flex-start; }
  .kind-grid, .theme-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kind-btn, .theme-card { min-width: 0; overflow-wrap: anywhere; }
  .tab-row { width: 100%; max-width: 100%; min-width: 0;
    overflow-x: auto; overscroll-behavior-x: contain;
    -webkit-overflow-scrolling: touch; }
  .modal-layer { max-width: 100%; padding: 12px; }
  .modal { width: 100%; max-width: 100%; min-width: 0;
    max-height: calc(100vh - 24px); max-height: calc(100dvh - 24px);
    padding: 20px 16px; overflow-x: hidden; overflow-y: auto; }
  .modal .row > *, .modal .form-grid > * { min-width: 0; }
  .toast { left: 12px; right: 12px; bottom: 12px; max-width: none; }

  /* Public gift player and surrounding pages. Gallery sizing stays intact. */
  .public-page, .public-top, .public-stage, .stage-controls,
  .sr-gallery, .sr-gallery-controls { min-width: 0; max-width: 100%; }
  .public-page { width: 100%; }
  .public-stage h1, .public-stage p { overflow-wrap: anywhere; }
  .site-header { gap: 12px; max-width: 100%; flex-wrap: wrap; }
  .container, .home-section, .hero { min-width: 0; max-width: 100%;
    padding-left: 14px; padding-right: 14px; }
  .footer { width: 100%; max-width: 100%; min-width: 0;
    white-space: normal; overflow-wrap: anywhere; padding: 0 15px; }
  img, video, iframe { max-width: 100%; }
}
@media (max-width: 390px) {
  /* Override the original <390px block that switches sidebar to display:block. */
  .sidebar { display: flex; }
  .sidebar-nav { margin-top: 0; }
  .sidebar-nav .nav-link { font-size: .8rem; padding: 10px 8px; }
  .stat { padding: 13px; }
  .stat .value { font-size: 1.85rem; }
}
/* SECRET2REVEAL_MOBILE_LAYOUT_20261110_V2_END */

/* SECRET2REVEAL_PRIORITY2_USABILITY_20261110_V1_BEGIN
   UI-only: dialogs, button feedback, dashboard freshness. No theme changes.
*/
body.sr-dialog-open { overflow: hidden; }
.modal-layer .modal { overscroll-behavior: contain; }
.sr-dashboard-checked { margin: 5px 0 0; color: var(--muted); }
.sr-safety-error { border-left-color: var(--red); color: #ffdee4; }
.safety-summary strong { overflow-wrap: anywhere; }
@media (max-width: 760px) {
  .modal-layer .modal { max-height: calc(100dvh - 24px); }
  .safety-summary { padding: 14px; }
  .modal .safety-buttons .btn { min-height: 46px; }
}
/* SECRET2REVEAL_PRIORITY2_USABILITY_20261110_V1_END */

/* SECRET2REVEAL_PRIORITY2_COMPACT_CONFIRM_20261110_V1_BEGIN
   Applies only to safety confirmation dialogs on phones. All confirmation
   requirements, button actions, colors and data handling remain unchanged.
*/
@media (max-width: 760px) {
  #modal .modal:has(.safety-summary) {
    max-height: calc(100vh - 20px);
    max-height: calc(100dvh - 20px);
    padding: 14px 13px 10px;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
  }
  #modal .modal:has(.safety-summary) > .row.space-between {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 42px;
    gap: 10px;
    align-items: start;
    margin-bottom: 5px;
  }
  #modal .modal:has(.safety-summary) > .row.space-between h2 {
    font-size: clamp(1.15rem, 5vw, 1.42rem);
    line-height: 1.22;
    letter-spacing: -.02em;
    margin: 0;
    min-width: 0;
  }
  #modal .modal:has(.safety-summary) > .row.space-between .btn {
    width: 42px;
    height: 42px;
    padding: 0;
  }
  #modal .modal:has(.safety-summary) > p.muted {
    font-size: .86rem;
    line-height: 1.4;
    margin: 5px 0;
  }
  #modal .modal:has(.safety-summary) .safety-summary {
    display: grid;
    grid-template-columns: minmax(0, .78fr) minmax(0, 1.22fr);
    align-items: center;
    column-gap: 10px;
    row-gap: 5px;
    padding: 11px 12px;
    margin: 8px 0;
    border-radius: 12px;
  }
  #modal .modal:has(.safety-summary) .safety-summary .safety-title-label {
    font-size: .66rem;
    letter-spacing: .04em;
    line-height: 1.28;
  }
  #modal .modal:has(.safety-summary) .safety-summary strong {
    font-size: .89rem;
    line-height: 1.25;
    min-width: 0;
  }
  #modal .modal:has(.safety-summary) .safety-summary .safety-divider {
    grid-column: 1 / -1;
    margin: 2px 0;
  }
  #modal .modal:has(.safety-summary) .safety-note {
    margin: 5px 0;
    padding: 9px 11px;
    font-size: .81rem;
    line-height: 1.38;
  }
  #modal .modal:has(.safety-summary) .safety-check {
    margin: 8px 0;
    gap: 8px;
    font-size: .84rem;
    line-height: 1.35;
  }
  #modal .modal:has(.safety-summary) .safety-check input {
    margin-top: 0;
    flex-shrink: 0;
  }
  #modal .modal:has(.safety-summary) .safety-buttons {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    position: sticky;
    bottom: -10px;
    z-index: 1;
    margin-top: 4px;
    padding: 9px 0 3px;
    background: #241835;
  }
  #modal .modal:has(.safety-summary) .safety-buttons .btn {
    width: 100%;
    min-width: 0;
    min-height: 44px;
    font-size: .79rem;
    line-height: 1.24;
    padding: 8px 7px;
  }
}
/* SECRET2REVEAL_PRIORITY2_COMPACT_CONFIRM_20261110_V1_END */

/* SECRET2REVEAL_EDITOR_MOBILE_COMPACT_20261110_V1_BEGIN
   Editor-only mobile spacing; no publishing, scene, gallery, animation,
   theme, network, or persistence behavior changes.
*/
@media (max-width: 760px) {
  .main:has(.editor-head) {
    padding-top: 12px;
    padding-bottom: 22px;
  }
  .editor-head {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    padding-bottom: 12px;
    margin-bottom: 13px;
  }
  .editor-head > div:first-child { min-width: 0; max-width: 100%; }
  .editor-head > div:first-child > .btn.small {
    padding: 8px 11px;
    min-height: 40px;
    font-size: .82rem;
  }
  .editor-head > div:first-child > h2 {
    font-size: clamp(1.32rem, 5.1vw, 1.7rem);
    line-height: 1.22;
    letter-spacing: -.025em;
    margin: 10px 0 4px !important;
    overflow-wrap: anywhere;
  }
  .editor-head > div:first-child > .muted {
    font-size: .83rem;
    line-height: 1.45;
    overflow-wrap: anywhere;
  }
  .editor-head > .row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr);
    width: 100%;
    gap: 8px;
    margin: 0;
  }
  .editor-head > .row > .btn {
    width: 100%;
    min-width: 0;
    min-height: 44px;
    padding: 9px 8px;
    font-size: .85rem;
    line-height: 1.3;
    white-space: normal;
  }
  /* Four editor sections remain visible; no hidden sideways tab strip. */
  .tab-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
    width: 100%;
    max-width: 100%;
    padding-bottom: 0;
    margin-bottom: 13px;
    overflow: visible;
  }
  .tab-row > .tab {
    min-width: 0;
    min-height: 43px;
    padding: 9px 9px;
    font-size: .85rem;
    line-height: 1.25;
    text-align: center;
    white-space: normal;
    overflow-wrap: anywhere;
  }
  .editor-grid { gap: 13px; }
  .editor-grid .card {
    padding: 15px;
    border-radius: 17px;
  }
  .editor-grid .card h3 { font-size: 1.07rem; margin-bottom: 12px; }
  .editor-grid .form-grid { gap: 12px; }
  .editor-grid .field { gap: 6px; font-size: .85rem; }
  .editor-grid input, .editor-grid select, .editor-grid textarea {
    padding: 10px 11px;
    min-height: 44px;
  }
  .editor-grid .topline { gap: 9px; }
  .editor-grid .topline h3 { font-size: 1.12rem; }
  .editor-grid .topline .row { gap: 7px; }
  .editor-grid .topline .row .btn.small {
    padding: 9px 10px;
    font-size: .8rem;
    min-height: 42px;
  }
  .editor-grid .scene-card { padding: 13px; margin: 12px 0; }
  .editor-grid .scene-head { gap: 8px; margin-bottom: 11px; }
  .editor-grid .scene-actions .btn.small {
    min-height: 40px;
    min-width: 40px;
    padding: 7px 9px;
  }
}
/* SECRET2REVEAL_EDITOR_MOBILE_COMPACT_20261110_V1_END */
