/* PORTAL — shared with style.css (loaded first for :root variables + header/.wrap patterns) */

.portal-main {
  min-height: calc(100vh - 72px);
  background: var(--card-light);
  padding: 56px 0 80px;
}

.portal-card {
  background: #ffffff;
  border-radius: var(--radius-lg);
  padding: 48px 40px;
  border: 1px solid rgba(0,0,0,0.05);
  max-width: 560px;
  margin: 0 auto;
}

.portal-card-wide {
  max-width: 960px;
}

.portal-eyebrow {
  color: var(--accent);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.1em;
  margin: 0 0 10px;
}

.portal-card h1, .portal-card h2 {
  font-size: 26px;
  font-weight: 900;
  margin: 0 0 12px;
}

.portal-card p.lead {
  color: var(--text-muted-dark);
  font-size: 15px;
  margin: 0 0 32px;
}

/* FORM */
.portal-form label {
  display: block;
  font-size: 14px;
  font-weight: 700;
  margin: 20px 0 8px;
}

.portal-form label:first-of-type { margin-top: 0; }

.portal-form input[type="text"],
.portal-form input[type="tel"],
.portal-form input[type="email"],
.portal-form input[type="password"],
.portal-form input[type="file"],
.portal-form textarea {
  width: 100%;
  padding: 13px 16px;
  border-radius: 10px;
  border: 1px solid rgba(0,0,0,0.12);
  font-size: 15px;
  font-family: inherit;
  background: #fbfbfc;
}

.portal-form input:focus,
.portal-form textarea:focus {
  outline: none;
  border-color: var(--accent);
  background: #ffffff;
}

.portal-form textarea { resize: vertical; min-height: 90px; }

.portal-form select {
  width: 100%;
  padding: 13px 16px;
  border-radius: 10px;
  border: 1px solid rgba(0,0,0,0.12);
  font-size: 15px;
  font-family: inherit;
  background: #fbfbfc;
}

.portal-form select:focus { outline: none; border-color: var(--accent); background: #ffffff; }

.form-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 16px;
}

@media (max-width: 640px) {
  .form-grid-2 { grid-template-columns: 1fr; }
}

.portal-form .hint {
  font-size: 12.5px;
  color: var(--text-muted-dark);
  margin-top: 6px;
}

.portal-btn {
  display: inline-block;
  width: 100%;
  margin-top: 32px;
  padding: 15px 24px;
  border-radius: 999px;
  border: none;
  font-weight: 800;
  font-size: 15.5px;
  cursor: pointer;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #08131c;
  transition: opacity 0.15s ease;
}

.portal-btn:hover { opacity: 0.9; }
.portal-btn:disabled { opacity: 0.5; cursor: not-allowed; }

.portal-btn-outline {
  background: transparent;
  border: 1px solid rgba(0,0,0,0.15);
  color: var(--text-dark);
}

.portal-link-row {
  text-align: center;
  margin-top: 20px;
  font-size: 14px;
  color: var(--text-muted-dark);
}

.portal-link-row a { color: var(--accent); font-weight: 700; }

.portal-error {
  background: rgba(220, 38, 38, 0.08);
  border: 1px solid rgba(220, 38, 38, 0.25);
  color: #b91c1c;
  padding: 12px 16px;
  border-radius: 10px;
  font-size: 13.5px;
  margin-top: 20px;
  display: none;
}

.portal-error.show { display: block; }

.portal-success {
  background: rgba(47, 163, 232, 0.08);
  border: 1px solid rgba(47, 163, 232, 0.25);
  color: #0e5a86;
  padding: 12px 16px;
  border-radius: 10px;
  font-size: 13.5px;
  margin-top: 20px;
  display: none;
}

.portal-success.show { display: block; }

/* STATUS SCREENS (pending / rejected) */
.portal-status-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  margin: 0 auto 20px;
}

.portal-status-icon.pending { background: rgba(234, 179, 8, 0.12); }
.portal-status-icon.rejected { background: rgba(220, 38, 38, 0.12); }

.portal-card.center { text-align: center; }

/* GRADE BADGE */
.grade-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  border-radius: 999px;
  background: var(--navy);
  color: var(--text-light);
  font-weight: 800;
  font-size: 14px;
}

.grade-badge .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent-2); }

/* GRADE TIERS — badges get progressively more elaborate from Rookie (tier-0) to Master (tier-4) */
.grade-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 12px;
  border-radius: 999px;
  font-weight: 800;
  font-size: 12px;
}

.grade-tier-0 { background: var(--navy); color: var(--text-light); }
.grade-tier-0 .dot { background: #8a94a6; }

.grade-tier-1 {
  background: linear-gradient(135deg, #24344f, #3b5578);
  color: var(--text-light);
}
.grade-tier-1 .dot { background: #6fc6f2; }

.grade-tier-2 {
  background: linear-gradient(135deg, #14507e, #2fa3e8);
  color: #ffffff;
  box-shadow: 0 2px 14px rgba(47, 163, 232, 0.35);
}
.grade-tier-2 .dot { background: #eaf6ff; }

.grade-tier-3 {
  background: linear-gradient(135deg, #92650a, #e0a936 45%, #f4d580);
  color: #2a1c02;
  box-shadow: 0 3px 18px rgba(224, 169, 54, 0.45);
}
.grade-tier-3 .dot { background: #2a1c02; }

.grade-tier-4 {
  position: relative;
  background: linear-gradient(120deg, #7b2ff7, #f107a3 35%, #f4d580 70%, #2fa3e8);
  background-size: 300% 300%;
  color: #ffffff;
  box-shadow: 0 4px 22px rgba(241, 7, 163, 0.4), 0 0 0 1px rgba(255,255,255,0.25) inset;
  animation: grade-tier-4-shift 5s ease infinite;
}
.grade-tier-4 .dot { background: #ffffff; box-shadow: 0 0 6px rgba(255,255,255,0.9); }
.grade-tier-4::before { content: "✦"; font-size: 0.9em; }

@keyframes grade-tier-4-shift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

@media (prefers-reduced-motion: reduce) {
  .grade-tier-4 { animation: none; }
}

.grade-badge.grade-tier-3 .dot,
.grade-badge.grade-tier-4 .dot { background: #ffffff; }

/* TABLES (admin console, leaderboard) */
.portal-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.portal-table th {
  text-align: left;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--text-muted-dark);
  text-transform: uppercase;
  padding: 10px 14px;
  border-bottom: 2px solid rgba(0,0,0,0.06);
}

.portal-table td {
  padding: 14px;
  border-bottom: 1px solid rgba(0,0,0,0.06);
  vertical-align: middle;
}

#appsTable th, #appsTable td { min-width: 100px; }

.portal-table tr:last-child td { border-bottom: none; }

.portal-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.portal-badge.pending { background: rgba(234, 179, 8, 0.12); color: #92650a; }
.portal-badge.approved { background: rgba(34, 197, 94, 0.12); color: #15803d; }
.portal-badge.rejected { background: rgba(220, 38, 38, 0.12); color: #b91c1c; }

.portal-table-actions { display: flex; gap: 8px; }

.portal-btn-sm {
  padding: 7px 16px;
  border-radius: 999px;
  border: none;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
}

.portal-btn-sm.approve { background: rgba(34, 197, 94, 0.12); color: #15803d; }
.portal-btn-sm.reject { background: rgba(220, 38, 38, 0.12); color: #b91c1c; }
.portal-btn-sm:hover { opacity: 0.85; }

.portal-empty {
  text-align: center;
  padding: 48px 20px;
  color: var(--text-muted-dark);
  font-size: 14px;
}

.portal-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 28px;
  border-bottom: 1px solid rgba(0,0,0,0.08);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.portal-tabs::-webkit-scrollbar { display: none; }

.portal-tab {
  padding: 12px 18px;
  font-weight: 700;
  font-size: 14px;
  color: var(--text-muted-dark);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
  flex-shrink: 0;
}

.portal-tab.active { color: var(--text-dark); border-bottom-color: var(--accent); }

/* DASHBOARD */
.dash-stat {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  padding: 24px;
  background: var(--card-light);
  border-radius: var(--radius-lg);
  margin-bottom: 36px;
}

.dash-stat-sub {
  margin: 0;
  font-size: 14.5px;
  color: var(--text-muted-dark);
}

.dash-stat-sub strong { color: var(--text-dark); font-size: 17px; }

.portal-section-title {
  font-size: 18px;
  font-weight: 800;
  margin: 40px 0 16px;
}

.portal-section-title:first-of-type { margin-top: 0; }

.portal-divider {
  border: none;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  margin: 36px 0 0;
}

.sc-cal-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 14px;
}

.sc-cal-nav strong { font-size: 15px; min-width: 110px; text-align: center; }

.sc-cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}

.sc-cal-weekday {
  text-align: center;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted-dark);
  padding: 4px 0 8px;
}

.sc-cal-cell {
  min-height: 84px;
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 8px;
  padding: 6px;
  background: #fff;
}

.sc-cal-cell.sc-cal-outside { background: rgba(0, 0, 0, 0.02); }
.sc-cal-cell.sc-cal-today { border-color: var(--accent, #2fa3e8); }

.sc-cal-daynum { font-size: 12px; font-weight: 700; margin-bottom: 4px; }
.sc-cal-outside .sc-cal-daynum { color: var(--text-muted-dark); }

.sc-cal-chip {
  display: block;
  width: 100%;
  text-align: left;
  font-size: 11px;
  line-height: 1.4;
  background: rgba(47, 163, 232, 0.1);
  color: var(--text-dark);
  border: none;
  border-radius: 5px;
  padding: 2px 5px;
  margin-bottom: 3px;
  cursor: pointer;
}

.sc-cal-chip:hover { background: rgba(47, 163, 232, 0.2); }

@media (max-width: 640px) {
  .sc-cal-grid { gap: 2px; }
  .sc-cal-cell { min-height: 52px; padding: 3px; border-radius: 6px; }
  .sc-cal-weekday { font-size: 10.5px; padding: 2px 0 6px; }
  .sc-cal-daynum { font-size: 10.5px; margin-bottom: 2px; }
  .sc-cal-chip { font-size: 9px; padding: 1px 3px; line-height: 1.3; }
  .sc-cal-nav { gap: 10px; }
  .sc-cal-nav strong { min-width: 90px; font-size: 13.5px; }
}

.lb-row-self { background: rgba(47, 163, 232, 0.06); }
.lb-row-self td:first-child { font-weight: 800; }

.announcement-item {
  padding: 18px 0;
  border-bottom: 1px solid rgba(0,0,0,0.06);
}

.announcement-item:last-child { border-bottom: none; }

.ann-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  padding: 0;
  background: none;
  border: none;
  font: inherit;
  text-align: left;
  cursor: pointer;
  color: inherit;
}

.ann-toggle-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
}

.ann-caret {
  font-size: 12px;
  color: var(--text-muted-dark);
  transition: transform 0.15s ease;
  display: inline-block;
}

.ann-toggle.open .ann-caret { transform: rotate(180deg); }

.announcement-item .ann-title {
  font-weight: 800;
  font-size: 15.5px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.announcement-item .ann-date {
  font-size: 12.5px;
  color: var(--text-muted-dark);
  font-weight: 500;
  white-space: nowrap;
}

.announcement-item .ann-content {
  margin: 14px 0 0;
}

.announcement-item .ann-content .ann-heading {
  font-family: "Noto Serif KR", serif;
  font-weight: 800;
  color: var(--accent);
  font-size: 15px;
  margin: 18px 0 6px;
  letter-spacing: -0.01em;
}

.announcement-item .ann-content .ann-heading:first-child { margin-top: 0; }

.announcement-item .ann-content .ann-body {
  font-size: 14px;
  color: var(--text-muted-dark);
  line-height: 1.8;
  margin: 0 0 10px;
}

.announcement-item .ann-content .ann-body:last-child { margin-bottom: 0; }

.pin-badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  background: rgba(234, 179, 8, 0.15);
  color: #92650a;
}

.tm-feed-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.tm-card {
  background: #fff;
  border: 1px solid rgba(0,0,0,0.07);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.tm-card-hero {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  background: var(--card-light);
  cursor: zoom-in;
}

.tm-card-hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.tm-card-hero .tm-progress-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(10,14,26,0.72);
  color: #fff;
  backdrop-filter: blur(2px);
}
.tm-card-hero .tm-progress-badge.tm-progress-done { background: rgba(21,128,61,0.85); color: #fff; }
.tm-card-hero .tm-progress-badge.tm-progress-active { background: rgba(26,110,168,0.85); color: #fff; }

.tm-card-body {
  padding: 16px 18px 18px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.tm-card-title { margin: 12px 0 6px; font-size: 20px; font-weight: 800; line-height: 1.35; color: var(--text-dark, #1c2333); }
.tm-card-lead { -webkit-line-clamp: 3 !important; font-weight: 500 !important; white-space: normal; }
.tm-card-headline {
  margin: 0;
  font-size: 15.5px;
  font-weight: 800;
  line-height: 1.45;
  color: var(--text-dark, #1c2333);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.tm-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  margin-top: 10px;
}

.tm-card-id {
  font-weight: 700;
  font-size: 12.5px;
  color: var(--text-muted-dark);
  line-height: 1.4;
}

.tm-card-firm {
  display: block;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-muted-dark);
  margin-top: 2px;
}

.tm-card-secondary-img {
  margin-top: 10px;
  width: 84px;
  height: 60px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid rgba(0,0,0,0.08);
  cursor: zoom-in;
}

.tm-progress-badge {
  flex: 0 0 auto;
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
  background: rgba(60, 67, 86, 0.08);
  color: var(--text-muted-dark);
}

.tm-progress-badge.tm-progress-done { background: rgba(34, 197, 94, 0.14); color: #15803d; }
.tm-progress-badge.tm-progress-active { background: rgba(47, 163, 232, 0.14); color: #1a6ea8; }

.tm-card-highlight {
  margin-top: 10px;
  font-size: 13px;
  color: var(--text-muted-dark);
}

.tm-card-highlight strong {
  color: #15803d;
  font-size: 15px;
  font-weight: 800;
}

.tm-card-toggle {
  margin-top: 12px;
  padding: 0;
  background: none;
  border: none;
  font: inherit;
  font-weight: 700;
  font-size: 12.5px;
  color: var(--accent);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  align-self: flex-start;
}

.tm-card-toggle .ann-caret { font-size: 11px; transition: transform 0.15s ease; }
.tm-card-toggle.open .ann-caret { transform: rotate(180deg); }

.tm-card-detail {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(0,0,0,0.06);
}

.tm-card-qa {
  margin: 0 0 12px;
}

.tm-card-qa:last-child { margin-bottom: 0; }

.tm-card-qa-label {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--accent);
  margin: 0 0 3px;
}

.tm-card-qa-body {
  font-size: 13px;
  line-height: 1.7;
  color: var(--text-muted-dark);
  white-space: pre-line;
}


.portal-form-inline {
  display: flex;
  gap: 8px;
  align-items: center;
}

.portal-form-inline input[type="number"] {
  width: 80px;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid rgba(0,0,0,0.15);
  font-family: inherit;
}

.portal-form-inline select {
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid rgba(0,0,0,0.15);
  font-family: inherit;
  font-size: 13px;
}

@media (max-width: 640px) {
  .portal-card { padding: 32px 22px; }
  .portal-table { font-size: 13px; }
  .portal-table th, .portal-table td { padding: 10px 8px; }
}

/* Prop firm structured content (pricing tables + rule cards) — HEDGE PROP ACADEMY brand tone:
   gradient accent pills, generous radius, navy/blue family only (no rainbow badges). */
.pf-tab-block { margin: 24px 0 36px; }

.pf-tabs {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  background: var(--card-light);
  border-radius: 999px;
  margin: 0 0 20px;
}

.pf-tab {
  border: none;
  background: transparent;
  color: var(--text-muted-dark);
  font-weight: 700;
  font-size: 13.5px;
  padding: 9px 22px;
  border-radius: 999px;
  cursor: pointer;
  font-family: inherit;
  transition: opacity 0.15s ease;
}
.pf-tab.active {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #08131c;
  font-weight: 800;
}

.pf-table-wrap {
  overflow-x: auto;
  border-radius: var(--radius-md);
  border: 1px solid rgba(18,21,28,0.08);
}
.pf-table { width: 100%; table-layout: fixed; border-collapse: collapse; font-size: 13.5px; min-width: 640px; }
.pf-table th, .pf-table td { padding: 13px 14px; text-align: center; }
.pf-table td:first-child, .pf-table th:first-child { width: 28%; }
.pf-table thead th {
  background: linear-gradient(135deg, var(--navy), var(--navy-2));
  color: var(--text-light);
  font-weight: 700;
  font-size: 12.5px;
  letter-spacing: 0.04em;
}
.pf-table td:first-child, .pf-table th:first-child { text-align: left; font-weight: 700; white-space: normal; }
.pf-table tbody tr { border-top: 1px solid rgba(18,21,28,0.06); }
.pf-table tr.pf-section td {
  background: rgba(47,163,232,0.06);
  font-weight: 800;
  color: var(--accent);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.pf-table .v-muted { color: var(--text-muted-dark); text-decoration: line-through; }
.pf-table .chip {
  display: inline-block;
  font-weight: 800;
  padding: 3px 11px;
  border-radius: 999px;
  font-size: 12.5px;
}
.pf-table .chip-accent { background: rgba(47,163,232,0.12); color: #1c6ea4; }
.pf-table .chip-risk { background: rgba(220,38,38,0.1); color: #b91c1c; }
.pf-table-note { padding: 24px; color: var(--text-muted-dark); font-size: 13.5px; text-align: center; }

.pf-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 8px; }
@media (max-width: 900px) { .pf-cards { grid-template-columns: 1fr; } }
.pf-card {
  position: relative;
  background: #ffffff;
  border: 1px solid rgba(18,21,28,0.08);
  border-radius: var(--radius-md);
  padding: 22px 20px 20px;
  overflow: hidden;
}
.pf-card::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
}
.pf-card h4 { margin: 6px 0 6px; font-size: 15.5px; color: var(--text-dark); }
.pf-card p { margin: 0; font-size: 13.5px; line-height: 1.65; color: var(--text-muted-dark); }

.pf-badge, .pf-badge[class*="badge-"] {
  display: block;
  font-size: 11.5px;
  font-weight: 800;
  color: var(--accent);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  background: none;
  padding: 0;
}

@media (max-width: 640px) {
  .pf-table { font-size: 12.5px; }
  .pf-table th, .pf-table td { padding: 9px 10px; }
}

/* 주간 코멘트 */
.wk-stars { display: inline-flex; gap: 2px; }
.wk-stars button { background: none; border: 0; padding: 0 1px; font-size: 20px; line-height: 1; color: #c9cfd8; cursor: pointer; }
.wk-stars button.on { color: #f2b01e; }
.wk-chips { display: inline-flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.wk-chip { border: 1px solid rgba(0,0,0,0.15); background: #fff; border-radius: 999px; padding: 4px 12px; font-size: 13px; cursor: pointer; }
.wk-chip.on { background: var(--navy); color: #fff; border-color: var(--navy); }
.wk-chips input { width: 64px; padding: 4px 8px; font-size: 13px; }
.wk-note { width: 220px; padding: 6px 8px; font-size: 13px; border: 1px solid rgba(0,0,0,0.12); border-radius: 6px; }
.wk-card-section { margin: 0 0 14px; }
.wk-card-section h3 { font-size: 14px; margin: 0 0 4px; }
.wk-card-section p { margin: 0; font-size: 14px; white-space: pre-line; }
.wk-card-meta { display: flex; gap: 24px; flex-wrap: wrap; font-size: 14px; }
.wk-card-note { font-size: 12.5px; color: var(--text-muted-dark); margin-top: 12px; }

/* 주간·월별 리포트는 쌓이면 길어져서 접어 둔다. 제목을 누르면 펼쳐진다. */
.report-fold {
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 10px;
  background: #fff;
  margin-bottom: 10px;
  overflow: hidden;
}
.report-fold > summary {
  list-style: none;
  cursor: pointer;
  padding: 13px 16px;
  font-size: 13.5px;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.report-fold > summary::-webkit-details-marker { display: none; }
.report-fold > summary::before {
  content: "▸";
  font-size: 12px;
  color: var(--text-muted-dark, #6b7280);
  transition: transform 0.15s ease;
}
.report-fold[open] > summary::before { transform: rotate(90deg); }
.report-fold > summary:hover { background: rgba(0, 0, 0, 0.02); }
.report-fold[open] > summary { border-bottom: 1px solid rgba(0, 0, 0, 0.06); }
.report-fold-body { padding: 16px; }

/* 달 폴더. 그 안에 주차 리포트가 들어간다. */
.report-month {
  background: #f8fafc;
  border-color: rgba(0, 0, 0, 0.12);
}
.report-month > summary { font-size: 14px; }
.report-month > .report-fold-body { padding: 12px; }
.report-month .report-fold { background: #fff; margin-bottom: 8px; }
.report-month .report-fold:last-child { margin-bottom: 0; }
.report-count {
  margin-left: auto;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted-dark, #6b7280);
}

/* 운영진 콘솔 세로 메뉴. 아래로 스크롤해도 왼쪽에 붙어 있는다. */
.admin-shell {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  gap: 28px;
  align-items: start;
  margin-top: 20px;
}
.admin-nav {
  position: sticky;
  top: 90px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding-right: 16px;
  border-right: 1px solid rgba(0, 0, 0, 0.08);
}
.admin-nav-top,
.admin-nav-sub {
  display: block;
  width: 100%;
  text-align: left;
  background: none;
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  font-family: inherit;
  color: inherit;
}
.admin-nav-top {
  padding: 9px 10px;
  font-size: 13.5px;
  font-weight: 800;
}
.admin-nav-top:hover { background: rgba(0, 0, 0, 0.04); }
.admin-nav-top.on { background: var(--navy, #0e1424); color: #fff; }
.admin-nav-subs { display: none; margin: 2px 0 6px 10px; }
.admin-nav-group.open .admin-nav-subs { display: block; }
.admin-nav-sub {
  padding: 7px 10px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-muted-dark, #6b7280);
}
.admin-nav-sub:hover { background: rgba(0, 0, 0, 0.04); }
.admin-nav-sub.on { color: var(--navy, #0e1424); font-weight: 800; background: rgba(47, 163, 232, 0.12); }
.admin-subsection > .portal-section-title:first-child { margin-top: 0; }

@media (max-width: 900px) {
  .admin-shell { grid-template-columns: 1fr; gap: 16px; }
  .admin-nav {
    position: static;
    padding: 0 0 14px;
    border-right: 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  }
}

/* 세로 메뉴가 생기면 카드를 넓히고, 표는 본문 안에서 가로 스크롤한다. */
.admin-card { max-width: 1280px; }
.admin-content { min-width: 0; }
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.admin-content .portal-table th { white-space: nowrap; }
.admin-content .portal-table td:first-child,
.admin-content .portal-table td:nth-child(2) { white-space: nowrap; }

/* 운영진 화면은 표가 많아 폭을 더 쓴다 */
.admin-wrap { max-width: 1340px; }
.admin-card { max-width: none; padding: 40px 30px; }
.admin-shell { grid-template-columns: 170px minmax(0, 1fr); gap: 22px; }
.admin-nav { padding-right: 12px; }
.admin-content .portal-table th { padding: 10px 10px; }
.admin-content .portal-table td { padding: 12px 10px; }
.admin-content .portal-table th { padding: 10px 8px; }
.admin-content .portal-table td { padding: 12px 8px; }
.admin-content .portal-table select { max-width: 128px; }
.admin-content .portal-table input[type="number"],
.admin-content .portal-table input[type="text"] { max-width: 88px; }

/* ---- 장부 기입 (ledger.html): 엑셀 3시트를 화면에, 모바일은 카드형 ---- */
.lg-card { max-width: 1240px; }
.lg-tabs { margin-bottom: 20px; }
.lg-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(128px, 1fr)); gap: 10px; margin-bottom: 16px; }
.lg-tile { background: #fff; border: 1px solid rgba(0,0,0,0.06); border-radius: 12px; padding: 12px 14px; }
.lg-tile-label { font-size: 11.5px; color: var(--text-muted-dark); margin: 0 0 4px; }
.lg-tile-value { font-size: 17px; font-weight: 800; margin: 0; }
.lg-toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 0 0 14px; }
.lg-toolbar .lg-btn-accent { margin-left: auto; }
.lg-seg { display: inline-flex; border: 1px solid rgba(0,0,0,0.12); border-radius: 999px; overflow: hidden; }
.lg-seg-btn { border: 0; background: #fff; padding: 7px 14px; font-weight: 700; font-size: 13px; cursor: pointer; font-family: inherit; color: var(--text-muted-dark); }
.lg-seg-btn.active { background: var(--navy, #0e1424); color: #fff; }
.lg-check { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; margin: 0; cursor: pointer; }
.lg-check input { width: auto; margin: 0; }
.lg-btn-accent { background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #08131c; border: 0; font-weight: 800; }
.lg-btn { width: auto; padding: 11px 22px; margin: 0; }
.lg-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 12px; }
.lg-status { font-size: 13px; color: var(--text-muted-dark); }
.lg-form { background: rgba(47,163,232,0.06); border: 1px solid rgba(47,163,232,0.18); border-radius: 12px; padding: 16px; margin: 0 0 16px; }
.lg-grid-form { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px 12px; }
.lg-grid-form label, .lg-acc-grid label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; font-weight: 700; color: var(--text-muted-dark); margin: 0; }
.lg-grid-form input, .lg-grid-form select, .lg-acc-grid input, .lg-acc-grid select { width: 100%; padding: 9px 10px; border: 1px solid rgba(0,0,0,0.15); border-radius: 8px; font-family: inherit; font-size: 14px; font-weight: 600; color: var(--text-dark, #111); background: #fff; }
.lg-span2 { grid-column: span 2; }
.lg-acc { background: #fff; border: 1px solid rgba(0,0,0,0.08); border-radius: 14px; padding: 16px; margin-bottom: 14px; }
.lg-acc.closed { opacity: 0.72; }
.lg-acc.dirty { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(47,163,232,0.12); }
.lg-acc-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; align-items: center; margin-bottom: 12px; }
.lg-acc-head-right { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.lg-acc-title { font-size: 15px; margin-left: 6px; }
.lg-acc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px 12px; }
.lg-auto { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; margin: 12px 0; background: rgba(0,0,0,0.025); border-radius: 10px; padding: 10px 12px; }
.lg-auto div { display: flex; justify-content: space-between; gap: 8px; font-size: 12.5px; padding: 4px 0; border-bottom: 1px dashed rgba(0,0,0,0.08); }
.lg-auto div span { color: var(--text-muted-dark); }
.lg-auto div b { font-weight: 800; white-space: nowrap; }
.lg-rounds { border-top: 1px solid rgba(0,0,0,0.06); padding-top: 12px; }
.lg-rounds-head { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: baseline; margin-bottom: 6px; }
.lg-round-table th, .lg-round-table td { padding: 6px 6px; white-space: nowrap; }
.lg-round-table input { width: 100%; min-width: 96px; padding: 7px 8px; border: 1px solid rgba(0,0,0,0.15); border-radius: 8px; font-family: inherit; font-size: 13.5px; }
.lg-round-table input[type="date"] { min-width: 140px; }
.lg-x { border: 0; background: rgba(220,38,38,0.1); color: #b91c1c; border-radius: 8px; width: 30px; height: 30px; cursor: pointer; font-weight: 800; }
.lg-warn { background: rgba(234,179,8,0.12); border: 1px solid rgba(234,179,8,0.3); border-radius: 10px; padding: 10px 12px; font-size: 13px; color: #92650a; line-height: 1.6; margin-top: 10px; }
.lg-badge { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 11.5px; font-weight: 800; vertical-align: middle; }
.lg-badge.stage-ch { background: rgba(234,179,8,0.14); color: #92650a; }
.lg-badge.stage-fd { background: rgba(47,163,232,0.14); color: #1a6ea8; }
.lg-badge.status-운용중 { background: rgba(34,197,94,0.14); color: #15803d; }
.lg-badge.status-출금대기 { background: rgba(234,179,8,0.14); color: #92650a; }
.lg-badge.status-탈락 { background: rgba(220,38,38,0.12); color: #b91c1c; }
.lg-badge.status-종료, .lg-badge.status-통과 { background: rgba(0,0,0,0.08); color: #444; }
.lg-group-title { font-size: 15px; font-weight: 800; margin: 18px 0 10px; display: flex; gap: 8px; align-items: center; }
.lg-subtotal td { font-weight: 800; background: rgba(0,0,0,0.03); }
.lg-cards th { white-space: nowrap; }
@media (max-width: 720px) {
  .lg-card { padding: 26px 16px; }
  .lg-tiles { grid-template-columns: repeat(2, 1fr); }
  .lg-tile-value { font-size: 15px; }
  .lg-span2 { grid-column: span 1; }
  .lg-grid-form, .lg-acc-grid { grid-template-columns: 1fr 1fr; }
  .lg-auto { grid-template-columns: 1fr; }
  .lg-toolbar .lg-btn-accent { margin-left: 0; width: 100%; }
  .lg-btn { width: 100%; }
  /* 표 → 카드: 각 행이 한 장, 칸마다 라벨 */
  .lg-cards, .lg-cards tbody, .lg-cards tr, .lg-cards td { display: block; width: 100%; }
  .lg-cards thead { display: none; }
  .lg-cards tr { border: 1px solid rgba(0,0,0,0.08); border-radius: 12px; padding: 10px 12px; margin-bottom: 10px; background: #fff; }
  .lg-cards td { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; border-bottom: 1px dashed rgba(0,0,0,0.06); text-align: right; }
  .lg-cards td:last-child { border-bottom: 0; }
  .lg-cards td[data-label]::before { content: attr(data-label); color: var(--text-muted-dark); font-size: 12px; font-weight: 700; text-align: left; flex-shrink: 0; }
  .lg-cards td:empty { display: none; }
  .lg-cards td .portal-table-actions { width: 100%; justify-content: flex-end; }
  .lg-round-table th, .lg-round-table td { padding: 5px 4px; }
  .lg-round-table input { min-width: 84px; font-size: 13px; }
}
@media (max-width: 420px) {
  .lg-grid-form, .lg-acc-grid { grid-template-columns: 1fr; }
}

/* 모바일에서 정산 회차 표도 카드로 */
@media (max-width: 720px) {
  .lg-round-table, .lg-round-table tbody, .lg-round-table tr, .lg-round-table td { display: block; width: 100%; }
  .lg-round-table thead { display: none; }
  .lg-round-table tr { border: 1px solid rgba(0,0,0,0.08); border-radius: 10px; padding: 8px 10px; margin-bottom: 8px; background: rgba(0,0,0,0.015); position: relative; }
  .lg-round-table td { display: grid; grid-template-columns: 96px 1fr; align-items: center; gap: 10px; padding: 5px 0; border: 0; }
  .lg-round-table td[data-label]::before { content: attr(data-label); color: var(--text-muted-dark); font-size: 12px; font-weight: 700; }
  .lg-round-table td:first-child { font-weight: 800; display: block; padding-bottom: 6px; border-bottom: 1px dashed rgba(0,0,0,0.08); margin-bottom: 4px; }
  .lg-round-table td:last-child { position: absolute; top: 6px; right: 8px; width: auto; display: block; padding: 0; }
  .lg-round-table input { min-width: 0; }
  .lg-round-none td { display: block; grid-template-columns: none; }
}


/* ---- 운영관리 장부: 엑셀형 표 ---- */
.lg-sheet-title { font-size: 17px; font-weight: 900; margin: 0 0 14px; }
.lg-sheet { margin-bottom: 8px; }
.lg-sheet-head { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; margin: 0 0 10px; }
.lg-sheet-head h3 { font-size: 15px; font-weight: 800; margin: 0; display: flex; gap: 8px; align-items: center; }
.lg-xl-scroll { border: 1px solid rgba(0,0,0,0.08); border-radius: 12px; background: #fff; }
.lg-ops-table { font-size: 13px; }
.lg-ops-table th { position: sticky; top: 0; background: #f3f5f8; z-index: 2; white-space: normal; line-height: 1.35; font-size: 11px; padding: 8px 8px; text-transform: none; letter-spacing: 0; vertical-align: bottom; }
.lg-ops-table td { padding: 6px 8px; vertical-align: middle; white-space: nowrap; }
.lg-ops-table th.lg-auto-col, .lg-ops-table td.lg-auto-col { background: rgba(0,0,0,0.035); font-weight: 700; text-align: right; }
.lg-auto-tag { display: block; font-size: 10px; font-weight: 700; color: #1a6ea8; margin-top: 2px; }
.lg-ops-table .lg-in { width: 100%; min-width: 88px; padding: 7px 8px; border: 1px solid rgba(0,0,0,0.15); border-radius: 7px; font-family: inherit; font-size: 13px; font-weight: 600; background: #fff; }
.lg-ops-table .lg-ref { min-width: 96px; font-weight: 800; }
.lg-ref-sub { display: block; font-size: 10.5px; color: var(--text-muted-dark); margin-top: 3px; white-space: nowrap; }
.lg-ops-table th.lg-sticky, .lg-ops-table td.lg-sticky { position: sticky; left: 0; background: #fff; z-index: 3; box-shadow: 1px 0 0 rgba(0,0,0,0.08); }
.lg-ops-table th.lg-sticky { background: #f3f5f8; z-index: 4; }
.lg-ops-row.dirty td.lg-sticky, .lg-ops-row.dirty td { background-color: rgba(47,163,232,0.05); }
.lg-ops-row.closed { opacity: 0.6; }
.lg-manage-col .portal-table-actions { flex-wrap: nowrap; }
.lg-step { background: rgba(47,163,232,0.05); border: 1px solid rgba(47,163,232,0.16); border-radius: 14px; padding: 20px; }
.lg-step-no { display: inline-block; background: var(--navy, #0e1424); color: #fff; font-size: 11px; font-weight: 800; padding: 3px 12px; border-radius: 999px; margin: 0 0 10px; }
.lg-mobile-only { display: none; }
@media (max-width: 720px) {
  .lg-mobile-only { display: block; }
  .lg-xl-scroll { border: 0; background: transparent; }
  .lg-ops-table, .lg-ops-table tbody, .lg-ops-table tr, .lg-ops-table td { display: block; width: 100%; }
  .lg-ops-table thead { display: none; }
  .lg-ops-table tr { border: 1px solid rgba(0,0,0,0.1); border-radius: 12px; padding: 12px 14px; margin-bottom: 14px; background: #fff; }
  .lg-ops-table td { display: grid; grid-template-columns: 1fr 140px; align-items: center; gap: 10px; padding: 5px 0; border-bottom: 1px dashed rgba(0,0,0,0.06); white-space: normal; }
  .lg-ops-table td::before { content: attr(data-label); font-size: 12px; font-weight: 700; color: var(--text-muted-dark); }
  .lg-ops-table td.lg-auto-col { background: transparent; text-align: right; }
  .lg-ops-table td.lg-sticky { position: static; box-shadow: none; }
  .lg-ops-table td.lg-sticky::before { content: attr(data-label); }
  .lg-ops-table .lg-in { min-width: 0; }
  .lg-ref-sub { grid-column: 1 / -1; text-align: left; white-space: normal; }
  .lg-manage-col { display: block !important; }
  .lg-manage-col::before { display: none; }
  .lg-manage-col .portal-table-actions { flex-wrap: wrap; justify-content: stretch; }
  .lg-manage-col .portal-btn-sm { flex: 1; }
  .lg-sheet-head .portal-btn-sm { width: 100%; }
  .lg-step { padding: 16px; }
}

/* 휴대폰: 아직 쓰지 않은 회차 칸은 접어 둔다 */
.lg-more-btn { display: none; }
@media (max-width: 720px) {
  .lg-more-btn { display: inline-block; }
  .lg-ops-row:not(.show-all) td[data-extra] { display: none; }
}

/* 장부: 탭 보조 라벨, 접이식 계좌 등록 */
.lg-tab-sub { display: inline-block; font-size: 10.5px; font-weight: 700; color: #1a6ea8; background: rgba(47,163,232,0.14); border-radius: 999px; padding: 2px 8px; margin-left: 4px; vertical-align: middle; }
.lg-fold-btn { width: 100%; text-align: left; background: none; border: 0; font-family: inherit; font-size: 15px; font-weight: 800; cursor: pointer; padding: 0; display: flex; justify-content: space-between; align-items: center; gap: 10px; color: inherit; }
.lg-fold-mark { font-size: 12px; font-weight: 700; color: #1a6ea8; background: rgba(47,163,232,0.14); border-radius: 999px; padding: 4px 12px; flex-shrink: 0; }

/* 운영현황 경고 줄 */
.lg-warn-row td { padding: 0 8px 10px; background: #fff; }
.lg-warn-row .lg-warn { margin: 0; }
@media (max-width: 720px) {
  .lg-warn-row { display: block; width: 100%; margin: -8px 0 14px; }
  .lg-warn-row td { display: block; padding: 0; background: transparent; }
  .lg-warn-row td::before { display: none; }
}

.lg-ops-table td.lg-strong-col, .lg-ops-table th.lg-strong-col { font-weight: 900; background: rgba(47,163,232,0.07); }

/* 관리 칸: 삭제는 작게, 누르면 빨갛게 */
.lg-ops-table .lg-x { width: 28px; height: 28px; font-size: 13px; background: rgba(0,0,0,0.05); color: var(--text-muted-dark); }
.lg-ops-table .lg-x.lg-x-armed { background: #b91c1c; color: #fff; }
.lg-manage-col .portal-table-actions { gap: 6px; align-items: center; }

/* ---- 휴대폰 사용성 ----
   1) 입력칸 글자가 16px 미만이면 iOS 사파리가 화면을 확대한다. 16px 로 고정한다.
   2) 체크박스와 작은 버튼의 터치 영역을 넓힌다. */
@media (max-width: 720px) {
  input, select, textarea,
  .lg-ops-table .lg-in, .lg-grid-form input, .lg-grid-form select,
  .lg-round-table input, .portal-table input, .portal-table select {
    font-size: 16px;
  }
  input[type="checkbox"] {
    width: 20px;
    height: 20px;
    min-width: 20px;
    accent-color: var(--accent, #2fa3e8);
  }
  .lg-check, label:has(> input[type="checkbox"]) {
    min-height: 44px;
    display: flex;
    align-items: center;
    gap: 10px;
  }
  .portal-btn-sm, .lg-seg-btn, .portal-tab {
    min-height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
  .portal-tab { padding: 10px 14px; }
  .lg-x { min-height: 36px; }
}

/* ── 계산식 안내 패널 (주간 데이터 요약 · 회원 운용관리 공용) ───────────── */
.hp-metrics { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px; }
.hp-tile { background: #fff; border: 1px solid rgba(10,14,26,.08); border-radius: 12px; padding: 12px 14px; }
.hp-tile-label { font-size: 11.5px; font-weight: 700; color: var(--text-muted-dark); margin: 0 0 4px; letter-spacing: .02em; }
.hp-tile-value { font-size: 19px; font-weight: 800; margin: 0; font-variant-numeric: tabular-nums; }
.hp-tile-sub { font-size: 11.5px; color: var(--text-muted-dark); margin: 4px 0 0; font-variant-numeric: tabular-nums; }

.hp-fx { margin: 14px 0 0; background: rgba(47,163,232,.05); border: 1px solid rgba(47,163,232,.18); border-radius: 12px; padding: 14px 16px 12px; }
.hp-fx-title, .hp-fx-summary { font-size: 12px; font-weight: 800; letter-spacing: .06em; color: var(--navy); margin: 0 0 10px; }
.hp-fx-summary { cursor: pointer; list-style: none; margin: 0; }
.hp-fx-summary::-webkit-details-marker { display: none; }
.hp-fx-summary::after { content: " ▾"; color: var(--accent); }
details.hp-fx[open] .hp-fx-summary { margin-bottom: 10px; }
details.hp-fx[open] .hp-fx-summary::after { content: " ▴"; }

.hp-fx-rows { display: grid; gap: 0; }
.hp-fx-row { display: grid; grid-template-columns: 168px minmax(0, 1fr); column-gap: 20px; row-gap: 9px; align-items: center; padding: 13px 0; border-top: 1px solid rgba(10,14,26,.08); }
.hp-fx-row:first-child { border-top: 0; padding-top: 2px; }
.hp-fx-name { grid-column: 1; grid-row: 1 / span 2; margin: 0; font-size: 12.5px; font-weight: 800; letter-spacing: .04em; color: var(--navy); }
.hp-fx-eq { grid-column: 2; grid-row: 1; font-size: 13.5px; font-weight: 600; color: var(--navy); }
.hp-fx-say { grid-column: 2; grid-row: 2; margin: 0; font-size: 12.5px; line-height: 1.6; color: var(--text-muted-dark); }

.hp-frac { display: inline-grid; text-align: center; vertical-align: middle; line-height: 1.3; }
.hp-frac-top { padding: 0 8px 3px; }
.hp-frac-bottom { padding: 4px 8px 0; border-top: 1.5px solid rgba(10,14,26,.45); }
.hp-mul { display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.hp-mul .hp-op { font-style: normal; color: var(--accent); font-weight: 800; }

.hp-fx-note { font-size: 12px; line-height: 1.65; color: var(--text-muted-dark); margin: 12px 0 0; }
.hp-fx-note b { color: var(--navy); }
.hp-fx-excluded { font-size: 12px; color: var(--text-muted-dark); margin: 8px 0 0; }

@media (max-width: 720px) {
  .hp-fx-row { grid-template-columns: minmax(0, 1fr); row-gap: 5px; }
  .hp-fx-name, .hp-fx-eq, .hp-fx-say { grid-column: 1; grid-row: auto; }
  .hp-fx { padding: 12px 13px; }
}

/* 잘못된 형식 표시 */
.lg-bad, input.lg-bad, .lg-ops-table .lg-in.lg-bad {
  border-color: #dc2626 !important;
  background: #fef2f2;
  box-shadow: 0 0 0 2px rgba(220,38,38,.14);
}
.lg-bad:focus { outline: none; border-color: #dc2626 !important; }
.lg-rules { margin: 10px 0 0; padding: 10px 13px; border-left: 3px solid var(--accent); background: rgba(47,163,232,.06); border-radius: 0 8px 8px 0; font-size: 12.5px; line-height: 1.75; color: var(--text-muted-dark); }
.lg-rules b { color: var(--navy); }
.lg-rules code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; background: #fff; border: 1px solid rgba(10,14,26,.12); border-radius: 5px; padding: 1px 5px; font-size: 12px; color: var(--navy); }

/* 모바일: 아이폰 확대 방지 (style.css 보다 뒤에 와야 이긴다) + 손가락으로 누를 만한 크기 */
@media (max-width: 720px) {
  .portal-form input[type="text"],
  .portal-form input[type="tel"],
  .portal-form input[type="email"],
  .portal-form input[type="password"],
  .portal-form input[type="number"],
  .portal-form input[type="date"],
  .portal-form input[type="file"],
  .portal-form select,
  .portal-form textarea { font-size: 16px; }
  .portal-link-row a { display: inline-block; padding: 11px 2px; }
  .lg-fold-btn, #guideToggle, [id$="GuideBtn"] { min-height: 44px; }
}

@media (max-width: 720px) {
  .portal-card select, .portal-pane select, .lg-pane select, #wiWeekStart, #wcWeekStart { min-height: 40px; }
}

/* ── 휴대폰: 헤더는 접고 본문 여백은 줄여 스크롤을 짧게 ───────────────────── */
@media (max-width: 720px) {
  .header-inner { height: 52px; gap: 10px; }
  .logo-mark { width: 26px; height: 26px; }
  .logo-main { font-size: 13px; }
  .logo-sub { font-size: 9px; letter-spacing: .12em; }
  .hamburger-btn { min-width: 44px; min-height: 44px; font-size: 21px; line-height: 1; }

  .mobile-menu { padding: 8px 16px 14px; max-height: calc(100vh - 52px); overflow-y: auto; }
  .mobile-menu .mobile-menu-cta { flex-direction: column; gap: 6px; padding-top: 6px; }
  .mobile-menu .mobile-menu-cta .btn,
  .mobile-menu .mobile-menu-cta .nav-cta {
    flex: none; width: 100%; padding: 11px 12px; font-size: 15px;
    min-height: 44px; display: flex; align-items: center; justify-content: center;
  }

  .wrap { padding: 0 16px; }
  .portal-main { padding: 20px 0 52px; min-height: 0; }
  .portal-card { padding: 18px 14px; border-radius: 14px; }
  .portal-card h1 { font-size: 20px; }
  .portal-card h2 { font-size: 18px; }
  .portal-section-title { font-size: 15px; }
  .portal-divider { margin: 18px 0; }
  .portal-table { font-size: 12.5px; }
  .portal-table th, .portal-table td { padding: 8px 6px; }

  /* 옆으로 넘치는 표는 관성 스크롤을 주고, 페이지가 같이 밀리지 않게 막는다 */
  .table-scroll, .lg-xl-scroll, .pf-table-wrap {
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
  }
}

@media (max-width: 400px) {
  .portal-card { padding: 14px 11px; }
  .logo-sub { display: none; }
}

/* 고정 헤더에 앵커가 가리지 않게 */
html { scroll-padding-top: 72px; }
@media (max-width: 720px) { html { scroll-padding-top: 60px; } }

/* 맨 위로 버튼 (휴대폰 전용) */
.to-top {
  position: fixed; right: 14px; bottom: 14px; z-index: 60;
  width: 44px; height: 44px; border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.18);
  background: var(--navy); color: #fff;
  font-size: 18px; line-height: 1; cursor: pointer;
  opacity: 0; pointer-events: none; transition: opacity .18s ease;
  box-shadow: 0 6px 18px rgba(10,14,26,0.28);
}
.to-top.show { opacity: .92; pointer-events: auto; }
@media (min-width: 721px) { .to-top { display: none; } }
@media (prefers-reduced-motion: reduce) { .to-top { transition: none; } }

/* ── 운영현황: 회원별 묶음과 계좌별 거래 히스토리 ─────────────────────────── */
.ob-row { cursor: pointer; }
.ob-row:hover { background: rgba(47,163,232,0.05); }
.ob-row.open { background: rgba(47,163,232,0.08); }
.ob-row:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.ob-caret { color: var(--accent); font-size: 11px; margin-left: 2px; }

.ob-group td {
  background: var(--card-light);
  border-top: 2px solid rgba(10,14,26,0.12);
  padding: 9px 10px;
  font-size: 12.5px;
}
.ob-group b { font-size: 13.5px; color: var(--navy); }
.ob-group span { color: var(--text-muted-dark); margin-left: 10px; }
.ob-group i { font-style: normal; font-weight: 700; }

.ob-detail-row td { background: #fbfcfe; padding: 0; }
.ob-detail { padding: 14px 16px 16px; border-left: 3px solid var(--accent); }
.ob-detail-title { margin: 0 0 10px; font-size: 13.5px; font-weight: 800; color: var(--navy); }
.ob-detail-sub { margin: 14px 0 6px; font-size: 12px; font-weight: 700; color: var(--text-muted-dark); }
.ob-detail-empty { margin: 0; font-size: 12.5px; color: var(--text-muted-dark); }

.ob-meta { display: flex; flex-wrap: wrap; gap: 8px 20px; margin: 0 0 12px; }
.ob-meta-item { font-size: 12.5px; }
.ob-meta-item span { color: var(--text-muted-dark); margin-right: 6px; }
.ob-meta-item b { color: var(--navy); }

.ob-hist { width: 100%; border-collapse: collapse; font-size: 12.5px; font-variant-numeric: tabular-nums; }
.ob-hist th {
  text-align: left; font-size: 11.5px; font-weight: 700; color: var(--text-muted-dark);
  padding: 6px 10px; border-bottom: 1px solid rgba(10,14,26,0.12); white-space: nowrap;
}
.ob-hist td { padding: 7px 10px; border-bottom: 1px solid rgba(10,14,26,0.06); white-space: nowrap; }
.ob-hist tr:last-child td { border-bottom: 0; }

@media (max-width: 720px) {
  .ob-detail { padding: 12px 12px 14px; }
  .ob-meta { gap: 6px 14px; }
  .ob-group span { display: block; margin: 3px 0 0; }
}

/* ── 지표 두괄식: 잔존가치와 계좌 1개당 예상 수익성 ──────────────────────── */
.hp-hero { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 12px; }
.hp-hero-card {
  background: #fff;
  border: 1px solid rgba(47,163,232,0.28);
  border-top: 3px solid var(--accent);
  border-radius: 14px;
  padding: 16px 18px 14px;
}
.hp-hero-label {
  margin: 0 0 6px; font-size: 12px; font-weight: 800;
  letter-spacing: .04em; color: var(--navy);
}
.hp-hero-value {
  margin: 0; font-size: 32px; font-weight: 800; line-height: 1.1;
  color: var(--navy); font-variant-numeric: tabular-nums; letter-spacing: -0.01em;
}
.hp-hero-sub { margin: 6px 0 0; font-size: 12.5px; color: var(--text-muted-dark); line-height: 1.5; }
.hp-hero-alt {
  display: flex; justify-content: space-between; align-items: baseline; gap: 10px;
  margin: 12px 0 0; padding-top: 10px; border-top: 1px solid rgba(10,14,26,0.08);
  font-size: 12.5px;
}
.hp-hero-alt span { color: var(--text-muted-dark); }
.hp-hero-alt b { color: var(--navy); font-variant-numeric: tabular-nums; }

.hp-mat-title {
  margin: 18px 0 8px; font-size: 11.5px; font-weight: 800;
  letter-spacing: .08em; color: var(--text-muted-dark);
}
.hp-metrics .hp-tile { padding: 10px 12px; }
.hp-metrics .hp-tile-label { font-size: 11px; }
.hp-metrics .hp-tile-value { font-size: 16px; }
.hp-metrics .hp-tile-sub { font-size: 11px; }

.hp-sample {
  margin: 10px 0 0; font-size: 12px; line-height: 1.65;
  color: var(--text-muted-dark);
}
.hp-fx-name small { display: block; font-size: 10.5px; font-weight: 700; letter-spacing: .05em; color: var(--text-muted-dark); margin-top: 2px; }

@media (max-width: 720px) {
  .hp-hero-value { font-size: 27px; }
  .hp-hero-card { padding: 14px 14px 12px; }
}

/* ── 장부 안내문: 한 줄에 한 가지만, 번호로 순서를 보이게 ──────────────────── */
.lg-how {
  margin: 0 0 16px;
  padding: 13px 16px;
  background: rgba(47,163,232,0.05);
  border-left: 3px solid var(--accent);
  border-radius: 0 10px 10px 0;
}
.lg-how-sm { padding: 11px 14px; margin-bottom: 12px; }

.lg-how-lead {
  margin: 0; font-size: 13.5px; font-weight: 700; color: var(--navy); line-height: 1.6;
}
.lg-how-steps {
  margin: 10px 0 0; padding: 0; list-style: none;
  counter-reset: lghow;
  display: grid; gap: 7px;
}
.lg-how-steps li {
  counter-increment: lghow;
  position: relative;
  padding-left: 26px;
  font-size: 13px; line-height: 1.6; color: var(--text-muted-dark);
}
.lg-how-steps li::before {
  content: counter(lghow);
  position: absolute; left: 0; top: 1px;
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--accent); color: #fff;
  font-size: 11px; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
}
.lg-how-steps b { color: var(--navy); }

.lg-how-note {
  margin: 10px 0 0; padding-top: 9px;
  border-top: 1px solid rgba(10,14,26,0.08);
  font-size: 12.5px; line-height: 1.6; color: var(--text-muted-dark);
}
.lg-how-lead + .lg-how-note { border-top: 0; padding-top: 0; margin-top: 5px; }
.lg-how-note b { color: var(--navy); }

.lg-formula {
  margin: 11px 0 0;
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px;
  font-size: 13px; color: var(--navy);
}
.lg-formula b { font-weight: 800; }
.lg-formula i { font-style: normal; font-weight: 800; color: var(--accent); }

@media (max-width: 720px) {
  .lg-how { padding: 11px 13px; }
  .lg-formula { font-size: 12.5px; gap: 5px; }
}

/* Max Drawdown 자동 계산 칸 */
.lg-dd-auto { white-space: nowrap; }
.lg-dd-value { font-weight: 700; }
.lg-dd-tag {
  display: block; margin-top: 2px;
  font-size: 10px; font-weight: 700; letter-spacing: .02em;
  color: var(--accent);
}
.lg-dd-switch {
  margin-top: 4px; padding: 3px 7px;
  font-size: 10.5px; font-family: inherit; font-weight: 700;
  color: var(--text-muted-dark); background: #fff;
  border: 1px solid rgba(10,14,26,0.15); border-radius: 6px; cursor: pointer;
}
.lg-dd-switch:hover { border-color: var(--accent); color: var(--accent); }

/* ── 관리 열을 오른쪽에 고정한다. 표가 넓어서 버튼이 스크롤 끝에 숨어 있었다 ── */
.lg-ops-table th.lg-manage-col,
.lg-ops-table td.lg-manage-col,
.lg-sheet[data-pstage] .portal-table th.lg-manage-col,
.lg-sheet[data-pstage] .portal-table td.lg-manage-col {
  position: sticky;
  right: 0;
  background: #fff;
  z-index: 3;
  box-shadow: -1px 0 0 rgba(0,0,0,0.08), -8px 0 12px -8px rgba(10,14,26,0.18);
}
.lg-ops-table th.lg-manage-col,
.lg-sheet[data-pstage] .portal-table th.lg-manage-col {
  background: #f3f5f8;
  z-index: 4;
}
.lg-ops-row.dirty td.lg-manage-col { background-color: #fff; }

/* 구매장부: 줄을 눌러도 수정 폼이 열린다 */
.lg-purch-row { cursor: pointer; }
.lg-purch-row:hover td { background: rgba(47,163,232,0.05); }
.lg-purch-row:hover td.lg-manage-col { background: #fff; }

@media (max-width: 720px) {
  .lg-ops-table th.lg-manage-col,
  .lg-ops-table td.lg-manage-col,
  .lg-sheet[data-pstage] .portal-table th.lg-manage-col,
  .lg-sheet[data-pstage] .portal-table td.lg-manage-col {
    position: static; box-shadow: none;
  }
}

/* 타일 아래 작은 내역 줄 (이전 기록 보정치 등) */
.lg-tile-sub { margin: 4px 0 0; font-size: 11px; line-height: 1.5; color: var(--text-muted-dark); font-variant-numeric: tabular-nums; }

/* 표 제목 옆 계좌 수 */
.lg-sheet-count { font-size: 12px; font-weight: 700; color: var(--text-muted-dark); margin-left: 4px; }

/* ── 멤버십 인보이스 ─────────────────────────────────────────────────────── */
.ms-plan {
  display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 18px;
  background: #fff; border: 1px solid rgba(0,0,0,0.07); border-radius: 16px; padding: 22px 24px;
}
.ms-plan-label { font-size: 12px; color: var(--text-muted-dark); margin: 0 0 6px; letter-spacing: .02em; }
.ms-plan-value { font-size: 38px; font-weight: 900; margin: 0; line-height: 1.1; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.ms-plan-unit { font-size: 17px; font-weight: 700; color: var(--text-muted-dark); }
.ms-plan-sub { font-size: 12px; color: var(--text-muted-dark); margin: 8px 0 0; }
.ms-plan-side { display: flex; flex-direction: column; justify-content: center; gap: 9px; }
.ms-kv { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; font-size: 13px; border-bottom: 1px dashed rgba(0,0,0,0.08); padding-bottom: 7px; }
.ms-kv:last-child { border-bottom: 0; padding-bottom: 0; }
.ms-kv span { color: var(--text-muted-dark); }
.ms-kv b { font-weight: 800; font-variant-numeric: tabular-nums; }
.ms-owed { color: #b91c1c; }
.ms-status { padding: 2px 10px; border-radius: 999px; font-size: 11.5px; }
.ms-status.ok { background: rgba(34,197,94,0.14); color: #15803d; }
.ms-status.warn { background: rgba(234,179,8,0.16); color: #92650a; }
.ms-status.off { background: rgba(0,0,0,0.06); color: var(--text-muted-dark); }

.ms-empty-plan, .ms-clear {
  background: #fff; border: 1px solid rgba(0,0,0,0.07); border-radius: 16px; padding: 22px 24px;
}
.ms-clear { margin-top: 18px; }
.ms-empty-title, .ms-clear-title { font-size: 15px; font-weight: 800; margin: 0 0 6px; }
.ms-empty-desc, .ms-clear-desc { font-size: 13px; color: var(--text-muted-dark); margin: 0; line-height: 1.7; }

.ms-due {
  margin-top: 18px; background: #fff; border: 1px solid rgba(0,0,0,0.07);
  border-left: 4px solid var(--accent); border-radius: 14px; padding: 20px 22px;
}
.ms-due.overdue { border-left-color: #dc2626; }
.ms-due.pending { border-left-color: #eab308; }
.ms-due-label { font-size: 12px; font-weight: 800; color: var(--text-muted-dark); margin: 0 0 6px; letter-spacing: .02em; }
.ms-due-amount { font-size: 30px; font-weight: 900; margin: 0; line-height: 1.15; font-variant-numeric: tabular-nums; }
.ms-due-meta { font-size: 12.5px; color: var(--text-muted-dark); margin: 8px 0 0; line-height: 1.65; }

.ms-pay { margin-top: 16px; background: var(--card-light); border-radius: 10px; padding: 14px 16px; }
.ms-pay-row { display: flex; gap: 12px; align-items: flex-start; padding: 5px 0; font-size: 13px; flex-wrap: wrap; }
.ms-pay-key { flex: 0 0 74px; color: var(--text-muted-dark); }
.ms-pay-val { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; min-width: 0; }
.ms-addr {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12.5px;
  background: #fff; border: 1px solid rgba(0,0,0,0.08); border-radius: 6px; padding: 4px 8px;
  word-break: break-all; line-height: 1.5;
}
.ms-addr.small { font-size: 11px; background: transparent; border: 0; padding: 0; }
.ms-pay-warn { font-size: 12px; color: #b91c1c; margin: 10px 0 0; line-height: 1.6; }

.ms-submit { margin-top: 16px; }
.ms-submit label { display: block; font-size: 13px; font-weight: 700; margin-bottom: 8px; }
.ms-submit-row { display: flex; gap: 8px; flex-wrap: wrap; }
.ms-hash {
  flex: 1 1 260px; min-width: 0; padding: 10px 12px; font-size: 14px;
  border: 1px solid rgba(0,0,0,0.14); border-radius: 8px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}
.ms-msg { font-size: 12.5px; margin: 8px 0 0; }
.ms-msg.bad { color: #b91c1c; }
.ms-msg.ok { color: #15803d; }

.ms-badge { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 11.5px; font-weight: 800; }
.ms-badge.wait { background: rgba(47,163,232,0.14); color: #1668a0; }
.ms-badge.pending { background: rgba(234,179,8,0.16); color: #92650a; }
.ms-badge.ok { background: rgba(34,197,94,0.14); color: #15803d; }
.ms-badge.bad { background: rgba(220,38,38,0.12); color: #b91c1c; }
.ms-badge.off { background: rgba(0,0,0,0.06); color: var(--text-muted-dark); }

@media (max-width: 720px) {
  .ms-plan { grid-template-columns: 1fr; padding: 18px; }
  .ms-plan-value { font-size: 30px; }
  .ms-due { padding: 16px 18px; }
  .ms-due-amount { font-size: 25px; }
  .ms-pay-key { flex-basis: 100%; }
}

/* 포털 메뉴가 일곱 칸으로 늘어나 1000px 아래에서 밀리던 것 */
.portal-main ~ * .nav-cta-group, body .nav-cta-group { flex-wrap: wrap; justify-content: flex-end; }
@media (max-width: 1080px) and (min-width: 901px) {
  .nav-cta-group { gap: 11px; font-size: 13px; }
}
.ma-actions { display: flex; gap: 6px; flex-wrap: wrap; }
#msTable td:nth-child(2), #msTable td:nth-child(4),
#maInvTable td:nth-child(4), #maInvTable td:nth-child(6) { white-space: nowrap; }

/* ── 일관성 계산기 ───────────────────────────────────────────────────────── */
.cc-read { background: var(--card-light); border-radius: 12px; padding: 14px 16px; margin: 0 0 16px; }
.cc-read-title { font-size: 12.5px; font-weight: 800; margin: 0 0 8px; }
.cc-read-row { display: grid; grid-template-columns: 190px 170px 1fr; gap: 10px; align-items: baseline; padding: 5px 0; font-size: 12.5px; }
.cc-read-key { color: var(--text-muted-dark); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; }
.cc-read-val { font-variant-numeric: tabular-nums; }
.cc-read-map { color: var(--accent); font-size: 12px; }

.cc-wrap { display: grid; grid-template-columns: minmax(0, 340px) minmax(0, 1fr); gap: 20px; align-items: start; }
.cc-form { background: rgba(47,163,232,0.06); border: 1px solid rgba(47,163,232,0.18); border-radius: 12px; padding: 16px; }
.cc-pick { display: flex; flex-direction: column; gap: 4px; font-size: 12px; font-weight: 700; color: var(--text-muted-dark); margin: 0 0 12px; }
.cc-pick select { width: 100%; padding: 9px 10px; border: 1px solid rgba(0,0,0,0.15); border-radius: 8px; font-family: inherit; font-size: 14px; font-weight: 600; background: #fff; }
.cc-form .lg-grid-form { grid-template-columns: 1fr 1fr; }

.cc-blank { background: #fff; border: 1px dashed rgba(0,0,0,0.16); border-radius: 12px; padding: 26px 20px; color: var(--text-muted-dark); font-size: 13px; line-height: 1.7; }
.cc-blank.bad { border-color: rgba(220,38,38,0.4); color: #b91c1c; }

.cc-lead { background: #fff; border: 1px solid rgba(0,0,0,0.07); border-left: 4px solid var(--accent); border-radius: 14px; padding: 18px 20px; margin: 0 0 12px; }
.cc-lead-label { font-size: 12px; font-weight: 800; color: var(--text-muted-dark); margin: 0 0 5px; }
.cc-lead-value { font-size: 38px; font-weight: 900; margin: 0; line-height: 1.1; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.cc-lead-sub { font-size: 12.5px; color: var(--text-muted-dark); margin: 7px 0 0; }

.cc-hero { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 0 0 12px; }
.cc-hero-item { background: #fff; border: 1px solid rgba(0,0,0,0.07); border-radius: 14px; padding: 16px 18px; }
.cc-hero-label { font-size: 12px; font-weight: 800; color: var(--text-muted-dark); margin: 0 0 5px; }
.cc-hero-value { font-size: 27px; font-weight: 900; margin: 0; line-height: 1.15; font-variant-numeric: tabular-nums; }
.cc-hero-sub { font-size: 11.5px; color: var(--text-muted-dark); margin: 6px 0 0; line-height: 1.5; }

.cc-cap { background: var(--card-light); border-radius: 10px; padding: 12px 14px; font-size: 12.5px; line-height: 1.7; margin: 0 0 12px; }
.cc-verdict { background: #fff; border: 1px solid rgba(0,0,0,0.07); border-left: 4px solid var(--text-muted-dark); border-radius: 10px; padding: 13px 15px; font-size: 12.5px; line-height: 1.75; margin: 0 0 12px; }
.cc-verdict.ok { border-left-color: #15803d; }
.cc-verdict.warn { border-left-color: #eab308; }
.cc-verdict.bad { border-left-color: #dc2626; }
.cc-tiles { margin-top: 0; }

@media (max-width: 900px) {
  .cc-wrap { grid-template-columns: 1fr; }
  .cc-read-row { grid-template-columns: 1fr; gap: 2px; padding: 8px 0; border-bottom: 1px dashed rgba(0,0,0,0.08); }
  .cc-read-row:last-child { border-bottom: 0; }
  .cc-lead-value { font-size: 31px; }
  .cc-hero { grid-template-columns: 1fr; }
}

/* ── 팀 나눠 보기 (한 사람이 여러 팀을 운용하는 경우) ────────────────────── */
.lg-teambar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 0 0 16px; }
.lg-teambar-label { font-size: 12px; font-weight: 800; color: var(--text-muted-dark); margin-right: 2px; }
.lg-team-btn {
  display: inline-flex; align-items: center; gap: 6px;
  background: #fff; border: 1px solid rgba(0,0,0,0.14); border-radius: 999px;
  padding: 7px 14px; font: inherit; font-size: 13px; font-weight: 700; color: var(--text-dark);
  cursor: pointer;
}
.lg-team-btn b { font-size: 11.5px; font-weight: 800; color: var(--text-muted-dark); }
.lg-team-btn:hover { border-color: var(--accent); }
.lg-team-btn.active { background: var(--accent); border-color: var(--accent); color: #fff; }
.lg-team-btn.active b { color: rgba(255,255,255,0.8); }
.lg-teambar-hint { font-size: 11.5px; color: var(--text-muted-dark); flex-basis: 100%; margin-top: 2px; }
body.lg-no-teams .lg-team-col { display: none; }

@media (max-width: 720px) {
  .lg-teambar { gap: 6px; }
  .lg-team-btn { padding: 8px 12px; font-size: 13px; }
}
.lg-team-add {
  background: transparent; border: 1px dashed rgba(0,0,0,0.26); border-radius: 999px;
  padding: 7px 14px; font: inherit; font-size: 13px; font-weight: 700; color: var(--text-muted-dark); cursor: pointer;
}
.lg-team-add:hover { border-color: var(--accent); color: var(--accent); }
.lg-team-form { display: inline-flex; gap: 6px; align-items: center; }
.lg-team-form input {
  width: 110px; margin: 0; padding: 7px 10px; font-size: 14px; font-weight: 600;
  border: 1px solid rgba(0,0,0,0.15); border-radius: 8px; background: #fff;
}
.lg-team-drop {
  background: none; border: 0; padding: 0; margin-left: 4px; font: inherit; font-size: 11.5px;
  color: #b91c1c; text-decoration: underline; cursor: pointer;
}
.cc-auto-tag {
  display: inline-block; padding: 1px 6px; border-radius: 999px; font-size: 10px; font-weight: 800;
  background: rgba(47,163,232,0.14); color: #1668a0; vertical-align: 1px;
}
.cc-assigned {
  margin: 12px 0 0; padding: 9px 12px; border-radius: 8px; background: #fff;
  border: 1px solid rgba(0,0,0,0.08); font-size: 12px; color: var(--text-muted-dark); line-height: 1.6;
}
.cc-assigned b { color: var(--text-dark); font-variant-numeric: tabular-nums; }
.cc-src-tag {
  display: inline-block; padding: 1px 6px; border-radius: 999px; font-size: 9.5px; font-weight: 800;
  background: rgba(0,0,0,0.06); color: var(--text-muted-dark); vertical-align: 1px; letter-spacing: 0;
}
/* 라벨 글자와 태그를 한 줄로. 좁아져서 줄이 바뀌어도 입력칸은 줄마다 아래에 맞춘다. */
.cc-lbl { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; row-gap: 2px; }
.cc-form .lg-grid-form label { justify-content: flex-start; }
.cc-form .lg-grid-form input,
.cc-form .lg-grid-form select { margin-top: auto; }
