@import url('https://fonts.googleapis.com/css2?family=Jua&family=Gowun+Dodum&display=swap');

:root{
  --bg: #FFFBEF;
  --bg-soft: #FFF3C4;
  --honey: #FFD966;
  --honey-deep: #F4B93E;
  --honey-line: #F0C25E;
  --card: #FFFFFF;
  --ink: #4A3F2A;
  --ink-soft: #8C7B4E;
  --ink-faint: #C9B77E;
  --danger: #E3776B;
  --radius-lg: 28px;
  --radius-md: 18px;
  --radius-sm: 12px;
  --shadow: 0 10px 30px rgba(224, 172, 45, 0.14);
}

*{box-sizing:border-box;}
html,body{margin:0;padding:0;}
body{
  background:
    radial-gradient(circle at 8% 12%, rgba(255,217,102,.35) 0, transparent 42%),
    radial-gradient(circle at 92% 0%, rgba(255,236,163,.55) 0, transparent 40%),
    radial-gradient(circle at 85% 85%, rgba(255,217,102,.28) 0, transparent 45%),
    var(--bg);
  color: var(--ink);
  font-family: 'Gowun Dodum', sans-serif;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

h1,h2,h3, .brand, .nav-tab, .tag{
  font-family: 'Jua', sans-serif;
  font-weight: 400;
}

a{color:inherit; text-decoration:none;}

.wrap{
  max-width: 920px;
  margin: 0 auto;
  padding: 0 20px 80px;
}

/* Header / Nav */
.site-header{
  padding: 34px 20px 18px;
  text-align:center;
}
.brand{
  font-size: 34px;
  color: var(--honey-deep);
  display:inline-flex;
  align-items:center;
  gap: 10px;
  letter-spacing: 1px;
}
.brand .drop{
  width:14px;height:18px;
  background: var(--honey);
  border-radius: 60% 60% 60% 0;
  transform: rotate(45deg);
  display:inline-block;
  box-shadow: inset -2px -2px 0 rgba(0,0,0,.05);
}
.tagline{
  color: var(--ink-soft);
  font-size: 14px;
  margin-top: 4px;
}

nav.tabs{
  display:flex;
  justify-content:center;
  flex-wrap: wrap;
  gap: 10px;
  margin: 22px auto 0;
  max-width: 720px;
}
.nav-tab{
  background: var(--card);
  border: 2px solid var(--honey-line);
  color: var(--ink-soft);
  padding: 10px 20px;
  border-radius: 999px;
  font-size: 15px;
  box-shadow: var(--shadow);
  transition: transform .15s ease, background .15s ease, color .15s ease;
}
.nav-tab:hover{ transform: translateY(-2px); }
.nav-tab.active{
  background: var(--honey);
  color: #fff;
  border-color: var(--honey);
}

/* Cards */
.card{
  background: var(--card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 32px;
  margin-top: 26px;
  border: 1px solid rgba(244,185,62,.18);
}
.card + .card{ margin-top: 20px; }

.section-title{
  font-size: 22px;
  color: var(--honey-deep);
  margin: 0 0 18px;
  display:flex;
  align-items:center;
  gap:8px;
}
.section-title::before{
  content:"";
  width:8px;height:8px;
  border-radius:50%;
  background: var(--honey);
  display:inline-block;
}

/* Profile page */
.profile-hero{
  display:flex;
  gap: 28px;
  align-items:center;
  flex-wrap: wrap;
}
.profile-photo{
  width: 168px; height: 168px;
  border-radius: 50%;
  object-fit: cover;
  border: 6px solid var(--bg-soft);
  box-shadow: var(--shadow);
  flex-shrink:0;
  background: var(--bg-soft);
}
.profile-name{
  font-size: 28px;
  color: var(--ink);
  margin: 0 0 6px;
}
.profile-intro{
  color: var(--ink-soft);
  line-height: 1.7;
  white-space: pre-wrap;
}
.sns-row{
  display:flex; gap:10px; flex-wrap:wrap; margin-top:14px;
}
.sns-pill{
  background: var(--bg-soft);
  color: var(--ink);
  padding: 7px 16px;
  border-radius: 999px;
  font-size: 13px;
  border: 1px solid var(--honey-line);
}
.sns-pill:hover{ background: var(--honey); color:#fff; }

.detail-grid{
  display:grid;
  grid-template-columns: repeat(auto-fit, minmax(180px,1fr));
  gap: 14px;
  margin-top: 24px;
}
.detail-item{
  background: var(--bg-soft);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
}
.detail-label{
  font-size: 12px;
  color: var(--honey-deep);
  margin-bottom: 4px;
}
.detail-value{
  font-size: 15px;
  color: var(--ink);
}

/* Profile extra grid (chat rules / links) */
.profile-extra-grid{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 20px;
}
@media (max-width: 640px){
  .profile-extra-grid{ grid-template-columns: 1fr; }
}

/* Chat rules */
.rules-list{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 18px;
}
.rule-item{
  display:flex;
  align-items:baseline;
  gap: 8px;
  font-size: 14px;
  color: var(--ink);
}
.rule-num{
  font-family:'Jua',sans-serif;
  color: var(--honey-deep);
  font-size: 12px;
  flex-shrink:0;
}

/* Links */
.links-list{
  display:flex;
  flex-direction:column;
  gap: 10px;
}
.link-btn{
  display:block;
  text-align:center;
  padding: 13px 18px;
  border-radius: 999px;
  border: 2px solid var(--honey-line);
  color: var(--honey-deep);
  background: var(--card);
  font-size: 14px;
  transition: transform .15s ease, background .15s ease, color .15s ease;
}
.link-btn:hover{ transform: translateY(-1px); }
.link-btn.primary{
  background: var(--honey);
  color: #fff;
  border-color: var(--honey);
}
.link-btn.primary:hover{ background: var(--honey-deep); }

/* Mini schedule (profile page) */
.mini-schedule-grid{
  display:grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 10px;
  margin-top: 20px;
}
.mini-day{
  background: var(--bg-soft);
  border-radius: var(--radius-sm);
  padding: 14px 4px;
  text-align:center;
}
.mini-day-name{
  font-family:'Jua',sans-serif;
  color: var(--ink);
  font-size: 14px;
}
.mini-day-caption{
  margin-top: 6px;
  font-size: 11px;
  color: var(--honey-deep);
}
.mini-day.off .mini-day-name,
.mini-day.off .mini-day-caption{
  color: var(--ink-faint);
}
.mini-day.off{ background: #F4F1E6; }
@media (max-width: 640px){
  .mini-schedule-grid{ grid-template-columns: repeat(4, 1fr); }
}

/* Notice list */
.notice-item{
  padding: 18px 4px;
  border-bottom: 1px dashed var(--honey-line);
}
.notice-item:last-child{ border-bottom:none; }
.notice-head{
  display:flex; justify-content:space-between; align-items:center; gap:10px; flex-wrap:wrap;
}
.notice-title{ font-size: 17px; color: var(--ink); }
.notice-date{ font-size:12px; color: var(--ink-faint); }
.notice-content{
  margin-top: 8px;
  color: var(--ink-soft);
  line-height: 1.7;
  white-space: pre-wrap;
  font-size: 14px;
}
.empty{
  text-align:center;
  color: var(--ink-faint);
  padding: 40px 0;
}

/* 방명록 */
.guestbook-form{
  background: var(--bg-soft);
  border-radius: var(--radius-md);
  padding: 20px;
  margin-bottom: 8px;
}
.guestbook-form .field:last-of-type{ margin-bottom: 12px; }
.guestbook-list{ margin-top: 10px; }
.guestbook-item{
  padding: 16px 4px;
  border-bottom: 1px dashed var(--honey-line);
}
.guestbook-item:last-child{ border-bottom: none; }
.guestbook-head{
  display:flex; justify-content:space-between; align-items:center; gap:10px; flex-wrap:wrap;
}
.guestbook-nick{ font-family:'Jua',sans-serif; color: var(--honey-deep); font-size: 15px; }
.guestbook-date{ font-size:12px; color: var(--ink-faint); }
.guestbook-content{
  margin-top: 6px;
  color: var(--ink);
  line-height: 1.7;
  white-space: pre-wrap;
  font-size: 14px;
}

/* Schedule */
.schedule-table{
  width:100%;
  border-collapse: separate;
  border-spacing: 8px;
}
.schedule-table th{
  font-family:'Jua',sans-serif;
  font-weight:400;
  color: var(--honey-deep);
  font-size: 14px;
  padding-bottom: 4px;
}
.schedule-cell{
  background: var(--bg-soft);
  border-radius: var(--radius-sm);
  padding: 16px 6px;
  text-align:center;
  color: var(--ink);
  font-size: 13px;
  min-height: 70px;
  white-space: pre-wrap;
}
.schedule-note{
  margin-top: 18px;
  color: var(--ink-soft);
  font-size: 14px;
  line-height:1.7;
  white-space: pre-wrap;
}

/* Grid cards (work / dress) */
.grid{
  display:grid;
  grid-template-columns: repeat(auto-fill, minmax(220px,1fr));
  gap: 18px;
  margin-top: 20px;
}
.tile{
  background: var(--bg-soft);
  border-radius: var(--radius-md);
  overflow:hidden;
  box-shadow: 0 6px 16px rgba(224,172,45,.10);
  transition: transform .15s ease;
}
.tile:hover{ transform: translateY(-4px); }
.tile-img{
  width:100%; aspect-ratio: 16/10; object-fit: cover;
  background: linear-gradient(135deg,#FFE9A8,#FFF3C4);
  display:block;
}
.tile.tile-square .tile-img{ aspect-ratio: 1/1; }
.tile.tile-portrait .tile-img{ aspect-ratio: 3/4; cursor: zoom-in; }
.dress-grid{
  grid-template-columns: repeat(auto-fill, minmax(190px,1fr));
}
.tile-body{ padding: 14px 16px; }
.tile-title{ font-size: 15px; color: var(--ink); }
.tile-sub{ font-size: 12px; color: var(--ink-faint); margin-top: 4px; }
.tile-desc{ font-size:13px; color: var(--ink-soft); margin-top:6px; line-height:1.6; }

/* 이미지 확대/축소 라이트박스 */
.lightbox-overlay{
  position: fixed;
  inset: 0;
  background: rgba(35, 24, 6, 0.85);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 999;
  padding: 30px;
  overflow: auto;
}
.lightbox-overlay.open{ display: flex; }
.lightbox-img{
  max-width: 90vw;
  max-height: 90vh;
  border-radius: var(--radius-md);
  box-shadow: 0 20px 60px rgba(0,0,0,.4);
  cursor: zoom-in;
}
.lightbox-img.zoomed{
  max-width: none;
  max-height: none;
  width: auto;
  cursor: zoom-out;
}
.lightbox-close{
  position: fixed;
  top: 18px;
  right: 26px;
  color: #fff;
  font-size: 34px;
  line-height: 1;
  cursor: pointer;
  z-index: 1000;
  font-family: 'Jua', sans-serif;
}

/* Footer */
.site-footer{
  text-align:center;
  color: var(--ink-faint);
  font-size: 12px;
  padding: 40px 20px 20px;
}
.site-footer a{ color: var(--ink-faint); text-decoration: underline; }

/* Admin */
.admin-shell{ max-width: 760px; }
.admin-login{
  max-width: 380px;
  margin: 80px auto;
  text-align:center;
}
.field{ margin-bottom: 16px; text-align:left; }
.field label{
  display:block; font-size: 13px; color: var(--honey-deep); margin-bottom: 6px;
}
.field input[type=text],
.field input[type=password],
.field input[type=url],
.field textarea{
  width:100%;
  padding: 11px 14px;
  border-radius: var(--radius-sm);
  border: 2px solid var(--honey-line);
  background: #fffefb;
  font-family:'Gowun Dodum',sans-serif;
  font-size: 14px;
  color: var(--ink);
}
.field textarea{ min-height: 90px; resize: vertical; }
.field input:focus, .field textarea:focus{
  outline: none; border-color: var(--honey-deep);
}
.btn{
  display:inline-block;
  background: var(--honey);
  color:#fff;
  border:none;
  padding: 12px 26px;
  border-radius: 999px;
  font-family:'Jua',sans-serif;
  font-size: 15px;
  cursor:pointer;
  box-shadow: var(--shadow);
  transition: background .15s ease, transform .15s ease;
}
.btn:hover{ background: var(--honey-deep); transform: translateY(-1px); }
.btn.secondary{
  background: var(--card); color: var(--honey-deep); border: 2px solid var(--honey-line);
}
.btn.danger{ background: var(--danger); }
.btn.small{ padding: 7px 16px; font-size: 13px; }

.admin-topbar{
  display:flex; justify-content:space-between; align-items:center; flex-wrap:wrap; gap:10px;
  margin-top: 20px;
}
.admin-block-title{
  font-size:18px; color:var(--honey-deep); margin: 30px 0 12px;
  display:flex; align-items:center; gap:8px;
}
.repeat-item{
  background: var(--bg-soft);
  border-radius: var(--radius-md);
  padding: 18px;
  margin-bottom: 14px;
  position:relative;
}
.repeat-item .remove-btn{
  position:absolute; top:12px; right:12px;
}
.save-status{
  margin-top: 14px;
  font-size: 13px;
  color: var(--honey-deep);
  min-height: 18px;
}
.days-grid{
  display:grid;
  grid-template-columns: 70px 1fr;
  gap: 10px;
  align-items:start;
  margin-bottom: 8px;
}
.days-grid label{ font-family:'Jua',sans-serif; color:var(--honey-deep); padding-top:10px; }

/* 아코디언 (접기/펼치기) */
.section-title.collapsible{
  cursor: pointer;
  user-select: none;
  position: relative;
  padding-right: 30px;
}
.toggle-arrow{
  position: absolute;
  right: 2px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 18px;
  color: var(--honey-deep);
  transition: transform .2s ease;
  flex-shrink: 0;
}
.section-title.collapsible.collapsed .toggle-arrow{
  transform: translateY(-50%) rotate(-90deg);
}
.section-body{
  overflow: hidden;
}
.section-body.collapsed{
  display: none;
}

/* 이미지 업로드 */
.image-upload-row{
  display:flex;
  align-items:center;
  gap: 14px;
  flex-wrap: wrap;
}
.image-preview{
  width: 64px; height: 64px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  border: 2px solid var(--honey-line);
  background: var(--bg-soft);
  flex-shrink: 0;
}
.image-upload-controls{
  flex: 1;
  min-width: 200px;
  display:flex;
  flex-direction:column;
  gap: 8px;
}
.file-btn{
  display:inline-block;
  cursor: pointer;
  text-align:center;
  width: fit-content;
}

@media (max-width: 640px){
  .profile-hero{ flex-direction:column; text-align:center; }
  .sns-row{ justify-content:center; }
  .schedule-table{ font-size: 11px; }
  .brand{ font-size: 26px; }
}
