@font-face {
    font-family: 'DearFromsol';
    src: url('https://cdn.jsdelivr.net/gh/Project-Noonnu/2607161334@griun-fromsol-rg/griun-fromsol-rg/Griun_Fromsol-Rg.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

:root{
  --wine:#4b0814;--wine2:#741126;--red:#a61932;--pink:#f5dfe3;
  --paper:#fffdf9;--ink:#3c171c;--line:#dbbcc2;--soft:#fff7f7;
}
*{box-sizing:border-box}html{scroll-behavior:smooth}
body{margin:0;color:var(--ink);font-family:"Noto Sans KR",sans-serif;background:linear-gradient(#fbf7f5,#f8efec);overflow:hidden}
button,input,textarea,select{font:inherit}
.browserbar{height:56px;display:flex;align-items:center;justify-content:space-between;padding:0 28px;color:#fff;background:linear-gradient(#36050d,#5b0b18);border-bottom:3px  rgba(255,255,255,.42);box-shadow:0 3px 10px rgba(48,0,9,.35);position:fixed;inset:0 0 auto;z-index:100}
.address{font-size:18px}.window-buttons{display:flex;gap:8px}.window-buttons i{width:16px;height:16px;border-radius:50%;background:#fff}.window-buttons i:nth-child(2){background:#c83c58}.window-buttons i:nth-child(3){background:#ff83a0}
.site-shell{position:fixed;top:80px;left:50%;transform:translateX(-50%);width:min(1440px,96vw);height:calc(100vh - 104px);display:grid;grid-template-columns:440px 1fr}
.left-rail{background:linear-gradient(135deg,#470611,#7f1023);padding:24px 16px 34px 30px;border-radius:28px 0 0 28px;box-shadow:0 12px 28px rgba(72,4,17,.25);position:relative;z-index:8}
.paper{background:linear-gradient(#fffdfb,#fffaf7);border:4px double #cfabb1;box-shadow:inset 0 0 0 8px rgba(255,255,255,.75),0 8px 20px rgba(45,0,8,.18)}
.profile-page{height:100%;border-radius:14px 36px 36px 14px;padding:26px 28px 28px;overflow:hidden}
.counter{text-align:center;font-size:15px;font-weight:700;margin-bottom:18px;word-spacing:9px}.counter em{font-style:normal;color:#a56f77}
.photo-frame,.hero-banner{position:relative;border:2px solid var(--line);padding:8px;border-radius:12px;background:#fff}.photo-frame img{width:100%;aspect-ratio:1/1.05;object-fit:cover;display:block}.hero-banner img{width:100%;height:160px;object-fit:cover;display:block;border-radius:8px}
.profile-page h1{font-size:34px;margin:14px 0 3px;color:#7a1021}.role{font-weight:700;margin:0 0 18px}.status-title{font-weight:800;margin-bottom:8px}.status-bar{background:linear-gradient(90deg,#770b20,#bd2442,#8d1027);color:#fff;padding:8px 12px;border-radius:4px;display:flex;justify-content:space-between}.intro{line-height:1.8;border-bottom:1px solid var(--line);padding-bottom:18px}
.quick-links{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;margin-top:18px}.quick-links button{background:none;border:0;font-weight:700;cursor:pointer}.quick-links span{width:56px;height:48px;margin:0 auto 6px;display:grid;place-items:center;border:2px solid #6f1724;border-radius:8px 8px 16px 16px;background:linear-gradient(#fff2f3,#f5cfd5);font-size:23px}.quick-links b{display:block}
.ribbon{position:absolute;left:-20px;top:-20px;width:155px;height:105px;z-index:6}.ribbon:before,.ribbon:after{content:"";position:absolute;background:linear-gradient(135deg,#7d071b,#d33854 55%,#6b0718);box-shadow:0 4px 8px rgba(0,0,0,.25)}.ribbon:before{width:80px;height:52px;left:4px;top:20px;border-radius:70% 10% 70% 12%;transform:rotate(8deg)}.ribbon:after{width:80px;height:52px;right:2px;top:20px;border-radius:10% 70% 12% 70%;transform:rotate(-8deg)}.ribbon span{position:absolute;left:61px;top:28px;width:38px;height:38px;border-radius:8px;background:#8a0b20;z-index:2;transform:rotate(45deg)}
.book{position:relative;height:100%;background:linear-gradient(135deg,#560814,#941629);border-radius:0 28px 28px 0;padding:24px 90px 34px 16px;box-shadow:0 12px 28px rgba(72,4,17,.25)}
.main-page{height:100%;overflow-y:auto;overscroll-behavior:contain;border-radius:34px 14px 14px 34px;padding:24px 34px 32px 48px;scrollbar-width:thin;scrollbar-color:#8d1027 #f6e8e8}
.main-page::-webkit-scrollbar{width:10px}.main-page::-webkit-scrollbar-track{background:#f6e8e8}.main-page::-webkit-scrollbar-thumb{background:linear-gradient(#a61932,#5b0d19);border-radius:20px;border:2px solid #f6e8e8}
.book-spine{position:absolute;left:-28px;top:0;bottom:0;width:58px;z-index:5}.ring{position:absolute;left:0;width:72px;height:17px;border:5px solid #5a3034;border-radius:20px;background:linear-gradient(#f1e8e7,#9f8d8e,#fff);box-shadow:0 2px 4px rgba(0,0,0,.35)}.r1{top:130px}.r2{top:210px}.r3{top:690px}.heart-charm{position:absolute;top:285px;left:12px;width:52px;height:58px;display:grid;place-items:center;color:white;font-size:27px;background:radial-gradient(circle at 35% 25%,#ff8095,#a50024 50%,#52000e);clip-path:polygon(50% 100%,0 38%,10% 8%,40% 3%,50% 20%,60% 3%,90% 8%,100% 38%);filter:drop-shadow(0 4px 3px rgba(0,0,0,.35))}
.topline{display:flex;justify-content:flex-end;gap:40px;border-bottom:1px solid var(--line);padding:0 8px 10px;font-weight:700;color:#7c1c2a}.topline b{font-size:26px;letter-spacing:10px}
.hero{display:grid;grid-template-columns:1.05fr .95fr;gap:22px;align-items:center;padding:22px 0}.hero h2{font-size:32px;color:#7a1222;margin:0 0 10px}.hero p{margin:0;line-height:1.7;color:#79545c}.hero-buttons{display:flex;flex-wrap:wrap;gap:8px;margin-top:14px}.hero-link{border:0;border-radius:999px;padding:9px 13px;background:#7e1328;color:#fff;font-weight:800;cursor:pointer}
.cms-section-card{margin-top:18px;padding:18px;border:1.5px solid #b31a36;border-radius:14px;background:#fff;box-shadow:0 6px 18px rgba(91,10,26,.06)}
.section-head{display:flex;justify-content:space-between;align-items:center;gap:12px;padding-bottom:12px;border-bottom:1px solid #edd7db}.section-head h3{margin:0;color:#6e1424}.section-head small{color:#9a7279}.section-actions{display:none;gap:5px}.admin-mode .section-actions{display:flex}.section-actions button{border:0;border-radius:7px;padding:6px 8px;background:#f1dce1;color:#781124;font-size:11px;cursor:pointer}
.two-col{display:grid;grid-template-columns:1fr 1fr;gap:16px}.content-list{display:grid;gap:10px;padding-top:14px}.content-item{position:relative;padding:12px;border:1px solid #efdfe2;border-radius:10px;background:#fffafa}.content-item strong,.content-item small{display:block}.content-item small{color:#967079;margin-top:4px}.item-tools{position:absolute;right:7px;top:7px;display:none;gap:4px}.admin-mode .item-tools{display:flex}.item-tools button{border:0;background:#f2dce1;color:#7d1023;border-radius:6px;padding:4px 7px;font-size:11px;cursor:pointer}
.gallery-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:12px;padding-top:14px}.gallery-card{position:relative;border:1px solid #e4c7cd;border-radius:12px;overflow:hidden;background:#fff}.gallery-card img{width:100%;aspect-ratio:1/.8;object-fit:cover;display:block}.gallery-card div{padding:10px}.gallery-card b,.gallery-card span{display:block}.gallery-card span{font-size:12px;color:#8d6970;margin-top:4px}
.empty-state{padding:25px;text-align:center;color:#9b7f84}
.calendar-toolbar{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:14px 0}.calendar-toolbar .view-buttons{display:flex;gap:7px}.calendar-toolbar button{border:1px solid #d9b9bf;border-radius:8px;padding:8px 11px;background:#fff;color:#6f1223;cursor:pointer}.calendar-toolbar button.active{background:#7c1427;color:#fff}.calendar-title{font-size:20px;font-weight:800;color:#721225}
.month-grid{display:grid;grid-template-columns:repeat(7,1fr);border:1px solid #e2c9ce;border-radius:12px;overflow:hidden}.month-grid .dow{padding:9px;text-align:center;background:#f8e9ec;font-weight:800;color:#7e2636}.day-cell{min-height:98px;padding:7px;border-top:1px solid #ead7da;border-right:1px solid #ead7da;background:#fff}.day-cell:nth-child(7n){border-right:0}.day-cell.muted{background:#fffafa;color:#b9a4a8}.day-number{font-size:12px;font-weight:700}.event-pill{display:block;margin-top:5px;padding:4px 5px;border-radius:5px;background:#8f1831;color:#fff;font-size:10px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;cursor:pointer}.event-pill.type-collab{background:#6f4bb7}.event-pill.type-event{background:#1ca97a}.event-pill.type-off{background:#8c8c94}
.week-grid{display:grid;grid-template-columns:repeat(7,1fr);gap:8px}.week-day{min-height:230px;border:1px solid #e2c9ce;border-radius:11px;background:#fff;overflow:hidden}.week-day header{padding:10px;text-align:center;background:#f8e9ec}.week-day.today header{background:#7f1429;color:#fff}.week-events{padding:8px;display:grid;gap:7px}.week-event{padding:8px;border-radius:7px;background:#fff3f5;border-left:4px solid #8f1831;font-size:12px}.week-event b,.week-event span{display:block}.week-event span{color:#806169;margin-top:3px}
.tabs{position:absolute;right:-10px;top:65px;width:132px;display:flex;flex-direction:column;gap:24px;z-index:20}.tabs button{height:84px;border:2px solid #401015;border-radius:0 18px 18px 0;background:#fffaf7;color:#6b1724;font-size:25px;font-weight:700;display:flex;align-items:center;gap:14px;padding:0 18px;box-shadow:3px 4px 0 #2e090e,0 5px 12px rgba(0,0,0,.18);cursor:pointer}.tabs span{font-size:17px}.tabs .expand{height:108px;font-size:34px;justify-content:center}
.page-footer{display:flex;justify-content:space-between;gap:20px;margin:28px 0 6px;padding:18px 4px 8px;border-top:1px  #cfaab1;color:#7a2735}
.admin-toggle{position:fixed;right:18px;bottom:18px;z-index:300;border:1px solid #4d0b17;border-radius:999px;padding:10px 16px;background:linear-gradient(#8f1730,#5d0b1b);color:#fff;font-weight:800;box-shadow:0 8px 22px rgba(67,0,12,.28);cursor:pointer}
.admin-panel{position:fixed;top:0;right:0;bottom:0;width:min(410px,94vw);z-index:400;padding:18px;overflow:auto;background:#fffaf8;border-left:2px solid #741126;box-shadow:-12px 0 30px rgba(67,0,12,.22);transform:translateX(105%);transition:.25s}.admin-panel.open{transform:translateX(0)}.admin-head{display:flex;justify-content:space-between;align-items:flex-start;padding-bottom:14px;border-bottom:1px solid #dfc1c6}.admin-head b{display:block;font-size:21px;color:#711126}.admin-head small{display:block;color:#947078}.admin-head button{border:0;background:transparent;font-size:30px}.admin-section{padding:18px 0;border-bottom:1px solid #ead5d9}.admin-section>label{display:block;margin-bottom:10px;font-weight:800;color:#711126}.admin-section p{font-size:13px;color:#86636a}.admin-panel button,.import-label{border:1px solid #c99ea6;border-radius:8px;padding:10px 12px;background:#fff;color:#51111c;cursor:pointer;text-align:center}.admin-primary{background:#781124!important;color:#fff!important;border-color:#781124!important}.admin-actions{display:grid;gap:9px}.danger{color:#a20f2b!important}.import-label input{display:none}.section-admin-item,.tab-admin-item{display:grid;grid-template-columns:1fr auto auto;gap:7px;align-items:center;padding:9px;border:1px solid #e2c8cd;border-radius:9px;margin-bottom:7px;background:#fff}.section-admin-item button,.tab-admin-item button{padding:6px 8px;font-size:11px}
.admin-mode [data-cms-text]{outline:2px dashed rgba(166,25,50,.42);outline-offset:2px;cursor:text}.admin-mode [data-cms-text]:focus{outline:3px solid rgba(166,25,50,.72);background:#fff6f7}.image-edit-btn{position:absolute;right:10px;top:10px;z-index:30;display:none;border:0;border-radius:999px;padding:7px 10px;background:rgba(83,7,22,.9);color:#fff;font-size:12px;font-weight:800}.admin-mode .image-edit-btn{display:block}
.admin-toast{position:fixed;left:50%;bottom:24px;z-index:500;transform:translate(-50%,20px);opacity:0;padding:10px 16px;border-radius:999px;background:#43101a;color:#fff;transition:.2s}.admin-toast.show{opacity:1;transform:translate(-50%,0)}
dialog{width:min(560px,94vw);border:1px solid #9f5360;border-radius:16px;padding:0;box-shadow:0 18px 45px rgba(60,0,12,.3)}dialog::backdrop{background:rgba(45,0,9,.42)}#editorForm{padding:18px}.dialog-head{display:flex;justify-content:space-between;align-items:center;border-bottom:1px solid #ead4d8;padding-bottom:12px}.dialog-head b{font-size:20px;color:#751126}.dialog-head button{border:0;background:transparent;font-size:28px}.dialog-field{display:grid;gap:6px;margin-top:13px}.dialog-field input,.dialog-field textarea,.dialog-field select{width:100%;padding:10px;border:1px solid #d9b9bf;border-radius:8px}.dialog-field textarea{min-height:90px;resize:vertical}.dialog-check{display:flex;gap:8px;align-items:center;margin-top:13px}menu{display:flex;justify-content:flex-end;gap:8px;padding:16px 0 0;margin:0}menu button{border:1px solid #caa3aa;border-radius:8px;padding:9px 14px;background:#fff}
@media(max-width:1100px){.site-shell{grid-template-columns:330px 1fr}.book{padding-right:35px}.tabs{position:static;flex-direction:row;width:auto;gap:8px;margin-top:18px;flex-wrap:wrap}.tabs button{height:48px;border-radius:10px;box-shadow:none;padding:0 12px}.tabs .expand{height:48px}}
@media(max-width:800px){body{overflow:auto}.browserbar{position:sticky;height:48px}.site-shell{position:static;transform:none;width:94vw;height:auto;margin:14px auto;display:block}.left-rail,.book{border-radius:22px;margin-bottom:16px;padding:14px}.profile-page,.main-page{height:auto;overflow:visible;border-radius:18px;padding:20px}.book-spine,.ribbon{display:none}.hero,.two-col{grid-template-columns:1fr}.gallery-grid{grid-template-columns:1fr}.month-grid{font-size:11px}.day-cell{min-height:72px;padding:4px}.week-grid{grid-template-columns:1fr}.week-day{min-height:auto}.tabs{justify-content:center}.page-footer{flex-direction:column}.admin-toggle{right:10px;bottom:10px}}


/* ===== 첫 화면: 첨부 이미지와 같은 다이어리 홈 구성 ===== */
.home-cover{
  min-height:calc(100% - 42px);
  display:flex;
  flex-direction:column;
  padding:18px 0 8px;
}
.home-cover>h2{
  margin:0 0 14px;
  padding:0 14px 16px;
  border-bottom:1px solid var(--line);
  color:#7a1222;
  text-align:left;
  font-size:31px;
}
.cover-top{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:25px;
  align-items:start;
  padding:0 8px 15px;
}
.update-news h3{
  margin:0 0 10px;
  font-family:"Libre Caslon Text",serif;
  font-size:35px;
  font-style:italic;
  color:#241113;
}
.news-lines{
  display:grid;
  gap:6px;
}
.news-lines p{
  display:flex;
  align-items:center;
  gap:10px;
  margin:0;
  font-size:14px;
}
.news-lines b{
  flex:0 0 auto;
  min-width:58px;
  padding:4px 8px;
  border-radius:3px;
  background:#5b0d19;
  color:#fff;
  text-align:center;
  font-size:11px;
}
.music-label{
  display:flex;
  justify-content:flex-end;
  align-items:center;
  gap:13px;
  margin-bottom:7px;
  font-weight:800;
}
.music-label button{
  border:1px solid #9b6570;
  background:#fff;
  padding:3px 15px;
}
.music-player{
  position:relative;
  min-height:92px;
  margin-left:36px;
  padding:12px 15px 10px 91px;
  border:5px solid #4a1118;
  border-radius:7px;
  background:#fffaf6;
  box-shadow:0 4px 7px rgba(0,0,0,.13);
}
.record{
  position:absolute;
  left:-42px;
  top:-7px;
  width:98px;
  height:98px;
  display:grid;
  place-items:center;
  border:3px solid #080808;
  border-radius:50%;
  background:repeating-radial-gradient(circle,#111 0 7px,#262626 8px 11px);
}
.record:before{
  content:"";
  width:37px;
  height:37px;
  border-radius:50%;
  background:#be1537;
}
.record i{
  position:absolute;
  width:9px;
  height:9px;
  border-radius:50%;
  background:#fff;
}
.track b{display:block;font-size:14px}
.player-line{
  height:1px;
  margin:8px 0;
  background:#dec5c8;
}
.player-controls{font-weight:800;font-size:14px}
.volume-line{
  display:inline-block;
  width:75px;
  height:3px;
  position:relative;
  background:#ba7a84;
  vertical-align:middle;
}
.volume-line:after{
  content:"";
  position:absolute;
  left:34px;
  top:-2px;
  width:7px;
  height:7px;
  border-radius:50%;
  background:#5c1520;
}
.cover-photo{
  position:relative;
  margin:0 8px;
  padding:5px;
  border:2px solid #bd7b85;
  background:#fff;
}
.cover-photo img{
  display:block;
  width:100%;
  height:clamp(310px,43vh,455px);
  object-fit:cover;
}
.home-cover .hero-buttons{
  justify-content:center;
  min-height:0;
  margin-top:9px;
}
.home-cover .hero-buttons:empty{display:none}

/* 휠이 왼쪽 프로필·책 테두리·메뉴 위에 있어도 오른쪽 내용이 내려가도록 함 */
.main-page{
  min-height:0;
  scroll-behavior:smooth;
  -webkit-overflow-scrolling:touch;
}
.site-shell,.book,.left-rail{
  overscroll-behavior:none;
}
@media(min-width:801px){
  .home-cover{
    min-height:calc(100vh - 174px);
  }
}
@media(max-width:1100px){
  .cover-top{grid-template-columns:1fr}
  .cover-photo img{height:340px}
}
@media(max-width:800px){
  .home-cover{min-height:auto}
  .cover-top{grid-template-columns:1fr}
  .music-player{margin-left:35px}
  .cover-photo img{height:auto}
}


/* ===== 실뭉치 대표 이미지 아래 기능 구성 ===== */
#sectionContainer{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:16px;
  align-items:start;
  padding-top:22px;
}

#sectionContainer .cms-section-card{
  margin-top:0;
}

#sectionContainer .section-profile{
  grid-column:1;
}
#sectionContainer .section-dday{
  grid-column:2;
}
#sectionContainer .section-notice{
  grid-column:1;
}
#sectionContainer .section-weekly{
  grid-column:2;
}
#sectionContainer .section-calendar,
#sectionContainer .section-signature,
#sectionContainer .section-outfit,
#sectionContainer .section-punishment{
  grid-column:1 / -1;
}

.dashboard-card{
  min-height:240px;
}
.section-notice,
.section-weekly{
  min-height:330px;
}
.section-signature,
.section-outfit{
  min-height:105px;
}
.section-punishment{
  min-height:210px;
}

.section-profile .content-item{
  min-height:150px;
  display:flex;
  flex-direction:column;
  justify-content:center;
}
.section-profile .content-item strong{
  font-size:18px;
  color:#741126;
}
.section-profile .content-item small{
  margin-top:12px;
  line-height:1.75;
}

.section-dday .content-item{
  display:grid;
  grid-template-columns:1fr auto;
  align-items:center;
  gap:12px;
}
.section-dday .content-item small{
  grid-column:1;
}
.section-dday .content-item:after{
  content:"♥";
  grid-column:2;
  grid-row:1 / span 2;
  color:#c32c4b;
  font-size:18px;
}

.section-weekly .content-item{
  padding-left:48px;
}
.section-weekly .content-item:before{
  content:"";
  position:absolute;
  left:12px;
  top:50%;
  width:26px;
  height:26px;
  transform:translateY(-50%);
  border-radius:50%;
  background:#941a34;
}
.section-weekly .content-item:nth-child(3){
  background:#e9faf2;
}
.section-weekly .content-item:nth-child(3):before{
  background:#24aa79;
}

.section-signature .empty-state,
.section-outfit .empty-state,
.section-punishment .empty-state{
  min-height:65px;
}

.section-calendar{
  scroll-margin-top:20px;
}

@media(max-width:800px){
  #sectionContainer{
    grid-template-columns:1fr;
  }
  #sectionContainer .cms-section-card{
    grid-column:1!important;
  }
}


/* ===== 최종 스크롤 수정: 페이지 전체가 자연스럽게 아래로 내려가도록 ===== */
html,
body{
  min-height:100%;
}

body{
  overflow-y:auto!important;
  overflow-x:hidden;
}

@media(min-width:801px){
  .browserbar{
    position:sticky;
    top:0;
  }

  .site-shell{
    position:relative!important;
    top:auto!important;
    left:auto!important;
    transform:none!important;
    width:min(1440px,96vw);
    height:auto!important;
    min-height:calc(100vh - 104px);
    margin:24px auto 48px;
    align-items:start;
  }

  .left-rail{
    position:sticky!important;
    top:80px;
    height:calc(100vh - 104px);
    align-self:start;
  }

  .profile-page{
    height:100%;
  }

  .book{
    height:auto!important;
    min-height:calc(100vh - 104px);
    overflow:visible!important;
  }

  .main-page{
    height:auto!important;
    min-height:calc(100vh - 152px);
    overflow:visible!important;
  }

  .home-cover{
    min-height:calc(100vh - 185px);
  }

  .tabs{
    position:sticky!important;
    top:86px;
    float:right;
    margin-right:-100px;
    align-self:start;
  }

  #sectionContainer{
    position:relative;
    z-index:2;
    padding-bottom:24px;
  }
}

/* 기능 섹션은 저장 상태와 관계없이 기본 표시 */
#sectionContainer > .cms-section-card{
  display:block!important;
  visibility:visible!important;
  opacity:1!important;
}

.scroll-guide{
  display:block;
  margin:4px auto 0;
  border:0;
  background:transparent;
  color:#8c3142;
  font-size:12px;
  font-weight:800;
  cursor:pointer;
  animation:scrollGuide 1.5s ease-in-out infinite;
}
@keyframes scrollGuide{
  0%,100%{transform:translateY(0)}
  50%{transform:translateY(5px)}
}


/* 첫 화면과 아래 섹션 간격 축소 */
.home-cover{
  padding-bottom:0 !important;
}
.home-cover .hero-buttons{
  margin-top:8px !important;
  margin-bottom:2px !important;
}
#sectionContainer{
  padding-top:6px !important;
}


/* ===== 첫 화면과 아래 콘텐츠 간격 최소화 ===== */
.home-cover{
    min-height:auto !important;
    padding:0 0 2px 0 !important;
    margin:0 !important;
}

.cover-photo{
    margin-bottom:4px !important;
}

.home-cover .hero-buttons{
    margin-top:2px !important;
    margin-bottom:0 !important;
    gap:6px !important;
}

.scroll-guide{
    margin:2px auto 2px !important;
    line-height:1 !important;
    font-size:11px !important;
}

#sectionContainer{
    margin-top:0 !important;
    padding-top:2px !important;
    gap:10px !important;
}

/* 버튼 바로 아래에서 다음 섹션이 시작되도록 */
.home-cover + #sectionContainer{
    margin-top:0 !important;
}


/* ===== 오른쪽 메뉴 항상 메인화면 우측에 고정 ===== */
@media (min-width:801px){
  .book{
    position:relative !important;
  }

  .tabs{
    position:fixed !important;
    top:90px !important;
    right:calc((100vw - min(1440px,96vw))/2 - 18px) !important;
    width:132px !important;
    margin:0 !important;
    float:none !important;
    z-index:1000 !important;
    display:flex !important;
    flex-direction:column !important;
    gap:20px !important;
  }

  .tabs button{
    transform:none !important;
  }
}


/* ===== SOOP ID 자동 프로필 연동 ===== */
.punishment-profile-list{
  display:grid;
  gap:10px;
  padding-top:14px;
}
.punishment-profile-card{
  position:relative;
  display:grid;
  grid-template-columns:58px 1fr;
  gap:13px;
  align-items:center;
  min-height:82px;
  padding:11px 52px 11px 11px;
  border:1px solid #ead2d7;
  border-radius:12px;
  background:#fffafa;
}
.soop-avatar-link{
  display:block;
  width:58px;
  height:58px;
}
.soop-avatar{
  width:58px;
  height:58px;
  display:grid;
  place-items:center;
  object-fit:cover;
  border:2px solid #a91d39;
  border-radius:50%;
  background:#f5dce1;
  color:#8b1830;
  font-size:11px;
  font-weight:800;
}
.punishment-profile-info p{
  margin:5px 0 7px;
  color:#71545a;
  font-size:13px;
}
.punishment-name-row{
  display:flex;
  align-items:center;
  gap:8px;
  flex-wrap:wrap;
}
.punishment-name-row a{
  color:#a11b37;
  font-size:12px;
  text-decoration:none;
}
.punishment-status{
  display:inline-block;
  padding:4px 8px;
  border-radius:999px;
  background:#f3dce1;
  color:#8b1730;
  font-size:11px;
  font-weight:800;
}
.soop-lookup-row{
  display:flex;
  align-items:center;
  gap:9px;
  margin-top:10px;
}
.soop-lookup-row button{
  border:0;
  border-radius:8px;
  padding:9px 11px;
  background:#87162d;
  color:#fff;
  font-weight:800;
  cursor:pointer;
}
.soop-lookup-row button:disabled{opacity:.55}
.soop-lookup-row span{
  color:#86636a;
  font-size:12px;
}
.soop-profile-preview{
  min-height:70px;
  margin-top:11px;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:11px;
  border:1px  #d9b6bd;
  border-radius:10px;
  background:#fff8f8;
  color:#9c7b82;
  font-size:12px;
}
.soop-profile-preview.has-profile{
  justify-content:flex-start;
  padding:9px;
}
.soop-profile-preview img{
  width:52px;
  height:52px;
  object-fit:cover;
  border-radius:50%;
  border:2px solid #a91d39;
}
.soop-profile-preview b,
.soop-profile-preview span{
  display:block;
}
.soop-profile-preview span{margin-top:3px}


/* ===== 방셀 숙제 현황: 첨부 이미지형 사용자 목록 ===== */
.punishment-profile-list{
  display:grid;
  gap:8px;
  padding-top:14px;
}
.punishment-profile-card{
  position:relative;
  display:grid;
  grid-template-columns:52px minmax(0,1fr) auto;
  gap:12px;
  align-items:center;
  min-height:72px;
  padding:9px 12px;
  border:1px solid #ead7db;
  border-radius:9px;
  background:#fff;
  box-shadow:0 2px 7px rgba(91,10,26,.04);
}
.soop-avatar-link,
.soop-avatar{
  width:48px;
  height:48px;
}
.soop-avatar{
  border:1px solid #e0c2c8;
  box-shadow:0 2px 6px rgba(91,10,26,.12);
}
.soop-avatar.fallback{
  background:linear-gradient(135deg,#f8e7ea,#edd0d6);
  color:#8b1830;
}
.punishment-profile-info{
  min-width:0;
}
.punishment-name-row{
  display:flex;
  align-items:center;
  gap:7px;
  line-height:1.25;
}
.punishment-name-row strong{
  font-size:14px;
  color:#47121b;
}
.soop-id{
  color:#9d777e;
  font-size:11px;
}
.punishment-tags{
  display:flex;
  gap:6px;
  flex-wrap:wrap;
  margin-top:7px;
}
.punishment-tags span{
  max-width:240px;
  padding:4px 8px;
  border-radius:999px;
  background:#f7e8eb;
  color:#8b2639;
  font-size:10px;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.punishment-actions{
  display:flex;
  gap:6px;
  align-items:center;
}
.punishment-actions a,
.punishment-actions button{
  border:1px solid #d9b5bc;
  border-radius:7px;
  padding:6px 9px;
  background:#fffafa;
  color:#781124;
  font-size:11px;
  font-weight:800;
  text-decoration:none;
  cursor:pointer;
}
.punishment-actions a{
  background:#86162e;
  color:#fff;
  border-color:#86162e;
}
.punishment-profile-card>.item-tools{
  right:5px;
  top:-6px;
}
@media(max-width:600px){
  .punishment-profile-card{
    grid-template-columns:48px minmax(0,1fr);
  }
  .punishment-actions{
    grid-column:1/-1;
    justify-content:flex-end;
  }
}


/* ===== 방셀 숙제 현황: 첨부 이미지형 카드 그리드 ===== */
.section-punishment{
  border-color:#bdeed9!important;
  background:#fbfffd!important;
}
.section-punishment .section-head{
  border-color:#c7efdd;
}
.section-punishment .section-head h3{
  color:#092f2b;
  font-size:20px;
}
.homework-toolbar{
  padding:14px 0 4px;
}
.homework-updated{
  display:flex;
  width:max-content;
  max-width:100%;
  align-items:center;
  gap:7px;
  margin-left:auto;
  margin-bottom:13px;
  padding:8px 14px;
  border-radius:999px;
  background:#d5f9e8;
  color:#08765d;
  font-size:12px;
}
.homework-search{
  width:100%;
  padding:12px 18px;
  border:1px solid #c7eddc;
  border-radius:999px;
  background:#f5fcf8;
  color:#123b34;
  outline:none;
}
.homework-search:focus{
  border-color:#49c69a;
  box-shadow:0 0 0 3px rgba(73,198,154,.12);
}
.punishment-profile-list{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:14px;
  padding-top:14px;
}
.punishment-profile-card{
  position:relative;
  display:block;
  min-height:232px;
  padding:13px;
  border:1px solid #c7f0de;
  border-radius:24px;
  background:#fff;
  box-shadow:0 12px 24px rgba(13,118,91,.05);
  text-align:center;
}
.soop-avatar-link{
  display:block;
  width:54px;
  height:54px;
  margin:0 auto 6px;
}
.soop-avatar{
  width:54px;
  height:54px;
  border:2px solid #9fe8ca;
  border-radius:50%;
  object-fit:cover;
  background:#effbf5;
  color:#08765d;
}
.punishment-profile-info>strong{
  display:block;
  color:#123b34;
  font-size:15px;
}
.soop-id{
  display:block;
  margin-top:2px;
  color:#009b76!important;
  font-size:12px!important;
  text-decoration:none;
}
.homework-lines{
  margin-top:9px;
  padding-top:8px;
  border-top:1px solid #ccefe0;
  text-align:left;
}
.homework-lines>div{
  display:grid;
  grid-template-columns:1fr auto;
  gap:8px;
  padding:4px 0;
  color:#24584f;
  font-size:12px;
}
.homework-lines b{
  color:#07956f;
}
.homework-empty{
  display:block!important;
  text-align:center;
  color:#8fa9a3;
}
.field-help{
  margin:6px 0 0;
  color:#8b6a72;
  font-size:11px;
}
.section-punishment .mini-add{
  display:block;
  margin:14px 0 0 auto;
  border:0;
  border-radius:999px;
  padding:9px 14px;
  background:#0aa77c;
  color:#fff;
  font-weight:800;
}
@media(max-width:1150px){
  .punishment-profile-list{grid-template-columns:repeat(3,minmax(0,1fr))}
}
@media(max-width:800px){
  .punishment-profile-list{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:520px){
  .punishment-profile-list{grid-template-columns:1fr}
}


/* SOOP 프로필 자동 조회 실패 시 사용하는 기본 실뭉치 이미지 */
.soop-avatar,
.soop-profile-preview img{
  background:#fff6f7;
}


/* ===== 방셀 숙제 현황 색상 통일: 버건디 · 화이트 ===== */
.section-punishment{
  border-color:#b31a36!important;
  background:#fffdfb!important;
}
.section-punishment .section-head{
  border-color:#ead1d6!important;
}
.section-punishment .section-head h3{
  color:#6e1424!important;
}
.section-punishment .section-head small{
  color:#9a7279!important;
}
.homework-updated{
  background:#f6e1e5!important;
  color:#86162e!important;
}
.homework-search{
  border-color:#dfbec5!important;
  background:#fff8f8!important;
  color:#4b1822!important;
}
.homework-search:focus{
  border-color:#a91d39!important;
  box-shadow:0 0 0 3px rgba(169,29,57,.12)!important;
}
.punishment-profile-card{
  border-color:#e3bcc4!important;
  background:#fffafa!important;
  box-shadow:0 10px 22px rgba(91,10,26,.06)!important;
}
.soop-avatar{
  border-color:#b32440!important;
  background:#fff1f3!important;
  color:#8b1830!important;
}
.punishment-profile-info>strong{
  color:#4e1721!important;
}
.soop-id{
  color:#a21b38!important;
}
.homework-lines{
  border-color:#e3c7cd!important;
}
.homework-lines>div{
  color:#67474e!important;
}
.homework-lines b{
  color:#97152e!important;
}
.homework-empty{
  color:#a1848a!important;
}
.section-punishment .mini-add{
  background:#8f1630!important;
}
.soop-profile-preview{
  border-color:#d9b6bd!important;
  background:#fff8f8!important;
}
.soop-profile-preview img{
  border-color:#a91d39!important;
}

/* 기본 실뭉치 이미지는 카드 안에서 잘리지 않게 표시 */
.soop-avatar{
  object-fit:contain!important;
  padding:3px;
}


/* ===== 스크롤 내용이 책 밖으로 튀어나오지 않도록 고정 ===== */
@media (min-width:801px){
  html,
  body{
    height:100%;
    overflow:hidden!important;
  }

  .browserbar{
    position:fixed!important;
    top:0;
    left:0;
    right:0;
    z-index:3000;
  }

  .site-shell{
    position:fixed!important;
    top:80px!important;
    left:50%!important;
    transform:translateX(-50%)!important;
    width:min(1440px,96vw)!important;
    height:calc(100vh - 104px)!important;
    min-height:0!important;
    margin:0!important;
    align-items:stretch!important;
    overflow:visible!important;
  }

  .left-rail{
    position:relative!important;
    top:auto!important;
    height:100%!important;
    overflow:hidden!important;
  }

  .profile-page{
    height:100%!important;
    overflow:hidden!important;
  }

  .book{
    position:relative!important;
    height:100%!important;
    min-height:0!important;
    overflow:hidden!important;
  }

  .main-page{
    position:relative!important;
    height:100%!important;
    min-height:0!important;
    overflow-y:auto!important;
    overflow-x:hidden!important;
    overscroll-behavior:contain!important;
    scroll-behavior:smooth;
    -webkit-overflow-scrolling:touch;
  }

  /* 책 상단보다 위로 내용이 보이는 현상 방지 */
  .book::before{
    content:"";
    position:absolute;
    left:0;
    right:0;
    top:0;
    height:24px;
    z-index:30;
    pointer-events:none;
    background:linear-gradient(135deg,#560814,#941629);
  }

  .tabs{
    position:fixed!important;
    top:90px!important;
    right:calc((100vw - min(1440px,96vw))/2 - 18px)!important;
    z-index:3500!important;
  }
}


/* ===== 오른쪽 메뉴를 버건디 끝선에 정확히 붙이기 ===== */
@media (min-width:801px){
  .tabs{
    position:fixed !important;
    top:90px !important;
    right:max(12px, calc((100vw - min(1440px,96vw))/2 - 34px)) !important;
    z-index:4000 !important;
    display:flex;
    flex-direction:column;
    gap:18px;
  }

  .tabs .tab{
    margin:0 !important;
  }
}


/* 책 자체를 기준으로 메뉴를 오른쪽 끝에 고정 */
@media (min-width:801px){
  .book{
    position:relative !important;
  }

  .tabs{
    position:absolute !important;
    top:36px !important;
    right:-118px !important; /* 책 오른쪽 바깥 끝 */
    left:auto !important;
    transform:none !important;
    z-index:5000 !important;
  }
}


/* ===== 오른쪽 탭 메뉴가 잘리지 않고 책 옆에 전부 보이도록 ===== */
@media (min-width:801px){
  /*
    메뉴가 들어갈 공간을 화면 오른쪽에 미리 확보한다.
    기존 96vw 폭을 그대로 쓰면 right:-값 때문에 화면 밖으로 잘릴 수 있다.
  */
  .site-shell{
    width:min(1320px, calc(100vw - 190px)) !important;
    overflow:visible !important;
  }

  .book{
    position:relative !important;
    overflow:visible !important;
  }

  .tabs{
    position:absolute !important;
    top:40px !important;
    right:-142px !important;
    left:auto !important;
    width:150px !important;
    margin:0 !important;
    transform:none !important;
    display:flex !important;
    flex-direction:column !important;
    gap:14px !important;
    z-index:5000 !important;
  }

  .tabs button{
    width:150px !important;
    height:82px !important;
    padding:0 18px !important;
    border-radius:0 18px 18px 0 !important;
    justify-content:flex-start !important;
    background:#fffaf7 !important;
    box-shadow:3px 4px 0 #2e090e,0 5px 12px rgba(0,0,0,.18) !important;
  }

  .tabs button span{
    white-space:nowrap !important;
  }

  .tabs .expand{
    height:112px !important;
    justify-content:center !important;
    font-size:34px !important;
  }
}


/* 메뉴 크기를 원래 느낌으로 복원 */
@media (min-width:801px){
  .tabs{
    width:132px !important;
    right:-124px !important;
    gap:12px !important;
  }

  .tabs button{
    width:132px !important;
    height:72px !important;
    padding:0 16px !important;
    border-radius:0 16px 16px 0 !important;
    font-size:15px !important;
  }

  .tabs button svg,
  .tabs button i{
    font-size:20px !important;
  }

  .tabs .expand{
    width:132px !important;
    height:92px !important;
    font-size:28px !important;
  }
}


/* ===== 월간·주간 일정 이미지 ===== */
.event-pill{
  display:flex!important;
  align-items:center;
  gap:4px;
}
.event-pill img{
  width:18px;
  height:18px;
  flex:0 0 18px;
  object-fit:cover;
  border-radius:4px;
  border:1px solid rgba(255,255,255,.5);
}
.event-pill>span{
  min-width:0;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.day-cell:has(.event-pill.has-image){
  min-height:112px;
}
.week-event.has-image{
  display:grid;
  grid-template-columns:48px 1fr;
  gap:8px;
  align-items:center;
}
.week-event img{
  width:48px;
  height:48px;
  object-fit:cover;
  border-radius:7px;
  border:1px solid #dfbec5;
}
.calendar-image-editor{
  margin-top:13px;
}
.calendar-image-preview{
  min-height:74px;
  margin-top:9px;
  display:grid;
  place-items:center;
  border:1px  #d9b6bd;
  border-radius:10px;
  background:#fff8f8;
  color:#9c7b82;
  font-size:12px;
}
.calendar-image-preview.has-image{
  display:flex;
  justify-content:flex-start;
  gap:12px;
  padding:9px;
}
.calendar-image-preview img{
  width:82px;
  height:62px;
  object-fit:cover;
  border-radius:8px;
  border:1px solid #d8b7bd;
}
.calendar-image-preview button{
  border:1px solid #c99ea6;
  border-radius:8px;
  padding:8px 10px;
  background:#fff;
  color:#8a1830;
  cursor:pointer;
}


/* ===== 캘린더 일정 이미지 추가 버튼 · 투명도 조절 ===== */
.calendar-image-editor{
  margin-top:15px;
  padding:14px;
  border:1px solid #e2c2c8;
  border-radius:12px;
  background:#fff8f8;
}
.calendar-image-toolbar{
  display:flex;
  gap:8px;
  align-items:center;
  flex-wrap:wrap;
}
.calendar-add-image-btn{
  border:0!important;
  border-radius:9px!important;
  padding:10px 15px!important;
  background:#87162d!important;
  color:#fff!important;
  font-weight:800!important;
  cursor:pointer;
}
.calendar-remove-image-btn{
  border:1px solid #c99ea6!important;
  border-radius:9px!important;
  padding:9px 13px!important;
  background:#fff!important;
  color:#8a1830!important;
  cursor:pointer;
}
.calendar-opacity-control{
  margin-top:14px;
  padding:11px 12px;
  border:1px solid #ead2d7;
  border-radius:10px;
  background:#fff;
}
.calendar-opacity-control>div{
  display:flex;
  justify-content:space-between;
  gap:12px;
  margin-bottom:8px;
  color:#6f1724;
  font-size:13px;
}
.calendar-opacity-control input[type="range"]{
  width:100%;
  accent-color:#8a1830;
  cursor:pointer;
}
.calendar-image-preview{
  min-height:100px!important;
  margin-top:12px!important;
}
.calendar-image-preview.has-image{
  display:grid!important;
  grid-template-columns:120px 1fr;
  align-items:center;
}
.calendar-image-preview img{
  width:120px!important;
  height:82px!important;
  object-fit:cover;
}
@media(max-width:520px){
  .calendar-image-preview.has-image{
    grid-template-columns:1fr;
  }
}


/* ===== 월간 캘린더 자체 배경이미지 ===== */
.month-calendar-wrap{
  position:relative;
  overflow:hidden;
  border-radius:12px;
}
.month-calendar-bg{
  position:absolute;
  inset:0;
  z-index:0;
  background-position:center;
  background-size:cover;
  background-repeat:no-repeat;
  opacity:var(--calendar-bg-opacity,.18);
  pointer-events:none;
}
.month-calendar-wrap .month-grid{
  position:relative;
  z-index:1;
  background:transparent!important;
}
.month-calendar-wrap .dow{
  background:rgba(248,233,236,.88)!important;
  backdrop-filter:blur(2px);
}
.month-calendar-wrap .day-cell{
  background:rgba(255,255,255,.76)!important;
  backdrop-filter:blur(1.5px);
}
.month-calendar-wrap .day-cell.muted{
  background:rgba(255,250,250,.70)!important;
}

/* 관리자 캘린더 배경 설정 */
.calendar-bg-editor{
  margin-top:15px;
  padding:14px;
  border:1px solid #e2c2c8;
  border-radius:12px;
  background:#fff8f8;
}
.calendar-bg-toolbar{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
}
.calendar-bg-toolbar button{
  border:1px solid #c99ea6;
  border-radius:9px;
  padding:9px 12px;
  background:#fff;
  color:#7e1529;
  cursor:pointer;
}
#addCalendarBgBtn{
  border:0!important;
  background:#87162d!important;
  color:#fff!important;
  font-weight:800;
}
.calendar-bg-opacity{
  margin-top:13px;
  padding:11px 12px;
  border:1px solid #ead2d7;
  border-radius:10px;
  background:#fff;
}
.calendar-bg-opacity>div{
  display:flex;
  justify-content:space-between;
  gap:12px;
  margin-bottom:8px;
  color:#6f1724;
  font-size:13px;
}
.calendar-bg-opacity input[type="range"]{
  width:100%;
  accent-color:#8a1830;
}
.calendar-bg-preview{
  min-height:120px;
  margin-top:12px;
  display:grid;
  place-items:center;
  border:1px  #d9b6bd;
  border-radius:10px;
  background:#fff;
  color:#9c7b82;
  overflow:hidden;
}
.calendar-bg-preview img{
  width:100%;
  height:180px;
  object-fit:cover;
}


/* ===== 전용 캘린더 설정창 ===== */
.calendar-settings-dialog{
  width:min(620px,94vw)!important;
  max-height:90vh;
  overflow:auto;
  z-index:99999;
}
.calendar-settings-dialog .dialog-head small{
  display:block;
  margin-top:4px;
  color:#947078;
}
.calendar-bg-editor.always-visible{
  display:block!important;
  margin-top:16px;
}
.calendar-bg-editor.always-visible h3{
  margin:0 0 5px;
  color:#741126;
}
.calendar-bg-editor.always-visible>p{
  margin:0 0 13px;
  color:#86636a;
  font-size:13px;
}
#addCalendarBgBtnDirect{
  border:0!important;
  background:#87162d!important;
  color:#fff!important;
  font-weight:800;
}
#removeCalendarBgBtnDirect{
  border:1px solid #c99ea6!important;
  background:#fff!important;
  color:#8a1830!important;
}
#calendarBgPreviewDirect{
  min-height:180px;
}
#calendarBgPreviewDirect img{
  width:100%;
  height:230px;
  object-fit:cover;
}


/* ===== 론티 커스텀 커서 ===== */
#lonteaCustomCursor{
  --cursor-size:32px;
  position:fixed;
  left:0;
  top:0;
  z-index:2147483646;
  width:var(--cursor-size);
  height:var(--cursor-size);
  display:grid;
  place-items:center;
  pointer-events:none;
  will-change:transform;
  transition:width .16s ease,height .16s ease,filter .16s ease;
  filter:drop-shadow(0 2px 3px rgba(80,12,28,.2));
}
#lonteaCustomCursor img{
  width:100%;
  height:100%;
  object-fit:contain;
  display:block;
}
#lonteaCustomCursor span{
  font-size:calc(var(--cursor-size) * .76);
  line-height:1;
}
#lonteaCustomCursor.is-hovering{
  width:calc(var(--cursor-size) * 1.18);
  height:calc(var(--cursor-size) * 1.18);
  filter:drop-shadow(0 3px 5px rgba(105,14,36,.28));
}
#lonteaCustomCursor.is-clicking{
  width:calc(var(--cursor-size) * .82);
  height:calc(var(--cursor-size) * .82);
}
body.custom-cursor-enabled,
body.custom-cursor-enabled *{
  cursor:none!important;
}
body.custom-cursor-enabled dialog,
body.custom-cursor-enabled dialog *{
  cursor:none!important;
}
.cursor-trail-star,
.cursor-click-heart{
  position:fixed;
  z-index:2147483645;
  pointer-events:none;
  color:#8d1730;
  font-style:normal;
  user-select:none;
}
.cursor-trail-star{
  animation:cursorTrailFade .65s ease-out forwards;
  font-size:13px;
}
.cursor-click-heart{
  animation:cursorClickPop .72s cubic-bezier(.2,.8,.2,1) forwards;
  font-size:14px;
}
@keyframes cursorTrailFade{
  from{opacity:.8;transform:translate(-50%,-50%) scale(1)}
  to{opacity:0;transform:translate(-50%,-18px) scale(.25)}
}
@keyframes cursorClickPop{
  from{opacity:1;transform:translate(-50%,-50%) scale(.55)}
  to{opacity:0;transform:translate(calc(-50% + var(--dx)),calc(-50% + var(--dy))) scale(1.25)}
}
@media(pointer:coarse),(max-width:800px){
  #lonteaCustomCursor,
  .cursor-trail-star,
  .cursor-click-heart{display:none!important}
  body.custom-cursor-enabled,
  body.custom-cursor-enabled *{cursor:auto!important}
}

/* ===== 커서 설정창 ===== */
.cursor-settings-dialog{
  width:min(610px,94vw)!important;
  max-height:90vh;
  overflow:auto;
}
.cursor-editor{
  padding-top:4px;
}
.cursor-toggle-row{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:18px;
  padding:13px;
  border:1px solid #ead0d5;
  border-radius:11px;
  background:#fff8f9;
}
.cursor-toggle-row span{
  display:grid;
  gap:3px;
}
.cursor-toggle-row small,
.cursor-options small{
  color:#917078;
  font-size:12px;
}
.cursor-toggle-row input{
  width:20px;
  height:20px;
  accent-color:#86162d;
}
.cursor-upload-row{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  margin-top:13px;
}
.cursor-upload-row button{
  padding:10px 13px;
  border:1px solid #c99da6;
  border-radius:9px;
  background:#fff;
  color:#80162a;
}
#addCursorImageBtn{
  border:0;
  background:#86162d;
  color:#fff;
  font-weight:800;
}
.cursor-control{
  margin-top:13px;
  padding:12px;
  border:1px solid #ead0d5;
  border-radius:10px;
}
.cursor-control>div{
  display:flex;
  justify-content:space-between;
  margin-bottom:8px;
  color:#6f1725;
  font-size:13px;
}
.cursor-control input{
  width:100%;
  accent-color:#86162d;
}
.cursor-options{
  display:grid;
  gap:8px;
  margin-top:13px;
}
.cursor-options label{
  display:flex;
  align-items:flex-start;
  gap:10px;
  padding:10px 11px;
  border:1px solid #edd7db;
  border-radius:9px;
  background:#fffafa;
}
.cursor-options label>span{
  display:grid;
  gap:2px;
}
.cursor-options input{
  margin-top:3px;
  accent-color:#86162d;
}
.cursor-preview-box{
  margin-top:14px;
}
#cursorPreviewArea{
  position:relative;
  height:190px;
  margin-top:7px;
  overflow:hidden;
  display:grid;
  place-items:center;
  border:1px  #d6adb6;
  border-radius:11px;
  background:
    radial-gradient(circle at 20% 20%,rgba(137,22,47,.06),transparent 25%),
    linear-gradient(135deg,#fffafa,#f9ecef);
  color:#a18389;
}
.cursor-preview-icon{
  position:absolute;
  left:50%;
  top:55%;
  transform:translate(-20%,-15%);
  display:grid;
  place-items:center;
  pointer-events:none;
  filter:drop-shadow(0 2px 3px rgba(80,12,28,.2));
}
.cursor-preview-icon img{
  width:100%;
  height:100%;
  object-fit:contain;
}

/* 설정창에서는 일반 마우스 커서를 사용합니다. */
body.custom-cursor-enabled dialog[open],
body.custom-cursor-enabled dialog[open] *{
  cursor:auto!important;
}
body.custom-cursor-enabled dialog[open] button,
body.custom-cursor-enabled dialog[open] a,
body.custom-cursor-enabled dialog[open] label,
body.custom-cursor-enabled dialog[open] select,
body.custom-cursor-enabled dialog[open] input[type="range"],
body.custom-cursor-enabled dialog[open] input[type="checkbox"]{
  cursor:pointer!important;
}
body:has(dialog[open]) #lonteaCustomCursor{
  display:none!important;
}


/* ===== 전체 폰트: DearFromsol ===== */
html,
body,
button,
input,
select,
textarea,
dialog,
option,
optgroup,
label,
table,
th,
td,
small,
strong,
b,
i,
em,
a,
span,
p,
div,
section,
article,
header,
footer,
nav,
main,
aside,
h1,
h2,
h3,
h4,
h5,
h6,
[contenteditable="true"] {
  font-family: 'DearFromsol', sans-serif !important;
  font-weight: 400;
}

button,
input,
select,
textarea {
  letter-spacing: normal;
}

/* 요청된 장식 및 플레이리스트/바로가기 제거 */
.ribbon,.heart-charm,.music-box,.quick-links{display:none!important}
.cover-top{grid-template-columns:minmax(0,1fr)!important}

/* 새 프로필 정보 카드: 기존 사이트 색상 활용 */
.cover-top{display:block!important;width:100%!important}
.profile-facts{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:9px;width:100%;margin:8px 0 18px}
.profile-fact{min-width:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:5px;padding:12px 7px;background:#fff8f7;border:1px solid #e7bfc5;border-radius:14px;text-align:center;box-shadow:0 2px 5px #5d0d1b0a}
.profile-fact span{font-size:12px;color:#ad7a83;line-height:1.3}
.profile-fact strong{font-size:15px;color:#741b2c;font-weight:700;line-height:1.35;overflow-wrap:anywhere}
@media(max-width:480px){.profile-facts{grid-template-columns:repeat(2,minmax(0,1fr))}.profile-fact{padding:11px 5px}}

/* 메인 사진을 위로, 정보 카드 4칸을 사진 아래로 */
.home-cover .cover-photo{order:1;margin:6px 8px 12px!important}
.home-cover .cover-top{order:2;display:block!important;margin:0 8px 12px!important}
.home-cover .profile-facts{margin:0!important}
.home-cover .hero-buttons{order:3}
.home-cover .scroll-guide{order:4}
.home-cover{display:flex!important;flex-direction:column!important}
.home-cover>h2{order:0}

/* 프로필 소개글 아래 링크 버튼 */
.profile-page .profile-links{display:flex;flex-wrap:wrap;gap:8px;margin-top:12px;align-items:center}
.profile-page .profile-links .hero-link{border:0;border-radius:999px;padding:9px 14px;background:#7e1328;color:#fff;font-weight:800;cursor:pointer}
.profile-page .profile-links .hero-link:hover{background:#a32843}
.profile-link-row{display:grid;grid-template-columns:1fr 1.5fr auto;gap:8px;align-items:end;padding:9px 0;border-bottom:1px solid #ecd2d5}
.profile-link-row label{display:flex;flex-direction:column;gap:5px;font-size:13px}
.profile-link-row input{width:100%;min-width:0;padding:9px;border:1px solid #e2b9c0;border-radius:8px}
.profile-link-row button,#addProfileLinkRow{padding:9px 12px;border:1px solid #d9a4ae;border-radius:9px;background:#fff0f2;color:#7e1328;cursor:pointer}
#addProfileLinkRow{margin-top:12px}
@media(max-width:550px){.profile-link-row{grid-template-columns:1fr}.profile-page .profile-links{justify-content:center}}

/* 요청: 편집 상태에서도 점선 테두리와 점선 선택 표시 제거 */
.admin-mode [data-cms-text],.admin-mode [data-cms-text]:focus{outline:none!important;outline-offset:0!important}
/* 기존 점선 경계만 제거, 일반 실선 카드 테두리는 보존 */
.browserbar{border-bottom-style:solid!important}
.page-footer{border-top-style:solid!important}

/* 기존 자기소개/기념일 영역 대신 한 줄 주간 일정 */
#sectionContainer .section-weekly{grid-column:1/-1!important;width:100%!important}
.weekly-seven{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:8px;width:100%}
.weekly-seven-day{min-width:0;min-height:145px;border:1px solid #e9bdc5;border-radius:12px;background:#fff9f9;padding:10px 7px;display:flex;flex-direction:column;align-items:center;gap:9px;text-align:center}
.weekly-seven-day>b{font-size:17px;color:#8a2037}
.weekly-seven-text{white-space:pre-wrap;overflow-wrap:anywhere;flex:1;font-size:13px;color:#63313c}
.weekly-seven-day small{overflow-wrap:anywhere;color:#a46c78}
.weekly-seven-edit{font-size:12px;border-radius:8px;padding:4px 10px;background:#f7e2e6;color:#81283c;border:0;cursor:pointer}
@media(max-width:760px){.weekly-seven{grid-template-columns:repeat(7,minmax(105px,1fr));overflow-x:auto;padding-bottom:8px}}

/* 주간 일정 높이 확장 및 요일별 배경 이미지 */
#sectionContainer .section-weekly .section-body{min-height:225px;display:flex;flex-direction:column}
.section-weekly .weekly-seven{flex:1;align-items:stretch;min-height:200px}
.section-weekly .weekly-seven-day{position:relative;isolation:isolate;min-height:100%;overflow:hidden;background:#fff9f9}
.section-weekly .weekly-day-background{position:absolute;inset:0;z-index:-1;background-size:cover;background-position:center;opacity:var(--weekly-bg-opacity,.18);pointer-events:none}
.section-weekly .weekly-seven-text{width:100%;padding:12px 2px}
.section-weekly .weekly-settings-toolbar{display:flex;justify-content:flex-end;margin:4px 0 12px}
.section-weekly .weekly-background-settings{border:1px solid #e9bdc5;border-radius:9px;background:#fff6f7;color:#81283c;padding:8px 12px;cursor:pointer}
.weekly-settings-preview{min-height:100px;display:flex;align-items:center;justify-content:center;background:#fff8f9;border:1px solid #e9bdc5;border-radius:10px;overflow:hidden}
.weekly-settings-preview img{width:100%;max-height:220px;object-fit:contain}
@media(max-width:760px){.section-weekly .weekly-seven{min-height:200px}.section-weekly .weekly-seven-day{min-height:200px}}

/* 두 시그니처 풍선 섹션의 가로 폭을 동일하게 유지 */
#sectionContainer > .section-signatureExtra{grid-column:1 / -1; width:100%; min-width:0; box-sizing:border-box;}

/* 프로필 사진 변경 버튼은 관리자 모드에서 최상단에 표시 */
.admin-mode #profilePhotoEditBtn{display:block!important;z-index:999!important;pointer-events:auto!important;cursor:pointer!important}

/* 주간 일정 시간 및 주차 */
.section-weekly .weekly-week-header{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap;margin:0 0 8px}
.section-weekly .weekly-week-description{font-size:15px;font-weight:700;color:#81283c}
.section-weekly .weekly-week-description small{font-size:12px;font-weight:400}
.section-weekly .weekly-week-edit{border:1px solid #e9bdc5;background:#fff6f7;border-radius:10px;padding:7px 11px;color:#81283c;cursor:pointer}
.section-weekly .weekly-time-pill{display:block;max-width:100%;padding:6px 9px;border-radius:999px;background:#8c132b;color:white;font-size:13px;font-weight:700;line-height:1.3;overflow-wrap:anywhere}
.section-weekly .weekly-seven-text{padding-top:4px}

/* 주차·날짜 표시만 아래로 7px 이동 */
.section-weekly .weekly-week-description{position:relative;top:7px}

/* 프로필 4칸 정보 카드: 아래 여백을 위 여백과 균형 있게 조정 */
.home-cover .cover-top{padding-bottom:0!important;margin-bottom:6px!important}

/* Center the Lontea Profile heading between its upper and lower rules. */
.home-cover > h2 {
  display:flex;
  align-items:center;
  min-height:64px;
  padding:0 14px !important;
  margin:0 0 14px !important;
  line-height:1.2;
}

/* Theme switch: fixed, independent of admin mode */
.theme-toggle{position:fixed;left:16px;bottom:16px;z-index:310;border:1px solid #b87583;border-radius:999px;padding:10px 15px;background:#fff7f8;color:#75152a;font-weight:700;box-shadow:0 5px 15px #28000d26;cursor:pointer}
.dark-mode{color-scheme:dark;--paper:#24191f;--ink:#f8e6e9;--line:#6c4853;--soft:#302129;--pink:#593540}
.dark-mode body{background:linear-gradient(#160e15,#24121b);color:var(--ink)}
.dark-mode .browserbar{background:linear-gradient(#17070e,#350d1a)}
.dark-mode .left-rail{background:linear-gradient(135deg,#2b0c19,#53172a)}
.dark-mode .book{background:linear-gradient(135deg,#300c1a,#62152c)}
.dark-mode .paper{background:linear-gradient(#281d25,#21171e);border-color:#7b5260;box-shadow:inset 0 0 0 8px #ffffff08,0 8px 20px #0007}
.dark-mode .cms-section-card,.dark-mode .content-item,.dark-mode .gallery-card,.dark-mode .day-cell,.dark-mode .week-day,.dark-mode .photo-frame,.dark-mode .hero-banner,.dark-mode .admin-panel,.dark-mode dialog{background:#30222b!important;color:#f6e6e9!important;border-color:#774956!important}
.dark-mode .home-cover,.dark-mode .main-page,.dark-mode .profile-page{color:#f6e6e9}
.dark-mode .section-head,.dark-mode .topline,.dark-mode .page-footer{border-color:#69424c}
.dark-mode .home-cover h2,.dark-mode .hero h2,.dark-mode .section-head h3,.dark-mode .calendar-title,.dark-mode .profile-page h1,.dark-mode .dialog-head b,.dark-mode .admin-head b,.dark-mode .admin-section>label{color:#ffb7c6}
.dark-mode .hero p,.dark-mode .section-head small,.dark-mode .content-item small,.dark-mode .gallery-card span,.dark-mode .empty-state,.dark-mode .admin-section p,.dark-mode .admin-head small{color:#d6b5bf}
.dark-mode .week-day header,.dark-mode .month-grid .dow,.dark-mode .day-cell.muted{background:#422b35;color:#f6d6de}
.dark-mode .week-event,.dark-mode .section-actions button,.dark-mode .item-tools button{background:#583340;color:#ffe5eb}
.dark-mode .tabs button,.dark-mode .admin-panel button,.dark-mode .import-label,.dark-mode menu button,.dark-mode .calendar-toolbar button,.dark-mode .dialog-field input,.dark-mode .dialog-field textarea,.dark-mode .dialog-field select,.dark-mode input,.dark-mode textarea,.dark-mode select{background:#392631;color:#fbe5eb;border-color:#845462}
.dark-mode .admin-primary,.dark-mode .hero-link,.dark-mode .event-pill,.dark-mode .status-bar{background:#991e41!important;color:#fff!important}
.dark-mode .admin-mode [data-cms-text]:focus{background:#51313c}
.dark-mode .theme-toggle{background:#3d2331;color:#ffd9e2;border-color:#9d6173}
.dark-mode .main-page{scrollbar-color:#ad5671 #382630}
.dark-mode .main-page::-webkit-scrollbar-track{background:#382630}
.dark-mode .main-page::-webkit-scrollbar-thumb{background:#97506a;border-color:#382630}
.dark-mode .section-weekly .weekly-time-pill{background:#a52143;color:#fff}
.dark-mode .section-weekly .weekly-week-description{color:#ffc4d1}
.dark-mode .section-weekly .weekly-week-edit{background:#3c2731;color:#ffd5df;border-color:#8b5264}
@media(max-width:800px){.theme-toggle{left:10px;bottom:10px;padding:8px 11px}}

/* Theme toggle beside browser window dots */
.browserbar-controls{display:flex;align-items:center;gap:15px;margin-left:auto}
.browserbar .theme-toggle{position:static;left:auto;bottom:auto;z-index:auto;padding:5px 11px;font-size:12px;line-height:1.5;box-shadow:none;background:#fff6f7;color:#75152a;border:1px solid #d88999;white-space:nowrap}
.dark-mode .browserbar .theme-toggle{background:#3d2331;color:#ffd9e2;border-color:#9d6173}
@media(max-width:800px){.browserbar-controls{gap:8px}.browserbar .theme-toggle{padding:4px 7px;font-size:11px}}

/* Dark mode: navigation tabs remain readable despite earlier !important rules */
html.dark-mode .tabs button{background:#3b202b !important;color:#ffe7ee !important;border-color:#a86b7d !important;text-shadow:none !important;}
html.dark-mode .tabs button span,html.dark-mode .tabs button svg,html.dark-mode .tabs button i{color:#ffe7ee !important;fill:currentColor;}
html.dark-mode .tabs button:hover,html.dark-mode .tabs button:focus-visible{background:#57303f !important;color:#fff !important;}
