@import url('https://fonts.googleapis.com/css2?family=Pixelify+Sans:wght@400;500;600;700&display=swap');
@import url('https://cdn.jsdelivr.net/gh/quiple/galmuri/dist/galmuri.css');

/* 폰트 역할 분담:
   Galmuri11       → 버튼, 타이틀바, 헤더 포함 전체
   Pixelify Sans   → 영문 본문, 숫자, 레이블
   Galmuri11       → 한글 본문 (도트 스타일 한글 지원)
*/

/* ============================================================
   ASEPRITE-STYLE UI — 가족 스케줄러
   색상 출처: Aseprite 공식 기본 테마 (theme.xml)
   ============================================================

   핵심 색상:
   #d3cbbe  패널/버튼 배경
   #ffebb6  호버
   #ff5555  선택/활성
   #000000  텍스트/테두리
   #968275  비활성 텍스트
   #2c4c91  섹션 레이블 (구분선 제목)
   #7c909f  타이틀바/워크스페이스
   #ffffff  인풋 배경
*/

:root {
  --ase-bg:          #b8a898;
  --ase-bg-dark:     #a09080;
  --ase-bg-light:    #c8b8a8;
  --ase-hover:       #ffebb6;
  --ase-active:      #ff5555;
  --ase-active-text: #ffffff;
  --ase-text:        #1a0e08;
  --ase-muted:       #7a6858;
  --ase-border:      #6e5f50;
  --ase-link:        #2c4c91;
  --ase-header:      #7c909f;
  --ase-header-text: #ffffff;
  --ase-workspace:   #7d929e;
  --ase-input:       #ffffff;
  --ase-input-text:  #000000;
  --ase-tip:         #ffff7d;
  --ase-check-a:     #888888;
  --ase-check-b:     #aaaaaa;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html { font-size: 13px; }

body {
  /* 한글: Galmuri11, 영문/숫자: Pixelify Sans, 폴백: monospace */
  font-family: 'Galmuri11', 'Pixelify Sans', monospace;
  font-size: 13px;
  color: var(--ase-text);
  background: var(--ase-check-b);
  min-height: 100vh;
  line-height: 1.5;
  image-rendering: pixelated;
}

/* ── 스크롤바 ── */
::-webkit-scrollbar { width: 12px; height: 12px; }
::-webkit-scrollbar-track { background: var(--ase-bg-dark); border: 1px solid var(--ase-border); }
::-webkit-scrollbar-thumb {
  background: var(--ase-bg);
  border: 1px solid var(--ase-border);
}
::-webkit-scrollbar-thumb:hover { background: var(--ase-hover); }

/* ── 글로벌 링크 ── */
a { color: var(--ase-link); text-decoration: none; }
a:hover { color: var(--ase-active); }

/* ================================================================
   LAYOUT
================================================================ */

.page-shell {
  width: min(1300px, calc(100% - 8px));
  margin: 0 auto;
  padding: 6px 0 32px;
}

.landing-shell,
.simple-auth-shell {
  width: min(480px, calc(100% - 8px));
  margin: 0 auto;
  padding: 24px 0 32px;
}

.inner-page {
  width: min(1400px, calc(100% - 8px));
}

/* ================================================================
   TOP BAR — Aseprite 타이틀바 스타일
================================================================ */

.page-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--ase-check-a);
  padding: 0 8px;
  height: 28px;
  border-bottom: 1px solid var(--ase-border);
  margin-bottom: 4px;
}

.page-title {
  font-size: 13px;
  color: var(--ase-header-text);
  letter-spacing: 0.05em;
}

.topline-actions {
  display: flex;
  gap: 4px;
  align-items: center;
}

/* ================================================================
   PANEL / WINDOW
================================================================ */

.ase-window,
.calendar-card,
.simple-auth-card,
.gate-card {
  background: var(--ase-bg);
  border: 1px solid var(--ase-border);
}

.ase-window-title,
.ase-section-title {
  display: flex;
  align-items: center;
  height: 24px;
  padding: 0 8px;
  background: var(--ase-header);
  color: var(--ase-header-text);
  font-size: 13px;
  border-bottom: 1px solid var(--ase-border);
  letter-spacing: 0.05em;
}

/* ── Aseprite 구분선 스타일: ─── Name ─── */
.ase-separator,
.block-head {
  display: flex;
  align-items: center;
  gap: 0;
  margin: 6px 0 3px;
  font-size: 13px;
  color: var(--ase-link);
  white-space: nowrap;
}

.ase-separator::before,
.ase-separator::after,
.block-head::before,
.block-head::after {
  content: "-------------------------------------------";
  flex: 1;
  color: var(--ase-muted);
  overflow: hidden;
  font-size: 13px;
  font-family: monospace;
  letter-spacing: -1px;
}

.block-head h3 {
  font-size: 13px;
  color: var(--ase-link);
  font-weight: normal;
  white-space: nowrap;
  padding: 0 3px;
}

.block-head > span {
  font-size: 13px;
  color: var(--ase-muted);
  margin-left: auto;
  white-space: nowrap;
}

/* block-head는 구분선이므로 ::after 제거 */
.block-head { flex: none; display: flex; width: 100%; }

/* ================================================================
   BUTTONS
================================================================ */

/* 입력/선택 요소는 본문 폰트 사용 */
button, input, select, textarea {
  font-family: 'Galmuri11', 'Pixelify Sans', monospace;
  font-size: 13px;
}

/* 기본 버튼 */
.ase-btn,
.primary-action,
.ghost-button,
.ghost-link,
.page-nav-shop,
.reject,
button[type="submit"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 3px 8px;
  font-family: 'Galmuri11', 'Pixelify Sans', monospace;
  font-size: 13px;
  background: var(--ase-bg);
  color: var(--ase-text);
  border: 1px solid var(--ase-border);
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  line-height: 1.6;
  min-height: 22px;
  transition: background 0.05s;
  letter-spacing: 0.02em;
}

.ase-btn:hover,
.primary-action:hover,
.ghost-button:hover,
.ghost-link:hover,
.page-nav-shop:hover {
  background: var(--ase-hover);
}

.ase-btn:active,
.primary-action:active,
.ghost-button:active,
.ghost-link:active,
.page-nav-shop:active {
  background: var(--ase-active);
  color: var(--ase-active-text);
}

/* 강조 버튼 */
.primary-action {
  background: var(--ase-bg);
  position: relative;
}

.primary-action::after {
  content: "";
  position: absolute;
  inset: 1px;
  border: 1px dotted var(--ase-link);
  pointer-events: none;
}

.primary-action:hover::after { border-color: transparent; }
.primary-action:active::after { border-color: transparent; }

/* 삭제 버튼 */
.reject {
  color: var(--ase-active);
}

.reject:hover {
  background: var(--ase-active);
  color: var(--ase-active-text);
}

/* 닫기 버튼 */
.close-gate {
  position: absolute;
  top: 4px; right: 4px;
  width: 18px; height: 18px;
  background: var(--ase-bg);
  color: var(--ase-text);
  border: 1px solid var(--ase-border);
  font-size: 13px;
  font-family: monospace;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  padding: 0;
  line-height: 1;
}

.close-gate:hover {
  background: var(--ase-active);
  color: var(--ase-active-text);
}

/* ================================================================
   INPUTS
================================================================ */

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="date"],
input[type="time"],
input[type="month"],
input[type="tel"],
textarea {
  background: var(--ase-input);
  color: var(--ase-input-text);
  border: 1px solid var(--ase-border);
  padding: 3px 5px;
  width: 100%;
  font-family: 'Galmuri11', 'Pixelify Sans', monospace;
  font-size: 13px;
  outline: none;
  min-height: 22px;
  line-height: 1.5;
}

input[type="file"] {
  background: var(--ase-input);
  color: var(--ase-input-text);
  border: 1px solid var(--ase-border);
  padding: 3px 5px;
  width: 100%;
  font-family: 'Galmuri11', 'Pixelify Sans', monospace;
  font-size: 13px;
}

input[type="color"] {
  width: 40px; height: 32px;
  padding: 2px;
  cursor: pointer;
  background: var(--ase-input);
  border: 1px solid var(--ase-border);
}

input[type="checkbox"] {
  width: 16px; height: 16px;
  accent-color: var(--ase-active);
  cursor: pointer;
}

select {
  background: var(--ase-input);
  color: var(--ase-input-text);
  border: 1px solid var(--ase-border);
  padding: 3px 20px 3px 5px;
  width: 100%;
  font-family: 'Galmuri11', 'Pixelify Sans', monospace;
  font-size: 13px;
  outline: none;
  appearance: none;
  -webkit-appearance: none;
  min-height: 22px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='5'%3E%3Cpolygon points='0,0 8,0 4,5' fill='%23000000'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 5px center;
  cursor: pointer;
}

input:focus, select:focus {
  outline: 1px solid var(--ase-link);
  outline-offset: 0;
}

input::placeholder { color: var(--ase-muted); font-size: 13px; }

label {
  display: flex;
  flex-direction: column;
  gap: 3px;
  font-family: 'Galmuri11', 'Pixelify Sans', monospace;
  font-size: 13px;
  color: var(--ase-text);
}

/* ================================================================
   TYPOGRAPHY
================================================================ */

h1 {
  font-size: 15px;
  color: var(--ase-text);
  font-weight: normal;
  line-height: 1.8;
}

h2 {
  font-size: 13px;
  color: var(--ase-text);
  font-weight: normal;
}

h3 {
  font-size: 13px;
  color: var(--ase-text);
  font-weight: normal;
}

p { font-size: 13px; line-height: 1.5; }

.section-kicker {
  font-size: 13px;
  color: var(--ase-muted);
  letter-spacing: 0.1em;
  display: block;
  margin-bottom: 1px;
}

/* ================================================================
   CALENDAR CARD
================================================================ */

.calendar-card {
  padding: 0;
  overflow: hidden;
}

.calendar-card-inner { padding: 8px; }

.calendar-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--ase-header);
  padding: 5px 8px;
  border-bottom: 1px solid var(--ase-border);
}

.calendar-head > div:first-child h2 { color: var(--ase-header-text); font-size: 13px; }
.calendar-head > div:first-child .section-kicker { color: rgba(255,255,255,0.6); }

.calendar-head + * { padding: 8px; }

/* 뷰 스위치 — Aseprite 탭 스타일 */
.view-switch {
  display: flex;
  border: 1px solid var(--ase-border);
}

.view-button {
  padding: 3px 8px;
  font-family: 'Galmuri11', 'Pixelify Sans', monospace;
  font-size: 13px;
  background: var(--ase-bg-dark);
  color: var(--ase-text);
  border: none;
  border-right: 1px solid var(--ase-border);
  cursor: pointer;
  min-height: 22px;
}

.view-button:last-child { border-right: none; }

.view-button.is-active {
  background: var(--ase-active);
  color: var(--ase-active-text);
}

.view-button:hover:not(.is-active) { background: var(--ase-hover); }

/* 캘린더 툴바 */
.calendar-toolbar {
  display: flex;
  gap: 6px;
  align-items: center;
  padding: 4px 8px;
  background: var(--ase-bg-dark);
  border-bottom: 1px solid var(--ase-border);
  flex-wrap: wrap;
}

.calendar-nav-group { display: flex; gap: 0; }
.calendar-nav-button {
  font-size: 13px;
  padding: 3px 8px;
  border-right: none;
  min-height: 22px;
}
.calendar-nav-button:last-child { border-right: 1px solid var(--ase-border); }

.calendar-monthbar {
  display: flex;
  align-items: baseline;
  gap: 6px;
  padding: 4px 8px;
  border-bottom: 1px solid rgba(0,0,0,0.15);
}

.calendar-monthbar strong { font-size: 13px; color: var(--ase-text); }
.calendar-monthbar span { font-size: 13px; color: var(--ase-muted); }

.calendar-month-picker input {
  width: auto;
  font-size: 15px;
  padding: 5px 8px;
}

/* ── 캘린더 뷰 내부 패딩 ── */
.calendar-view { padding: 4px; }

/* ── 월 그리드 ── */
.month-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 1px;
  margin-bottom: 1px;
  background: var(--ase-border);
  border: 1px solid var(--ase-border);
}

.month-labels span {
  text-align: center;
  font-size: 13px;
  color: var(--ase-muted);
  padding: 3px 0;
  background: var(--ase-bg-dark);
}

/* ── 달력 날짜 셀 ── */
.day-cell {
  background: #c4b5a5;
  min-height: 60px;
  padding: 3px;
  vertical-align: top;
  overflow: hidden;
}

.day-cell.muted {
  background: #b0a090;
}

.day-cell.today {
  background: #ccc890;
}

.day-cell-head {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 2px;
}

.day-number {
  font-size: 14px;
  font-weight: bold;
  color: var(--ase-text);
  line-height: 1;
}

.day-number.is-sunday { color: #cc3333; }
.day-number.is-saturday { color: #2255aa; }
.day-number.is-holiday { color: #cc3333; }
.day-number.is-today {
  background: var(--ase-active);
  color: #ffffff;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
}
.day-number.is-today.is-sunday,
.day-number.is-today.is-holiday { background: #cc3333; }
.day-number.is-today.is-saturday { background: #2255aa; }

.day-cell.muted .day-number { color: var(--ase-muted); }

.holiday-label {
  font-size: 13px;
  color: #cc3333;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 70%;
}

.calendar-item-stack {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.calendar-item-badge {
  display: block;
  font-size: 13px;
  padding: 1px 4px;
  border-radius: 2px;
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--ase-text);
  line-height: 1.5;
}

.calendar-item-badge:hover { opacity: 0.8; }

.calendar-item-text {
  font-size: 13px;
  color: var(--ase-text);
}

/* ── 주간 타임라인 ── */
.week-timeline {
  display: grid;
  grid-template-columns: 60px repeat(7, 1fr);
  gap: 0;
  border: 1px solid var(--ase-border);
  background: var(--ase-border);
}

.timeline-corner,
.timeline-dayhead,
.time-label,
.time-slot {
  border: 0;
  border-left: 1px solid var(--ase-border);
  border-top: 1px solid var(--ase-border);
  background: #c4b5a5;
}

.week-timeline > :nth-child(-n + 8) { border-top: 0; }
.week-timeline > :nth-child(8n + 1) { border-left: 0; }

.timeline-corner {
  min-height: 54px;
  background: var(--ase-bg-dark);
}

.timeline-dayhead {
  min-height: 54px;
  padding: 6px 4px;
  background: var(--ase-bg-dark);
  text-align: center;
}

.timeline-dayhead span,
.timeline-dayhead strong { display: block; }

.timeline-dayhead span {
  font-size: 13px;
  color: var(--ase-muted);
}

.timeline-dayhead strong {
  font-size: 14px;
  color: var(--ase-text);
  margin-top: 2px;
}

.timeline-dayhead .holiday-label {
  display: block;
  max-width: 100%;
  margin-top: 2px;
}

.timeline-dayhead.is-today { background: #ccc890; }
.timeline-dayhead.is-today strong { color: var(--ase-active); }

.time-label {
  display: grid;
  place-items: center;
  min-height: 72px;
  font-size: 13px;
  color: var(--ase-muted);
  background: var(--ase-bg-light);
}

.time-slot {
  min-height: 56px;
  padding: 3px;
  overflow: hidden;
  background: #c4b5a5;
}

.time-slot.is-today { background: #ccc890; }

.schedule-chip {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 3px 6px;
  margin-bottom: 2px;
  font-size: 13px;
  color: var(--ase-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
  width: 100%;
  box-sizing: border-box;
}

.schedule-chip:hover { opacity: 0.8; }

.today-focus {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 8px;
  padding: 6px;
  background: var(--ase-bg-dark);
  border: 1px solid var(--ase-border);
}

.today-focus strong {
  font-size: 15px;
  color: var(--ase-link);
  display: block;
  margin-bottom: 4px;
}

.today-focus p { font-size: 15px; color: var(--ase-muted); }

/* ================================================================
   SUMMARY CARDS
================================================================ */

.summary-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  padding: 6px;
  border-bottom: 1px solid rgba(0,0,0,0.1);
}

.summary-card {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 6px 8px;
  background: var(--ase-bg);
  border: 1px solid var(--ase-border);
}

.summary-card > span { font-size: 13px; color: var(--ase-muted); }
.summary-card > strong { font-size: 20px; color: var(--ase-text); line-height: 1.4; }
.summary-card > small { font-size: 13px; color: var(--ase-muted); }

.summary-card.warm > strong { color: var(--ase-active); }
.summary-card.mint > strong { color: var(--ase-link); }
.summary-card.gold > strong { color: #8b6914; }

/* ================================================================
   PARENT/CHILD PANEL LAYOUTS
================================================================ */

.single-page-grid { display: flex; flex-direction: column; gap: 4px; }
.panel { display: flex; flex-direction: column; gap: 4px; }

.parent-layout,
.shop-admin-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  padding: 6px;
}

.child-bottom {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  padding: 6px;
}

.parent-block,
.shop-card,
.timeline-card,
.today-schedule-card,
.today-quest-card,
.today-character,
.info-panel {
  background: var(--ase-bg);
  border: 1px solid var(--ase-border);
  padding: 8px;
}

/* ================================================================
   QUEST / APPROVAL LISTS
================================================================ */

.approval-list,
.quest-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1px;
  max-height: 200px;
  overflow-y: auto;
}

.approval-list li,
.quest-list li {
  background: var(--ase-bg-light);
  border: 1px solid rgba(0,0,0,0.2);
  padding: 4px 8px;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  cursor: pointer;
}

.approval-list li::before,
.quest-list li::before {
  content: "▶";
  font-size: 13px;
  color: var(--ase-link);
  flex-shrink: 0;
}

.approval-list li:hover,
.quest-list li:hover { background: var(--ase-hover); }

/* ================================================================
   FORMS
================================================================ */

.task-form,
.auth-form,
.settings-modal-form,
.simple-auth-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.form-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

.task-form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 4px;
  align-items: center;
}

.task-form-actions-left { justify-content: flex-start; }

/* XP 프리셋 */
.xp-presets {
  display: flex;
  gap: 6px;
  align-items: center;
  font-size: 13px;
  color: var(--ase-muted);
  flex-wrap: wrap;
  padding: 4px;
  background: var(--ase-bg-dark);
  border: 1px solid rgba(0,0,0,0.15);
}

.xp-presets button {
  padding: 2px 6px;
  font-size: 13px;
  background: var(--ase-bg);
  color: var(--ase-link);
  border: 1px solid var(--ase-border);
  cursor: pointer;
  font-family: 'Galmuri11', 'Pixelify Sans', monospace;
  min-height: 18px;
}

.xp-presets button:hover { background: var(--ase-hover); }

/* 요일 피커 */
.weekday-picker {
  padding: 6px;
  background: var(--ase-bg-dark);
  border: 1px solid var(--ase-border);
}

.weekday-picker-label {
  font-size: 14px;
  color: var(--ase-muted);
  display: block;
  margin-bottom: 4px;
}

.weekday-chip-row { display: flex; gap: 2px; flex-wrap: wrap; }

.weekday-chip {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 3px 7px;
  background: var(--ase-bg);
  border: 1px solid var(--ase-border);
  font-size: 13px;
  cursor: pointer;
}

.weekday-chip:hover { background: var(--ase-hover); }
.weekday-chip input { width: auto; }

/* 색상 선택 */
.color-selector-shell {
  display: flex;
  gap: 4px;
  align-items: center;
  flex-wrap: wrap;
}

.color-preset-list { display: flex; gap: 2px; flex-wrap: wrap; }

.color-preset {
  width: 22px; height: 22px;
  background: var(--preset, #ccc);
  border: 1px solid var(--ase-border);
  cursor: pointer;
  padding: 0;
}

.color-preset.is-active {
  outline: 2px solid var(--ase-active);
  outline-offset: 1px;
}

.color-preview-wrap { display: flex; flex-direction: column; gap: 2px; }

.color-preview-label { font-size: 14px; color: var(--ase-muted); }

.task-color-preview {
  width: 40px; height: 26px;
  border: 1px solid var(--ase-border);
}

.color-picker-trigger {
  display: flex;
  align-items: center;
  cursor: pointer;
}

.color-picker-icon {
  display: inline-block;
  width: 16px; height: 16px;
  background: var(--ase-bg-dark);
  border: 1px solid var(--ase-border);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 10 10'%3E%3Ccircle cx='5' cy='5' r='3' fill='none' stroke='%232c4c91' stroke-width='1.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
}

.color-input { width: 0; height: 0; opacity: 0; position: absolute; }

/* 색상 설정 행 */
.color-setting-row { align-items: flex-start; }

/* ================================================================
   ITEM SHOP PREVIEW
================================================================ */

.shop-preview-box {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  padding: 6px;
  background: var(--ase-bg-dark);
  border: 1px solid var(--ase-border);
}

/* Aseprite 특유의 체커보드 투명 배경 */
.shop-preview-media {
  width: 48px; height: 48px;
  flex-shrink: 0;
  background-image:
    repeating-conic-gradient(var(--ase-check-a) 0% 25%, var(--ase-check-b) 0% 50%);
  background-size: 8px 8px;
  border: 1px solid var(--ase-border);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.shop-preview-media img {
  width: 100%; height: 100%;
  object-fit: contain;
  image-rendering: pixelated;
}

.shop-preview-placeholder { font-size: 13px; color: var(--ase-muted); text-align: center; }

.shop-preview-text { display: flex; flex-direction: column; gap: 2px; }
.shop-preview-text strong { font-size: 13px; color: var(--ase-text); }
.shop-preview-text span { font-size: 13px; color: var(--ase-muted); }
.shop-preview-text p { font-size: 13px; color: var(--ase-link); }

/* ================================================================
   ITEM CARDS / SHOP LIST
================================================================ */

.shop-list,
.inventory-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 6px;
  max-height: 320px;
  overflow-y: auto;
}

.item-card {
  background: var(--ase-bg-dark);
  border: 1px solid var(--ase-border);
  padding: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  text-align: center;
  cursor: pointer;
}

.item-card:hover { background: var(--ase-hover); }

.item-card strong { font-size: 13px; color: var(--ase-text); word-break: keep-all; }
.item-card p { font-size: 13px; color: var(--ase-link); }

.item-card button {
  padding: 2px 6px;
  font-size: 13px;
  background: var(--ase-bg);
  color: var(--ase-text);
  border: 1px solid var(--ase-border);
  cursor: pointer;
  font-family: 'Galmuri11', 'Pixelify Sans', monospace;
  min-height: 18px;
}

.item-card button:hover { background: var(--ase-hover); }

.item-icon {
  width: 48px; height: 48px;
  background-image:
    repeating-conic-gradient(var(--ase-check-a) 0% 25%, var(--ase-check-b) 0% 50%);
  background-size: 8px 8px;
  border: 1px solid var(--ase-border);
  image-rendering: pixelated;
}

.item-icon.hat    { background-color: rgba(192, 128, 32, 0.8); }
.item-icon.cape   { background-color: rgba(96, 32, 128, 0.8); }
.item-icon.bg     { background-color: rgba(32, 72, 32, 0.8); }

/* ================================================================
   CHARACTER DISPLAY
================================================================ */

.today-character {
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: center;
  padding: 6px;
  min-width: 160px;
}

.today-character-stage {
  position: relative;
  width: 100px; height: 120px;
}

/* Aseprite 체커보드 */
.avatar-backdrop {
  position: absolute;
  inset: 0;
  background-image:
    repeating-conic-gradient(var(--ase-check-a) 0% 25%, var(--ase-check-b) 0% 50%);
  background-size: 8px 8px;
  border: 1px solid var(--ase-border);
}

.avatar-body {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
}

/* 픽셀아트 스타일 캐릭터 */
.avatar-face {
  width: 32px; height: 32px;
  background: #60b840;
  border: 2px solid #1a2808;
  border-radius: 50% 50% 40% 40%;
  position: relative;
  image-rendering: pixelated;
}

.avatar-face::before,
.avatar-face::after {
  content: "+";
  position: absolute;
  width: 8px; height: 8px;
  color: #1a2808;
  font-size: 16px;
  line-height: 1;
  top: 8px;
  font-family: monospace;
}

.avatar-face::before { left: 4px; }
.avatar-face::after  { right: 4px; }

.avatar-suit {
  width: 26px; height: 14px;
  background: #2858a8;
  border: 2px solid #1a1408;
}

.avatar-boots {
  display: flex;
  gap: 2px;
}

.avatar-boots::before,
.avatar-boots::after {
  content: "";
  display: block;
  width: 10px; height: 6px;
  background: #6a3810;
  border: 2px solid #1a1408;
}

.today-character-caption { text-align: center; }

.today-character-caption strong {
  font-size: 13px;
  color: var(--ase-text);
  display: block;
}

.today-character-caption span { font-size: 13px; color: var(--ase-muted); }

.character-open-button {
  font-size: 13px !important;
  padding: 3px 8px !important;
  min-height: 20px !important;
}

/* ================================================================
   TODAY LAYOUT
================================================================ */

.today-layout {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 8px;
}

.today-task-column { display: flex; flex-direction: column; gap: 6px; }

.today-view-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 4px 8px;
  background: var(--ase-bg-dark);
  border-bottom: 1px solid var(--ase-border);
}

.today-view-head strong {
  font-size: 13px;
  color: var(--ase-text);
  display: block;
}

.today-view-head span { font-size: 13px; color: var(--ase-muted); }

/* 디지털 시계 */
.time-badge {
  text-align: right;
  background: #1a1408;
  border: 1px solid var(--ase-border);
  padding: 4px 8px;
}

.time-badge small {
  font-size: 13px;
  color: #608030;
  display: block;
}

.time-badge strong {
  font-size: 16px;
  color: #a0d850;
  display: block;
}

/* ================================================================
   COIN BADGE
================================================================ */

.coin-badge {
  font-size: 13px;
  color: #8b6914;
  background: var(--ase-hover);
  border: 1px solid var(--ase-border);
  padding: 3px 6px;
  letter-spacing: 0.05em;
}

/* ================================================================
   XP BAR
================================================================ */

.xp-bar {
  height: 18px;
  background: #1a1408;
  border: 1px solid var(--ase-border);
  overflow: hidden;
  margin: 3px 0;
}

.xp-bar-fill {
  height: 100%;
  background: var(--ase-active);
  width: 0%;
  transition: width 0.3s steps(8);
}

.progress-meta {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  color: var(--ase-muted);
}

/* ================================================================
   CHARACTER MODAL
================================================================ */

.character-grid {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 12px;
  margin-top: 10px;
}

.character-stage-panel { display: flex; flex-direction: column; gap: 4px; }

.character-stage {
  position: relative;
  height: 180px;
  background-image:
    repeating-conic-gradient(var(--ase-check-a) 0% 25%, var(--ase-check-b) 0% 50%);
  background-size: 8px 8px;
  border: 1px solid var(--ase-border);
}

.gear-slots { display: flex; flex-direction: column; gap: 2px; }

.gear-slot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 2px 4px;
  background: var(--ase-bg-dark);
  border: 1px solid rgba(0,0,0,0.2);
  font-size: 13px;
}

.gear-slot span { color: var(--ase-muted); }
.gear-slot strong { color: var(--ase-link); font-size: 13px; font-weight: normal; }

.character-statbar {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 3px;
  margin-bottom: 6px;
}

.character-statbar > div {
  background: var(--ase-bg-dark);
  border: 1px solid var(--ase-border);
  padding: 4px;
  text-align: center;
}

.character-statbar span {
  font-size: 13px;
  color: var(--ase-muted);
  display: block;
}

.character-statbar strong {
  font-size: 13px;
  color: var(--ase-text);
  display: block;
}

.character-progress-card {
  padding: 6px;
  background: var(--ase-bg-dark);
  border: 1px solid var(--ase-border);
  margin-bottom: 8px;
}

.character-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 4px 8px;
  background: var(--ase-header);
  margin: -8px -8px 8px;
  border-bottom: 1px solid var(--ase-border);
}

.character-head > div h2 { color: var(--ase-header-text); font-size: 13px; }
.character-head > div .section-kicker { color: rgba(255,255,255,0.6); }

/* ================================================================
   INFO PANELS
================================================================ */

.info-panels {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  margin-top: 6px;
}

.info-panel {
  padding: 6px;
}

.info-panel h3 {
  font-size: 13px;
  color: var(--ase-link);
  margin-bottom: 4px;
  padding-bottom: 3px;
  border-bottom: 1px solid rgba(0,0,0,0.2);
  font-weight: normal;
}

.info-list { list-style: none; display: flex; flex-direction: column; gap: 2px; }

.info-list > div {
  display: flex;
  justify-content: space-between;
  padding: 3px 0;
  border-bottom: 1px dashed var(--ase-border);
  font-size: 13px;
}

.info-list dt { color: var(--ase-muted); }
.info-list dd { color: var(--ase-text); }

/* ================================================================
   OVERLAY / MODAL
================================================================ */

.gate-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 8px;
}

.gate-overlay[hidden] { display: none; }

.gate-card {
  position: relative;
  max-width: 680px;
  width: 100%;
  max-height: 92vh;
  overflow-y: auto;
  padding: 8px;
  background: var(--ase-bg);
  border: 1px solid var(--ase-border);
  box-shadow: 4px 4px 0 rgba(0,0,0,0.5);
}

.schedule-detail-actions {
  display: flex;
  gap: 4px;
  justify-content: flex-end;
  margin-top: 8px;
  padding-top: 6px;
  border-top: 1px solid rgba(0,0,0,0.15);
}

.settings-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.settings-modal-head-spread { justify-content: space-between; }

/* ================================================================
   ITEM LIBRARY
================================================================ */

.item-library-modal { max-width: 560px; }

.item-library-toolbar {
  display: flex;
  gap: 6px;
  margin: 6px 0;
  flex-wrap: wrap;
}

.item-library-sort {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 15px;
}

.item-library-sort select,
.item-library-sort input { width: auto; }

.item-library-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
  gap: 4px;
  max-height: 300px;
  overflow-y: auto;
}

.item-library-search-field { flex: 1; min-width: 120px; }

/* ================================================================
   SETTINGS
================================================================ */

.settings-toolbar { display: flex; gap: 4px; }
.settings-card-layout { margin-top: 8px; }
.settings-member-cards { display: flex; flex-wrap: wrap; gap: 6px; }

.settings-detail-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 8px;
  padding-top: 6px;
  border-top: 1px solid rgba(0,0,0,0.15);
}

.settings-detail-footer { display: flex; gap: 4px; }

.settings-inline-button {
  font-size: 13px !important;
  padding: 3px 8px !important;
  min-height: 20px !important;
}

.settings-delete-top { color: var(--ase-active) !important; }

.settings-password-box {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 6px;
  background: var(--ase-bg-dark);
  border: 1px solid var(--ase-border);
}

/* ================================================================
   GUILD REQUEST LIST
================================================================ */

.guild-request-list {
  display: flex;
  flex-direction: column;
  gap: 3px;
  max-height: 200px;
  overflow-y: auto;
}

/* ================================================================
   FEEDBACK
================================================================ */

.form-feedback {
  font-size: 13px;
  padding: 4px 8px;
  border: 1px solid;
  display: none;
}

.form-feedback:not(:empty) { display: block; }
.form-feedback.is-error { border-color: var(--ase-active); color: var(--ase-active); background: rgba(255, 85, 85, 0.08); }
.form-feedback.is-success { border-color: var(--ase-link); color: var(--ase-link); background: rgba(44, 76, 145, 0.08); }

/* ================================================================
   AUTH PAGES
================================================================ */

.simple-auth-body { background: var(--ase-workspace); }

.simple-auth-shell { padding: 12px 0 20px; }

.simple-auth-card {
  padding: 0;
  margin-bottom: 4px;
}

.simple-auth-card-body { padding: 12px; }

/* 카드 타이틀바 */
.simple-auth-logo {
  display: flex;
  align-items: center;
  height: 28px;
  padding: 0 8px;
  background: var(--ase-header);
  color: var(--ase-header-text);
  font-size: 13px;
  font-weight: normal;
  border-bottom: 1px solid var(--ase-border);
  margin-bottom: 0;
}

/* 랜딩 카드 특별 스타일 */
.simple-landing-card {
  text-align: center;
}

.simple-landing-card .simple-auth-logo {
  justify-content: center;
  height: 32px;
  font-size: 13px;
}

.simple-landing-eyebrow {
  font-size: 13px;
  color: var(--ase-muted);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 8px 12px 0;
  display: block;
}

.simple-landing-eyebrow::before,
.simple-landing-eyebrow::after {
  content: "───";
  color: rgba(0,0,0,0.2);
  margin: 0 6px;
}

.simple-landing-title {
  font-size: 14px;
  color: var(--ase-text);
  padding: 16px 20px;
  line-height: 2;
}

.simple-landing-copy {
  font-size: 13px;
  color: var(--ase-muted);
  line-height: 2.2;
  padding: 0 20px 16px;
}

.simple-landing-actions {
  display: flex;
  gap: 6px;
  justify-content: center;
  flex-wrap: wrap;
  padding: 8px 12px 12px;
}

.simple-landing-link { font-size: 13px !important; }

/* 폼 내부 패딩 */
.simple-auth-form { padding: 10px 12px; }

.simple-auth-field {
  display: flex;
  flex-direction: column;
  gap: 3px;
  font-size: 13px;
  color: var(--ase-text);
}

.simple-auth-submit {
  margin-top: 4px;
  width: 100%;
  justify-content: center;
  font-size: 13px !important;
  min-height: 24px !important;
  padding: 4px !important;
}

.simple-auth-feedback {
  font-size: 13px;
  min-height: 16px;
  margin: 4px 12px;
  text-align: center;
}

.simple-auth-feedback.is-error { color: var(--ase-active); }
.simple-auth-feedback.is-success { color: var(--ase-link); }

.simple-auth-signup-card { text-align: center; }
.simple-auth-signup-card p {
  font-size: 13px;
  color: var(--ase-muted);
  padding: 8px 12px 4px;
}

.simple-auth-link {
  font-size: 13px;
  color: var(--ase-link);
  text-decoration: underline;
  display: block;
  padding-bottom: 10px;
}

.simple-auth-link:hover { color: var(--ase-active); }

.simple-auth-check {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 4px;
  font-size: 13px;
}

.simple-auth-check input { width: auto; }

.simple-auth-bottom-link {
  margin-top: 6px;
  text-align: center;
  padding: 0 12px 10px;
}

.simple-auth-bottom-link a {
  font-size: 13px;
  color: var(--ase-muted);
  text-decoration: underline;
}

.simple-auth-bottom-link a:hover { color: var(--ase-link); }

/* ================================================================
   ROLE CARDS (LANDING)
================================================================ */

.role-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  margin-top: 4px;
}

.role-card {
  display: block;
  padding: 0;
  color: inherit;
  text-decoration: none;
  cursor: pointer;
  background: var(--ase-bg);
  border: 1px solid var(--ase-border);
  text-align: left;
  overflow: hidden;
}

.role-card:hover { background: var(--ase-hover); }

.role-card-title {
  display: flex;
  align-items: center;
  height: 24px;
  padding: 0 8px;
  background: var(--ase-header);
  color: var(--ase-header-text);
  font-size: 13px;
  border-bottom: 1px solid var(--ase-border);
}

.role-card.child-role .role-card-title { background: #5c7a3c; }
.role-card.parent-role .role-card-title { background: #3c5a7a; }

.role-card-body { padding: 8px; }

.role-badge {
  display: inline-block;
  padding: 3px 8px;
  font-size: 14px;
  background: rgba(0,0,0,0.15);
  border: 1px solid rgba(0,0,0,0.3);
  letter-spacing: 0.08em;
  margin-bottom: 6px;
}

.role-card h2 { font-size: 13px; margin-bottom: 2px; }
.role-card p { font-size: 13px; color: var(--ase-muted); line-height: 1.5; }

.role-figure, .role-lock {
  margin-top: 10px;
  height: 100px;
  background-image:
    repeating-conic-gradient(var(--ase-check-a) 0% 25%, var(--ase-check-b) 0% 50%);
  background-size: 8px 8px;
  border: 1px solid var(--ase-border);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.role-link {
  display: block;
  margin-top: 4px;
  font-size: 13px;
  color: var(--ase-link);
}

.mini-avatar-face {
  position: absolute;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  width: 32px; height: 32px;
  background: #60b840;
  border: 2px solid #1a2808;
  border-radius: 50%;
}

.mini-avatar-body {
  position: absolute;
  top: 44px;
  left: 50%;
  transform: translateX(-50%);
  width: 24px; height: 16px;
  background: #2858a8;
  border: 2px solid #1a1408;
}

/* ================================================================
   PUSH STATUS
================================================================ */

.push-status-text {
  font-size: 13px;
  color: rgba(255,255,255,0.7);
}

/* ================================================================
   SHOP DETAIL MODAL
================================================================ */

.shop-detail-preview-box { margin: 6px 0; }

.shop-detail-actions {
  display: flex;
  gap: 4px;
  justify-content: flex-end;
}

.shop-detail-button { font-size: 13px !important; }

/* ================================================================
   NOTIFICATION BLOCK
================================================================ */

.parent-notification-block { margin-top: 2px; }

/* ================================================================
   ACCESSIBILITY
================================================================ */

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

/* ================================================================
   RESPONSIVE
================================================================ */

@media (max-width: 900px) {
  .parent-layout,
  .shop-admin-layout,
  .character-grid,
  .info-panels { grid-template-columns: 1fr; }
  .child-bottom { grid-template-columns: 1fr; }
  .today-layout { grid-template-columns: 1fr; }
  .role-grid { grid-template-columns: 1fr; }
  .summary-row { grid-template-columns: 1fr; }
  .character-statbar { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 600px) {
  .form-split { grid-template-columns: 1fr; }
  .calendar-head { flex-direction: column; gap: 4px; }
  .summary-row { grid-template-columns: 1fr 1fr; }
}
