:root {
  --bg: #f5f6f8;
  --panel: #ffffff;
  --text: #1f2937;
  --muted: #6b7280;
  --accent: #1e3a8a;
  --border: #e5e7eb;
  --shadow: 0 8px 24px rgba(17, 24, 39, 0.08);
  --radius: 16px;
}
* { box-sizing: border-box; }
html, body {
  height: 100%;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
html {
  overflow: hidden;
}
body {
  margin: 0;
  font-family: "Noto Sans SC", sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  overflow-y: auto;
}
html::-webkit-scrollbar,
body::-webkit-scrollbar {
  width: 0;
  height: 0;
}
.brand {
  display: grid;
  gap: 6px;
}
.brand-title {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 0.02em;
}
.brand-sub {
  font-size: 12px;
  color: rgba(249, 250, 251, 0.7);
}
.nav {
  display: grid;
  gap: 8px;
}
.nav a {
  text-decoration: none;
  color: #f9fafb;
  background: rgba(249, 250, 251, 0.08);
  padding: 10px 12px;
  border-radius: 12px;
  font-weight: 600;
  transition: background 150ms ease;
  cursor: pointer;
}
.nav a.active {
  background: #1e293b;
  color: #ffffff;
}
.card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  box-shadow: var(--shadow);
}
.tool-page {
  display: grid;
  gap: 18px;
}
.hero h1 {
  margin: 0 0 6px;
  font-size: 24px;
  font-weight: 800;
}
.hero p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}
.section-title {
  margin: 0 0 10px;
  font-size: 16px;
  font-weight: 700;
}
.section-sub {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 12px;
}
.input {
  width: 100%;
  padding: 9px 10px;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 14px;
  background: #fbfbfd;
}
.row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 10px;
  margin-bottom: 10px;
}
.gift-list {
  display: grid;
  gap: 8px;
  max-height: 200px;
  overflow-y: auto;
  padding-right: 4px;
}
.gift-row {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 10px;
}
.btn-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 8px;
}
.btn {
  border: none;
  border-radius: 12px;
  padding: 10px 14px;
  font-weight: 700;
  cursor: pointer;
  background: var(--accent);
  color: #fff;
  transition: background 150ms ease;
}
.btn.secondary {
  background: #e5e7eb;
  color: #1f2937;
}
.btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}
.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #f9fafb;
  padding: 8px;
}
table {
  border-collapse: collapse;
  width: 100%;
  min-width: 520px;
}
th, td {
  border: 1px solid var(--border);
  padding: 6px 8px;
  text-align: left;
  font-size: 13px;
  background: #fff;
}
th {
  background: #f3f4f6;
  font-weight: 700;
}
.output {
  white-space: pre-wrap;
  background: #111827;
  color: #f9fafb;
  border-radius: 14px;
  padding: 14px;
  min-height: 160px;
  font-size: 13px;
  line-height: 1.6;
}
.msg {
  font-size: 13px;
  color: #b45309;
  min-height: 18px;
}
@media (max-width: 640px) {
  .gift-row { grid-template-columns: 1fr; }
  table { min-width: 420px; }
}
