:root {
  color-scheme: light;   /* 강제 다크모드 차단 */

  /* ── 아이보리·갈색 디자인 시스템 ── */
  --primary:       #2D4A2B;
  --primary-dark:  #1F3A20;
  --primary-light: #C0DD97;

  --header-bg:     #2A1A0B;

  --bg:            #F4ECD8;
  --bg-card:       #FBF6E9;
  --surface:       #FBF6E9;
  --bg-section:    #EDE0BF;
  --bg-accent:     #F0E5C9;

  --text:          #2A1A0B;
  --text-soft:     #8B6F47;
  --text-body:     #5C3D1F;
  --border:        rgba(139,111,71,0.22);
  --border-soft:   rgba(139,111,71,0.12);

  --danger:        #C13B3B;
  --warn:          #854F0B;
  --shadow-sm:     0 1px 2px rgba(42,26,11,0.06);
  --shadow-md:     0 4px 12px rgba(42,26,11,0.08);
  --radius:        14px;
  --radius-lg:     20px;
}

/* ── 다크모드 강제 오버라이드 (Samsung Internet Force Dark 등 차단) ── */
@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: light;
    --bg:       #F4ECD8 !important;
    --bg-card:  #FBF6E9 !important;
    --surface:  #FBF6E9 !important;
    --text:     #2A1A0B !important;
  }
  html, body { background-color: #F4ECD8 !important; color: #2A1A0B !important; }
  #app        { background-color: #F4ECD8 !important; }
}

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

html, body {
  height: 100%;
  font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, 'Apple SD Gothic Neo', 'Malgun Gothic', system-ui, sans-serif;
  font-weight: 100;
  background-color: #F4ECD8 !important;
  color: #2A1A0B;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior: none;
}

button {
  font-family: inherit;
  border: none;
  background: none;
  cursor: pointer;
  color: inherit;
  font-size: inherit;
}

input, textarea, select {
  font-family: inherit;
  font-size: 16px;
}

#app {
  display: flex;
  flex-direction: column;
  height: 100dvh;
  max-width: 600px;
  margin: 0 auto;
  background: #F4ECD8;  /* 아이보리 — var(--bg) 폴백 */
  position: relative;
}

/* ===== App Header ===== */
.app-header {
  background: rgba(244,236,216,0.88);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  color: var(--text);
  padding: 14px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
  border-bottom: 1px solid var(--border-soft);
}

.app-header .title {
  font-size: 17px;
  font-weight: 900;
  letter-spacing: -0.6px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
}

.app-header .back-btn {
  color: var(--text);
  font-size: 22px;
  padding: 4px 8px;
}

.app-header .right-actions {
  display: flex;
  gap: 6px;
}

.app-header .right-actions button {
  color: var(--text-body);
  font-size: 18px;
  padding: 6px 8px;
}

/* Role badges */
.role-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
}
.role-badge-director {
  background: var(--primary);
  color: var(--bg);
}
.role-badge-teacher {
  background: var(--bg-accent);
  color: var(--text-body);
  border: 1px solid var(--border);
}
.role-badge-staff {
  background: var(--bg-section);
  color: var(--text-soft);
  border: 1px solid var(--border);
}

/* ===== Main Container ===== */
.main {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  scrollbar-width: none;       /* Firefox */
  -ms-overflow-style: none;    /* IE/Edge */
}
.main::-webkit-scrollbar { display: none; } /* Chrome/Safari */

html, body { scrollbar-width: none; -ms-overflow-style: none; }
html::-webkit-scrollbar, body::-webkit-scrollbar { display: none; }

/* ===== P2P 배지/안내 ===== */
.p2p-banner {
  background: var(--bg-card);
  border: 1px solid #c9dfd0;
  border-radius: var(--radius);
  padding: 12px 14px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: var(--shadow-sm);
}
.p2p-banner .p2p-icon { font-size: 24px; }
.p2p-banner .p2p-text {
  flex: 1;
  font-size: 12px;
  color: var(--primary);
  line-height: 1.5;
}
.p2p-banner .p2p-text b { font-size: 13px; }
.p2p-banner .p2p-text span { color: #4a6655; }

.p2p-mini {
  font-size: 11px;
  color: var(--primary);
  background: var(--bg-card);
  border: 1px solid #c9dfd0;
  border-radius: 8px;
  padding: 7px 10px;
  margin-bottom: 8px;
}

.gallery-p2p {
  margin: 8px 12px;
  text-align: center;
}

/* ===== Launcher (Home) ===== */
.launcher-section {
  margin-bottom: 24px;
}

.launcher-section h2 {
  font-size: 18px;
  font-weight: 900;
  color: var(--text);
  margin-bottom: 12px;
  padding-left: 4px;
  letter-spacing: -0.7px;
}

.app-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.app-icon {
  background: var(--bg-card);
  border-radius: 18px;
  padding: 18px 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  transition: transform 0.15s;
  text-align: center;
  border: none;
}

.app-icon:active {
  transform: scale(0.95);
  box-shadow: var(--shadow-md);
}

.app-icon .emoji {
  font-size: 32px;
  line-height: 1;
}

.app-icon .label {
  font-size: 12px;
  font-weight: 400;
  color: var(--text);
  word-break: keep-all;
  letter-spacing: -0.2px;
}

.app-icon.disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* ===== Camera ===== */
.camera-screen {
  position: fixed;
  inset: 0;
  background: black;
  z-index: 100;
  display: flex;
  flex-direction: column;
}

/* 카메라(풀스크린) 중엔 하단 탭바를 숨김 — 탭바(z-index:200)가 카메라 셔터/하단 버튼을 가리던 문제 */
body.camera-active .ya-tabbar { display: none !important; }

.camera-screen .video-wrap {
  flex: 1;
  position: relative;
  overflow: hidden;
}

.camera-screen video,
.camera-screen .face-guide,
.camera-screen .overlay-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.camera-screen video {
  object-fit: cover;
}

/* AR overlay */
.ar-overlay {
  position: absolute;
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 1;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
}

.camera-screen .face-guide {
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.camera-screen .face-guide-ellipse {
  width: 60%;
  aspect-ratio: 3 / 4;
  border: 2px dashed rgba(255,255,255,0.6);
  border-radius: 50%;
}

.camera-top-bar {
  position: absolute;
  top: 0; left: 0; right: 0;
  padding: 14px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: linear-gradient(to bottom, rgba(0,0,0,0.5), transparent);
  z-index: 2;
  color: white;
}

.camera-top-bar button {
  color: white;
  font-size: 22px;
  padding: 6px;
}

.camera-top-bar .target-tag {
  background: rgba(0,0,0,0.5);
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 600;
}

.camera-target-chips {
  position: absolute;
  bottom: 130px;
  left: 0; right: 0;
  display: flex;
  gap: 8px;
  padding: 0 16px;
  overflow-x: auto;
  z-index: 2;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.camera-target-chips::-webkit-scrollbar { display: none; }

.target-chip {
  flex-shrink: 0;
  background: rgba(0,0,0,0.55);
  color: white;
  border: 2px solid transparent;
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
}

.target-chip.active {
  background: var(--primary);
  border-color: white;
}

/* AR mode toggle button */
.ar-toggle {
  background: rgba(0,0,0,0.5);
  border-radius: 999px;
  padding: 6px 10px !important;
  font-size: 18px !important;
}
.ar-toggle.active {
  background: var(--header-bg);
}

/* AR designs strip (replaces target chips when AR mode active) */
.camera-design-strip {
  position: absolute;
  bottom: 130px;
  left: 0; right: 0;
  display: flex;
  gap: 10px;
  padding: 0 16px;
  overflow-x: auto;
  z-index: 2;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.camera-design-strip::-webkit-scrollbar { display: none; }

.design-chip {
  flex-shrink: 0;
  width: 60px;
  height: 60px;
  border-radius: 12px;
  background: rgba(0,0,0,0.55);
  border: 2px solid transparent;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  position: relative;
  cursor: pointer;
}
.design-chip.active {
  border-color: var(--header-bg);
  background: rgba(229,139,148,0.5);
}
.design-chip img {
  width: 36px;
  height: 36px;
  object-fit: contain;
}
.design-chip .label {
  font-size: 9px;
  color: white;
  text-align: center;
  white-space: nowrap;
  line-height: 1;
}
.design-chip.none-chip {
  font-size: 22px;
  color: white;
}

.camera-bottom-bar {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 22px 16px 32px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: linear-gradient(to top, rgba(0,0,0,0.5), transparent);
  z-index: 2;
}

.shutter-btn {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 4px solid rgba(255,255,255,0.4);
  box-shadow: 0 0 0 3px white inset;
}

.shutter-btn:active {
  transform: scale(0.92);
}

.flip-btn, .gallery-shortcut-btn {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(0,0,0,0.5);
  color: white;
  font-size: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.gallery-shortcut-btn img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

/* ===== Gallery ===== */
.gallery-toolbar {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.gallery-toolbar::-webkit-scrollbar { display: none; }

.filter-chip {
  flex-shrink: 0;
  padding: 7px 14px;
  border-radius: 999px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  font-size: 13px;
  font-weight: 100;
  color: var(--text-body);
  white-space: nowrap;
}

.filter-chip.active {
  background: var(--text);
  color: var(--bg);
  border-color: var(--text);
  font-weight: 400;
}

.photo-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  padding: 4px 4px 150px;   /* 하단 고정 액션바/탭바에 마지막 줄이 가리지 않도록 여백 */
}

.photo-thumb {
  aspect-ratio: 1;
  position: relative;
  background: var(--border);
  cursor: pointer;
  overflow: hidden;
}

.photo-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.photo-thumb .check {
  position: absolute;
  top: 6px; right: 6px;
  width: 24px; height: 24px;
  border-radius: 50%;
  background: rgba(255,255,255,0.85);
  border: 2px solid white;
  display: none;
}

.photo-thumb.selected { box-shadow: inset 0 0 0 4px #2F9E44; }
.photo-thumb.selected .check {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--primary);
  color: white;
  font-size: 13px;
  font-weight: 700;
}

.photo-thumb .child-tag {
  position: absolute;
  left: 4px; bottom: 4px;
  background: rgba(0,0,0,0.6);
  color: white;
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 4px;
}

/* 카메라가 열려 있을 때는 브릿지 전송바·가져오기 플로팅버튼을 숨겨 셔터가 가려지지 않게 */
body:has(#viewCamera:not(.hidden)) #galleryActionBar,
body:has(#viewCamera:not(.hidden)) #btnGalleryImport { display: none !important; }

.gallery-action-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 250;                 /* 하단 탭바(.ya-tabbar z-index:200) 위에 표시 */
  background: var(--surface);
  border-top: 1px solid var(--border);
  box-shadow: 0 -4px 16px rgba(0,0,0,0.10);
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px));
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.btn-primary {
  background: var(--text);
  color: white;
  border-radius: 10px;
  padding: 12px 18px;
  font-size: 15px;
  font-weight: 600;
  flex: 1;
}

.btn-secondary {
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 18px;
  font-size: 15px;
  font-weight: 500;
}
.btn-danger {
  background: var(--danger);
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 12px 18px;
  font-size: 15px;
  font-weight: 600;
}

.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-soft);
}

.empty-state .emoji { font-size: 44px; margin-bottom: 10px; }
.empty-state h3 { font-size: 16px; font-weight: 600; margin-bottom: 6px; color: var(--text); }
.empty-state p { font-size: 13px; }

/* ===== Result modal (after capture) ===== */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.85);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.result-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 380px;
  overflow: hidden;
}

.result-card .preview {
  width: 100%;
  aspect-ratio: 3 / 4;
  background: black;
  object-fit: cover;
  display: block;
}

.result-card .info {
  padding: 12px 16px;
  font-size: 13px;
  color: var(--text-soft);
  border-bottom: 1px solid var(--border);
}

.result-card .actions {
  padding: 14px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.result-card .actions .full {
  grid-column: 1 / -1;
}

/* ===== Toast ===== */
.toast {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--text);
  color: var(--bg);
  padding: 10px 18px;
  border-radius: 999px;
  font-size: 13px;
  z-index: 300;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s;
}

.toast.show { opacity: 1; }

/* ===== Hidden helper ===== */
.hidden { display: none !important; }

/* ===== Loading spinner ===== */
.spinner {
  width: 28px;
  height: 28px;
  border: 3px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  margin: 40px auto;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ===== Alim composer ===== */
.alim-block {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin-bottom: 12px;
  box-shadow: var(--shadow-sm);
}

.alim-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-soft);
  margin-bottom: 8px;
}

.alim-label-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.alim-label-row .alim-label {
  margin-bottom: 0;
}

.text-btn {
  font-size: 13px;
  color: var(--primary);
  font-weight: 500;
  padding: 4px 6px;
}

.alim-target-chips {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.alim-target-chips .target-chip {
  background: var(--bg);
  color: var(--text-soft);
  border: 1px solid var(--border);
  font-size: 13px;
  padding: 6px 12px;
}

.alim-target-chips .target-chip.active {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

.alim-spark-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 8px;
  padding: 4px 0;
}

.alim-textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--bg);
  font-family: inherit;
  font-weight: 100;
  font-size: 15px;
  color: var(--text);
  resize: vertical;
  min-height: 90px;
  letter-spacing: -0.2px;
}

.alim-textarea:focus {
  outline: 2px solid var(--primary-light);
  border-color: var(--primary);
}

.alim-photo-strip {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 4px 0;
  scrollbar-width: none;
}
.alim-photo-strip::-webkit-scrollbar { display: none; }

.alim-photo-empty {
  font-size: 13px;
  color: var(--text-soft);
  padding: 14px 0;
  text-align: center;
  width: 100%;
}

.alim-photo-thumb {
  flex-shrink: 0;
  width: 70px;
  height: 70px;
  border-radius: 8px;
  overflow: hidden;
  position: relative;
  background: var(--border);
}

.alim-photo-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.alim-photo-thumb .remove-btn {
  position: absolute;
  top: 2px; right: 2px;
  width: 20px; height: 20px;
  border-radius: 50%;
  background: rgba(0,0,0,0.65);
  color: white;
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.scenario-card {
  display: flex;
  align-items: center;
  gap: 10px;
  background: linear-gradient(135deg, #f4f0fc 0%, #e7d8fc 100%);
  border: 1px solid #d8c7f0;
  border-radius: 10px;
  padding: 10px 12px;
}

.scenario-icon { font-size: 26px; }
.scenario-info { flex: 1; }
.scenario-title { font-size: 14px; font-weight: 600; color: var(--text); }
.scenario-desc { font-size: 12px; color: var(--text-soft); margin-top: 2px; line-height: 1.4; }

.scenario-hint {
  font-size: 12px;
  color: var(--text-soft);
  margin-top: 6px;
  padding-left: 4px;
}

.alim-send-bar {
  position: sticky;
  bottom: 0;
  background: var(--surface);
  margin: 16px -16px -16px;
  padding: 14px 16px;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 8px;
}

.alim-send-bar .btn-primary { flex: 2; }
.alim-send-bar .btn-secondary { flex: 1; }

/* Alim preview modal */
.alim-preview-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
}

.alim-preview-title {
  font-size: 15px;
  font-weight: 600;
}

.alim-preview-body {
  padding: 16px;
  font-size: 13px;
  line-height: 1.6;
  color: var(--text);
  white-space: pre-wrap;
  background: #FFEB99;
  margin: 12px 16px;
  border-radius: 12px;
  max-height: 50vh;
  overflow-y: auto;
}

.alim-preview-body .preview-link {
  color: #006bbf;
  text-decoration: underline;
}

/* ===== Alim hint to invite ===== */
.alim-hint {
  font-size: 12px;
  color: var(--text-soft);
  background: var(--bg);
  border-radius: 8px;
  padding: 10px 12px;
  margin-top: 4px;
  line-height: 1.5;
}
.alim-hint a {
  color: var(--header-bg-dark, #c66d76);
  font-weight: 600;
  text-decoration: underline;
}

/* ===== Role management ===== */
.role-summary {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.role-add-card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin-bottom: 14px;
  box-shadow: var(--shadow-sm);
  border: 1px dashed var(--border);
}
.role-add-title {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 4px;
}
.role-add-card p {
  font-size: 11px;
  color: var(--text-soft);
  line-height: 1.5;
  margin-bottom: 10px;
}
.role-add-form {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 6px;
}
.role-add-form input, .role-add-form select {
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: var(--bg);
  font-size: 13px;
}
.role-add-form .btn-primary {
  width: auto;
  flex: none;
  padding: 8px 14px;
  font-size: 13px;
}

.role-list-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-soft);
  padding: 0 4px;
  margin-bottom: 6px;
}

.role-row {
  background: var(--surface);
  border-radius: 10px;
  padding: 10px 14px;
  display: flex;
  gap: 8px;
  align-items: center;
  box-shadow: var(--shadow-sm);
  margin-bottom: 6px;
  border-left: 4px solid var(--border);
}
.role-row.director { border-left-color: #ffb347; }
.role-row.teacher { border-left-color: #2e8b57; }
.role-row.staff { border-left-color: var(--text-soft); }

.role-row-main { flex: 1; }
.role-row-name { font-size: 13px; font-weight: 600; }
.role-me-badge {
  font-size: 11px;
  background: var(--header-bg);
  color: white;
  padding: 1px 6px;
  border-radius: 999px;
  margin-left: 4px;
}
.role-auto-badge {
  font-size: 10px;
  background: var(--bg);
  color: var(--text-soft);
  padding: 1px 6px;
  border-radius: 999px;
  margin-left: 4px;
}
.role-row-meta { font-size: 11px; color: var(--text-soft); margin-top: 2px; }
.role-row-actions { display: flex; gap: 4px; align-items: center; }
.role-row-actions select {
  padding: 6px 8px;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: var(--bg);
  font-size: 12px;
}
.role-del-btn {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 7px;
  padding: 6px 10px;
  color: var(--danger);
  font-size: 14px;
}

/* ===== Class / Child management ===== */
.cm-mode-tabs {
  display: flex;
  gap: 4px;
  background: var(--bg);
  padding: 4px;
  border-radius: 10px;
  margin-bottom: 12px;
}
.cm-mode-tabs button {
  flex: 1;
  padding: 10px;
  border-radius: 8px;
  background: transparent;
  border: none;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-soft);
}
.cm-mode-tabs button.active {
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow-sm);
}

.cm-readonly-notice {
  background: linear-gradient(135deg, #fff8e6, #fff3c8);
  border: 1px solid #f0e0a0;
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 12px;
  color: #6b5510;
  line-height: 1.5;
  margin-bottom: 12px;
}

.cm-inst-card {
  background: var(--bg-card);
  border-radius: 14px;
  padding: 14px 16px;
  margin-bottom: 12px;
  border: 1px solid var(--border-soft);
}
.cm-inst-name {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 4px;
}
.cm-inst-meta {
  font-size: 12px;
  color: var(--text-soft);
  margin-top: 2px;
}

.cm-year-filter {
  background: var(--surface);
  border-radius: 10px;
  padding: 10px 14px;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: var(--shadow-sm);
}
.cm-year-filter label { font-size: 13px; font-weight: 600; color: var(--text-soft); }
.cm-year-filter select {
  flex: 1;
  padding: 7px 10px;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: var(--bg);
  font-size: 14px;
}

.cm-year-group { margin-bottom: 18px; }
.cm-year-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-soft);
  padding: 0 4px;
  margin-bottom: 6px;
}

.cm-class-card {
  background: var(--surface);
  border-radius: 10px;
  padding: 12px 14px;
  margin-bottom: 8px;
  box-shadow: var(--shadow-sm);
  border-left: 4px solid var(--primary);
}
.cm-class-card.archived {
  border-left-color: var(--border);
  opacity: 0.7;
}
.cm-class-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}
.cm-class-name { font-size: 15px; font-weight: 700; }
.cm-class-count {
  font-size: 11px;
  color: var(--text-soft);
  background: var(--bg);
  padding: 3px 8px;
  border-radius: 999px;
}
.cm-class-meta {
  font-size: 11px;
  color: var(--text-soft);
  margin-bottom: 8px;
}
.cm-class-children {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.cm-class-children.dim {
  color: var(--text-soft);
  font-size: 12px;
  padding: 4px 0;
}
.cm-child-tag {
  font-size: 11px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 3px 8px;
  color: var(--text);
}
.cm-child-tag.dim { color: var(--text-soft); }

.cm-child-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-bottom: 60px;
}
.cm-child-row {
  background: var(--surface);
  border-radius: 10px;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: var(--shadow-sm);
}
.cm-child-thumb {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  overflow: hidden;
  flex-shrink: 0;
}
.cm-child-thumb img { width: 100%; height: 100%; object-fit: cover; }
.cm-child-info { flex: 1; }
.cm-child-name { font-size: 14px; font-weight: 700; display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.cm-child-meta { font-size: 11px; color: var(--text-soft); margin-top: 2px; line-height: 1.5; }
.cm-child-arrow { color: var(--text-soft); font-size: 20px; line-height: 1; padding-left: 4px; }

.cm-notes-hint {
  font-size: 12px;
  color: var(--text-soft);
  background: var(--surface);
  border-radius: 8px;
  padding: 8px 12px;
  margin-bottom: 4px;
  border: 1px dashed var(--border);
}

/* child notes badges */
.cn-badge { font-size: 13px; }
.cn-allergy-badge {
  font-size: 10px;
  background: #fff0e0;
  color: #c45c00;
  border: 1px solid #f0c090;
  border-radius: 5px;
  padding: 1px 5px;
  font-weight: 700;
}

/* child notes modal */
.cn-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  z-index: 200;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.cn-modal-backdrop.hidden { display: none; }
.cn-modal {
  background: var(--bg-card);
  border-radius: 22px 22px 0 0;
  width: 100%;
  max-width: 600px;
  max-height: 90dvh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.cn-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px 12px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.cn-modal-title { font-size: 16px; font-weight: 900; letter-spacing: -0.5px; color: var(--text); }
.cn-modal-close { font-size: 18px; color: var(--text-soft); padding: 4px; }
.cn-modal-body {
  flex: 1;
  overflow-y: auto;
  padding: 14px 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.cn-field-group { display: flex; flex-direction: column; gap: 5px; }
.cn-label { font-size: 12px; font-weight: 400; color: var(--text-body); letter-spacing: -0.2px; }
.cn-updated { font-size: 11px; color: var(--text-soft); text-align: right; }
.cn-modal-footer {
  display: flex;
  gap: 10px;
  padding: 14px 18px;
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}
.cn-modal-footer .btn-primary { flex: 1; }
.cn-modal-footer .btn-secondary { min-width: 80px; }

/* attendance allergy / med badges */
.att-allergy-badge, .att-med-badge {
  font-size: 14px;
  cursor: default;
}

/* ===== Parent management ===== */
.parent-summary {
  display: flex;
  gap: 6px;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--border);
}

.parent-manage-rows {
  padding-bottom: 60px;
}

.pm-row {
  background: var(--surface);
  border-radius: 10px;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 6px;
  border-left: 4px solid var(--border);
}
.pm-row.linked { border-left-color: #2e8b57; }
.pm-row.unlinked { border-left-color: var(--warn); }

.pm-row-main { flex: 1; display: flex; align-items: center; gap: 10px; }
.pm-row-info { flex: 1; }
.pm-row-name { font-size: 14px; font-weight: 600; }
.pm-row-status { font-size: 12px; color: var(--text-soft); margin-top: 3px; }

.pm-invite-btn {
  background: var(--header-bg);
  color: white;
  border: none;
  border-radius: 7px;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 600;
}

/* ===== Invite (학부모 초대) ===== */
.invite-intro {
  background: linear-gradient(135deg, #fff1ec, #ffe8e8);
  border: 1px solid #f5d3cf;
  border-radius: var(--radius);
  padding: 14px 16px;
  margin-bottom: 12px;
}
.invite-intro-title {
  font-size: 14px;
  font-weight: 700;
  color: #7a3d33;
  margin-bottom: 6px;
}
.invite-intro p {
  font-size: 12px;
  line-height: 1.6;
  color: #7a3d33;
}

.invite-bulk {
  display: flex;
  gap: 6px;
  margin-top: 10px;
}

.invite-rows {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-bottom: 100px;
}

.invite-row {
  background: var(--surface);
  border-radius: 10px;
  padding: 12px 14px;
  box-shadow: var(--shadow-sm);
  border: 2px solid transparent;
}

.invite-row.selected {
  border-color: var(--header-bg);
}

.invite-check {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.invite-check input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--header-bg);
}

.invite-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-top: 10px;
}

.invite-fields.dim {
  opacity: 0.5;
}

.invite-fields input {
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: var(--bg);
  font-size: 13px;
  width: 100%;
}

.invite-fields input:focus {
  outline: 2px solid var(--header-bg);
  outline-offset: -2px;
  border-color: var(--header-bg);
}

/* ===== Notice composer ===== */
.notice-type-row, .notice-scope-row {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.type-chip {
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--bg);
  border: 1px solid var(--border);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-soft);
}

.type-chip.active {
  background: var(--header-bg);
  color: white;
  border-color: var(--header-bg);
}

.notice-attach-area {
  position: relative;
  border: 2px dashed var(--border);
  border-radius: 10px;
  padding: 16px;
  text-align: center;
  background: var(--bg);
  font-size: 13px;
  color: var(--text-soft);
}

.notice-attach-area input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

/* ===== Attendance ===== */
.att-header {
  background: var(--surface);
  padding: 12px 14px;
  border-radius: var(--radius);
  margin-bottom: 10px;
  box-shadow: var(--shadow-sm);
}

.att-control-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 0;
}

.att-control-row label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-soft);
  min-width: 36px;
}

.att-control-row input[type="date"],
.att-control-row select {
  flex: 1;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
  font-size: 14px;
}

.att-summary {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  padding-top: 8px;
  margin-top: 8px;
  border-top: 1px solid var(--border);
}

.att-pill {
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  background: var(--bg);
  color: var(--text-soft);
}

.att-pill-present { background: #d6f5e3; color: #1f6d40; }
.att-pill-departed { background: #d8e8fc; color: #1d4f8f; }
.att-pill-absent { background: #f7d7d7; color: #8a1c1c; }

.att-bulk {
  display: flex;
  gap: 6px;
  margin-top: 10px;
}

.att-bulk-btn {
  flex: 1;
  padding: 8px;
  border-radius: 7px;
  background: var(--bg);
  border: 1px solid var(--border);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-soft);
}

.att-bulk-btn.att-bulk-absent { color: #8a1c1c; }

.att-rows {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-bottom: 100px;
}

.att-row {
  background: var(--surface);
  border-radius: 10px;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: var(--shadow-sm);
}

.att-name {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
}

.avatar-sm {
  width: 32px;
  height: 32px;
  background: var(--header-bg);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}

.att-note {
  font-size: 11px;
  color: var(--text-soft);
  font-weight: 400;
  margin-left: 4px;
}

.att-status-buttons {
  display: flex;
  gap: 4px;
}

.att-status-buttons button {
  padding: 6px 10px;
  border-radius: 7px;
  background: var(--bg);
  color: var(--text-soft);
  border: 1px solid var(--border);
  font-size: 12px;
  font-weight: 600;
  min-width: 44px;
}

.att-status-buttons button.active.present {
  background: #d6f5e3; color: #1f6d40; border-color: #98d4b1;
}
.att-status-buttons button.active.departed {
  background: #d8e8fc; color: #1d4f8f; border-color: #9bb8e0;
}
.att-status-buttons button.active.absent {
  background: #f7d7d7; color: #8a1c1c; border-color: #d99898;
}

.att-save-bar {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 600px;
  background: var(--surface);
  padding: 14px 16px;
  border-top: 1px solid var(--border);
  z-index: 50;
  box-shadow: 0 -2px 10px rgba(0,0,0,0.05);
}

.att-save-bar .btn-primary {
  width: 100%;
}

.att-save-bar .btn-primary:disabled {
  opacity: 0.6;
  background: var(--text-soft);
}

/* ── Class manage: local/chanjin distinction (h-3) ────────── */
.cm-legend-row { display: flex; gap: 10px; margin: 0 0 8px; }
.cm-legend { font-size: 11px; padding: 2px 8px; border-radius: 20px; }
.cm-legend-chanjin { background: #e8f4fd; color: #1a6896; }
.cm-legend-local { background: #fff3cd; color: #856404; }

.cm-local-badge {
  font-size: 10px; background: #fff3cd; color: #856404;
  border: 1px solid #ffd166; border-radius: 8px; padding: 1px 5px; margin-left: 4px;
}
.cm-class-card.local { border-left: 3px solid var(--primary-light); }
.cm-class-card.chanjin { border-left: 3px solid var(--border); }
.cm-class-lock { color: var(--text-soft); font-size: 14px; margin-left: auto; }
.cm-class-actions { display: flex; gap: 4px; margin-left: auto; }
.cm-icon-btn {
  background: none; border: none; cursor: pointer; padding: 4px 6px;
  font-size: 15px; border-radius: 6px; line-height: 1;
  transition: background 0.15s;
}
.cm-icon-btn:hover { background: var(--border); }
.cm-add-row { padding: 12px 0 4px; text-align: center; }
.cm-add-btn { min-width: 140px; }
.cm-child-local-actions { display: flex; gap: 4px; flex-shrink: 0; }

/* ── Onboarding (h-3) ────────────────────────────────────── */
.ob-intro {
  text-align: center; padding: 32px 24px 16px;
}
.ob-intro-icon { font-size: 52px; margin-bottom: 12px; }
.ob-intro h2 { font-size: 20px; font-weight: 700; margin-bottom: 8px; color: var(--text); }
.ob-intro p { font-size: 14px; color: var(--text-soft); line-height: 1.6; }

.ob-search-row {
  display: flex; gap: 8px; padding: 12px 16px;
}
.ob-input {
  flex: 1; padding: 10px 14px; border: 1.5px solid var(--border);
  border-radius: var(--radius); font-size: 15px; background: var(--surface);
  color: var(--text); outline: none;
}
.ob-input:focus { border-color: var(--primary); }
.ob-search-btn { flex-shrink: 0; padding: 10px 14px; font-size: 14px; }

.ob-results-label { padding: 4px 16px 6px; font-size: 12px; color: var(--text-soft); }
.ob-result-list { padding: 0 16px; display: flex; flex-direction: column; gap: 8px; }
.ob-result-item {
  background: var(--surface); border: 1.5px solid var(--border);
  border-radius: var(--radius); padding: 12px 14px; cursor: pointer; transition: border-color 0.15s;
}
.ob-result-item:hover { border-color: var(--primary-dark); }
.ob-result-item.selected { border-color: var(--primary); background: var(--primary-light); }
.ob-result-name { font-size: 15px; font-weight: 600; margin-bottom: 3px; }
.ob-result-meta { font-size: 12px; color: var(--text-soft); }

.ob-confirm {
  margin: 16px; padding: 16px; background: var(--primary-light);
  border-radius: var(--radius); border: 1.5px solid var(--primary);
}
.ob-sel-name { font-size: 16px; font-weight: 700; margin-bottom: 4px; }
.ob-sel-addr { font-size: 13px; color: var(--text-soft); margin-bottom: 2px; }
.ob-sel-meta { font-size: 12px; color: var(--text-soft); }
.ob-register-btn { width: 100%; margin-top: 12px; }

.ob-loading, .ob-error, .ob-empty {
  text-align: center; padding: 24px; color: var(--text-soft); font-size: 14px;
}
.ob-empty-sub { font-size: 12px; margin-top: 6px; opacity: 0.75; }

/* ── Play plans (h-5) ────────────────────────────────────── */
.pp-month-nav {
  display: flex; align-items: center; justify-content: center; gap: 16px;
  padding: 14px 16px 10px; background: var(--surface); border-bottom: 1px solid var(--border);
}
.pp-nav-btn {
  background: var(--border); border: none; border-radius: 8px;
  padding: 6px 14px; font-size: 20px; cursor: pointer; color: var(--text);
}
.pp-nav-btn:hover { background: var(--primary-light); }
.pp-month-label { font-size: 17px; font-weight: 700; min-width: 110px; text-align: center; }

.pp-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  margin: 10px 14px 0; padding: 14px; cursor: pointer; transition: box-shadow 0.15s;
}
.pp-card:hover { box-shadow: var(--shadow-md); }
.pp-card-header { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.pp-week-badge {
  background: var(--primary-light); color: var(--primary-dark);
  border-radius: 10px; padding: 2px 8px; font-size: 11px; font-weight: 700; flex-shrink: 0;
}
.pp-card-title { font-size: 15px; font-weight: 700; }
.pp-card-summary { font-size: 13px; color: var(--text-soft); margin-bottom: 8px; }
.pp-card-keywords { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 8px; }
.pp-keyword {
  background: var(--bg); border: 1px solid var(--border);
  border-radius: 20px; padding: 2px 8px; font-size: 11px; color: var(--text-soft);
}
.pp-card-arrow { font-size: 12px; color: var(--primary); text-align: right; }

.pp-detail-sheet {
  position: fixed; inset: 0; background: var(--surface);
  z-index: 100; display: flex; flex-direction: column; overflow: hidden;
}
.pp-detail-header {
  padding: 12px 16px; border-bottom: 1px solid var(--border); flex-shrink: 0;
}
.pp-close-btn { font-size: 14px; color: var(--primary); padding: 4px 0; }
.pp-detail-scroll {
  flex: 1; overflow-y: auto; padding: 16px; -webkit-overflow-scrolling: touch;
}
.pp-detail-title { font-size: 20px; font-weight: 800; margin-bottom: 4px; }
.pp-detail-meta { font-size: 13px; color: var(--text-soft); margin-bottom: 10px; }
.pp-detail-keywords { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 14px; }
.pp-detail-section { margin-bottom: 18px; }
.pp-section-title {
  font-size: 13px; font-weight: 700; color: var(--primary-dark);
  margin-bottom: 8px; padding-bottom: 4px; border-bottom: 1.5px solid var(--primary-light);
}
.pp-detail-body { font-size: 14px; line-height: 1.7; color: var(--text); }
.pp-activities { display: flex; flex-direction: column; gap: 6px; }
.pp-activity-row { display: flex; gap: 10px; align-items: flex-start; }
.pp-activity-time {
  background: var(--primary-light); color: var(--primary-dark); border-radius: 8px;
  padding: 2px 8px; font-size: 12px; font-weight: 700; flex-shrink: 0;
}
.pp-activity-text { font-size: 14px; line-height: 1.5; padding-top: 2px; }
.pp-materials { display: flex; flex-wrap: wrap; gap: 6px; }
.pp-material-tag {
  background: var(--bg); border: 1px solid var(--border); border-radius: 20px;
  padding: 3px 10px; font-size: 12px; color: var(--text);
}
.pp-material-tag.dim { opacity: 0.6; }
.pp-detail-loading { text-align: center; padding: 40px; color: var(--text-soft); }
.pp-locked {
  text-align: center; padding: 40px 24px;
}
.pp-locked-icon { font-size: 48px; margin-bottom: 12px; }
.pp-locked-msg { font-size: 16px; font-weight: 700; margin-bottom: 8px; }
.pp-locked-sub { font-size: 13px; color: var(--text-soft); line-height: 1.6; }

/* ── Play themes (h-6) ───────────────────────────────────── */
.pt-theme-chips-wrap {
  background: var(--surface); border-bottom: 1px solid var(--border);
  padding: 10px 0; overflow-x: auto; -webkit-overflow-scrolling: touch;
}
.pt-theme-chips {
  display: flex; gap: 8px; padding: 0 14px; white-space: nowrap;
}
.pt-theme-chip {
  border: 1.5px solid var(--border); border-radius: 20px;
  padding: 6px 14px; font-size: 13px; background: var(--surface);
  color: var(--text); cursor: pointer; white-space: nowrap; transition: all 0.15s;
}
.pt-theme-chip.active {
  background: var(--primary); color: #fff; border-color: var(--primary);
}
.pt-play-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  margin: 10px 14px 0; padding: 14px; cursor: pointer; transition: box-shadow 0.15s;
}
.pt-play-card:hover { box-shadow: var(--shadow-md); }
.pt-play-title { font-size: 15px; font-weight: 700; margin-bottom: 4px; }
.pt-play-summary { font-size: 13px; color: var(--text-soft); margin-bottom: 8px; }
.pt-play-meta { display: flex; gap: 6px; margin-bottom: 8px; flex-wrap: wrap; }
.pt-meta-tag {
  background: var(--bg); border: 1px solid var(--border); border-radius: 20px;
  padding: 2px 8px; font-size: 11px; color: var(--text-soft);
}
.pt-play-materials { display: flex; flex-wrap: wrap; gap: 4px; }
.pt-steps { display: flex; flex-direction: column; gap: 8px; }
.pt-step-row { display: flex; gap: 10px; align-items: flex-start; }
.pt-step-num {
  background: var(--primary); color: #fff; border-radius: 50%;
  width: 22px; height: 22px; display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; flex-shrink: 0;
}
.pt-step-text { font-size: 14px; line-height: 1.5; padding-top: 2px; }

/* ── Teacher invite (h-4) ────────────────────────────────── */
.ti-body { padding: 4px 0; }
.ti-desc { font-size: 13px; color: var(--text-soft); line-height: 1.6; margin-bottom: 16px; }
.ti-gen-btn { width: 100%; }
.ti-url-box {
  background: var(--bg); border: 1.5px solid var(--border); border-radius: var(--radius);
  padding: 10px 12px; font-size: 12px; word-break: break-all; margin-bottom: 10px;
  color: var(--text-soft); user-select: all;
}
.ti-link-btns { display: flex; gap: 8px; margin-bottom: 8px; }
.ti-copy-btn, .ti-share-btn { flex: 1; }
.ti-hint { font-size: 12px; color: var(--text-soft); text-align: center; }

/* ── 알림장 학부모 발송 시트 ── */
.alim-send-sheet-backdrop {
  position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 200;
  display: flex; align-items: flex-end;
}
.alim-send-sheet {
  background: var(--bg-card); border-radius: 22px 22px 0 0; width: 100%; max-height: 72vh;
  display: flex; flex-direction: column;
  animation: slideUp 0.22s ease;
}
@keyframes slideUp { from { transform: translateY(100%); } to { transform: translateY(0); } }
.alim-send-sheet-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 16px 20px 12px; border-bottom: 1px solid var(--border);
  font-weight: 600; font-size: 15px; flex-shrink: 0;
}
.alim-send-sheet-list { overflow-y: auto; flex: 1; padding: 4px 0; }
.alim-send-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 20px; border-bottom: 1px solid #f3f3f3;
}
.alim-send-row.sent { opacity: 0.55; }
.alim-send-name { font-size: 15px; font-weight: 500; }
.alim-send-done { color: #22a06b; font-size: 13px; font-weight: 600; }
.alim-send-btn { font-size: 13px; padding: 7px 14px; }
.alim-send-sheet-footer {
  padding: 12px 20px 20px; border-top: 1px solid var(--border);
  display: flex; justify-content: center; flex-shrink: 0;
}
.alim-send-progress { color: var(--text-soft); font-size: 13px; padding: 6px 0; }

/* 알림장 텍스트 fallback 모달 — 발송 시트(z-index:200) 위에 표시 */
.alim-text-modal { z-index: 300; }

/* 알림장 텍스트 fallback 모달 */
.alim-text-fallback {
  width: 100%; min-height: 130px; padding: 10px 12px;
  border: 1.5px solid var(--border); border-radius: var(--radius);
  font-size: 13px; line-height: 1.6; resize: none; box-sizing: border-box;
  margin-bottom: 12px; background: var(--bg); color: var(--text);
}

/* 학부모 초대 — 연락처 버튼 */
.invite-phone-row { display: flex; gap: 6px; align-items: center; }
.invite-phone-row input[type="tel"] { flex: 1; min-width: 0; }
.invite-contact-btn {
  background: var(--primary-light); border: 1.5px solid var(--primary); border-radius: 8px;
  padding: 7px 11px; font-size: 13px; font-weight: 600; cursor: pointer; flex-shrink: 0;
  color: var(--primary-dark); white-space: nowrap;
  line-height: 1.2; transition: background 0.15s;
}
.invite-contact-btn:active { background: var(--primary); color: #fff; }

/* ── 갤러리 검색 ── */
.gallery-search-row {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px 4px;
  flex-wrap: wrap;
}
.gallery-search-field {
  display: flex;
  align-items: center;
  gap: 4px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 5px 8px;
  flex: 1;
  min-width: 110px;
}
.gallery-search-icon { font-size: 14px; flex-shrink: 0; }
.gallery-search-input {
  border: none;
  outline: none;
  font-size: 13px;
  width: 100%;
  background: transparent;
  color: var(--text);
}
.gallery-search-clear {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 5px 10px;
  font-size: 12px;
  color: var(--text-soft);
  cursor: pointer;
  white-space: nowrap;
}
.gallery-filter-chips {
  display: flex;
  gap: 6px;
  padding: 4px 12px 8px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* ── PWA 알림 배너 (시스템 알림 스타일) ── */
.pwa-notif-banner {
  position: fixed;
  top: max(12px, env(safe-area-inset-top, 12px));
  left: 12px;
  right: 12px;
  z-index: 9999;
  display: grid;
  grid-template-columns: 44px 1fr auto;
  grid-template-areas:
    "icon body close"
    "icon body close"
    "action action action";
  column-gap: 12px;
  row-gap: 10px;
  align-items: center;
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  padding: 14px 14px 14px 16px;
  border-radius: 16px;
  box-shadow:
    0 12px 32px rgba(0, 0, 0, 0.18),
    0 4px 8px rgba(0, 0, 0, 0.08);
  transform: translateY(-130%);
  opacity: 0;
  transition: transform 0.35s cubic-bezier(0.2, 0.9, 0.3, 1.2), opacity 0.25s ease;
}
.pwa-notif-banner.show {
  transform: translateY(0);
  opacity: 1;
}
.pwa-notif-banner.pwa-banner-kakao {
  background: linear-gradient(135deg, #FEE500 0%, #FFD700 100%);
}
.pwa-notif-icon {
  grid-area: icon;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--primary-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  flex-shrink: 0;
}
.pwa-banner-kakao .pwa-notif-icon {
  background: rgba(255, 255, 255, 0.6);
}
.pwa-notif-body {
  grid-area: body;
  min-width: 0;
}
.pwa-notif-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.3;
  letter-spacing: -0.2px;
}
.pwa-notif-desc {
  font-size: 12.5px;
  color: var(--text-soft);
  margin-top: 3px;
  line-height: 1.45;
}
.pwa-banner-kakao .pwa-notif-desc {
  color: rgba(0, 0, 0, 0.7);
}
.pwa-notif-close {
  grid-area: close;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: none;
  background: rgba(0, 0, 0, 0.06);
  color: var(--text-soft);
  font-size: 13px;
  cursor: pointer;
  align-self: start;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.pwa-notif-close:active {
  background: rgba(0, 0, 0, 0.12);
}
.pwa-notif-action {
  grid-area: action;
  width: 100%;
  padding: 12px;
  border-radius: 12px;
  border: none;
  font-size: 14.5px;
  font-weight: 700;
  background: var(--primary);
  color: #fff;
  cursor: pointer;
  letter-spacing: -0.1px;
  box-shadow: 0 2px 8px rgba(29, 158, 117, 0.3);
}
.pwa-notif-action:active {
  transform: scale(0.98);
}
.pwa-banner-kakao .pwa-notif-action {
  background: rgba(0, 0, 0, 0.85);
  color: #FEE500;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

/* ═══ photo-bridge "앱으로 보내기" 기능 (server 버전에서 병합) ═══ */
/* ── 전체 선택 바 ────────────────────────────────────── */
.gallery-select-all-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 16px;
  background: var(--primary-light);
  border-bottom: 1px solid var(--border);
}
.gallery-select-count {
  font-size: 13px;
  color: var(--text-soft);
}
.gallery-select-all-btn {
  font-size: 13px;
  font-weight: 600;
  color: var(--primary);
  padding: 4px 10px;
  border-radius: 8px;
  background: none;
  border: 1px solid var(--primary);
}
.gallery-select-all-btn:active {
  background: var(--primary-light);
}

/* ── Photo Bridge Send 모달 ─────────────────────────── */
.pb-send-card {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.pb-send-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
}
.pb-send-icon { font-size: 22px; }
.pb-send-hint {
  font-size: 13px;
  color: var(--text-soft);
  line-height: 1.5;
}
.pb-status-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  background: var(--bg);
  border-radius: 10px;
  font-size: 13px;
  color: var(--text-soft);
}
.pb-status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #cbd5e1;
  flex-shrink: 0;
}
.pb-status-dot.connecting { background: #f59e0b; animation: pbPulse 1.2s infinite; }
.pb-status-dot.connected  { background: #10b981; }
.pb-status-dot.error      { background: #ef4444; }
@keyframes pbPulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.35; }
}
.pb-code-row {
  display: flex;
  gap: 8px;
}
.pb-code-input {
  flex: 1;
  padding: 12px;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 6px;
  text-align: center;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  border-radius: 10px;
  font-family: monospace;
}
.pb-code-input:disabled { opacity: 0.5; }
.pb-connect-btn {
  padding: 0 18px;
  border-radius: 10px;
  background: var(--primary);
  color: #fff;
  font-weight: 700;
  border: none;
  font-size: 15px;
}
.pb-connect-btn:disabled { background: var(--border); color: var(--text-soft); }

/* ── SAS (Short Authentication String) ─────────────── */
.pb-sas-wait {
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
  border: 2px solid #f59e0b;
  border-radius: 14px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
  text-align: center;
}
.pb-sas-title {
  font-size: 13px;
  font-weight: 700;
  color: #92400e;
  line-height: 1.5;
}
.pb-sas-emojis {
  font-size: 36px;
  letter-spacing: 8px;
  padding: 8px 14px;
  background: rgba(255,255,255,0.85);
  border-radius: 12px;
  font-family: 'Apple Color Emoji','Segoe UI Emoji','Noto Color Emoji',sans-serif;
  line-height: 1.2;
}
.pb-sas-status {
  font-size: 12px;
  color: #78350f;
}
.pb-sas-ttl {
  font-size: 11px;
  font-weight: 700;
  font-family: monospace;
  color: #78350f;
}
.pb-progress {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.pb-progress-label {
  font-size: 13px;
  color: var(--text-soft);
}
.pb-progress-track {
  height: 6px;
  background: var(--border);
  border-radius: 3px;
  overflow: hidden;
}
.pb-progress-fill {
  height: 100%;
  background: var(--primary);
  width: 0%;
  transition: width .2s;
}
.pb-send-footer {
  display: flex;
  justify-content: flex-end;
}

/* ── 갤러리 브릿지 배너 (QR 자동 모드) ──────────────────── */
.gallery-bridge-banner {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: var(--primary);
  color: #fff;
  font-size: 13px;
  line-height: 1.5;
}
.bridge-banner-icon { font-size: 18px; flex-shrink: 0; }

/* ── 목적지 선택 시트 ──────────────────────────────────── */
.bridge-dest-sheet {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 300;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.bridge-dest-panel {
  background: var(--surface);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  padding: 20px 16px 32px;
  width: 100%;
  max-width: 600px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transform: translateY(100%);
  transition: transform 0.25s cubic-bezier(0.32, 0.72, 0, 1);
}
.bridge-dest-panel.show { transform: translateY(0); }
.bridge-dest-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
  text-align: center;
}
.bridge-dest-hint {
  font-size: 12px;
  color: var(--text-soft);
  text-align: center;
  line-height: 1.5;
}
.bridge-dest-btns {
  display: flex;
  gap: 10px;
}
.bridge-dest-btn {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 16px 12px;
  background: var(--bg);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.bridge-dest-btn:active {
  background: var(--primary-light);
  border-color: var(--primary);
}
.bridge-dest-btn-icon { font-size: 28px; }
.bridge-dest-btn-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
}
.bridge-dest-btn-hint {
  font-size: 11px;
  color: var(--text-soft);
  text-align: center;
  line-height: 1.4;
}
.bridge-dest-cancel {
  width: 100%;
  text-align: center;
  margin-top: 4px;
}

/* ── Swipe-to-Send Track ─────────────────────────────── */
.swipe-send-wrap {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.swipe-send-sub {
  font-size: 11px;
  color: var(--text-soft);
  text-align: center;
}
.swipe-send-track {
  position: relative;
  height: 52px;
  border-radius: 26px;
  background: #fef3c7;
  border: 2px solid #f59e0b;
  overflow: hidden;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}
.swipe-send-fill {
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 0%;
  background: linear-gradient(90deg, #f59e0b 0%, #fb923c 100%);
  border-radius: 26px;
  pointer-events: none;
}
.swipe-send-label {
  position: absolute;
  left: 0; right: 0; top: 50%;
  transform: translateY(-50%);
  text-align: center;
  font-size: 14px;
  font-weight: 600;
  color: #92400e;
  white-space: nowrap;
  pointer-events: none;
}
.swipe-send-target-icon {
  position: absolute;
  right: 14px; top: 50%;
  transform: translateY(-50%);
  font-size: 22px;
  pointer-events: none;
  line-height: 1;
}
.swipe-send-thumb {
  position: absolute;
  left: 4px; top: 4px;
  width: 44px; height: 44px;
  border-radius: 50%;
  background: #f59e0b;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  box-shadow: 0 2px 10px rgba(245,158,11,0.45);
  cursor: grab;
  z-index: 2;
}
.swipe-send-thumb:active { cursor: grabbing; }
.swipe-thumb-badge {
  position: absolute;
  top: -3px; right: -3px;
  background: #ef4444;
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  min-width: 16px; height: 16px;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  padding: 0 3px;
  line-height: 1;
}
/* fly-out clone animation */
@keyframes photoFlyOut {
  0%   { transform: translate(0, 0)   scale(1)    rotate(0deg);  opacity: 1; }
  18%  { transform: translate(30px, -20px) scale(1.12) rotate(-3deg); opacity: 1; }
  100% { transform: translate(150vw, -60px) scale(0.35) rotate(12deg); opacity: 0; }
}
.photo-fly-clone {
  position: fixed;
  border-radius: 10px;
  overflow: hidden;
  pointer-events: none;
  z-index: 9999;
  box-shadow: 0 8px 24px rgba(0,0,0,0.3);
  animation: photoFlyOut 1.0s cubic-bezier(0.22, 0, 0.58, 1) forwards;
}


/* ═══════════════════════════════════════════════
   유아스토리 교사 앱 — teacher-app-main 디자인
   (아이보리·갈색·녹색 시스템, Pretendard)
═══════════════════════════════════════════════ */

/* ─── 헤더 ─── */
.ya-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  padding: 52px 14px 12px;
  background: rgba(244,236,216,0.88);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid rgba(139,111,71,0.10);
}
.ya-brand { display: flex; align-items: center; gap: 10px; flex: 1 1 100%; min-width: 0; }
.ya-brand-icon { width: 30px; height: 30px; border-radius: 8px; }
.ya-brand-name {
  font-size: 18px;
  font-weight: 900;
  letter-spacing: -0.7px;
  color: var(--text);
  white-space: nowrap;
}
/* ★2줄 헤더: 로고+타이틀=1행(전폭), 컨트롤(담임·이름·알림·초대·도움말)=2행 우측정렬 → 우측 버튼 안 잘림 */
.ya-header-controls { width: 100%; justify-content: flex-end; margin-top: 6px; }
.ya-header-actions { display: flex; align-items: center; gap: 8px; min-width: 0; }
.ya-header-actions .role-badge {
  font-size: 11px;
  font-weight: 400;
  padding: 4px 10px;
  border-radius: 10px;
  letter-spacing: -0.1px;
  white-space: nowrap;   /* '담임' 세로 줄바꿈 방지 → 가로 */
  flex: 0 0 auto;
}
.ya-header-actions .role-badge-director {
  background: var(--primary);
  color: var(--bg);
}
.ya-header-actions .role-badge-teacher {
  background: var(--bg-accent);
  color: var(--text-body);
}
.ya-header-actions .role-badge-staff {
  background: var(--bg-section);
  color: var(--text-soft);
}

/* ─── 런처 콘텐츠 ─── */
.view-launcher {
  padding: 0 20px;
}

/* ─── 페이지 타이틀 ─── */
.ya-page-title-section { padding: 22px 0 18px; }
.ya-page-title {
  font-size: 34px;
  font-weight: 900;
  letter-spacing: -1.8px;
  line-height: 1.1;
  color: var(--text);
}
.ya-page-sub {
  font-size: 13px;
  font-weight: 100;
  color: var(--text-soft);
  margin-top: 7px;
  letter-spacing: -0.2px;
}

/* ─── Hero ─── */
.ya-hero {
  background: var(--primary);
  color: var(--bg);
  border-radius: 22px;
  padding: 24px;
  margin-bottom: 20px;
  position: relative;
  overflow: hidden;
}
.ya-hero-inner { position: relative; z-index: 2; }
.ya-hero-label {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 10px;
  font-weight: 400;
  color: #C0DD97;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 10px;
}
.ya-hero-title {
  font-size: 22px;
  font-weight: 900;
  letter-spacing: -0.9px;
  line-height: 1.15;
  color: var(--bg);
  margin-bottom: 9px;
}
.ya-hero-desc {
  font-size: 13px;
  font-weight: 100;
  color: #C0DD97;
  line-height: 1.6;
  margin-bottom: 16px;
  letter-spacing: -0.2px;
}
.ya-hero-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 18px;
  background: var(--bg);
  color: var(--text);
  font-family: inherit;
  font-size: 13px;
  font-weight: 400;
  border: none;
  border-radius: 11px;
  cursor: pointer;
  letter-spacing: -0.2px;
  transition: opacity 0.15s;
}
.ya-hero-btn:active { opacity: 0.88; }
.ya-hero-bubble {
  position: absolute;
  right: -30px; top: -40px;
  width: 160px; height: 160px;
  background: var(--primary-dark);
  border-radius: 50%;
  opacity: 0.55;
}
.ya-hero-bubble2 {
  position: absolute;
  right: 60px; top: 50px;
  width: 80px; height: 80px;
  background: #639922;
  border-radius: 50%;
  opacity: 0.3;
}

/* ─── 통계 카드 ─── */
/* ★카드가 2개에서 4개로 늘었다 — 폰 폭에선 2열이 한계라 auto-fit 로 두 줄로 흐르게 (2026-08-09) */
/* ★카드가 2개에서 4개로 늘었다 (2026-08-09). 375px 폰에서 3장이 한 줄에 들어가야
   '오늘 사진 옆에 저장된 콘텐츠·보관함 사진'이 된다 → 최소폭 90px + 좁은 화면용 여백/글자 축소. */
.ya-stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(90px, 1fr));
  gap: 8px;
  margin-bottom: 22px;
}
.ya-stat-card {
  background: var(--surface);
  border-radius: 18px;
  padding: 14px 13px;
  min-width: 0;
}
.ya-stat-label {
  font-size: 11px;
  font-weight: 400;
  color: var(--text-body);
  margin-bottom: 8px;
  letter-spacing: -0.2px;
}
.ya-stat-value {
  font-size: 28px;
  font-weight: 900;
  letter-spacing: -1.2px;
  line-height: 1;
  color: var(--text);
}
.ya-stat-unit {
  font-size: 13px;
  font-weight: 400;
  color: var(--text-soft);
  margin-left: 2px;
}
.ya-stat-meta {
  font-size: 11px;
  font-weight: 100;
  color: var(--text-soft);
  margin-top: 6px;
}

/* ─── 섹션 ─── */
.ya-section { margin-bottom: 24px; }
.ya-section-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 12px;
  padding: 0 2px;
}
.ya-section-title {
  font-size: 17px;
  font-weight: 900;
  letter-spacing: -0.6px;
  color: var(--text);
}

/* ─── 앱 그리드 (2×2) ─── */
.ya-app-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  overflow: hidden; /* 내부 카드 가로 삐침 방지 */
}
.ya-app-card {
  background: var(--surface);
  border-radius: 20px;
  padding: 20px 16px;
  cursor: pointer;
  border: none;
  font-family: inherit;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 13px;
  min-height: 128px;
  transition: transform 0.15s;
  -webkit-tap-highlight-color: transparent;
}
.ya-app-card:active { transform: scale(0.96); }
.ya-app-icon {
  width: 46px;
  height: 46px;
  border-radius: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent !important;   /* ★ 유색 사각 바탕 제거 (디스커버리 라인룩) */
}
.ya-app-icon i { font-size: 30px; }
.ya-app-icon.ic-green { background: rgba(99,153,34,0.13); color: #3B6D11; }
.ya-app-icon.ic-blue  { background: rgba(55,138,221,0.11); color: #185FA5; }
.ya-app-icon.ic-amber { background: rgba(239,159,39,0.14); color: #854F0B; }
.ya-app-icon.ic-coral { background: rgba(216,90,48,0.11);  color: #993C1D; }
.ya-app-name {
  font-size: 15px;
  font-weight: 400;
  color: var(--text);
  letter-spacing: -0.3px;
  margin-bottom: 2px;
}
.ya-app-desc {
  font-size: 12px;
  font-weight: 100;
  color: var(--text-soft);
  letter-spacing: -0.2px;
}

/* ─── 탭바 ─── */
.ya-tabbar {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 100%;
  background: rgba(244,236,216,0.92);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-top: 1px solid rgba(139,111,71,0.12);
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  padding: 6px 0 20px;
  z-index: 200;
}
.ya-tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 8px 0;
  cursor: pointer;
  background: transparent;
  border: none;
  font-family: inherit;
  -webkit-tap-highlight-color: transparent;
}
.ya-tab i { font-size: 31px; color: var(--text-soft); }
.ya-tab span {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-soft);
  letter-spacing: -0.2px;
  white-space: nowrap;
}
.ya-tab.active i { color: var(--text); }
.ya-tab.active span { color: var(--text); font-weight: 700; }
/* 게임에 사진 보내기 탭 — 강조(브랜드 그린) */
.ya-tab[data-tab="gamesend"] i,
.ya-tab[data-tab="gamesend"] span { color: #1D9E75; }

/* 사진 가져오기 옵션 모달 */
@keyframes slideUpModal { from { transform: translateY(100%); } to { transform: translateY(0); } }

/* ═══════════════════════════════════════════════
   콘텐츠 카탈로그 홈 + 더보기 (앱 서랍)
   — 스킨 변수만 사용, 반응형
   ═══════════════════════════════════════════════ */

/* 고정 도구 (카메라·사진 보관함) */
.ya-fixed-tools {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 22px;
  grid-column: 1 / -1;   /* gridMain(2열)을 가로질러 전체폭 사용 (옆 빈칸 제거) */
}
.ya-fixed-tool {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  padding: 18px 12px;
  background: var(--bg-card);
  border: 1.5px solid var(--border-soft);
  border-radius: 18px;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
  font-family: inherit;
}
.ya-fixed-tool:active { transform: scale(0.97); }
.ya-fixed-tool span { font-size: 14px; font-weight: 600; color: var(--text-body); }
.ya-ft-icon {
  width: 52px; height: 52px; border-radius: 15px;
  display: flex; align-items: center; justify-content: center;
  font-size: 26px; color: #fff;
  background: var(--primary);   /* 기본 배경 — 모든 도구 아이콘이 채워지도록 */
  flex-shrink: 0;
}
.ya-ft-icon.ic-green { background: var(--primary); }
.ya-ft-icon.ic-blue  { background: var(--primary); opacity: 0.82; }
.ya-ft-icon.ic-amber { background: #d98a2b; }
.ya-ft-icon.ic-coral { background: #cf7a63; }

/* 이번 달 추천 (히어로) */
.ya-catalog-hero {
  display: flex; flex-direction: row; align-items: center; gap: 16px;
  padding: 16px 18px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  border-radius: 20px;
  margin-bottom: 24px;
  cursor: pointer;
  transition: transform 0.15s;
  box-sizing: border-box;
  width: 100%; overflow: hidden;
  grid-column: 1 / -1; /* 2열 그리드에서 전체 폭 차지 */
}
.ya-catalog-hero:active { transform: scale(0.98); }
.ya-hero-thumb {
  width: 72px; height: 72px; flex: 0 0 72px;
  border-radius: 16px; overflow: hidden;
  background: transparent;   /* ★ 유색 사각 바탕 제거 — 이미지는 그대로 채움, 아이콘은 초록 배너 위 흰 라인 */
  color: #fff;
  display: flex; align-items: center; justify-content: center;
}
.ya-hero-info { flex: 1; min-width: 0; } /* min-width:0 필수 — flex item 텍스트 넘침 방지 */
.ya-hero-badge {
  display: inline-block; font-size: 11px; font-weight: 700;
  color: var(--primary); background: var(--primary-light);
  padding: 3px 9px; border-radius: 20px; margin-bottom: 6px;
}
.ya-hero-title { font-size: 17px; font-weight: 900; color: #fff; margin-bottom: 3px; letter-spacing: -0.4px; }
.ya-hero-desc {
  font-size: 12.5px; color: rgba(255,255,255,0.82); line-height: 1.4;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* 카테고리별 가로 스크롤 */
.ya-cat-section { margin-bottom: 24px; grid-column: 1 / -1; }
.ya-cat-head {
  font-size: 15px; font-weight: 700; color: var(--text);
  margin-bottom: 12px;
}
.ya-cat-scroll {
  display: flex; gap: 12px; overflow-x: auto;
  padding-bottom: 6px; margin: 0 -4px; padding-left: 4px; padding-right: 4px;
  scrollbar-width: none;
}
.ya-cat-scroll::-webkit-scrollbar { display: none; }
.ya-content-card {
  position: relative; flex-shrink: 0; width: 120px;
  background: var(--bg-card);
  border: 1.5px solid var(--border-soft);
  border-radius: 16px; padding: 12px;
  cursor: pointer; font-family: inherit; text-align: center;
  transition: transform 0.15s;
}
.ya-content-card:active { transform: scale(0.96); }
.ya-cc-thumb {
  width: 100%; aspect-ratio: 1; border-radius: 12px;
  background: var(--bg-section);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden; margin-bottom: 9px;
}
.ya-cc-title {
  font-size: 13px; font-weight: 600; color: var(--text-body);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  margin-bottom: 6px;
}
.ya-cc-badge {
  display: inline-block; font-size: 10.5px; font-weight: 700;
  padding: 2px 8px; border-radius: 12px;
}
.ya-cc-badge.free { color: var(--primary); background: var(--primary-light); }
.ya-cc-badge.paid { color: var(--warn); background: var(--bg-accent); }
.ya-cc-new {
  position: absolute; top: 8px; right: 8px;
  font-size: 9px; font-weight: 800; color: #fff;
  background: var(--danger); padding: 2px 6px; border-radius: 8px;
}

/* 빈 상태 */
.ya-catalog-empty {
  text-align: center; padding: 48px 20px; color: var(--text-soft);
}
.ya-catalog-empty i { font-size: 44px; opacity: 0.4; }
.ya-catalog-empty p { font-size: 14px; margin: 12px 0 18px; }
.ya-empty-btn {
  padding: 11px 22px; background: var(--primary); color: #fff;
  border: none; border-radius: 12px; font-family: inherit;
  font-size: 14px; font-weight: 600; cursor: pointer;
}

/* 더보기 (앱 서랍) */
.ya-more-wrap { padding: 16px; }
.ya-more-sec-title {
  font-size: 14px; font-weight: 700; color: var(--text);
  margin: 20px 0 12px; }
.ya-more-sec-title:first-child { margin-top: 0; }
/* ★[앱 추가] 목록 — 한 줄 카드였을 때 아이콘·이름이 좌우로 잘려 뭐가 뭔지 알기 어려웠다 (2026-08-09 Jay).
   아이콘 위 / 이름 아래의 2단 타일로 바꿔서 모든 앱이 한눈에 들어오게 한다. */
.ya-more-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; align-items: stretch; }
.ya-more-card {
  display: flex; flex-direction: column; align-items: center; text-align: center; gap: 7px;
  padding: 15px 11px 12px;
  background: var(--bg-card);
  border: 1.5px solid var(--border-soft);
  border-radius: 15px;
}
.ya-mc-thumb {
  width: 52px; height: 52px; flex-shrink: 0;
  border-radius: 14px; background: var(--bg-section);
  display: flex; align-items: center; justify-content: center;
  font-size: 24px;
}
.ya-mc-thumb img { width: 100%; height: 100%; object-fit: cover; }
.ya-mc-info { flex: 1; min-width: 0; }

/* ═══ 디스커버리 라인 스타일: 도구 아이콘 유색 사각 바탕 제거 + 살짝 크게 ═══ */
/* 솔리드/연한 사각 타일 제거 → 가는 Material 라인 아이콘(짙은 녹색)만 표시 */
.ya-ft-icon  { background: transparent !important; color: #2D4A2B !important; font-size: 38px; }
.ya-mc-thumb { background: transparent !important; color: #2D4A2B; font-size: 40px; }
.ya-cc-thumb { background: transparent !important; }
.ya-mc-info { flex: 1 1 auto; width: 100%; min-width: 0; }
.ya-mc-title {
  font-size: 13.5px; font-weight: 700; color: var(--text); line-height: 1.3;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.ya-mc-desc {
  font-size: 11.5px; color: var(--text-soft); margin-top: 3px; line-height: 1.35;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.ya-mc-btn {
  flex-shrink: 0; width: 100%; padding: 8px 10px; margin-top: auto;
  background: var(--primary); color: #fff;
  border: none; border-radius: 10px;
  font-family: inherit; font-size: 12.5px; font-weight: 600;
  cursor: pointer; white-space: nowrap;
}
.ya-mc-btn.in { background: var(--bg-section); color: var(--text-soft); }
.ya-mc-btn:disabled { background: var(--bg-accent); color: var(--text-soft); cursor: default; }

/* 반응형 — 태블릿 이상 */
@media (min-width: 700px) {
  .ya-fixed-tools { grid-template-columns: repeat(4, 1fr); }
  .ya-content-card { width: 150px; }
  .ya-more-grid { grid-template-columns: repeat(3, 1fr); gap: 12px; }
  .ya-catalog-hero { padding: 20px 24px; }
  .ya-hero-thumb { width: 80px; height: 80px; flex: 0 0 80px; }
}
@media (min-width: 1000px) {
  .ya-fixed-tools { grid-template-columns: repeat(6, 1fr); }
  .ya-more-grid { grid-template-columns: repeat(4, 1fr); }
}

/* ─── 로그인 영역 (헤더 우측) ─── */
.auth-area {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  position: relative;
  min-width: 0;
}
.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;
}
.auth-login-btn:hover { background: #1F3A20; }
.auth-login-btn i { font-size: 14px; }
.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;
  transition: background 0.15s, border-color 0.15s;
  min-width: 0;   /* 자식 auth-inst 말줄임 작동 → 세로 줄바꿈 방지 */
}
.auth-chip:hover { background: #F4ECD8; border-color: rgba(139, 111, 71, 0.4); }
.auth-name { font-weight: 700; white-space: nowrap; flex: 0 0 auto; }
.auth-inst { color: #8B6F47; font-weight: 400; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; max-width: 96px; }
/* 유치원명 = 이름칩을 탭하면 나오는 계정 메뉴 상단에 표시(헤더 폭 절약) */
.auth-menu-inst { padding: 9px 14px 5px; font-size: 12px; font-weight: 700; color: #8B6F47; border-bottom: 1px solid rgba(139,111,71,0.12); margin-bottom: 4px; white-space: nowrap; }
.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.15);
  z-index: 100;
}
.auth-menu.hidden { display: none; }
.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;
}
.auth-menu-item:hover { background: rgba(42, 26, 11, 0.07); }
.auth-menu-item i { font-size: 14px; color: #8B6F47; }

/* ── [사진관리] 탭 (사진 보기 / 빠른 분류) — 2026-08-06 두 메뉴 통합, PC 와 같은 구성 ── */
.pm-tabs {
  display: flex; gap: 4px; margin: 10px 14px 4px; padding: 3px;
  background: rgba(139,111,71,0.10); border-radius: 12px;
}
.pm-tab {
  flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  font: inherit; font-size: 13px; font-weight: 700; letter-spacing: -0.3px;
  color: #8B6F47; background: transparent; border: none;
  padding: 9px 10px; border-radius: 10px; cursor: pointer; white-space: nowrap;
  -webkit-tap-highlight-color: transparent; transition: background .13s, color .13s, box-shadow .13s;
}
.pm-tab i { font-size: 16px; }
.pm-tab:active { transform: scale(.98); }
.pm-tab.active { color: #2A1A0B; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.pm-tab-badge {
  min-width: 17px; height: 17px; padding: 0 5px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 10px; font-weight: 800; line-height: 1; color: #fff;
  background: #C2553F; border-radius: 9px;
}

/* ── 썸네일 프로필 지정 ★ (2026-08-06) — PC 와 같은 방식, 한 번에 지정/해제 ── */
.photo-thumb .thumb-star { opacity: .85; transition: background .13s, opacity .13s; }
.photo-thumb .thumb-star.on { opacity: 1; }
.photo-thumb .thumb-star:active { transform: scale(.92); }


/* ═══ 홈 [수업/놀이 도구] — 놀이 상자 (2026-08-09) ═══
   가로 스크롤 카드가 화면 밖으로 잘려 뭐가 있는지 알 수 없던 걸, 상자 2개를 열면
   안의 앱들이 3열 타일로 톡톡 튀어나오는 방식으로 바꿨다. 세로 스크롤만 쓴다. */
.pt-boxes { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.pt-box {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 14px 10px 11px; border-radius: 16px; cursor: pointer; font: inherit;
  border: 1.5px solid rgba(139,111,71,.2); background: var(--bg-card, #FBF6E9);
  transition: border-color .18s ease, background .18s ease;
}
.pt-box:active { transform: scale(.97); }
.pt-box.open { border-width: 2px; }
.pt-lid {
  width: 52px; height: 52px; border-radius: 15px;
  display: flex; align-items: center; justify-content: center;
  transition: transform .26s cubic-bezier(.34,1.56,.64,1);
}
.pt-box.open .pt-lid { transform: translateY(-3px) rotate(-8deg); }
.pt-lid i { font-size: 28px; }
.pt-name { font-size: 13px; font-weight: 800; color: var(--text, #2A1A0B); }
.pt-cnt { font-size: 11px; color: var(--text-soft, #8B6F47); }
.pt-tray { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; }
.pt-tile {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 12px 5px 10px; border-radius: 15px; cursor: pointer; font: inherit;
  border: 1px solid rgba(139,111,71,.14); background: #fff;
  animation: ptPop .32s cubic-bezier(.34,1.56,.64,1) both;
}
.pt-tile:active { transform: scale(.96); }
.pt-tile i { font-size: 27px; }
/* ★썸네일은 세로(296×420)라 4:3 박스 + cover 면 위아래가 잘린다 → 원본 비율 그대로 (2026-08-09 Jay) */
.pt-tile.has-thumb { padding: 0 0 9px; overflow: hidden; background: #fff !important; }
.pt-th { display: block; width: 100%; overflow: hidden; border-radius: 14px 14px 0 0; line-height: 0; }
.pt-th img { width: 100%; height: auto; display: block; }
.pt-tile.has-thumb .pt-tl { padding: 0 6px; margin-top: 7px; }
/* ★디지털 놀이(게임)는 전자칠판·PC 전용 — 목록 썸네일을 작게. ★비율 그대로(잘리지 않게): 4열로 촘촘히 나열. (Jay 2026-08-17) */
.pt-tray.pt-tray-game { grid-template-columns: repeat(4, 1fr); gap: 7px; }
.pt-tray-game .pt-tile { padding: 8px 4px; border-radius: 12px; }
.pt-tray-game .pt-tile.has-thumb { padding: 0 0 7px; }
.pt-tray-game .pt-tl { font-size: 10px; -webkit-line-clamp: 2; }
.pt-tray-game .pt-th img { width: 100%; height: auto; }   /* object-fit 안 씀 = 원본 비율 유지(안 잘림) */
.pt-tl { font-size: 11.5px; line-height: 1.25; text-align: center; color: var(--text, #2A1A0B); font-weight: 700;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pt-tabs { display: flex; gap: 7px; margin: 0 2px 11px; }
.pt-tab {
  flex: 1; display: flex; align-items: center; justify-content: center; gap: 5px;
  padding: 9px 6px; border-radius: 11px; cursor: pointer; font: inherit;
  font-size: 12.5px; font-weight: 700; color: #6B6253;
  background: #F4EFE3; border: 1px solid transparent; min-height: 40px;
}
.pt-tab b { font-weight: 700; opacity: .7; }
.pt-tab i { font-size: 14px; }
.pt-tab.on { background: #2D5A3D; color: #F4ECD8; border-color: #2D5A3D; }
.pt-tab.on b { opacity: .85; }
/* ★즐겨찾기 별 — 타일 전체가 버튼이라 별은 그 위에 얹고 탭 영역을 넉넉히 준다.
   NEW 배지와 겹치지 않게 별은 **왼쪽 위**. (2026-08-10 Jay) */
.pt-tile { position: relative; }
.pt-fav {
  position: absolute; top: 2px; left: 2px; width: 30px; height: 30px;
  display: flex; align-items: center; justify-content: center;
  color: #C3B49A; cursor: pointer; z-index: 2;
}
.pt-fav i { font-size: 17px !important; }
.pt-fav.on { color: #E8A020; }
.pt-tile.has-thumb .pt-fav {
  background: rgba(255,255,255,.86); border-radius: 50%; width: 26px; height: 26px; top: 4px; left: 4px;
}
.pt-favhd {
  display: flex; align-items: center; gap: 5px;
  font-size: 11.5px; font-weight: 700; color: #8B6F47;
  margin: 2px 2px 8px;
}
.pt-favhd i { font-size: 13px; color: #E8A020; }
.pt-new { font-size: 9.5px; font-weight: 800; color: #fff; background: #C13B3B; padding: 1px 6px; border-radius: 9px; }
@keyframes ptPop { from { opacity: 0; transform: translateY(9px) scale(.9); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  .pt-tile { animation: none; }
  .pt-lid, .pt-box { transition: none; }
}
@media (min-width: 700px) { .pt-tray { grid-template-columns: repeat(5, 1fr); } }


/* ═══ 수업/놀이 도구 바텀시트 (2026-08-09) ═══ */
.pt-sheet {
  background: #FBF8F0; width: 100%; max-width: 560px;
  border-radius: 22px 22px 0 0; max-height: 84vh;
  display: flex; flex-direction: column; overflow: hidden;
  animation: ptSheetUp .26s cubic-bezier(.22,1,.36,1) both;
}
@keyframes ptSheetUp { from { transform: translateY(22px); opacity: .6; } to { transform: none; opacity: 1; } }
.pt-grab { width: 38px; height: 4px; border-radius: 4px; background: rgba(139,111,71,.28); margin: 9px auto 4px; flex: none; }
.pt-sheet-hd { display: flex; align-items: center; gap: 11px; padding: 8px 16px 10px; flex: none; }
.pt-sheet-t { font-size: 16px; font-weight: 800; color: #2A1A0B; }
.pt-sheet-s { font-size: 12px; color: #8B6F47; margin-top: 1px; }
.pt-x {
  flex: none; width: 34px; height: 34px; border-radius: 50%; cursor: pointer;
  border: 1px solid rgba(139,111,71,.22); background: #fff; color: #5C3D1F;
  display: flex; align-items: center; justify-content: center; font-size: 18px;
}
.pt-search { flex: none; position: relative; padding: 0 16px 10px; }
.pt-search i { position: absolute; left: 28px; top: 11px; font-size: 17px; color: #A8946F; pointer-events: none; }
.pt-search input {
  width: 100%; box-sizing: border-box; padding: 11px 12px 11px 38px;
  border: 1.5px solid rgba(139,111,71,.22); border-radius: 12px; background: #fff;
  font-family: inherit; font-size: 14px; color: #2A1A0B;
}
.pt-search input:focus { outline: none; border-color: #2D5A3D; }
.pt-sheet-body { flex: 1; overflow: auto; -webkit-overflow-scrolling: touch; padding: 2px 16px calc(14px + env(safe-area-inset-bottom)); }
.pt-empty { padding: 34px 16px; text-align: center; color: #8B6F47; font-size: 13px; line-height: 1.7; }
@media (min-width: 700px) { .pt-sheet-body .pt-tray { grid-template-columns: repeat(5, 1fr); } }
@media (prefers-reduced-motion: reduce) { .pt-sheet { animation: none; } }


/* ═══ [앱 추가] 종류 구분 + 검색 — 2026-08-09 ═══ */
.ya-more-search { position: relative; flex: 0 1 210px; min-width: 150px; }
.ya-more-search i { position: absolute; left: 10px; top: 8px; font-size: 15px; color: #A8946F; pointer-events: none; }
.ya-more-search input {
  width: 100%; box-sizing: border-box; padding: 7px 10px 7px 31px;
  border: 1.5px solid rgba(139,111,71,.22); border-radius: 10px; background: #fff;
  font-family: inherit; font-size: 12.5px; font-weight: 400; color: var(--text, #2A1A0B);
}
.ya-more-search input:focus { outline: none; border-color: #2D5A3D; }
.ya-more-kind {
  display: flex; align-items: center; gap: 6px;
  margin: 14px 2px 8px; font-size: 13px; font-weight: 800; color: #5C4A33;
}
.ya-more-kind i { font-size: 16px; color: #2D5A3D; }
.ya-more-n { font-size: 11.5px; font-weight: 700; color: #8B6F47; background: #F1EEE6; padding: 2px 8px; border-radius: 20px; }
.ya-more-none { padding: 18px 4px; font-size: 12.5px; color: #8B6F47; text-align: center; }
.ya-mc-thumb img { width: 100%; height: 100%; object-fit: contain; }


/* ★홈 고정 아이콘이 게시판 앱이면 썸네일 그대로 (바탕·테두리 없음) — 2026-08-09 */
.ya-ft-thumb { width: 100%; border-radius: 13px; overflow: hidden; line-height: 0; background: none; }
.ya-ft-thumb img { width: 100%; height: auto; display: block; }
.ya-fixed-tool.has-thumb { padding: 8px 8px 12px; gap: 7px; }
/* ★디지털 놀이 홈 안내 배너 + 게임 타일 작게(3열, 비율 그대로 안 잘림). (Jay 2026-08-17) */
.ya-game-note { grid-column: 1/-1; display: flex; align-items: center; gap: 7px; margin: -6px 0 12px; padding: 8px 12px;
  background: #F1ECFB; border: 1px solid #DAD0F0; border-radius: 11px; font-size: 12px; color: #5A4A78; line-height: 1.5; }
.ya-game-note i { color: #6B4FA8; font-size: 15px; flex: none; }
.ya-fixed-tools-game { grid-template-columns: repeat(3, 1fr) !important; gap: 9px !important; }
.ya-fixed-tools-game .ya-fixed-tool { padding: 7px 6px 9px; border-radius: 14px; }
.ya-fixed-tools-game .ya-fixed-tool.has-thumb { padding: 6px 6px 8px; gap: 5px; }
.ya-fixed-tools-game .ya-fixed-tool span { font-size: 11px; line-height: 1.25; }
.ya-fixed-tools-game .ya-ft-thumb img { width: 100%; height: auto; }   /* 비율 유지 = 안 잘림 */
.ya-fixed-tool.has-thumb span { font-size: 12.5px; line-height: 1.3;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }


/* ═══ 홈 '우리 반 사진' 띠 (2026-08-09, PC와 대칭) ═══ */
.photo-bar { display: flex; align-items: center; gap: 9px; flex-wrap: wrap;
  padding: 11px 13px; margin-bottom: 12px;
  background: #EAF3EC; border: 1px solid #C0DD97; border-radius: 13px; }
.pb-hd { display: flex; align-items: center; gap: 5px; font-size: 13px; font-weight: 800; color: #1F3A20; width: 100%; }
.pb-hd i { font-size: 16px; color: #2D5A3D; }
.pb-acts { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.pb-btn { position: relative; display: inline-flex; align-items: center; gap: 5px;
  padding: 8px 13px; border-radius: 20px; cursor: pointer; font: inherit;
  font-size: 12.5px; font-weight: 700; color: #1F3A20;
  background: #fff; border: 1px solid #C0DD97; }
.pb-btn:active { transform: scale(.97); }
.pb-btn i { font-size: 15px; color: #2D5A3D; }
.pb-badge { min-width: 17px; height: 17px; padding: 0 5px; border-radius: 20px;
  background: #C13B3B; color: #fff; font-size: 10px; font-weight: 800;
  display: inline-flex; align-items: center; justify-content: center; }


/* 좁은 폰에서 통계 카드 3장이 한 줄에 들어가도록 — 2026-08-09 */
@media (max-width: 430px) {
  .ya-stat-label { font-size: 10.5px; margin-bottom: 6px; line-height: 1.25; }
  .ya-stat-value { font-size: 23px; }
  .ya-stat-unit  { font-size: 11px; }
  .ya-stat-meta  { font-size: 10px; line-height: 1.3; }
}


/* 통계 3칸 = '우리 반 사진' 띠 안 작은 칩 (옛 카드 줄 흡수) — 2026-08-09 */
/* ★칩 높이를 위 버튼(.pb-btn)과 같게 — 숫자·라벨을 한 줄로 눕히고 아이콘은 뺀다 (2026-08-09 Jay).
   세로 3단(아이콘/숫자/라벨)이라 버튼의 두 배 높이를 먹고 있었다. */
.pb-stats { display: flex; gap: 6px; width: 100%; margin-top: 2px;
  padding-top: 8px; border-top: 1px solid #C0DD97; }
.pb-stat { flex: 1; min-width: 0; display: flex; flex-direction: row; align-items: baseline;
  justify-content: center; gap: 4px;
  cursor: pointer; font: inherit; padding: 8px 5px; border-radius: 20px;
  border: 1px solid transparent; background: rgba(255,255,255,.6); }
.pb-stat:active { transform: scale(.97); }
.pb-stat i { display: none; }
.pb-stat b { font-size: 14px; font-weight: 900; color: #1F3A20; letter-spacing: -0.3px; line-height: 1; flex: none; }
.pb-stat span { font-size: 10.5px; font-weight: 700; color: #5A6B52; line-height: 1;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }

/* ★홈에 추가한 앱의 종류 구분 머리 — [앱 추가] 시트와 같은 이름(자료 만들기 / 디지털 놀이).
   섞어 두면 게시판에서 온 놀이 수십 개에 도구가 파묻힌다. (2026-08-09 Jay) */
.ya-home-kind {
  grid-column: 1 / -1;
  display: flex; align-items: center; gap: 7px;
  margin: 2px 2px 9px;
}
.ya-home-kind .hk-dot {
  width: 22px; height: 22px; border-radius: 7px; flex: 0 0 auto;
  display: flex; align-items: center; justify-content: center;
  background: var(--hk-tint, rgba(45,90,61,.12));
  color: var(--hk-ink, #2D5A3D); font-size: 14px;
}
.ya-home-kind .hk-name { font-size: 13.5px; font-weight: 700; color: var(--text); }
.ya-home-kind .hk-cnt {
  font-size: 11px; font-weight: 700; line-height: 1;
  padding: 3px 7px; border-radius: 20px;
  background: var(--hk-tint, rgba(45,90,61,.12));
  color: var(--hk-ink, #2D5A3D);
}
.ya-home-kind .hk-more {
  margin-left: auto; background: none; border: none; cursor: pointer;
  font-family: inherit; font-size: 11.5px; font-weight: 700;
  color: var(--hk-ink, #2D5A3D); padding: 4px 2px; display: flex; align-items: center; gap: 2px;
}
.ya-home-kind .hk-more i { font-size: 13px; }
