@font-face {
  font-family: "D-DIN";
  src: url("./fonts/D-DIN.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "D-DIN";
  src: url("./fonts/D-DIN-Bold.woff2") format("woff2");
  font-weight: 500 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #fafafa;
  --card: #ffffff;
  --fg: #09090b;
  --muted: #f4f4f5;
  --muted-fg: #71717a;
  --border: #e4e4e7;
  --accent: #ff8400;
  --accent-fg: #ffffff;
  --accent-soft: #ff84000d;
  --radius: 8px;
  --radius-lg: 12px;
  --font: "D-DIN", ui-sans-serif, system-ui, sans-serif;
  --max: 1120px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  color-scheme: light;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.45;
  font-weight: 400;
}

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

a:hover {
  color: var(--fg);
}

.wrap {
  width: min(var(--max), calc(100% - 48px));
  margin-inline: auto;
}

.top {
  border-bottom: 1px solid var(--border);
  background: var(--card);
}

.top-inner,
.foot-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 56px;
}

.brand {
  font-size: 14px;
  font-weight: 600;
}

.nav {
  display: flex;
  gap: 16px;
  color: var(--muted-fg);
  font-size: 12px;
}

.page {
  padding: 32px 0 48px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.hero h1 {
  margin: 0;
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.4px;
}

.disclaimer {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px;
  background: var(--muted);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 13px;
}

.disclaimer .icon-i {
  margin-top: 1px;
  color: var(--muted-fg);
}

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

.col {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

.form {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 24px;
}

.result {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 24px;
  min-height: 420px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.label,
.label-row {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 500;
}

.vrows {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.vrow {
  display: flex;
  align-items: center;
  gap: 10px;
}

.vlab {
  width: 96px;
  flex-shrink: 0;
  color: var(--muted-fg);
  font-size: 12px;
}

.seg {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 4px;
  background: var(--muted);
  border-radius: var(--radius);
  width: fit-content;
}

.seg button {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--muted-fg);
  height: 32px;
  padding: 0 12px;
  border-radius: 6px;
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
}

.seg button[aria-pressed="true"] {
  background: var(--accent);
  color: var(--accent-fg);
}

[hidden] {
  display: none !important;
}

.input {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 36px;
  padding: 0 12px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.input:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.input input {
  width: 100%;
  border: 0;
  background: transparent;
  color: var(--fg);
  font: inherit;
  font-size: 14px;
  outline: none;
}

.input .unit {
  color: var(--muted-fg);
  font-size: 14px;
}

.rule {
  height: 1px;
  background: var(--border);
  border: 0;
  margin: 0;
}

.tip {
  position: relative;
}

.icon-i,
.info {
  display: inline-grid;
  place-items: center;
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  padding: 1px 1px 1px 1px;
  border: 1px solid currentColor;
  border-radius: 50%;
  background: transparent;
  color: var(--muted-fg);
  font-family: Georgia, "Iowan Old Style", "Times New Roman", Times, serif;
  font-size: 10px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0;
}

.info {
  appearance: none;
  cursor: pointer;
}

.info:hover,
.info:focus-visible {
  color: var(--fg);
}

.bubble {
  position: absolute;
  left: 0;
  top: calc(100% + 8px);
  z-index: 5;
  width: min(280px, 70vw);
  padding: 10px 12px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--card);
  box-shadow: 0 8px 24px rgb(0 0 0 / 0.08);
  color: var(--fg);
  font-size: 12px;
  font-weight: 400;
  opacity: 0;
  pointer-events: none;
}

.tip:hover .bubble,
.tip:focus-within .bubble {
  opacity: 1;
  pointer-events: auto;
}

.result-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.badge {
  height: 22px;
  padding: 0 8px;
  display: inline-flex;
  align-items: center;
  background: var(--muted);
  border-radius: var(--radius);
  font-size: 11px;
  font-weight: 600;
}

.hero-box {
  padding: 16px;
  background: var(--muted);
  border-radius: var(--radius);
}

.hero-num {
  display: flex;
  align-items: flex-end;
  gap: 8px;
}

.hero-num .n {
  font-size: 48px;
  font-weight: 600;
  letter-spacing: -0.8px;
  line-height: 1;
}

.hero-num .u,
.hero-kind {
  color: var(--muted-fg);
  font-size: 15px;
  font-weight: 500;
}

.hero-kind {
  display: block;
  margin-top: 4px;
  font-size: 13px;
  font-weight: 400;
}

.hero-num .n.is-empty,
.kv .val.is-empty {
  color: var(--muted-fg);
  font-weight: 500;
}

.details {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.kv {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.kv .k {
  color: var(--muted-fg);
}

.kv .val {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 500;
}

.kv .tip .bubble {
  left: auto;
  right: 0;
}

.ref {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 12px;
}

.ref-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.ref-top strong {
  display: block;
  font-size: 14px;
  font-weight: 500;
}

.ref-top span {
  color: var(--muted-fg);
  font-size: 12px;
}

.table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 8px;
  font-size: 12px;
  text-align: center;
}

.table th {
  color: var(--muted-fg);
  font-weight: 400;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
}

.table td {
  padding: 8px 0;
}

.table tr.is-active {
  background: var(--accent-soft);
  border-radius: 6px;
}

.table td.is-hit {
  color: var(--accent);
  font-weight: 600;
  background: var(--accent-soft);
  border-radius: 4px;
}

.table td.is-empty {
  color: var(--muted-fg);
}

.shop {
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.shop-legal {
  color: var(--muted-fg);
  font-size: 12px;
  font-weight: 500;
  padding: 4px 8px 8px;
}

.ad {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 8px;
  border-radius: var(--radius);
  color: inherit;
  text-decoration: none;
}

.ad:hover {
  background: var(--muted);
}

.ad:active {
  transform: scale(0.99);
}

.ad-thumb {
  width: 56px;
  height: 56px;
  object-fit: contain;
  flex-shrink: 0;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
}

.ad > div {
  flex: 1;
  min-width: 0;
}

.ad .t {
  font-size: 14px;
  font-weight: 500;
}

.ad .b {
  margin-top: 2px;
  color: var(--muted-fg);
  font-size: 12px;
}

.faq h2 {
  margin: 0 0 12px;
  font-size: 20px;
  font-weight: 600;
}

details {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 14px;
  margin-bottom: 8px;
}

details summary {
  cursor: pointer;
  font-weight: 500;
}

details p {
  margin: 10px 0 0;
  color: var(--muted-fg);
}

.legal {
  padding: 36px 0 80px;
}

.legal h1 {
  margin: 0 0 16px;
  font-size: 28px;
  font-weight: 600;
}

.legal h2 {
  margin: 28px 0 8px;
  font-size: 18px;
}

.legal h3 {
  margin: 20px 0 8px;
  font-size: 15px;
  font-weight: 600;
}

.legal p,
.legal li {
  color: #3f3f46;
  max-width: 72ch;
}

.foot {
  border-top: 1px solid var(--border);
}

.foot-inner {
  min-height: 48px;
  color: var(--muted-fg);
  font-size: 12px;
}

@media (max-width: 900px) {
  .grid,
  .vrow {
    grid-template-columns: 1fr;
    display: flex;
    flex-direction: column;
    align-items: stretch;
  }

  .vlab {
    width: auto;
  }

  .result {
    min-height: 0;
  }
}
