:root {
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --primary-light: #eff6ff;
  --primary-border: #bfdbfe;
  --accent: #4f46e5;
  --accent-light: #eef2ff;

  --bg-page: #f8fafc;
  --bg-surface: #ffffff;
  --bg-surface-secondary: #f1f5f9;
  --bg-card: #ffffff;
  --bg-input: #ffffff;

  --text-main: #0f172a;
  --text-muted: #64748b;
  --text-sub: #94a3b8;

  --border-subtle: #e2e8f0;
  --border-focus: #3b82f6;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;

  --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.05);
  --shadow-md: 0 4px 14px rgba(15, 23, 42, 0.07);
  --shadow-lg: 0 14px 34px rgba(15, 23, 42, 0.1);
  --shadow-sheet: 0 20px 45px -10px rgba(15, 23, 42, 0.15), 0 0 1px 1px rgba(15, 23, 42, 0.05);

  --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Pretendard", "Noto Sans KR", sans-serif;
  --transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}
.dark-theme {
  --primary: #3b82f6;
  --primary-hover: #60a5fa;
  --primary-light: #1e293b;
  --primary-border: #1e3a8a;
  --accent: #6366f1;
  --accent-light: #1e1b4b;

  --bg-page: #090d16;
  --bg-surface: #111827;
  --bg-surface-secondary: #1f2937;
  --bg-card: #111827;
  --bg-input: #1f2937;

  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-sub: #64748b;

  --border-subtle: #1f2937;
  --border-focus: #60a5fa;

  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 14px 36px rgba(0, 0, 0, 0.5);
  --shadow-sheet: 0 22px 50px -10px rgba(0, 0, 0, 0.6), 0 0 1px 1px rgba(255, 255, 255, 0.07);
}
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
html {
  overflow-x: hidden;
  width: 100%;
}
body {
  font-family: var(--font-family);
  background-color: var(--bg-page);
  color: var(--text-main);
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  width: 100%;
  max-width: 100vw;
  transition: background-color 0.3s ease, color 0.3s ease;
}
#app {
  width: 100%;
  overflow-x: hidden;
  transition: opacity .18s ease;
}
#app.route-fading {
  opacity: 0;
}
input[type="number"],
input[type="date"],
.inp-amount,
.receipt-total-value,
.receipt-a4-meta-table .meta-val,
.preview-badge,
.time-savings-text strong,
.doc-spec-table td,
.approval-step-input {
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum";
}
.main-nav {
  position: relative;
  width: 100%;
  z-index: 900;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-subtle);
  transition: box-shadow 0.2s ease, background-color 0.3s ease;
}
.dark-theme .main-nav {
  background: rgba(17, 24, 39, 0.94);
}
@media (min-width: 1025px) {
.main-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.07);
  }
body {
    padding-top: 60px;
  }
.dark-theme .main-nav {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
  }
}
.nav-container {
  max-width: 100%;
  margin: 0 auto;
  padding: 0.65rem 2.5rem;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 1.75rem;
  flex-wrap: nowrap;
}
.brand-link {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  text-decoration: none;
  color: var(--text-main);
  font-weight: 800;
  font-size: 1.22rem;
  letter-spacing: -0.03em;
  white-space: nowrap;
  flex-shrink: 0;
  transition: opacity 0.15s ease;
}
.brand-link:hover {
  opacity: 0.85;
}
.brand-symbol {
  display: inline-block;
  vertical-align: middle;
  flex-shrink: 0;
  color: var(--text-main);
}
.brand-text {
  font-weight: 800;
  font-family: -apple-system, BlinkMacSystemFont, "Pretendard", "Segoe UI", sans-serif;
  letter-spacing: -0.04em;
}
.nav-menu {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  white-space: nowrap;
  flex-shrink: 0;
}
.dual-tab-nav {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  background: none;
  padding: 0;
  border-radius: 0;
  border: 0;
}
.dark-theme .dual-tab-nav {
  background: none;
  border-color: transparent;
}
.dual-tab-item {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  font-size: 0.86rem;
  font-weight: 500;
  color: var(--text-muted);
  padding: 0.38rem 0.75rem;
  border-radius: 0;
  border-bottom: 2px solid transparent;
  transition: color 0.15s, border-color 0.15s;
  white-space: nowrap;
  user-select: none;
}
.dual-tab-item:hover {
  color: var(--text-main);
}
.dual-tab-item.active {
  background: none;
  color: var(--text-main);
  font-weight: 700;
  border-bottom-color: var(--text-main);
  box-shadow: none;
}
.dark-theme .dual-tab-item.active {
  background: none;
  color: #ffffff;
  border-bottom-color: #ffffff;
  box-shadow: none;
}
#btnBookmarkNav,
#shareDropdownContainer,
#theme-toggle,
#btnLogoutGoogle,
.user-name-text {
  display: none !important;
}
@media (max-width: 640px) {
.dual-tab-item {
    padding: 0.32rem 0.65rem;
    font-size: 0.78rem;
  }
}
.nav-link {
  text-decoration: none;
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.88rem;
  padding: 0.38rem 0.9rem;
  border-radius: var(--radius-full);
  white-space: nowrap;
  transition: var(--transition);
}
.nav-link:hover {
  color: var(--text-main);
}
.nav-link.active {
  background: var(--bg-surface);
  color: var(--primary);
  font-weight: 700;
  box-shadow: var(--shadow-sm);
}
.nav-controls {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  white-space: nowrap;
  flex-shrink: 0;
  margin-left: auto;
}
.control-btn {
  background: var(--bg-surface-secondary);
  border: 1px solid transparent;
  color: var(--text-main);
  font-size: 0.82rem;
  font-weight: 700;
  padding: 0.38rem 0.75rem;
  border-radius: var(--radius-full);
  cursor: pointer;
  white-space: nowrap;
  transition: var(--transition);
  min-height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.control-btn:hover {
  background: var(--primary-light);
  color: var(--primary);
  border-color: var(--primary-border);
}
.lang-dropdown-container {
  position: relative;
  display: inline-block;
}
.lang-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.38rem 0.65rem;
  cursor: pointer;
  user-select: none;
}
.lang-btn .lang-icon {
  display: inline-flex;
  align-items: center;
  color: var(--text-muted);
  line-height: 1;
}
.lang-btn .lang-current-label {
  font-size: 0.8rem;
  font-weight: 700;
  max-width: 80px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.lang-btn .lang-arrow {
  font-size: 0.65rem;
  color: var(--text-muted);
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  line-height: 1;
}
.lang-dropdown-container.open .lang-btn .lang-arrow {
  transform: rotate(180deg);
  color: var(--primary);
}
.lang-dropdown-menu {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  width: 175px;
  max-height: 380px;
  overflow-y: auto;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  padding: 0.35rem;
  z-index: 1000;
  animation: langMenuFadeIn 0.15s cubic-bezier(0.16, 1, 0.3, 1);
  scrollbar-width: thin;
}
@keyframes langMenuFadeIn {
  from {
    opacity: 0;
    transform: translateY(-4px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}
.lang-dropdown-container.open .lang-dropdown-menu {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.lang-menu-item {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  width: 100%;
  padding: 0.45rem 0.6rem;
  border: none;
  background: transparent;
  color: var(--text-main);
  font-size: 0.82rem;
  font-weight: 600;
  text-align: left;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
}
.lang-menu-item:hover {
  background: var(--primary-light);
  color: var(--primary);
}
.lang-menu-item.active {
  background: var(--primary-light);
  color: var(--primary);
  font-weight: 800;
}
.lang-item-flag {
  font-size: 1.1rem;
  line-height: 1;
  flex-shrink: 0;
}
.lang-item-name {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.lang-item-check {
  font-size: 0.75rem;
  color: var(--primary);
  font-weight: 900;
}
.dark-theme .lang-dropdown-menu {
  background: var(--bg-surface);
  border-color: var(--border-subtle);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
}
.auth-container {
  display: inline-flex;
  align-items: center;
  position: relative;
}
.auth-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.75rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}
.auth-btn:hover {
  border-color: #4285F4;
  box-shadow: 0 1px 4px rgba(66, 133, 244, 0.15);
}
.user-profile-menu {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.2rem 0.55rem;
  min-height: 32px;
  background: var(--bg-surface);
  border: none;
  border-radius: var(--radius-full);
  box-sizing: border-box;
}
.user-credits-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  background: linear-gradient(135deg, rgba(79, 70, 229, 0.12), rgba(147, 51, 234, 0.12));
  color: #4f46e5;
  border: none;
  padding: 0.12rem 0.48rem;
  border-radius: 9999px;
  font-size: 0.72rem;
  font-weight: 800;
  white-space: nowrap;
  letter-spacing: -0.2px;
  transition: all 0.2s ease;
  cursor: pointer;
}
.user-credits-badge:hover {
  background: linear-gradient(135deg, rgba(79, 70, 229, 0.22), rgba(147, 51, 234, 0.22));
  transform: translateY(-0.5px);
}
.dark-theme .user-credits-badge {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.25), rgba(168, 85, 247, 0.25));
  color: #c7d2fe;
}
.dark-theme .user-credits-badge:hover {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.35), rgba(168, 85, 247, 0.35));
}
.user-credits-badge.unlimited {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.2), rgba(234, 88, 12, 0.2));
  color: #d97706;
}
.dark-theme .user-credits-badge.unlimited {
  color: #fbbf24;
}
.user-avatar-img {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--border-subtle);
}
.user-name-text {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-main);
  max-width: 100px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.btn-logout {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 500;
  cursor: pointer;
  padding: 0.15rem 0.35rem;
  border-radius: 4px;
  transition: var(--transition);
}
.btn-logout:hover {
  color: #ef4444;
  background: rgba(239, 68, 68, 0.08);
}
@media (max-width: 768px) {
.nav-container {
    padding: 0.5rem 0.75rem;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 0.4rem;
  }
.nav-brand {
    order: 1;
    display: flex;
    align-items: center;
    flex: 0 0 auto;
  }
.brand-link {
    font-size: 1.05rem;
    gap: 0.4rem;
  }
.nav-controls {
    order: 2;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: nowrap;
    flex: 1 1 0;
    min-width: 0;
    gap: 0.35rem;
    margin-left: auto;
  }
.control-btn.bookmark-btn,
  .share-dropdown-container {
    display: none !important;
  }
.lang-dropdown-menu {
    right: 0 !important;
    left: auto !important;
    min-width: 160px;
    max-width: calc(100vw - 24px);
  }
.auth-container {
    display: inline-flex;
  }
.auth-btn {
    display: inline-flex;
    padding: 0.32rem 0.7rem;
    font-size: 0.78rem;
    background: var(--primary);
    color: #ffffff !important;
    border-color: var(--primary);
    font-weight: 700;
    border-radius: var(--radius-full);
  }
.auth-btn.hidden,
  .auth-btn[style*="display: none"],
  .auth-btn[style*="display:none"] {
    display: none !important;
  }
.auth-btn svg {
    stroke: #ffffff;
  }
.auth-btn:hover {
    background: var(--primary-hover);
    color: #ffffff !important;
  }
.dark-theme .auth-btn {
    background: var(--primary);
    color: #ffffff !important;
  }
.control-btn {
    font-size: 0.75rem;
    padding: 0.28rem 0.5rem;
    min-height: 28px;
  }
.nav-menu {
    order: 3;
    width: 100%;
    margin-top: 0.2rem;
    padding: 0;
  }
.dual-tab-nav {
    width: 100%;
    display: flex;
    justify-content: stretch;
    padding: 2px;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }
.dual-tab-nav::-webkit-scrollbar {
    display: none;
  }
.dual-tab-item {
    flex: 1 0 auto;
    min-width: max-content;
    text-align: center;
    justify-content: center;
    padding: 0.45rem 0.5rem;
    font-size: 0.78rem;
  }
.dual-tab-label {
    white-space: nowrap;
  }
}
@media (max-width: 430px) {
.lang-btn .lang-current-label { display: none; }
.user-credits-badge { padding: 0.12rem 0.42rem; }
}
.header-section {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin-bottom: 2rem;
  width: 100%;
}
@media (max-width: 640px) {
.header-section {
    margin-bottom: 1.25rem;
  }
}
.header-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.38rem 1rem;
  border-radius: var(--radius-full);
  background: var(--primary-light);
  color: var(--primary);
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  margin: 0 auto 0.75rem auto;
  text-align: center;
}
.subtitle {
  font-size: 0.98rem;
  color: var(--text-muted);
  max-width: 100%;
  margin: 0 auto;
  text-align: center;
  line-height: 1.5;
  word-break: keep-all;
}
@media (min-width: 860px) {
.subtitle {
    white-space: nowrap;
  }
}
@media (max-width: 859px) {
.subtitle {
    max-width: 680px;
    white-space: normal;
  }
}
@media (max-width: 640px) {
.subtitle {
    font-size: 0.86rem;
    line-height: 1.45;
    padding: 0 0.5rem;
    white-space: normal;
  }
}
.count-badge {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--primary);
}
@keyframes pulse {
  0% { transform: scale(0.95); opacity: 0.8; }
  50% { transform: scale(1.15); opacity: 1; }
  100% { transform: scale(0.95); opacity: 0.8; }
}
@keyframes live-dot-pulse {
  0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
  70% { box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
  100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}
.a4-sheet {
  background: #ffffff;
  color: #111827;
  width: auto;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  aspect-ratio: 1 / 1.414; /* A4 용지 정밀 비율 (1:√2) */
  border-radius: 4px;
  box-shadow: var(--shadow-sheet);
  border: 1px solid #d1d5db;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: var(--transition);
  box-sizing: border-box;
}
@media (max-width: 1024px) {
.a4-sheet {
    width: 100%;
    height: auto;
  }
}
.a4-sheet-inner {
  position: relative;
  z-index: 2;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  overflow: hidden;
}
.a4-sheet-header {
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  padding-bottom: 0.35rem;
  border-bottom: none;
  margin-bottom: 0.45rem;
  display: flex;
  align-items: center;
  flex-shrink: 0;
}
.a4-sheet-header.align-left {
  justify-content: flex-start;
  text-align: left;
}
.a4-sheet-header.align-center {
  justify-content: center;
  text-align: center;
}
.a4-sheet-header.align-right {
  justify-content: flex-end;
  text-align: right;
}
.a4-sheet-grid {
  flex: 1 1 0;
  min-height: 0;
  display: grid;
  gap: 0.55rem;
  align-content: stretch;
  overflow: hidden;
}
.a4-cut-card {
  display: flex;
  flex-direction: column;
  border: 1px solid #9ca3af;
  border-radius: 0;
  overflow: hidden;
  background: #ffffff;
  min-height: 0;
  height: 100%;
  box-sizing: border-box;
}
.a4-image-box {
  flex: 1 1 0;
  min-height: 0;
  position: relative;
  background: #ffffff;
  padding: 4px;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-bottom: 1px solid #9ca3af;
}
.a4-image-box.empty {
  background: #f3f4f6;
  padding: 0;
}
.a4-image-box img {
  position: absolute;
  top: 4px;
  left: 4px;
  width: calc(100% - 8px);
  height: calc(100% - 8px);
  object-fit: cover;
  object-position: center center;
  display: block;
  border: 1px solid #d1d5db;
  box-sizing: border-box;
}
.a4-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
  color: #9ca3af;
  font-size: 0.75rem;
  font-weight: 600;
}
.a4-num-badge {
  background: #e5e7eb;
  color: #4b5563;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
}
.a4-caption-table {
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  width: 100%;
  box-sizing: border-box;
}
.a4-caption-row {
  display: flex;
  width: 100%;
  box-sizing: border-box;
  border-bottom: 1px solid #d1d5db;
  font-size: 0.72rem;
  line-height: 1.3;
}
.a4-caption-row:last-child {
  border-bottom: none;
}
.a4-caption-row.two-cols {
  display: flex;
  flex-direction: row;
  width: 100%;
  box-sizing: border-box;
}
.a4-col-pair {
  display: flex;
  width: 50%;
  min-width: 0;
  box-sizing: border-box;
}
.a4-col-pair:first-child {
  border-right: 1px solid #d1d5db;
}
.dark-theme .a4-col-pair:first-child {
  border-right-color: #334155;
}
.a4-col-pair .a4-caption-label {
  width: 35%;
  min-width: 0;
  flex-shrink: 0;
  box-sizing: border-box;
  font-size: 0.68rem;
  letter-spacing: -0.3px;
  padding: 0.2rem 0.2rem;
}
.a4-col-pair .a4-caption-value {
  width: 65%;
  min-width: 0;
  flex: 1;
  box-sizing: border-box;
  justify-content: center;
  text-align: center;
  padding: 0.2rem 0.25rem;
  font-size: 0.68rem;
}
.has-col-layout .a4-caption-row:not(.two-cols) .a4-caption-label {
  width: 17.5%;
  min-width: 0;
  flex-shrink: 0;
  box-sizing: border-box;
  font-size: 0.68rem;
  letter-spacing: -0.3px;
  padding: 0.2rem 0.2rem;
}
.has-col-layout .a4-caption-row:not(.two-cols) .a4-caption-value {
  width: 82.5%;
  min-width: 0;
  flex: 1;
  box-sizing: border-box;
}
.a4-caption-label {
  width: 28%;
  min-width: 0;
  flex-shrink: 0;
  background: #f3f4f6;
  color: #374151;
  font-weight: 700;
  text-align: center;
  padding: 0.25rem 0.3rem;
  border-right: 1px solid #d1d5db;
  display: flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  box-sizing: border-box;
  letter-spacing: -0.3px;
}
.a4-caption-value {
  width: 72%;
  min-width: 0;
  flex: 1;
  padding: 0.25rem 0.4rem;
  color: #111827;
  display: flex;
  align-items: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  box-sizing: border-box;
}
.a4-sheet-footer {
  font-size: 0.75rem;
  color: #6b7280;
  padding-top: 0.35rem;
  display: flex;
  align-items: center;
  flex-shrink: 0;
}
.a4-sheet-footer.align-left {
  justify-content: flex-start;
  text-align: left;
}
.a4-sheet-footer.align-center {
  justify-content: center;
  text-align: center;
}
.a4-sheet-footer.align-right {
  justify-content: flex-end;
  text-align: right;
}
.a4-sheet-footer.align-none {
  display: none;
}
.btn-cta-start {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: #ffffff;
  color: var(--primary);
  font-size: 1.05rem;
  font-weight: 800;
  padding: 0.95rem 2rem;
  border-radius: var(--radius-full);
  text-decoration: none;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
  transition: var(--transition);
}
.btn-cta-start:hover {
  transform: scale(1.04);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}
/* 키보드 포커스가 outline:none 으로 지워지지 않도록 공통 폴백을 둔다.
   컴포넌트별 규칙이 있으면 그쪽이 우선하고, 없을 때만 아래 표시가 적용된다. */
:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}
.dark-theme :where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
  outline-color: #f8fafc;
}

.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 10001;
}
.loading-overlay.active { display: flex; }
.loading-spinner-container {
  background: var(--bg-surface);
  border-radius: var(--radius-lg);
  padding: 2rem 2.5rem;
  text-align: center;
}
.loading-spinner-large {
  width: 42px;
  height: 42px;
  border: 3.5px solid var(--border-subtle);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 1rem;
}
@keyframes spin { to { transform: rotate(360deg); } }
.loading-text { font-size: 0.95rem; font-weight: 700; }
.notification {
  position: fixed;
  top: max(14px, env(safe-area-inset-top));
  left: 50%;
  z-index: 10002;
  display: flex;
  align-items: center;
  gap: 10px;
  width: max-content;
  max-width: min(440px, calc(100vw - 24px));
  padding: 11px 20px 11px 14px;
  border-radius: 999px;
  background: rgba(24, 25, 29, 0.86);
  -webkit-backdrop-filter: saturate(180%) blur(22px);
  backdrop-filter: saturate(180%) blur(22px);
  color: #fff;
  font-size: 14px;
  font-weight: 550;
  letter-spacing: -0.01em;
  line-height: 1.35;
  box-shadow: 0 0 0 0.5px rgba(255, 255, 255, 0.1) inset, 0 10px 32px -6px rgba(10, 10, 20, 0.42), 0 2px 6px rgba(10, 10, 20, 0.18);
  cursor: pointer;
  touch-action: none;
  user-select: none;
  opacity: 0;
  transform: translate(-50%, -140%) scale(0.86);
  transition: transform 0.55s cubic-bezier(0.34, 1.42, 0.5, 1), opacity 0.25s ease;
}
.notification.show { opacity: 1; transform: translate(-50%, 0) scale(1); }
.notification.leave { opacity: 0; transform: translate(-50%, -120%) scale(0.92); transition: transform 0.36s cubic-bezier(0.5, 0, 0.75, 0), opacity 0.3s ease; }
.notification-icon { flex: none; width: 20px; height: 20px; display: grid; place-items: center; }
.notification-icon svg { width: 20px; height: 20px; display: block; }
.notification-text { min-width: 0; overflow-wrap: anywhere; }
.notification .t-bg { fill: #8e8e93; }
.notification.success .t-bg { fill: #34c759; }
.notification.error .t-bg { fill: #ff453a; }
.notification.warning .t-bg { fill: #ff9f0a; }
@media (prefers-reduced-motion: reduce) {
  .notification, .notification.leave { transition: opacity 0.2s ease; transform: translate(-50%, 0); }
}
.app-footer {
  text-align: center;
  padding: 2rem 1.5rem;
  color: var(--text-sub);
  font-size: 0.85rem;
  border-top: 1px solid var(--border-subtle);
}
.footer-links {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.75rem;
}
.btn-footer-link {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 0.82rem;
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
  transition: var(--transition);
}
.btn-footer-link:hover {
  color: var(--primary);
}
.footer-sep {
  color: var(--border-subtle);
  font-size: 0.8rem;
}
.footer-copy {
  color: var(--text-muted);
  font-size: 0.82rem;
}
@keyframes bannerPulse {
  0%, 100% { box-shadow: 0 2px 10px rgba(37, 99, 235, 0.08); }
  50% { box-shadow: 0 4px 18px rgba(37, 99, 235, 0.18); border-color: rgba(59, 130, 246, 0.45); }
}
@keyframes rotateIcon {
  0% { transform: rotate(0deg); }
  25% { transform: rotate(15deg); }
  75% { transform: rotate(-15deg); }
  100% { transform: rotate(0deg); }
}
.bookmark-btn, .share-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.45rem 0.85rem;
  font-size: 0.82rem;
  font-weight: 600;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-color);
  background: var(--bg-surface);
  color: var(--text-primary);
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}
.bookmark-btn:hover {
  background: #fef3c7;
  border-color: #f59e0b;
  color: #b45309;
  transform: translateY(-1px);
}
[data-theme="dark"] .bookmark-btn:hover {
  background: #78350f;
  border-color: #f59e0b;
  color: #fde68a;
}
.share-btn:hover {
  background: #eff6ff;
  border-color: #3b82f6;
  color: #1d4ed8;
  transform: translateY(-1px);
}
[data-theme="dark"] .share-btn:hover {
  background: #1e3a8a;
  border-color: #3b82f6;
  color: #bfdbfe;
}
.share-dropdown-container {
  position: relative;
  display: inline-block;
}
.share-dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.15), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
  min-width: 175px;
  padding: 6px;
  display: none;
  flex-direction: column;
  gap: 2px;
  z-index: 1000;
  animation: dropdownFadeIn 0.2s ease;
}
.share-dropdown-menu.active {
  display: flex;
}
@keyframes dropdownFadeIn {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}
.share-menu-item {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  width: 100%;
  padding: 0.5rem 0.75rem;
  border: none;
  background: transparent;
  color: var(--text-primary);
  font-size: 0.85rem;
  font-weight: 500;
  border-radius: var(--radius-sm);
  cursor: pointer;
  text-align: left;
  transition: background 0.15s ease;
}
.share-menu-item:hover {
  background: var(--bg-hover, rgba(0, 0, 0, 0.05));
  color: var(--primary);
}
[data-theme="dark"] .share-menu-item:hover {
  background: rgba(255, 255, 255, 0.08);
}
.x-badge { background: #000000; color: #ffffff; }
.celebrate-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 1rem;
  animation: fadeInModal 0.2s ease;
}
@keyframes fadeInModal {
  from { opacity: 0; }
  to { opacity: 1; }
}
.celebrate-modal-card {
  --cm-ink: #17181b;
  --cm-ink-2: #4f5159;
  --cm-ink-3: #8a8c94;
  --cm-line: #e4e4e8;
  --cm-sunken: #f1f1f3;
  --cm-accent: oklch(0.52 0.17 262);
  --cm-accent-soft: oklch(0.96 0.025 262);
  --cm-ok: oklch(0.58 0.12 155);
  --cm-ok-soft: oklch(0.96 0.03 155);
  background: #ffffff;
  color: var(--cm-ink);
  border-radius: 16px;
  border: 1px solid var(--cm-line);
  box-shadow: 0 1px 2px rgba(20, 20, 30, 0.05), 0 24px 60px -12px rgba(20, 20, 30, 0.35);
  max-width: 420px;
  width: 100%;
  padding: 2rem 1.75rem 1.5rem;
  text-align: center;
  position: relative;
  font-family: "Pretendard Variable", Pretendard, system-ui, sans-serif;
  animation: scaleUpModal 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes scaleUpModal {
  from { transform: translateY(8px) scale(0.98); opacity: 0; }
  to { transform: translateY(0) scale(1); opacity: 1; }
}
.celebrate-x {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--cm-ink-3);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: background 0.12s, color 0.12s;
}
.celebrate-x:hover { background: var(--cm-sunken); color: var(--cm-ink); }
.celebrate-badge {
  width: 52px;
  height: 52px;
  margin: 0 auto 1.1rem;
  border-radius: 999px;
  background: var(--cm-ok-soft);
  color: var(--cm-ok);
  display: grid;
  place-items: center;
  box-shadow: 0 0 0 6px color-mix(in oklch, var(--cm-ok-soft) 55%, transparent);
}
.celebrate-modal-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--cm-ink);
  margin: 0 0 0.55rem;
  letter-spacing: -0.02em;
  line-height: 1.4;
  word-break: keep-all;
  text-wrap: balance;
}
.celebrate-modal-desc {
  font-size: 0.875rem;
  line-height: 1.6;
  color: var(--cm-ink-2);
  margin: 0 0 1rem;
  text-wrap: pretty;
  word-break: keep-all;
}
.celebrate-modal-desc strong {
  color: var(--cm-ink);
  font-weight: 650;
}
.celebrate-file-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--cm-sunken, #f1f5f9);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--cm-ink, #0f172a);
  margin: 0.2rem 0 0.5rem;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.btn-celebrate-share-main {
  width: 100%;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 0.4rem 0 0.75rem;
  background: #fee500;
  color: #191919;
  border: 1px solid #ebd300;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
  transition: transform 0.08s ease, background 0.12s ease;
}
.btn-celebrate-share-main:hover {
  background: #fada00;
}
.btn-celebrate-share-main:active {
  transform: scale(0.98);
}
.btn-celebrate-share {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 0.4rem;
  padding: 0.7rem 0.25rem 0.6rem;
  line-height: 1.25;
  border-radius: 10px;
  border: 1px solid var(--cm-line);
  background: #ffffff;
  color: var(--cm-ink-2);
  font: inherit;
  font-size: 0.7rem;
  font-weight: 550;
  cursor: pointer;
  transition: border-color 0.12s, background 0.12s, color 0.12s;
}
.btn-celebrate-share:hover {
  border-color: var(--cm-ink-3);
  background: var(--cm-sunken);
  color: var(--cm-ink);
}
.btn-celebrate-share:focus-visible,
.btn-celebrate-close:focus-visible,
.celebrate-x:focus-visible {
  outline: 2px solid var(--cm-accent);
  outline-offset: 2px;
}
.c-share-icon {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 9px;
  background: var(--cm-sunken);
  color: var(--cm-ink);
}
.btn-celebrate-share:hover .c-share-icon { background: #ffffff; }
.celebrate-modal-actions {
  display: flex;
  justify-content: center;
}
.btn-celebrate-close {
  width: 100%;
  height: 42px;
  background: var(--cm-ink);
  color: #ffffff;
  border: none;
  border-radius: 9px;
  font: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.12s;
}
.btn-celebrate-close:hover { background: #000000; }
@media (prefers-reduced-motion: reduce) {
.celebrate-modal-overlay, .celebrate-modal-card { animation: none; }
}
.celebrate-modal-card.cc-card { text-align: left; max-width: 440px; padding: 1.5rem 1.5rem 1.25rem; }
.cc-head { display: flex; align-items: center; gap: 10px; margin-bottom: 0.85rem; }
.cc-icon { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; background: var(--cm-accent-soft); color: var(--cm-accent); flex: none; }
.cc-head h3 { margin: 0; font-size: 1.05rem; font-weight: 700; letter-spacing: -0.02em; color: var(--cm-ink); }
.cc-summary { margin: 0 0 1rem; font-size: 0.875rem; line-height: 1.6; color: var(--cm-ink-2); word-break: keep-all; text-wrap: pretty; }
.cc-summary.warn { color: #92400e; background: #fffbeb; border: 1px solid #fde68a; border-radius: 9px; padding: 10px 12px; }
.cc-rows { margin: 0 0 1rem; border: 1px solid var(--cm-line); border-radius: 10px; overflow: hidden; }
.cc-rows > div { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 14px; font-size: 0.875rem; }
.cc-rows > div + div { border-top: 1px solid var(--cm-line); }
.cc-rows dt { color: var(--cm-ink-2); margin: 0; }
.cc-rows dd { margin: 0; font-weight: 650; font-variant-numeric: tabular-nums; color: var(--cm-ink); }
.cc-rows .cc-deduct dd { color: #be123c; }
.cc-rows .cc-remain { background: var(--cm-sunken); }
.cc-rows .cc-remain dd { font-size: 1rem; }
.cc-agree { display: flex; align-items: flex-start; gap: 10px; font-size: 0.85rem; line-height: 1.5; color: var(--cm-ink); cursor: pointer; margin-bottom: 1.1rem; user-select: none; }
.cc-agree input { width: 16px; height: 16px; margin-top: 2px; accent-color: var(--cm-ink); flex: none; cursor: pointer; }
.cc-actions { display: grid; grid-template-columns: 1fr 1.4fr; gap: 8px; }
.cc-btn { height: 42px; border-radius: 9px; font: inherit; font-size: 0.92rem; font-weight: 600; cursor: pointer; border: 1px solid transparent; transition: background 0.12s, border-color 0.12s, opacity 0.12s; }
.cc-btn-sec { background: #fff; color: var(--cm-ink); border-color: var(--cm-line); }
.cc-btn-sec:hover { border-color: var(--cm-ink-3); }
.cc-btn-pri { background: var(--cm-ink); color: #fff; }
.cc-btn-pri:hover:not(:disabled) { background: #000; }
.cc-btn-pri:disabled { opacity: 0.35; cursor: not-allowed; }
.cc-btn:focus-visible, .cc-agree input:focus-visible { outline: 2px solid var(--cm-accent); outline-offset: 2px; }
.brand-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(30px);
  background: rgba(15, 23, 42, 0.92);
  color: #ffffff;
  padding: 0.75rem 1.4rem;
  border-radius: var(--radius-full);
  font-size: 0.88rem;
  font-weight: 600;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(8px);
  z-index: 10000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
  max-width: 90%;
  text-align: center;
}
.brand-toast.show {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}
@media (max-width: 768px) {
.bookmark-btn, .share-btn {
    padding: 0.3rem 0.55rem;
    font-size: 0.72rem;
  }
.celebrate-share-grid {
    grid-template-columns: repeat(5, 1fr);
    gap: 0.35rem;
  }
}
.receipt-proof-page {
  display: flex;
  flex-direction: column;
  flex: 1;
  width: 100%;
  height: 100%;
}
.receipt-proof-grid {
  display: grid;
  width: 100%;
  flex: 1;
}
.receipt-proof-grid.grid-2x2 {
  grid-template-columns: repeat(2, 1fr);
  grid-template-rows: repeat(2, 1fr);
  gap: 8px;
  flex: 1;
  height: calc(100% - 24px);
}
.receipt-proof-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  font-size: 9px;
  line-height: 1.3;
}
.receipt-proof-table td {
  border: 1px solid #cbd5e1;
  padding: 3px 6px;
  word-break: break-all;
}
.receipt-proof-table .lbl {
  width: 32%;
  background: #f8fafc;
  font-weight: 700;
  color: #475569;
  text-align: center;
  white-space: nowrap;
}
.receipt-proof-table .val {
  width: 68%;
  color: #0f172a;
}
.receipt-a4-footer-page-no {
  margin-top: auto;
  padding-top: 8px;
  text-align: center;
  font-size: 10.5px;
  font-weight: 700;
  color: #64748b;
  letter-spacing: 2px;
}
.crop-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 10005;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  animation: fadeInModal 0.2s ease;
}
.crop-modal-card {
  background: var(--bg-surface);
  border-radius: 16px;
  border: 1px solid var(--border-subtle);
  box-shadow: 0 24px 60px -20px rgba(15, 23, 42, 0.5);
  max-width: 880px;
  width: 100%;
  max-height: 94vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: scaleUpModal 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}
.crop-modal-header {
  padding: 1rem 1.1rem 0.85rem 1.25rem;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}
.crop-modal-title-group {
  flex: 1;
  min-width: 0;
}
.crop-modal-title {
  font-size: 1.05rem;
  font-weight: 750;
  color: var(--text-main);
  letter-spacing: -0.02em;
  line-height: 1.35;
  margin: 0;
}
.crop-modal-guide,
.crop-modal-autodetect-info {
  margin: 0.3rem 0 0;
  font-size: 0.8rem;
  line-height: 1.5;
  color: var(--text-muted);
}
.crop-modal-autodetect-info strong {
  color: var(--text-main);
  font-weight: 750;
}
.crop-header-actions {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  flex: none;
}
.btn-crop-reset {
  background: transparent;
  border: 0;
  border-radius: 8px;
  padding: 0.4rem 0.6rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition);
}
.btn-crop-reset:hover {
  background: var(--bg-surface-secondary);
  color: var(--text-main);
}
.btn-crop-close {
  background: transparent;
  color: var(--text-muted);
  border: 0;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
}
.btn-crop-close:hover {
  background: var(--bg-surface-secondary);
  color: var(--text-main);
}
.crop-stage-container {
  flex: 1;
  min-height: 340px;
  max-height: 62vh;
  background: #0b0f19;
  padding: 1.25rem;
  overflow: auto;
  display: flex;
  align-items: center;
  justify-content: center;
}
.crop-image-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}
.crop-stage-inner {
  position: relative;
  display: inline-block;
  user-select: none;
  touch-action: none;
}
.crop-base-image {
  display: block;
  max-width: 100%;
  max-height: 56vh;
  object-fit: contain;
  border-radius: 4px;
  pointer-events: none;
}
.crop-boxes-layer {
  position: absolute;
  inset: 0;
  cursor: crosshair;
}
.crop-drag-preview {
  position: absolute;
  border: 1.5px dashed #2563eb;
  background: rgba(37, 99, 235, 0.14);
  border-radius: 3px;
  pointer-events: none;
}
.crop-box-item {
  position: absolute;
  transform-origin: center center;
  border: 2px solid #2563eb;
  background: rgba(37, 99, 235, 0.1);
  /* 파란 선 바깥의 흰 고리: 어두운 배경과 흰 영수증 위 양쪽에서 모두 보인다 */
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.95), 0 6px 18px rgba(0, 0, 0, 0.35);
  border-radius: 3px;
  cursor: move; /* 박스 위 드래그는 이동, 빈 곳 드래그는 새 영역 생성 */
  pointer-events: auto;
  container-type: size; /* 박스가 작을 때 번호·삭제 버튼이 모서리 핸들과 겹치지 않게 아래에서 분기 */
}
@container (max-width: 76px) or (max-height: 76px) {
  .crop-box-badge {
    display: none;
  }
  .btn-del-crop-box {
    top: 50%;
    right: 50%;
    transform: translate(50%, -50%);
  }
}
.crop-box-badge {
  position: absolute;
  top: 6px;
  left: 6px;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  box-sizing: border-box;
  display: grid;
  place-items: center;
  background: #2563eb;
  color: #ffffff;
  font-size: 0.72rem;
  font-weight: 750;
  line-height: 1;
  border-radius: 11px;
  pointer-events: none;
  font-variant-numeric: tabular-nums;
}
.btn-del-crop-box {
  position: absolute;
  top: 6px;
  right: 6px;
  background: rgba(15, 23, 42, 0.72);
  color: #ffffff;
  border: 0;
  border-radius: 50%;
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  pointer-events: auto; /* 삭제 버튼만 독립 클릭 가능 */
  transition: var(--transition);
}
.btn-del-crop-box:hover {
  background: #0f172a;
}
.crop-resize-handle {
  position: absolute;
  width: 14px;
  height: 14px;
  background: #ffffff;
  border: 2px solid #2563eb;
  border-radius: 50%;
  pointer-events: auto;
  z-index: 3;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
}
.crop-resize-handle::before {
  content: "";
  position: absolute;
  inset: -10px; /* 손가락으로 잡기 쉽게 터치 영역만 넓힌다 */
}
.crop-resize-handle[data-corner="tl"] {
  left: 0;
  top: 0;
  transform: translate(-50%, -50%);
  cursor: nwse-resize;
}
.crop-resize-handle[data-corner="tr"] {
  left: 100%;
  top: 0;
  transform: translate(-50%, -50%);
  cursor: nesw-resize;
}
.crop-resize-handle[data-corner="br"] {
  left: 100%;
  top: 100%;
  transform: translate(-50%, -50%);
  cursor: nwse-resize;
}
.crop-resize-handle[data-corner="bl"] {
  left: 0;
  top: 100%;
  transform: translate(-50%, -50%);
  cursor: nesw-resize;
}
.crop-modal-footer {
  padding: 0.85rem 1.1rem calc(0.85rem + env(safe-area-inset-bottom, 0px));
  display: flex;
  align-items: center;
  gap: 0.6rem;
  border-top: 1px solid var(--border-subtle);
  background: var(--bg-surface);
}
.btn-crop-cancel {
  flex: none;
  background: transparent;
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  min-height: 48px;
  padding: 0 1.2rem;
  font-size: 0.92rem;
  font-weight: 650;
  color: var(--text-main);
  cursor: pointer;
  transition: var(--transition);
}
.btn-crop-cancel:hover {
  background: var(--bg-surface-secondary);
}
.btn-crop-apply {
  flex: 1;
  min-width: 0;
  background: var(--text-main);
  color: var(--bg-surface);
  border: 0;
  border-radius: 12px;
  min-height: 48px;
  padding: 0 1.25rem;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
}
.btn-crop-apply:hover {
  opacity: 0.88;
}
.btn-crop-close:focus-visible,
.btn-crop-reset:focus-visible,
.btn-crop-cancel:focus-visible,
.btn-crop-apply:focus-visible {
  outline: 2px solid #2563eb;
  outline-offset: 2px;
}
.crop-loading-spinner,
.crop-error-msg {
  color: #94a3b8;
  font-size: 0.9rem;
  padding: 2rem;
  text-align: center;
}
@media (max-width: 768px) {
  .crop-modal-overlay {
    padding: 0.5rem;
  }
  .crop-modal-card {
    max-height: 96vh;
    border-radius: 14px;
  }
  .crop-modal-header {
    padding: 0.85rem 0.6rem 0.7rem 1rem;
  }
  .crop-modal-title {
    font-size: 0.98rem;
  }
  .crop-stage-container {
    min-height: 0;
    max-height: 52vh;
    padding: 0.9rem;
  }
  .crop-base-image {
    max-height: 48vh;
    width: auto;
  }
}
.rotating {
  display: inline-block;
  animation: spin 1s linear infinite;
}
@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}
.expense-summary-page {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  padding: 12px 16px;
  box-sizing: border-box;
  font-family: "Malgun Gothic", "맑은 고딕", -apple-system, sans-serif;
  color: #0f172a;
}
.expense-header-section {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  padding-bottom: 8px;
  border-bottom: 2px solid #1e293b;
  margin-bottom: 10px;
}
.expense-doc-title {
  font-size: 20px;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.5px;
  margin: 0;
}
.expense-agg-table,
.expense-items-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  font-size: 9px;
  line-height: 1.25;
}
.expense-agg-table th,
.expense-items-table th {
  background: #f1f5f9;
  color: #334155;
  font-weight: 700;
  border: 1px solid #cbd5e1;
  padding: 4px 5px;
  text-align: center;
}
.expense-agg-table td,
.expense-items-table td {
  border: 1px solid #cbd5e1;
  padding: 3.5px 5px;
  color: #1e293b;
}
.expense-items-wrapper {
  flex: 1;
  min-height: 0;
  margin-bottom: 8px;
}
#receipt-print-area {
  display: none !important;
}
@media print {
@page {
    size: A4 portrait;
    margin: 0;
  }
html, body {
    margin: 0 !important;
    padding: 0 !important;
    background: #ffffff !important;
    width: 100% !important;
    height: auto !important;
    overflow: visible !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }
body > *:not(#receipt-print-area) {
    display: none !important;
  }
header, nav, footer, .navbar, .app-header, .site-header,
  .control-column, .preview-column, .receipt-action-bar,
  .mobile-tab-nav, .receipt-floating-controls, .preview-panel-header,
  .a4-sheet-container {
    display: none !important;
  }
#receipt-print-area {
    display: block !important;
    position: absolute !important;
    left: 0 !important;
    top: 0 !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    background: #ffffff !important;
    z-index: 9999999 !important;
  }
.receipt-print-sheet {
    width: 210mm !important;
    height: 297mm !important;
    min-height: 297mm !important;
    max-height: 297mm !important;
    box-sizing: border-box !important;
    padding: 14mm 16mm !important;
    margin: 0 auto !important;
    background: #ffffff !important;
    color: #0f172a !important;
    page-break-after: always !important;
    break-after: page !important;
    page-break-inside: avoid !important;
    break-inside: avoid !important;
    overflow: hidden !important;
    display: flex !important;
    flex-direction: column !important;
    position: relative !important;
    box-shadow: none !important;
    border: none !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }
.receipt-print-sheet:last-child {
    page-break-after: auto !important;
    break-after: auto !important;
  }
.receipt-print-sheet .expense-summary-page {
    display: flex !important;
    flex-direction: column !important;
    flex: 1 !important;
    height: 100% !important;
    min-height: 0 !important;
  }
.receipt-print-sheet .expense-doc-title {
    font-size: 24px !important;
  }
.receipt-print-sheet .expense-items-table,
  .receipt-print-sheet .expense-agg-table {
    width: 100% !important;
    border-collapse: collapse !important;
    font-size: 10px !important;
    line-height: 1.35 !important;
  }
.receipt-print-sheet .expense-items-table th,
  .receipt-print-sheet .expense-agg-table th {
    padding: 6px 4px !important;
    font-size: 10px !important;
    background: #f1f5f9 !important;
    color: #334155 !important;
    border: 1px solid #cbd5e1 !important;
    font-weight: 700 !important;
    text-align: center !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }
.receipt-print-sheet .expense-items-table td,
  .receipt-print-sheet .expense-agg-table td {
    padding: 5px 4px !important;
    font-size: 9.5px !important;
    border: 1px solid #cbd5e1 !important;
  }
.receipt-print-sheet .expense-items-table tr.total-row td {
    background: #f1f5f9 !important;
    font-weight: 700 !important;
    border: 1px solid #cbd5e1 !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }
.receipt-print-sheet .receipt-proof-page {
    display: flex !important;
    flex-direction: column !important;
    flex: 1 !important;
    height: 100% !important;
    min-height: 0 !important;
  }
.receipt-print-sheet .receipt-proof-grid.grid-2x2 {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    grid-template-rows: 1fr 1fr !important;
    gap: 12px !important;
    flex: 1 !important;
    min-height: 0 !important;
    height: calc(100% - 46px) !important;
    margin-top: 6px !important;
    margin-bottom: 6px !important;
  }
.receipt-proof-card {
    border: 1px solid #cbd5e1 !important;
    border-radius: 4px !important;
    padding: 6px 8px !important;
    display: flex !important;
    flex-direction: column !important;
    background: #ffffff !important;
    box-sizing: border-box !important;
    min-height: 0 !important;
    height: 100% !important;
  }
.receipt-proof-card-header {
    display: flex !important;
    justify-content: flex-start !important;
    align-items: center !important;
    margin-bottom: 4px !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    color: #0f172a !important;
    border-bottom: 1px solid #f1f5f9 !important;
    padding-bottom: 3px !important;
    flex-shrink: 0 !important;
  }
.receipt-proof-img-box {
    flex: 1 1 auto !important;
    min-height: 80mm !important;
    height: auto !important;
    width: 100% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 3px !important;
    overflow: hidden !important;
    margin-bottom: 4px !important;
    padding: 4px !important;
    box-sizing: border-box !important;
  }
.receipt-proof-img {
    max-width: 100% !important;
    max-height: 100% !important;
    width: auto !important;
    height: 100% !important;
    object-fit: contain !important;
    display: block !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }
.receipt-print-sheet .receipt-proof-table {
    width: 100% !important;
    border-collapse: collapse !important;
    font-size: 9.5px !important;
    border: 1px solid #cbd5e1 !important;
    flex-shrink: 0 !important;
    margin-top: auto !important;
  }
.receipt-print-sheet .receipt-proof-table td {
    padding: 3.5px 6px !important;
    border: 1px solid #cbd5e1 !important;
    font-size: 9.5px !important;
  }
.receipt-print-sheet .receipt-proof-table td.label-cell {
    width: 19% !important;
    white-space: nowrap !important;
    background: #f8fafc !important;
    color: #475569 !important;
    font-weight: 700 !important;
    text-align: center !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }
.receipt-print-sheet .receipt-proof-table td.val-cell {
    width: 31% !important;
    background: #ffffff !important;
    color: #334155 !important;
  }
.receipt-print-sheet .receipt-a4-footer-page-no {
    margin-top: auto !important;
    padding-top: 8px !important;
    font-size: 10px !important;
    color: #94a3b8 !important;
    text-align: center !important;
    flex-shrink: 0 !important;
  }
}
.btn-primary-action {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.75rem;
  background: var(--primary, #2563eb);
  color: #ffffff !important;
  font-weight: 600;
  border-radius: 10px;
  text-decoration: none;
  transition: all 0.2s ease;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
}
.btn-primary-action:hover {
  background: var(--primary-hover, #1d4ed8);
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(37, 99, 235, 0.35);
}
.conversion-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.conversion-modal-card {
  background: var(--bg-surface, #ffffff);
  border: 1px solid var(--border-subtle, #e2e8f0);
  border-radius: var(--radius-lg, 18px);
  width: 100%;
  max-width: 640px; /* PRO 단일 플랜: 무료/PRO 2열이라 좁게 */
  max-height: 94vh;
  overflow-y: auto;
  box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.3);
  position: relative;
  display: flex;
  flex-direction: column;
}
.dark-theme .conversion-modal-card {
  background: #0f172a;
  border-color: #334155;
}
.conversion-modal-header {
  padding: 0.75rem 1.5rem 0.45rem;
  text-align: center;
  position: relative;
  border-bottom: 1px solid var(--border-subtle, #f1f5f9);
}
.conversion-badge-group {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  margin-bottom: 0.25rem;
}
.conversion-pill-badge {
  background: var(--text-main, #0f172a);
  color: #ffffff;
  font-size: 0.68rem;
  font-weight: 800;
  padding: 0.18rem 0.55rem;
  border-radius: 9999px;
  letter-spacing: 0.04em;
}
.conversion-watermark-badge {
  background: rgba(16, 185, 129, 0.12);
  color: #059669;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 0.18rem 0.55rem;
  border-radius: 9999px;
}
.dark-theme .conversion-pill-badge {
  background: #f8fafc;
  color: #0f172a;
}
.dark-theme .conversion-watermark-badge {
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
}
.conversion-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-main, #0f172a);
  margin-bottom: 0.2rem;
}
.conversion-subtitle {
  font-size: 0.8rem;
  color: var(--text-muted, #64748b);
  max-width: 620px;
  margin: 0 auto;
  line-height: 1.35;
}
.conversion-billing-toggle-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-surface-subtle, #f1f5f9);
  padding: 0.2rem;
  border-radius: 9999px;
  margin: 0.45rem auto 0;
  border: 1px solid var(--border-subtle, #e2e8f0);
}
.dark-theme .conversion-billing-toggle-wrap {
  background: #1e293b;
  border-color: #334155;
}
.conversion-toggle-btn {
  background: transparent;
  border: none;
  color: var(--text-muted, #64748b);
  padding: 0.3rem 0.8rem;
  border-radius: 9999px;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}
.dark-theme .conversion-toggle-btn {
  color: #94a3b8;
}
.conversion-toggle-btn:hover {
  color: var(--text-main, #0f172a);
}
.dark-theme .conversion-toggle-btn:hover {
  color: #ffffff;
}
.conversion-toggle-btn.active {
  background: #ffffff;
  color: var(--text-main, #0f172a);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}
.dark-theme .conversion-toggle-btn.active {
  background: var(--primary, #0284c7);
  color: #ffffff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
}
.conversion-badge-save {
  background: #10b981;
  color: #ffffff;
  font-size: 0.65rem;
  padding: 0.12rem 0.4rem;
  border-radius: 9999px;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.btn-conversion-close {
  position: absolute;
  top: 0.85rem;
  right: 0.85rem;
  background: transparent;
  border: none;
  font-size: 1.15rem;
  color: var(--text-muted, #94a3b8);
  cursor: pointer;
  padding: 0.35rem;
  line-height: 1;
  border-radius: 6px;
  transition: all 0.2s ease;
}
.btn-conversion-close:hover {
  color: var(--text-main, #0f172a);
  background: rgba(15, 23, 42, 0.05);
}
.plan-name {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text-main, #0f172a);
  margin-bottom: 0.15rem;
}
.plan-desc {
  font-size: 0.76rem;
  color: var(--text-muted, #64748b);
  line-height: 1.35;
}
.plan-price-row {
  display: flex;
  align-items: baseline;
  gap: 0.2rem;
  margin-bottom: 0.35rem;
}
.plan-price {
  font-size: 1.35rem;
  font-weight: 900;
  color: var(--text-main, #0f172a);
}
.plan-period {
  font-size: 0.78rem;
  color: var(--text-muted, #64748b);
}
.plan-limit-badge {
  background: rgba(15, 23, 42, 0.06);
  padding: 0.2rem 0.5rem;
  border-radius: 6px;
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--text-main, #0f172a);
  margin-bottom: 0;
}
.dark-theme .plan-limit-badge {
  background: rgba(255, 255, 255, 0.08);
}
.plan-feature-list {
  list-style: none;
  padding: 0;
  margin: 0 0 0.45rem;
  display: flex;
  flex-direction: column;
  gap: 0.22rem;
  font-size: 0.72rem;
  color: var(--text-sub, #475569);
  flex-grow: 1;
}
.dark-theme .plan-feature-list {
  color: #cbd5e1;
}
.plan-feature-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.35rem;
  line-height: 1.25;
}
.chk-icon {
  color: #10b981;
  font-weight: 800;
}
.radio-circle {
  width: 13px;
  height: 13px;
  border-radius: 50%;
  border: 2px solid currentColor;
  display: inline-block;
}
.plan-credit-box {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  margin-bottom: 0.35rem;
}
.plan-bonus-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.18rem 0.45rem;
  border-radius: 5px;
  background: #fef3c7;
  border: 1px solid #fde68a;
  color: #92400e;
  font-size: 0.72rem;
  font-weight: 700;
}
.dark-theme .plan-bonus-pill {
  background: rgba(245, 158, 11, 0.15);
  border-color: rgba(245, 158, 11, 0.3);
  color: #fbbf24;
}
.plan-total-credit-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.18rem 0.45rem;
  border-radius: 5px;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  color: #166534;
  font-size: 0.72rem;
  font-weight: 700;
}
.dark-theme .plan-total-credit-pill {
  background: rgba(34, 197, 94, 0.15);
  border-color: rgba(34, 197, 94, 0.3);
  color: #4ade80;
}
.conversion-plan-change-notice {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  color: #1e40af;
  border-radius: 8px;
  padding: 0.45rem 0.75rem;
  font-size: 0.73rem;
  line-height: 1.35;
  margin-bottom: 0.35rem;
}
.conversion-footer {
  padding: 0.5rem 1.5rem 0.6rem;
  border-top: 1px solid var(--border-subtle, #f1f5f9);
  background: var(--bg-surface-secondary, #f8fafc);
  border-bottom-left-radius: var(--radius-lg, 18px);
  border-bottom-right-radius: var(--radius-lg, 18px);
}
.dark-theme .conversion-footer {
  background: #090d16;
  border-color: #1e293b;
}
.conversion-legal-box {
  margin-bottom: 0.4rem;
}
.conversion-legal-label {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  cursor: pointer;
  user-select: none;
}
.conversion-legal-chk {
  margin-top: 0.15rem;
  width: 15px;
  height: 15px;
  cursor: pointer;
  accent-color: var(--text-main, #0f172a);
}
.conversion-legal-text {
  font-size: 0.72rem;
  color: var(--text-muted, #64748b);
  line-height: 1.35;
}
.conversion-actions {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-bottom: 0.35rem;
}
.btn-checkout-primary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.55rem 1.25rem;
  background: var(--text-main, #0f172a);
  color: #ffffff;
  border: none;
  border-radius: 10px;
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}
.btn-checkout-primary:hover:not(:disabled) {
  background: var(--text-muted, #334155);
  transform: translateY(-1px);
}
.btn-checkout-primary:disabled {
  background: #94a3b8;
  cursor: not-allowed;
  box-shadow: none;
  opacity: 0.6;
}
.btn-continue-manual {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 0.38rem 1rem;
  background: transparent;
  color: var(--text-muted, #64748b);
  border: 1px solid var(--border-subtle, #cbd5e1);
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}
.btn-continue-manual:hover {
  background: rgba(15, 23, 42, 0.04);
  color: var(--text-main, #0f172a);
}
.conversion-free-guarantee {
  text-align: center;
  font-size: 0.7rem;
  color: var(--text-sub, #94a3b8);
  line-height: 1.3;
}
/* 간소화된 결제 모달: 카드 1줄 크레딧 + 공통 기능 1줄 + 결제 전 확인 3항목 */
.plan-credit-line {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-main, #0f172a);
  margin-top: 0.15rem;
}
.plan-credit-sub {
  font-size: 0.72rem;
  color: var(--text-muted, #64748b);
  margin-bottom: 0.6rem;
}
.conversion-terms-title {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-main, #0f172a);
  margin-bottom: 0.25rem;
}
.conversion-terms {
  margin: 0 0 0.45rem;
  padding-left: 1.1rem;
  font-size: 0.76rem;
  line-height: 1.5;
  color: var(--text-muted, #475569);
}
.conversion-terms a {
  color: inherit;
  text-decoration: underline;
}
/* 자동 갱신·청약철회 제한 — 접힘 밖 상시 노출 (전자상거래법 제17조 제6항) */
.conversion-terms-key {
  font-size: 0.82rem;
  color: var(--text-main, #0f172a);
}
.dark-theme .conversion-terms.conversion-terms-key {
  color: #e2e8f0;
}
.dark-theme .plan-credit-line,
.dark-theme .conversion-terms-title {
  color: #e2e8f0;
}
.dark-theme .conversion-terms,
.dark-theme .plan-credit-sub {
  color: #94a3b8;
}

/* 요금제 비교표(B) — 웹 결제 모달·토스 결제 시트 공용 (src/plan-compare.js)
   360px: 첫 열 고정 + 3개 플랜 열 균등, 가로 스크롤 없음, 글자 ≥ 13px, 버튼 ≥ 44px */
.conversion-plans-compare {
  padding: 0.65rem 1.5rem 0.6rem;
}
.plan-cmp {
  width: 100%;
  overflow-x: auto;
}
.plan-cmp-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  table-layout: fixed;
  font-size: 14px;
  line-height: 1.35;
  color: #0f172a;
}
.plan-cmp-table th,
.plan-cmp-table td {
  padding: 10px 6px;
  border-bottom: 1px solid #f1f5f9;
  text-align: center;
  vertical-align: middle;
  font-size: 14px;
  overflow-wrap: anywhere;
}
.plan-cmp-table .plan-cmp-feature {
  position: sticky;
  left: 0;
  z-index: 1;
  width: 30%;
  text-align: left;
  font-weight: 500;
  color: #475569;
  background: var(--bg-surface, #ffffff);
}
.plan-cmp-col {
  font-weight: 700;
}
.plan-cmp-name,
.plan-cmp-tag {
  display: block;
}
.plan-cmp-tag {
  margin-top: 2px;
  font-size: 13px;
  font-weight: 600;
  color: #475569;
}
.plan-cmp-table .is-highlight {
  background: rgba(15, 23, 42, 0.045);
}
.plan-cmp-row-price .plan-cmp-cell {
  font-size: 15px;
  font-weight: 700;
}
.plan-cmp-row-ai .plan-cmp-cell,
.plan-cmp-cell.is-small {
  font-size: 13px;
  font-weight: 500;
  color: #64748b;
}
.plan-cmp-check {
  font-weight: 700;
}
.plan-cmp-table .is-disabled {
  color: #94a3b8;
}
.plan-cmp-actions th,
.plan-cmp-actions td {
  border-bottom: 0;
}
.plan-cmp-btn {
  width: 100%;
  min-height: 44px;
  padding: 6px 4px;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  background: #ffffff;
  color: #0f172a;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
}
.plan-cmp-btn:hover:not(:disabled) {
  border-color: #0f172a;
}
.plan-cmp-btn.is-primary {
  background: #0f172a;
  border-color: #0f172a;
  color: #ffffff;
}
.plan-cmp-btn:disabled {
  background: #f1f5f9;
  border-color: #e2e8f0;
  color: #94a3b8;
  cursor: not-allowed;
}
.plan-cmp-btn:focus-visible {
  outline: 2px solid #0f172a;
  outline-offset: 2px;
}
.plan-cmp-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
@media (max-width: 480px) {
  .conversion-plans-compare {
    padding: 0.5rem 0.75rem 0.5rem;
  }
  .plan-cmp-table th,
  .plan-cmp-table td {
    padding: 9px 3px;
    font-size: 13px;
  }
  .plan-cmp-table .plan-cmp-feature {
    width: 31%;
    padding-left: 2px;
  }
  .plan-cmp-row-price .plan-cmp-cell {
    font-size: 14px;
  }
  .plan-cmp-btn {
    font-size: 13px;
    padding: 6px 2px;
  }
}
.dark-theme .plan-cmp-table {
  color: #e2e8f0;
}
.dark-theme .plan-cmp-table th,
.dark-theme .plan-cmp-table td {
  border-bottom-color: #1e293b;
}
.dark-theme .plan-cmp-table .plan-cmp-feature {
  background: #0f172a;
  color: #94a3b8;
}
.dark-theme .plan-cmp-tag {
  color: #cbd5e1;
}
.dark-theme .plan-cmp-table .is-highlight {
  background: rgba(255, 255, 255, 0.06);
}
.dark-theme .plan-cmp-table .is-disabled {
  color: #64748b;
}
.dark-theme .plan-cmp-btn {
  background: transparent;
  border-color: #334155;
  color: #e2e8f0;
}
.dark-theme .plan-cmp-btn:hover:not(:disabled) {
  border-color: #e2e8f0;
}
.dark-theme .plan-cmp-btn.is-primary {
  background: #f8fafc;
  border-color: #f8fafc;
  color: #0f172a;
}
.dark-theme .plan-cmp-btn:disabled {
  background: #1e293b;
  border-color: #1e293b;
  color: #64748b;
}
.dark-theme .plan-cmp-btn:focus-visible {
  outline-color: #e2e8f0;
}

/* 이용조건 상세 (기본 접힘) — 약관 고지 + 보관함 용량(플래그 on) */
.conversion-terms-details {
  margin-bottom: 0.35rem;
}
.conversion-terms-details > summary {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  min-height: 44px;
  list-style: none;
  cursor: pointer;
  font-size: 0.85rem;
  margin-bottom: 0;
}
.conversion-terms-details > summary::-webkit-details-marker {
  display: none;
}
.conversion-terms-details > summary::after {
  content: '▾';
  transition: transform 0.15s ease;
}
.conversion-terms-details[open] > summary::after {
  transform: rotate(180deg);
}
.conversion-terms-details > summary:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 2px;
  border-radius: 4px;
}
.mypage-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.mypage-modal-card {
  background: var(--bg-surface, #ffffff);
  border: 1px solid var(--border-subtle, #e2e8f0);
  border-radius: var(--radius-lg, 20px);
  width: 100%;
  max-width: 480px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
  position: relative;
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}
.dark-theme .mypage-modal-card {
  background: #0f172a;
  border-color: #334155;
}
.mypage-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.mypage-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-main, #0f172a);
}
.btn-mypage-close {
  background: transparent;
  border: none;
  font-size: 1.2rem;
  color: var(--text-muted, #94a3b8);
  cursor: pointer;
  padding: 0.25rem;
}
.mypage-footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  padding-top: 0.5rem;
}
.mypage-policy-note {
  font-size: 0.7rem;
  color: var(--text-sub, #94a3b8);
  text-align: center;
  line-height: 1.35;
}
/* 계정 삭제 (MyPageModal bindAccountDelete) */
.btn-mypage-delete-link {
  background: transparent;
  border: none;
  color: var(--text-sub, #94a3b8);
  font-size: 0.75rem;
  text-decoration: underline;
  cursor: pointer;
  padding: 0.5rem;
  min-height: 36px;
}
.mypage-delete-panel {
  margin-top: 0.75rem;
  padding: 1rem;
  border: 1px solid #fecaca;
  border-radius: 12px;
  background: #fef2f2;
  color: #0f172a;
}
.mypage-delete-panel[hidden] { display: none; }
.mypage-delete-title { margin: 0 0 0.5rem; font-size: 0.95rem; font-weight: 700; color: #b91c1c; }
.mypage-delete-desc { margin: 0 0 0.75rem; font-size: 0.8rem; line-height: 1.55; color: #334155; word-break: keep-all; }
.mypage-delete-check { display: flex; gap: 0.5rem; align-items: flex-start; font-size: 0.8rem; line-height: 1.45; cursor: pointer; }
.mypage-delete-check input { margin-top: 0.15rem; width: 16px; height: 16px; flex: none; }
.mypage-delete-error { margin: 0.6rem 0 0; font-size: 0.78rem; font-weight: 600; color: #b91c1c; line-height: 1.45; }
.mypage-delete-error[hidden] { display: none; }
.mypage-delete-actions { display: flex; gap: 0.5rem; justify-content: flex-end; margin-top: 0.85rem; }
.btn-mypage-delete-cancel, .btn-mypage-delete-confirm {
  min-height: 40px;
  padding: 0 1rem;
  border-radius: 9px;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
}
.btn-mypage-delete-cancel { background: #ffffff; border: 1px solid #e2e8f0; color: #334155; }
.btn-mypage-delete-confirm { background: #dc2626; border: none; color: #ffffff; }
.btn-mypage-delete-confirm:disabled { opacity: 0.42; cursor: not-allowed; }
.dark-theme .mypage-delete-panel { background: rgba(220, 38, 38, 0.12); border-color: rgba(248, 113, 113, 0.4); color: #f1f5f9; }
.dark-theme .mypage-delete-title { color: #fca5a5; }
.dark-theme .mypage-delete-desc { color: #cbd5e1; }
.dark-theme .mypage-delete-error { color: #fca5a5; }
.dark-theme .btn-mypage-delete-cancel { background: transparent; border-color: rgba(255, 255, 255, 0.2); color: #e2e8f0; }
/* 마이페이지 대시보드형(A): 브랜드 잉크 단색 + 회색 단계, 본문 ≥13px(모바일 14px), 터치 ≥44px */
.mypage2 { color: #0f172a; }
.mypage2 [hidden] { display: none !important; }
.mypage2-head { display: flex; align-items: center; gap: 0.85rem; }
.mypage2-avatar { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; flex: none; background: #0f172a; }
.mypage2-head-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.mypage2-name { font-size: 1.05rem; font-weight: 700; color: #0f172a; overflow-wrap: anywhere; }
.mypage2-planline { font-size: 0.875rem; font-weight: 600; color: #334155; }
.mypage2-email { font-size: 0.8125rem; color: #64748b; overflow-wrap: anywhere; }
.mypage2-notice {
  margin: 0; padding: 0.6rem 0.75rem; border-radius: 10px;
  border: 1px solid #e2e8f0; background: #f8fafc;
  font-size: 0.875rem; font-weight: 600; line-height: 1.45; color: #0f172a;
}
.mypage2-banner {
  display: flex; align-items: center; justify-content: space-between; gap: 0.75rem;
  padding: 0.6rem 0.75rem; border-radius: 10px; border: 1.5px solid #0f172a;
  font-size: 0.875rem; font-weight: 600; line-height: 1.45; color: #0f172a;
}
.mypage2-banner-btn {
  flex: none; min-height: 44px; padding: 0 0.9rem; border-radius: 10px;
  border: 1px solid #0f172a; background: #ffffff; color: #0f172a;
  font-size: 0.875rem; font-weight: 700; cursor: pointer;
}
.mypage2-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 0.6rem; }
.mypage2-cards.is-single { grid-template-columns: 1fr; }
.mypage2-card, .mypage2-recent {
  display: flex; flex-direction: column; gap: 0.5rem;
  padding: 0.85rem 0.9rem; border: 1px solid #e2e8f0; border-radius: 14px; background: #ffffff;
}
.mypage2-card-label { font-size: 0.8125rem; font-weight: 600; color: #64748b; }
.mypage2-big { font-size: 1.45rem; font-weight: 800; letter-spacing: -0.02em; color: #0f172a; line-height: 1.15; }
.mypage2-big small { font-size: 0.8125rem; font-weight: 500; color: #64748b; letter-spacing: 0; }
.mypage2-bar { height: 8px; border-radius: 9px; background: #e2e8f0; overflow: hidden; }
.mypage2-bar i { display: block; height: 100%; background: #0f172a; border-radius: 9px; }
.mypage2-card.is-warn { border: 1.5px solid #0f172a; }
button.mypage2-card.is-locked { font: inherit; text-align: left; cursor: pointer; color: inherit; }
button.mypage2-card.is-locked:hover { border-color: #0f172a; }
.mypage2-upgrade-btn {
  display: flex; align-items: center; justify-content: center; width: 100%; min-height: 52px; padding: 0.75rem 1rem;
  border: none; border-radius: 12px; background: #0f172a; color: #ffffff;
  font-size: 1rem; font-weight: 700; line-height: 1.35; cursor: pointer;
}
.mypage2-upgrade-btn:hover { background: #1e293b; }
.mypage2-upgrade-btn:focus-visible, button.mypage2-card.is-locked:focus-visible { outline: 2px solid #0f172a; outline-offset: 2px; }
.mypage2-locked { display: flex; align-items: center; gap: 0.4rem; font-size: 0.875rem; font-weight: 600; color: #475569; line-height: 1.4; }
.mypage2-lock-icon { font-size: 0.95rem; }
.mypage2-tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; }
.mypage2-tile { aspect-ratio: 1; border-radius: 8px; background: #e2e8f0; overflow: hidden; }
.mypage2-tile img { width: 100%; height: 100%; object-fit: cover; display: block; }
.mypage2-muted { margin: 0; font-size: 0.875rem; color: #64748b; }
.mypage2-btn-secondary {
  min-height: 44px; border-radius: 10px; border: 1px solid #cbd5e1; background: #ffffff;
  color: #0f172a; font-size: 0.9rem; font-weight: 700; cursor: pointer;
}
.mypage2-btn-secondary:hover { border-color: #0f172a; }
.mypage2-list { list-style: none; margin: 0; padding: 0; border: 1px solid #e2e8f0; border-radius: 14px; overflow: hidden; }
.mypage2-list li + li { border-top: 1px solid #f1f5f9; }
.mypage2-row {
  display: flex; align-items: center; justify-content: space-between; width: 100%;
  min-height: 48px; padding: 0 1rem; border: none; background: transparent;
  font-size: 0.9375rem; font-weight: 600; color: #0f172a; text-align: left; cursor: pointer;
}
.mypage2-row:hover { background: #f8fafc; }
.mypage2-row:focus-visible, .mypage2-btn-secondary:focus-visible, .mypage2-banner-btn:focus-visible { outline: 2px solid #0f172a; outline-offset: -2px; }
.mypage2-row.is-logout { color: #475569; }
.mypage2-chev { color: #94a3b8; font-size: 1.15rem; }
.mypage2 .btn-mypage-delete-link { min-height: 44px; font-size: 0.8125rem; }
.mypage2 .btn-mypage-close { min-width: 44px; min-height: 44px; }
.mypage2 .mypage-policy-note { font-size: 0.75rem; }
.mypage-modal-card.mypage2 { max-height: calc(100dvh - 2rem); overflow-y: auto; gap: 1rem; }

@media (max-width: 600px) {
  .mypage-modal-card.mypage2 { padding: 1.25rem 1rem; }
  .mypage2-planline, .mypage2-email, .mypage2-card-label, .mypage2-locked,
  .mypage2-muted, .mypage2-notice, .mypage2-banner, .mypage2-banner-btn { font-size: 0.875rem; }
  .mypage2-big { font-size: 1.3rem; }
  .mypage2-big small { font-size: 0.875rem; }
  .mypage2-banner { flex-direction: column; align-items: stretch; }
}

.dark-theme .mypage2 { color: #f1f5f9; }
.dark-theme .mypage2-avatar { background: #ffffff; }
.dark-theme .mypage2-name, .dark-theme .mypage2-big, .dark-theme .mypage2-row { color: #f1f5f9; }
.dark-theme .mypage2-planline { color: #cbd5e1; }
.dark-theme .mypage2-email, .dark-theme .mypage2-card-label, .dark-theme .mypage2-big small,
.dark-theme .mypage2-muted, .dark-theme .mypage2-locked { color: #94a3b8; }
.dark-theme .mypage2-card, .dark-theme .mypage2-recent, .dark-theme .mypage2-notice { background: #1e293b; border-color: #334155; color: #f1f5f9; }
.dark-theme .mypage2-bar, .dark-theme .mypage2-tile { background: #334155; }
.dark-theme .mypage2-bar i { background: #f1f5f9; }
.dark-theme .mypage2-card.is-warn, .dark-theme .mypage2-banner { border-color: #f1f5f9; color: #f1f5f9; }
.dark-theme .mypage2-banner-btn, .dark-theme .mypage2-btn-secondary { background: transparent; border-color: rgba(255, 255, 255, 0.35); color: #f1f5f9; }
.dark-theme .mypage2-list { border-color: #334155; }
.dark-theme .mypage2-upgrade-btn { background: #ffffff; color: #0f172a; }
.dark-theme .mypage2-upgrade-btn:hover { background: #e2e8f0; }
.dark-theme button.mypage2-card.is-locked:hover { border-color: #f1f5f9; }
.dark-theme .mypage2-upgrade-btn:focus-visible, .dark-theme button.mypage2-card.is-locked:focus-visible { outline-color: #f1f5f9; }
.dark-theme .mypage2-list li + li { border-top-color: #334155; }
.dark-theme .mypage2-row:hover { background: #1e293b; }
.dark-theme .mypage2-row.is-logout { color: #cbd5e1; }
.dark-theme .mypage2-row:focus-visible, .dark-theme .mypage2-btn-secondary:focus-visible, .dark-theme .mypage2-banner-btn:focus-visible { outline-color: #f1f5f9; }
.subscription-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.subscription-modal-card {
  background: var(--bg-surface, #ffffff);
  border: 1px solid var(--border-subtle, #e2e8f0);
  border-radius: var(--radius-lg, 20px);
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.3);
  position: relative;
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}
.dark-theme .subscription-modal-card {
  background: #0f172a;
  border-color: #334155;
  color: #f8fafc;
}
.subscription-modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}
.sub-header-title-box {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.sub-header-badge {
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--text-muted, #64748b);
  letter-spacing: 0.05em;
  font-family: ui-monospace, monospace;
  text-transform: uppercase;
}
.sub-modal-title {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text-main, #0f172a);
  margin: 0;
}
.sub-modal-subtitle {
  font-size: 0.82rem;
  color: var(--text-muted, #64748b);
  margin: 0;
}
.btn-sub-close {
  background: transparent;
  border: none;
  font-size: 1.25rem;
  color: var(--text-muted, #94a3b8);
  cursor: pointer;
  padding: 0.25rem;
  border-radius: 6px;
  line-height: 1;
}
.btn-sub-close:hover {
  color: var(--text-main, #0f172a);
}
.sub-modal-body {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}
.sub-summary-card {
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.dark-theme .sub-summary-card {
  background: #1e293b;
  border-color: #334155;
}
.sub-summary-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(226, 232, 240, 0.8);
  padding-bottom: 0.75rem;
}
.sub-plan-info {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.sub-plan-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-main, #0f172a);
}
.sub-price-val {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-main, #0f172a);
}
.sub-badge {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.2rem 0.55rem;
  border-radius: 9999px;
}
.sub-badge-active {
  background: #dcfce7;
  color: #166534;
}
.sub-badge-warning {
  background: #fef3c7;
  color: #92400e;
}
.sub-badge-free {
  background: #f1f5f9;
  color: #475569;
}
.sub-details-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem 1rem;
}
.sub-detail-item {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}
.detail-label {
  font-size: 0.75rem;
  color: var(--text-muted, #64748b);
}
.detail-value {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-main, #0f172a);
}
.text-green {
  color: #16a34a !important;
}
.text-muted {
  color: #64748b !important;
}
.sub-status-notice {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  color: #1e40af;
  border-radius: 8px;
  padding: 0.65rem 0.85rem;
  font-size: 0.78rem;
  line-height: 1.45;
}
.sub-action-buttons-group {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}
.btn-sub-feature {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.9rem 1rem;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  cursor: pointer;
  text-align: left;
  transition: all 0.18s ease;
}
.dark-theme .btn-sub-feature {
  background: #1e293b;
  border-color: #334155;
}
.btn-sub-feature:hover {
  border-color: #3b82f6;
  background: #f8fafc;
  transform: translateY(-1px);
}
.sub-feature-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: var(--bg-surface-secondary, #f1f5f9);
  color: var(--text-main, #0f172a);
  flex-shrink: 0;
}
.dark-theme .sub-feature-icon {
  background: #334155;
  color: #f8fafc;
}
.sub-feature-text {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}
.sub-feature-text strong {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-main, #0f172a);
}
.sub-feature-text span {
  font-size: 0.75rem;
  color: var(--text-muted, #64748b);
}
.sub-invoices-preview {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 0.9rem 1rem;
}
.dark-theme .sub-invoices-preview {
  background: #1e293b;
  border-color: #334155;
}
.sub-invoices-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.6rem;
}
.sub-invoices-header h4 {
  font-size: 0.88rem;
  font-weight: 700;
  margin: 0;
}
.btn-invoices-close {
  background: transparent;
  border: none;
  cursor: pointer;
  color: #94a3b8;
  font-size: 1rem;
}
.sub-invoice-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #ffffff;
  padding: 0.65rem 0.85rem;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  margin-bottom: 0.4rem;
}
.dark-theme .sub-invoice-item {
  background: #0f172a;
  border-color: #334155;
}
.invoice-date-col {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}
.invoice-date-col strong {
  font-size: 0.82rem;
}
.invoice-date-col span {
  font-size: 0.72rem;
  color: #64748b;
}
.invoice-amt-col {
  text-align: right;
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}
.invoice-amt-col strong {
  font-size: 0.9rem;
  color: #0f172a;
}
.invoice-status-paid {
  font-size: 0.7rem;
  font-weight: 700;
  color: #16a34a;
}
.invoice-note {
  font-size: 0.7rem;
  color: #64748b;
  margin: 0.4rem 0 0;
}
.sub-danger-zone {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 1rem;
  background: #fff1f2;
  border: 1px solid #fecdd3;
  border-radius: 12px;
}
.dark-theme .sub-danger-zone {
  background: rgba(225, 29, 72, 0.1);
  border-color: rgba(225, 29, 72, 0.3);
}
.sub-danger-info {
  flex: 1 1 auto;
  min-width: 0;
}
@media (max-width: 640px) {
  .sub-danger-zone {
    flex-direction: column;
    align-items: stretch;
  }
  .sub-danger-zone .btn-sub-action {
    width: 100%;
  }
}
.sub-danger-info strong {
  display: block;
  font-size: 0.82rem;
  color: #9f1239;
}
.sub-danger-info p {
  font-size: 0.72rem;
  color: #be123c;
  margin: 0.15rem 0 0;
}
.btn-sub-action {
  padding: 0.55rem 0.9rem;
  border-radius: 8px;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
}
.btn-sub-cancel {
  background: #ffffff;
  border: 1px solid #f43f5e;
  color: #e11d48;
}
.btn-sub-cancel:hover {
  background: #e11d48;
  color: #ffffff;
}
.btn-sub-refund {
  background: #f43f5e;
  border: 1px solid #e11d48;
  color: #ffffff;
  font-weight: 800;
}
.btn-sub-refund:hover {
  background: #be123c;
  border-color: #9f1239;
}
.btn-sub-resume {
  background: var(--text-main, #0f172a);
  border: 1px solid var(--text-main, #0f172a);
  color: #ffffff;
}
.btn-sub-resume:hover {
  background: var(--text-muted, #334155);
}
.btn-sub-disabled {
  background: #e2e8f0;
  border: 1px solid #cbd5e1;
  color: #94a3b8;
  cursor: not-allowed;
}
.subscription-modal-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid #e2e8f0;
  padding-top: 1rem;
}
.dark-theme .subscription-modal-footer {
  border-color: #334155;
}
.btn-sub-back {
  background: transparent;
  border: 1px solid #cbd5e1;
  color: #475569;
  border-radius: 8px;
  padding: 0.55rem 0.9rem;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
}
.btn-sub-back:hover {
  background: #f1f5f9;
}
.btn-sub-close-footer {
  background: #0f172a;
  border: none;
  color: #ffffff;
  border-radius: 8px;
  padding: 0.55rem 1.1rem;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
}
.btn-sub-close-footer:hover {
  background: #1e293b;
}
.ai-processing-modal-overlay,
.partial-consent-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.72);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  padding: 1rem;
}
.ai-processing-card,
.partial-consent-card {
  background: #ffffff;
  border-radius: 20px;
  width: 100%;
  max-width: 520px;
  box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.3);
  padding: 2rem 2.2rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  animation: modalScaleIn 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  border: 1px solid rgba(226, 232, 240, 0.8);
  word-break: keep-all;
  overflow-wrap: break-word;
}
@media (max-width: 768px) {
.ai-processing-card,
  .partial-consent-card {
    padding: 0.95rem 0.85rem !important;
    max-width: 95% !important;
    max-height: 92vh !important;
    overflow-y: auto !important;
    gap: 0.65rem !important;
    border-radius: 14px !important;
  }
.ai-spinner-wrap {
    width: 36px !important;
    height: 36px !important;
    margin-bottom: 0.1rem !important;
  }
.ai-spinner-icon {
    font-size: 1.15rem !important;
  }
.ai-pulse-ring {
    border-width: 2.5px !important;
  }
.ai-proc-title {
    font-size: 1.05rem !important;
  }
.ai-proc-subtitle {
    font-size: 0.78rem !important;
    line-height: 1.35 !important;
  }
.ai-proc-steps {
    padding: 0.5rem 0.75rem !important;
    gap: 0.35rem !important;
    font-size: 0.75rem !important;
  }
.ai-proc-promo-card {
    padding: 0.65rem 0.8rem !important;
    gap: 0.35rem !important;
  }
.ai-proc-promo-card .promo-list {
    display: none !important; /* 모바일에서 글머리 목록 숨겨서 버튼이 화면에 쏙 들어오게 압축 */
  }
.promo-heading {
    font-size: 0.84rem !important;
  }
.btn-proc-upgrade {
    padding: 0.5rem 0.85rem !important;
    font-size: 0.82rem !important;
    margin-top: 0.2rem !important;
  }
.btn-partial-proceed,
  .btn-partial-upgrade,
  .btn-partial-cancel {
    padding: 0.55rem 0.85rem !important;
    font-size: 0.82rem !important;
  }
}
.ai-proc-title,
.ai-proc-subtitle,
.ai-proc-step,
.partial-consent-title,
.partial-consent-desc,
.notice-title,
.notice-text,
.notice-subtext,
.consent-label-text,
.promo-heading,
.promo-list li {
  word-break: keep-all !important;
  overflow-wrap: break-word !important;
}
.dark-theme .ai-processing-card,
.dark-theme .partial-consent-card {
  background: #1e293b;
  border-color: #334155;
  color: #f8fafc;
}
@keyframes modalScaleIn {
  from { opacity: 0; transform: scale(0.95) translateY(10px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}
.ai-processing-header {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}
.ai-spinner-wrap {
  position: relative;
  width: 58px;
  height: 58px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.25rem;
}
.ai-pulse-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 3px solid var(--v2-ink, #17181b);
  border-top-color: transparent;
  animation: spinRing 0.9s linear infinite;
}
@keyframes spinRing {
  to { transform: rotate(360deg); }
}
.ai-spinner-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--v2-ink, #17181b);
}
.ai-spinner-icon svg {
  width: 20px;
  height: 20px;
}
.ai-proc-title {
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -.01em;
  color: var(--v2-ink, #17181b);
}
.dark-theme .ai-proc-title {
  color: #f8fafc;
}
.ai-proc-subtitle {
  font-size: 0.85rem;
  color: var(--v2-ink-3, #8a8c94);
  line-height: 1.45;
  margin: 0;
}
.ai-proc-progress-bar-wrap {
  width: 100%;
  height: 4px;
  background: var(--v2-line, #e4e4e8);
  border-radius: 9999px;
  overflow: hidden;
  position: relative;
}
.ai-proc-progress-bar-fill {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 40%;
  background: var(--v2-ink, #17181b);
  border-radius: 9999px;
  animation: progressPulse 1.8s ease-in-out infinite;
}
.ai-proc-progress-bar-fill.determinate {
  animation: none;
  left: 0;
  transition: width 0.3s ease;
}
.ai-proc-progress-count {
  margin: 6px 0 0;
  text-align: center;
  font-size: 13px;
  font-weight: 600;
  color: #64748b;
  min-height: 16px;
}
@keyframes progressPulse {
  0% { left: 0%; width: 25%; }
  50% { left: 40%; width: 55%; }
  100% { left: 100%; width: 25%; }
}
.ai-proc-steps {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  background: var(--v2-sunken, #f1f1f3);
  padding: 0.85rem 1.1rem;
  border-radius: 12px;
  font-size: 0.82rem;
  color: var(--v2-ink-2, #4f5159);
  border: 1px solid var(--v2-line, #e4e4e8);
}
.dark-theme .ai-proc-steps {
  background: #0f172a;
  border-color: #1e293b;
  color: #94a3b8;
}
.ai-proc-step {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}
.step-check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--v2-ink, #17181b);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 800;
  flex-shrink: 0;
}
.ai-proc-promo-card {
  background: var(--v2-sunken, #f1f1f3);
  border: 1px solid var(--v2-line, #e4e4e8);
  border-radius: 14px;
  padding: 1rem 1.15rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.dark-theme .ai-proc-promo-card {
  background: #0f172a;
  border-color: #1e293b;
}
.promo-badge-row {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.promo-badge {
  font-size: 0.68rem;
  font-weight: 700;
  background: var(--v2-ink, #17181b);
  color: #ffffff;
  padding: 2px 7px;
  border-radius: 9999px;
  letter-spacing: .02em;
}
.promo-tag {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--v2-ink-3, #8a8c94);
}
.dark-theme .promo-tag {
  color: #94a3b8;
}
.promo-heading {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--v2-ink, #17181b);
  margin: 0;
}
.dark-theme .promo-heading {
  color: #f8fafc;
}
.promo-list {
  margin: 0;
  padding-left: 1.1rem;
  font-size: 0.8rem;
  color: var(--v2-ink-2, #4f5159);
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.dark-theme .promo-list {
  color: #94a3b8;
}
.btn-proc-upgrade {
  margin-top: 0.25rem;
  background: var(--v2-ink, #17181b);
  color: #ffffff;
  border: none;
  border-radius: 10px;
  padding: 0.65rem 1rem;
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.btn-proc-upgrade:hover {
  background: var(--v2-ink-2, #4f5159);
  transform: translateY(-1px);
}
.partial-consent-actions {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin-top: 0.4rem;
}
.btn-partial-proceed {
  background: #0284c7;
  color: #ffffff;
  border: none;
  border-radius: 10px;
  padding: 0.75rem 1rem;
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
  opacity: 0.4;
  cursor: not-allowed;
}
.btn-partial-proceed.enabled {
  opacity: 1;
  cursor: pointer;
}
.btn-partial-proceed.enabled:hover {
  background: #0369a1;
}
.btn-partial-cancel {
  background: transparent;
  color: #64748b;
  border: none;
  padding: 0.5rem;
  font-size: 0.8rem;
  cursor: pointer;
  text-decoration: underline;
}
.btn-partial-cancel:hover {
  color: #334155;
}
@keyframes aiButtonGlowPulse {
  0% {
    box-shadow: 0 0 0 0 rgba(124, 58, 237, 0.5), 0 4px 14px rgba(99, 102, 241, 0.4);
    transform: scale(1);
  }
  50% {
    box-shadow: 0 0 0 7px rgba(219, 39, 119, 0), 0 6px 22px rgba(219, 39, 119, 0.55);
    transform: scale(1.02);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(124, 58, 237, 0), 0 4px 14px rgba(99, 102, 241, 0.4);
    transform: scale(1);
  }
}
.auth-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
  padding: 1rem;
}
.auth-modal-overlay.active {
  opacity: 1;
  visibility: visible;
}
.auth-modal-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.auth-modal-dialog {
  position: relative;
  background: var(--bg-surface, #ffffff);
  border: 1px solid var(--border-subtle, #e2e8f0);
  border-radius: 18px;
  box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.25), 0 0 1px 1px rgba(0, 0, 0, 0.05);
  max-width: 440px;
  width: 100%;
  padding: 2rem 1.75rem 1.5rem;
  box-sizing: border-box;
  text-align: center;
  transform: translateY(16px) scale(0.97);
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 2;
}
.auth-modal-overlay.active .auth-modal-dialog {
  transform: translateY(0) scale(1);
}
.dark-theme .auth-modal-dialog {
  background: #1e293b;
  border-color: #334155;
  box-shadow: 0 24px 48px -12px rgba(0, 0, 0, 0.6);
}
.auth-modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: transparent;
  border: none;
  font-size: 1.15rem;
  color: var(--text-muted, #94a3b8);
  cursor: pointer;
  padding: 0.35rem;
  border-radius: 50%;
  transition: all 0.15s ease;
  line-height: 1;
}
.auth-modal-close:hover {
  color: var(--text-main, #0f172a);
  background: rgba(0, 0, 0, 0.05);
}
.dark-theme .auth-modal-close:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.1);
}
.auth-modal-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: rgba(37, 99, 235, 0.08);
  color: #2563eb;
  padding: 0.3rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.78rem;
  font-weight: 700;
  margin-bottom: 0.85rem;
}
.dark-theme .auth-modal-badge {
  background: rgba(59, 130, 246, 0.15);
  color: #60a5fa;
}
.auth-modal-title {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text-main, #0f172a);
  margin: 0 0 0.65rem 0;
  letter-spacing: -0.02em;
}
.dark-theme .auth-modal-title {
  color: #f8fafc;
}
.auth-modal-desc {
  font-size: 0.92rem;
  color: var(--text-muted, #64748b);
  line-height: 1.55;
  margin: 0 0 1.25rem 0;
}
.dark-theme .auth-modal-desc {
  color: #94a3b8;
}
.highlight-credit {
  color: #2563eb;
  font-weight: 800;
}
.dark-theme .highlight-credit {
  color: #38bdf8;
}
.auth-benefit-box {
  background: var(--bg-surface-secondary, #f8fafc);
  border: 1px solid var(--border-subtle, #e2e8f0);
  border-radius: 12px;
  padding: 0.85rem 1rem;
  margin-bottom: 1.5rem;
  text-align: left;
}
.dark-theme .auth-benefit-box {
  background: #0f172a;
  border-color: #334155;
}
.auth-benefit-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.benefit-icon {
  font-size: 1.35rem;
  flex-shrink: 0;
}
.benefit-text {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}
.benefit-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-main, #0f172a);
}
.dark-theme .benefit-title {
  color: #f1f5f9;
}
.benefit-sub {
  font-size: 0.76rem;
  color: var(--text-muted, #64748b);
}
.benefit-divider {
  height: 1px;
  background: var(--border-subtle, #e2e8f0);
  margin: 0.6rem 0;
}
.dark-theme .benefit-divider {
  background: #334155;
}
.auth-modal-actions {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
.btn-auth-primary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: #ffffff;
  border: none;
  border-radius: 12px;
  padding: 0.85rem 1.25rem;
  font-size: 0.98rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35);
}
.btn-auth-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(37, 99, 235, 0.45);
  background: linear-gradient(135deg, #1d4ed8, #1e40af);
}
.btn-auth-secondary {
  background: transparent;
  color: var(--text-muted, #64748b);
  border: none;
  font-size: 0.85rem;
  padding: 0.45rem;
  cursor: pointer;
  font-weight: 600;
  transition: color 0.15s ease;
}
.btn-auth-secondary:hover {
  color: var(--text-main, #0f172a);
}
.dark-theme .btn-auth-secondary:hover {
  color: #f1f5f9;
}

/* 모바일: 구독 요약 카드 (플랜명·배지·가격이 좁은 폭에서 세로로 깨지지 않도록) */
.sub-price-val,
.sub-badge {
  white-space: nowrap;
}
@media (max-width: 640px) {
  .sub-summary-top {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.4rem;
  }
  .sub-plan-info {
    flex-wrap: wrap;
  }
}

/* 관리자 "대시보드" 헤더 버튼: 좁은 화면에서는 아이콘만 */
.admin-dash-btn { gap: 6px; }
@media (max-width: 640px) {
  .admin-dash-btn { padding: 0.28rem; width: 30px; min-width: 30px; }
  .admin-dash-label { display: none; }
}

/* 보관함 진입 버튼 (#userProfileMenu 안, VAULT_ENABLED 빌드에서만 생성) */
.vault-nav-btn { position: relative; display: inline-flex; align-items: center; gap: 4px; height: 28px; padding: 0 10px; border: 1px solid rgba(15, 23, 42, 0.2); border-radius: 9999px; background: transparent; color: #0f172a; font-size: 13px; font-weight: 700; white-space: nowrap; cursor: pointer; }
/* 보이는 크기는 28px, 누르는 영역은 위아래로 넓힌다 */
.vault-nav-btn::after { content: ""; position: absolute; inset: -8px -2px; }
.vault-nav-btn:hover { border-color: #0f172a; }
.dark-theme .vault-nav-btn { color: #f8fafc; border-color: rgba(255, 255, 255, 0.3); }
.dark-theme .vault-nav-btn:hover { border-color: #f8fafc; }
@media (max-width: 640px) {
  .vault-nav-btn { width: 28px; padding: 0; justify-content: center; }
  .vault-nav-label { display: none; }
}

/* 앱 로그인 핸드오프 (src/services/app-login-handoff.js) — 시스템 브라우저에서만 표시 */
.app-handoff { position: fixed; inset: 0; z-index: 10000; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(15, 23, 42, 0.72); }
.app-handoff-card { width: 100%; max-width: 360px; padding: 28px 24px; border-radius: 16px; background: #ffffff; color: #0f172a; text-align: center; box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25); }
.app-handoff-logo { font-weight: 800; font-size: 1.25rem; letter-spacing: -0.02em; }
.app-handoff-title { margin: 12px 0 8px; font-size: 1.125rem; font-weight: 700; }
.app-handoff-text { margin: 0 0 20px; font-size: 0.9375rem; line-height: 1.6; color: rgba(15, 23, 42, 0.72); word-break: keep-all; overflow-wrap: anywhere; }
.app-handoff-btn { width: 100%; min-height: 48px; border: 0; border-radius: 10px; background: #0f172a; color: #ffffff; font-size: 1rem; font-weight: 700; cursor: pointer; }
.app-handoff-btn:disabled { opacity: 0.42; cursor: default; }

/* 마이페이지 위치정보 저장 토글 */
.mypage2-gps { margin: 0 0 0.75rem; border: 1px solid #e2e8f0; border-radius: 14px; overflow: hidden; }
.mypage2-gps-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; min-height: 48px; padding: 0 1rem; border: none; background: transparent; font-size: 0.9375rem; font-weight: 600; color: #0f172a; text-align: left; cursor: pointer; }
.mypage2-gps-row:focus-visible { outline: 2px solid #0f172a; outline-offset: -2px; }
.mypage2-gps-label { flex: 1; }
.mypage2-gps-track { flex: none; width: 40px; height: 24px; border-radius: 12px; background: rgba(15,23,42,.3); position: relative; transition: background .15s; }
.mypage2-gps-track::after { content: ''; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: transform .15s; }
.mypage2-gps-row[aria-checked="true"] .mypage2-gps-track { background: #0f172a; }
.mypage2-gps-row[aria-checked="true"] .mypage2-gps-track::after { transform: translateX(16px); }
.mypage2-gps-confirm { padding: 0 1rem 0.9rem; }
.mypage2-gps-confirm p { margin: 0 0 0.6rem; font-size: 0.875rem; color: #334155; }
.mypage2-gps-actions { display: flex; gap: 8px; }
.mypage2-gps-actions .mypage2-btn-secondary { flex: 1; min-height: 44px; }
.dark-theme .mypage2-gps { border-color: #334155; }
.dark-theme .mypage2-gps-row { color: #f1f5f9; }
.dark-theme .mypage2-gps-track { background: rgba(255,255,255,.3); }
.dark-theme .mypage2-gps-row[aria-checked="true"] .mypage2-gps-track { background: #f8fafc; }
.dark-theme .mypage2-gps-confirm p { color: #cbd5e1; }

/* 로그인 확인 중 안내 (지난 방문에 로그인했던 사용자) — src/index.js setupNavAuth */
.auth-container.is-auth-loading #btnGoogleLogin { display: none !important; }
.auth-loading-chip { display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 12px; border-radius: 999px; background: var(--bg-surface, #fff); border: 1px solid var(--border-subtle, #e2e8f0); color: var(--text-secondary, #475569); font-size: 13px; font-weight: 600; white-space: nowrap; }
.auth-loading-spinner { width: 14px; height: 14px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: authLoadingSpin .8s linear infinite; opacity: .7; }
@keyframes authLoadingSpin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .auth-loading-spinner { animation-duration: 2.4s; } }
@media (max-width: 520px) { .auth-loading-chip span:last-child { display: none; } .auth-loading-chip { padding: 0 10px; } }
.dark-theme .auth-loading-chip { background: #1e293b; border-color: #334155; color: #cbd5e1; }

/* src/view-v2/tutorial.css — spotlight tour overlay. Appended to
   document.body by src/services/tutorial-engine.js, NOT inside .v2-scope,
   so colors here are literal values from CLAUDE.md's design.palette
   (ink #0f172a, paper #ffffff, cell_72 rgba(15,23,42,.72)) rather than the
   --v2-* custom properties (those only exist inside .v2-scope). The 4
   view-v2 workspaces have no dark-mode styling, so this overlay doesn't
   need one either. */

.v2-tut-mask {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, .72);
  z-index: 10000;
  pointer-events: auto;
}

.v2-tut-tip {
  position: fixed;
  z-index: 10001;
  width: 280px;
  max-width: calc(100vw - 16px);
  background: #ffffff;
  color: #0f172a;
  border-radius: 12px;
  padding: 16px;
  box-shadow: 0 12px 32px rgba(15, 23, 42, .28);
  font-family: "Pretendard Variable", Pretendard, system-ui, sans-serif;
  transition: left .18s ease, top .18s ease;
}

.v2-tut-title {
  font-size: 14.5px;
  font-weight: 700;
  margin-bottom: 6px;
}

.v2-tut-body {
  font-size: 13px;
  line-height: 1.5;
  color: #475569;
  margin-bottom: 14px;
}

.v2-tut-dots {
  display: flex;
  gap: 5px;
  margin-bottom: 14px;
}

.v2-tut-dots span {
  width: 6px;
  height: 6px;
  border-radius: 99px;
  background: #e2e8f0;
}

.v2-tut-dots span.on {
  background: #0f172a;
  width: 16px;
}

.v2-tut-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.v2-tut-skip {
  background: none;
  border: none;
  color: #64748b;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  padding: 6px 4px;
}

.v2-tut-next {
  background: #0f172a;
  color: #ffffff;
  border: none;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  padding: 8px 16px;
}

.v2-help-btn {
  width: 28px;
  height: 28px;
  padding: 0;
  border-radius: 50%;
  font-weight: 700;
  justify-content: center;
  flex: none;
}

/* src/view-v2/view-v2.css — New UI variant A tokens, scoped to .v2-scope
   so nothing here can collide with src/styles.css's global --accent/--bg/etc. */
.v2-scope {
  --v2-bg: #f6f6f7; --v2-surface: #fff; --v2-sunken: #f1f1f3;
  --v2-line: #e4e4e8; --v2-line-2: #ededf0;
  --v2-ink: #17181b; --v2-ink-2: #4f5159; --v2-ink-3: #8a8c94; --v2-ink-4: #b4b6bc;
  --v2-accent: oklch(0.52 0.17 262); --v2-accent-ink: oklch(0.42 0.17 262);
  --v2-accent-soft: oklch(0.96 0.025 262); --v2-accent-line: oklch(0.86 0.06 262);
  --v2-ok: oklch(0.58 0.12 155); --v2-ok-soft: oklch(0.96 0.03 155);
  --v2-warn: oklch(0.66 0.14 65); --v2-warn-soft: oklch(0.97 0.03 75);
  --v2-r: 8px; --v2-r-lg: 12px;
  --v2-shadow: 0 1px 2px rgba(20,20,30,.05), 0 4px 16px rgba(20,20,30,.05);
  background: var(--v2-bg);
  color: var(--v2-ink);
  font-family: "Pretendard Variable", Pretendard, system-ui, sans-serif;
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
  box-sizing: border-box;
}
.v2-scope *, .v2-scope *::before, .v2-scope *::after { box-sizing: border-box; }
/* :where() keeps these reset rules scoped to .v2-scope without adding to
   their specificity — otherwise this compound selector (class+element)
   would outrank single-class component rules like .v2-btn-pri below and
   silently strip their background/padding. */
:where(.v2-scope) button, :where(.v2-scope) input, :where(.v2-scope) select, :where(.v2-scope) textarea { font: inherit; color: inherit; }
:where(.v2-scope) button { cursor: pointer; border: 0; background: none; padding: 0; }
:where(.v2-scope) input, :where(.v2-scope) textarea { outline: none; }
/* outline:none 은 마우스 클릭의 파란 테두리를 없애려는 것이지만 키보드 사용자의
   포커스 표시까지 지운다. 키보드 포커스(:focus-visible)에는 자체 표시를 돌려준다. */
:where(.v2-scope) input:focus-visible,
:where(.v2-scope) textarea:focus-visible,
:where(.v2-scope) select:focus-visible {
  outline: 2px solid var(--v2-accent);
  outline-offset: 1px;
}
.v2-num { font-variant-numeric: tabular-nums; }
.v2-eyebrow { font-family: ui-monospace, monospace; font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--v2-ink-3); }
.v2-muted { color: var(--v2-ink-3); }

/* buttons */
.v2-btn { height: 34px; padding: 0 13px; border-radius: 7px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; font-weight: 550; white-space: nowrap; transition: background .12s, border-color .12s; }
.v2-btn-pri { background: var(--v2-ink); color: #fff; }
.v2-btn-pri:hover { background: #000; }
.v2-btn-sec { background: var(--v2-surface); border: 1px solid var(--v2-line); color: var(--v2-ink); }
.v2-btn-sec:hover { border-color: var(--v2-ink-4); }
.v2-btn-ghost { color: var(--v2-ink-2); }
.v2-btn-ghost:hover { background: var(--v2-sunken); }
.v2-btn-acc { background: var(--v2-accent); color: #fff; }
.v2-btn-acc:hover { background: var(--v2-accent-ink); }
.v2-btn-lg { height: 42px; padding: 0 18px; font-size: 15px; }
.v2-btn-sm { height: 28px; padding: 0 9px; font-size: 12.5px; }
.v2-btn[disabled] { opacity: .4; pointer-events: none; }
.v2-seg { display: inline-flex; background: var(--v2-sunken); border-radius: 8px; padding: 2px; gap: 2px; max-width: 100%; }
.v2-seg button { height: 28px; padding: 0 10px; border-radius: 6px; color: var(--v2-ink-2); font-weight: 500; display: inline-flex; align-items: center; justify-content: center; gap: 6px; white-space: nowrap; font-size: 13px; flex-shrink: 0; }
.v2-seg button.on { background: var(--v2-surface); color: var(--v2-ink); box-shadow: 0 1px 2px rgba(0,0,0,.08); }
.v2-field { display: flex; flex-direction: column; gap: 5px; }
.v2-field label { font-size: 12px; color: var(--v2-ink-3); font-weight: 500; }
.v2-inp { height: 34px; border: 1px solid var(--v2-line); border-radius: 7px; padding: 0 10px; background: var(--v2-surface); width: 100%; }
.v2-inp:focus { border-color: var(--v2-accent); box-shadow: 0 0 0 3px var(--v2-accent-soft); }
.v2-inp-bare { border: 0; background: transparent; width: 100%; padding: 0; height: auto; }
.v2-badge { font-family: ui-monospace, monospace; font-size: 10px; letter-spacing: .04em; padding: 2px 5px; border-radius: 4px; background: var(--v2-sunken); color: var(--v2-ink-3); font-weight: 600; }
.v2-badge-pro { background: oklch(0.95 0.04 80); color: oklch(0.5 0.1 70); }
.v2-badge-free { background: var(--v2-ok-soft); color: var(--v2-ok); }

/* dropzone */
.v2-dz { border: 1.5px dashed var(--v2-ink-4); border-radius: var(--v2-r-lg); background: var(--v2-surface); display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 10px; padding: 28px 20px; transition: all .15s; cursor: pointer; }
.v2-dz:hover { border-color: var(--v2-ink-3); }
.v2-dz.over { border-color: var(--v2-accent); background: var(--v2-accent-soft); }
.v2-dz-ic { width: 40px; height: 40px; border-radius: 10px; background: var(--v2-sunken); display: grid; place-items: center; color: var(--v2-ink-2); }
.v2-dz.over .v2-dz-ic { background: var(--v2-accent); color: #fff; }

/* thumbs */
.v2-ph { position: relative; overflow: hidden; background: #aaa; }
.v2-ph img { width: 100%; height: 100%; object-fit: cover; display: block; }
.v2-ph-stripe { position: absolute; inset: 0; background-image: repeating-linear-gradient(135deg, rgba(255,255,255,.14) 0 6px, transparent 6px 12px); }

/* A4 sheet */
.v2-a4 { background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.08), 0 8px 30px rgba(0,0,0,.08); position: relative; color: #111; font-family: "Noto Sans KR", "Pretendard Variable", sans-serif; flex: none; }
.v2-cap td { border: 1px solid #9a9a9a; padding: 0 .6em; height: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.v2-cap td.v2-k { background: #f2f2f2; text-align: center; font-weight: 600; width: 1%; }
.v2-slot-empty { position: relative; border: 1px dashed #c7c7cc; display: grid; place-items: center; color: #a0a0a8; background: #fafafa; }
.v2-slot-empty.click { cursor: pointer; }
.v2-set-stage-empty { position: absolute; top: .5em; left: .7em; font-weight: 700; color: #a0a0a8; white-space: nowrap; pointer-events: none; }
.v2-cap-set td { padding: 0 .35em; }
.v2-cap-set td.v2-k { width: auto; }
.v2-swap { position: absolute; top: 50%; transform: translateY(-50%); width: 22px; height: 22px; border-radius: 50%; border: 0; display: grid; place-items: center; background: rgba(15,23,42,.72); color: #fff; cursor: pointer; z-index: 3; }
.v2-swap-prev { left: 4px; }
.v2-swap-next { right: 4px; }
.v2-swap:disabled { opacity: .25; cursor: default; }
.v2-slot-empty.click:hover { background: var(--v2-accent-soft); border-color: var(--v2-accent); color: var(--v2-accent-ink); }
.v2-sel-ring { outline: 2px solid var(--v2-accent); outline-offset: 1px; }

/* panels */
.v2-panel { background: var(--v2-surface); border: 1px solid var(--v2-line); border-radius: var(--v2-r-lg); }
.v2-scroll { overflow: auto; }
.v2-scroll::-webkit-scrollbar { width: 10px; height: 10px; }
.v2-scroll::-webkit-scrollbar-thumb { background: #d8d8dc; border-radius: 10px; border: 3px solid transparent; background-clip: padding-box; }
.v2-stage { background: #ebebee; background-image: radial-gradient(#dcdce0 1px, transparent 1px); background-size: 16px 16px; }

/* step list */
.v2-step { border-bottom: 1px solid var(--v2-line-2); }
.v2-step-h { display: flex; align-items: center; gap: 12px; padding: 16px 20px; width: 100%; text-align: left; }
.v2-step-n { width: 24px; height: 24px; border-radius: 99px; border: 1.5px solid var(--v2-ink-4); display: grid; place-items: center; font-size: 12px; font-weight: 600; color: var(--v2-ink-3); flex: none; font-family: ui-monospace, monospace; }
.v2-step.on .v2-step-n { border-color: var(--v2-ink); background: var(--v2-ink); color: #fff; }
.v2-step.done .v2-step-n { border-color: var(--v2-ok); background: var(--v2-ok); color: #fff; }
.v2-step-b { padding: 0 20px 20px 56px; display: flex; flex-direction: column; gap: 14px; }

/* 고급 설정 디스클로저 (단계 2 안쪽) — .v2-step-b 와 달리 왼쪽 들여쓰기를 만들지 않는다 */
.v2-adv { border: 1px solid var(--v2-line); border-radius: var(--v2-r-lg); background: var(--v2-sunken); overflow: hidden; }
.v2-adv-h { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 46px; padding: 10px 14px; text-align: left; color: var(--v2-ink-3); }
.v2-adv-t { font-size: 13px; font-weight: 600; flex: 1; }
.v2-adv-h svg { flex: none; transition: transform .18s ease; }
.v2-adv.on .v2-adv-h { color: var(--v2-ink); }
.v2-adv.on .v2-adv-h svg { transform: rotate(180deg); }
.v2-adv-b { display: flex; flex-direction: column; gap: 18px; padding: 4px 14px 16px; }

/* layout picker */
.v2-lp { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.v2-lp button { border: 1px solid var(--v2-line); border-radius: 9px; padding: 10px 8px 8px; display: flex; flex-direction: column; align-items: center; gap: 7px; background: var(--v2-surface); font-size: 12.5px; color: var(--v2-ink-2); }
.v2-lp button.on { border-color: var(--v2-ink); box-shadow: 0 0 0 1px var(--v2-ink); color: var(--v2-ink); font-weight: 600; }
.v2-lp-mini { width: 30px; height: 42px; border: 1px solid var(--v2-ink-4); border-radius: 2px; padding: 3px; display: grid; gap: 2px; background: #fff; }
.v2-lp-mini i { background: var(--v2-ink-4); border-radius: 1px; }
.v2-lp button.on .v2-lp-mini { border-color: var(--v2-ink); }
.v2-lp button.on .v2-lp-mini i { background: var(--v2-ink-2); }

/* format picker */
.v2-fmt { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.v2-fmt button { border: 1px solid var(--v2-line); border-radius: 9px; padding: 10px 12px; display: flex; align-items: center; gap: 10px; text-align: left; background: var(--v2-surface); }
.v2-fmt button.on { border-color: var(--v2-ink); box-shadow: 0 0 0 1px var(--v2-ink); }
@media (max-width: 520px) {
  .v2-fmt { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
  .v2-fmt button { flex-direction: column; justify-content: center; gap: 6px; padding: 12px 4px 10px; text-align: center; }
  .v2-fmt button > div:not(.v2-fmt-ic) { flex: none !important; width: 100%; }
  .v2-fmt button .v2-badge { margin-top: -2px; }
}
.v2-fmt-ic { width: 28px; height: 34px; border-radius: 4px; display: grid; place-items: center; font-family: ui-monospace, monospace; font-size: 9px; font-weight: 700; color: #fff; flex: none; }

/* toast / spinner / shimmer */
.v2-toast { position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%); background: var(--v2-ink); color: #fff; padding: 11px 16px; border-radius: 10px; font-weight: 500; z-index: 9000; display: flex; gap: 10px; align-items: center; box-shadow: 0 10px 30px rgba(0,0,0,.25); }
.v2-spin { width: 12px; height: 12px; border: 1.5px solid var(--v2-line); border-top-color: var(--v2-accent); border-radius: 99px; animation: v2-sp .7s linear infinite; }
@keyframes v2-sp { to { transform: rotate(360deg); } }
.v2-shimmer { background: linear-gradient(90deg, var(--v2-sunken) 0%, #fafafa 50%, var(--v2-sunken) 100%); background-size: 200% 100%; animation: v2-sh 1.2s infinite; border-radius: 4px; height: 10px; }
@keyframes v2-sh { to { background-position: -200% 0; } }

/* KPI dashboard strip (Receipt v2) */
.v2-kpi { display: grid; grid-template-columns: repeat(4, 1fr); background: var(--v2-surface); border-bottom: 1px solid var(--v2-line); }
.v2-kpi-tile { padding: 14px 18px; border-right: 1px solid var(--v2-line-2); }
.v2-kpi-tile:last-child { border-right: 0; }

/* status pill (Receipt v2 review step) */
.v2-status { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 500; white-space: nowrap; }
.v2-status i { width: 6px; height: 6px; border-radius: 99px; background: currentColor; flex: none; }
.v2-status-ok { color: var(--v2-ok); }
.v2-status-check { color: var(--v2-warn); }
.v2-status-reading { color: var(--v2-ink-3); }

/* category color dot */
.v2-catdot { width: 8px; height: 8px; border-radius: 2px; flex: none; display: inline-block; }

/* category breakdown (Receipt v2 dashboard) */
.v2-catbar { display: flex; height: 8px; border-radius: 99px; overflow: hidden; gap: 2px; background: var(--v2-sunken); }

/* zoomable preview stage */
.v2-zoom-controls { display: flex; align-items: center; gap: 4px; }
[contenteditable="true"] { outline: none; }
[contenteditable="true"]:hover, [contenteditable="true"]:focus { background: var(--v2-accent-soft); box-shadow: 0 0 0 1px var(--v2-accent-line); border-radius: 2px; }


/* ==========================================================================
   Receipt v2 preview = the real PDF pages. The block below is the
   @media print ruleset from styles.css (receipt-print-sheet & friends),
   scoped to .v2-pdf-page so the on-screen preview is pixel-identical to
   what printReceiptPdf() produces. Keep in sync with styles.css if the
   print layout changes.
   ========================================================================== */
.v2-pdf-page { width: 794px; height: 1123px; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.08), 0 8px 30px rgba(0,0,0,.08); font-family: var(--font-family, -apple-system, "Segoe UI", "Pretendard", "Noto Sans KR", sans-serif); line-height: 1.5; color: #0f172a; user-select: text; }
.v2-pdf-page .receipt-print-sheet { margin: 0 !important; }
.v2-pdf-page .receipt-print-sheet {
  width: 210mm !important;
  height: 297mm !important;
  min-height: 297mm !important;
  max-height: 297mm !important;
  box-sizing: border-box !important;
  padding: 14mm 16mm !important;
  margin: 0 auto !important;
  background: #ffffff !important;
  color: #0f172a !important;
  page-break-after: always !important;
  break-after: page !important;
  page-break-inside: avoid !important;
  break-inside: avoid !important;
  overflow: hidden !important;
  display: flex !important;
  flex-direction: column !important;
  position: relative !important;
  box-shadow: none !important;
  border: none !important;
  -webkit-print-color-adjust: exact !important;
  print-color-adjust: exact !important;
}
.v2-pdf-page .receipt-print-sheet:last-child {
  page-break-after: auto !important;
  break-after: auto !important;
}
.v2-pdf-page .receipt-print-sheet .expense-summary-page {
  display: flex !important;
  flex-direction: column !important;
  flex: 1 !important;
  height: 100% !important;
  min-height: 0 !important;
}
.v2-pdf-page .receipt-print-sheet .expense-doc-title {
  font-size: 24px !important;
}
.v2-pdf-page .receipt-print-sheet .expense-section-title {
  font-size: 11px !important;
}
.v2-pdf-page .receipt-print-sheet .expense-items-table,
.v2-pdf-page .receipt-print-sheet .expense-agg-table {
  width: 100% !important;
  border-collapse: collapse !important;
  font-size: 10px !important;
  line-height: 1.35 !important;
}
.v2-pdf-page .receipt-print-sheet .expense-items-table th,
.v2-pdf-page .receipt-print-sheet .expense-agg-table th {
  padding: 6px 4px !important;
  font-size: 10px !important;
  background: #f1f5f9 !important;
  color: #334155 !important;
  border: 1px solid #cbd5e1 !important;
  font-weight: 700 !important;
  text-align: center !important;
  -webkit-print-color-adjust: exact !important;
  print-color-adjust: exact !important;
}
.v2-pdf-page .receipt-print-sheet .expense-items-table td,
.v2-pdf-page .receipt-print-sheet .expense-agg-table td {
  padding: 5px 4px !important;
  font-size: 9.5px !important;
  border: 1px solid #cbd5e1 !important;
}
.v2-pdf-page .receipt-print-sheet .expense-items-table tr.total-row td {
  background: #f1f5f9 !important;
  font-weight: 700 !important;
  border: 1px solid #cbd5e1 !important;
  -webkit-print-color-adjust: exact !important;
  print-color-adjust: exact !important;
}
.v2-pdf-page .receipt-print-sheet .receipt-proof-page {
  display: flex !important;
  flex-direction: column !important;
  flex: 1 !important;
  height: 100% !important;
  min-height: 0 !important;
}
.v2-pdf-page .receipt-print-sheet .receipt-proof-grid.grid-2x2 {
  display: grid !important;
  grid-template-columns: 1fr 1fr !important;
  grid-template-rows: 1fr 1fr !important;
  gap: 12px !important;
  flex: 1 !important;
  min-height: 0 !important;
  height: calc(100% - 46px) !important;
  margin-top: 6px !important;
  margin-bottom: 6px !important;
}
.v2-pdf-page .receipt-proof-card {
  border: 1px solid #cbd5e1 !important;
  border-radius: 4px !important;
  padding: 6px 8px !important;
  display: flex !important;
  flex-direction: column !important;
  background: #ffffff !important;
  box-sizing: border-box !important;
  min-height: 0 !important;
  height: 100% !important;
}
.v2-pdf-page .receipt-proof-card-header {
  display: flex !important;
  justify-content: flex-start !important;
  align-items: center !important;
  margin-bottom: 4px !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  color: #0f172a !important;
  border-bottom: 1px solid #f1f5f9 !important;
  padding-bottom: 3px !important;
  flex-shrink: 0 !important;
}
.v2-pdf-page .receipt-proof-img-box {
  flex: 1 1 auto !important;
  min-height: 80mm !important;
  height: auto !important;
  width: 100% !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 3px !important;
  overflow: hidden !important;
  margin-bottom: 4px !important;
  padding: 4px !important;
  box-sizing: border-box !important;
}
.v2-pdf-page .receipt-proof-img {
  max-width: 100% !important;
  max-height: 100% !important;
  width: auto !important;
  height: 100% !important;
  object-fit: contain !important;
  display: block !important;
  -webkit-print-color-adjust: exact !important;
  print-color-adjust: exact !important;
}
.v2-pdf-page .receipt-print-sheet .receipt-proof-table {
  width: 100% !important;
  border-collapse: collapse !important;
  font-size: 9.5px !important;
  border: 1px solid #cbd5e1 !important;
  flex-shrink: 0 !important;
  margin-top: auto !important;
}
.v2-pdf-page .receipt-print-sheet .receipt-proof-table td {
  padding: 3.5px 6px !important;
  border: 1px solid #cbd5e1 !important;
  font-size: 9.5px !important;
}
.v2-pdf-page .receipt-print-sheet .receipt-proof-table td.label-cell {
  width: 19% !important;
  white-space: nowrap !important;
  background: #f8fafc !important;
  color: #475569 !important;
  font-weight: 700 !important;
  text-align: center !important;
  -webkit-print-color-adjust: exact !important;
  print-color-adjust: exact !important;
}
.v2-pdf-page .receipt-print-sheet .receipt-proof-table td.val-cell {
  width: 31% !important;
  background: #ffffff !important;
  color: #334155 !important;
}
.v2-pdf-page .receipt-print-sheet .receipt-a4-footer-page-no {
  margin-top: auto !important;
  padding-top: 8px !important;
  font-size: 10px !important;
  color: #94a3b8 !important;
  text-align: center !important;
  flex-shrink: 0 !important;
}

/* live highlight of the receipt being dragged / hovered in the list */
.v2-pdf-page tr.v2-hl td { background: var(--v2-accent-soft) !important; box-shadow: inset 0 0 0 1px var(--v2-accent); }
.v2-pdf-page .receipt-proof-card.v2-hl { outline: 2.5px solid var(--v2-accent) !important; outline-offset: 1px; box-shadow: 0 0 0 6px var(--v2-accent-soft); }
.v2-pdf-page [data-edit][contenteditable="true"] { cursor: text; }
.v2-pdf-page [data-edit][contenteditable="true"]:not(:focus):not(:hover) { box-shadow: inset 0 0 0 1px var(--v2-accent-line); }

/* panning */
.v2-zoom-stage.panning, .v2-zoom-stage.panning * { cursor: grabbing !important; user-select: none; }
.v2-zoom-stage { cursor: grab; }

/* ==========================================================================
   iOS-home-screen style drag-to-reorder (makeSortable in shared.js)
   ========================================================================== */
.v2-sortable-item { touch-action: manipulation; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.v2-grip { cursor: grab; touch-action: none; color: var(--v2-ink-2); display: grid; place-items: center; width: 24px; align-self: stretch; flex: none; border-radius: 6px; background: var(--v2-sunken); }
.v2-grip svg { stroke-width: 2.6; }
.v2-grip:hover { color: var(--v2-ink); background: var(--v2-line); }
.v2-sorting, .v2-sorting * { cursor: grabbing !important; }
.v2-sorting .v2-shifting { transition: transform .32s cubic-bezier(.2, .9, .3, 1.25); will-change: transform; }
.v2-sorting .v2-lifted { position: relative; z-index: 60; transition: none; will-change: transform; opacity: .97;
  outline: 2.5px solid var(--v2-accent); outline-offset: 1px;
  box-shadow: 0 14px 30px rgba(20, 20, 40, .28), 0 0 0 5px var(--v2-accent-soft);
  animation: v2-wiggle .24s ease-in-out infinite alternate; }
.v2-sorting .v2-lifted.v2-dropping { transition: transform .2s cubic-bezier(.2, .9, .3, 1.1); animation: none; }
.v2-sorting .v2-shifting { animation: v2-jiggle .26s ease-in-out infinite alternate; animation-delay: var(--v2-jd, 0s); }
.v2-rows { --v2-jig: .35deg; --v2-wig: .6deg; }
.v2-photo-grid { --v2-jig: 1.6deg; --v2-wig: 2.2deg; }
@keyframes v2-jiggle { from { rotate: calc(var(--v2-jig, 1.2deg) * -1); } to { rotate: var(--v2-jig, 1.2deg); } }
@keyframes v2-wiggle { from { rotate: calc(var(--v2-wig, 1.6deg) * -1); } to { rotate: var(--v2-wig, 1.6deg); } }
@media (prefers-reduced-motion: reduce) {
  .v2-sorting .v2-shifting, .v2-sorting .v2-lifted { animation: none; }
}

/* dashed "add more" box that is the same size as a list row */
.v2-row-add { border: 1.5px dashed var(--v2-ink-4); border-radius: 9px; min-height: 68px; display: grid; place-items: center; color: var(--v2-ink-3); cursor: pointer; background: var(--v2-surface); transition: all .15s; }
.v2-row-add:hover { border-color: var(--v2-accent); color: var(--v2-accent-ink); background: var(--v2-accent-soft); }

/* stats step (Receipt v2) */
.v2-stat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.v2-stat-tile { border: 1px solid var(--v2-line); border-radius: 9px; padding: 10px 12px; background: var(--v2-surface); }

/* ==========================================================================
   Mobile layout (Receipt v2): single column — steps first, preview below
   ========================================================================== */
@media (max-width: 768px) {
  .v2-scope.v2-mobile { flex-direction: column !important; overflow-y: auto !important; overflow-x: hidden; height: auto !important; }
  .v2-scope.v2-mobile > .v2-scroll { width: 100% !important; border-right: 0 !important; overflow: visible; flex: none; }
  .v2-scope.v2-mobile > .v2-preview-pane { height: 78vh; min-height: 480px; flex: none !important; border-top: 1px solid var(--v2-line); }
  .v2-scope.v2-mobile .v2-step-b { padding-left: 20px; }
  /* 손가락 터치 영역과 글자를 키운다 — 접힌 상태에서 "여기를 누르면 더 있다"가 보여야 한다 */
  .v2-scope.v2-mobile .v2-adv-h { min-height: 56px; padding: 12px 14px; }
  .v2-scope.v2-mobile .v2-adv-t { font-size: 15px; }
}

/* ==========================================================================
   Mobile split (Photo / Receipt v2): preview pinned on top, settings scroll below.
   host = .v2-split-host (work-area root), split = .v2-split (holds preview + settings).
   --v2-top / --v2-preview-h are set by mobile-split.js.
   ========================================================================== */
.v2-split-handle { display: none; }
/* 휴대폰 가로 모드 미지원 안내(사진대지·영수증). 가로로 돌리면 폭이 768px 를 넘기도 하므로 폭이 아니라 방향·높이·터치로 판단 */
.v2-rotate-hint { display: none; }
@media (orientation: landscape) and (max-height: 500px) and (hover: none) and (pointer: coarse) {
  .v2-split-host > .v2-rotate-hint {
    display: flex; position: fixed; inset: 0; z-index: 9600; flex-direction: column; align-items: center; justify-content: center; gap: 12px;
    background: var(--v2-surface); color: var(--v2-ink-2); text-align: center; padding: 24px;
  }
  /* 레이아웃 뷰포트를 키보드만큼 줄이는 브라우저에서 세로 입력 중 오판하지 않게 */
  .v2-split-host.v2-kbd > .v2-rotate-hint,
  body.toss-camera-active .v2-rotate-hint { display: none !important; }
  .v2-rotate-hint svg { color: var(--v2-ink-3); animation: v2-rotate-nudge 1.6s ease-in-out infinite; }
  .v2-rotate-hint p { margin: 0; font-size: 15px; font-weight: 600; color: var(--v2-ink); }
}
@keyframes v2-rotate-nudge { 0%, 30% { transform: rotate(-90deg); } 60%, 100% { transform: rotate(0deg); } }
@media (prefers-reduced-motion: reduce) { .v2-rotate-hint svg { animation: none; } }
@media (max-width: 768px) {
  .v2-scope.v2-mobile.v2-split-host {
    flex-direction: column !important; overflow: hidden !important;
    height: calc(100vh - var(--v2-top, 0px)) !important;
    height: calc(100dvh - var(--v2-top, 0px)) !important;
  }
  .v2-scope.v2-mobile.v2-split, .v2-scope.v2-mobile .v2-split { flex-direction: column !important; overflow: hidden !important; flex: 1 1 auto !important; min-height: 0 !important; }
  .v2-scope.v2-mobile.v2-split > .v2-preview-pane, .v2-scope.v2-mobile .v2-split > .v2-preview-pane {
    order: 1; flex: none !important; width: 100% !important; min-height: 0 !important;
    height: var(--v2-preview-h, 45vh) !important; border-top: 0 !important; transition: height .2s ease;
  }
  .v2-scope.v2-mobile.v2-split > .v2-split-handle, .v2-scope.v2-mobile .v2-split > .v2-split-handle {
    order: 2; flex: none; display: flex; align-items: center; justify-content: center; gap: 6px;
    height: 22px; width: 100%; padding: 0; border: 0; border-top: 1px solid var(--v2-line); border-bottom: 1px solid var(--v2-line);
    background: var(--v2-surface); color: var(--v2-ink-3); cursor: row-resize; touch-action: none; -webkit-tap-highlight-color: transparent;
  }
  .v2-split-bar { width: 36px; height: 4px; border-radius: 999px; background: var(--v2-ink-4); }
  .v2-split-handle svg { transition: transform .2s ease; }
  /* 탭하면 작게·보통 → 커짐(▽), 크게 → 작아짐(△) */
  .v2-split-handle[data-level="l"] svg { transform: rotate(180deg); }
  .v2-split-handle:focus-visible { outline: 2px solid var(--v2-accent); outline-offset: -2px; }
  .v2-scope.v2-mobile.v2-split > .v2-scroll, .v2-scope.v2-mobile .v2-split > .v2-scroll {
    order: 3; width: 100% !important; border-right: 0 !important; flex: 1 1 0 !important; min-height: 0; overflow-y: auto !important; overscroll-behavior: contain;
  }
  .v2-split.v2-split-dragging > .v2-preview-pane { transition: none; }
  /* 페이지가 스크롤되지 않으므로 미리보기의 세로 쓸기가 당겨서 새로고침·바운스로 새지 않게(인라인 pan-y 를 덮음) */
  .v2-scope.v2-mobile.v2-split .v2-zoom-stage, .v2-scope.v2-mobile .v2-split .v2-zoom-stage { touch-action: none !important; overscroll-behavior: contain; }
  /* 사진/영수증을 올리기 전에는 미리보기 없이 설정만 */
  .v2-split.v2-split-empty > .v2-preview-pane, .v2-split.v2-split-empty > .v2-split-handle { display: none !important; }
}
@media (max-width: 768px) and (prefers-reduced-motion: reduce) {
  .v2-scope.v2-mobile .v2-split > .v2-preview-pane, .v2-scope.v2-mobile.v2-split > .v2-preview-pane { transition: none; }
}

/* ==========================================================================
   Fullscreen Preview Mode (Photo Sheet & Receipt)
   ========================================================================== */
.v2-stage-toolbar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--v2-bg);
  border-bottom: 1px solid var(--v2-line);
  padding: 0 10px;
  flex: none;
  min-height: 46px;
  transition: background .2s, border-color .2s;
}

@media (max-width: 540px) {
  .v2-stage-toolbar {
    height: auto !important;
    min-height: 42px !important;
    padding: 4px 6px !important;
    gap: 4px !important;
    flex-wrap: wrap !important;
  }
  .v2-stage-toolbar .v2-btn-sm {
    padding: 0 6px !important;
    height: 28px !important;
    font-size: 11.5px !important;
  }
}

@media (max-width: 380px) {
  .v2-stage-toolbar .v2-btn-fullscreen .v2-btn-label {
    display: none !important;
  }
}

/* Fullscreen mode: overrides all split and normal layouts */
.v2-preview-pane.v2-fullscreen,
.v2-scope.v2-mobile.v2-split > .v2-preview-pane.v2-fullscreen,
.v2-scope.v2-mobile .v2-split > .v2-preview-pane.v2-fullscreen {
  position: fixed !important;
  inset: 0 !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  width: 100vw !important;
  width: 100dvw !important;
  height: 100vh !important;
  height: 100dvh !important;
  max-height: none !important;
  z-index: 99999 !important;
  background: #141416 !important;
  background-image: radial-gradient(rgba(255, 255, 255, 0.08) 1px, transparent 1px) !important;
  background-size: 20px 20px !important;
  display: flex !important;
  flex-direction: column !important;
  margin: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  transition: none !important;
}

body.v2-has-fullscreen {
  overflow: hidden !important;
}

.v2-fullscreen .v2-stage-toolbar {
  background: rgba(24, 24, 27, 0.94) !important;
  backdrop-filter: blur(12px) !important;
  -webkit-backdrop-filter: blur(12px) !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12) !important;
  color: #fff !important;
  padding-top: max(8px, env(safe-area-inset-top, 8px)) !important;
  padding-left: max(10px, env(safe-area-inset-left, 10px)) !important;
  padding-right: max(10px, env(safe-area-inset-right, 10px)) !important;
  z-index: 10 !important;
}

.v2-fullscreen .v2-num {
  color: #e4e4e7 !important;
}

.v2-fullscreen .v2-btn-ghost {
  color: #f4f4f5 !important;
}
.v2-fullscreen .v2-btn-ghost:hover {
  background: rgba(255, 255, 255, 0.15) !important;
}

.v2-fullscreen .v2-btn-sec {
  background: rgba(255, 255, 255, 0.12) !important;
  color: #fff !important;
  border-color: rgba(255, 255, 255, 0.22) !important;
}
.v2-fullscreen .v2-btn-sec:hover {
  background: rgba(255, 255, 255, 0.22) !important;
}

.v2-fullscreen .v2-zoom-stage {
  flex: 1 1 0 !important;
  height: 100% !important;
  width: 100% !important;
  touch-action: none !important;
}

/* ==========================================================================
   Photo v2 step 2: annotation items, date format, margins
   ========================================================================== */
.v2-frow { border: 1px solid var(--v2-line); border-radius: 9px; padding: 8px 8px 10px; background: var(--v2-surface); display: flex; flex-direction: column; gap: 8px; }
.v2-fcol { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.v2-fcol .v2-inp { min-width: 0; }
.v2-check { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--v2-ink-2); cursor: pointer; }
.v2-check input { accent-color: var(--v2-ink); }
.v2-margins { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.v2-margin-cell { display: flex; align-items: center; justify-content: space-between; gap: 8px; border: 1px solid var(--v2-line); border-radius: 8px; padding: 4px 4px 4px 10px; font-size: 12.5px; background: var(--v2-surface); }
.v2-stepper { display: inline-flex; align-items: center; gap: 2px; }
.v2-stepper span { min-width: 26px; text-align: center; font-weight: 600; }
.v2-stepper button { width: 26px; height: 26px; border-radius: 6px; display: grid; place-items: center; color: var(--v2-ink-2); }
.v2-stepper button:hover { background: var(--v2-sunken); color: var(--v2-ink); }
.v2-field select.v2-inp { padding-right: 6px; }

/* 영수증 업로드 단계: 날짜 형식 선택 칩 */
.v2-datefmt { display: flex; flex-direction: column; gap: 8px; margin-top: 2px; }
.v2-datefmt-label { font-size: 12px; font-weight: 600; color: var(--v2-ink-2); }
.v2-datefmt-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.v2-datefmt-chips button { height: 32px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--v2-line); background: var(--v2-surface); color: var(--v2-ink-2); font-size: 12.5px; font-variant-numeric: tabular-nums; letter-spacing: -.01em; transition: background .15s, border-color .15s, color .15s, transform .15s; }
.v2-datefmt-chips button:hover { border-color: var(--v2-ink-4); }
.v2-datefmt-chips button:active { transform: scale(.96); }
.v2-datefmt-chips button.on { background: var(--v2-ink); border-color: var(--v2-ink); color: #fff; font-weight: 600; }

/* 좁은 화면: 영수증 행을 2줄로 (상단: 상호·날짜, 하단: 금액·과목·상태) 해서 글자가 잘리지 않게 한다 */
@media (max-width: 520px) {
  .v2-rr { flex-wrap: wrap; row-gap: 4px; align-items: flex-start !important; }
  .v2-rr-info { flex: 1 1 0 !important; min-width: 0; }
  .v2-rr-right { order: 9; flex: 1 1 100% !important; width: 100% !important; flex-direction: row !important; align-items: center !important; justify-content: space-between; gap: 10px !important; padding: 2px 6px 4px 6px; border-top: 1px dashed var(--v2-line-2); margin-top: 2px; }
  .v2-rr-right > input { width: 42% !important; text-align: left !important; }
  .v2-rr-right > div { width: auto !important; flex: 1 1 auto; min-width: 0; }
}

/* 목록 상단 정렬 바 (AI 인식 완료 후 표시) */
.v2-sortbar { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; padding: 8px 10px; border: 1px solid var(--v2-line); border-radius: 10px; background: var(--v2-surface); }
.v2-set-badge { position: absolute; left: 3px; max-width: calc(100% - 6px); font-size: 9px; font-weight: 600; letter-spacing: -.2px; line-height: 1.5; padding: 0 4px; border-radius: 4px; background: rgba(15,23,42,.72); color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; pointer-events: none; }
.v2-set-badge.is-first { background: rgba(15,23,42,.9); }
.v2-sortbar.is-disabled { opacity: .55; }
.v2-set-card { display: flex; flex-direction: column; gap: 8px; padding: 10px; border-radius: 9px; border: 1px solid var(--v2-line); background: var(--v2-surface); }
.v2-set-card-head { display: flex; align-items: baseline; gap: 8px; font-size: 12.5px; }
.v2-set-card-head .v2-num { font-size: 11.5px; }
.v2-set-card-thumbs { display: grid; gap: 6px; }
.v2-set-card-thumbs figure { margin: 0; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.v2-set-card-thumbs img, .v2-set-card-thumbs .is-empty { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 6px; }
.v2-set-card-thumbs .is-empty { border: 1px dashed var(--v2-line); background: transparent; }
.v2-set-card-thumbs figcaption { font-size: 11px; color: var(--v2-ink-2); text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.v2-sortbar.is-disabled button { cursor: not-allowed; }
.v2-sortbar-label { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 600; color: var(--v2-ink-2); }
.v2-sortbar-chips { display: flex; flex-wrap: wrap; gap: 4px; flex: 1 1 auto; }
.v2-sortbar-chips button { height: 28px; padding: 0 11px; border-radius: 999px; border: 1px solid var(--v2-line); background: transparent; color: var(--v2-ink-2); font-size: 12px; transition: background .15s, color .15s, border-color .15s, transform .15s; }
.v2-sortbar-chips button:active, .v2-sortbar-dir:active { transform: scale(.96); }
.v2-sortbar-chips button.on { background: var(--v2-ink); border-color: var(--v2-ink); color: #fff; font-weight: 600; }
.v2-sortbar-dir { display: inline-flex; align-items: center; gap: 5px; height: 28px; padding: 0 11px; border-radius: 999px; background: var(--v2-sunken); color: var(--v2-ink); font-size: 12px; font-weight: 600; }

/* 공사 정보판 미리보기 오버레이 */
.v2-board-cv { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.v2-board-handle { position: absolute; cursor: grab; touch-action: none; outline: 2px dashed rgba(59,130,246,.85); outline-offset: -2px; border-radius: 2px; }
.v2-board-handle:hover { background: rgba(59,130,246,.08); }
.v2-board-handle.dragging { cursor: grabbing; background: rgba(59,130,246,.12); }
.v2-board { gap: 8px; }
.v2-switch { position: relative; display: inline-flex; width: 36px; height: 21px; flex: none; cursor: pointer; }
.v2-switch input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.v2-switch span { position: absolute; inset: 0; border-radius: 999px; background: var(--v2-line); transition: background .2s; }
.v2-switch span::after { content: ""; position: absolute; top: 2px; left: 2px; width: 17px; height: 17px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform .22s cubic-bezier(.3,1.3,.5,1); }
.v2-switch input:checked + span { background: var(--v2-ok); }
.v2-switch input:checked + span::after { transform: translateX(15px); }
.v2-switch input:focus-visible + span { outline: 2px solid var(--v2-accent); outline-offset: 2px; }
.v2-board-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.v2-board-lab { width: 64px; flex: none; font-size: 12px; color: var(--v2-ink-3); }
.v2-board-chips { display: flex; flex-wrap: wrap; gap: 4px; flex: 1; min-width: 0; }
.v2-board-chips button { height: 28px; min-width: 34px; padding: 0 10px; border-radius: 999px; border: 1px solid var(--v2-line); background: var(--v2-surface); color: var(--v2-ink-2); font-size: 12px; transition: background .15s, color .15s, border-color .15s; }
.v2-board-chips button.on { background: var(--v2-ink); border-color: var(--v2-ink); color: #fff; font-weight: 600; }

/* 1:1 문의 모달 */
.v2-inq-btn { margin-top: 10px; width: 100%; justify-content: center; }
.v2-inq-btn--panel { width: auto; margin: 0 20px 16px; flex: none; }
.v2-inq-overlay { position: fixed; inset: 0; z-index: 9500; background: rgba(15,23,42,.45); display: flex; align-items: center; justify-content: center; padding: 16px; }
.v2-inq-dlg { background: var(--v2-surface, #fff); color: var(--v2-ink, #17181b); border: 1px solid var(--v2-line, #e4e4e8); border-radius: var(--v2-r-lg, 12px); box-shadow: 0 20px 50px rgba(0,0,0,.3); width: 100%; max-width: 480px; max-height: calc(100vh - 32px); overflow-y: auto; padding: 18px 18px 16px; box-sizing: border-box; }
.v2-inq-title { font-size: 16px; font-weight: 700; margin: 0 0 12px; }
.v2-inq-chips { margin-bottom: 12px; }
.v2-inq-field { display: flex; flex-direction: column; gap: 4px; margin-bottom: 12px; }
.v2-inq-msg { height: auto; min-height: 120px; padding: 8px 10px; resize: vertical; font: inherit; line-height: 1.5; }
.v2-inq-meta { display: flex; justify-content: space-between; gap: 8px; font-size: 12px; min-height: 16px; }
.v2-inq-count { margin-left: auto; font-variant-numeric: tabular-nums; }
.v2-inq-err { color: #dc2626; }
.v2-inq-hint { font-size: 12px; margin: 0; }
.v2-inq-ctx { font-size: 12px; margin-bottom: 8px; }
.v2-inq-ctx summary { cursor: pointer; color: var(--v2-ink-2, #4f5159); }
.v2-inq-ctx div { margin-top: 4px; word-break: break-word; }
.v2-inq-hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.v2-inq-status { font-size: 13px; margin: 8px 0 0; }
.v2-inq-status.is-ok { color: var(--v2-ok, #059669); font-weight: 600; }
.v2-inq-status.is-bad { color: #dc2626; }
.v2-inq-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 12px; }
.v2-inq-actions .v2-btn[disabled] { opacity: .45; cursor: not-allowed; }
.v2-inq-dlg form.is-done .v2-inq-actions { display: none; }
@media (max-width: 480px) { .v2-inq-dlg { padding: 16px 14px 14px; } }

/* ---- 사진대지 > CSI 점검 탭 (src/view-v2/csi-panel.js) ---- */
.v2-tabbar { padding: 12px 20px 0; }
.v2-tabbar .v2-seg { width: 100%; }
.v2-tabbar .v2-seg button { flex: 1; }
.csi-summary { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 12.5px; color: var(--v2-ink-2); }
.csi-chip { display: inline-flex; align-items: center; height: 20px; padding: 0 7px; border-radius: 999px; font-size: 11.5px; font-weight: 600; white-space: nowrap; }
.csi-ok { background: var(--v2-ok-soft); color: var(--v2-ok); }
.csi-warn { background: var(--v2-warn-soft); color: oklch(0.52 0.13 60); }
.csi-fail { background: oklch(0.96 0.03 25); color: #dc2626; }
.csi-out { font-size: 12.5px; color: var(--v2-accent-ink); word-break: break-all; }
.csi-out-excluded { color: var(--v2-ink-3); }
.csi-msg { font-size: 12px; color: var(--v2-ink-2); line-height: 1.45; }
.csi-reason { display: flex; flex-direction: column; gap: 6px; margin-top: 4px; }
.csi-recover { font-size: 12px; color: oklch(0.52 0.13 60); background: var(--v2-warn-soft); padding: 6px 8px; border-radius: 6px; }
.csi-deadline { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-weight: 650; font-size: 14px; }
.csi-fit { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 12px; color: var(--v2-ok); }

/* CSI 검증 미리보기: 이미지 도구처럼 썸네일 카드 격자 + 카드마다 판정 */
.csi-toolbar { flex: none; height: 48px; display: flex; align-items: center; gap: 8px; padding: 0 16px; background: var(--v2-bg); border-bottom: 1px solid var(--v2-line); font-size: 12.5px; color: var(--v2-ink-2); overflow: hidden; white-space: nowrap; }
.csi-scroll { flex: 1; min-height: 0; overflow: auto; padding: 20px; }
.csi-empty { height: 100%; display: grid; place-items: center; max-width: 360px; margin: 0 auto; text-align: center; }
.csi-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; align-items: start; max-width: 1100px; margin: 0 auto; }
.csi-tile { display: flex; flex-direction: column; min-width: 0; background: var(--v2-surface); border: 1px solid var(--v2-line); border-radius: 10px; overflow: hidden; box-shadow: 0 1px 3px rgba(0,0,0,.05); }
.csi-tile-reason { font-size: 12.5px; font-weight: 650; color: #dc2626; line-height: 1.45; }
.csi-tile-thumb { position: relative; height: 160px; flex: none; background: var(--v2-sunken); display: flex; align-items: center; justify-content: center; overflow: hidden; }
.csi-tile-thumb img { max-width: calc(100% - 16px); max-height: calc(100% - 16px); width: auto; height: auto; object-fit: contain; }
.csi-tile-badge { position: absolute; top: 8px; left: 8px; height: 24px; padding: 0 10px; border-radius: 999px; display: inline-flex; align-items: center; font-size: 12px; font-weight: 700; box-shadow: 0 1px 3px rgba(0,0,0,.12); }
.csi-tile-del { position: absolute; top: 8px; right: 8px; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: rgba(0,0,0,.5); color: #fff; }
.csi-tile-del:hover { background: rgba(0,0,0,.7); }
.csi-tile-body { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.csi-tile-name { font-size: 12px; font-weight: 600; color: var(--v2-ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.csi-tile-warn { font-size: 12.5px; font-weight: 650; color: oklch(0.52 0.13 60); }
.csi-tile-addr { display: flex; gap: 5px; align-items: flex-start; font-size: 12.5px; color: var(--v2-ink); line-height: 1.45; word-break: keep-all; overflow-wrap: anywhere; }
.csi-tile-addr svg { flex: none; margin-top: 2px; color: var(--v2-ink-3); }
.csi-tile-body .v2-btn { align-self: flex-start; }
@media (max-width: 480px) { .csi-scroll { padding: 12px; } .csi-grid { grid-template-columns: 1fr; } }

/* 앱: 촬영한 사진 (shot-gallery-sheet.js) */
.v2-shots-dlg { max-width: 560px; }
.v2-shots-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.v2-shots-head .v2-inq-title { margin: 0; }
.v2-shots-tabs { display: flex; gap: 4px; margin: 12px 0 6px; padding: 3px; border-radius: 9px; background: var(--v2-line, #e4e4e8); }
.v2-shots-tabs button { flex: 1; min-height: 40px; border: 0; border-radius: 7px; background: transparent; color: var(--v2-ink-3, #5b5e66); font-weight: 600; font-size: 14px; }
.v2-shots-tabs button.on { background: var(--v2-surface, #fff); color: var(--v2-ink, #17181b); box-shadow: 0 1px 3px rgba(0,0,0,.12); }
.v2-shots-folder { font-size: 12px; margin: 0 0 8px; }
.v2-shots-body { min-height: 120px; font-size: 13.5px; color: var(--v2-ink-3, #5b5e66); }
.v2-shots-day { font-size: 12.5px; font-weight: 700; color: var(--v2-ink, #17181b); margin: 10px 0 6px; }
.v2-shots-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; }
.v2-shots-cell { aspect-ratio: 1; padding: 0; border: 0; border-radius: 6px; overflow: hidden; background: var(--v2-line, #e4e4e8); cursor: pointer; }
.v2-shots-cell img { width: 100%; height: 100%; object-fit: cover; display: block; }
.v2-shots-cell { position: relative; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.v2-shots-mark { position: absolute; top: 6px; right: 6px; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-size: 14px; font-weight: 800; line-height: 1; color: transparent; background: rgba(15, 23, 42, .28); border: 2px solid #fff; }
.v2-shots-cell.sel { outline: 3px solid var(--v2-accent, #2563eb); outline-offset: -3px; }
.v2-shots-cell.sel img { opacity: .8; }
.v2-shots-cell.sel .v2-shots-mark { background: var(--v2-accent, #2563eb); color: #fff; }
.v2-shots-bar { position: sticky; bottom: -16px; z-index: 1; display: flex; align-items: center; gap: 8px; margin: 12px -18px -16px; padding: 12px 18px 16px; background: var(--v2-surface, #fff); border-top: 1px solid var(--v2-line, #e4e4e8); }
.v2-shots-count { flex: 1; min-width: 0; font-size: 13px; font-weight: 600; color: var(--v2-ink-2, #3b3e46); }

/* 앱: Google Play 요금제 (play-plans-sheet.js) */
.v2-play-dlg { max-width: 460px; }
.v2-play-body { font-size: 14px; line-height: 1.55; }
.v2-play-card { border: 1px solid var(--v2-line, #e4e4e8); border-radius: 12px; padding: 14px; margin-top: 10px; display: grid; gap: 4px; }
.v2-play-card.is-current { border-color: var(--v2-accent, #2563eb); box-shadow: 0 0 0 2px var(--v2-accent-soft, rgba(37,99,235,.15)); }
.v2-play-name { font-weight: 700; font-size: 15px; }
.v2-play-price { font-size: 20px; font-weight: 800; letter-spacing: -0.01em; }
.v2-play-credits { font-weight: 600; }
.v2-play-sub { font-size: 12.5px; }
.v2-play-card .v2-btn { margin-top: 8px; min-height: 44px; width: 100%; justify-content: center; }
.v2-play-note { font-size: 12.5px; line-height: 1.6; margin: 12px 0 6px; word-break: keep-all; }
.v2-play-links { display: flex; flex-wrap: wrap; gap: 6px; }

/* 모바일 미리보기: "두 손가락으로 이동·확대" 안내 (shared.js attachPinchHint) */
.v2-pinch-hint {
  position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%); z-index: 3;
  padding: 7px 13px; border-radius: 999px; background: rgba(15, 23, 42, .82); color: #fff;
  font-size: 12.5px; font-weight: 600; white-space: nowrap; pointer-events: none;
  animation: v2-pinch-hint-in .25s ease-out; transition: opacity .3s ease;
}
.v2-pinch-hint.is-out { opacity: 0; }
@keyframes v2-pinch-hint-in { from { opacity: 0; transform: translate(-50%, 6px); } to { opacity: 1; transform: translateX(-50%); } }

/* src/landing.css — 랜딩 페이지 (.lp-*)
   토큰(--v2-*)과 버튼(.v2-btn*)은 사진대지·영수증 v2와 공용인 view-v2.css 를 그대로 쓴다.
   랜딩 루트는 class="lp v2-scope". */
.lp { display: block; min-height: calc(100vh - 57px); overflow-x: hidden; line-height: 1.5; }
.lp a { text-decoration: none; color: inherit; }
.lp a.v2-btn-pri { color: #fff; }
.lp h1, .lp h2, .lp h3, .lp p, .lp ol, .lp ul { margin: 0; }
.lp-wrap { max-width: 1152px; margin: 0 auto; padding: 0 24px; }

/* ── hero (Split Modern Hero with Finished Sheet) ─────────────────────────── */
.lp-hero { background: var(--v2-surface); border-bottom: 1px solid var(--v2-line); padding: 64px 0 76px; }
.lp-hero-split { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); gap: 48px; align-items: center; margin-bottom: 56px; }
.lp-hero-content { display: flex; flex-direction: column; align-items: flex-start; text-align: left; }
.lp-hero-pill { display: inline-flex; align-items: center; gap: 8px; background: var(--v2-bg); border: 1px solid var(--v2-line); padding: 5px 14px 5px 6px; border-radius: 999px; font-size: 13px; color: var(--v2-ink-2); margin-bottom: 22px; box-shadow: 0 1px 3px rgba(0,0,0,0.03); transition: border-color .15s; }
.lp-hero-pill:hover { border-color: var(--v2-accent-line); }
.lp-pill-badge { display: inline-flex; align-items: center; gap: 4px; background: var(--v2-accent-soft); color: var(--v2-accent); padding: 2px 8px; border-radius: 999px; font-weight: 700; font-size: 11px; }
.lp-pill-btn { background: none; border: none; color: var(--v2-accent); font-weight: 650; font-size: 12.5px; cursor: pointer; padding: 0; margin-left: 4px; }
.lp-pill-btn:hover { text-decoration: underline; }

.lp-hero-h1 { font-size: clamp(32px, 3.8vw, 48px); line-height: 1.18; letter-spacing: -.035em; font-weight: 800; margin: 0 0 18px; color: var(--v2-ink); word-break: keep-all; text-wrap: balance; }
.lp-accent { color: var(--v2-accent); }
.lp-red { color: #dc2626; }
.lp-hero-sub { font-size: 16.5px; line-height: 1.68; color: var(--v2-ink-2); max-width: 620px; margin: 0 0 26px; word-break: keep-all; text-wrap: pretty; }
.lp-hero-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 24px; }
.lp-hero-actions .v2-btn { display: inline-flex; align-items: center; gap: 8px; }

.lp-trust-hero { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 20px; color: var(--v2-ink-3); font-size: 13px; margin: 0; }
.lp-trust-hero li { display: inline-flex; align-items: center; gap: 6px; }
.lp-trust-hero svg { color: var(--v2-accent); stroke-width: 2.4; }

/* 히어로: 중앙 1단 (목업 없이 문구 + 도구 카드) */
.lp-hero-center { display: flex; flex-direction: column; align-items: center; text-align: center; max-width: 1080px; margin: 0 auto; }
.lp-hero-center .lp-hero-sub { margin: 0 auto; }
.lp-h1-center { font-size: clamp(30px, 3.8vw, 48px); line-height: 1.18; letter-spacing: -.035em; font-weight: 800; margin: 0 0 18px; color: var(--v2-ink); word-break: keep-all; text-wrap: balance; }
.lp-sub-center { font-size: 17.5px; line-height: 1.68; color: var(--v2-ink-2); max-width: 680px; margin: 0 auto; word-break: keep-all; text-wrap: pretty; }
.lp-trust-center { list-style: none; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 24px; margin-top: 24px !important; color: var(--v2-ink-3); font-size: 13px; }
.lp-trust-center li { display: inline-flex; align-items: center; gap: 6px; }
.lp-trust-center svg { color: var(--v2-accent); stroke-width: 2.4; }

/* 4-Tool Hub Cards in Hero */
.lp-hero-hub { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; width: 100%; margin-top: 40px; text-align: left; }
.lp-hub-card { background: var(--v2-bg); border: 1px solid var(--v2-line); border-radius: 14px; padding: 22px 20px 20px; display: flex; flex-direction: column; text-decoration: none; color: inherit; position: relative; transition: transform .18s cubic-bezier(.16,1,.3,1), border-color .18s, box-shadow .18s; box-shadow: 0 1px 3px rgba(0,0,0,0.03); }
.lp-hub-card:hover { transform: translateY(-4px); border-color: var(--v2-accent-line); box-shadow: var(--v2-shadow), 0 10px 26px -8px rgba(37,99,235,0.14); }
.lp-hub-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.lp-hub-icon { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; }
.lp-hub-icon.blue { background: #eff6ff; color: #2563eb; }
.lp-hub-icon.teal { background: #ecfdf5; color: #059669; }
.lp-hub-icon.indigo { background: #eef2ff; color: #4f46e5; }
.lp-hub-icon.rose { background: #fff1f2; color: #e11d48; }

.lp-hub-kbd { font-family: ui-monospace, monospace; font-size: 11px; font-weight: 600; padding: 2px 7px; border-radius: 6px; background: var(--v2-sunken); color: var(--v2-ink-3); border: 1px solid var(--v2-line); }

.lp-hub-card h3 { font-size: 16.5px; font-weight: 700; letter-spacing: -.02em; color: var(--v2-ink); margin: 0 0 6px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.lp-hub-badge { font-size: 10.5px; font-weight: 600; color: var(--v2-accent); background: var(--v2-accent-soft); padding: 1px 6px; border-radius: 4px; }
.lp-hub-desc { font-size: 13px; line-height: 1.6; color: var(--v2-ink-2); margin: 0 0 18px; flex: 1; word-break: keep-all; text-wrap: pretty; }
.lp-hub-cta { font-size: 13px; font-weight: 650; color: var(--v2-accent); display: inline-flex; align-items: center; gap: 5px; margin-top: auto; transition: gap .15s; }
.lp-hub-card:hover .lp-hub-cta { gap: 8px; }

.lp-sheet { width: 204px; aspect-ratio: 210 / 297; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .08), 0 12px 32px rgba(0, 0, 0, .13); padding: 16px 14px 10px; display: flex; flex-direction: column; font-family: "Noto Sans KR", "Pretendard Variable", Pretendard, system-ui, sans-serif; font-size: 8px; color: #111; flex: none; }
.lp-window-stage .lp-sheet-photo { transform: rotate(-2.5deg) translateX(-12px); z-index: 2; }
.lp-window-stage .lp-sheet-receipt { margin-left: -14px; transform: rotate(2.5deg) translateY(18px); }
.lp-sheet-title { text-align: center; font-weight: 800; font-size: 12px; letter-spacing: .08em; margin-bottom: 8px; }
.lp-sheet-title.left { text-align: left; margin: 0; letter-spacing: -.01em; font-size: 13px; }
.lp-sheet-grid { display: grid; gap: 8px; flex: 1; min-height: 0; }
.lp-grid-2 { grid-template-rows: 1fr 1fr; }
.lp-cell { display: flex; flex-direction: column; min-height: 0; border: 1px solid #9a9a9a; }
.lp-ph { flex: 1; position: relative; background: linear-gradient(140deg, #d5dbe6 0%, #a3adbf 100%); overflow: hidden; }
.lp-ph::after { content: ""; position: absolute; inset: 0; background-image: repeating-linear-gradient(135deg, rgba(255, 255, 255, .16) 0 6px, transparent 6px 12px); }
.lp-ph-no { position: absolute; left: 4px; top: 4px; z-index: 1; font-size: 7px; line-height: 1; padding: 2px 4px; border-radius: 2px; background: rgba(0, 0, 0, .5); color: #fff; }
.lp-cap > div { display: grid; grid-template-columns: auto 1fr auto 1fr; }
.lp-cap > div:nth-child(2) { grid-template-columns: auto 1fr; }
.lp-cap i, .lp-cap b { font-style: normal; border-top: 1px solid #9a9a9a; min-height: 10px; }
.lp-cap i { background: #f2f2f2; font-weight: 600; padding: 1px 4px; text-align: center; font-size: 6.5px; border-right: 1px solid #9a9a9a; white-space: nowrap; }
.lp-cap b { border-right: 1px solid #9a9a9a; }
.lp-cap b:last-child { border-right: 0; }
.lp-sheet-foot { text-align: center; color: #999; font-size: 6.5px; padding-top: 5px; margin-top: auto; }
.lp-sheet-head { display: flex; justify-content: space-between; align-items: flex-end; border-bottom: 1.5px solid #0f172a; padding-bottom: 6px; margin-bottom: 8px; }
.lp-sheet-total { text-align: right; color: #1e40af; font-weight: 800; font-size: 11px; line-height: 1.1; }
.lp-sheet-total small { display: block; font-size: 5.5px; font-weight: 700; color: #64748b; letter-spacing: .04em; }
.lp-tbl { width: 100%; border-collapse: collapse; font-size: 7px; }
.lp-tbl th { background: #f1f5f9; color: #334155; border: 1px solid #cbd5e1; padding: 3px 4px; font-weight: 700; }
.lp-tbl td { border: 1px solid #cbd5e1; padding: 4.5px 4px; }
.lp-tbl td.num { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }
.lp-tbl td:first-child { text-align: center; color: #64748b; width: 12%; }
.lp-skel { display: block; height: 4px; width: 72%; background: #e2e8f0; border-radius: 2px; }

/* ── PDF & 이미지 도구 시트 목업 ── */
.lp-sheet-pdf, .lp-sheet-image { background: #fff; border: 1px solid #cbd5e1; }
.lp-badge-comp { font-size: 7.5px; font-weight: 700; color: #059669; background: #ecfdf5; padding: 1.5px 5px; border-radius: 3px; border: 1px solid #a7f3d0; white-space: nowrap; }
.lp-pdf-pages { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; flex: 1; min-height: 0; padding: 4px 0; }
.lp-pdf-page { background: #f8fafc; border: 1px solid #cbd5e1; border-radius: 4px; padding: 8px 6px; display: flex; flex-direction: column; gap: 4px; position: relative; box-shadow: 0 1px 2px rgba(0,0,0,0.03); }
.lp-pdf-page.on { border-color: #2563eb; outline: 1.5px solid #2563eb; background: #fff; }
.lp-p-num { position: absolute; right: 4px; top: 2px; font-size: 6.5px; color: #64748b; font-weight: 700; }
.lp-p-line { height: 3px; background: #e2e8f0; border-radius: 2px; width: 75%; }
.lp-p-line.wide { width: 90%; background: #cbd5e1; }
.lp-p-line.half { width: 45%; }
.lp-pdf-stamp-badge { display: flex; align-items: center; gap: 6px; padding: 4px 6px; background: #fef2f2; border: 1px dashed #ef4444; border-radius: 5px; font-size: 7px; color: #dc2626; font-weight: 600; margin: 4px 0; }
.lp-mini-stamp { width: 14px; height: 14px; border: 1.5px solid #dc2626; border-radius: 50%; display: grid; place-items: center; font-size: 6.5px; font-weight: 900; }

.lp-badge-heic { font-size: 7px; font-weight: 700; color: #2563eb; background: #eff6ff; padding: 1.5px 5px; border-radius: 3px; border: 1px solid #bfdbfe; font-family: ui-monospace, monospace; white-space: nowrap; }
.lp-stamp-mock-stage { flex: 1; min-height: 0; display: grid; place-items: center; padding: 6px 0; }
.lp-seal-ring { width: 76px; height: 76px; border: 3.5px solid #dc2626; border-radius: 50%; display: grid; place-items: center; background: radial-gradient(circle, rgba(220,38,38,0.06) 0%, transparent 70%); box-shadow: inset 0 0 4px rgba(220,38,38,0.12); }
.lp-seal-inner { display: grid; grid-template-columns: 1fr 1fr; gap: 2px 4px; text-align: center; }
.lp-seal-char { font-family: "Nanum Myeongjo", "Batang", serif; font-size: 14px; font-weight: 900; color: #dc2626; line-height: 1.05; }
.lp-img-crop-bar { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 4px; }
.lp-crop-chip { font-size: 6.5px; font-weight: 600; padding: 1.5px 4px; border-radius: 3px; background: #f1f5f9; color: #475569; }
.lp-crop-chip.green { background: #ecfdf5; color: #059669; font-weight: 700; }

/* ── 핵심 수치 띠 (실제 사실) ─────────────────────────────────────────────── */
.lp-facts { background: var(--v2-ink); color: #fff; padding: 40px 0; }
.lp-facts-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.lp-fact { padding-left: 24px; border-left: 1px solid rgba(255, 255, 255, .14); }
.lp-fact:first-child { padding-left: 0; border-left: 0; }
.lp-fact-n { font-size: 40px; font-weight: 750; line-height: 1.1; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.lp-fact-l { font-size: 14px; font-weight: 600; margin-top: 6px; }
.lp-fact-s { font-size: 12.5px; color: rgba(255, 255, 255, .55); margin-top: 2px; }

/* ── 공통 섹션 ────────────────────────────────────────────────────────── */
.lp-section { padding: 80px 0; }
.lp-section-alt { background: var(--v2-surface); border-top: 1px solid var(--v2-line); border-bottom: 1px solid var(--v2-line); }
.lp-eyebrow { font-family: ui-monospace, monospace; font-size: 11.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--v2-accent-ink); font-weight: 600; }
.lp-eyebrow.light { color: rgba(255, 255, 255, .6); }
.lp-h2 { font-size: clamp(24px, 3vw, 34px); font-weight: 720; letter-spacing: -.028em; line-height: 1.25; margin: 8px 0 28px !important; color: var(--v2-ink); word-break: keep-all; text-wrap: balance; }

/* ── 서비스 탭 ────────────────────────────────────────────────────────── */
.lp-tabs { margin-bottom: 4px; }
.lp-tabs button { height: 34px; padding: 0 14px; gap: 8px; font-size: 13.5px; }
.lp-tabs button svg { color: var(--v2-ink-3); }
.lp-tabs button.on svg { color: var(--v2-accent); }
.lp-panel { margin-top: 20px; background: var(--v2-surface); border: 1px solid var(--v2-line); border-radius: 14px; overflow: hidden; box-shadow: var(--v2-shadow); }
.lp-panel.on { display: grid; grid-template-columns: 1fr 1fr; }
.lp-panel[hidden] { display: none; }
.lp-panel-copy { padding: 40px; display: flex; flex-direction: column; align-items: flex-start; }
.lp-panel-copy h3 { font-size: 22px; font-weight: 700; letter-spacing: -.02em; line-height: 1.3; word-break: keep-all; text-wrap: balance; }
.lp-panel-copy p { color: var(--v2-ink-2); line-height: 1.7; margin: 10px 0 24px; word-break: keep-all; text-wrap: pretty; }
.lp-steps { list-style: none; padding: 0; display: grid; gap: 10px; margin-bottom: 28px !important; }
.lp-steps li { display: flex; align-items: center; gap: 12px; font-weight: 550; }
.lp-step-n { width: 24px; height: 24px; border-radius: 99px; border: 1.5px solid var(--v2-ink-4); display: grid; place-items: center; font-size: 12px; font-weight: 600; color: var(--v2-ink-3); font-family: ui-monospace, monospace; flex: none; }
.lp-step-auto { color: #dc2626; font-size: 11px; font-weight: 700; background: rgba(220, 38, 38, .09); padding: 2px 7px; border-radius: 6px; margin-left: 2px; }
.lp-panel-stage { min-height: 400px; display: grid; place-items: center; padding: 28px; border-left: 1px solid var(--v2-line); }
.lp-panel-stage .lp-sheet { width: 250px; }

/* ── 기능 카드 ────────────────────────────────────────────────────────── */
.lp-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.lp-card { background: var(--v2-bg); border: 1px solid var(--v2-line); border-radius: 12px; padding: 22px; transition: border-color .15s, box-shadow .15s; }
.lp-card:hover { border-color: var(--v2-accent-line); box-shadow: var(--v2-shadow); }
.lp-card-top { display: flex; align-items: center; justify-content: space-between; }
.lp-ic { width: 36px; height: 36px; border-radius: 9px; display: grid; place-items: center; background: var(--v2-accent-soft); color: var(--v2-accent); }
.lp-card-tag { font-family: ui-monospace, monospace; font-size: 10.5px; letter-spacing: .06em; color: var(--v2-ink-3); text-transform: uppercase; }
.lp-card h3 { font-size: 16px; font-weight: 650; letter-spacing: -.01em; margin: 16px 0 6px; color: var(--v2-ink); }
.lp-card p { font-size: 13.5px; line-height: 1.7; color: var(--v2-ink-2); word-break: keep-all; text-wrap: pretty; }

/* ── 마무리 CTA ──────────────────────────────────────────────────────── */
.lp-final { background: var(--v2-ink); color: #fff; border-radius: 16px; padding: 44px 48px; display: grid; grid-template-columns: 1fr auto; gap: 32px; align-items: center; }
.lp-final h2 { font-size: clamp(22px, 2.6vw, 28px); font-weight: 720; letter-spacing: -.025em; line-height: 1.3; margin: 8px 0 8px; word-break: keep-all; text-wrap: balance; }
.lp-final p { color: rgba(255, 255, 255, .7); line-height: 1.65; max-width: 560px; word-break: keep-all; text-wrap: pretty; }
.lp-final-actions { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.lp .lp-btn-light { background: #fff; color: var(--v2-ink); gap: 8px; }
.lp .lp-btn-light:hover { background: var(--v2-sunken); }
.lp .lp-link-light { color: rgba(255, 255, 255, .78); font-weight: 550; text-decoration: underline; text-underline-offset: 3px; }
.lp .lp-link-light:hover { color: #fff; }

.lp button:focus-visible, .lp a:focus-visible { outline: 2px solid var(--v2-accent); outline-offset: 2px; }

/* ── 반응형 ──────────────────────────────────────────────────────────── */
@media (max-width: 960px) {
  .lp-hero { padding: 48px 0 56px; }
  .lp-hero-hub { grid-template-columns: repeat(2, 1fr); gap: 14px; margin-top: 36px; }
  .lp-facts-grid { grid-template-columns: 1fr 1fr; gap: 28px 20px; }
  .lp-fact:nth-child(3) { padding-left: 0; border-left: 0; }
  .lp-cards { grid-template-columns: 1fr 1fr; }
  .lp-panel.on { grid-template-columns: minmax(0, 1fr); }
  .lp-panel-stage { border-left: 0; border-top: 1px solid var(--v2-line); }
  .lp-final { grid-template-columns: minmax(0, 1fr); padding: 32px 28px; }
  .lp-section { padding: 56px 0; }
}
@media (max-width: 600px) {
  .lp-wrap { padding-left: 16px; padding-right: 16px; }
  .lp-hero { padding: 36px 0 44px; }
  .lp-hero-pill { font-size: 12px; padding: 4px 10px 4px 5px; flex-wrap: wrap; justify-content: center; }
  .lp-hero-h1 { margin: 0 0 12px; font-size: 27px; }
  .lp-hero-sub { font-size: 14.5px; line-height: 1.65; margin: 0 0 20px; }
  .lp-hero-actions { width: 100%; flex-direction: column; gap: 8px; }
  .lp-hero-actions .v2-btn { width: 100%; justify-content: center; }
  .lp-trust-hero { display: grid; grid-template-columns: repeat(2, minmax(0, max-content)); justify-content: center; gap: 8px 14px; text-align: left; max-width: 100%; font-size: 12px; }
  .lp-h1-center { margin: 0 0 12px; }
  .lp-sub-center { font-size: 15.5px; line-height: 1.7; }
  .lp-trust-center { margin-top: 18px !important; gap: 6px 16px; font-size: 12.5px; }
  .lp-cards { grid-template-columns: 1fr; }
  .lp-panel-copy { padding: 28px 22px; }
  .lp-panel-stage { min-height: 320px; }
  .lp-sheet { width: 168px; padding: 12px 10px 8px; }
  .lp-fact-n { font-size: 32px; }
  .lp-final-actions .v2-btn { width: 100%; }
}

/* 번역 문구가 길어져도 카드·탭이 화면 밖으로 밀려나지 않게 */
.lp-cards > *, .lp-facts-grid > * { min-width: 0; }
.lp-card h3, .lp-card p, .lp-fact-s, .lp-fact-l { overflow-wrap: anywhere; }
.lp-tabs { max-width: 100%; flex-wrap: wrap; }
.lp-tabs button { min-width: 0; white-space: normal; text-align: left; }
.lp-window-stage, .lp-panel-stage { overflow: hidden; }
.lp h1, .lp h2, .lp h3, .lp p { overflow-wrap: anywhere; }

/* ── 로그인 상태별 문구 (landing-view.js syncLandingAuth) ─────────────── */
.lp .lp-user-only { display: none; }
.lp.lp-authed .lp-user-only { display: grid; }
.lp.lp-authed .lp-guest-only { display: none !important; }

/* ── 모바일 최적화 ───────────────────────────────────────────────────── */
@media (max-width: 600px) {
  .lp-section { padding: 44px 0; }

  /* 혜택 안내: 여러 줄로 감기는 알약 대신 둥근 카드 */
  .lp-hero-pill { display: flex; flex-direction: column; gap: 6px; width: 100%; max-width: 360px; border-radius: 14px; padding: 12px 16px; margin-bottom: 22px; }
  .lp-pill-text { font-size: 13px; line-height: 1.5; color: var(--v2-ink-2); word-break: keep-all; text-wrap: balance; }
  .lp-pill-btn { margin-left: 0; font-size: 13px; padding: 2px 0; }
  .lp-pill-extra { display: none; }

  /* 히어로 문구: 강제 줄바꿈 대신 자연스럽게 */
  .lp-sub-center br { display: none; }
  .lp-sub-center { font-size: 15px; line-height: 1.65; word-break: keep-all; text-wrap: pretty; }
  .lp-trust-center { display: grid; grid-template-columns: repeat(2, minmax(0, max-content)); justify-content: center; gap: 8px 14px; text-align: left; max-width: 100%; }
  .lp-trust-center li { align-items: flex-start; min-width: 0; }
  .lp-trust-center svg { flex: none; margin-top: 2px; }

  /* 도구 4개: 첫 화면에 다 보이도록 2×2 타일 (아이콘 · 이름 · 한 줄) */
  .lp-hero-hub { grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 24px; }
  .lp-hub-card { padding: 14px; border-radius: 12px; }
  .lp-hub-top { margin-bottom: 10px; }
  .lp-hub-icon { width: 36px; height: 36px; }
  .lp-hub-kbd, .lp-hub-cta { display: none; }
  .lp-hub-card h3 { font-size: 15px; margin: 0 0 3px; }
  .lp-hub-desc { font-size: 12px; line-height: 1.45; margin: 0; }
  .lp-hub-card:hover { transform: none; }

  /* 서비스 탭: 2×2 로 모두 보이게(가로 스크롤로 숨지 않게) */
  .lp-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; }
  .lp-tabs button { justify-content: center; white-space: nowrap; min-width: 0; }

  /* 기능 카드: 여백·글자 축소 */
  .lp-card { padding: 16px; }
  .lp-card h3 { font-size: 15.5px; margin: 10px 0 4px; }
  .lp-card p { font-size: 13px; line-height: 1.6; }
  .lp-cards { gap: 10px; }
}

/* ── 광고 자리 (services/ads.js 가 채움, 비어 있으면 hidden) ─────────────── */
.lp-ad { margin: 32px auto; max-width: 970px; min-height: 0; }
.lp-ad .ad-label { display: block; font-size: 11px; letter-spacing: .04em; color: var(--v2-ink-4); text-align: center; margin-bottom: 6px; }
@media (max-width: 600px) { .lp-ad { margin: 24px auto; } }

/* ── CSI 사진 검증 (한국어 전용, landing-view.js #lpCsi) ─────────────── */
.lp-csi { padding-top: 8px; }
.lp-csi-panel { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); background: var(--v2-surface); border: 1px solid var(--v2-line); border-radius: 14px; overflow: hidden; box-shadow: var(--v2-shadow); }
.lp-csi-copy { padding: 40px; display: flex; flex-direction: column; align-items: flex-start; gap: 14px; min-width: 0; }
.lp-csi-h2 { font-size: clamp(22px, 2.6vw, 28px); font-weight: 720; letter-spacing: -.025em; line-height: 1.3; color: var(--v2-ink); word-break: keep-all; text-wrap: balance; margin: 0; }
.lp-csi-lede { color: var(--v2-ink-2); line-height: 1.7; word-break: keep-all; text-wrap: pretty; margin: 0; }
.lp-csi-points { list-style: none; padding: 0; margin: 4px 0 8px; display: grid; gap: 14px; }
.lp-csi-points li { display: grid; grid-template-columns: 36px minmax(0, 1fr); gap: 12px; align-items: start; }
.lp-csi-points b { display: block; font-weight: 650; color: var(--v2-ink); }
.lp-csi-points span { display: block; font-size: 13.5px; line-height: 1.6; color: var(--v2-ink-2); word-break: keep-all; }
.lp-csi-note { font-size: 12px; line-height: 1.6; color: var(--v2-ink-3); word-break: keep-all; margin: 0; }
.lp-csi-stage { display: grid; place-items: center; padding: 28px; border-left: 1px solid var(--v2-line); min-width: 0; }

.lp-csi-mock { width: 100%; max-width: 380px; display: grid; gap: 10px; background: var(--v2-bg); border: 1px solid var(--v2-line); border-radius: 12px; padding: 16px; }
.lp-csi-mock-top { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; font-size: 13.5px; }
.lp-csi-ex { font-size: 11px; color: var(--v2-ink-3); border: 1px solid var(--v2-line); border-radius: 99px; padding: 1px 8px; }
.lp-csi-tally { display: flex; flex-wrap: wrap; gap: 6px; font-variant-numeric: tabular-nums; }
.lp-csi-chip { font-size: 11.5px; font-weight: 600; padding: 2px 8px; border-radius: 99px; background: var(--v2-surface); border: 1px solid var(--v2-line); color: var(--v2-ink-2); white-space: nowrap; }
.lp-csi-chip.ok { background: var(--v2-ok-soft); color: var(--v2-ok); border-color: transparent; }
.lp-csi-chip.bad { background: oklch(0.96 0.03 25); color: #dc2626; border-color: transparent; }
.lp-csi-row { display: grid; gap: 3px; background: var(--v2-surface); border: 1px solid var(--v2-line); border-left: 3px solid var(--v2-ink-4); border-radius: 8px; padding: 9px 11px; min-width: 0; }
.lp-csi-row.ok { border-left-color: var(--v2-ok); }
.lp-csi-row.bad { border-left-color: #dc2626; }
.lp-csi-row-head { display: flex; align-items: center; gap: 8px; min-width: 0; }
.lp-csi-name { font-family: ui-monospace, monospace; font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.lp-csi-data { font-family: ui-monospace, monospace; font-size: 11.5px; color: var(--v2-ink-3); overflow-wrap: anywhere; }
.lp-csi-out { font-family: ui-monospace, monospace; font-size: 11.5px; color: var(--v2-accent-ink); overflow-wrap: anywhere; }
.lp-csi-why { font-size: 12px; color: #dc2626; word-break: keep-all; }
.lp-csi-deadline { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: var(--v2-ink); }

@media (max-width: 960px) {
  .lp-csi-panel { grid-template-columns: minmax(0, 1fr); }
  .lp-csi-stage { border-left: 0; border-top: 1px solid var(--v2-line); }
}
@media (max-width: 600px) {
  .lp-csi-copy { padding: 28px 22px; }
  .lp-csi-stage { padding: 20px 16px; }
  .lp-csi-copy .v2-btn { width: 100%; justify-content: center; }
}

/* 히어로 신뢰 문구: 모바일에서 한 줄씩 가운데 정렬 (2열 그리드 대신) */
@media (max-width: 600px) {
  .lp-hero-center .lp-hero-sub { font-size: 14px; }
  .lp-hero .lp-trust-center { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 14px; margin-top: 18px !important; font-size: 12px; }
  .lp-hero .lp-trust-center li.lp-guest-only { flex-basis: 100%; justify-content: center; }
}

/* ── 결과물 우선 히어로 (2026-10-12) ─────────────────────────────
   실제 A4 결과물이 주인공. 글은 제목 한 줄 + 보조 한 줄, 버튼은 크게. */
.lp-out { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 500px); grid-template-rows: 1fr auto auto 1fr; grid-template-areas: ". stage" "switch stage" "copy stage" ". stage"; column-gap: 72px; align-items: start; }
.lp-out [hidden] { display: none !important; }
.lp-out-switch { grid-area: switch; display: inline-flex; justify-self: start; padding: 4px; gap: 4px; border-radius: 14px; background: var(--v2-sunken, #f1f1f3); margin: 8px 0 28px; }
.lp-out-switch button { display: inline-flex; align-items: center; gap: 8px; min-height: 48px; padding: 0 22px; border: 0; border-radius: 11px; background: transparent; color: var(--v2-ink-2); font: inherit; font-size: 17px; font-weight: 650; cursor: pointer; transition: background .15s, color .15s; }
.lp-out-switch button[aria-selected="true"] { background: var(--v2-surface, #fff); color: var(--v2-ink); box-shadow: 0 1px 2px rgba(15,23,42,.08), 0 2px 8px -2px rgba(15,23,42,.10); }
.lp-out-switch button[aria-selected="true"] svg { color: var(--v2-accent); }
.lp-out-copy { grid-area: copy; }
.lp .lp-out-h1 { font-size: clamp(36px, 4.6vw, 60px); line-height: 1.12; letter-spacing: -.04em; font-weight: 800; color: var(--v2-ink); margin: 0 0 18px; word-break: keep-all; text-wrap: balance; }
.lp .lp-out-sub { font-size: 19px; line-height: 1.6; color: var(--v2-ink-2); margin: 0 0 32px; word-break: keep-all; max-width: 30em; }
.lp-out-cta { display: inline-flex; align-items: center; gap: 12px; min-height: 64px; padding: 0 34px; border-radius: 16px; background: var(--v2-accent); color: #fff !important; font-size: 21px; font-weight: 750; letter-spacing: -.02em; text-decoration: none; box-shadow: 0 8px 24px -10px var(--v2-accent); transition: transform .15s, filter .15s; }
.lp-out-cta:hover { filter: brightness(1.08); transform: translateY(-1px); }
.lp-out-cta:active { transform: translateY(0); }
.lp-out-cta:focus-visible, .lp-out-switch button:focus-visible, .lp-vault-link:focus-visible, .lp-out-more a:focus-visible { outline: 3px solid var(--v2-accent); outline-offset: 3px; }
.lp .lp-out-steps { list-style: none; padding: 0; margin: 44px 0 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); max-width: 520px; }
.lp-out-steps li { position: relative; display: flex; flex-direction: column; gap: 10px; font-size: 17px; font-weight: 650; color: var(--v2-ink); word-break: keep-all; padding-right: 12px; }
.lp-out-steps li span { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--v2-ink); color: var(--v2-surface, #fff); font-size: 15px; font-weight: 750; position: relative; z-index: 1; }
.lp-out-steps li:not(:last-child)::after { content: ""; position: absolute; top: 17px; left: 42px; right: 8px; border-top: 2px dotted var(--v2-ink-4, #b4b6bc); }
.lp-out-steps small { font-size: 14px; font-weight: 500; color: var(--v2-ink-3); margin-top: -4px; }

.lp-out-stage { grid-area: stage; margin: 0; position: relative; }
.lp-paper { display: block; background: #fff; border-radius: 4px; box-shadow: 0 1px 2px rgba(15,23,42,.10), 0 18px 40px -12px rgba(15,23,42,.28); }
.lp-paper-a4 { width: 100%; height: auto; }
.lp-out-stage-receipt { aspect-ratio: 1000 / 1414; }
.lp-paper-back { position: absolute; top: 0; left: 4%; width: 66%; height: auto; transform: rotate(-2.5deg); }
.lp-paper-strip { position: absolute; right: 0; bottom: 14%; width: 100%; height: auto; box-shadow: 0 2px 4px rgba(15,23,42,.10), 0 28px 56px -14px rgba(15,23,42,.38); }
.lp-out-stage:not([hidden]) .lp-paper { animation: lpPaperIn .5s cubic-bezier(.2,.7,.2,1) both; }
.lp-out-stage:not([hidden]) .lp-paper-strip { animation-delay: .1s; }
@keyframes lpPaperIn { from { opacity: 0; translate: 0 16px; } to { opacity: 1; translate: 0 0; } }

.lp-out-more { margin: 48px 0 0; display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 20px; font-size: 15px; color: var(--v2-ink-3); }
.lp-out-more a { color: var(--v2-ink); font-weight: 650; text-decoration: underline; text-decoration-color: var(--v2-ink-4, #b4b6bc); text-underline-offset: 4px; }
.lp-out-more a:hover { text-decoration-color: var(--v2-accent); }
.lp-hero .lp-out ~ .lp-trust-center { justify-content: flex-start; margin-top: 16px !important; }

.lp-vault { padding: 88px 0; }
.lp-vault-grid { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 64px; align-items: center; }
.lp .lp-vault-h2 { font-size: clamp(28px, 3vw, 40px); line-height: 1.2; letter-spacing: -.035em; font-weight: 800; color: var(--v2-ink); margin: 0 0 16px; word-break: keep-all; }
.lp .lp-vault-lede { font-size: 18px; line-height: 1.65; color: var(--v2-ink-2); margin: 0 0 24px; word-break: keep-all; }
.lp-vault-link { display: inline-flex; align-items: center; gap: 8px; min-height: 48px; font-size: 18px; font-weight: 700; color: var(--v2-accent); text-decoration: none; }
.lp-vault-shot { display: block; width: 100%; height: auto; border-radius: 14px; border: 1px solid var(--v2-line); box-shadow: 0 24px 48px -20px rgba(15,23,42,.25); }

@media (max-width: 900px) {
  .lp-out { grid-template-columns: minmax(0, 1fr); grid-template-rows: none; grid-template-areas: none; }
  .lp-out-copy { display: contents; }
  .lp-out-switch { order: 0; grid-area: auto; margin: 0 0 20px; }
  .lp .lp-out-h1 { order: 1; font-size: clamp(32px, 8.6vw, 44px); margin-bottom: 10px; }
  .lp .lp-out-sub { order: 2; font-size: 17px; margin-bottom: 20px; }
  .lp-out-stage { order: 3; grid-area: auto; max-height: 360px; overflow: hidden; margin: 0 -4px; padding: 4px 4px 0; -webkit-mask-image: linear-gradient(#000 78%, transparent); mask-image: linear-gradient(#000 78%, transparent); }
  .lp-out-stage-receipt { aspect-ratio: auto; height: 360px; }
  .lp-paper-back { width: 60%; }
  .lp-paper-strip { bottom: auto; top: 48%; }
  .lp-out-cta { order: 4; justify-content: center; width: 100%; margin-top: 4px; }
  .lp .lp-out-steps { order: 5; margin-top: 28px; max-width: none; }
  .lp-vault { padding: 56px 0; }
  .lp-vault-grid { grid-template-columns: minmax(0, 1fr); gap: 28px; }
}
@media (max-width: 520px) {
  .lp-out-switch { display: grid; grid-template-columns: 1fr 1fr; justify-self: stretch; }
  .lp-out-switch button { justify-content: center; padding: 0 12px; font-size: 16px; }
  .lp-out-h1 br, .lp-vault-h2 br { display: none; }
  .lp .lp-out-h1, .lp .lp-out-sub { text-align: center; margin-left: auto; margin-right: auto; }
  .lp-out-steps li { font-size: 15px; }
  .lp-out-steps small { display: none; }
  /* 단계 번호·라벨을 칸 가운데에 맞추고, 점선은 이웃한 번호 원 사이만 잇는다. */
  .lp-out-steps li { align-items: center; text-align: center; padding-right: 0; }
  .lp-out-steps li:not(:last-child)::after { left: calc(50% + 24px); right: calc(-50% + 24px); }
  /* 3단계 보조 문구는 좁은 칸에서 3줄로 꺾이므로 숨긴다(아래 신뢰 문구에 같은 정보가 있다). */
  .lp .lp-out-more { margin-top: 32px; justify-content: center; align-items: center; gap: 4px 16px; text-align: center; }
  .lp-hero .lp-out ~ .lp-trust-center { justify-content: center; margin-top: 20px !important; }
}
@media (prefers-reduced-motion: reduce) {
  .lp-out-stage:not([hidden]) .lp-paper { animation: none; }
  .lp-out-cta { transition: none; }
}

/* CSI 사진 검증 탭 (서비스 탭 안) */
.lp-panel-csi .lp-csi-points { margin: 0 0 24px; }
.lp-panel-copy .lp-csi-note { margin: 16px 0 0; font-size: 12px; line-height: 1.6; }

