:root {
  color-scheme: light;
  --ink: #1b1b1b;
  --muted: #5b5b5b;
  --accent: #e4572e;
  --accent-dark: #c53b18;
  --accent-soft: #ffd6c7;
  --panel: #fff7ed;
  --panel-strong: #fff3e1;
  --line: #e2d9cc;
  --header-row-height: 32px;
  --shadow: 0 20px 50px rgba(17, 17, 17, 0.12);
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Noto Sans KR", "Space Grotesk", "Apple SD Gothic Neo", sans-serif;
  color: var(--ink);
  background: radial-gradient(circle at top left, #fff3e1 0%, #f3efe9 40%, #f8f0e6 100%);
  min-height: 100vh;
}

body::before,
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}

body::before {
  background: radial-gradient(circle at 20% 20%, rgba(228, 87, 46, 0.14), transparent 55%),
    radial-gradient(circle at 80% 10%, rgba(50, 80, 75, 0.18), transparent 45%),
    radial-gradient(circle at 80% 80%, rgba(249, 202, 170, 0.25), transparent 50%);
}

body::after {
  background-image: repeating-linear-gradient(
      120deg,
      rgba(0, 0, 0, 0.02) 0,
      rgba(0, 0, 0, 0.02) 1px,
      transparent 1px,
      transparent 80px
    ),
    repeating-linear-gradient(
      -60deg,
      rgba(0, 0, 0, 0.015) 0,
      rgba(0, 0, 0, 0.015) 1px,
      transparent 1px,
      transparent 60px
    );
}

.page {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 24px 60px;
}

.hero {
  padding: 20px 10px 40px;
  animation: floatIn 0.9s ease;
}

.hero-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 24px;
}

.logo {
  width: 72px;
  height: 72px;
  border-radius: 20px;
  background: var(--accent);
  color: #fff;
  display: grid;
  place-items: center;
  font-family: "Unbounded", "Space Grotesk", sans-serif;
  font-weight: 700;
  font-size: 20px;
  letter-spacing: 1px;
  box-shadow: 0 10px 30px rgba(228, 87, 46, 0.35);
}

.brand-title {
  margin: 0;
  font-size: 15px;
  letter-spacing: 0.8px;
  text-transform: uppercase;
}

.brand-sub {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.pill {
  margin-left: auto;
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.7);
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
}

.pill span,
.pill strong {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.iso-week strong {
  font-size: 15px;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 30px;
  align-items: stretch;
}

.hero-copy h1 {
  font-family: "Unbounded", "Space Grotesk", sans-serif;
  font-weight: 700;
  font-size: clamp(24px, 2.6vw, 36px);
  line-height: 1.25;
  margin-bottom: 14px;
}

.hero-kicker {
  font-family: "Unbounded", "Space Grotesk", sans-serif;
  font-size: clamp(30px, 4vw, 48px);
  font-weight: 800;
  letter-spacing: 0.6px;
  margin: 0 0 10px;
}

.hero-copy p {
  margin: 0 0 24px;
  color: var(--muted);
  font-size: 16px;
}

.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}


.main-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

.panel {
  background: rgba(255, 255, 255, 0.75);
  border-radius: var(--radius);
  padding: 22px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
  animation: fadeUp 0.8s ease;
}

.panel-header h2 {
  margin: 0 0 6px;
  font-size: 20px;
}

.panel-header p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.panel-header.header-split {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.lang-control {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  color: var(--muted);
}

.lang-switch {
  min-width: 160px;
}

.lang-switch label {
  font-size: 12px;
}

.form {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin-top: 18px;
}

.form-section {
  border-radius: 16px;
  border: 1px solid var(--line);
  background: #fff;
  padding: 16px 18px;
  display: grid;
  gap: 12px;
}

.section-header h3 {
  margin: 0;
  font-size: 16px;
  letter-spacing: 0.2px;
}

.section-header p {
  margin: 4px 0 0;
  font-size: 12px;
  color: var(--muted);
}

.settings-list {
  display: grid;
  gap: 12px;
}

.setting-row {
  display: grid;
  grid-template-columns: minmax(140px, 180px) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.setting-row + .setting-row {
  border-top: 1px solid var(--line);
  padding-top: 12px;
}

.setting-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  padding-top: 8px;
}

.setting-control {
  display: grid;
  gap: 10px;
}

.range-stack {
  display: grid;
  align-items: start;
  gap: 10px;
}

.field label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 6px;
  color: #3d3d3d;
}

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

.field input,
.field select,
.setting-control input[type="text"],
.setting-control input[type="month"],
.setting-control input[type="date"],
.setting-control select {
  width: 100%;
  height: 40px;
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #fff;
  font-size: 13px;
}

.field-group {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 10px;
}

.field-sub {
  margin-top: 8px;
  display: grid;
  gap: 6px;
}

.field-sub label {
  margin-bottom: 0;
  font-size: 11px;
  color: var(--muted);
}

.inline-field {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 12px;
  align-items: center;
}

.inline-field label {
  margin-bottom: 0;
}

.segmented {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
  background: #f6f3ed;
  border-radius: 12px;
  border: 1px solid var(--line);
  padding: 4px;
  min-height: 40px;
  gap: 4px;
}

.segmented label {
  position: relative;
  text-align: center;
  padding: 6px 6px;
  cursor: pointer;
  font-weight: 600;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.segmented input {
  position: absolute;
  opacity: 0;
}

.segmented span {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 8px;
}

.segmented input:checked + span {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 10px 18px rgba(228, 87, 46, 0.25);
}

.toggle-stack {
  display: grid;
  gap: 8px;
}

.toggle-line {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 240px;
  align-items: center;
  gap: 16px;
  padding: 8px 10px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #fff;
  font-size: 13px;
}

.toggle-line span {
  flex: 1;
  min-width: 0;
}

.toggle-inline {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  justify-content: flex-end;
}

.toggle-inline select {
  height: 32px;
  min-width: 120px;
  padding: 4px 10px;
  border-radius: 8px;
  font-size: 12px;
}

.toggle-inline .switch {
  flex-shrink: 0;
}

.switch {
  position: relative;
  width: 52px;
  height: 28px;
  display: inline-block;
}

.switch.small {
  width: 44px;
  height: 24px;
}

.switch.small .slider::before {
  width: 18px;
  height: 18px;
}

.switch.small input:checked + .slider::before {
  transform: translateX(20px);
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #d2c7ba;
  transition: 0.2s;
  border-radius: 999px;
}

.slider::before {
  position: absolute;
  content: "";
  height: 22px;
  width: 22px;
  left: 3px;
  bottom: 3px;
  background-color: #fff;
  transition: 0.2s;
  border-radius: 50%;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.switch input:checked + .slider {
  background-color: var(--accent);
}

.switch input:checked + .slider::before {
  transform: translateX(24px);
}

.checkbox-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 8px;
}

.checkbox-grid label {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 6px;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #fff;
  font-size: 12px;
  white-space: nowrap;
  min-height: 36px;
}

.checkbox-grid input {
  margin: 0;
}

.panel-footer {
  margin-top: 14px;
  display: grid;
  gap: 10px;
}

.is-hidden {
  display: none;
}

.summary {
  font-size: 13px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 12px;
  line-height: 1.6;
  letter-spacing: 0.1px;
}

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

button {
  font-family: inherit;
  border: none;
  cursor: pointer;
}

.primary {
  background: var(--accent);
  color: #fff;
  padding: 12px 18px;
  border-radius: 12px;
  font-weight: 600;
  box-shadow: 0 12px 20px rgba(228, 87, 46, 0.3);
}

.primary:hover {
  background: var(--accent-dark);
}

.ghost {
  background: transparent;
  border: 1px solid var(--line);
  padding: 12px 18px;
  border-radius: 12px;
  font-weight: 600;
}

button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.error {
  color: #b42318;
  font-size: 13px;
  margin: 0;
}

.error:not(:empty) {
  margin-top: 4px;
}

.preview-wrap {
  margin-top: 18px;
  border-radius: 0;
  border: 1px solid var(--line);
  background: #fff;
  overflow: auto;
  max-height: 520px;
  position: relative;
}

.preview-placeholder {
  padding: 40px 20px;
  text-align: center;
  color: var(--muted);
}

.preview-note {
  margin: 12px 0 0;
  font-size: 12px;
  color: var(--muted);
}

.wbs-table {
  border-collapse: separate;
  border-spacing: 0;
  width: max-content;
  min-width: 100%;
  table-layout: fixed;
}

.wbs-table th,
.wbs-table td {
  border: 1px solid #000;
  padding: 4px 8px;
  text-align: center;
  font-size: 12px;
  background: #fff;
  min-width: 64px;
  height: var(--header-row-height);
  background-clip: padding-box;
}

.wbs-table thead th {
  background: var(--panel);
  font-weight: 600;
  position: sticky;
  top: 0;
  z-index: 2;
}

.wbs-table thead tr:nth-child(2) th {
  top: calc(var(--header-row-height) * 1);
}

.wbs-table thead tr:nth-child(3) th {
  top: calc(var(--header-row-height) * 2);
}

.wbs-table thead tr:nth-child(4) th {
  top: calc(var(--header-row-height) * 3);
}

.wbs-table thead tr:nth-child(5) th {
  top: calc(var(--header-row-height) * 4);
}

.wbs-table thead tr:nth-child(6) th {
  top: calc(var(--header-row-height) * 5);
}

.wbs-table thead tr:nth-child(7) th {
  top: calc(var(--header-row-height) * 6);
}

.sticky-col {
  position: sticky;
  left: 0;
  background: #fff;
  z-index: 4;
  box-shadow: 2px 0 0 rgba(0, 0, 0, 0.6);
}

.sticky-header {
  z-index: 6;
  background: var(--panel);
}

.sticky-col.sticky-header {
  z-index: 7;
}

.timeline-header {
  background: var(--panel-strong);
}

.wbs-table .weekend {
  background: #ffe9de;
}

.footer {
  text-align: center;
  margin-top: 40px;
  color: var(--muted);
  font-size: 12px;
}

.footer p {
  margin: 4px 0;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}


@keyframes floatIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

  .hero-brand {
    flex-wrap: wrap;
  }
}

@media (max-width: 900px) {
  .setting-row {
    grid-template-columns: 1fr;
  }

  .setting-label {
    padding-top: 0;
  }
}

@media (max-width: 720px) {
  .lang-control {
    width: 100%;
    justify-content: space-between;
  }

  .lang-switch {
    width: 100%;
  }
}

@media (max-width: 600px) {
  .page {
    padding: 28px 18px 50px;
  }

  .checkbox-grid {
    grid-template-columns: 1fr;
  }
}
