:root {
  --page-bg: #f3efe7;
  --surface: rgba(255, 251, 245, 0.84);
  --surface-strong: #fffdfa;
  --surface-soft: rgba(246, 241, 233, 0.72);
  --ink: #172019;
  --muted: #697668;
  --outline: #ded3c2;
  --accent: #ea6a39;
  --accent-deep: #c74f23;
  --secondary: #1d7357;
  --secondary-soft: #dceee7;
  --shadow: 0 28px 60px rgba(87, 67, 42, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: "Space Grotesk", "Noto Sans KR", "Apple SD Gothic Neo", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(234, 106, 57, 0.14), transparent 30%),
    radial-gradient(circle at 86% 18%, rgba(29, 115, 87, 0.13), transparent 24%),
    linear-gradient(180deg, #fbf7f0 0%, #f4eee4 58%, #efe7db 100%);
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

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

.page-shell {
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
  padding: 36px 0 56px;
  position: relative;
  z-index: 1;
}

.subnav {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
}

.subnav-link,
.subnav-current {
  font-size: 1.14rem;
  font-weight: 800;
}

.page-orb {
  position: fixed;
  width: 380px;
  height: 380px;
  border-radius: 999px;
  filter: blur(24px);
  opacity: 0.35;
  pointer-events: none;
  z-index: 0;
}

.orb-a {
  top: -120px;
  left: -80px;
  background: rgba(234, 106, 57, 0.18);
}

.orb-b {
  right: -90px;
  top: 200px;
  background: rgba(29, 115, 87, 0.14);
}

.hero,
.panel {
  animation: rise 520ms ease both;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
  gap: 28px;
  padding: 28px;
  border-radius: 34px;
  border: 1px solid var(--outline);
  background: var(--surface);
  backdrop-filter: blur(14px);
  box-shadow: var(--shadow);
}

.hero-copy {
  display: grid;
  align-content: start;
  gap: 18px;
}

.eyebrow {
  margin: 0;
  color: var(--secondary);
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero h1 {
  margin: 0;
  font-size: clamp(2.25rem, 5vw, 4.4rem);
  line-height: 0.95;
  letter-spacing: -0.07em;
}

.intro {
  margin: 0;
  max-width: 680px;
  color: var(--muted);
  line-height: 1.72;
}

.hero-pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-pill {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid rgba(29, 115, 87, 0.16);
  background: rgba(29, 115, 87, 0.1);
  color: var(--secondary);
  font-size: 0.88rem;
  font-weight: 700;
}

.hero-summary {
  display: grid;
  gap: 16px;
}

.summary-card,
.mini-metric,
.panel,
.upload-drop,
.json-card,
.line-item-card,
.bill-card {
  border: 1px solid var(--outline);
  background: var(--surface-strong);
  box-shadow: var(--shadow);
}

.summary-card {
  display: grid;
  gap: 8px;
  padding: 18px 20px;
  border-radius: 26px;
}

.summary-label,
.mini-label,
.panel-note,
.status-chip,
.bill-badge {
  color: var(--muted);
}

.summary-value {
  font-size: clamp(1.8rem, 4vw, 2.9rem);
  letter-spacing: -0.05em;
}

.summary-sub {
  color: var(--secondary);
  font-weight: 700;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.mini-metric {
  display: grid;
  gap: 8px;
  padding: 16px;
  border-radius: 22px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(250, 246, 240, 0.95)),
    var(--surface-strong);
}

.mini-value {
  font-size: 1.35rem;
  letter-spacing: -0.04em;
}

.mini-value[data-tone="up"] {
  color: var(--accent-deep);
}

.mini-value[data-tone="down"] {
  color: var(--secondary);
}

.dashboard {
  display: grid;
  gap: 24px;
  margin-top: 24px;
}

.panel {
  padding: 28px;
  border-radius: 30px;
  background: var(--surface);
  backdrop-filter: blur(14px);
}

.workspace-grid {
  display: grid;
  grid-template-columns: minmax(320px, 0.9fr) minmax(0, 1.1fr);
  gap: 20px;
}

.panel-block {
  display: grid;
  align-content: start;
  gap: 18px;
}

.panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.panel-head h2,
.json-head h3,
.line-item-head h3 {
  margin: 0;
  letter-spacing: -0.04em;
}

.panel-note {
  margin: 6px 0 0;
  font-size: 0.93rem;
  line-height: 1.55;
}

.scan-form,
.bill-form {
  display: grid;
  gap: 18px;
}

.upload-drop {
  display: grid;
  gap: 10px;
  padding: 22px;
  border-radius: 26px;
  border-style: dashed;
  background:
    radial-gradient(circle at top right, rgba(234, 106, 57, 0.09), transparent 28%),
    linear-gradient(180deg, rgba(255, 250, 245, 0.95), rgba(249, 244, 236, 0.98));
}

.upload-drop input {
  width: 100%;
}

.upload-title {
  font-size: 1.12rem;
  font-weight: 800;
}

.upload-copy,
.upload-file {
  color: var(--muted);
  line-height: 1.6;
}

.upload-file {
  font-size: 0.92rem;
  font-weight: 700;
}

.field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.field {
  display: grid;
  gap: 8px;
}

.field-wide {
  grid-column: 1 / -1;
}

.field span {
  font-size: 0.92rem;
  font-weight: 700;
}

.field input {
  width: 100%;
  min-height: 48px;
  padding: 0 14px;
  border-radius: 16px;
  border: 1px solid var(--outline);
  background: rgba(255, 255, 255, 0.88);
  color: var(--ink);
}

.field input:focus {
  outline: 2px solid rgba(234, 106, 57, 0.24);
  border-color: rgba(234, 106, 57, 0.45);
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  color: var(--ink);
  font-weight: 700;
}

.btn-primary {
  background: linear-gradient(180deg, var(--accent) 0%, var(--accent-deep) 100%);
  color: #fff;
  box-shadow: 0 14px 28px rgba(199, 79, 35, 0.24);
}

.btn-ghost {
  border-color: var(--outline);
  background: rgba(255, 255, 255, 0.7);
}

.btn-small {
  min-height: 38px;
  padding: 0 14px;
  font-size: 0.92rem;
}

.status-chip {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--outline);
  background: rgba(255, 255, 255, 0.72);
  font-size: 0.92rem;
}

.status-chip[data-tone="busy"] {
  color: var(--accent-deep);
  border-color: rgba(234, 106, 57, 0.22);
  background: rgba(255, 236, 228, 0.92);
}

.status-chip[data-tone="success"] {
  color: var(--secondary);
  border-color: rgba(29, 115, 87, 0.22);
  background: rgba(225, 245, 236, 0.92);
}

.status-chip[data-tone="error"] {
  color: #a83c1d;
  border-color: rgba(168, 60, 29, 0.22);
  background: rgba(255, 237, 232, 0.92);
}

.json-card,
.line-item-card {
  padding: 18px;
  border-radius: 24px;
  background: rgba(255, 252, 247, 0.84);
}

.json-head,
.line-item-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.json-preview {
  margin: 0;
  min-height: 240px;
  max-height: 420px;
  overflow: auto;
  padding: 16px;
  border-radius: 18px;
  background: #161917;
  color: #eef7ef;
  font-family: "IBM Plex Mono", "SFMono-Regular", "Menlo", monospace;
  font-size: 0.86rem;
  line-height: 1.55;
}

.line-item-list,
.bill-breakdown {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.line-item-chip,
.breakdown-chip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 38px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--outline);
  background: rgba(255, 255, 255, 0.8);
}

.line-item-chip strong {
  color: var(--secondary);
}

.trend-bars {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 14px;
  align-items: end;
}

.trend-card {
  display: grid;
  gap: 10px;
  min-height: 230px;
  padding: 16px;
  border-radius: 24px;
  border: 1px solid var(--outline);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(248, 242, 234, 0.98)),
    var(--surface-strong);
}

.trend-bar-track {
  position: relative;
  height: 150px;
  display: flex;
  align-items: flex-end;
  padding: 8px;
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(29, 115, 87, 0.08), rgba(234, 106, 57, 0.08));
}

.trend-bar-fill {
  width: 100%;
  min-height: 10px;
  border-radius: 14px;
  background: linear-gradient(180deg, var(--secondary) 0%, #2f9b76 100%);
  box-shadow: 0 12px 26px rgba(29, 115, 87, 0.22);
  animation: grow 520ms ease both;
}

.trend-value {
  font-size: 1rem;
  letter-spacing: -0.03em;
}

.trend-label {
  color: var(--muted);
  font-size: 0.9rem;
}

.bill-list {
  display: grid;
  gap: 18px;
}

.bill-card {
  display: grid;
  gap: 14px;
  padding: 22px;
  border-radius: 26px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(250, 245, 237, 0.98)),
    var(--surface-strong);
}

.bill-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.bill-title-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.bill-title-row h3 {
  margin: 0;
  font-size: 1.6rem;
  letter-spacing: -0.04em;
}

.bill-badge {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid var(--outline);
  background: rgba(245, 239, 231, 0.88);
  font-size: 0.84rem;
}

.bill-note {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.65;
}

.bill-head-side {
  display: grid;
  justify-items: end;
  gap: 10px;
}

.bill-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.price-pill {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 16px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(234, 106, 57, 0.14), rgba(199, 79, 35, 0.14));
  color: var(--accent-deep);
  font-weight: 800;
}

.empty-state {
  padding: 28px;
  border-radius: 22px;
  border: 1px dashed var(--outline);
  color: var(--muted);
  background: rgba(255, 255, 255, 0.56);
  text-align: center;
  line-height: 1.65;
}

.empty-state.compact {
  padding: 18px;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes grow {
  from {
    transform: scaleY(0.12);
    transform-origin: bottom;
  }

  to {
    transform: scaleY(1);
    transform-origin: bottom;
  }
}

@media (max-width: 980px) {
  .hero,
  .workspace-grid {
    grid-template-columns: 1fr;
  }

  .summary-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .summary-grid,
  .field-grid {
    grid-template-columns: 1fr;
  }

  .panel,
  .hero,
  .summary-card,
  .mini-metric,
  .upload-drop,
  .json-card,
  .line-item-card,
  .bill-card {
    border-radius: 22px;
  }

  .bill-head {
    flex-direction: column;
  }

  .bill-head-side {
    width: 100%;
    justify-items: start;
  }
}

@media (max-width: 560px) {
  .page-shell {
    width: min(100% - 20px, 1200px);
    padding-top: 18px;
    padding-bottom: 40px;
  }

  .hero,
  .panel {
    padding: 20px;
  }

  .hero h1 {
    font-size: clamp(2rem, 11vw, 3rem);
  }

  .subnav-link,
  .subnav-current {
    font-size: 1rem;
  }

  .trend-bars {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

:root {
  --page-bg: #f3f3ef;
  --surface: #ffffff;
  --surface-strong: #ffffff;
  --surface-soft: #f6f6f2;
  --ink: #111111;
  --muted: #5f5f5f;
  --outline: #111111;
  --accent: #111111;
  --accent-deep: #111111;
  --secondary: #111111;
  --secondary-soft: #f1f1ed;
  --shadow: none;
}

body {
  font-family: "IBM Plex Mono", "SFMono-Regular", "Menlo", "Courier New", monospace;
  background: var(--page-bg);
  line-height: 1.55;
}

.page-orb {
  display: none;
}

.page-shell {
  width: min(1240px, calc(100% - 32px));
  padding: 20px 0 40px;
}

.page-header,
.nav-link,
.hero,
.panel,
.summary-card,
.mini-metric,
.upload-drop,
.json-card,
.line-item-card,
.bill-card,
.trend-card {
  animation: none;
  border: 1px solid var(--outline);
  border-radius: 0;
  background: #ffffff;
  backdrop-filter: none;
  box-shadow: none;
}

.page-header {
  padding: 18px 22px;
  display: grid;
  gap: 18px;
  margin: 0;
}

.page-header-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 12px;
  color: var(--ink) !important;
  font-size: 0.88rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none !important;
}

.nav-link:visited {
  color: var(--ink) !important;
}

.nav-link:hover {
  background: #111111;
  color: #ffffff;
}

.page-heading h1 {
  margin: 6px 0 8px;
  font-size: clamp(2rem, 5vw, 3.4rem);
  font-weight: 500;
  line-height: 1;
}

.page-heading p {
  margin: 0;
  max-width: 720px;
  color: var(--muted);
}

.hero,
.panel {
  padding: 20px 24px;
}

.hero {
  gap: 24px;
  margin-top: 16px;
}

.hero-copy {
  gap: 14px;
}

.hero-copy h2 {
  margin: 0;
  font-size: clamp(1.2rem, 3vw, 1.6rem);
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.hero-pill,
.status-chip,
.line-item-chip,
.breakdown-chip,
.bill-badge,
.price-pill {
  border: 1px solid var(--outline);
  border-radius: 0;
  background: #ffffff;
  color: #111111;
  box-shadow: none;
}

.hero h1,
.panel-head h2,
.json-head h3,
.line-item-head h3,
.bill-title-row h3 {
  font-weight: 500;
  letter-spacing: 0;
}

.panel-head h2 {
  font-size: clamp(1.2rem, 2.8vw, 1.6rem);
  text-transform: uppercase;
}

.intro,
.panel-note,
.upload-copy,
.upload-file,
.summary-label,
.mini-label,
.trend-label,
.bill-note,
.bill-badge,
.status-chip {
  color: var(--muted);
}

.summary-sub,
.mini-value[data-tone="up"],
.mini-value[data-tone="down"],
.line-item-chip strong {
  color: #111111;
}

.upload-drop {
  border-style: dashed;
}

.field input,
.btn {
  border: 1px solid var(--outline);
  border-radius: 0;
  background: #ffffff;
  color: var(--ink);
  box-shadow: none;
}

.field input:focus {
  outline: 2px solid #111111;
  outline-offset: 0;
  border-color: #111111;
}

.btn {
  font-weight: 500;
}

.btn:hover {
  background: #111111;
  color: #ffffff;
}

.btn-primary {
  background: #111111;
  color: #ffffff;
}

.btn-primary:hover {
  background: #ffffff;
  color: #111111;
}

.btn-ghost {
  background: #ffffff;
  color: #111111;
}

.status-chip[data-tone="busy"],
.status-chip[data-tone="success"],
.status-chip[data-tone="error"] {
  border-color: #111111;
  background: #ffffff;
  color: #111111;
}

.json-preview {
  border: 1px solid var(--outline);
  border-radius: 0;
  background: #ffffff;
  color: #111111;
}

.trend-bar-track {
  border: 1px solid var(--outline);
  border-radius: 0;
  background: #ffffff;
}

.trend-bar-fill {
  border-radius: 0;
  background: #111111;
  box-shadow: none;
}

.empty-state {
  border: 1px dashed var(--outline);
  border-radius: 0;
  background: #ffffff;
}

@media (max-width: 760px) {
  .page-header {
    padding: 16px;
  }

  .panel,
  .hero,
  .summary-card,
  .mini-metric,
  .upload-drop,
  .json-card,
  .line-item-card,
  .bill-card,
  .trend-card,
  .btn,
  .hero-pill,
  .status-chip,
  .line-item-chip,
  .breakdown-chip,
  .bill-badge,
  .price-pill {
    border-radius: 0;
  }

  .page-heading h1 {
    font-size: clamp(1.8rem, 10vw, 2.6rem);
  }
}

@media (max-width: 560px) {
  .page-shell {
    width: min(100% - 20px, 1240px);
    padding-top: 16px;
  }

  .hero,
  .panel {
    padding: 18px;
  }
}
