/* ============================================================
   MATE:ON — App Styles
   디자인 토큰(tokens.css) + 컴포넌트(styles.css) 위에 구성
   ============================================================ */

/* ---------- App Shell ---------- */
.app-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.app-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg-canvas) 85%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-subtle);
}

.app-header-inner {
  max-width: 560px;
  margin-inline: auto;
  padding: var(--space-12) var(--space-20);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-12);
}

.app-header .btn-sm {
  height: 40px;
} /* 터치 타겟 확보 */

.logo {
  display: inline-flex;
  align-items: center;
  gap: var(--space-8);
  text-decoration: none;
  border: none;
  background: none;
  padding: 0;
  cursor: pointer;
  font-family: var(--font-sans);
}

.logo-mark {
  width: 40px;
  height: 32px;
  flex-shrink: 0;
}

.wordmark {
  font-size: var(--font-size-lg);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--neutral-900);
}

[data-theme='dark'] .wordmark {
  color: var(--neutral-50);
}
.wordmark .wm-on {
  /* WCAG AA — 대형 텍스트 ≥3:1 (기존 brand-500은 2.61로 실패) */
  color: var(--text-brand);
}

.app-main {
  flex: 1;
  width: 100%;
  max-width: 560px;
  margin-inline: auto;
  padding: var(--space-32) var(--space-20) var(--space-80);
}

.app-footer {
  border-top: 1px solid var(--border-subtle);
  padding: var(--space-24) var(--space-20);
  text-align: center;
  color: var(--text-muted);
}

/* ---------- Logo mark SVG ---------- */
.logo-window {
  fill: var(--neutral-800);
}
[data-theme='dark'] .logo-window {
  fill: var(--neutral-100);
}

/* ---------- Home / Hero ---------- */
.hero-home {
  text-align: center;
  padding-top: var(--space-24);
}

.hero-logo {
  margin-inline: auto;
  display: flex;
  justify-content: center;
  filter: drop-shadow(0 8px 24px rgba(255, 107, 122, 0.25));
}

/* ---------- Test card (홈 메인 CTA) ---------- */
.test-card {
  margin-top: var(--space-24);
  text-align: left;
  border-color: var(--border-brand);
  background:
    radial-gradient(240px 120px at 90% 0%, var(--bg-info-subtle), transparent 70%),
    radial-gradient(240px 140px at 0% 100%, var(--bg-brand-subtle), transparent 70%), var(--bg-surface);
}
.test-card-title {
  font-size: var(--font-size-xl);
  font-weight: var(--font-weight-bold);
  letter-spacing: var(--tracking-tight);
  line-height: var(--leading-snug);
  margin: var(--space-12) 0 var(--space-8);
}
.test-card .cta-col {
  margin-top: var(--space-16);
}
.test-card .hero-meta {
  justify-content: flex-start;
  margin-top: var(--space-16);
}

.hero-slogan {
  font-size: var(--font-size-3xl);
  font-weight: var(--font-weight-bold);
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-tight);
  margin-top: var(--space-24);
}

.hero-sub {
  color: var(--text-secondary);
  margin-top: var(--space-16);
  line-height: var(--leading-relaxed);
}

.hero-cta {
  display: flex;
  flex-direction: column;
  gap: var(--space-12);
  margin-top: var(--space-32);
}

.hero-cta .btn {
  width: 100%;
}

.hero-meta {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: var(--space-8);
  margin-top: var(--space-20);
}

.resume-card {
  margin-top: var(--space-24);
  display: flex;
  align-items: center;
  gap: var(--space-16);
  text-align: left;
}

.resume-card .avatar {
  width: 44px;
  height: 44px;
  font-size: var(--font-size-md);
}
.resume-info {
  flex: 1;
  min-width: 0;
}

/* ---------- Steps ---------- */
.steps {
  display: flex;
  flex-direction: column;
  gap: var(--space-12);
  margin-top: var(--space-32);
  text-align: left;
}

.step-card {
  display: flex;
  gap: var(--space-16);
  align-items: flex-start;
}

.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  background: var(--bg-brand-subtle);
  color: var(--text-brand);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-bold);
  flex-shrink: 0;
}

/* ---------- Section title ---------- */
.view-title {
  font-size: var(--font-size-2xl);
  font-weight: var(--font-weight-bold);
  letter-spacing: var(--tracking-tight);
  margin-top: var(--space-8);
}

.view-desc {
  color: var(--text-secondary);
  margin-top: var(--space-8);
  line-height: var(--leading-relaxed);
}

.view-stack {
  display: flex;
  flex-direction: column;
  gap: var(--space-16);
  margin-top: var(--space-24);
}

/* ---------- Onboarding ---------- */
.field-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-8);
  margin-bottom: var(--space-24);
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-8);
}

.chip {
  padding: var(--space-8) var(--space-16);
  border-radius: var(--radius-full);
  border: 1px solid var(--border-default);
  background: var(--bg-surface);
  color: var(--text-secondary);
  font-family: var(--font-sans);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
  cursor: pointer;
  transition:
    border-color 0.15s ease,
    background-color 0.15s ease,
    color 0.15s ease;
}

.chip:hover {
  border-color: var(--border-strong);
}

.chip.selected {
  background: var(--bg-brand-subtle);
  border-color: var(--border-brand);
  color: var(--text-brand);
  font-weight: var(--font-weight-semibold);
}

.chip:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}

/* ---------- Survey ---------- */
.survey-top {
  display: flex;
  align-items: center;
  gap: var(--space-12);
  margin-bottom: var(--space-24);
}

.progress {
  flex: 1;
  height: 8px;
  border-radius: var(--radius-full);
  background: var(--bg-subtle);
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  border-radius: var(--radius-full);
  background: linear-gradient(90deg, var(--brand-400), var(--brand-600));
  transition: width 0.3s ease;
}

.progress-num {
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-semibold);
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.back-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-default);
  background: var(--bg-surface);
  color: var(--text-secondary);
  cursor: pointer;
}

.back-btn:hover {
  border-color: var(--border-strong);
}
.back-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.back-btn:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}

.domain-tag {
  display: inline-block;
  margin-bottom: var(--space-12);
}

.question-text {
  font-size: var(--font-size-xl);
  font-weight: var(--font-weight-bold);
  line-height: var(--leading-snug);
  letter-spacing: var(--tracking-tight);
  margin-bottom: var(--space-24);
}

.opt-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-12);
}

.opt-card {
  display: flex;
  align-items: flex-start;
  gap: var(--space-12);
  width: 100%;
  padding: var(--space-16);
  text-align: left;
  background: var(--bg-surface);
  border: 1.5px solid var(--border-default);
  border-radius: var(--card-radius);
  font-family: var(--font-sans);
  font-size: var(--font-size-sm);
  line-height: var(--leading-normal);
  color: var(--text-primary);
  cursor: pointer;
  transition:
    border-color 0.15s ease,
    background-color 0.15s ease,
    transform 0.1s ease;
}

.opt-card:hover {
  border-color: var(--border-strong);
  transform: translateY(-1px);
}
.opt-card:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}

.opt-card.selected {
  border-color: var(--border-brand);
  background: var(--bg-brand-subtle);
}

.opt-key {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: var(--radius-full);
  background: var(--bg-subtle);
  color: var(--text-secondary);
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-bold);
  flex-shrink: 0;
}

.opt-card.selected .opt-key {
  background: var(--bg-brand);
  color: var(--text-on-brand);
}

.survey-notice {
  margin-top: var(--space-24);
  color: var(--text-muted);
  text-align: center;
}

/* ---------- Result ---------- */
.char-hero {
  text-align: center;
  padding: var(--space-32) var(--space-24);
  position: relative;
  overflow: hidden;
}

.char-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(300px 160px at 50% 0%, var(--bg-brand-subtle), transparent 75%);
  pointer-events: none;
}

.char-hero > * {
  position: relative;
}

.char-code {
  display: inline-block;
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-bold);
  color: var(--text-brand);
  background: var(--bg-brand-subtle);
  border: 1px solid var(--border-brand);
  padding: var(--space-2) var(--space-12);
  border-radius: var(--radius-full);
  letter-spacing: 0.08em;
}

.char-name {
  font-size: var(--font-size-4xl);
  font-weight: var(--font-weight-bold);
  letter-spacing: var(--tracking-tight);
  margin-top: var(--space-12);
}

.char-quote {
  color: var(--text-secondary);
  font-size: var(--font-size-md);
  margin-top: var(--space-12);
  line-height: var(--leading-relaxed);
}

.char-meta {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: var(--space-8);
  margin-top: var(--space-16);
}

/* Gauge (E/R bars) */
.gauge-block {
  display: flex;
  flex-direction: column;
  gap: var(--space-16);
}

.gauge-row {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
}

.gauge-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-8);
}

.gauge-label {
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-semibold);
  color: var(--text-secondary);
}

.gauge-val {
  font-size: var(--font-size-xs);
  color: var(--text-brand);
  font-weight: var(--font-weight-bold);
}

.gauge-track {
  position: relative;
  height: 10px;
  border-radius: var(--radius-full);
  background: var(--bg-subtle);
}

.gauge-fill {
  position: absolute;
  inset: 0 auto 0 0;
  border-radius: var(--radius-full);
  background: linear-gradient(90deg, var(--brand-400), var(--brand-600));
}

.gauge-fill.gauge-blue {
  background: linear-gradient(90deg, var(--secondary-400), var(--secondary-600));
}

.gauge-caption {
  display: flex;
  justify-content: space-between;
  font-size: var(--font-size-xs);
  color: var(--text-muted);
}

/* Matrix 4x4 */
.matrix {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-4);
}

.matrix-cell {
  aspect-ratio: 1.6;
  border-radius: var(--radius-sm);
  background: var(--bg-subtle);
  border: 1.5px solid transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: var(--font-weight-semibold);
  color: var(--text-muted);
  position: relative;
  transition:
    border-color 0.15s ease,
    background-color 0.15s ease,
    color 0.15s ease;
}

.matrix-cell.mine {
  background: var(--bg-brand);
  border-color: var(--bg-brand);
  color: var(--text-on-brand);
  box-shadow: var(--shadow-md);
}

.matrix-cell.partner {
  background: var(--secondary-500);
  border-color: var(--secondary-500);
  color: var(--neutral-0);
  box-shadow: var(--shadow-md);
}

.matrix-cell.same {
  background: linear-gradient(135deg, var(--brand-500) 50%, var(--secondary-500) 50%);
  color: var(--neutral-0);
}

.matrix-axis {
  display: flex;
  justify-content: space-between;
  font-size: var(--font-size-xs);
  color: var(--text-muted);
  margin-top: var(--space-6);
}

/* Lists */
.trait-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-8);
}

.trait-list li {
  display: flex;
  gap: var(--space-8);
  align-items: flex-start;
  font-size: var(--font-size-sm);
  line-height: var(--leading-normal);
  color: var(--text-secondary);
}

.trait-list li::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: var(--radius-full);
  background: var(--brand-500);
  margin-top: 7px;
  flex-shrink: 0;
}

/* View compare */
.view-vs {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: var(--space-12);
  align-items: center;
}

.vs-side {
  padding: var(--space-12);
  border-radius: var(--radius-md);
  background: var(--bg-subtle);
  font-size: var(--font-size-sm);
  line-height: var(--leading-normal);
  color: var(--text-secondary);
}

.vs-side .vs-label {
  display: block;
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-bold);
  color: var(--text-muted);
  margin-bottom: var(--space-4);
}

.vs-mark {
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-bold);
  color: var(--text-muted);
}

/* Conflict sequence */
.seq {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.seq-step {
  display: flex;
  align-items: center;
  gap: var(--space-12);
  padding-block: var(--space-8);
}

.seq-dot {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-full);
  background: var(--bg-brand-subtle);
  color: var(--text-brand);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-bold);
  flex-shrink: 0;
}

.seq-step:not(:last-child) .seq-dot::after {
  content: '';
  position: absolute;
}

.seq-line {
  width: 2px;
  height: 16px;
  background: var(--border-default);
  margin-left: 13px;
}

/* Trigger list */
.trigger-list {
  list-style: none;
  counter-reset: trig;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-8);
}

.trigger-list li {
  counter-increment: trig;
  display: flex;
  align-items: center;
  gap: var(--space-12);
  padding: var(--space-12) var(--space-16);
  border-radius: var(--radius-md);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  font-size: var(--font-size-sm);
  color: var(--text-secondary);
}

.trigger-list li::before {
  content: counter(trig);
  width: 24px;
  height: 24px;
  border-radius: var(--radius-full);
  background: var(--bg-danger-subtle);
  color: var(--text-error);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-bold);
  flex-shrink: 0;
}

/* Do / Don't */
.do-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-12);
}

.do-col {
  padding: var(--space-16);
  border-radius: var(--radius-md);
  background: var(--bg-subtle);
}

.do-col.do {
  background: var(--bg-success-subtle);
}
.do-col.dont {
  background: var(--bg-danger-subtle);
}

.do-col h5 {
  margin: 0 0 var(--space-8);
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-bold);
  letter-spacing: 0.06em;
}

.do-col.do h5 {
  color: var(--text-success);
}
.do-col.dont h5 {
  color: var(--text-error);
}

.do-col ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
  font-size: var(--font-size-sm);
  color: var(--text-secondary);
  line-height: var(--leading-normal);
}

/* Comfort chips */
.comfort-chips {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-8);
}

.comfort-chips .badge {
  padding: var(--space-4) var(--space-12);
}

/* Note callout */
.note-box {
  display: flex;
  gap: var(--space-12);
  padding: var(--space-16);
  border-radius: var(--radius-md);
  font-size: var(--font-size-sm);
  line-height: var(--leading-normal);
}

.note-box.info {
  background: var(--bg-info-subtle);
  color: var(--text-info);
}
.note-box.warn {
  background: var(--bg-warning-subtle);
  color: var(--text-warning);
}
.note-box.good {
  background: var(--bg-success-subtle);
  color: var(--text-success);
}

.note-box svg {
  flex-shrink: 0;
  margin-top: 2px;
}

/* Section head inside views */
.sec-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-12);
  margin-top: var(--space-32);
  margin-bottom: var(--space-12);
}

.sec-head h3 {
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-bold);
  letter-spacing: var(--tracking-tight);
}

/* ---------- Report ---------- */
.pair-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-12);
}

.pair-card {
  padding: var(--space-16);
  border-radius: var(--card-radius);
  border: 1px solid var(--card-border);
  background: var(--card-bg);
  box-shadow: var(--card-shadow);
  display: flex;
  flex-direction: column;
  gap: var(--space-8);
  align-items: flex-start;
}

.pair-card .pc-name {
  font-size: var(--font-size-md);
  font-weight: var(--font-weight-bold);
}

.pair-card .pc-char {
  font-size: var(--font-size-sm);
  color: var(--text-brand);
  font-weight: var(--font-weight-semibold);
}

.pair-card .pc-code {
  font-size: var(--font-size-xs);
  color: var(--text-muted);
}

.pair-card.you .pc-char {
  color: var(--text-link);
}

/* Gap rows */
.gap-row {
  display: flex;
  flex-direction: column;
  gap: var(--space-8);
  padding: var(--space-16);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  background: var(--bg-surface);
}

.gap-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-8);
}

.gap-area {
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-semibold);
}

.gap-bar {
  position: relative;
  height: 12px;
  border-radius: var(--radius-full);
  background: linear-gradient(
    90deg,
    var(--brand-300) 0%,
    var(--brand-300) calc(var(--p) * 1%),
    var(--secondary-300) calc(var(--p) * 1%),
    var(--secondary-300) 100%
  );
}

.gap-bar::after {
  content: '';
  position: absolute;
  left: calc(var(--p) * 1%);
  top: 50%;
  transform: translate(-50%, -50%);
  width: 4px;
  height: 18px;
  border-radius: 2px;
  background: var(--neutral-0);
  box-shadow: var(--shadow-sm);
}

.gap-legend {
  display: flex;
  justify-content: space-between;
  font-size: var(--font-size-xs);
  color: var(--text-muted);
}

.gap-desc {
  font-size: var(--font-size-sm);
  color: var(--text-secondary);
  line-height: var(--leading-normal);
}

/* Conflict prediction cards */
.conflict-card {
  display: flex;
  flex-direction: column;
  gap: var(--space-12);
}

.conflict-rank {
  display: inline-flex;
  align-items: center;
  gap: var(--space-8);
}

.conflict-title {
  font-size: var(--font-size-md);
  font-weight: var(--font-weight-bold);
}

.conflict-sit {
  font-size: var(--font-size-sm);
  color: var(--text-secondary);
  line-height: var(--leading-normal);
}

.conflict-views {
  display: grid;
  gap: var(--space-8);
}

.conflict-view {
  padding: var(--space-12);
  border-radius: var(--radius-sm);
  background: var(--bg-subtle);
  font-size: var(--font-size-sm);
  color: var(--text-secondary);
  line-height: var(--leading-normal);
}

.conflict-prev {
  display: flex;
  gap: var(--space-8);
  padding: var(--space-12);
  border-radius: var(--radius-sm);
  background: var(--bg-success-subtle);
  font-size: var(--font-size-sm);
  color: var(--text-success);
  line-height: var(--leading-normal);
}

/* Rules */
.rule-item {
  display: flex;
  align-items: center;
  gap: var(--space-12);
  padding: var(--space-12) var(--space-16);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-default);
  background: var(--bg-surface);
  cursor: pointer;
  transition:
    border-color 0.15s ease,
    background-color 0.15s ease,
    color 0.15s ease;
  font-size: var(--font-size-sm);
  color: var(--text-primary);
}

.rule-item:hover {
  border-color: var(--border-strong);
}

.rule-item.checked {
  border-color: var(--border-brand);
  background: var(--bg-brand-subtle);
}

.rule-check {
  width: 22px;
  height: 22px;
  border-radius: var(--radius-xs);
  border: 1.5px solid var(--border-strong);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: transparent;
  transition:
    border-color 0.15s ease,
    background-color 0.15s ease,
    color 0.15s ease;
}

.rule-item.checked .rule-check {
  background: var(--bg-brand);
  border-color: var(--bg-brand);
  color: var(--text-on-brand);
}

.rule-area {
  font-size: var(--font-size-xs);
  color: var(--text-muted);
  margin-left: auto;
  flex-shrink: 0;
}

/* Agreement */
.agree-doc {
  border: 1.5px solid var(--border-default);
  border-radius: var(--card-radius);
  background: var(--bg-canvas);
  padding: var(--space-24);
  box-shadow: var(--shadow-md);
}

.agree-doc-head {
  text-align: center;
  padding-bottom: var(--space-16);
  border-bottom: 1px dashed var(--border-strong);
  margin-bottom: var(--space-16);
}

.agree-rule {
  display: flex;
  gap: var(--space-8);
  padding-block: var(--space-8);
  font-size: var(--font-size-sm);
  color: var(--text-secondary);
  align-items: flex-start;
}

.agree-rule .check-ic {
  color: var(--status-success);
  flex-shrink: 0;
  margin-top: 1px;
}

.agree-signs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-12);
  margin-top: var(--space-16);
}

.sign-box {
  padding: var(--space-16);
  border-radius: var(--radius-md);
  border: 1.5px dashed var(--border-strong);
  text-align: center;
  font-size: var(--font-size-sm);
  color: var(--text-muted);
  transition:
    border-color 0.15s ease,
    background-color 0.15s ease,
    color 0.15s ease;
  cursor: pointer;
  font-family: var(--font-sans);
  background: none;
}

.sign-box.signed {
  border-style: solid;
  border-color: var(--status-success);
  background: var(--bg-success-subtle);
  color: var(--text-success);
  font-weight: var(--font-weight-semibold);
}

.rev-tag {
  display: inline-block;
  vertical-align: 2px;
  margin-left: var(--space-6);
  padding: 2px 7px;
  border-radius: var(--radius-full);
  background: var(--bg-brand-subtle);
  color: var(--text-brand);
  font-size: var(--font-size-xs);
}
.empty-rules {
  padding: var(--space-16);
  border: 1px dashed var(--border-default);
  border-radius: var(--radius-md);
  color: var(--text-muted);
  font-size: var(--font-size-sm);
  text-align: center;
}
.agree-diff {
  margin-top: var(--space-16);
  padding: var(--space-16);
  border: 1px solid var(--status-warning);
  border-radius: var(--radius-md);
  background: var(--bg-warning-subtle);
}
.diff-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-12);
  margin-bottom: var(--space-12);
  font-size: var(--font-size-sm);
}
.diff-head strong {
  font-weight: var(--font-weight-bold);
}
.diff-group ul {
  margin: var(--space-8) 0 0;
  padding-left: var(--space-20);
  font-size: var(--font-size-sm);
  color: var(--text-secondary);
  line-height: var(--leading-relaxed);
}

/* Invite */
.invite-link-box {
  display: flex;
  gap: var(--space-8);
  padding: var(--space-12);
  border-radius: var(--radius-md);
  background: var(--bg-subtle);
  border: 1px solid var(--border-default);
  font-size: var(--font-size-xs);
  color: var(--text-muted);
  word-break: break-all;
  align-items: center;
}

.invite-link-box code {
  flex: 1;
  border: none;
  background: none;
  padding: 0;
  color: var(--text-secondary);
}

.invite-banner {
  display: flex;
  align-items: center;
  gap: var(--space-12);
  padding: var(--space-16);
  border-radius: var(--radius-md);
  background: var(--bg-info-subtle);
  color: var(--text-info);
  font-size: var(--font-size-sm);
}

/* CTA rows */
.cta-col {
  display: flex;
  flex-direction: column;
  gap: var(--space-12);
  margin-top: var(--space-24);
}

.cta-col .btn {
  width: 100%;
}

/* Card section spacing */
.card + .card {
  margin-top: 0;
}
.card h4.card-title {
  font-size: var(--font-size-md);
  font-weight: var(--font-weight-bold);
  margin-bottom: var(--space-12);
}

/* Responsive */
@media (max-width: 480px) {
  .do-grid,
  .pair-cards,
  .agree-signs {
    grid-template-columns: 1fr;
  }
  .view-vs {
    grid-template-columns: 1fr;
  }
  .vs-mark {
    text-align: center;
  }
  .char-name {
    font-size: var(--font-size-3xl);
  }
}

/* ---------- View transition ---------- */
.app-main > * {
  animation: view-in 0.28s ease both;
}
@keyframes view-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.card,
.gap-row {
  animation: rise 0.3s ease both;
}
.card:nth-of-type(2),
.gap-row:nth-of-type(2) {
  animation-delay: 0.04s;
}
.card:nth-of-type(3),
.gap-row:nth-of-type(3) {
  animation-delay: 0.08s;
}
@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.opt-card:active {
  transform: scale(0.985);
}

/* ---------- 16유형 도감 ---------- */
.type-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-8);
}

.type-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-16) var(--space-8);
  border-radius: var(--radius-md);
  border: 1.5px solid var(--border-subtle);
  background: var(--bg-surface);
  cursor: pointer;
  font-family: var(--font-sans);
  transition:
    border-color 0.15s ease,
    background-color 0.15s ease,
    color 0.15s ease,
    transform 0.15s ease,
    box-shadow 0.15s ease;
  text-align: center;
}

.type-card:hover {
  border-color: var(--border-brand);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.type-card:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}

.type-card .tc-code {
  font-size: 10px;
  font-weight: var(--font-weight-bold);
  color: var(--text-muted);
  letter-spacing: 0.06em;
}

.type-card .tc-name {
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-semibold);
  color: var(--text-primary);
  line-height: 1.3;
}

.type-card.mine {
  border-color: var(--border-brand);
  background: var(--bg-brand-subtle);
}
.type-card.mine .tc-code {
  color: var(--text-brand);
}
.type-card.partner {
  border-color: var(--secondary-500);
  background: var(--bg-info-subtle);
}
.type-card.partner .tc-code {
  color: var(--text-link);
}

/* ---------- 실무 체크 ---------- */
.life-opt {
  display: flex;
  align-items: flex-start;
  gap: var(--space-12);
  width: 100%;
  padding: var(--space-16);
  text-align: left;
  background: var(--bg-surface);
  border: 1.5px solid var(--border-default);
  border-radius: var(--card-radius);
  font-family: var(--font-sans);
  cursor: pointer;
  transition:
    border-color 0.15s ease,
    background-color 0.15s ease,
    color 0.15s ease;
}

.life-opt:hover {
  border-color: var(--border-strong);
}
.life-opt.selected {
  border-color: var(--border-brand);
  background: var(--bg-brand-subtle);
}

.life-opt .lv-tag {
  flex-shrink: 0;
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-bold);
  color: var(--text-brand);
  background: var(--bg-brand-subtle);
  border: 1px solid var(--border-brand);
  border-radius: var(--radius-full);
  padding: var(--space-2) var(--space-12);
}

.life-opt .lv-text {
  font-size: var(--font-size-sm);
  line-height: var(--leading-normal);
  color: var(--text-primary);
}

.life-summary {
  display: flex;
  flex-direction: column;
  gap: var(--space-8);
}

.life-row {
  display: flex;
  align-items: center;
  gap: var(--space-12);
  padding: var(--space-12) var(--space-16);
  border-radius: var(--radius-md);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  font-size: var(--font-size-sm);
}

.life-row .lr-area {
  color: var(--text-muted);
  width: 88px;
  flex-shrink: 0;
  font-size: var(--font-size-xs);
}
.life-row .lr-val {
  font-weight: var(--font-weight-semibold);
  flex: 1;
}
.life-row .lr-me {
  color: var(--text-brand);
}
.life-row .lr-you {
  color: var(--text-link);
}

/* ---------- 체크리스트 ---------- */
.check-progress {
  display: flex;
  align-items: center;
  gap: var(--space-12);
  margin-top: var(--space-16);
}

.check-cat {
  display: flex;
  align-items: center;
  gap: var(--space-8);
  margin-top: var(--space-20);
  margin-bottom: var(--space-8);
}

.check-cat h4 {
  font-size: var(--font-size-md);
  font-weight: var(--font-weight-bold);
}

.check-cat .cat-count {
  font-size: var(--font-size-xs);
  color: var(--text-muted);
}

/* ---------- 재진단 비교 ---------- */
.hist-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-8);
  padding: var(--space-12) var(--space-16);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  background: var(--bg-surface);
  font-size: var(--font-size-sm);
}

.hist-row .h-date {
  color: var(--text-muted);
  font-size: var(--font-size-xs);
}
.hist-row .h-char {
  font-weight: var(--font-weight-semibold);
}
.hist-row.current {
  border-color: var(--border-brand);
  background: var(--bg-brand-subtle);
}

.hist-arrow {
  color: var(--text-muted);
  text-align: center;
  font-size: var(--font-size-xs);
}

/* ---------- Quick nav (홈 하단 링크) ---------- */
.quick-nav {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-8);
  margin-top: var(--space-24);
}

.quick-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-6);
  padding: var(--space-16) var(--space-8);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  background: var(--bg-surface);
  cursor: pointer;
  font-family: var(--font-sans);
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-semibold);
  color: var(--text-secondary);
  transition:
    border-color 0.15s ease,
    background-color 0.15s ease,
    color 0.15s ease;
}

.quick-link:hover {
  border-color: var(--border-strong);
  color: var(--text-primary);
}
.quick-link svg {
  color: var(--text-brand);
}

/* ---------- Print (합의서 출력) ---------- */
@media print {
  .app-header,
  .app-footer,
  .cta-col,
  .toast,
  .sec-head,
  .quick-nav,
  .bottom-nav,
  .agree-diff,
  .note-box {
    display: none !important;
  }
  body {
    background: #fff;
  }
  .app-main {
    max-width: 100%;
    padding: 0;
  }
  .agree-doc {
    box-shadow: none;
    border-color: #999;
  }
}

@media (max-width: 480px) {
  .type-grid {
    grid-template-columns: repeat(4, 1fr);
  }
  .quick-nav {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ---------- Custom rule input / code connect ---------- */
.custom-rule {
  display: flex;
  gap: var(--space-8);
  margin-top: var(--space-12);
  align-items: stretch;
}
.custom-rule .input {
  flex: 1;
  min-width: 0;
}
.custom-rule .btn {
  flex-shrink: 0;
}
.code-ex {
  font-family: ui-monospace, monospace;
  font-size: 0.9em;
  font-weight: var(--font-weight-bold);
  color: var(--text-brand);
  background: var(--bg-brand-subtle);
  padding: 1px 6px;
  border-radius: var(--radius-sm);
}
.input-error {
  border-color: var(--border-error) !important;
  box-shadow: 0 0 0 3px var(--bg-danger-subtle) !important;
}

/* ---------- Talk starters ---------- */
.talk-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-8);
}
.talk-area {
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-bold);
  color: var(--text-brand);
  margin: var(--space-8) 0 0;
}
.talk-q {
  font-size: var(--font-size-sm);
  color: var(--text-primary);
  background: var(--bg-subtle);
  border-radius: var(--radius-md);
  padding: var(--space-12) var(--space-16);
  line-height: var(--line-height-relaxed);
}

/* ---------- Shared report banner ---------- */
.shared-banner {
  border-color: var(--secondary-500);
  background: var(--bg-info-subtle);
  margin-bottom: var(--space-16);
}
.shared-banner strong {
  font-size: var(--font-size-sm);
}
.shared-banner p {
  margin-top: var(--space-4);
}

/* ---------- Type distance badge ---------- */
.tc-dist {
  font-size: 9px;
  font-weight: var(--font-weight-semibold);
  color: var(--text-muted);
  background: var(--bg-subtle);
  padding: 1px 6px;
  border-radius: 999px;
}
.type-card.mine .tc-dist {
  color: var(--text-brand);
  background: var(--bg-surface);
}

/* ---------- Motion polish ---------- */
/* 갭 바 — --p 커스텀 프로퍼티 애니메이션 (미지원 브라우저는 정적 표시) */
@property --p {
  syntax: '<number>';
  inherits: false;
  initial-value: 0;
}
.gap-bar {
  animation: gap-fill 0.8s cubic-bezier(0.22, 1, 0.36, 1) 0.35s both;
}
@keyframes gap-fill {
  from {
    --p: 0;
  }
}

/* E/R 게이지 바 — 처음 렌더 시 0에서 채워짐 */
.gauge-fill {
  animation: gauge-grow 0.9s cubic-bezier(0.22, 1, 0.36, 1) 0.2s both;
}
@keyframes gauge-grow {
  from {
    width: 0;
  }
}

/* 결과 캐릭터 카드 — 스태거 리빌 */
.char-hero .char-code {
  animation: pop-in 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}
.char-hero .char-name {
  animation: rise 0.45s ease 0.1s both;
}
.char-hero .char-quote,
.char-hero .char-meta {
  animation: rise 0.45s ease 0.2s both;
}
@keyframes pop-in {
  from {
    opacity: 0;
    transform: scale(0.55);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* 매트릭스 — 표시된 위치가 튀어나오듯 */
.matrix-cell.mine,
.matrix-cell.partner,
.matrix-cell.same {
  animation: cell-pop 0.38s cubic-bezier(0.34, 1.56, 0.64, 1) 0.3s both;
}
@keyframes cell-pop {
  from {
    opacity: 0;
    transform: scale(0.4);
  }
}

/* 리포트 페어 카드 — 좌우에서 슬라이드 */
.pair-card {
  animation: slide-l 0.4s ease both;
}
.pair-card.you {
  animation-name: slide-r;
}
@keyframes slide-l {
  from {
    opacity: 0;
    transform: translateX(-14px);
  }
}
@keyframes slide-r {
  from {
    opacity: 0;
    transform: translateX(14px);
  }
}

/* 설문 문항 — 방향에 따른 슬라이드 */
.q-slide.q-next {
  animation: q-next 0.26s ease both;
}
.q-slide.q-prev {
  animation: q-prev 0.26s ease both;
}
@keyframes q-next {
  from {
    opacity: 0;
    transform: translateX(20px);
  }
}
@keyframes q-prev {
  from {
    opacity: 0;
    transform: translateX(-20px);
  }
}

/* 선택지 — 스태거 진입 + 선택 펄스 */
.opt-card {
  animation: rise 0.28s ease both;
}
.opt-card:nth-child(2) {
  animation-delay: 0.04s;
}
.opt-card:nth-child(3) {
  animation-delay: 0.08s;
}
.opt-card:nth-child(4) {
  animation-delay: 0.12s;
}
.opt-card.selected {
  animation: opt-pop 0.2s ease;
}
@keyframes opt-pop {
  50% {
    transform: scale(1.012);
  }
}
.opt-card.selected .opt-key {
  animation: key-pop 0.22s ease;
}
@keyframes key-pop {
  50% {
    transform: scale(1.18);
  }
}

/* 규칙 체크·칩·서명 — 선택 펄스 */
.rule-item.checked .rule-check {
  animation: key-pop 0.22s ease;
}
.chip.selected {
  animation: opt-pop 0.18s ease;
}
.sign-box.signed {
  animation: opt-pop 0.25s ease;
}

/* 도감 — 물결 스태거 (--i는 인라인) */
.type-card {
  animation: rise 0.3s ease both;
  animation-delay: calc(var(--i, 0) * 0.025s);
}

/* 버튼 — 호버 리프트 (primary만 살짝) */
.btn {
  transition:
    background-color 0.15s ease,
    color 0.15s ease,
    border-color 0.15s ease,
    transform 0.12s ease,
    box-shadow 0.18s ease;
}
.btn-primary:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}
.btn-primary:active:not(:disabled) {
  transform: translateY(1px);
  box-shadow: none;
}

/* 프로그레스 — 더 부드러운 전환 */
.progress-fill {
  transition: width 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

/* 설문 하단 안내 — 지연 페이드 */
.survey-notice {
  animation: rise 0.4s ease 0.15s both;
}

/* 토스트 — 스프링 진입 */
.toast {
  transform: translate(-50%, 14px) scale(0.95);
  transition:
    opacity 0.2s ease,
    transform 0.3s cubic-bezier(0.34, 1.4, 0.64, 1);
}
.toast.show {
  transform: translate(-50%, 0) scale(1);
}

/* 로고 — 호버 살짝 확대 + 창문 불빛 점멸 */
.logo {
  transition: transform 0.18s ease;
}
.logo:hover {
  transform: scale(1.04);
}
.logo-window rect {
  animation: win-blink 5.5s ease-in-out 3;
}
.logo-window rect:nth-child(2) {
  animation-delay: 1.3s;
}
.logo-window rect:nth-child(3) {
  animation-delay: 2.7s;
}
.logo-window rect:nth-child(4) {
  animation-delay: 4.1s;
}
@keyframes win-blink {
  0%,
  88%,
  100% {
    opacity: 1;
  }
  93% {
    opacity: 0.2;
  }
}

/* 홈 히어로 로고 — 느린 부유 후 정지 (자동재생 모션은 스스로 멈춤) */
.hero-logo {
  animation: hero-float 6s ease-in-out 2;
}
@keyframes hero-float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-6px);
  }
}

/* ---------- Screen reader only ---------- */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- Invite share info ---------- */
.share-list {
  list-style: none;
  margin: 0 0 var(--space-12);
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
}
.share-list li {
  font-size: var(--font-size-sm);
  color: var(--text-primary);
  padding-left: var(--space-16);
  position: relative;
}
.share-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--brand-400);
}
.share-opt {
  display: inline-flex;
  align-items: center;
  gap: var(--space-8);
  margin-top: var(--space-12);
  padding: var(--space-8) var(--space-12);
  border-radius: var(--radius-full);
  border: 1.5px solid var(--border-default);
  background: var(--bg-surface);
  font-family: var(--font-sans);
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-semibold);
  color: var(--text-secondary);
  cursor: pointer;
  transition:
    border-color 0.15s ease,
    background-color 0.15s ease,
    color 0.15s ease;
}
.share-opt:hover {
  border-color: var(--border-strong);
}
.share-opt:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}
.share-opt-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--neutral-300);
  transition: background 0.15s ease;
}
.share-opt.on {
  border-color: var(--border-brand);
  color: var(--text-brand);
  background: var(--bg-brand-subtle);
}
.share-opt.on .share-opt-dot {
  background: var(--brand-500);
}

/* ---------- Splash (앱 시작 ~1s) ---------- */
#splash {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: var(--bg-canvas);
  display: flex;
  align-items: center;
  justify-content: center;
  transition:
    opacity 0.32s ease,
    visibility 0.32s ease;
}
#splash.bye {
  opacity: 0;
  visibility: hidden;
}
/* OS 다크모드에서 부팅 스플래시 — 테마가 아직 적용되기 전에도 어둡게 */
@media (prefers-color-scheme: dark) {
  #splash {
    background: #181b20;
  }
  .splash-word {
    color: #f1f0ee;
  }
  .splash-tag {
    color: #adb3bd;
  }
}
.splash-inner {
  text-align: center;
  animation: splash-in 0.62s cubic-bezier(0.22, 1, 0.36, 1) both;
}
@keyframes splash-in {
  from {
    opacity: 0;
    filter: blur(12px);
    transform: scale(0.94);
  }
  to {
    opacity: 1;
    filter: blur(0);
    transform: scale(1);
  }
}
.splash-word {
  font-size: var(--font-size-2xl);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  margin-top: var(--space-16);
}
.splash-word span {
  color: var(--brand-500);
}
.splash-tag {
  font-size: var(--font-size-xs);
  color: var(--text-muted);
  margin-top: var(--space-8);
  animation: rise 0.4s ease 0.3s both;
}

/* ---------- Bottom navigation ---------- */
.bottom-nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 60;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  background: color-mix(in srgb, var(--bg-canvas) 88%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid var(--border-subtle);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  min-height: 58px;
  padding: var(--space-8) var(--space-4);
  background: none;
  border: none;
  font-family: var(--font-sans);
  font-size: 10px;
  font-weight: var(--font-weight-semibold);
  color: var(--text-muted);
  cursor: pointer;
  transition: color 0.15s ease;
}
.nav-item:hover {
  color: var(--text-secondary);
}
.nav-item:focus-visible {
  outline: none;
  box-shadow: inset var(--focus-ring);
}
.nav-item.on {
  color: var(--text-brand);
}
.nav-item svg {
  transition: transform 0.18s ease;
}
.nav-item.on svg {
  transform: translateY(-1px);
}
.app-footer {
  padding-bottom: calc(78px + env(safe-area-inset-bottom, 0px));
}

/* ---------- Settings / docs ---------- */
.set-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-8);
}
.set-row {
  display: flex;
  align-items: center;
  gap: var(--space-12);
  padding: var(--space-12) var(--space-16);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  background: var(--bg-surface);
}
.set-row .sr-info {
  flex: 1;
  min-width: 0;
}
.set-row .sr-state {
  font-size: var(--font-size-xs);
  color: var(--text-muted);
  flex-shrink: 0;
}
.set-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-8);
  width: 100%;
  padding: var(--space-12) var(--space-16);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  background: var(--bg-surface);
  font-family: var(--font-sans);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
  color: var(--text-primary);
  cursor: pointer;
  transition:
    border-color 0.15s ease,
    background-color 0.15s ease,
    color 0.15s ease;
  text-align: left;
}
.set-link:hover {
  border-color: var(--border-strong);
}
.set-link:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}
.set-link .chev {
  color: var(--text-muted);
  flex-shrink: 0;
}
.btn-danger-text {
  background: none;
  border: none;
  font-family: var(--font-sans);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-semibold);
  color: var(--text-error);
  cursor: pointer;
  padding: var(--space-8);
}
.btn-danger-text:hover {
  text-decoration: underline;
}
.backup-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-8);
  margin: var(--space-12) 0;
}
.backup-actions .btn {
  flex: 1 1 150px;
}
.backup-file {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}
.doc-body h4 {
  margin: var(--space-20) 0 var(--space-8);
  font-size: var(--font-size-sm);
}
.doc-body h4:first-child {
  margin-top: 0;
}
.doc-body p {
  font-size: var(--font-size-sm);
  color: var(--text-secondary);
  line-height: var(--leading-relaxed);
}
.doc-date {
  font-size: var(--font-size-xs);
  color: var(--text-muted);
  margin-bottom: var(--space-16);
}

/* ---------- Typography 규칙 (가독성/숫자 정렬) ---------- */
.hero-slogan,
.view-title,
.test-card-title,
.char-name,
.doc-body h4 {
  text-wrap: balance;
}
.progress-num,
.gauge-val,
.h-date,
.cat-count,
.step-num,
.check-progress .progress-num {
  font-variant-numeric: tabular-nums;
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .app-main > *,
  .card,
  .gap-row,
  .gap-bar,
  .gauge-fill,
  .char-hero > *,
  .matrix-cell,
  .pair-card,
  .q-slide,
  .opt-card,
  .type-card,
  .sign-box,
  .rule-check,
  .hero-logo,
  .logo-window rect,
  .survey-notice,
  .splash-inner,
  .splash-tag {
    animation: none !important;
  }
  * {
    transition-duration: 0.01ms !important;
  }
}

/* ---- 30개 라운드 신규 ---- */
.exp-tags {
  color: var(--app-coral);
  font-weight: 600;
}
.settle-row.inc .settle-amt {
  color: #1a9b6c;
  font-weight: 700;
}
.goal-ring-wrap {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 8px 0 12px;
}
.goal-ring {
  width: 84px;
  height: 84px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
  position: relative;
}
.goal-ring::before {
  content: '';
  position: absolute;
  inset: 10px;
  border-radius: 50%;
  background: var(--app-surface, #fff);
}
.goal-ring span {
  position: relative;
  font-weight: 800;
  font-size: 17px;
  color: var(--app-ink);
  font-variant-numeric: tabular-nums;
}
.goal-meta strong {
  font-size: 20px;
  font-weight: 800;
  color: var(--app-ink);
  font-variant-numeric: tabular-nums;
}
.goal-meta small {
  color: var(--app-muted);
}
.goal-done {
  color: var(--app-coral);
  font-weight: 700;
  margin: 4px 0 0;
}
.recipe-box {
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255, 120, 90, 0.07);
}
.chore-days {
  display: inline-block;
  margin-left: 6px;
  padding: 0 6px;
  border-radius: 8px;
  background: rgba(255, 120, 90, 0.1);
  color: var(--app-coral);
  font-size: 10px;
  font-weight: 700;
}
.chore-row.offday {
  opacity: 0.45;
}
.chore-row.offday .chore-check {
  pointer-events: none;
}
.cal-week {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 8px 4px 10px;
}
.cal-wrow {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  text-align: left;
  min-height: 40px;
}
.cal-wrow.today {
  background: rgba(255, 120, 90, 0.08);
}
.cal-wrow.sel {
  outline: 2px solid var(--app-coral);
}
.cal-wdow {
  width: 16px;
  font-size: 11px;
  color: var(--app-muted);
  flex: none;
}
.cal-wrow b {
  width: 22px;
  font-size: 15px;
  font-weight: 800;
  color: var(--app-ink);
  flex: none;
  font-variant-numeric: tabular-nums;
}
.cal-wevs {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  flex: 1;
}
.cal-wevs i {
  font-style: normal;
  font-size: 11px;
  padding: 1px 7px;
  border-radius: 8px;
  background: rgba(255, 120, 90, 0.12);
  color: var(--app-ink);
}
.cal-wevs i.none {
  background: transparent;
  color: var(--app-muted);
}
.care-due {
  border-color: var(--app-coral) !important;
}
.memo-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 2px;
  border-bottom: 1px solid var(--app-line, rgba(0, 0, 0, 0.06));
}
.memo-row:last-of-type {
  border-bottom: 0;
}
.memo-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.memo-info small {
  color: var(--app-muted);
  word-break: break-all;
}

/* ---- 배치 B: 배지·애정언어·앨범·회고 ---- */
.feed-row.partner .feed-text {
  color: var(--app-coral);
}
.badge-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  margin-bottom: 6px;
}
.badge-cell {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 10px 4px;
  border-radius: 12px;
  background: var(--app-surface);
  border: 1px solid var(--app-line);
}
/* WCAG AA — 잠금 표시는 아이콘만 흐리게 (셀 전체 opacity는 라벨 대비를 깎음) */
.badge-cell:not(.on) span {
  opacity: 0.35;
}
.badge-cell:not(.on) small {
  color: var(--app-muted);
}
.badge-cell.on {
  border-color: var(--app-coral);
  background: var(--app-soft);
}
.badge-cell span {
  font-size: 20px;
}
.badge-cell small {
  font-size: 10px;
  font-weight: 700;
  color: var(--app-ink);
  text-align: center;
}
.ll-result {
  display: flex;
  gap: 12px;
  align-items: center;
}
.ll-emoji {
  font-size: 30px;
}
.ll-result strong {
  font-size: 17px;
}
.ll-choice {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.ll-opt {
  padding: 13px 14px;
  border: 1px solid var(--app-line);
  border-radius: 12px;
  background: var(--app-surface);
  text-align: left;
  font-size: 14px;
  color: var(--app-ink);
  font-family: inherit;
}
.ll-opt:active {
  border-color: var(--app-coral);
  background: var(--app-soft);
}
.album-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  padding: 4px 0 12px;
}
.album-cell {
  position: relative;
  aspect-ratio: 1;
  border-radius: 10px;
  overflow: hidden;
  background: var(--app-soft);
  display: flex;
  align-items: flex-end;
}
.album-cell img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.album-cell small {
  position: relative;
  z-index: 1;
  padding: 3px 6px;
  font-size: 9px;
  color: #fff;
  background: rgba(0, 0, 0, 0.45);
  width: 100%;
}
.album-cell.miss {
  align-items: center;
  justify-content: center;
  color: var(--app-muted);
  font-size: 11px;
}
.year-card .rl {
  padding: 6px 0;
}

/* ---- 배치 C: 휴지통·스냅샷·충돌 ---- */
.trash-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 0;
  border-bottom: 1px solid var(--app-line);
  font-size: 13px;
}
.trash-row:last-of-type {
  border-bottom: 0;
}
.trash-label {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.trash-time {
  font-size: 11px;
  color: var(--app-muted);
  flex-shrink: 0;
}
.conflict-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  background: #fff4e0;
  border: 1px solid #ffd9a0;
  font-size: 13px;
}
[data-theme='dark'] .conflict-banner {
  background: #2e2115;
  border-color: #5a422a;
}
.conflict-list {
  margin: 10px 0;
}
.conflict-row {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 9px 0;
  border-bottom: 1px solid var(--app-line);
  font-size: 13px;
}
.conflict-row:last-child {
  border-bottom: 0;
}
.conflict-pick {
  display: flex;
  gap: 6px;
  margin-top: 4px;
}
.input-mic {
  position: relative;
  display: block;
}
.input-mic .input {
  padding-right: 42px;
}
.mic-btn {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--app-muted);
  cursor: pointer;
}
.mic-btn svg {
  width: 17px;
  height: 17px;
}
.mic-btn.on {
  color: #fff;
  background: var(--bg-brand);
  animation: micPulse 1.2s ease-in-out infinite;
}
@keyframes micPulse {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(194, 58, 82, 0.45);
  }
  50% {
    box-shadow: 0 0 0 7px rgba(194, 58, 82, 0);
  }
}
@media (prefers-reduced-motion: reduce) {
  .mic-btn.on {
    animation: none;
  }
}
.anniv-suggest {
  margin-top: 10px;
}
.conflict-row strong {
  font-size: 14px;
}
.conflict-row span {
  color: var(--app-muted);
  font-size: 12px;
}
