/* ═══════════════════════════════════════════
   우리원 놀이터 — 공통 디자인 시스템
   아이보리·갈색·짙은녹색 | Pretendard
═══════════════════════════════════════════ */

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  color-scheme: light;   /* 강제 다크모드 차단 */
  --bg:        #F4ECD8;
  --card:      #FBF6E9;
  --section:   #EDE0BF;
  --accent:    #F0E5C9;
  --line:      rgba(139,111,71,0.14);
  --line-mid:  rgba(139,111,71,0.24);
  --t1:        #2A1A0B;
  --t2:        #5C3D1F;
  --t3:        #8B6F47;
  --dark:      #2A1A0B;
  --green:     #2D4A2B;
  --green-dk:  #1F3A20;
  --green-mid: #639922;
  --green-lt:  #C0DD97;
  --danger:    #C13B3B;
}

html, body {
  height: 100%;
  background: var(--bg);
  font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, sans-serif;
  font-weight: 100;
  color: var(--t1);
  letter-spacing: -0.3px;
  -webkit-font-smoothing: antialiased;
}
::-webkit-scrollbar { display: none; }
* { scrollbar-width: none; }

/* ─── 앱 레이아웃 ─── */
#app { display: flex; height: 100vh; overflow: hidden; }

/* ─── 뷰 라우팅 ─── */
.view { display: none; flex: 1; flex-direction: column; min-width: 0; overflow: hidden; }
.view.active { display: flex; }

/* ═══════════ SIDEBAR ═══════════ */
#sidebar {
  width: 232px;
  flex-shrink: 0;
  background: var(--section);
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  padding: 24px 12px;
  overflow-y: auto;
}

.sb-brand {
  padding: 4px 10px 18px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 10px;
}
.sb-brand-name {
  font-size: 16px;
  font-weight: 900;
  letter-spacing: -0.6px;
  line-height: 1.15;
  white-space: nowrap;
}
.sb-brand-inst {
  font-size: 11px;
  font-weight: 100;
  color: var(--t3);
  margin-top: 6px;
}

.sb-nav { display: flex; flex-direction: column; gap: 1px; flex: 1; }

.sb-sep {
  font-size: 10px;
  font-weight: 400;
  color: var(--t3);
  letter-spacing: 0.7px;
  text-transform: uppercase;
  padding: 13px 10px 5px;
}

.sb-item {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 9px 10px;
  border-radius: 9px;
  font-size: 13px;
  font-weight: 100;
  color: var(--t2);
  cursor: pointer;
  transition: background 0.13s;
  user-select: none;
}
.sb-item:hover { background: var(--accent); }
.sb-item.active { background: var(--dark); color: var(--bg); font-weight: 400; }
.sb-item i.icon { font-size: 17px; flex-shrink: 0; }

.sb-badge {
  margin-left: auto;
  font-size: 10px;
  font-weight: 400;
  background: var(--green);
  color: var(--bg);
  padding: 2px 7px;
  border-radius: 10px;
}
.sb-item.active .sb-badge { background: var(--green-mid); }

.sb-dot {
  margin-left: auto;
  width: 7px; height: 7px;
  background: var(--green);
  border-radius: 50%;
}

/* Disclosure */
.sb-chevron {
  margin-left: auto;
  font-size: 12px;
  color: var(--t3);
  transition: transform 0.25s ease-out;
}
.disc.open > .sb-item .sb-chevron { transform: rotate(90deg); }
.disc-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease-out;
}
.disc.open .disc-body { max-height: 300px; }

.sb-child {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 7px 10px 7px 38px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 100;
  color: var(--t2);
  cursor: pointer;
  transition: background 0.13s;
  margin-top: 1px;
}
.sb-child:hover { background: var(--accent); }
.sb-child.active { background: var(--card); color: var(--t1); font-weight: 400; }
.sb-child-dot {
  width: 5px; height: 5px;
  background: var(--t3);
  border-radius: 50%;
  opacity: 0.45;
  flex-shrink: 0;
}
.sb-child.active .sb-child-dot { background: var(--green); opacity: 1; }

.sb-bottom {
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

/* ═══════════ TOOLBAR ═══════════ */
.toolbar {
  height: 56px;
  background: rgba(244,236,216,0.88);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--line);
  padding: 0 28px 0 28px;
  padding-right: 230px; /* #csAuthArea(fixed) 겹침 방지 — 로그인 chip 최대폭 기준 */
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.tb-search {
  flex: 1;
  max-width: 400px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 13px;
  background: var(--card);
  border-radius: 10px;
}
.tb-search i { font-size: 15px; color: var(--t3); }
.tb-search input {
  flex: 1;
  border: none;
  background: transparent;
  font-family: inherit;
  font-size: 13px;
  font-weight: 100;
  color: var(--t1);
  outline: none;
}
.tb-search input::placeholder { color: var(--t3); }
.tb-kbd {
  font-size: 11px;
  font-weight: 400;
  color: var(--t3);
  background: var(--section);
  padding: 2px 6px;
  border-radius: 5px;
}
.tb-spacer { flex: 1; }
.tb-btn {
  width: 34px; height: 34px;
  border: none;
  background: transparent;
  border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  color: var(--t2);
  position: relative;
  transition: background 0.13s;
}
.tb-btn:hover { background: var(--card); }
.tb-btn i { font-size: 18px; }
.tb-notif-dot {
  position: absolute;
  top: 7px; right: 7px;
  width: 7px; height: 7px;
  background: var(--green);
  border-radius: 50%;
  border: 1.5px solid var(--bg);
}
.tb-avatar {
  display: none !important;   /* 옛 디자인의 '?' 설정 아바타 — 우측 상단 로그인 칩과 겹쳐 숨김 (설정은 좌측 사이드바) */
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--dark);
  color: var(--bg);
  border: none;
  font-family: inherit;
  font-size: 12px;
  font-weight: 400;
  cursor: pointer;
  margin-left: 4px;
}

/* ═══════════ CONTENT SCROLL ═══════════ */
.content-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 28px 36px 56px;
}

/* ═══════════ PAGE HEADER ═══════════ */
.page-hd { margin-bottom: 26px; }
.page-title {
  font-size: 38px;
  font-weight: 900;
  letter-spacing: -1.8px;
  line-height: 1.05;
}
.page-title-sm {
  font-size: 22px;
  font-weight: 900;
  letter-spacing: -0.9px;
}
.page-sub {
  font-size: 13px;
  font-weight: 100;
  color: var(--t3);
  margin-top: 9px;
}

/* ═══════════ HERO ═══════════ */
.hero {
  background: var(--green);
  color: var(--bg);
  border-radius: 20px;
  padding: 30px 34px;
  margin-bottom: 26px;
  position: relative;
  overflow: hidden;
  min-height: 200px;
  display: flex;
  align-items: center;
}
.hero-inner { position: relative; z-index: 2; max-width: 520px; }
.hero-label {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 400;
  color: var(--green-lt);
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 13px;
}
.hero-title {
  font-size: 32px;
  font-weight: 900;
  letter-spacing: -1.3px;
  line-height: 1.1;
  margin-bottom: 11px;
  color: var(--bg);
}
.hero-desc {
  font-size: 13px;
  font-weight: 100;
  color: var(--green-lt);
  line-height: 1.7;
  margin-bottom: 20px;
  max-width: 420px;
}
.hero-actions { display: flex; gap: 10px; }
.hero-b1 {
  position: absolute; right: -44px; top: -56px;
  width: 220px; height: 220px;
  background: var(--green-dk);
  border-radius: 50%;
  opacity: 0.58;
}
.hero-b2 {
  position: absolute; right: 72px; top: 56px;
  width: 100px; height: 100px;
  background: var(--green-mid);
  border-radius: 50%;
  opacity: 0.3;
}

/* ═══════════ BUTTONS ═══════════ */
.btn {
  padding: 10px 20px;
  font-size: 13px;
  font-weight: 400;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  font-family: inherit;
  letter-spacing: -0.2px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: opacity 0.13s, transform 0.05s;
}
.btn:active { transform: scale(0.97); }
.btn-dark  { background: var(--dark);  color: var(--bg); }
.btn-dark:hover  { opacity: 0.88; }
.btn-light { background: var(--bg);   color: var(--dark); }
.btn-light:hover { opacity: 0.88; }
.btn-ghost { background: transparent; color: var(--bg); border: 1px solid var(--green-mid); }
.btn-ghost:hover { background: var(--green-dk); }
.btn-outline { background: transparent; color: var(--t2); border: 1px solid var(--line-mid); }
.btn-outline:hover { background: var(--card); }
.btn-sm { padding: 6px 14px; font-size: 12px; border-radius: 8px; }
.btn-xs { padding: 4px 10px; font-size: 11px; border-radius: 7px; }

/* ═══════════ STATS ═══════════ */
.stats-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 26px;
}
.stat-card {
  background: var(--card);
  border-radius: 16px;
  padding: 18px 20px;
}
.stat-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 400;
  color: var(--t2);
  margin-bottom: 9px;
}
.stat-label i { font-size: 15px; color: var(--t3); }
.stat-value {
  font-size: 30px;
  font-weight: 900;
  letter-spacing: -1.2px;
  line-height: 1;
  color: var(--t1);
}
.stat-unit  { font-size: 14px; font-weight: 400; color: var(--t3); margin-left: 3px; }
.stat-meta  { font-size: 11px; font-weight: 100; color: var(--t3); margin-top: 7px; }

/* ═══════════ SECTION ═══════════ */
.sec { margin-bottom: 28px; }
.sec-hd {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 13px;
  padding: 0 3px;
}
.sec-title    { font-size: 18px; font-weight: 900; letter-spacing: -0.7px; }
.sec-title-sm { font-size: 15px; font-weight: 900; letter-spacing: -0.5px; }
.sec-sub      { font-size: 12px; font-weight: 100; color: var(--t3); margin-top: 3px; }
.sec-link {
  font-size: 12px;
  font-weight: 400;
  color: var(--green);
  background: transparent;
  border: none;
  cursor: pointer;
  font-family: inherit;
}

/* ═══════════ TOOLS GRID ═══════════ */
.tools-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.tool-card {
  background: var(--card);
  border-radius: 14px;
  padding: 14px 16px;
  cursor: pointer;
  border: 1.5px solid var(--line);
  font-family: inherit;
  text-align: left;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 13px;
  transition: border-color 0.13s, transform 0.13s;
}
.tool-card:hover { border-color: var(--green); transform: translateY(-1px); }
.tool-icon {
  width: 40px; height: 40px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
}
.tool-icon i { font-size: 21px; }
.tool-name { font-size: 13px; font-weight: 400; color: var(--t1); letter-spacing: -0.3px; margin-bottom: 3px; }
.tool-desc { font-size: 11px; font-weight: 100; color: var(--t3); line-height: 1.5; }

/* ═══════════ GROUPED LIST ═══════════ */
.glist { background: var(--card); border-radius: 16px; overflow: hidden; }
.grow {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 12px 18px;
  cursor: pointer;
  transition: background 0.13s;
  position: relative;
}
.grow:hover { background: var(--section); }
.grow + .grow::before {
  content: '';
  position: absolute;
  top: 0; left: 58px; right: 0;
  height: 1px;
  background: var(--line);
}
.grow-icon {
  width: 30px; height: 30px;
  border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.grow-icon i { font-size: 16px; }
.grow-body   { flex: 1; min-width: 0; }
.grow-title  { font-size: 13px; font-weight: 400; color: var(--t1); letter-spacing: -0.3px; margin-bottom: 2px; }
.grow-sub    { font-size: 11px; font-weight: 100; color: var(--t3); }
.grow-val    { font-size: 12px; font-weight: 400; color: var(--t2); white-space: nowrap; }
.grow-chev   { color: var(--t3); font-size: 15px; flex-shrink: 0; }

/* ═══════════ COLOR HELPERS ═══════════ */
/* ★ 아이콘 유색 사각 바탕 전면 제거 (디스커버리 라인룩) — 색상만 유지, 배경/테두리 없음 */
.ic-amber  { color: #854F0B; }
.ic-coral  { color: #993C1D; }
.ic-green  { color: #3B6D11; }
.ic-pink   { color: #993556; }
.ic-blue   { color: #185FA5; }
.ic-teal   { color: #1F3A20; }
.ic-purple { color: #3C3489; }
.ic-muted  { color: var(--t3); }

/* ═══ 도구 아이콘: 유색 사각 바탕 제거 + 아이콘 살짝 크게 (디스커버리 라인 스타일) ═══ */
/* .ic-* 의 background/border 보다 뒤에 와야 해서 여기에 둠. 아이콘 색(color)은 유지 */
.tool-icon { background: transparent !important; border: none !important; }
.tool-icon i { font-size: 34px; }
.ic-dark   { color: var(--dark); }
/* 콘텐츠 카드 썸네일도 유색 사각 제거 (.ya-cc-thumb 와 동일 처리) */
.ccard-thumb { background: transparent !important; }

/* avatar colors */
.av-purple { background: rgba(83,74,183,0.14);  color: #3C3489; }
.av-coral  { background: rgba(216,90,48,0.13);  color: #993C1D; }
.av-blue   { background: rgba(55,138,221,0.12); color: #185FA5; }
.av-green  { background: rgba(99,153,34,0.13);  color: #3B6D11; }
.av-teal   { background: rgba(45, 74, 43,0.13); color: #1F3A20; }
.av-amber  { background: rgba(239,159,39,0.14); color: #854F0B; }

/* ═══════════ FILTER BAR ═══════════ */
.filter-bar {
  padding: 14px 28px 0;
  background: rgba(244,236,216,0.88);
  backdrop-filter: saturate(180%) blur(16px);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  border-bottom: 1px solid var(--line);
  flex-shrink: 0;
}
.filter-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.filter-row {
  display: flex;
  gap: 6px;
  align-items: center;
  margin-bottom: 12px;
  flex-wrap: wrap;
}
.fsel {
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 100;
  border: 1px solid var(--line-mid);
  border-radius: 8px;
  background: var(--card);
  font-family: inherit;
  color: var(--t1);
  cursor: pointer;
  outline: none;
}
.fsearch-wrap {
  flex: 1;
  max-width: 240px;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 5px 10px;
  background: var(--card);
  border: 1px solid var(--line-mid);
  border-radius: 8px;
}
.fsearch-wrap i { font-size: 14px; color: var(--t3); }
.fsearch-wrap input {
  flex: 1;
  border: none;
  background: transparent;
  font-family: inherit;
  font-size: 12px;
  font-weight: 100;
  color: var(--t1);
  outline: none;
}
.fsearch-wrap input::placeholder { color: var(--t3); }

/* view tabs */
.view-tabs { display: flex; gap: 2px; }
.vtab {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 100;
  color: var(--t3);
  border-bottom: 2px solid transparent;
  cursor: pointer;
  transition: all 0.13s;
}
.vtab:hover { color: var(--t2); }
.vtab.active { color: var(--t1); font-weight: 400; border-bottom-color: var(--dark); }
.vtab i { font-size: 15px; }

/* ═══════════ PROGRESS BAR ═══════════ */
.prog-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 28px;
  border-bottom: 1px solid var(--line);
  background: var(--card);
  flex-shrink: 0;
}
.prog-label { font-size: 12px; font-weight: 400; color: var(--t2); min-width: 60px; }
.prog-track {
  flex: 1;
  height: 7px;
  background: var(--section);
  border-radius: 4px;
  overflow: hidden;
}
.prog-fill {
  height: 100%;
  background: var(--dark);
  border-radius: 4px;
  transition: width 0.4s ease;
}
.prog-pct  { font-size: 12px; font-weight: 900; color: var(--t1); min-width: 34px; text-align: right; }
.prog-tip  { font-size: 11px; font-weight: 100; color: var(--t3); }

/* ═══════════ NOTICE / ALERT ═══════════ */
.notice-warn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: rgba(193,59,59,0.07);
  border: 1px solid rgba(193,59,59,0.18);
  border-radius: 11px;
  margin-bottom: 22px;
}
.notice-warn i    { font-size: 18px; color: var(--danger); flex-shrink: 0; }
.notice-warn-txt  { flex: 1; font-size: 13px; font-weight: 100; color: var(--danger); }
.notice-warn-txt b { font-weight: 400; }

.notice-green {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px 18px;
  background: var(--green);
  color: var(--bg);
  border-radius: 13px;
  margin-bottom: 22px;
}
.notice-green i { font-size: 18px; color: var(--green-lt); flex-shrink: 0; margin-top: 1px; }
.notice-green-txt { font-size: 13px; font-weight: 100; line-height: 1.7; color: var(--green-lt); }
.notice-green-txt strong { color: var(--bg); font-weight: 400; }

/* ═══════════ MODAL ═══════════ */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.35);
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
}
.modal-backdrop.hidden { display: none; }
.modal-box {
  background: var(--card);
  border-radius: 18px;
  width: 100%;
  max-width: 480px;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.modal-hd {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 22px 14px;
  border-bottom: 1px solid var(--line);
}
.modal-title { font-size: 16px; font-weight: 900; letter-spacing: -0.5px; }
.modal-close {
  width: 28px; height: 28px;
  background: transparent;
  border: none;
  cursor: pointer;
  color: var(--t3);
  font-size: 18px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 7px;
}
.modal-close:hover { background: var(--section); }
.modal-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px 22px;
}
.modal-foot {
  padding: 14px 22px;
  border-top: 1px solid var(--line);
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

/* ═══════════ FORM ═══════════ */
.form-sec { margin-bottom: 22px; }
.form-sec-lbl {
  font-size: 11px;
  font-weight: 400;
  color: var(--t3);
  letter-spacing: 0.5px;
  text-transform: uppercase;
  padding: 0 5px 8px;
}
.fgroup { background: var(--card); border-radius: 14px; overflow: hidden; }
.frow {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 18px;
  position: relative;
  min-height: 50px;
}
.frow + .frow::before {
  content: '';
  position: absolute;
  top: 0; left: 18px; right: 18px;
  height: 1px;
  background: var(--line);
}
.flabel {
  font-size: 13px;
  font-weight: 100;
  color: var(--t2);
  min-width: 116px;
  flex-shrink: 0;
}
.req { color: var(--danger); }
.finput {
  flex: 1;
  border: none;
  background: transparent;
  font-family: inherit;
  font-size: 14px;
  font-weight: 400;
  color: var(--t1);
  outline: none;
  text-align: right;
  min-width: 0;
}
.finput::placeholder { color: var(--t3); font-weight: 100; }
.fselect {
  flex: 1;
  border: none;
  background: transparent;
  font-family: inherit;
  font-size: 14px;
  font-weight: 400;
  color: var(--t1);
  outline: none;
  text-align: right;
  cursor: pointer;
}
.faction {
  font-size: 12px;
  font-weight: 400;
  color: var(--green);
  background: transparent;
  border: 1px solid var(--green);
  padding: 5px 11px;
  border-radius: 7px;
  cursor: pointer;
  font-family: inherit;
  white-space: nowrap;
  transition: all 0.13s;
}
.faction:hover { background: var(--green); color: var(--bg); }

/* ─── 커스텀 셀렉트 ──────────────────────────────────── */
select, .sel-ui {
  -webkit-appearance: none;
  appearance: none;
  background-color: var(--card);
  border: 1.5px solid var(--line-mid);
  border-radius: 10px;
  padding: 7px 30px 7px 12px;
  font-family: 'Pretendard', inherit;
  font-size: 13px;
  font-weight: 500;
  color: var(--t1);
  cursor: pointer;
  outline: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 14 14'%3E%3Cpath d='M3 5l4 4 4-4' stroke='%238B6F47' stroke-width='1.6' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 9px center;
  transition: border-color 0.15s, box-shadow 0.15s;
  min-width: 90px;
}
select:hover, .sel-ui:hover { border-color: var(--green); }
select:focus, .sel-ui:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(45,74,43,0.1);
}
select option { font-family: inherit; background: #fff; color: #2A1A0B; }

/* ═══════════ SETUP WIZARD ═══════════ */
.setup-topbar {
  padding: 18px 36px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}
.setup-brand { font-size: 17px; font-weight: 900; letter-spacing: -0.8px; }
.setup-progress-wrap {
  padding: 24px 0 6px;
  display: flex;
  justify-content: center;
}
.setup-progress-inner {
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 680px;
  width: 100%;
  padding: 0 36px;
}
.step-circle {
  width: 30px; height: 30px;
  border-radius: 50%;
  background: var(--section);
  color: var(--t3);
  font-size: 12px;
  font-weight: 400;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  transition: all 0.2s;
}
.step-circle.done    { background: var(--green); color: var(--bg); }
.step-circle.current { background: var(--dark); color: var(--bg); box-shadow: 0 0 0 4px var(--accent); }
.step-bar { flex: 1; height: 2px; background: var(--section); border-radius: 2px; }
.step-bar.done { background: var(--green); }
.step-labels {
  max-width: 680px;
  margin: 7px auto 0;
  padding: 0 36px;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
}
.step-lbl { font-size: 11px; font-weight: 100; color: var(--t3); text-align: center; }
.step-lbl.current { color: var(--t1); font-weight: 400; }
.step-lbl.done    { color: var(--t2); }
.setup-container {
  max-width: 620px;
  margin: 44px auto 100px;
  padding: 0 36px;
}
.setup-step-meta {
  font-size: 11px;
  font-weight: 400;
  color: var(--green);
  letter-spacing: 0.8px;
  text-transform: uppercase;
  margin-bottom: 13px;
}
.setup-footer {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  background: rgba(244,236,216,0.88);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-top: 1px solid var(--line);
  padding: 14px 36px;
}
.setup-footer-inner {
  max-width: 620px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.setup-footer-status { font-size: 11px; font-weight: 100; color: var(--t3); }

/* ═══════════ PHOTO / CLASSIFY ═══════════ */
.thumb-grid-6 {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 6px;
}
.thumb {
  aspect-ratio: 1;
  border-radius: 9px;
  overflow: hidden;
  position: relative;
  cursor: pointer;
  transition: transform 0.13s;
}
.thumb:hover { transform: scale(1.03); }
.thumb-more {
  aspect-ratio: 1;
  border-radius: 9px;
  background: var(--section);
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 400; color: var(--t3);
  cursor: pointer;
}
.thumb-untagged {
  border: 2px dashed var(--line-mid);
  background: transparent;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
}

/* classify photo grid */
.classify-area {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr 220px;
  overflow: hidden;
}
.photo-panel {
  padding: 20px 24px;
  border-right: 1px solid var(--line);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 22px;
}
.time-group-lbl {
  font-size: 11px;
  font-weight: 400;
  color: var(--t3);
  letter-spacing: 0.3px;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.time-group-lbl::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--line);
}
/* 사진 분류 그리드 — 컴팩트 (4열, 정사각형) */
.photo-grid-2 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.pcard {
  aspect-ratio: 1;
  border-radius: 8px;
  position: relative;
  cursor: pointer;
  overflow: hidden;
  transition: transform 0.13s, box-shadow 0.13s;
}
.pcard:hover { transform: scale(1.02); box-shadow: 0 4px 16px rgba(42,26,11,0.14); }
.pcard.selected { outline: 2.5px solid var(--dark); outline-offset: 2px; }
.pcard-tag {
  position: absolute;
  top: 7px; left: 7px;
  font-size: 10px; font-weight: 400;
  padding: 2px 7px;
  border-radius: 5px;
  background: rgba(255,255,255,0.92);
  color: var(--t2);
}
.pcard-check {
  position: absolute;
  top: 7px; right: 7px;
  width: 20px; height: 20px;
  background: var(--dark);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}
.pcard-check i { font-size: 12px; color: var(--bg); }
.bulk-tip {
  background: rgba(45,74,43,0.08);
  border: 1px solid rgba(45,74,43,0.18);
  border-radius: 10px;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  font-weight: 100;
  color: var(--green);
}
.bulk-tip i { font-size: 17px; flex-shrink: 0; }
.bulk-tip b { font-weight: 400; }

/* right children panel */
.children-panel {
  background: var(--section);
  padding: 18px 14px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.cp-title { font-size: 12px; font-weight: 400; color: var(--t2); margin-bottom: 8px; padding: 0 2px; }
.drop-card {
  background: var(--card);
  border-radius: 12px;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  border: 1.5px solid transparent;
  transition: all 0.15s;
}
.drop-card:hover { border-color: var(--line-mid); }
.drop-card.over { border: 1.5px dashed var(--dark); background: var(--accent); }
.drop-avatar {
  width: 30px; height: 30px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 400;
  flex-shrink: 0;
}
.drop-info { flex: 1; min-width: 0; }
.drop-name  { font-size: 13px; font-weight: 400; color: var(--t1); letter-spacing: -0.3px; }
.drop-label { font-size: 11px; font-weight: 100; color: var(--t3); }
.drop-count {
  font-size: 11px; font-weight: 400;
  background: var(--section);
  color: var(--t3);
  padding: 2px 7px;
  border-radius: 8px;
  min-width: 24px;
  text-align: center;
}
.drop-card.over .drop-count { background: var(--dark); color: var(--bg); }
.activity-sec {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}
.activity-title { font-size: 11px; font-weight: 400; color: var(--t3); margin-bottom: 7px; }
.achips { display: flex; flex-wrap: wrap; gap: 5px; }
.achip {
  padding: 4px 9px;
  font-size: 11px; font-weight: 100;
  color: var(--t2);
  background: var(--card);
  border-radius: 7px;
  cursor: pointer;
  border: 1px solid var(--line);
  transition: all 0.13s;
  user-select: none;
}
.achip:hover { background: var(--accent); }
.achip.active { background: var(--dark); color: var(--bg); border-color: var(--dark); }

/* ═══════════ CONTENTS ═══════════ */
.content-card-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 11px; }
.ccard {
  background: var(--card);
  border-radius: 13px;
  padding: 10px;
  cursor: pointer;
  transition: transform 0.13s;
}
.ccard:hover { transform: translateY(-2px); }
.ccard-thumb {
  aspect-ratio: 4/3;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 9px;
}
.ccard-thumb i { font-size: 36px; }
.ccard-name {
  font-size: 12px; font-weight: 400; color: var(--t1);
  letter-spacing: -0.3px; margin-bottom: 3px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.ccard-meta { font-size: 11px; font-weight: 100; color: var(--t3); }
.ccard-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 6px; }
.ccard-badge {
  font-size: 10px; font-weight: 400;
  padding: 2px 7px;
  border-radius: 5px;
}
.bd-pdf  { background: rgba(193,59,59,0.10);  color: #8B2323; }
.bd-img  { background: rgba(55,138,221,0.10);  color: #185FA5; }
.bd-doc  { background: rgba(99,153,34,0.10);   color: #3B6D11; }

/* thumb bg gradients */
.th-amber  { background: linear-gradient(135deg,#EDE0BF,#C9B58D); color: #5C3D1F; }
.th-coral  { background: linear-gradient(135deg,#F0E5C9,#A88858); color: #2A1A0B; }
.th-green  { background: linear-gradient(135deg,#EDE0BF,#5C7E33); color: #3B6D11; }
.th-pink   { background: linear-gradient(135deg,#F0E5C9,#ED93B1); color: #72243E; }
.th-blue   { background: linear-gradient(135deg,#E6F1FB,#B5D4F4); color: #0C447C; }
.th-teal   { background: linear-gradient(135deg,#EDE0BF,#A8C99A); color: #085041; }
.th-purple { background: linear-gradient(135deg,#EEEDFE,#AFA9EC); color: #3C3489; }

/* photo thumb colors */
.tc-1 { background: linear-gradient(135deg,#EDE0BF,#C9B58D); }
.tc-2 { background: linear-gradient(135deg,#F0E5C9,#A88858); }
.tc-3 { background: linear-gradient(135deg,#E6F1FB,#85B7EB); }
.tc-4 { background: linear-gradient(135deg,#FBEAF0,#ED93B1); }
.tc-5 { background: linear-gradient(135deg,#EAF3DE,#5C7E33); }
.tc-6 { background: linear-gradient(135deg,#E1F5EE,#A8C99A); }
.tc-7 { background: linear-gradient(135deg,#EEEDFE,#AFA9EC); }
.tc-8 { background: linear-gradient(135deg,#FAECE7,#F5C4B3); }

/* ═══════════ SYNC CARD ═══════════ */
.sync-card {
  background: var(--green);
  color: var(--bg);
  border-radius: 16px;
  padding: 20px 22px;
}
.sync-card .stat-label { color: var(--green-lt); }
.sync-card .stat-label i { color: var(--green-lt); }
.sync-card .stat-value { color: var(--bg); }
.sync-card .stat-unit  { color: var(--green-lt); }
.sync-card .stat-meta  { color: var(--green-lt); }
.sync-btn {
  margin-top: 14px;
  width: 100%;
  padding: 10px;
  font-size: 12px; font-weight: 400;
  background: var(--bg);
  color: var(--dark);
  border: none;
  border-radius: 9px;
  cursor: pointer;
  font-family: inherit;
}

/* ═══════════ ROADMAP ═══════════ */
.phase-badge {
  display: inline-block;
  font-size: 11px; font-weight: 400;
  padding: 5px 12px;
  border-radius: 10px;
  letter-spacing: 0.3px;
}
.ph-1 { background: var(--dark);  color: var(--bg); }
.ph-2 { background: var(--green); color: var(--bg); }
.ph-3 { background: rgba(99,153,34,0.18); color: #3B6D11; }
.ph-4 { background: var(--section); color: var(--t3); }
.features-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 11px; }
.fc {
  background: var(--card);
  border-radius: 14px;
  padding: 16px 18px;
  display: flex; flex-direction: column; gap: 9px;
}
.fc.st-done     { border-left: 3px solid var(--dark); }
.fc.st-progress { border-left: 3px solid var(--green); }
.fc.st-planned  { opacity: 0.7; }
.fc-top { display: flex; align-items: center; gap: 10px; }
.fc-icon { width: 32px; height: 32px; border-radius: 8px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.fc-icon i { font-size: 18px; }
.fc-name { font-size: 14px; font-weight: 400; color: var(--t1); letter-spacing: -0.3px; }
.fc-desc { font-size: 12px; font-weight: 100; color: var(--t3); line-height: 1.6; }
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px; font-weight: 400;
  padding: 3px 8px;
  border-radius: 7px;
  align-self: flex-start;
}
.sb-done     { background: rgba(42,26,11,0.10);  color: var(--dark); }
.sb-progress { background: rgba(45,74,43,0.12);  color: var(--green); }
.sb-planned  { background: var(--section);        color: var(--t3); }
.sb-dep      { background: rgba(193,59,59,0.08); color: #8B2323; }

/* ═══════════ TOAST ═══════════ */
#toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--dark);
  color: var(--bg);
  padding: 10px 20px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 400;
  z-index: 500;
  opacity: 0;
  transition: opacity 0.2s;
  pointer-events: none;
  white-space: nowrap;
}
#toast.show { opacity: 1; }

/* ═══════════ HIDDEN ═══════════ */
.hidden { display: none !important; }
.bottom-two { display: grid; grid-template-columns: 1.4fr 1fr; gap: 20px; }

/* PWA 설치 모달 애니메이션 */
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { transform: translateY(20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

/* (옛 thumb-fly-in 정의 제거 — 아래 line ~1488의 단일 정의로 통합됨) */

/* ─── 사진 프리뷰 모달 ─── */
#photoPreviewModal {
  display: none;
  position: fixed; inset: 0; z-index: 10000;
  align-items: center; justify-content: center;
  padding: 20px;
}
.ppm-backdrop {
  position: absolute; inset: 0;
  background: rgba(42, 26, 11, 0.78);
  cursor: pointer;
}
.ppm-content {
  position: relative; z-index: 1;
  background: var(--bg, #FBF6E9);
  border-radius: 18px;
  padding: 18px;
  max-width: min(92vw, 720px); max-height: 92vh;
  display: flex; flex-direction: column;
  gap: 14px;
  box-shadow: 0 24px 64px rgba(42, 26, 11, 0.5);
}
.ppm-content img {
  max-width: 100%; max-height: 70vh;
  border-radius: 10px;
  object-fit: contain;
  background: #000;
  display: block;
}
.ppm-info { line-height: 1.5; }
.ppm-actions { display: flex; justify-content: flex-end; gap: 8px; }

/* 위험(삭제) 버튼 */
.btn-danger {
  background: #DC2626; color: white; border: none;
  padding: 8px 14px; border-radius: 8px;
  font-family: inherit; font-size: 13px; font-weight: 600;
  cursor: pointer; display: inline-flex; align-items: center; gap: 4px;
  transition: background 0.15s;
}
.btn-danger:hover { background: #B91C1C; }

/* ─── 사진 보관함: 선택 체크박스 + 액션바 ─── */
.thumb-check {
  position: absolute;
  top: 6px; right: 6px;
  width: 22px; height: 22px;
  background: rgba(255,255,255,0.85);
  border: 2px solid rgba(255,255,255,0.95);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: all 0.15s;
  z-index: 2;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}
.thumb-check:hover { transform: scale(1.15); background: white; }
.thumb-check.on {
  background: #2D4A2B;
  border-color: white;
}
.thumb-check.on i { color: white; font-size: 13px; }
.thumb.is-selected {
  outline: 3px solid #2D4A2B;
  outline-offset: -3px;
}

/* 하단 액션 바 (선택된 사진이 있을 때만 나타남) */
#photoActionBar {
  position: fixed;
  bottom: 24px; left: 50%; transform: translateX(-50%);
  background: #2A1A0B;
  color: #F4ECD8;
  padding: 12px 18px 12px 22px;
  border-radius: 30px;
  box-shadow: 0 12px 36px rgba(42,26,11,0.45);
  display: flex; align-items: center; gap: 14px;
  z-index: 9000;
  animation: actionbar-pop 0.28s cubic-bezier(0.25, 1.5, 0.5, 1);
  font-family: inherit;
}
@keyframes actionbar-pop {
  0%   { opacity: 0; transform: translate(-50%, 20px); }
  100% { opacity: 1; transform: translate(-50%, 0); }
}
#photoActionBar .pab-btn {
  border: none;
  padding: 9px 16px;
  border-radius: 22px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  background: rgba(244, 236, 216, 0.15);
  color: #F4ECD8;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: background 0.13s;
}
#photoActionBar .pab-btn:hover { background: rgba(244, 236, 216, 0.25); }
#photoActionBar .pab-btn.pab-danger {
  background: #DC2626;
  color: white;
}
#photoActionBar .pab-btn.pab-danger:hover { background: #B91C1C; }

/* ─── 썸네일 <img> + 라벨 ─── */
.thumb { position: relative; }
.thumb-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 9px;
}
.thumb-label {
  position: absolute;
  bottom: 5px; left: 5px;
  font-size: 9px;
  font-weight: 400;
  background: rgba(255,255,255,0.88);
  padding: 2px 5px;
  border-radius: 4px;
  z-index: 2;
  color: var(--t1);
}

/* ─── 프리뷰 모달 좌우 화살표 ─── */
.ppm-nav {
  position: absolute;
  top: 50%; transform: translateY(-50%);
  width: 48px; height: 48px;
  background: rgba(244, 236, 216, 0.92);
  border: none; border-radius: 50%;
  color: #2A1A0B;
  cursor: pointer;
  z-index: 2;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 14px rgba(0,0,0,0.25);
  transition: background 0.13s, transform 0.13s;
}
.ppm-nav:hover { background: white; transform: translateY(-50%) scale(1.06); }
.ppm-nav i { font-size: 26px; }
.ppm-prev { left: 24px; }
.ppm-next { right: 24px; }
.ppm-counter {
  font-size: 12px; color: var(--t3);
  font-weight: 400;
}
.ppm-actions { align-items: center; }

/* ─── 선택 모드 버튼 활성 상태 ─── */
#btnSelectMode.active {
  background: var(--dark);
  color: var(--bg);
}

/* ─── 사진 보관함 toolbar — 텍스트 있는 버튼 정렬 ─── */
#btnPhoneRecv, #btnSelectMode {
  width: auto !important;
  min-width: 0;
  padding: 0 12px;
  height: 34px;
  font-size: 12px;
  font-weight: 400;
  display: inline-flex !important;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
  letter-spacing: -0.2px;
  border-radius: 9px;
  font-family: inherit;
  border: none;
  cursor: pointer;
}
#btnPhoneRecv i, #btnSelectMode i {
  font-size: 16px;
  flex-shrink: 0;
}
#btnSelectMode { background: transparent; color: var(--t2); }
#btnSelectMode:hover { background: var(--card); }
#btnSelectMode.active { background: var(--dark); color: var(--bg); }

/* ─── 발신자 확인 모달 (recv-confirm-box) ─── */
.recv-confirm-box {
  width: 100% !important;
  max-width: 340px !important;
  margin: 0 auto 16px !important;
  padding: 0 !important;
  background: transparent !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  display: flex !important;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}
.recv-confirm-img {
  width: 140px; height: 140px;
  object-fit: cover;
  border-radius: 16px;
  box-shadow: 0 8px 24px rgba(42,26,11,0.3);
  display: block;
}
.recv-confirm-emoji {
  width: 140px; height: 140px;
  border-radius: 16px;
  background: linear-gradient(135deg, #F4ECD8, #E6D4A6);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 72px;
  line-height: 1;
  box-shadow: 0 8px 24px rgba(42,26,11,0.18);
}
.recv-confirm-info { text-align: center; width: 100%; }
.recv-confirm-name { font-size: 16px; font-weight: 700; color: #2A1A0B; }
.recv-confirm-count { font-size: 14px; color: #5C3D1F; margin-top: 5px; }
.recv-confirm-labels { font-size: 12px; color: #8B6F47; margin-top: 3px; }
.recv-confirm-warn {
  font-size: 11px;
  color: #8B6F47;
  margin-top: 10px;
  line-height: 1.5;
  background: rgba(193,59,59,0.07);
  border: 1px solid rgba(193,59,59,0.15);
  border-radius: 8px;
  padding: 7px 10px;
}

/* (중복 thumb-fly-in 정의 제거 — line 1488의 outline 기반 단일 정의로 통합) */

/* (중복 .recv-confirm-hdr 제거 — 아래 Tabler 아이콘 버전 단일 정의로 통합) */
/* ─── 모달 헤더 (Tabler 아이콘) ─── */
.recv-confirm-hdr {
  font-size: 20px;
  font-weight: 800;
  color: #2A1A0B;
  letter-spacing: -0.4px;
  padding: 10px 16px;
  background: linear-gradient(135deg, #FBF6E9, #F4ECD8);
  border-radius: 12px;
  border: 2px solid rgba(45, 74, 43, 0.35);
  box-shadow: 0 4px 14px rgba(42, 26, 11, 0.12);
  margin-bottom: 6px;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.recv-confirm-hdr i { font-size: 26px; color: #2D4A2B; }
.recv-confirm-emoji {
  width: 140px; height: 140px;
  border-radius: 16px;
  background: linear-gradient(135deg, #F4ECD8, #E6D4A6);
  display: flex !important;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 24px rgba(42,26,11,0.18);
}
.recv-confirm-emoji i { color: #8B6F47; }
.recv-confirm-warn i { font-size: 13px; margin-right: 3px; vertical-align: middle; }

/* ─── 새 사진 도착 큰 배너 (최상단 고정) ─── */
#photoArrivalBanner {
  position: fixed;
  top: 24px; left: 50%; transform: translateX(-50%);
  background: linear-gradient(135deg, #2D4A2B, #1F3A20);
  color: white;
  padding: 14px 22px 14px 20px;
  border-radius: 16px;
  box-shadow: 0 12px 36px rgba(45, 74, 43, 0.5);
  display: flex;
  align-items: center;
  gap: 14px;
  z-index: 9500;
  min-width: 280px;
  max-width: 90vw;
  animation: arrival-banner-slide-in 0.5s cubic-bezier(0.25, 1.5, 0.5, 1), arrival-banner-pulse 2s ease-in-out 0.5s 2;
}
@keyframes arrival-banner-slide-in {
  from { opacity: 0; transform: translate(-50%, -40px); }
  to   { opacity: 1; transform: translate(-50%, 0); }
}
@keyframes arrival-banner-pulse {
  0%, 100% { box-shadow: 0 12px 36px rgba(45, 74, 43, 0.5); }
  50%      { box-shadow: 0 12px 36px rgba(45, 74, 43, 0.9), 0 0 0 8px rgba(45, 74, 43, 0.2); }
}
#photoArrivalBanner > i {
  font-size: 32px;
  flex-shrink: 0;
}
#photoArrivalBanner .pab-text { flex: 1; }
#photoArrivalBanner .pab-title { font-size: 16px; font-weight: 700; }
#photoArrivalBanner .pab-sub   { font-size: 12px; opacity: 0.85; margin-top: 2px; }
#photoArrivalBanner .pab-close {
  background: rgba(255,255,255,0.18);
  border: none;
  color: white;
  width: 28px; height: 28px;
  border-radius: 50%;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
#photoArrivalBanner .pab-close:hover { background: rgba(255,255,255,0.32); }

/* ─── fly-in: border가 깜빡거리는 효과 (overflow:hidden 영향 없음) ─── */
@keyframes thumb-flash {
  0%, 100% { outline: 4px solid #2D4A2B; outline-offset: 1px; }
  50%      { outline: 4px solid #FFB400; outline-offset: 3px; }
}
.thumb-fly-in {
  outline: 4px solid #2D4A2B !important;
  outline-offset: 1px;
  animation: thumb-flash 0.6s ease-in-out 4 !important;
  z-index: 5;
  position: relative;
}

/* ─── SAS 이모지 검증 영역 ─── */
.sas-slot {
  width: 100%;
  background: rgba(193, 59, 59, 0.06);
  border: 2px solid rgba(193, 59, 59, 0.25);
  border-radius: 12px;
  padding: 12px;
  margin-top: 8px;
  text-align: center;
  display: none;
}
.sas-slot.show { display: block; }
.sas-hdr {
  font-size: 13px;
  font-weight: 700;
  color: #8B2323;
  margin-bottom: 10px;
  letter-spacing: -0.2px;
}
.sas-row {
  display: flex;
  justify-content: center;
  gap: 14px;
  font-family: 'Apple Color Emoji', 'Segoe UI Emoji', 'Noto Color Emoji', 'EmojiOne Color', emoji, sans-serif;
  font-size: 42px;
  line-height: 1.1;
}
.sas-emoji {
  display: inline-block;
  padding: 4px 8px;
  background: rgba(42, 26, 11, 0.04);
  border-radius: 10px;
}

/* ─── 수신 중 — 사진이 모달 안으로 날아 들어오는 효과 ─── */
.photo-fly-ghost {
  position: fixed;
  top: 50%; left: 50%;
  width: 80px; height: 80px;
  margin: -40px 0 0 -40px;
  border-radius: 16px;
  background: linear-gradient(135deg, #2D4A2B, #1F3A20);
  box-shadow: 0 12px 32px rgba(45, 74, 43, 0.55);
  display: flex; align-items: center; justify-content: center;
  z-index: 10001;  /* 모달(9999)보다 위 */
  pointer-events: none;
}
.photo-fly-ghost i { font-size: 40px; color: white; }

/* ─── 사진 수신 그리드 (모달 안 미니 갤러리) — 각 사진이 자기 슬롯에 차곡차곡 ─── */
.recv-photo-grid {
  position: relative;            /* 스택된 슬롯 absolute 기준점 */
  margin: 14px auto 0;
  padding: 10px;
  background: #F4ECD8;
  border-radius: 14px;
  border: 2px dashed rgba(45, 74, 43, 0.4);
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
  width: 92%;
  min-height: 60px;
  overflow: visible;             /* hover 확대 시 그리드 밖으로 나가도 보이게 */
}
.recv-photo-slot {
  aspect-ratio: 1;
  border-radius: 8px;
  overflow: hidden;
  background: #FBF6E9;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 2px 6px rgba(42, 26, 11, 0.12);
  cursor: pointer;
  transition: transform 0.18s cubic-bezier(0.25, 1.5, 0.5, 1), box-shadow 0.18s, z-index 0s;
}
.recv-photo-slot img { width: 100%; height: 100%; object-fit: cover; display: block; }
.recv-photo-slot i { color: #8B6F47; font-size: 28px; }
/* hover — 확대해서 받은 사진 미리보기 */
.recv-photo-slot:hover {
  transform: scale(1.6) translateY(-4px);
  box-shadow: 0 16px 36px rgba(42, 26, 11, 0.45), 0 0 0 3px rgba(45, 74, 43, 0.5);
  z-index: 30 !important;
}
.recv-photo-slot--stacked:hover {
  transform: scale(1.6) rotate(0) !important;
}

/* +N 스택 배지 (6번째부터 5번째 슬롯 위에 카드 스택처럼) */
.recv-stack-badge {
  position: absolute;
  width: 36px; height: 28px;
  background: rgba(42, 26, 11, 0.92);
  color: #F4ECD8;
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 800;
  pointer-events: none;
  box-shadow: 0 4px 12px rgba(0,0,0,0.35);
}

/* photo-fly-ghost — 실제 사진 또는 fallback 아이콘 (margin 제거, JS가 top/left/width/height 설정) */
.photo-fly-ghost {
  position: fixed;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 16px 40px rgba(45, 74, 43, 0.55), 0 0 0 3px rgba(255,255,255,0.92);
  display: flex; align-items: center; justify-content: center;
  z-index: 10001;
  pointer-events: none;
  background: linear-gradient(135deg, #2D4A2B, #1F3A20);
}
.photo-fly-ghost img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo-fly-ghost i { font-size: 32px; color: white; }

/* ─── CS 로그인 UI (우측 상단 fixed) ─── */
#csAuthArea {
  position: fixed;
  top: 12px;
  right: 16px;
  z-index: 1100;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: inherit;
}
.cs-auth-login-btn {
  background: #2A1A0B;
  color: #F4ECD8;
  border: none;
  padding: 7px 14px;
  border-radius: 999px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: background 0.15s;
  box-shadow: 0 2px 6px rgba(42, 26, 11, 0.15);
}
.cs-auth-login-btn:hover { background: #1F3A20; }
.cs-auth-login-btn i { font-size: 14px; }
.cs-auth-role {
  background: #2D4A2B;
  color: #F4ECD8;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 999px;
}
.cs-auth-chip {
  background: #FBF6E9;
  color: #2A1A0B;
  border: 1px solid rgba(139, 111, 71, 0.2);
  padding: 6px 12px 6px 10px;
  border-radius: 999px;
  font-family: inherit;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 2px 6px rgba(42, 26, 11, 0.1);
  transition: background 0.15s;
}
.cs-auth-chip:hover { background: #F4ECD8; }
.cs-auth-name { font-weight: 700; }
.cs-auth-inst { color: #8B6F47; font-weight: 400; }
.cs-auth-menu {
  position: absolute;
  top: calc(100% + 6px); right: 0;
  background: #FBF6E9;
  border: 1px solid rgba(139, 111, 71, 0.2);
  border-radius: 10px;
  padding: 4px;
  min-width: 140px;
  box-shadow: 0 8px 22px rgba(42, 26, 11, 0.18);
  z-index: 1101;
}
.cs-auth-menu.hidden { display: none; }
.cs-auth-menu-item {
  background: transparent;
  border: none;
  width: 100%;
  text-align: left;
  padding: 9px 12px;
  border-radius: 6px;
  font-family: inherit;
  font-size: 13px;
  color: #2A1A0B;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 7px;
}
.cs-auth-menu-item:hover { background: rgba(42, 26, 11, 0.07); }
.cs-auth-menu-item i { font-size: 14px; color: #8B6F47; }
