/* ART WINDOW 마이페이지 리뉴얼 시안 — Room Note 디자인 언어 계승 */

:root {
  --bg: #ffffff;
  --bg-soft: #fafbfc;
  --border-soft: #eef2f6;
  --primary: oklch(0.4381 0.0813 166.52);
  --primary-deep: oklch(0.38 0.082 166.5);
  --primary-light: #d8eee4;
  --ink: oklch(0.129 0.042 264.695);
  --ink-mute: #94a3b8;
  --muted-fg: oklch(0.554 0.046 257.417);
  --border: oklch(0.929 0.013 255.508);
  --radius: 12px;
  --maxw: 1024px;
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: "Noto Sans KR", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  word-break: keep-all;
  overflow-wrap: break-word;
  line-height: 1.6;
}

.serif {
  font-family: "Playfair Display", "Noto Serif KR", serif;
}

img {
  display: block;
  max-width: 100%;
}

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

button {
  font: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

/* ============ Eyebrow ============ */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: "Playfair Display", "Noto Serif KR", serif;
  font-weight: 700;
  font-size: 12px;
  line-height: 17px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--primary);
}
.eyebrow::before {
  content: "";
  display: block;
  width: 24px;
  height: 1px;
  background: var(--primary);
}
.eyebrow.muted {
  color: var(--muted-fg);
}
.eyebrow.muted::before {
  background: var(--muted-fg);
}

/* ============ Shell ============ */
.shell {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 72px 24px 120px;
}

.page-head {
  margin-bottom: 44px;
}
.page-head h1 {
  margin: 16px 0 15px;
  font-size: clamp(30px, 4.4vw, 44px);
  font-weight: 300;
  line-height: 1.3;
  letter-spacing: -0.01em;
}
.page-head .sub {
  max-width: 52ch;
  font-size: 15px;
  line-height: 1.74;
  color: var(--muted-fg);
}

.credit-meta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 20px;
  padding: 9px 15px 9px 13px;
  border: 1px solid var(--border-soft);
  border-radius: 999px;
  background: var(--bg-soft);
  font-size: 12.5px;
  color: var(--muted-fg);
}
.credit-meta b {
  color: var(--ink);
  font-weight: 600;
}
.credit-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--primary);
}
.credit-meta .divider {
  width: 1px;
  height: 11px;
  background: var(--border);
}

/* ============ Layout ============ */
.layout {
  display: flex;
  gap: 44px;
  align-items: flex-start;
}

/* ---- desktop nav ---- */
.nav-desktop {
  flex: none;
  width: 168px;
  position: sticky;
  top: 40px;
}
.nav-desktop ol {
  list-style: none;
}
.nav-item {
  display: flex;
  align-items: baseline;
  gap: 10px;
  width: 100%;
  padding: 13px 14px;
  border-radius: 9px;
  border-left: 2px solid transparent;
  color: var(--muted-fg);
  font-size: 14.5px;
  text-align: left;
  transition: color 0.2s var(--ease), background 0.2s var(--ease);
}
.nav-item .idx {
  font-family: "Playfair Display", "Noto Serif KR", serif;
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--ink-mute);
  transition: color 0.2s var(--ease);
}
.nav-item:hover {
  color: var(--ink);
}
.nav-item.active {
  color: var(--primary);
  background: var(--bg-soft);
  border-left-color: var(--primary);
  font-weight: 600;
}
.nav-item.active .idx {
  color: var(--primary);
}

/* ---- mobile nav ---- */
.nav-mobile {
  display: none;
}

/* ============ Content ============ */
.content {
  flex: 1;
  min-width: 0;
}
.panel {
  display: none;
}
.panel.active {
  display: block;
}

.panel-head {
  margin-bottom: 30px;
}
.panel-head h2 {
  margin: 0;
  font-size: clamp(23px, 3vw, 31px);
  font-weight: 400;
  line-height: 1.32;
  letter-spacing: -0.008em;
}
.panel-head .count {
  margin-top: 11px;
  font-size: 13.5px;
  color: var(--muted-fg);
}
.panel-head .count b {
  color: var(--ink);
  font-weight: 600;
}

/* ---- reveal motion ---- */
[data-reveal] {
  opacity: 0;
  transform: translateY(8px);
}
.reveal-on [data-reveal] {
  opacity: 1;
  transform: none;
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}
@media (prefers-reduced-motion: reduce) {
  [data-reveal] {
    opacity: 1 !important;
    transform: none !important;
  }
}

/* ============ Gallery ============ */
.art-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}
.art-cell {
  position: relative;
  display: block;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fff;
  padding: 9px;
  transition: box-shadow 0.3s var(--ease), transform 0.3s var(--ease),
    border-color 0.3s var(--ease);
}
.art-cell:hover {
  transform: translateY(-3px);
  border-color: var(--border-soft);
  box-shadow: 0 14px 32px rgba(2, 8, 23, 0.1), 0 3px 8px rgba(2, 8, 23, 0.05);
}
.art-frame {
  display: block;
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: 5px;
  background: var(--bg-soft);
}
.art-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s var(--ease);
}
.art-cell:hover .art-frame img {
  transform: scale(1.045);
}
.art-cap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 4px 5px;
}
.art-cap .date {
  font-size: 12px;
  color: var(--muted-fg);
  letter-spacing: 0.01em;
}
.art-cap .open {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 11.5px;
  color: var(--muted-fg);
  opacity: 0;
  transform: translateX(-4px);
  transition: opacity 0.25s var(--ease), transform 0.25s var(--ease), color 0.2s;
}
.art-cell:hover .art-cap .open {
  opacity: 1;
  transform: none;
  color: var(--primary);
}

/* ============ Orders ============ */
.order-groups {
  display: flex;
  flex-direction: column;
  gap: 40px;
  max-width: 640px;
}
.order-group > .date-rule {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
}
.date-rule time {
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--muted-fg);
  white-space: nowrap;
}
.date-rule .line {
  flex: 1;
  height: 1px;
  background: var(--border-soft);
}
.order-list {
  display: flex;
  flex-direction: column;
  gap: 19px;
}
.order-card {
  display: flex;
  gap: 16px;
  padding: 16px;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  background: #fff;
  transition: border-color 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.order-card:hover {
  border-color: var(--border);
  box-shadow: 0 8px 22px rgba(2, 8, 23, 0.05);
}
.order-thumb {
  flex: none;
  width: 84px;
  height: 84px;
  border-radius: 8px;
  overflow: hidden;
  background: var(--bg-soft);
  border: 1px solid var(--border-soft);
}
.order-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.order-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.order-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 600;
}
.status .sdot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}
.status.s-paid { color: oklch(0.52 0.13 158); }
.status.s-pending { color: oklch(0.52 0.13 252); }
.status.s-prep { color: oklch(0.52 0.13 252); }
.status.s-done { color: var(--muted-fg); }
.status.s-cancel { color: var(--ink-mute); }
.order-time {
  margin-top: 3px;
  font-size: 12px;
  color: var(--ink-mute);
}
.order-detail-link {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 12.5px;
  color: var(--muted-fg);
  white-space: nowrap;
  transition: color 0.2s;
}
.order-card:hover .order-detail-link {
  color: var(--primary);
}
.order-name {
  margin-top: 9px;
  font-size: 14px;
  color: var(--ink);
}
.order-amount {
  margin-top: auto;
  padding-top: 8px;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

/* ============ Recommendations ============ */
.report-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.report-card {
  display: block;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: #fff;
  transition: box-shadow 0.3s var(--ease), transform 0.3s var(--ease),
    border-color 0.3s var(--ease);
}
.report-card:hover {
  transform: translateY(-3px);
  border-color: var(--border-soft);
  box-shadow: 0 14px 32px rgba(2, 8, 23, 0.1), 0 3px 8px rgba(2, 8, 23, 0.05);
}
.report-img {
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--bg-soft);
}
.report-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s var(--ease);
}
.report-card:hover .report-img img {
  transform: scale(1.045);
}
.report-meta {
  display: block;
  padding: 15px 16px 17px;
}
.report-meta .rtitle {
  display: block;
  font-size: 14.5px;
  font-weight: 500;
  color: var(--ink);
}
.report-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 9px;
}
.report-meta .rdate {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 11.5px;
  color: var(--ink-mute);
}
.report-meta .rdate .tick {
  width: 12px;
  height: 1px;
  background: var(--ink-mute);
}
.report-meta .ropen {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 11.5px;
  color: var(--muted-fg);
  white-space: nowrap;
  opacity: 0;
  transform: translateX(-4px);
  transition: opacity 0.25s var(--ease), transform 0.25s var(--ease), color 0.2s;
}
.report-card:hover .ropen {
  opacity: 1;
  transform: none;
  color: var(--primary);
}

/* ============ Profile ============ */
.profile-wrap {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: 22px;
  align-items: stretch;
  max-width: 720px;
}
.card {
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  background: var(--bg-soft);
  padding: 30px;
}
.card .card-label {
  display: block;
  font-family: "Playfair Display", "Noto Serif KR", serif;
  font-weight: 700;
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 18px;
}
.account-id {
  display: flex;
  align-items: center;
  gap: 16px;
  padding-bottom: 22px;
  margin-bottom: 6px;
  border-bottom: 1px solid var(--border-soft);
}
.avatar {
  flex: none;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--primary-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "Playfair Display", "Noto Serif KR", serif;
  font-size: 24px;
  color: var(--primary-deep);
}
.account-id .who .nm {
  display: block;
  font-size: 17px;
  font-weight: 600;
}
.account-id .who .since {
  display: block;
  margin-top: 3px;
  font-size: 12px;
  color: var(--ink-mute);
}
.field-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 15px 0;
  font-size: 14px;
  border-bottom: 1px solid var(--border-soft);
}
.field-row:last-of-type {
  border-bottom: none;
}
.field-row .k {
  font-size: 13px;
  color: var(--muted-fg);
}
.field-row .v {
  text-align: right;
}
.logout {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: 20px;
  padding: 9px 16px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 13px;
  color: var(--muted-fg);
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}
.logout:hover {
  color: var(--ink);
  border-color: var(--ink-mute);
  background: #fff;
}

.credit-card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--primary-light);
  background: linear-gradient(168deg, #fff 0%, var(--primary-light) 240%);
}
.credit-num {
  display: flex;
  align-items: baseline;
  gap: 6px;
}
.credit-num .big {
  font-family: "Playfair Display", "Noto Serif KR", serif;
  font-size: 52px;
  font-weight: 500;
  line-height: 1;
  color: var(--primary-deep);
}
.credit-num .unit {
  font-size: 15px;
  color: var(--muted-fg);
}
.credit-card .note {
  margin-top: 14px;
  font-size: 13px;
  line-height: 1.7;
  color: var(--muted-fg);
}
.credit-reset {
  display: flex;
  justify-content: space-between;
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid var(--primary-light);
  font-size: 13px;
}
.credit-reset .k {
  color: var(--muted-fg);
}
.credit-reset .v {
  font-weight: 600;
}

/* ============ Empty state ============ */
.empty {
  display: none;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 6px;
  padding: 72px 28px;
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  background: var(--bg-soft);
}
.empty .mark {
  width: 54px;
  height: 54px;
  border-radius: 11px;
  background: #fff;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 15px;
  color: var(--ink-mute);
}
.empty .et {
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
}
.empty .ed {
  max-width: 34ch;
  font-size: 13px;
  line-height: 1.7;
  color: var(--muted-fg);
}
.empty .btn {
  margin-top: 17px;
  padding: 11px 22px;
  border-radius: 8px;
  background: var(--primary);
  color: #fff;
  font-size: 13.5px;
  font-weight: 600;
  transition: background 0.2s var(--ease);
}
.empty .btn:hover {
  background: var(--primary-deep);
}

/* ============ Pagination ============ */
.pager {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-top: 36px;
}
.pager button,
.pager span {
  min-width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  font-size: 13px;
  color: var(--muted-fg);
  transition: background 0.2s, color 0.2s;
}
.pager button:hover {
  background: var(--bg-soft);
  color: var(--ink);
}
.pager button.active {
  background: var(--primary);
  color: #fff;
  font-weight: 600;
}
.pager .arrow {
  color: var(--ink-mute);
}

/* ============ 시안 데이터 토글 ============ */
.demo-toggle {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 9px 7px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(8px);
  box-shadow: 0 8px 24px rgba(2, 8, 23, 0.12);
  font-size: 11.5px;
  color: var(--muted-fg);
}
.demo-label {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11.5px;
  color: var(--muted-fg);
}
.demo-label::after {
  content: "▾";
  font-size: 8px;
  color: var(--ink-mute);
}
.demo-toggle.collapsed {
  padding: 7px 13px;
}
.demo-toggle.collapsed .demo-label::after {
  content: "▸";
}
.demo-toggle.collapsed .seg {
  display: none;
}
.demo-toggle .seg {
  display: flex;
  border: 1px solid var(--border);
  border-radius: 999px;
  overflow: hidden;
}
.demo-toggle .seg button {
  padding: 5px 11px;
  font-size: 11.5px;
  color: var(--muted-fg);
}
.demo-toggle .seg button.on {
  background: var(--ink);
  color: #fff;
}

/* ============ Responsive ============ */
@media (max-width: 860px) {
  .shell {
    padding: 48px 18px 110px;
  }
  .layout {
    flex-direction: column;
    gap: 0;
  }
  .nav-desktop {
    display: none;
  }
  .nav-mobile {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    margin: 0 0 26px;
    padding-bottom: 2px;
    scrollbar-width: none;
  }
  .nav-mobile::-webkit-scrollbar {
    display: none;
  }
  .nav-mobile button {
    flex: none;
    padding: 9px 16px;
    border-radius: 999px;
    border: 1px solid var(--border);
    font-size: 13px;
    color: var(--muted-fg);
    white-space: nowrap;
  }
  .nav-mobile button.active {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
    font-weight: 600;
  }
  .art-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
  .report-grid {
    grid-template-columns: 1fr;
  }
  .profile-wrap {
    grid-template-columns: 1fr;
  }
  .order-amount {
    font-size: 17px;
  }
}

@media (max-width: 420px) {
  .art-grid {
    gap: 10px;
  }
  .order-card {
    gap: 12px;
  }
  .order-thumb {
    width: 68px;
    height: 68px;
  }
}
