/* ═══════════════════════════════════════════════════
   우리들의 사계절 — 플래너 스타일 리디자인
   컬러칩: Main Blue #4A7DB7 / Deep Charcoal #1A1A1A
           Soft Mint #76C4AE / Warm Ivory #FFFDF0
           Muted Brown #8B7365 / Pale Pink #F9D9E3
   ═══════════════════════════════════════════════════ */

@import url('https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/variable/pretendardvariable.css');
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+KR:wght@300;400;500;700;900&display=swap');

:root {
  /* ── 메인 컬러칩 ── */
  --main-blue:   #4A7DB7;
  --charcoal:    #1A1A1A;
  --soft-mint:   #76C4AE;
  --warm-ivory:  #FFFDF0;
  --muted-brown: #8B7365;
  --pale-pink:   #F9D9E3;

  /* ── UI 시스템 컬러 ── */
  --black:  #1A1A1A;
  --gray1:  #4A4A4A;
  --gray2:  #8A8A8A;
  --gray3:  #D0D0D0;
  --gray4:  #F4F4F4;
  --white:  #FFFFFF;
  --bg:     #F7F8FA;

  /* ── 구조 ── */
  --radius: 0px;
  --border: 1px solid #D8D8D8;
  --border-dark: 1.5px solid var(--charcoal);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Pretendard Variable', 'Pretendard', 'Noto Sans KR', sans-serif;
  background: var(--white);
  color: var(--charcoal);
  min-height: 100vh;
  line-height: 1.6;
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
}

::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-thumb { background: var(--gray3); }

/* ═══════════════════════════
   NAVBAR
═══════════════════════════ */
.navbar {
  position: sticky; top: 0; z-index: 500;
  height: 56px;
  background: var(--white);
  border-bottom: var(--border);
  display: flex; align-items: center;
  padding: 0 32px;
  gap: 16px;
}

.navbar-brand {
  display: flex; align-items: center; gap: 10px;
  font-weight: 900; font-size: 0.95rem; letter-spacing: .02em;
  color: var(--charcoal); text-decoration: none;
}

/* 로고 도형 3개 */
.brand-shapes { display: flex; gap: 5px; align-items: center; }
.shape-circle { width: 9px; height: 9px; border-radius: 50%; }
.shape-sq     { width: 9px; height: 9px; }
.shape-tri    {
  width: 0; height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-bottom: 9px solid var(--soft-mint);
}

.c-red    { background: var(--pale-pink); border: 1px solid #e0a0b8; }
.c-blue   { background: var(--main-blue); }
.c-yellow { background: var(--soft-mint); }
.c-green  { background: var(--muted-brown); }

.navbar-spacer { flex: 1; }

.navbar-user {
  display: flex; align-items: center; gap: 10px;
  font-size: 0.82rem; font-weight: 700;
}

.role-tag {
  font-size: 0.68rem; font-weight: 700;
  padding: 2px 9px;
  letter-spacing: .04em;
}
.role-tag.teacher {
  background: var(--soft-mint);
  color: var(--charcoal);
}
.role-tag.student {
  background: var(--main-blue);
  color: var(--white);
}

/* ═══════════════════════════
   BUTTON
═══════════════════════════ */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 9px 20px;
  font-family: inherit; font-size: 0.84rem; font-weight: 700;
  border: var(--border-dark);
  cursor: pointer; text-decoration: none;
  transition: background .15s, color .15s, box-shadow .12s;
  white-space: nowrap;
  background: var(--white); color: var(--charcoal);
  letter-spacing: .01em;
}
.btn:hover {
  background: var(--charcoal);
  color: var(--white);
}
.btn:active { opacity: .85; }

.btn-fill-blue  { background: var(--main-blue);  color: var(--white); border-color: var(--main-blue); }
.btn-fill-blue:hover { background: #3a6da7; }

.btn-fill-mint  { background: var(--soft-mint);  color: var(--charcoal); border-color: var(--soft-mint); }
.btn-fill-mint:hover { background: #5eb09a; }

.btn-fill-brown { background: var(--muted-brown); color: var(--white); border-color: var(--muted-brown); }
.btn-fill-brown:hover { background: #7a6354; }

.btn-fill-black { background: var(--charcoal); color: var(--white); border-color: var(--charcoal); }
.btn-fill-black:hover { background: #333; }

/* 기존 호환 */
.btn-fill-yellow { background: var(--soft-mint); color: var(--charcoal); border-color: var(--soft-mint); }
.btn-fill-red    { background: var(--muted-brown); color: var(--white); border-color: var(--muted-brown); }
.btn-fill-green  { background: var(--main-blue); color: var(--white); border-color: var(--main-blue); }

.btn-sm { padding: 5px 13px; font-size: 0.76rem; }
.btn-lg { padding: 12px 28px; font-size: 0.94rem; }
.btn-block { width: 100%; justify-content: center; }

/* ═══════════════════════════
   LANDING — HERO
═══════════════════════════ */
.hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: calc(100vh - 56px);
  border-bottom: var(--border);
}

/* 왼쪽 텍스트 영역 */
.hero-left {
  padding: 72px 60px;
  display: flex; flex-direction: column; justify-content: center;
  position: relative; overflow: hidden;
  border-right: var(--border);
  background: var(--white);
}

.hero-title {
  font-size: clamp(2.6rem, 4.8vw, 4.2rem);
  font-weight: 900;
  line-height: 1.08;
  letter-spacing: -.03em;
  position: relative; z-index: 1;
  color: var(--charcoal);
}

.hero-sub {
  margin-top: 22px;
  font-size: 0.95rem; font-weight: 400;
  color: var(--gray1);
  line-height: 1.9;
  position: relative; z-index: 1;
  max-width: 380px;
}

.hero-actions {
  margin-top: 40px;
  display: flex; gap: 12px; flex-wrap: wrap;
  position: relative; z-index: 1;
}

.hero-login-label {
  margin-top: 40px;
  margin-bottom: -24px;
  font-size: 0.72rem; font-weight: 700;
  letter-spacing: .18em; text-transform: uppercase;
  color: var(--gray2);
  position: relative; z-index: 1;
}

/* 히어로 배경 도형 */
.hero-deco { position: absolute; pointer-events: none; }
.hero-deco-circle-red {
  width: 180px; height: 180px; border-radius: 50%;
  background: var(--pale-pink);
  bottom: -50px; right: -50px;
  opacity: .5;
}
.hero-deco-sq-blue {
  width: 70px; height: 70px;
  background: var(--main-blue);
  top: 36px; right: 36px;
  opacity: .12;
}

/* 오른쪽 — 플래너 표지 스타일 4분할 */
.hero-right {
  position: relative; overflow: hidden;
  background: var(--bg);
}

/* 4분할 몬드리안 그리드 */
.hero-shapes {
  position: absolute; inset: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 0;
}

.hs-cell {
  display: flex; align-items: center; justify-content: center;
  position: relative; overflow: hidden;
  border: var(--border);
}

/* 4분할 배경색 */
.hs-cell:nth-child(1) { background: var(--main-blue); }
.hs-cell:nth-child(2) { background: var(--warm-ivory); }
.hs-cell:nth-child(3) { background: var(--pale-pink); }
.hs-cell:nth-child(4) { background: var(--soft-mint); }

/* 내부 래퍼 — 완전 가운데 정렬 */
.hs-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  text-align: center;
}

/* 한글 시즌 텍스트 — 중간 크기 */
.hs-season-ko {
  font-size: clamp(1.5rem, 2.8vw, 2.4rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -.01em;
  font-family: 'Pretendard Variable', 'Pretendard', sans-serif;
}
/* 셀별 한글 색상 */
.hs-cell:nth-child(1) .hs-season-ko { color: #FFFFFF; }
.hs-cell:nth-child(2) .hs-season-ko { color: #5C4A1E; }
.hs-cell:nth-child(3) .hs-season-ko { color: #7A3048; }
.hs-cell:nth-child(4) .hs-season-ko { color: #1E5C4E; }

/* 영문 시즌 텍스트 — 박스 컬러보다 진한 동계열 */
.hs-season-en {
  font-size: clamp(0.6rem, 1vw, 0.72rem);
  font-weight: 600;
  letter-spacing: .22em;
  text-transform: uppercase;
  font-family: 'Pretendard Variable', 'Pretendard', sans-serif;
}
/* 셀별 영문 색상 (박스보다 진한 동계열) */
.hs-cell:nth-child(1) .hs-season-en { color: rgba(255,255,255,.55); }
.hs-cell:nth-child(2) .hs-season-en { color: #8B7030; }
.hs-cell:nth-child(3) .hs-season-en { color: #A0486A; }
.hs-cell:nth-child(4) .hs-season-en { color: #2E7A66; }

/* 구버전 호환 */
.hs-big-text  { display: none; }
.hs-label     { display: none; }
.hs-season-dot{ display: none; }

/* ═══════════════════════════
   FEATURES
═══════════════════════════ */
.features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: var(--border);
}

.feature-item {
  padding: 52px 40px;
  border-right: var(--border);
  position: relative; overflow: hidden;
  background: var(--white);
}
.feature-item:last-child { border-right: none; }

.feature-num {
  font-size: 3.2rem; font-weight: 900;
  line-height: 1; color: var(--gray4);
  margin-bottom: 14px;
  letter-spacing: -.04em;
}

/* 도형 강조 */
.feature-shape {
  width: 36px; height: 36px;
  margin-bottom: 18px;
  position: relative;
}
.fs-circle { border-radius: 50%; }
.fs-1 { background: var(--main-blue); }
.fs-2 { background: var(--soft-mint); }
.fs-3 { background: var(--muted-brown); }

.feature-title {
  font-size: 1.05rem; font-weight: 900; margin-bottom: 10px;
  color: var(--charcoal);
}
.feature-desc {
  font-size: 0.84rem; color: var(--gray2); line-height: 1.85;
}

/* ═══════════════════════════
   ROLE SELECT
═══════════════════════════ */
.role-wrap {
  min-height: calc(100vh - 56px);
  display: grid; place-items: center;
  padding: 40px 24px;
  background: var(--bg);
}

.role-inner { width: 100%; max-width: 640px; }

.role-greeting {
  text-align: center;
  margin-bottom: 36px;
}
.role-greeting h1 { font-size: 1.7rem; font-weight: 900; color: var(--charcoal); }
.role-greeting p  { color: var(--gray2); margin-top: 6px; font-size: 0.9rem; }

.role-cards {
  display: grid; grid-template-columns: 1fr 1fr;
  border: var(--border-dark);
  gap: 0;
}

.role-card {
  padding: 44px 36px;
  cursor: pointer;
  border: none;
  position: relative; overflow: hidden;
  transition: background .15s;
  background: var(--white);
  text-align: left;
}
.role-card + .role-card { border-left: var(--border-dark); }
.role-card:hover { background: var(--warm-ivory); }

/* 카드 상단 컬러 도형 */
.role-card-shape {
  width: 44px; height: 44px;
  margin-bottom: 20px;
}
.rcs-teacher { background: var(--soft-mint); border-radius: 50%; }
.rcs-student  { background: var(--main-blue); }

.role-card h2 { font-size: 1.35rem; font-weight: 900; margin-bottom: 8px; color: var(--charcoal); }
.role-card p  { font-size: 0.84rem; color: var(--gray2); line-height: 1.85; }

.role-card-list {
  margin-top: 16px; list-style: none;
  font-size: 0.78rem; color: var(--gray2);
}
.role-card-list li { padding: 3px 0; }
.role-card-list li::before { content: '— '; color: var(--gray3); }

.join-box {
  margin-top: 16px;
  padding: 20px 24px;
  border: var(--border);
  background: var(--white);
}
.join-box h3 { font-size: 0.88rem; font-weight: 700; margin-bottom: 10px; }
.join-row { display: flex; gap: 8px; }

/* ═══════════════════════════
   APP LAYOUT
═══════════════════════════ */
.app-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  min-height: calc(100vh - 56px);
}

/* ── SIDEBAR ── */
.sidebar {
  border-right: var(--border);
  background: var(--white);
  padding: 24px 0;
  position: sticky; top: 56px;
  height: calc(100vh - 56px);
  overflow-y: auto;
}

.sidebar-section-title {
  font-size: 0.62rem; font-weight: 700;
  letter-spacing: .15em; text-transform: uppercase;
  color: var(--gray3);
  padding: 0 20px; margin-bottom: 4px;
}

.sidebar-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 20px;
  font-size: 0.84rem; font-weight: 500;
  color: var(--gray2);
  cursor: pointer;
  border-left: 3px solid transparent;
  transition: all .12s;
}
.sidebar-item:hover  { color: var(--charcoal); background: var(--bg); }
.sidebar-item.active {
  color: var(--charcoal);
  border-left-color: var(--main-blue);
  background: var(--bg);
  font-weight: 700;
}

/* 사이드바 하단 코드 박스 */
.sidebar-code-box {
  margin: 24px 16px 0;
  border: var(--border);
  padding: 12px 14px;
  background: var(--bg);
}
.sidebar-code-label {
  font-size: 0.62rem; font-weight: 700;
  color: var(--gray2); letter-spacing: .1em;
  text-transform: uppercase; margin-bottom: 4px;
}
.sidebar-code-value { font-size: 1.1rem; font-weight: 900; letter-spacing: .25em; color: var(--charcoal); }

/* ── MAIN ── */
.main-content {
  background: var(--bg);
  padding: 36px 40px;
  min-height: calc(100vh - 56px);
}

/* ═══════════════════════════
   PAGE HEADER
═══════════════════════════ */
.page-header {
  display: flex; align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 28px;
  background: var(--white);
  padding: 24px 28px 20px;
  border: var(--border);
  border-bottom: 2px solid var(--main-blue);
}

.page-title-block { display: flex; align-items: center; gap: 14px; }

/* 제목 앞 컬러 도형 */
.page-title-shape { flex-shrink: 0; }
.pts-red    { width: 14px; height: 38px; background: var(--pale-pink); }
.pts-blue   { width: 14px; height: 38px; background: var(--main-blue); }
.pts-yellow { width: 14px; height: 38px; background: var(--soft-mint); }
.pts-green  { width: 14px; height: 38px; background: var(--muted-brown); }
.pts-circle-red  { width: 32px; height: 32px; border-radius: 50%; background: var(--pale-pink); border: 1px solid #e0b0c0; }
.pts-circle-blue { width: 32px; height: 32px; border-radius: 50%; background: var(--main-blue); }

.page-title {
  font-size: 1.5rem; font-weight: 900; line-height: 1.1;
  color: var(--charcoal);
}
.page-subtitle {
  font-size: 0.78rem; color: var(--gray2); margin-top: 2px; font-weight: 400;
}

/* ═══════════════════════════
   STAT CARDS
═══════════════════════════ */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 1px;
  background: var(--gray3);
  border: var(--border);
  margin-bottom: 24px;
}

.stat-card {
  background: var(--white);
  padding: 20px 20px 16px;
  position: relative; overflow: hidden;
}

/* 카드 상단 컬러 선 */
.stat-card::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0;
  height: 3px;
}
.sc-red::before    { background: var(--pale-pink); }
.sc-blue::before   { background: var(--main-blue); }
.sc-yellow::before { background: var(--soft-mint); }
.sc-green::before  { background: var(--muted-brown); }

.stat-num   { font-size: 2rem; font-weight: 900; line-height: 1; color: var(--charcoal); }
.stat-label { font-size: 0.73rem; font-weight: 500; color: var(--gray2); margin-top: 4px; }

/* ═══════════════════════════
   CARD
═══════════════════════════ */
.card {
  background: var(--white);
  border: var(--border);
  padding: 20px 22px;
  position: relative;
  transition: box-shadow .15s;
}
.card:hover { box-shadow: 0 2px 12px rgba(74,125,183,.12); }

/* 왼쪽 컬러 선 */
.card-line {
  position: absolute; left: 0; top: 0; bottom: 0;
  width: 3px;
}
.cl-red    { background: var(--pale-pink); }
.cl-blue   { background: var(--main-blue); }
.cl-yellow { background: var(--soft-mint); }
.cl-green  { background: var(--muted-brown); }

/* ═══════════════════════════
   PORTFOLIO GRID
═══════════════════════════ */
.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1px;
  background: var(--gray3);
  border: var(--border);
}

.pf-item {
  background: var(--white);
  cursor: pointer;
  transition: box-shadow .12s;
  position: relative;
}
.pf-item:hover { z-index: 1; box-shadow: 0 4px 16px rgba(74,125,183,.16); }

.pf-img {
  width: 100%; height: 180px;
  object-fit: cover; display: block;
  background: var(--bg);
}

.pf-placeholder {
  width: 100%; height: 140px;
  display: flex; align-items: center; justify-content: center;
  font-size: 2.2rem;
  position: relative; overflow: hidden;
}

/* 플레이스홀더 배경 도형 */
.pf-placeholder::before {
  content: '';
  position: absolute;
  width: 80px; height: 80px;
  border-radius: 50%;
  opacity: .2;
}
.pfp-art::before      { background: var(--pale-pink);  right: -20px; bottom: -20px; }
.pfp-korean::before   { background: var(--main-blue);  right: -20px; bottom: -20px; }
.pfp-math::before     { background: var(--soft-mint);  right: -20px; bottom: -20px; }
.pfp-science::before  { background: var(--muted-brown);right: -20px; bottom: -20px; }
.pfp-fieldtrip::before{ background: var(--main-blue);  right: -20px; bottom: -20px; }
.pfp-etc::before      { background: var(--gray3);      right: -20px; bottom: -20px; }

.pf-body { padding: 12px 14px 14px; }

.pf-tag {
  display: inline-block;
  font-size: 0.67rem; font-weight: 700;
  padding: 2px 8px; margin-bottom: 6px;
  border: 1px solid;
  letter-spacing: .02em;
}
/* 분류 태그 색 */
.tag-class    { color: var(--main-blue);   border-color: var(--main-blue); }
.tag-daily    { color: var(--soft-mint);   border-color: var(--soft-mint); }
.tag-cheer    { color: var(--muted-brown); border-color: var(--muted-brown); }
.tag-letter   { color: #7B5EA7;            border-color: #b8a0d0; }
/* 기존 교과 태그 (호환) */
.tag-art      { color: var(--muted-brown); border-color: var(--muted-brown); }
.tag-korean   { color: var(--main-blue);   border-color: var(--main-blue); }
.tag-math     { color: #5a9e8a;            border-color: var(--soft-mint); }
.tag-science  { color: #3a7060;            border-color: #76C4AE; }
.tag-music    { color: #7B5EA7;            border-color: #b8a0d0; }
.tag-pe       { color: var(--muted-brown); border-color: #c0a090; }
.tag-fieldtrip{ color: #2a6e90;            border-color: #8ab8d0; }
.tag-etc      { color: var(--gray2);       border-color: var(--gray3); }

.pf-title   { font-size: 0.9rem; font-weight: 700; margin-bottom: 4px; line-height: 1.3; }
.pf-content {
  font-size: 0.78rem; color: var(--gray1); line-height: 1.65;
  display: -webkit-box; -webkit-line-clamp: 2;
  -webkit-box-orient: vertical; overflow: hidden;
}
.pf-meta {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: 10px; padding-top: 8px;
  border-top: 1px solid var(--gray4);
  font-size: 0.72rem; color: var(--gray2);
}

/* ═══════════════════════════
   FORM
═══════════════════════════ */
.form-wrap { max-width: 560px; }

.form-group { margin-bottom: 16px; }
.form-label {
  display: block; font-size: 0.76rem;
  font-weight: 700; margin-bottom: 5px;
  color: var(--gray1);
  letter-spacing: .02em;
}
.form-input, .form-select, .form-textarea {
  width: 100%;
  border: var(--border);
  padding: 10px 13px;
  font-family: inherit; font-size: 0.9rem;
  background: var(--white); color: var(--charcoal);
  transition: border-color .15s, box-shadow .15s;
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
  outline: none;
  border-color: var(--main-blue);
  box-shadow: 0 0 0 3px rgba(74,125,183,.12);
}
.form-textarea { resize: vertical; min-height: 120px; }
.form-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

/* 업로드 존 */
.upload-zone {
  border: 1.5px dashed var(--gray3);
  padding: 32px; text-align: center;
  cursor: pointer;
  transition: border-color .15s, background .15s;
  background: var(--bg);
}
.upload-zone:hover, .upload-zone.drag-over {
  border-color: var(--main-blue);
  background: rgba(74,125,183,.04);
}
.upload-zone-icon { font-size: 2rem; margin-bottom: 8px; color: var(--gray3); }
.upload-zone-text { font-size: 0.84rem; font-weight: 700; color: var(--gray1); }
.upload-zone-hint { font-size: 0.74rem; color: var(--gray2); margin-top: 4px; }

.img-preview {
  max-width: 100%; max-height: 280px;
  object-fit: contain; display: block;
  border: var(--border); margin-top: 12px;
}

/* ═══════════════════════════
   TABLE
═══════════════════════════ */
.data-table { width: 100%; border-collapse: collapse; border: var(--border); }
.data-table th {
  background: var(--charcoal); color: var(--white);
  padding: 10px 14px; text-align: left;
  font-size: 0.74rem; font-weight: 700; letter-spacing: .04em;
}
.data-table td {
  padding: 11px 14px;
  border-bottom: 1px solid var(--gray4);
  font-size: 0.84rem;
}
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: var(--warm-ivory); }

/* ═══════════════════════════
   PROGRESS BAR
═══════════════════════════ */
.prog-bar { height: 3px; background: var(--gray4); margin-top: 4px; }
.prog-fill { height: 100%; background: var(--main-blue); }

/* ═══════════════════════════
   MODAL
═══════════════════════════ */
.modal-backdrop {
  position: fixed; inset: 0;
  background: rgba(26,26,26,.5);
  z-index: 1000;
  display: flex; align-items: center; justify-content: center;
  padding: 16px;
  backdrop-filter: blur(2px);
}

.modal {
  background: var(--white);
  border: var(--border-dark);
  width: 100%; max-width: 560px;
  max-height: 90vh; overflow-y: auto;
  position: relative;
}

.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px;
  border-bottom: var(--border);
  background: var(--bg);
}
.modal-title { font-size: 0.95rem; font-weight: 900; color: var(--charcoal); }
.modal-close {
  background: none; border: none;
  font-size: 1.1rem; cursor: pointer; color: var(--gray2); line-height: 1;
}
.modal-close:hover { color: var(--charcoal); }
.modal-body { padding: 22px 24px; }

/* 모달 헤더 왼쪽 컬러 도형 */
.modal-header-shape {
  width: 6px; height: 24px; flex-shrink: 0; margin-right: 10px;
  background: var(--main-blue);
}

/* ═══════════════════════════
   NOTICE
═══════════════════════════ */
.notice-item {
  background: var(--white);
  border: var(--border);
  border-left: 3px solid var(--main-blue);
  padding: 14px 16px;
  margin-bottom: 8px;
}
.notice-title { font-size: 0.9rem; font-weight: 700; color: var(--charcoal); }
.notice-body  { font-size: 0.82rem; color: var(--gray1); margin-top: 4px; line-height: 1.75; }
.notice-due   { font-size: 0.75rem; font-weight: 700; color: var(--main-blue); margin-top: 6px; }
.notice-date  { font-size: 0.72rem; color: var(--gray2); }

/* ═══════════════════════════
   LETTER PREVIEW
═══════════════════════════ */
.letter-preview {
  border: var(--border);
  border-left: 3px solid var(--soft-mint);
  padding: 20px;
  background: var(--warm-ivory);
  font-size: 0.9rem; line-height: 2;
  min-height: 100px;
  white-space: pre-wrap;
  color: var(--charcoal);
}
.letter-preview-empty { color: var(--gray2); font-style: italic; }

/* ═══════════════════════════
   ALBUM PREVIEW (PDF용)
═══════════════════════════ */
#album-preview {
  background: var(--white);
  max-width: 780px;
  margin: 0 auto;
  border: var(--border);
}

.album-cover {
  padding: 60px 48px;
  background: var(--main-blue);
  border-bottom: var(--border);
  position: relative; overflow: hidden;
  min-height: 360px;
  display: flex; flex-direction: column; justify-content: flex-end;
}

/* 표지 도형들 */
.cover-shape-1 {
  position: absolute; top: 0; right: 0;
  width: 220px; height: 220px;
  background: rgba(255,255,255,.12);
  clip-path: polygon(100% 0, 100% 100%, 0 0);
}
.cover-shape-2 {
  position: absolute; bottom: 24px; right: 44px;
  width: 72px; height: 72px; border-radius: 50%;
  background: var(--soft-mint);
  opacity: .6;
}
.cover-shape-3 {
  position: absolute; top: 44px; left: 44px;
  width: 20px; height: 80px;
  background: var(--warm-ivory);
  opacity: .4;
}

.cover-year    { font-size: 0.78rem; font-weight: 700; color: rgba(255,255,255,.7); letter-spacing: .22em; margin-bottom: 8px; }
.cover-main    { font-size: 2.8rem; font-weight: 900; line-height: 1.1; color: var(--white); }
.cover-name    { font-size: 1.1rem; font-weight: 500; margin-top: 12px; color: rgba(255,255,255,.85); }
.cover-seasons { font-size: 1.4rem; margin-top: 20px; opacity: .7; }

.album-season-header {
  padding: 14px 24px;
  display: flex; align-items: center; gap: 14px;
  border-bottom: var(--border);
  background: var(--white);
}
.album-season-bar { width: 5px; height: 28px; flex-shrink: 0; }
.bar-spring { background: var(--pale-pink); }
.bar-summer { background: var(--main-blue); }
.bar-fall   { background: var(--muted-brown); }
.bar-winter { background: var(--gray3); }

.album-season-label { font-size: 1rem; font-weight: 900; color: var(--charcoal); }
.album-season-count { font-size: 0.76rem; color: var(--gray2); margin-left: auto; }

.album-items-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1px; background: var(--gray3);
  border-bottom: var(--border);
}

.album-item { background: var(--white); padding: 16px; }
.album-item-img {
  width: 100%; height: 160px; object-fit: cover;
  display: block; margin-bottom: 10px;
  border: 1px solid var(--gray4);
}
.album-item-subj { font-size: 0.67rem; font-weight: 700; color: var(--gray2); margin-bottom: 4px; letter-spacing: .04em; }
.album-item-title { font-size: 0.88rem; font-weight: 700; margin-bottom: 4px; }
.album-item-body  {
  font-size: 0.78rem; color: var(--gray1); line-height: 1.65;
  display: -webkit-box; -webkit-line-clamp: 3;
  -webkit-box-orient: vertical; overflow: hidden;
}
.album-item-date  { font-size: 0.67rem; color: var(--gray2); margin-top: 8px; }

.album-letter {
  padding: 40px 48px;
  border-top: var(--border);
  position: relative;
  background: var(--warm-ivory);
}
.album-letter-shape {
  position: absolute; top: 0; left: 0;
  width: 100%; height: 3px; background: var(--soft-mint);
}
.album-letter-title { font-size: 1.05rem; font-weight: 900; margin-bottom: 16px; color: var(--charcoal); }
.album-letter-body  { font-size: 0.9rem; line-height: 2; white-space: pre-wrap; color: var(--charcoal); }

/* ═══════════════════════════
   ALBUM — 페이지 분리 레이아웃
═══════════════════════════ */

/* 표지 업로드 패널 */
.cover-upload-panel {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; padding: 16px 20px;
  background: #f0faf5; border: 1.5px solid var(--soft-mint);
  margin-bottom: 20px;
}
.cup-left  { display: flex; align-items: center; gap: 14px; }
.cup-icon  { font-size: 1.6rem; }
.cup-title { font-size: 0.88rem; font-weight: 900; color: var(--charcoal); margin-bottom: 2px; }
.cup-desc  { font-size: 0.76rem; color: var(--gray2); }
.cup-right { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.cup-preview {
  width: 56px; height: 72px; object-fit: cover;
  border: 1.5px solid var(--gray3);
}
.cup-preview-empty {
  display: flex; align-items: center; justify-content: center;
  background: var(--bg); color: var(--gray3);
  font-size: 1.4rem;
}

/* 개별 앨범 페이지 카드 */
.album-page {
  border: var(--border);
  margin-bottom: 16px;
  position: relative;
  overflow: hidden;
  background: var(--white);
  box-shadow: 0 1px 4px rgba(0,0,0,.06);
}

/* 표지 페이지 */
.album-page-cover {
  min-height: 400px;
  display: flex; flex-direction: column; justify-content: flex-end;
  background: var(--main-blue);
  position: relative;
}
.cover-custom-img {
  position: absolute; inset: 0;
  width: 100%; height: 100%; object-fit: cover;
}
.cover-custom-empty {
  position: absolute; inset: 0;
  background: var(--main-blue);
}
.cover-info-overlay {
  position: relative; z-index: 2;
  padding: 32px 40px 36px;
  background: linear-gradient(to top, rgba(0,0,0,.55) 0%, rgba(0,0,0,0) 100%);
}
.album-page-cover .cover-year   { color: rgba(255,255,255,.75); font-size: 0.75rem; font-weight: 700; letter-spacing: .2em; margin-bottom: 6px; }
.album-page-cover .cover-main   { font-size: 2.2rem; font-weight: 900; line-height: 1.1; color: #fff; }
.album-page-cover .cover-name   { font-size: 1rem; font-weight: 500; margin-top: 10px; color: rgba(255,255,255,.9); }
.album-page-cover .cover-seasons{ font-size: 1.2rem; margin-top: 14px; opacity: .75; }

/* 세로형 기록 페이지 */
.album-page-portrait {
  padding: 28px 32px 24px;
  display: flex; flex-direction: column;
  min-height: 320px;
}
.alp-bar { height: 4px; width: 100%; margin-bottom: 10px; }
.alp-bar-blue  { background: var(--main-blue); }
.alp-bar-mint  { background: var(--soft-mint); }
.alp-bar-brown { background: var(--muted-brown); }
.alp-bar-pink  { background: var(--pale-pink); }
.alp-date    { font-size: 0.72rem; font-weight: 700; color: var(--gray2); letter-spacing: .1em; margin-bottom: 14px; }
.alp-subject { font-size: 0.68rem; font-weight: 700; color: var(--gray2); margin-bottom: 4px; letter-spacing: .05em; }
.alp-title   { font-size: 1.25rem; font-weight: 900; line-height: 1.25; color: var(--charcoal); margin-bottom: 10px; }
.alp-content { font-size: 0.84rem; color: var(--gray1); line-height: 1.8; white-space: pre-wrap; margin: 0; }
.alp-img-portrait {
  width: 100%; max-height: 260px; object-fit: contain;
  border: 1px solid var(--gray4); margin-bottom: 14px;
}
.alp-footer {
  margin-top: auto; padding-top: 10px;
  border-top: 1px solid var(--gray4);
  font-size: 0.67rem; color: var(--gray3);
}

/* 가로형 기록 페이지 */
.album-page-landscape {
  display: flex; flex-direction: row;
  min-height: 280px;
}
.alp-half {
  flex: 1; padding: 24px 24px;
  display: flex; flex-direction: column;
}
.alp-half-empty { background: var(--bg); }
.alp-divider { width: 1px; background: var(--gray4); }
.alp-img-landscape {
  width: 100%; max-height: 160px; object-fit: contain;
  border: 1px solid var(--gray4); margin-bottom: 10px;
}

/* 선생님 편지 페이지 */
.album-page-letter {
  padding: 36px 40px;
  background: var(--warm-ivory);
  min-height: 200px;
}
.alp-letter-deco { width: 100%; height: 3px; background: var(--soft-mint); margin-bottom: 20px; }
.alp-letter-title { font-size: 1rem; font-weight: 900; margin-bottom: 14px; color: var(--charcoal); }
.alp-letter-body  { font-size: 0.88rem; line-height: 2; white-space: pre-wrap; color: var(--charcoal); }
.album-page-letter-empty {
  padding: 48px;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg);
}

/* TOAST
═══════════════════════════ */
.toast {
  position: fixed; bottom: 24px; right: 24px; z-index: 9999;
  background: var(--charcoal); color: var(--white);
  padding: 12px 20px;
  font-size: 0.84rem; font-weight: 500;
  border-left: 3px solid var(--gray3);
  animation: toastIn .22s ease;
  max-width: 300px;
  box-shadow: 0 4px 16px rgba(0,0,0,.15);
}
.toast.ok  { border-left-color: var(--soft-mint); }
.toast.err { border-left-color: var(--pale-pink); }
@keyframes toastIn {
  from { opacity: 0; transform: translateX(20px); }
  to   { opacity: 1; transform: none; }
}

/* ═══════════════════════════
   LOADING
═══════════════════════════ */
.loading-screen {
  position: fixed; inset: 0; background: var(--white);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 20px; z-index: 9998;
}
.loading-brand { font-size: 1.1rem; font-weight: 900; color: var(--charcoal); }
.loading-shapes { display: flex; gap: 8px; }
.ls-dot { width: 10px; height: 10px; animation: lsBounce .7s infinite alternate; }
.ls-dot:nth-child(1) { background: var(--main-blue);   animation-delay: 0s; }
.ls-dot:nth-child(2) { background: var(--soft-mint);   animation-delay: .15s; }
.ls-dot:nth-child(3) { background: var(--muted-brown); animation-delay: .3s; }
.ls-dot:nth-child(4) { background: var(--pale-pink);   animation-delay: .45s; }
@keyframes lsBounce { from { transform: scaleY(1); } to { transform: scaleY(1.8); } }

/* ═══════════════════════════
   AVATAR
═══════════════════════════ */
.avatar {
  width: 32px; height: 32px; border-radius: 50%;
  border: 1px solid var(--gray3); object-fit: cover;
}
.avatar-init {
  width: 32px; height: 32px; border-radius: 50%;
  border: 1px solid var(--gray3);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.8rem; font-weight: 700;
  background: var(--bg); color: var(--charcoal);
}

/* ═══════════════════════════
   TAB BAR
═══════════════════════════ */
.tab-bar {
  display: flex; gap: 0;
  border-bottom: var(--border);
  margin-bottom: 20px;
  overflow-x: auto; background: var(--white);
}
.tab-item {
  padding: 10px 16px; white-space: nowrap;
  font-size: 0.8rem; font-weight: 500;
  color: var(--gray2); cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all .12s;
}
.tab-item:hover  { color: var(--charcoal); }
.tab-item.active {
  color: var(--charcoal);
  border-bottom-color: var(--main-blue);
  font-weight: 700;
}

/* ═══════════════════════════
   SECTION DIVIDER
═══════════════════════════ */
.section-divider {
  display: flex; align-items: center; gap: 12px;
  margin: 24px 0 16px;
}
.sd-shape { width: 10px; height: 10px; border-radius: 50%; background: var(--main-blue); }
.sd-text { font-size: 0.84rem; font-weight: 700; color: var(--charcoal); }
.sd-line { flex: 1; height: 1px; background: var(--gray3); }

/* ═══════════════════════════
   EMPTY STATE
═══════════════════════════ */
.empty-state {
  text-align: center; padding: 60px 24px;
  color: var(--gray2);
}
.empty-state-icon { font-size: 2.2rem; margin-bottom: 12px; }
.empty-state-text { font-size: 0.88rem; font-weight: 700; margin-bottom: 16px; }

/* ═══════════════════════════
   LOGIN MODAL 스타일
═══════════════════════════ */
.login-role-tabs {
  display: flex;
  border-bottom: var(--border);
  margin-bottom: 20px;
}
.login-role-tab {
  flex: 1; padding: 11px 16px;
  font-size: 0.84rem; font-weight: 700;
  cursor: pointer;
  border: none; background: none;
  color: var(--gray2);
  border-bottom: 2px solid transparent;
  transition: all .12s;
  font-family: inherit;
}
.login-role-tab.active {
  color: var(--charcoal);
  border-bottom-color: var(--main-blue);
}

.login-role-indicator {
  width: 40px; height: 40px; border-radius: 50%;
  margin: 0 auto 12px;
}
.login-role-indicator.teacher { background: var(--soft-mint); }
.login-role-indicator.student { background: var(--main-blue); }

/* ═══════════════════════════
   RESPONSIVE
═══════════════════════════ */
@media (max-width: 800px) {
  .hero { grid-template-columns: 1fr; }
  .hero-right { min-height: 240px; }
  .features { grid-template-columns: 1fr; }
  .feature-item { border-right: none; border-bottom: var(--border); }
  .app-layout { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .main-content { padding: 20px 16px; }
  .role-cards { grid-template-columns: 1fr; }
  .role-card + .role-card { border-left: none; border-top: var(--border-dark); }
  .stat-grid { grid-template-columns: 1fr 1fr; }
  .portfolio-grid { grid-template-columns: 1fr 1fr; }
  .page-header { padding: 16px; }
  .album-items-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 480px) {
  .portfolio-grid, .album-items-grid { grid-template-columns: 1fr; }
  .hero-left { padding: 40px 24px; }
  .form-grid2 { grid-template-columns: 1fr; }
  .data-table { font-size: 0.78rem; }
  .data-table th, .data-table td { padding: 8px 10px; }
}
