*{box-sizing:border-box;-webkit-tap-highlight-color:transparent}
:root{
  --purple:#7548e8; --purple2:#9d4edd; --pink:#ec4899; --ink:#26324b;
  --muted:#69738a; --line:#eadff8; --cream:#fffaf5; --lav:#f7f1ff; --panel:#fffdfc;
}
html{scroll-behavior:smooth}
body{
  margin:0; min-height:100vh; padding:18px;
  font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","Noto Sans KR",Roboto,sans-serif;
  color:var(--ink);
  background:
    radial-gradient(circle at 12% 7%,#eee8ff 0,transparent 28%),
    radial-gradient(circle at 88% 18%,#fff0f6 0,transparent 30%),
    linear-gradient(135deg,#f8f6ff,#fff9f2 62%,#f1edff);
}
.app-shell{
  width:min(1180px,100%); margin:0 auto; overflow:hidden;
  background:rgba(255,252,249,.96); border:1px solid #eee7fb; border-radius:30px;
  box-shadow:0 22px 60px rgba(80,55,120,.14);
}
.hero{
  display:grid; grid-template-columns:1.25fr .85fr 1.05fr; gap:18px; align-items:center;
  padding:28px 30px 18px; position:relative;
}
.hero::after{content:"";position:absolute;left:30px;right:30px;bottom:0;height:1px;background:#f1e8f8}
.hero-copy h1{
  margin:0; font-size:clamp(34px,4.3vw,62px); line-height:1.06; letter-spacing:-2px;
  background:linear-gradient(105deg,#6d46df 10%,#c83abf 56%,#f03783);
  -webkit-background-clip:text;background-clip:text;color:transparent;font-weight:900;
}
.hero-copy p{margin:14px 0 0;color:#e63483;font-weight:800;font-size:clamp(14px,1.7vw,19px)}
.muni-hero{display:flex;justify-content:center;align-items:flex-end;min-height:190px}
.muni-hero img{width:min(260px,100%);max-height:220px;object-fit:contain;filter:drop-shadow(0 10px 16px rgba(109,70,223,.14))}
.bgm-card{
  padding:20px 22px; border:1.5px solid #ebd5f8; border-radius:22px;
  background:linear-gradient(145deg,#fffaff,#fbf2ff); box-shadow:inset 0 0 0 1px rgba(255,255,255,.75);
}
.bgm-title{font-size:20px;font-weight:900;color:#552d8c;margin-bottom:10px}
.bgm-song{font-size:16px;font-weight:700;margin-bottom:14px;color:#403154}
.bgm-row{display:flex;align-items:center;gap:12px}
.bgm-slider{flex:1;accent-color:#cf35df;min-width:90px}
.bgm-switch-btn{
  border:0;border-radius:12px;padding:9px 14px;color:#fff;font-weight:900;cursor:pointer;
  background:linear-gradient(135deg,#d53ce4,#9f43ee)
}
.bgm-switch-btn.off{background:#d7dbe5;color:#687086}

.tab-nav{display:grid;grid-template-columns:1fr 1fr;gap:8px;padding:14px 30px 0}
.tab-btn{
  border:1px solid #e2e5ec;background:#fff;color:#536078;font-size:17px;font-weight:900;
  padding:15px 18px;border-radius:15px;cursor:pointer;box-shadow:0 3px 10px rgba(48,53,80,.03)
}
.tab-btn.active{color:#fff;border-color:transparent;background:linear-gradient(100deg,#7447e7,#9550e8);box-shadow:0 7px 18px rgba(117,72,232,.22)}

.content-wrap{padding:14px 30px 26px}
#create-view{display:block}
.create-grid{display:grid;grid-template-columns:minmax(0,1.55fr) minmax(280px,.85fr);gap:18px;align-items:start}
.stack{display:flex;flex-direction:column;gap:14px}
.section-card{
  background:rgba(255,255,255,.94);border:1px solid #eee8f2;border-radius:19px;padding:18px;
  box-shadow:0 7px 22px rgba(69,51,87,.055)
}
.section-title{display:flex;align-items:center;gap:8px;font-size:17px;font-weight:900;color:#7041d8;margin:0 0 14px}
.section-title .num{display:inline-grid;place-items:center;width:26px;height:26px;border-radius:9px;background:#f0e9ff;color:#7447e7;font-size:13px}
.settings-head{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:10px}
.user-actions{display:flex;gap:8px;align-items:center;flex-wrap:wrap}
.user-status{display:none;color:#12a46d;font-size:12px;font-weight:800}
.btn-small,.btn-clear,.photo-btn,.photo-clear-btn{
  border:0;border-radius:10px;padding:8px 11px;font-weight:800;cursor:pointer
}
.btn-small{background:#7157e8;color:#fff} .btn-clear{background:#fff0f2;color:#e34d63}
label{display:block;font-weight:800;font-size:14px;margin:9px 0 6px;color:#38425a}
input,select{
  width:100%;padding:13px 14px;border:1.5px solid #dfe3ec;border-radius:13px;background:#fff;
  font-size:15px;color:#283149;outline:none
}
input:focus,select:focus{border-color:#8067ea;box-shadow:0 0 0 3px rgba(128,103,234,.1)}
.helper-text{font-size:12.5px;color:#728096;line-height:1.55;margin-top:8px}
.helper-alert{color:#5f50d7;font-weight:900}
.photo-upload-box{border:1.5px dashed #efc65b;background:#fffbeb;border-radius:17px;padding:16px}
.photo-upload-inner{display:grid;grid-template-columns:1fr auto;align-items:center;gap:14px}
.photo-copy strong{font-size:15px;color:#7f5215} .photo-copy p{font-size:13px;color:#9a6a28;margin:7px 0 0;line-height:1.45}
.photo-preview-wrapper{display:flex;align-items:center;gap:9px;flex-wrap:wrap;justify-content:flex-end}
.photo-preview-img{width:74px;height:74px;object-fit:cover;border-radius:15px;border:3px solid #f4c14d;display:none}
.photo-btn{background:#7651e8;color:#fff} .photo-clear-btn{display:none;background:#fee2e2;color:#9b1c1c}
.cast-list{display:grid;grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:10px;margin-top:12px}
.cast-card{position:relative;background:#fff;border:1.5px solid #f3dc9b;border-radius:15px;padding:12px 10px 10px;display:flex;flex-direction:column;align-items:center;gap:7px}
.cast-photo{width:84px;height:84px;border-radius:15px;border:3px solid #f4c14d;background:#fff7dd;display:grid;place-items:center;overflow:hidden;cursor:pointer;font-size:12px;font-weight:800;color:#b07b1f;text-align:center;line-height:1.3;padding:0}
.cast-photo img{width:100%;height:100%;object-fit:cover}
.cast-card input{padding:8px 10px;font-size:13.5px;border-radius:10px;text-align:center}
.cast-role{font-size:11px;font-weight:900;color:#7651e8;background:#f0e9ff;border-radius:999px;padding:2px 8px}
.cast-remove{position:absolute;top:6px;right:6px;width:24px;height:24px;border:0;border-radius:8px;background:#fee2e2;color:#9b1c1c;font-weight:900;cursor:pointer;line-height:1}
.cast-add-btn{margin-top:10px;width:100%;border:1.5px dashed #c9b6f5;background:#faf7ff;color:#6a47de;border-radius:13px;padding:10px;font-weight:900;cursor:pointer}
.cast-add-btn:hover{background:#f3edff}
.cast-add-btn:disabled{opacity:.45;cursor:default}

.theme-chips{display:grid;grid-template-columns:repeat(6,1fr);gap:8px;margin-bottom:12px}
.theme-chip{border:1px solid #eadff7;background:#fff;padding:10px 6px;border-radius:13px;cursor:pointer;font-weight:800;color:#46516a;font-size:12px}
.theme-chip:hover{border-color:#a98ce9;background:#faf7ff}
.input-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.input-group{margin-bottom:0}
.primary-btn{
  width:100%;border:0;border-radius:16px;padding:17px 18px;font-size:18px;font-weight:900;color:#fff;cursor:pointer;
  background:linear-gradient(100deg,#7249e8,#d943bd,#f05b91);box-shadow:0 9px 22px rgba(144,70,202,.24);margin-top:2px
}
.primary-btn:active{transform:translateY(1px)} .primary-btn:disabled{opacity:.55;cursor:wait}
#status-log{font-size:14px;font-weight:800;color:#6554d9;text-align:center;line-height:1.5;margin-top:8px}

.side-card{background:rgba(255,255,255,.88);border:1px solid #eee8f2;border-radius:19px;padding:18px}
.side-card h3{margin:0 0 12px;color:#6940d3;font-size:17px}
.tip-list{margin:0;padding-left:20px;color:#576177;font-size:13.5px;line-height:1.8}
.audio-feature-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:8px}
.audio-feature{padding:14px 6px;text-align:center;border:1px solid #ebe4f5;border-radius:13px;background:#fff;font-size:12px;font-weight:800;color:#526079}
.audio-feature b{display:block;font-size:22px;margin-bottom:5px}
.side-note{font-size:13px;line-height:1.65;color:#667188;margin:0}
.side-cta{width:100%;padding:11px;border:1px solid #cfc2f3;border-radius:12px;background:#faf7ff;color:#7041d8;font-weight:900;cursor:pointer}

#library-view{display:none;background:#fff;border:1px solid #eee8f2;border-radius:19px;padding:18px}
.library-header{display:flex;justify-content:space-between;align-items:center;gap:10px;margin-bottom:14px}
.library-play-all{border:0;border-radius:10px;padding:9px 12px;background:#7157e8;color:#fff;font-weight:800;cursor:pointer}
.library-item{display:flex;justify-content:space-between;gap:12px;align-items:center;padding:13px 14px;background:#fff;border:1px solid #e9e6ef;border-radius:13px;margin-bottom:9px}
.library-info h4{margin:0 0 4px;font-size:15px} .library-info p{margin:0;font-size:11.5px;color:#748097}
.library-actions{display:flex;gap:6px} .library-actions button{border:0;border-radius:8px;padding:7px 10px;font-size:12px;font-weight:800;cursor:pointer}
.btn-load{background:#7359e7;color:#fff} .btn-delete{background:#f05f71;color:#fff}

#book-container{display:none;margin-top:18px;padding-top:16px;border-top:1px dashed #d9cee9}
.story-title{font-size:23px;font-weight:900;text-align:center;margin-bottom:14px}
.book-page-wrapper{width:100%;position:relative}
.page-item{display:none;position:relative;width:100%;aspect-ratio:1/1;border-radius:18px;overflow:hidden;background:#e7e8ef;box-shadow:0 9px 24px rgba(0,0,0,.12)}
.page-item.active{display:block} .page-img{width:100%;height:100%;object-fit:cover;display:block}
.page-loading-text{display:flex;align-items:center;justify-content:center;height:100%;font-weight:800;color:#7a8497}
.page-overlay-box{position:absolute;left:0;right:0;bottom:0;max-height:56%;overflow:auto;padding:38px 18px 17px;background:linear-gradient(to top,rgba(20,15,31,.94),rgba(20,15,31,.66),transparent);color:#fff}
.page-text{margin:0;color:#fff;line-height:1.7;font-size:14px} .page-num-badge{display:inline-block;background:#f7c948;color:#714c0b;padding:3px 8px;border-radius:7px;font-size:12px;font-weight:900;margin-bottom:6px}
.dialogue-char{font-weight:900} .dialogue-hero{color:#a7d2ff} .dialogue-villain{color:#ff9292} .dialogue-elder{color:#ffe36e} .emotion-tag{font-size:11px;padding:1px 5px;border-radius:5px;background:rgba(255,255,255,.18)}
.page-nav-bar{display:flex;justify-content:space-between;align-items:center;margin-top:12px;padding:10px;border-radius:12px;background:#f6f5fb}
.page-nav-btn{border:0;border-radius:9px;padding:9px 12px;background:#6f55de;color:#fff;font-weight:800;cursor:pointer} .page-nav-btn:disabled{background:#cbd0dc}
.page-indicator{font-weight:900}
.drama-control-box{margin-top:12px;background:#f8f5ff;border:1px solid #e4daf7;padding:12px;border-radius:13px}
.controls{display:none;grid-template-columns:repeat(4,1fr);gap:8px;margin-top:12px}
.controls button{border:0;border-radius:11px;padding:11px 8px;font-weight:800;cursor:pointer;background:#ececf3;color:#3e4960}
.controls .read-btn{grid-column:1/-1;background:linear-gradient(100deg,#17ad7a,#0d8f66);color:#fff;font-size:16px}
.controls .save-btn{background:#7157e8;color:#fff} .controls .pdf-btn{background:#f1a72e;color:#fff} .controls .stop{background:#fee2e2;color:#9b1c1c}
.controls .bgm-btn{background:#fbf1ff;color:#8d3199} .controls .loop-btn.active{background:#7a53df;color:#fff}

.footer{padding:13px 30px;background:linear-gradient(90deg,#f6ecff,#fff0f7);display:flex;justify-content:space-between;gap:12px;font-size:13px;color:#626d82}

@media(max-width:850px){
  body{padding:0;background:#fff}
  .app-shell{border-radius:0;border:0;box-shadow:none}
  .hero{grid-template-columns:1fr;gap:8px;padding:22px 18px 16px;text-align:center}
  .hero-copy h1{font-size:39px} .hero-copy p{font-size:15px}
  .muni-hero{min-height:130px;order:-1} .muni-hero img{max-height:150px;width:190px}
  .bgm-card{text-align:left;padding:14px}
  .tab-nav{padding:12px 14px 0} .content-wrap{padding:12px 14px 20px}
  .create-grid{grid-template-columns:1fr} .sidebar{display:grid;grid-template-columns:1fr;gap:12px}
  .input-grid{grid-template-columns:1fr} .theme-chips{grid-template-columns:repeat(3,1fr)}
  .photo-upload-inner{grid-template-columns:1fr} .photo-preview-wrapper{justify-content:flex-start}
  .controls{grid-template-columns:1fr 1fr} .controls .read-btn{grid-column:1/-1}
  .footer{padding:12px 16px;flex-direction:column;text-align:center}
}
@media(max-width:470px){
  .hero-copy h1{font-size:34px} .tab-btn{font-size:14px;padding:12px 8px}
  .bgm-row{flex-wrap:wrap} .bgm-slider{width:100%}
  .theme-chips{grid-template-columns:repeat(2,1fr)}
}

.voice-status{margin-top:10px;padding:9px 10px;border-radius:11px;background:#f8f5ff;color:#6959a8;font-size:12px;line-height:1.5}


.browser-guide-overlay,.install-guide-overlay{
  position:fixed;inset:0;z-index:99999;display:none;align-items:center;justify-content:center;padding:18px;
  background:rgba(30,24,42,.72);backdrop-filter:blur(8px)
}
.browser-guide-overlay.show,.install-guide-overlay.show{display:flex}
.guide-card{
  width:min(460px,100%);background:#fffdfc;border:1px solid #eadff8;border-radius:24px;padding:24px;
  box-shadow:0 24px 70px rgba(0,0,0,.28);text-align:center
}
.guide-card h2{margin:2px 0 10px;color:#53318d;font-size:22px}
.guide-card p{color:#596379;line-height:1.65;font-size:14px}
.guide-steps{text-align:left;background:#f8f4ff;border:1px solid #eadff8;border-radius:15px;padding:13px 15px;margin:14px 0;color:#4f5870;font-size:13.5px;line-height:1.7}
.guide-actions{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-top:14px}
.guide-actions button,.install-app-btn{
  border:0;border-radius:12px;padding:12px 10px;font-weight:900;cursor:pointer
}
.guide-primary{background:#7354e7;color:#fff}.guide-secondary{background:#f0edf5;color:#5b6170}
.install-app-btn{
  position:fixed;right:16px;bottom:16px;z-index:9000;background:linear-gradient(135deg,#7354e7,#d445bd);
  color:#fff;box-shadow:0 8px 22px rgba(95,63,170,.28);display:none
}
.install-app-btn.show{display:block}


/* --- 이야기동화 / 배움동화 / 한영 전환 --- */

/* EAIM Kids cloud library */
.cloud-auth-box{margin:0 0 14px;padding:13px 14px;border:1px solid #e3ddf4;border-radius:14px;background:linear-gradient(135deg,#f8f6ff,#fffdf8)}
.cloud-auth-row{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap}
.cloud-auth-copy{font-size:12px;color:#667085;line-height:1.45}.cloud-auth-copy b{display:block;color:#4d4670;font-size:13px;margin-bottom:2px}
.cloud-auth-actions{display:flex;gap:7px;flex-wrap:wrap}.cloud-btn{border:0;border-radius:10px;padding:9px 12px;font-weight:900;cursor:pointer;background:#fff;color:#5e51b8;box-shadow:0 2px 9px rgba(60,45,120,.10)}
.cloud-btn.primary{background:linear-gradient(135deg,#6f57e8,#9b5de5);color:#fff}.cloud-btn.sync{background:#edf8f4;color:#197354}.cloud-btn:disabled{opacity:.55;cursor:default}
.cloud-user{display:none;align-items:center;gap:8px}.cloud-avatar{width:28px;height:28px;border-radius:50%;object-fit:cover;background:#eee}.cloud-status{font-size:11px;color:#7d8698;margin-top:7px}
.story-purpose-box{margin-bottom:14px;padding:14px;border:1px solid #e8e2f3;border-radius:14px;background:linear-gradient(135deg,#fffdf8,#faf7ff)}
.story-purpose-title{font-size:13px;font-weight:900;color:#4f5870;margin-bottom:8px}
.story-purpose-buttons{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.story-purpose-btn{border:1px solid #ddd5ef;background:#fff;color:#5d6476;border-radius:12px;padding:11px 10px;font-weight:900;cursor:pointer;transition:.18s ease}
.story-purpose-btn.active{background:linear-gradient(135deg,#7354e7,#d445bd);border-color:transparent;color:#fff;box-shadow:0 6px 16px rgba(113,87,232,.18)}
.story-topic-box{margin-top:10px}
.learning-box{margin-top:10px;padding:14px;border:1px solid #e8e2f3;border-radius:14px;background:linear-gradient(135deg,#f7fff9,#faf7ff)}
.learning-box[hidden],.story-topic-box[hidden]{display:none!important}
.learning-row{display:grid;grid-template-columns:1fr 1.4fr;gap:10px;align-items:end}
.learning-hint{margin-top:7px;font-size:11.5px;color:#7c879b;line-height:1.45}
.learning-topic-wrap{margin-top:12px}
.learning-topic-title{font-size:13px;font-weight:800;color:#574a72;margin-bottom:8px}
.learning-topic-chips{display:flex;flex-wrap:wrap;gap:8px}
.learning-topic-chip{border:1px solid #ddd4ee;background:#fff;color:#5f5473;border-radius:999px;padding:9px 12px;font-size:12.5px;font-weight:700;cursor:pointer;transition:.16s ease}
.learning-topic-chip:hover{transform:translateY(-1px);border-color:#b9a7de}
.learning-topic-chip.active{background:linear-gradient(135deg,#e8dcff,#dff7eb);border-color:#9d84d5;color:#4e377b;box-shadow:0 4px 12px rgba(93,69,145,.12)}
.learning-custom-row{display:none;margin-top:10px}
.learning-custom-row.show{display:block}
.learning-custom-row input{width:100%}
.learning-selected-note{margin-top:8px;font-size:12px;color:#6d6380;font-weight:700}
.language-control-box{display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin:10px 0 14px;padding:11px 12px;border:1px solid #e7e2f1;border-radius:13px;background:#fbf9ff}
.language-label{font-size:13px;font-weight:900;color:#4f5870;margin-right:2px}
.lang-btn{border:1px solid #d9d2ed;background:#fff;color:#5e6475;border-radius:999px;padding:7px 11px;font-size:12px;font-weight:900;cursor:pointer}
.lang-btn.active{background:#7157e8;color:#fff;border-color:#7157e8}
.lang-btn:disabled{opacity:.55;cursor:wait}
.translation-status{flex-basis:100%;font-size:11px;color:#7d8798;margin-top:1px}
.korean-translation{margin-top:9px;padding-top:9px;border-top:1px dashed rgba(255,255,255,.5);font-size:.92em;opacity:.9}
.korean-translation strong{display:inline-block;margin-bottom:4px}
.library-tag{display:inline-flex;align-items:center;padding:2px 6px;border-radius:999px;background:#f0ecff;color:#6552bd;font-size:10px;font-weight:800;margin-left:4px}
@media(max-width:700px){.learning-row{grid-template-columns:1fr}.language-control-box{gap:6px}.lang-btn{padding:7px 9px}}


/* First-time English story creation overlay */
.english-translation-overlay{position:fixed;inset:0;z-index:12000;background:rgba(43,31,73,.38);backdrop-filter:blur(4px);display:none;align-items:center;justify-content:center;padding:22px}
.english-translation-overlay.show{display:flex}
.english-translation-card{width:min(390px,92vw);background:#fff;border:1px solid #e8defb;border-radius:26px;padding:30px 24px;text-align:center;box-shadow:0 20px 60px rgba(76,48,130,.25)}
.english-translation-card .globe{font-size:48px;line-height:1;margin-bottom:12px}
.english-translation-card h3{margin:0 0 10px;color:#5032a8;font-size:21px}
.english-translation-card p{margin:0;color:#6f6680;line-height:1.65;font-weight:600}
.english-loading-dots{display:flex;justify-content:center;gap:8px;margin-top:18px}
.english-loading-dots span{width:9px;height:9px;border-radius:50%;background:#7650e8;animation:muniEnglishDot 1.15s infinite ease-in-out}
.english-loading-dots span:nth-child(2){animation-delay:.16s}.english-loading-dots span:nth-child(3){animation-delay:.32s}
@keyframes muniEnglishDot{0%,80%,100%{transform:scale(.65);opacity:.35}40%{transform:scale(1.15);opacity:1}}

/* 🎬 동화 녹화 모드 */
.controls .rec-btn{grid-column:1/-1;background:linear-gradient(100deg,#ff6b8b,#e84a9b);color:#fff;font-size:15px}
.rec-stage{position:fixed;inset:0;z-index:99999;background:#140f22;display:grid;place-items:center}
.rec-frame{position:relative;width:min(100vw,calc(100vh * 16 / 9));aspect-ratio:16/9;overflow:hidden;background:#1d1530}
.rec-bg{position:absolute;inset:-40px;background-size:cover;background-position:center;filter:blur(28px) brightness(.55) saturate(1.2)}
.rec-img{position:absolute;inset:0;margin:auto;height:100%;width:100%;object-fit:contain;opacity:0}
.rec-img.in{animation:recFade 1.1s ease forwards}
@keyframes recFade{from{opacity:0;transform:scale(1.03)}to{opacity:1;transform:scale(1)}}
.rec-page{position:absolute;top:2.2%;right:2%;font-size:clamp(11px,1.3vw,20px);font-weight:900;color:#fff;background:rgba(20,15,34,.5);padding:.35em .9em;border-radius:999px}
.rec-sub{position:absolute;left:6%;right:6%;bottom:5%;display:flex;justify-content:center;pointer-events:none}
.rec-sub-text{display:inline-block;max-width:100%;text-align:center;font-weight:800;line-height:1.45;word-break:keep-all;
  font-size:clamp(15px,2.35vw,40px);color:#fff;background:rgba(20,15,34,.72);padding:.45em 1em;border-radius:.7em;
  text-shadow:0 2px 6px rgba(0,0,0,.4)}
.rec-sub-text:empty{display:none}
.rec-sub.is-dialogue .rec-sub-text{background:rgba(118,81,232,.82)}
.rec-card{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:1.2%;
  background:radial-gradient(circle at 50% 40%,#fff8e6 0%,#fde7f3 55%,#e9ddff 100%);opacity:0;pointer-events:none;transition:opacity .8s ease;text-align:center;padding:0 8%}
.rec-card img{height:38%;object-fit:contain}
.rec-card-kicker{font-weight:900;color:#8a63e8;font-size:clamp(12px,1.6vw,26px);letter-spacing:.08em}
.rec-card-title{font-weight:900;color:#4a2f8f;font-size:clamp(22px,4.4vw,72px);line-height:1.2;word-break:keep-all}
.rec-card-author{font-weight:800;color:#8a6a3a;font-size:clamp(12px,1.5vw,24px)}
.rec-stage.show-title .rec-title-card,.rec-stage.show-end .rec-end-card{opacity:1}
.rec-ready{position:absolute;inset:0;background:rgba(20,15,34,.55);display:grid;place-items:center;z-index:3}
.rec-ready-box{background:#fff;border-radius:22px;padding:26px 28px;max-width:420px;width:88%;text-align:center}
.rec-ready-title{font-size:22px;font-weight:900;color:#5b3fd0}
.rec-ready-desc{color:#4b5570;font-size:14.5px;line-height:1.6;margin:12px 0 18px}
.rec-start-btn{width:100%;border:0;border-radius:14px;padding:14px;font-size:18px;font-weight:900;color:#fff;background:linear-gradient(100deg,#ff6b8b,#e84a9b);cursor:pointer}
.rec-cancel-btn{margin-top:8px;border:0;background:none;color:#8a93a8;font-weight:800;cursor:pointer;padding:8px}
.rec-close{position:fixed;top:12px;left:12px;z-index:5;border:0;border-radius:10px;padding:8px 12px;font-weight:900;background:rgba(255,255,255,.18);color:#fff;cursor:pointer;opacity:.35}
.rec-close:hover{opacity:1}
.rec-stage.mode-record .rec-close{display:none}
.rec-result{position:fixed;inset:0;z-index:100000;background:rgba(20,15,34,.6);display:grid;place-items:center;padding:16px}
.rec-result-box{background:#fff;border-radius:20px;padding:20px;width:min(640px,100%);text-align:center}
.rec-result-box h3{margin:0 0 12px;color:#5b3fd0}
.rec-result-box video{width:100%;border-radius:12px;background:#000}
.rec-result-info{font-size:13px;color:#6b7590;margin:10px 0}
.rec-result-actions{display:flex;gap:8px;justify-content:center}
.rec-download{background:#7157e8;color:#fff;text-decoration:none;font-weight:900;padding:11px 18px;border-radius:12px}
.rec-result-close{border:0;background:#ececf3;color:#3e4960;font-weight:800;padding:11px 18px;border-radius:12px;cursor:pointer}

/* 🛠 제작자 모드 */
.creator-only{display:none !important}
body.is-creator .creator-only{display:block !important}
.controls .capcut-btn{grid-column:1/-1;background:#1f2433;color:#fff;font-size:14px}
.creator-badge{position:fixed;left:12px;bottom:12px;z-index:900;background:#1f2433;color:#fff;font-size:12px;font-weight:900;padding:6px 11px;border-radius:999px;opacity:.85}
.whoami-box{position:fixed;left:50%;top:20px;transform:translateX(-50%);z-index:100001;background:#fff;border:2px solid #7651e8;border-radius:16px;padding:16px 18px;width:min(460px,92vw);box-shadow:0 12px 30px rgba(0,0,0,.18);text-align:center}
.whoami-box code{display:block;margin:10px 0;padding:10px;background:#f4f0ff;border-radius:10px;font-size:14px;word-break:break-all}
.whoami-box p{font-size:13px;color:#5b6478;margin:0 0 10px}
.whoami-box button{border:0;border-radius:10px;padding:8px 14px;font-weight:800;margin:0 4px;cursor:pointer;background:#7651e8;color:#fff}
.whoami-box .whoami-close{background:#ececf3;color:#3e4960}

/* 🎁 무료체험 */
.trial-status{margin:12px 0 4px;padding:11px 13px;border-radius:13px;background:#fff7e6;border:1.5px solid #f7d58a;color:#7a5311;font-size:13px;line-height:1.5}
.trial-status.ready{background:#ecfdf5;border-color:#86e0b8;color:#0f6b4b}
.trial-status.used{background:#f4f4f8;border-color:#dcdce6;color:#5b6478}

/* 👨‍👩‍👧 보호자 안내 */
.guardian-notice{margin:12px 30px 0;padding:10px 14px;border-radius:13px;background:#f3efff;color:#4d3f86;font-size:13px;line-height:1.55;word-break:keep-all}
.guardian-gate{position:fixed;inset:0;z-index:100002;background:rgba(40,30,70,.55);place-items:center;padding:16px}
.guardian-box{background:#fff;border-radius:24px;padding:24px 22px;width:min(440px,100%);text-align:center;word-break:keep-all;box-shadow:0 18px 40px rgba(0,0,0,.2)}
.guardian-box img{height:120px;object-fit:contain}
.guardian-box h2{margin:8px 0 6px;color:#5b3fd0;font-size:21px}
.guardian-box p{color:#4b5570;font-size:14.5px;line-height:1.6;margin:0 0 10px}
.guardian-box ul{text-align:left;color:#5b6478;font-size:13px;line-height:1.55;margin:0 0 16px;padding-left:18px}
.guardian-yes{width:100%;border:0;border-radius:14px;padding:13px;font-size:16px;font-weight:900;color:#fff;background:linear-gradient(100deg,#7651e8,#c84fd0);cursor:pointer}
.guardian-no{margin-top:8px;border:0;background:none;color:#8a93a8;font-weight:800;cursor:pointer;padding:8px}
.guardian-child-msg{margin-top:8px !important;font-weight:900;color:#e63483 !important}
@media (max-width:760px){.guardian-notice{margin:10px 14px 0}}

/* 🎙️ AI 성우 목소리 */
.ai-voice-option{display:flex;gap:10px;align-items:flex-start;margin:4px 0 12px;padding:12px 14px;border-radius:14px;background:#fdf4ff;border:1.5px solid #efc8f7;cursor:pointer;font-weight:700;color:#5a2d6b;font-size:14px;line-height:1.5}
.ai-voice-option input{width:20px;height:20px;margin-top:2px;flex:none;accent-color:#b44fd0}
.ai-voice-option small{font-weight:700;color:#8d5aa0}
.ai-voice-option .ai-voice-sub{color:#a07ab0}
.controls .ai-voice-btn{grid-column:1/-1;background:linear-gradient(100deg,#b44fd0,#7651e8);color:#fff;font-size:15px}
.ai-voice-badge{display:inline-block;margin:0 0 10px;padding:5px 12px;border-radius:999px;background:#fdf4ff;color:#8d3199;font-size:12.5px;font-weight:900}

/* 🏡 뮤니마을 진행 */
.village-card{background:linear-gradient(160deg,#fffdf3,#f3fff6)}
.village-count{font-size:14px;color:#3d6b3f;font-weight:800}.village-count b{font-size:26px;color:#2f8f4e}
.village-bar{height:10px;border-radius:999px;background:#e5f3e7;overflow:hidden;margin:6px 0 8px}
.village-bar span{display:block;height:100%;border-radius:999px;background:linear-gradient(90deg,#8bd49a,#f4c14d)}
.village-chips{display:flex;flex-wrap:wrap;gap:5px;margin-top:6px}
.village-chip{font-size:11.5px;font-weight:800;background:#fff;border:1px solid #e3eed9;border-radius:999px;padding:3px 8px;color:#4b6a3f}

/* 🏡 뮤니 알림 말풍선 · 마을 열림 축하 */
.muni-toast{position:fixed;left:50%;bottom:22px;transform:translate(-50%,140%);z-index:100003;display:flex;align-items:center;gap:10px;
  background:#fff;border:2px solid #cdbdf7;border-radius:18px;padding:10px 16px 10px 10px;box-shadow:0 12px 28px rgba(80,60,140,.2);
  width:min(460px,92vw);font-size:14px;line-height:1.5;color:#4a3a86;word-break:keep-all;transition:transform .45s cubic-bezier(.2,1.3,.4,1)}
.muni-toast.show{transform:translate(-50%,0)}
.muni-toast img{width:46px;height:46px;object-fit:contain;flex:none}
.village-celebrate{position:fixed;inset:0;z-index:100004;background:rgba(40,30,70,.55);display:grid;place-items:center;padding:16px}
.village-celebrate-box{background:linear-gradient(170deg,#fffdf3,#eefbf0);border-radius:26px;padding:24px 22px;width:min(460px,100%);text-align:center;word-break:keep-all}
.village-confetti{font-size:28px;letter-spacing:4px;animation:villagePop .8s ease}
@keyframes villagePop{from{transform:scale(.4);opacity:0}to{transform:scale(1);opacity:1}}
.village-celebrate-box img{height:110px;object-fit:contain}
.village-celebrate-box h2{margin:6px 0;color:#2f8f4e;font-size:23px}
.village-celebrate-box p{color:#4b5f4a;font-size:14.5px;line-height:1.6;margin:0 0 10px}
.village-celebrate-box .village-chips{justify-content:center;margin:10px 0}
.village-soon{font-size:13px !important;color:#8a7a3a !important}
.village-celebrate-box button{border:0;border-radius:14px;padding:12px 30px;font-size:16px;font-weight:900;color:#fff;background:linear-gradient(100deg,#4fbf72,#f1a72e);cursor:pointer}

/* 🏗️ 마을 이미지 스튜디오 (제작자) */
.creator-tools{border:1.5px dashed #9aa3b8}
.vs-overlay{position:fixed;inset:0;z-index:100005;background:rgba(20,18,35,.6);overflow:auto;padding:18px}
.vs-panel{background:#fff;border-radius:22px;max-width:1180px;margin:0 auto;padding:20px 22px 30px;word-break:keep-all}
.vs-head{display:flex;justify-content:space-between;gap:14px;align-items:flex-start}
.vs-head h2{margin:0;color:#4a2f8f;font-size:21px}.vs-head h2 small{font-size:12px;color:#8a93a8;margin-left:6px}
.vs-head p{margin:6px 0 0;color:#5b6478;font-size:13.5px;line-height:1.55}
.vs-close{border:0;border-radius:10px;padding:8px 12px;font-weight:900;background:#ececf3;cursor:pointer;flex:none}
.vs-toolbar{display:flex;flex-wrap:wrap;gap:8px;align-items:center;margin:14px 0 4px;padding:10px;background:#f7f5ff;border-radius:14px}
.vs-summary{font-weight:900;color:#5b3fd0;margin-right:auto}
.vs-toolbar button,.vs-muto{border:0;border-radius:10px;padding:9px 13px;font-weight:900;cursor:pointer;font-size:13px}
.vs-all{background:#7651e8;color:#fff}.vs-zip{background:#1f2433;color:#fff}
.vs-muto{background:#fff;border:1.5px solid #d9d2f5;color:#4a3a86}.vs-muto input{display:none}
.vs-muto-preview{width:40px;height:40px;object-fit:contain;border-radius:8px;background:#fff;border:1px solid #eee}
.vs-group{margin:18px 0 8px;color:#4f5870;font-size:15px}
.vs-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(200px,1fr));gap:12px}
.vs-card{border:1.5px solid #ece8f6;border-radius:16px;padding:10px;display:flex;flex-direction:column;gap:7px}
.vs-card.busy{opacity:.6}
.vs-thumb{height:150px;border-radius:12px;display:grid;place-items:center;overflow:hidden;
  background:repeating-conic-gradient(#f1f1f5 0% 25%,#fff 0% 50%) 50%/18px 18px;border:2px solid transparent}
.vs-thumb.is-ref{border-color:#f4c14d}
.vs-thumb img{max-width:100%;max-height:144px;object-fit:contain}.vs-thumb span{color:#a2a9ba;font-size:12px;font-weight:800}
.vs-title{font-weight:900;color:#38425a;font-size:14px}.vs-ref-tag{color:#b07b1f;font-size:12px}
.vs-card textarea{width:100%;font-size:11.5px;border:1px solid #e3e6ee;border-radius:9px;padding:6px;resize:vertical;color:#4b5570;font-family:inherit}
.vs-actions{display:flex;gap:6px}
.vs-actions button{flex:1;border:0;border-radius:9px;padding:8px 6px;font-weight:900;font-size:12.5px;cursor:pointer}
.vs-make{background:#f0e9ff;color:#5b3fd0}.vs-ref{background:#fff5d9;color:#8a5a0a}
@media (max-width:760px){.vs-overlay{padding:8px}.vs-panel{padding:14px}.vs-grid{grid-template-columns:1fr 1fr}}

/* ⭐ 이야기 주제 선택 표시 */
.theme-chip.active{border-color:#7651e8;background:linear-gradient(100deg,#f0e9ff,#fde7f3);color:#4a2f8f;box-shadow:0 0 0 2px #cdbdf7 inset}
.theme-hint{font-weight:700;color:#9aa1b5;font-size:11.5px}

/* 🎁 뮤토니즈 인트로 */
.rec-intro{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;background:#fff;z-index:5;opacity:1;transition:opacity .45s ease}
.rec-intro.out{opacity:0}
.rec-intro-opt{margin:0 0 12px;padding:10px 12px;border-radius:12px;background:#fff5d9;color:#7a5311;font-size:13.5px;font-weight:800;text-align:left;cursor:pointer}
.rec-intro-opt input{margin-right:6px;accent-color:#e84a9b}

/* 🎵 제작자 음악 보관함 */
.cm-overlay{position:fixed;inset:0;z-index:100006;background:rgba(20,18,35,.55);display:none;place-items:center;padding:16px}
.cm-box{background:#fff;border-radius:20px;padding:18px 18px 16px;width:min(520px,100%);max-height:88vh;overflow:auto;word-break:keep-all}
.cm-head{display:flex;justify-content:space-between;align-items:center;font-size:17px;color:#4a2f8f}
.cm-close{border:0;background:#ececf3;border-radius:9px;padding:6px 10px;cursor:pointer;font-weight:900}
.cm-current{font-size:13px;color:#7a5311;background:#fff5d9;border-radius:10px;padding:8px 10px;margin:10px 0}
.cm-list{display:flex;flex-direction:column;gap:6px;margin-bottom:10px}
.cm-item{display:flex;align-items:center;gap:8px;border:1.5px solid #ece8f6;border-radius:12px;padding:7px 8px}
.cm-item.on{border-color:#b44fd0;background:#fdf4ff}
.cm-name{flex:1;font-weight:800;color:#38425a;font-size:14px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.cm-item button{border:0;border-radius:9px;padding:7px 10px;font-weight:900;cursor:pointer;font-size:12.5px}
.cm-play{background:#f0e9ff;color:#5b3fd0}.cm-use{background:#7651e8;color:#fff}.cm-del{background:#fee2e2;color:#9b1c1c}
.cm-empty{color:#8a93a8;font-size:13px;text-align:center;padding:14px}
.cm-upload{display:block;text-align:center;border:1.5px dashed #c9b6f5;background:#faf7ff;color:#6a47de;border-radius:12px;padding:11px;font-weight:900;cursor:pointer;margin-bottom:8px}
.cm-upload input{display:none}
.cm-reset{width:100%;border:0;border-radius:12px;padding:10px;background:#ececf3;color:#3e4960;font-weight:800;cursor:pointer}
.cm-note{font-size:12px;color:#8a93a8;line-height:1.55;margin:10px 0 0}

.cm-lyria{border:1.5px solid #efc8f7;background:#fdf4ff;border-radius:14px;padding:12px;margin:0 0 10px;display:flex;flex-direction:column;gap:8px}
.cm-lyria b{color:#8d3199}
.cm-row{display:flex;gap:6px}.cm-row select{flex:1}
.cm-lyria select,.cm-lyria input,.cm-lyria textarea{border:1px solid #e3d3ee;border-radius:9px;padding:8px;font-size:13px;font-family:inherit}
.cm-make{border:0;border-radius:11px;padding:10px;font-weight:900;color:#fff;background:linear-gradient(100deg,#b44fd0,#7651e8);cursor:pointer}
.cm-make:disabled{opacity:.6}
.cm-lyria-status{margin:0;font-size:12.5px;color:#6b4a7a;line-height:1.5}
.cm-down{background:#e6f6ec;color:#1f7a45}

/* 🏛️ 뮤니 도서관 */
.tab-nav{grid-template-columns:1fr 1fr 1fr}
.tab-muni-lib:not(.active){background:linear-gradient(100deg,#fff8e6,#fdf4ff);color:#8d3199;border-color:#efc8f7}
.ml-hero{display:flex;gap:18px;align-items:center;background:linear-gradient(120deg,#fff8e6,#fde7f3 60%,#efe6ff);border-radius:24px;padding:18px 22px;margin-bottom:16px;word-break:keep-all}
.ml-hero img{width:92px;height:92px;object-fit:contain;flex:none}
.ml-hero h2{margin:0 0 6px;color:#4a2f8f;font-size:24px}.ml-hero p{margin:0;color:#5b4a78;font-size:14.5px;line-height:1.6}
.ml-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(250px,1fr));gap:16px}
.ml-card{background:#fff;border:1.5px solid #efe7fb;border-radius:20px;overflow:hidden;display:flex;flex-direction:column;box-shadow:0 8px 20px rgba(90,60,150,.07)}
.ml-cover{position:relative;border:0;padding:0;cursor:pointer;background:#f3eefc;aspect-ratio:1/1}
.ml-cover img{width:100%;height:100%;object-fit:cover;display:block}
.ml-badge{position:absolute;left:10px;top:10px;background:rgba(255,255,255,.92);color:#8d3199;font-size:11.5px;font-weight:900;padding:4px 9px;border-radius:999px}
.ml-body{padding:12px 14px 14px;display:flex;flex-direction:column;gap:6px;flex:1;word-break:keep-all}
.ml-body h3{margin:0;font-size:17px;color:#38275f}.ml-body p{margin:0;color:#6b7590;font-size:13px;line-height:1.5}
.ml-tags{display:flex;flex-wrap:wrap;gap:5px}.ml-tags span{font-size:11.5px;font-weight:800;background:#f4f0ff;color:#5b3fd0;border-radius:999px;padding:3px 8px}
.ml-actions{display:flex;gap:6px;margin-top:auto;padding-top:6px}
.ml-actions button{flex:1;border:0;border-radius:12px;padding:10px 8px;font-weight:900;cursor:pointer;font-size:13.5px}
.ml-read{background:linear-gradient(100deg,#7651e8,#9550e8);color:#fff}.ml-video{background:#ffe8ec;color:#c2185b}
.ml-empty{grid-column:1/-1;text-align:center;color:#94a3b8;padding:30px}
.library-book-bar{display:flex;flex-wrap:wrap;gap:8px;align-items:center;background:#fff8e6;border:1.5px solid #f7d58a;border-radius:14px;padding:9px 12px;margin-bottom:10px;font-weight:800;color:#7a5311;font-size:13.5px}
.library-book-bar span{margin-right:auto}
.library-book-bar button{border:0;border-radius:10px;padding:8px 12px;font-weight:900;cursor:pointer;background:#fff;color:#5b3fd0}
.library-book-bar .ml-bar-video{background:#ffe8ec;color:#c2185b}
body.viewing-library-book .save-btn,body.viewing-library-book #aiVoiceAddBtn,body.viewing-library-book .publish-btn{display:none !important}
.ml-busy{position:fixed;inset:0;z-index:100007;background:rgba(40,30,70,.45);display:none;place-items:center}
.ml-busy>div{background:#fff;border-radius:22px;padding:22px 26px;text-align:center}
.ml-busy img{width:80px;height:80px;object-fit:contain;animation:mlBob 1s ease-in-out infinite alternate}
.ml-busy p{margin:8px 0 0;color:#4a2f8f;font-weight:800}
@keyframes mlBob{from{transform:translateY(0)}to{transform:translateY(-8px)}}
.ml-video-modal{position:fixed;inset:0;z-index:100008;background:rgba(20,15,34,.7);display:grid;place-items:center;padding:14px}
.ml-video-box{background:#fff;border-radius:20px;padding:14px;width:min(900px,100%)}
.ml-video-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:8px;color:#4a2f8f}
.ml-video-close{border:0;background:#ececf3;border-radius:9px;padding:6px 10px;font-weight:900;cursor:pointer}
.ml-video-tabs{display:flex;gap:6px;margin-bottom:8px}
.ml-video-tabs button{border:0;border-radius:10px;padding:7px 12px;font-weight:900;cursor:pointer;background:#f4f0ff;color:#5b3fd0}
.ml-video-tabs button.on{background:#7651e8;color:#fff}
.ml-video-frame{aspect-ratio:16/9;background:#000;border-radius:12px;overflow:hidden}
.ml-video-frame iframe{width:100%;height:100%;border:0}
.ml-video-link{display:inline-block;margin-top:8px;font-size:13px;color:#6b7590}
.ml-form{display:flex;flex-direction:column;gap:8px;margin-bottom:10px}
.ml-form label{display:flex;flex-direction:column;gap:4px;font-size:13px;font-weight:800;color:#4f5870}
.ml-form input{border:1px solid #e3e6ee;border-radius:9px;padding:8px;font-size:13.5px;font-family:inherit}
@media (max-width:760px){.tab-nav{grid-template-columns:1fr 1fr 1fr;gap:6px}.tab-btn{font-size:12.5px;padding:10px 4px}.ml-hero{flex-direction:column;text-align:center}}

/* 🪞 증강 동화 모드 */
.controls .hud-btn{grid-column:1/-1;background:#12101c;color:#fff;font-size:15px;border:1.5px solid #3b2f6b}
.hud-stage{position:fixed;inset:0;z-index:100009;background:#000;overflow:hidden;cursor:pointer}
.hud-inner{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3vh;transition:transform .3s ease}
.hud-img{width:min(62vh,78vw);height:min(62vh,78vw);object-fit:cover;opacity:0;
  -webkit-mask-image:radial-gradient(circle at center,#000 52%,transparent 72%);mask-image:radial-gradient(circle at center,#000 52%,transparent 72%);
  animation:hudFloat 5s ease-in-out infinite alternate;filter:saturate(1.25) brightness(1.1)}
.hud-img.in{opacity:1;transition:opacity 1s ease}
@keyframes hudFloat{from{transform:translateY(-1.2vh)}to{transform:translateY(1.2vh)}}
.hud-sub{max-width:86vw;text-align:center;color:#fff;font-weight:900;font-size:clamp(18px,3.4vh,40px);line-height:1.45;word-break:keep-all;
  text-shadow:0 0 12px rgba(180,150,255,.9),0 0 26px rgba(120,90,255,.6);min-height:1.5em}
.hud-sub.talk{color:#ffe98a;text-shadow:0 0 12px rgba(255,210,90,.9),0 0 26px rgba(255,170,60,.6)}
.hud-sub.title{font-size:clamp(24px,5vh,56px);color:#ffd6f2;text-shadow:0 0 16px rgba(255,120,210,.9),0 0 34px rgba(200,90,255,.7)}
.hud-guide{position:absolute;inset:0;background:rgba(0,0,0,.72);display:grid;place-items:center;z-index:3;cursor:default}
.hud-guide-box{background:#fff;border-radius:22px;padding:20px 22px;width:min(460px,92vw);word-break:keep-all}
.hud-guide-box b{color:#4a2f8f;font-size:18px}
.hud-guide-box ol{padding-left:20px;color:#4b5570;font-size:14px;line-height:1.65;margin:10px 0 14px}
.hud-start{width:100%;border:0;border-radius:14px;padding:13px;font-size:16px;font-weight:900;color:#fff;background:linear-gradient(100deg,#7651e8,#c84fd0);cursor:pointer}
.hud-bar{position:absolute;left:50%;bottom:14px;transform:translateX(-50%);display:flex;gap:6px;z-index:2;opacity:0;pointer-events:none;transition:opacity .3s}
.hud-stage.show-bar .hud-bar,.hud-guide:not([style*="none"]) ~ .hud-bar{opacity:1;pointer-events:auto}
.hud-bar button{border:1px solid #444;background:#1a1726;color:#ddd;border-radius:10px;padding:9px 12px;font-weight:800;cursor:pointer;font-size:13px}
.hud-bar button.on{background:#4a2f8f;color:#fff;border-color:#7651e8}

.ml-share{border:1px dashed #d9cdf3;background:#fff;color:#6a47de;border-radius:10px;padding:7px 10px;font-weight:800;font-size:12.5px;cursor:pointer;margin-top:4px}
.ml-share-lib{margin-top:10px}
.ml-remove{border:1px solid #f3c9d3;background:#fff6f8;color:#c0395a;border-radius:10px;padding:7px 10px;font-weight:800;font-size:12.5px;cursor:pointer;margin-top:6px;width:100%}
.ml-remove small{font-weight:600;opacity:.7}
.ml-nocover{aspect-ratio:1/1;width:100%;display:grid;place-items:center;background:#f6f1ff;color:#8a78b8;font-weight:800;font-size:14px}

/* 📱 세로 릴스 */
.controls .reels-btn{grid-column:1/-1;background:linear-gradient(100deg,#f58529,#dd2a7b,#8134af);color:#fff;font-size:15px}
.rl-hint{font-weight:600 !important;color:#8a6a3a !important}
.rl-preview{display:flex;flex-direction:column;align-items:center;gap:8px;margin-top:8px}
.rl-preview video{max-height:52vh;border-radius:14px;background:#000}

/* 📖 첫 화면 뮤니 도서관 바로가기 띠 */
.go-lib-banner{display:flex;align-items:center;gap:14px;width:calc(100% - 60px);margin:14px 30px 4px;padding:14px 18px;border:3px solid #fff;border-radius:22px;background:linear-gradient(100deg,#fb8ec5,#b28bf5);color:#fff;cursor:pointer;text-align:left;box-shadow:0 8px 22px rgba(140,70,200,.25);font-family:inherit;transition:transform .15s ease}
.go-lib-banner:hover{transform:translateY(-2px)}
.go-lib-icon{font-size:34px;line-height:1}
.go-lib-text{flex:1;display:flex;flex-direction:column;gap:2px}
.go-lib-text b{font-size:20px;font-weight:900;text-shadow:0 2px 0 rgba(90,40,130,.35)}
.go-lib-text small{font-size:13px;font-weight:700;opacity:.95}
.go-lib-go{background:#fff;color:#8d3199;font-weight:900;font-size:15px;padding:10px 16px;border-radius:999px;white-space:nowrap;animation:goLibBounce 1.6s ease-in-out infinite}
@keyframes goLibBounce{0%,100%{transform:translateX(0)}50%{transform:translateX(5px)}}
@media (max-width:760px){.go-lib-banner{width:calc(100% - 28px);margin:12px 14px 2px}}
@media (max-width:560px){.go-lib-banner{flex-wrap:wrap;padding:12px 14px;gap:10px}.go-lib-icon{font-size:28px}.go-lib-text b{font-size:17px}.go-lib-go{width:100%;text-align:center;font-size:14.5px}}
@media (prefers-reduced-motion:reduce){.go-lib-go{animation:none}}
.guardian-lib{width:100%;margin-top:8px;border:2px solid #efc8f7;border-radius:14px;padding:12px;font-size:15px;font-weight:900;color:#8d3199;background:linear-gradient(100deg,#fff8e6,#fdf4ff);cursor:pointer}

/* 🏛️ 도서관 표지: 가로(16:9)·정사각형 그림 모두 잘리지 않게 — 16:9 칸에 원래 모양 그대로, 남는 곳은 같은 그림을 흐리게 */
.ml-cover{aspect-ratio:16/9;overflow:hidden}
.ml-cover .ml-cover-bg{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;filter:blur(14px) brightness(.92);transform:scale(1.15)}
.ml-cover .ml-cover-img{position:relative;width:100%;height:100%;object-fit:contain;display:block}
.ml-cover .ml-badge{z-index:1}
.ml-nocover{aspect-ratio:16/9}
.rl-check{display:flex !important;flex-wrap:wrap;align-items:center;gap:6px;font-weight:800;color:#5b3aa0;background:#f6f1ff;border-radius:12px;padding:9px 11px}
.rl-check small{font-weight:600;color:#8a78b8;flex-basis:100%}

/* 🎨 이 페이지 그림만 다시 그리기 (제작자) */
.page-item .redraw-box{position:absolute;top:10px;right:10px;z-index:3;width:auto !important}
body.is-creator .page-item .redraw-box{display:flex !important;gap:6px;flex-wrap:wrap;justify-content:flex-end}
.page-item .redraw-btn{border:2px solid #fff;border-radius:999px;padding:7px 13px;font-size:13px;font-weight:900;color:#fff;background:rgba(124,77,255,.88);box-shadow:0 4px 12px rgba(60,20,120,.3);cursor:pointer}
.page-item .redraw-btn:disabled{opacity:.7;cursor:wait}
