* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Pretendard", "Segoe UI", Roboto, sans-serif;
}

body {
  min-height: 100vh;
  background: linear-gradient(180deg, #eef7f6 0%, #f4f7fb 100%);
  color: #1e293b;
  display: flex;
  justify-content: center;
  padding: 20px 14px;
}

.app-shell {
  width: 100%;
  max-width: 540px;
  background: #ffffff;
  border: 1px solid #dce6ef;
  border-radius: 26px;
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.06);
  overflow: hidden;
}

.app-header {
  padding: 20px 20px 16px;
  background: linear-gradient(135deg, #f0fdfa 0%, #f0f9ff 100%);
  border-bottom: 1px solid #e2e8f0;
}

.header-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.app-title {
  font-size: 1.45rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #0f172a;
}

.header-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.top-chip {
  padding: 6px 11px;
  border-radius: 999px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #334155;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
}

.top-chip:hover {
  background: #f1f5f9;
}

.top-chip-primary {
  background: #0d9488;
  border-color: #0d9488;
  color: #ffffff;
}

.top-chip-primary:hover {
  background: #0f766e;
}

.meta-row {
  margin-top: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.date-pill {
  font-size: 0.83rem;
  font-weight: 700;
  color: #0f766e;
}

.text-link-btn {
  border: none;
  background: none;
  font-size: 0.78rem;
  font-weight: 600;
  color: #64748b;
  text-decoration: underline;
  cursor: pointer;
}

.greeting-card {
  margin-top: 10px;
  padding: 15px 16px;
  border-radius: 18px;
  background: #ffffff;
  border: 1px solid #cce7e3;
  box-shadow: 0 4px 12px rgba(13, 148, 136, 0.05);
}

.greeting-main {
  font-size: 1.2rem;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.35;
}

.greeting-sub {
  margin-top: 4px;
  font-size: 1rem;
  font-weight: 600;
  color: #0f766e;
  line-height: 1.45;
}

.nav-tabs {
  display: flex;
  gap: 6px;
  padding: 12px 16px;
  overflow-x: auto;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
  scrollbar-width: thin;
}

.nav-tab {
  flex: 0 0 auto;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid #e2e8f0;
  background: #ffffff;
  color: #475569;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
}

.nav-tab:hover {
  border-color: #99f6e4;
  color: #0f766e;
}

.nav-tab.active {
  background: #0d9488;
  border-color: #0d9488;
  color: #ffffff;
}

.main-view {
  padding: 18px;
}

.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
}

.panel-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 20px;
  padding: 18px;
  margin-bottom: 14px;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.03);
}

.panel-card:last-child {
  margin-bottom: 0;
}

.panel-card h2 {
  font-size: 1.04rem;
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 12px;
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.section-head h2 {
  margin-bottom: 0;
}

.badge-mint {
  font-size: 0.72rem;
  font-weight: 700;
  color: #0f766e;
  background: #ccfbf1;
  padding: 4px 10px;
  border-radius: 999px;
}

.badge-sky {
  font-size: 0.72rem;
  font-weight: 700;
  color: #0369a1;
  background: #e0f2fe;
  padding: 4px 10px;
  border-radius: 999px;
}

.highlight-box {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 15px;
}

.highlight-box h3 {
  font-size: 0.98rem;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 8px;
}

.body-copy {
  font-size: 0.89rem;
  color: #334155;
  line-height: 1.58;
}

.tip-copy {
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  background: #f0fdfa;
  border: 1px solid #ccfbf1;
  color: #115e59;
  font-size: 0.82rem;
  line-height: 1.45;
}

.quick-menu {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.quick-item {
  padding: 12px;
  border-radius: 14px;
  border: 1px solid #dbe4ee;
  background: #ffffff;
  color: #1e293b;
  font-size: 0.84rem;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
  transition: all 0.15s ease;
}

.quick-item:hover {
  border-color: #0d9488;
  background: #f0fdfa;
}

.field {
  margin-bottom: 12px;
}

.field label {
  display: block;
  font-size: 0.82rem;
  font-weight: 700;
  color: #475569;
  margin-bottom: 5px;
}

.field input,
.field select {
  width: 100%;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  font-size: 0.94rem;
  color: #0f172a;
}

.field input:focus,
.field select:focus {
  outline: none;
  border-color: #0d9488;
  box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.14);
}

.primary-btn,
.secondary-btn {
  width: 100%;
  padding: 11px 14px;
  border-radius: 13px;
  border: none;
  font-size: 0.92rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
}

.primary-btn {
  background: #0d9488;
  color: #ffffff;
  margin-top: 4px;
}

.primary-btn:hover {
  background: #0f766e;
}

.secondary-btn {
  background: #e2e8f0;
  color: #1e293b;
  margin-top: 12px;
}

.secondary-btn:hover {
  background: #cbd5e1;
}

.result-card {
  margin-top: 12px;
  padding: 13px 15px;
  border-radius: 14px;
  background: #ffffff;
  border: 1px solid #99f6e4;
  border-left: 4px solid #0d9488;
  font-size: 0.9rem;
  line-height: 1.58;
}

.sub-pills {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.sub-pill {
  padding: 6px 11px;
  border-radius: 999px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #334155;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
}

.sub-pill.active {
  background: #0284c7;
  border-color: #0284c7;
  color: #ffffff;
}

.ref-box {
  display: none;
}

.ref-box.active {
  display: block;
}

.helper-text {
  font-size: 0.78rem;
  color: #64748b;
  margin-bottom: 10px;
}

.table-scroll {
  overflow-x: auto;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  background: #ffffff;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8rem;
}

.data-table th,
.data-table td {
  padding: 9px 8px;
  border-bottom: 1px solid #e2e8f0;
  text-align: left;
  vertical-align: top;
  line-height: 1.38;
}

.data-table th {
  background: #f0f9ff;
  color: #0369a1;
  font-weight: 700;
}

.note-box {
  margin-top: 10px;
  padding: 11px 13px;
  border-radius: 14px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  font-size: 0.82rem;
  color: #334155;
}

.wave-card {
  padding: 11px;
  border-radius: 16px;
  background: #f0f9ff;
  border: 1px solid #bae6fd;
  margin-bottom: 12px;
}

.wave-caption {
  font-size: 0.78rem;
  font-weight: 700;
  color: #0369a1;
  margin-bottom: 6px;
}

.wave-svg {
  width: 100%;
  height: auto;
  display: block;
}

.question-text {
  font-size: 0.94rem;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.5;
  margin-bottom: 10px;
}

.choice-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.choice-btn {
  width: 100%;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #1e293b;
  font-size: 0.88rem;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  transition: all 0.15s ease;
}

.choice-btn:hover {
  background: #f0fdfa;
  border-color: #0d9488;
}

.feedback-text {
  margin-top: 10px;
  font-size: 0.85rem;
  font-weight: 700;
  line-height: 1.45;
  min-height: 18px;
}

.stack-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 360px;
  overflow-y: auto;
}

.list-card {
  padding: 12px 14px;
  border-radius: 14px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
}

.list-card strong {
  display: block;
  font-size: 0.92rem;
  color: #0f172a;
  margin-bottom: 3px;
}

.list-card span {
  font-size: 0.83rem;
  color: #475569;
  line-height: 1.45;
}

.hidden {
  display: none;
}

.app-footer {
  padding: 16px 20px 20px;
  background: #f8fafc;
  border-top: 1px solid #e2e8f0;
  text-align: center;
}

.footer-author {
  font-size: 0.8rem;
  font-weight: 700;
  color: #334155;
}

.footer-sub {
  margin-top: 3px;
  font-size: 0.75rem;
  color: #64748b;
}