:root {
  --bg: #f7f9fc;
  --surface: #ffffff;
  --surface-2: #edf2f8;
  --text: #101828;
  --muted: #46586f;
  --border: #d3ddea;
  --accent: #1d4ed8;
  --accent-strong: #1e40af;
  --accent-soft: #e4edff;
  --ok: #0f766e;
  --warn: #a04d07;
  --danger: #b42318;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(16, 24, 40, 0.06), 0 8px 24px rgba(16, 24, 40, 0.06);
  --wrap: 1120px;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b1220;
    --surface: #121b2b;
    --surface-2: #1b2639;
    --text: #e7edf6;
    --muted: #a9b7cb;
    --border: #26344a;
    --accent: #7ea6ff;
    --accent-strong: #a8c2ff;
    --accent-soft: #1c2b46;
    --ok: #5eead4;
    --warn: #fbbf24;
    --danger: #fda4af;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 10px 30px rgba(0, 0, 0, 0.3);
  }
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans SC",
    "Hiragino Sans", "Noto Sans JP", "Helvetica Neue", Arial, sans-serif;
  font-kerning: normal;
  overflow-wrap: break-word;
}

h1,
h2,
h3 {
  line-height: 1.25;
  letter-spacing: -0.01em;
  margin: 0 0 0.5em;
}

h1 {
  font-size: clamp(1.75rem, 4vw, 2.55rem);
}

h2 {
  font-size: clamp(1.25rem, 2.6vw, 1.6rem);
  margin-top: 0;
}

h3 {
  font-size: 1.05rem;
}

p {
  margin: 0 0 1em;
}

a {
  color: var(--accent);
  text-underline-offset: 2px;
}

a:hover {
  color: var(--accent-strong);
}

img,
canvas,
svg {
  max-width: 100%;
}

/* display 规则会覆盖 UA 的 [hidden]，这里显式保证 hidden 生效 */
[hidden] {
  display: none !important;
}

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 20px;
}

.narrow {
  max-width: 840px;
}

.muted {
  color: var(--muted);
  font-size: 0.925rem;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 10;
  background: var(--surface);
  color: var(--text);
  border: 2px solid var(--accent);
  border-radius: 8px;
  padding: 10px 14px;
  transition: top 0.15s ease;
}

.skip-link:focus {
  top: 12px;
}

/* Header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 5;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 18px;
  min-height: 64px;
  flex-wrap: wrap;
  padding-top: 10px;
  padding-bottom: 10px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: var(--accent);
  color: #ffffff;
  font-size: 0.95rem;
}

.brand-name {
  font-size: 1rem;
}

.nav,
.footer-nav {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.nav a,
.footer-nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.93rem;
}

.nav a:hover,
.footer-nav a:hover {
  color: var(--text);
  text-decoration: underline;
}

.lang-switch {
  display: flex;
  gap: 6px;
  margin-left: auto;
  flex-wrap: wrap;
}

.lang-switch a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.82rem;
  padding: 5px 9px;
  border: 1px solid var(--border);
  border-radius: 999px;
  min-height: 30px;
}

.lang-switch a.is-current,
.lang-switch a[aria-current="true"] {
  color: var(--text);
  border-color: var(--accent);
  background: var(--accent-soft);
  font-weight: 600;
}

/* Sections */

main {
  padding-bottom: 56px;
}

.hero {
  padding: 52px 0 18px;
  max-width: 840px;
}

.kicker {
  margin: 0 0 10px;
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 700;
}

.lede {
  font-size: clamp(1rem, 2.2vw, 1.16rem);
  color: var(--muted);
  max-width: 68ch;
}

.hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0;
  margin: 18px 0 0;
  list-style: none;
}

.hero-badges li {
  font-size: 0.82rem;
  padding: 5px 11px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--muted);
}

.section {
  padding: 30px 0;
}

.section > h2 {
  margin-bottom: 16px;
}

.prose {
  max-width: 72ch;
}

.prose p {
  color: var(--text);
}

.section.callout {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
}

.text-link {
  font-weight: 600;
}

/* Cards */

.tool-grid,
.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 14px;
}

.tool-card,
.related-card {
  display: grid;
  gap: 6px;
  padding: 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--text);
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.tool-card:hover,
.related-card:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
  box-shadow: var(--shadow);
}

.tool-icon {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: var(--accent-soft);
  color: var(--accent);
  margin-bottom: 4px;
}

.tool-category {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  font-weight: 600;
}

.tool-title {
  font-weight: 700;
  font-size: 1.02rem;
  line-height: 1.35;
}

.tool-desc {
  font-size: 0.88rem;
  color: var(--muted);
}

.why-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
}

.why-card {
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.why-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.93rem;
}

/* Breadcrumb */

.breadcrumb {
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 22px 0 6px;
  font-size: 0.85rem;
  color: var(--muted);
}

.breadcrumb a {
  color: var(--muted);
  text-decoration: none;
}

.breadcrumb a:hover {
  color: var(--text);
  text-decoration: underline;
}

/* Tool page */

.tool-page {
  padding-bottom: 24px;
}

.page-head {
  padding: 8px 0 22px;
  max-width: 820px;
}

/* Panel */

.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px;
  margin: 0 0 22px;
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}

.panel-title {
  margin: 0;
  font-size: 1.1rem;
}

.badge {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  white-space: nowrap;
}

/* Form controls */

.field {
  display: grid;
  gap: 6px;
  margin: 0 0 14px;
  font-size: 0.9rem;
  color: var(--muted);
  min-width: 0;
}

.field > span {
  font-weight: 600;
  color: var(--text);
}

.field.grow {
  flex: 1 1 160px;
  margin-bottom: 0;
}

input[type="text"],
input[type="search"],
input[type="number"],
input[type="date"],
input[type="datetime-local"],
select {
  width: 100%;
  min-height: 44px;
  padding: 9px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg);
  color: var(--text);
  font: inherit;
  font-size: 0.95rem;
}

select {
  padding-right: 32px;
}

input[type="range"] {
  width: 100%;
  min-height: 32px;
  accent-color: var(--accent);
}

input:focus-visible,
select:focus-visible {
  border-color: var(--accent);
}

.check {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 10px 0;
  font-size: 0.92rem;
  color: var(--text);
}

.check input {
  width: 20px;
  height: 20px;
  accent-color: var(--accent);
}

.hint {
  margin: 12px 0 0;
  font-size: 0.85rem;
  color: var(--muted);
}

/* Buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 18px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
  font: inherit;
  font-size: 0.94rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.1s ease;
}

.btn:hover {
  border-color: var(--accent);
}

.btn:active {
  transform: translateY(1px);
}

.btn.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #ffffff;
}

@media (prefers-color-scheme: dark) {
  .btn.primary {
    color: #0b1220;
  }
}

.btn.primary:hover {
  background: var(--accent-strong);
  border-color: var(--accent-strong);
}

.btn.ghost {
  background: transparent;
}

.btn.small {
  min-height: 36px;
  padding: 6px 13px;
  font-size: 0.84rem;
}

.btn.icon-btn {
  min-height: 44px;
  width: 44px;
  padding: 0;
  border-radius: 12px;
  flex: 0 0 auto;
}

.btn.disabled,
.btn[aria-disabled="true"] {
  opacity: 0.5;
  pointer-events: none;
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 16px 0 0;
}

.filter-row,
.convert-row,
.duration-grid,
.settings-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: end;
}

.duration-grid {
  margin-bottom: 14px;
}

.convert-row {
  margin-bottom: 14px;
}

.settings {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  margin: 0;
}

.settings legend {
  padding: 0 8px;
  font-weight: 700;
  font-size: 0.92rem;
}

.settings-grid {
  margin-bottom: 8px;
}

.settings-grid .field {
  flex: 1 1 140px;
  margin-bottom: 8px;
}

.segmented {
  display: inline-flex;
  padding: 4px;
  gap: 4px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 999px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.segmented.small {
  margin-bottom: 12px;
}

.seg {
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  padding: 9px 16px;
  border-radius: 999px;
  cursor: pointer;
  min-height: 38px;
}

.seg.active,
.seg[aria-selected="true"] {
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 1px 3px rgba(16, 24, 40, 0.14);
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.chip {
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
  border-radius: 999px;
  padding: 7px 13px;
  font: inherit;
  font-size: 0.85rem;
  cursor: pointer;
  min-height: 36px;
}

.chip:hover {
  border-color: var(--accent);
}

/* Timezone */

.local-card {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 18px;
  border-radius: var(--radius);
  background: var(--accent-soft);
  margin-bottom: 18px;
  flex-wrap: wrap;
}

.local-clock {
  font-size: clamp(1.9rem, 6vw, 2.6rem);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  margin: 2px 0;
  letter-spacing: 0.01em;
}

.label {
  display: block;
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--muted);
  font-weight: 600;
  margin: 0 0 4px;
}

.zone-name {
  font-weight: 600;
  margin: 0 0 8px;
  font-size: 0.95rem;
}

.local-zone {
  min-width: 220px;
}

.search-field {
  max-width: 420px;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-top: 4px;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}

th,
td {
  text-align: left;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

th {
  background: var(--surface-2);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  position: sticky;
  top: 0;
}

tbody tr:last-child td {
  border-bottom: 0;
}

.zones tbody tr.is-local {
  background: var(--accent-soft);
  font-weight: 600;
}

.zones tbody tr.is-pulse {
  outline: 2px solid var(--accent);
}

td.zone-clock,
td.mono,
.mono {
  font-variant-numeric: tabular-nums;
}

td .zone-meta {
  display: block;
  font-size: 0.76rem;
  color: var(--muted);
}

.day-badge {
  display: inline-block;
  margin-left: 6px;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-strong);
}

/* Timer */

.timer-stage {
  text-align: center;
  padding: 10px 0 6px;
}

.phase-chip {
  display: inline-block;
  padding: 5px 14px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.timer-display {
  font-size: clamp(2.6rem, 10vw, 4rem);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  margin: 12px 0;
  letter-spacing: 0.02em;
}

.progress {
  height: 8px;
  border-radius: 999px;
  background: var(--surface-2);
  overflow: hidden;
  max-width: 420px;
  margin: 0 auto 18px;
}

.progress-fill {
  height: 100%;
  width: 0;
  background: var(--accent);
  border-radius: inherit;
  transition: width 0.3s linear;
}

.countdown-display {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin: 18px 0;
}

.countdown-display .unit {
  display: grid;
  gap: 2px;
  justify-items: center;
  padding: 16px 6px;
  border-radius: var(--radius-sm);
  background: var(--surface-2);
}

.countdown-display .unit span {
  font-size: clamp(1.4rem, 5vw, 2rem);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}

.countdown-display .unit small {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

/* Image */

.dropzone {
  display: grid;
  justify-items: center;
  gap: 6px;
  padding: 30px 18px;
  text-align: center;
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  cursor: pointer;
  color: var(--muted);
  margin-bottom: 18px;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.dropzone:hover,
.dropzone.is-drag,
.dropzone.is-dragover {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.drop-title {
  font-weight: 700;
  color: var(--text);
}

.options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0 14px;
  margin-bottom: 8px;
}

.image-stage {
  display: grid;
  place-items: center;
  padding: 14px;
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  margin-bottom: 14px;
}

.image-stage canvas {
  max-height: 420px;
  width: auto;
  height: auto;
  border-radius: 6px;
  box-shadow: 0 2px 10px rgba(16, 24, 40, 0.15);
}

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 10px;
  margin-bottom: 6px;
}

.stats > div {
  padding: 12px;
  border-radius: var(--radius-sm);
  background: var(--surface-2);
}

.stats b {
  font-size: 1.05rem;
  font-variant-numeric: tabular-nums;
}

/* Unit / calc results */

.result-card {
  padding: 18px;
  border-radius: var(--radius);
  background: var(--accent-soft);
  margin: 6px 0 14px;
}

.result-value {
  font-size: clamp(1.5rem, 4vw, 2rem);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  margin: 2px 0 6px;
  line-height: 1.25;
  word-break: break-word;
}

.is-ok {
  color: var(--ok);
  font-weight: 600;
}

.is-warn {
  color: var(--warn);
  font-weight: 600;
}

.sub-title {
  margin: 18px 0 10px;
  font-size: 0.98rem;
}

.calc-block {
  padding: 14px 0;
  border-top: 1px solid var(--border);
}

.calc-block:first-of-type {
  border-top: 0;
}

.inline-result {
  margin: 4px 0 0;
  font-size: 0.95rem;
  color: var(--muted);
}

.inline-result b {
  color: var(--text);
  font-size: 1.1rem;
  font-variant-numeric: tabular-nums;
}

tr.is-highlight {
  background: var(--accent-soft);
  font-weight: 600;
}

.more {
  margin-top: 12px;
}

.more summary {
  cursor: pointer;
  font-weight: 600;
  padding: 8px 0;
  min-height: 36px;
}

.more .table-wrap {
  margin-top: 8px;
}

/* PDF toolbox / file list */

.file-list {
  display: grid;
  gap: 8px;
  padding: 0;
  margin: 0 0 14px;
  list-style: none;
}

.file-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
}

.file-thumb {
  width: 40px;
  height: 40px;
  flex: none;
  object-fit: cover;
  border-radius: 6px;
  background: var(--surface);
}

.file-badge {
  width: 40px;
  height: 40px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 6px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.file-index {
  flex: none;
  min-width: 1.4em;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.file-main {
  display: grid;
  gap: 1px;
  min-width: 0;
  flex: 1;
}

.file-name {
  font-size: 0.9rem;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-meta {
  font-size: 0.78rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.file-actions {
  display: flex;
  gap: 4px;
  flex: none;
}

.icon-btn {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  font-size: 0.95rem;
  line-height: 1;
  cursor: pointer;
}

.icon-btn:hover {
  border-color: var(--accent);
  color: var(--accent-strong);
}

.icon-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.file-empty {
  margin: 0 0 14px;
  padding: 12px;
  border: 1px dashed var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  text-align: center;
}

.output-list {
  display: grid;
  gap: 8px;
  margin: 12px 0 0;
}

.output-list .btn {
  justify-content: flex-start;
}

.meta-grid {
  display: grid;
  gap: 0;
  margin: 4px 0 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.meta-row {
  display: grid;
  grid-template-columns: minmax(90px, 30%) 1fr;
  gap: 10px;
  padding: 9px 12px;
  border-top: 1px solid var(--border);
  font-size: 0.88rem;
  background: var(--surface-2);
}

.meta-row:first-child {
  border-top: 0;
}

.meta-key {
  color: var(--muted);
  font-weight: 600;
}

.meta-value {
  word-break: break-word;
}

.meta-grid > p {
  padding: 12px;
  margin: 0;
}

/* ID photo */

.idp-workspace {
  display: grid;
  gap: 18px;
  margin-top: 4px;
}

.idp-stage {
  display: grid;
  justify-items: center;
  gap: 8px;
}

.idp-frame {
  position: relative;
  display: inline-block;
  max-width: 100%;
  border-radius: 8px;
  background: var(--surface-2);
  box-shadow: 0 2px 14px rgba(16, 24, 40, 0.16);
  touch-action: none;
  cursor: grab;
  outline: none;
}

.idp-frame:focus-visible {
  box-shadow: 0 0 0 2px var(--accent);
}

.idp-frame:active {
  cursor: grabbing;
}

.idp-frame canvas {
  display: block;
  max-width: 100%;
  height: auto;
  border-radius: 8px;
}

.idp-guides {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.guide-head {
  position: absolute;
  left: 6%;
  right: 6%;
  top: 8%;
  border-top: 1px dashed rgba(47, 107, 216, 0.75);
}

.guide-safe {
  position: absolute;
  left: 12%;
  right: 12%;
  top: 8%;
  bottom: 12%;
  border: 1px dashed rgba(47, 107, 216, 0.45);
  border-radius: 4px;
}

.idp-controls {
  display: grid;
  gap: 4px;
}

@media (min-width: 721px) {
  .idp-workspace {
    grid-template-columns: minmax(0, 1fr) 300px;
    align-items: start;
  }
}

.swatches {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 2px 0 6px;
}

.swatch {
  min-height: 36px;
  padding: 7px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-2);
  color: var(--text);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
}

.swatch[data-bg='#ffffff'] {
  box-shadow: inset 0 0 0 2px #fff;
}

.swatch[data-bg='#2f6bd8'] {
  background: #2f6bd8;
  color: #fff;
  border-color: #2f6bd8;
}

.swatch[data-bg='#d02b2b'] {
  background: #d02b2b;
  color: #fff;
  border-color: #d02b2b;
}

.swatch.is-active {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

.swatch:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

#idp-bg-custom {
  width: 40px;
  height: 36px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-2);
  cursor: pointer;
}

/* Status */

.status {
  min-height: 1.3em;
  margin: 10px 0 0;
  font-size: 0.88rem;
  color: var(--muted);
}

.status.is-error {
  color: var(--danger);
  font-weight: 600;
}

.status.is-success {
  color: var(--ok);
  font-weight: 600;
}

/* Steps / FAQ */

.step-list {
  display: grid;
  gap: 12px;
  padding: 0;
  margin: 0;
  counter-reset: step;
  list-style: none;
}

.step-list li {
  position: relative;
  padding: 14px 16px 14px 52px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  counter-increment: step;
}

.step-list li::before {
  content: counter(step);
  position: absolute;
  left: 14px;
  top: 14px;
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-size: 0.82rem;
  font-weight: 700;
}

.step-title {
  display: block;
  font-weight: 700;
  margin-bottom: 2px;
}

.step-body {
  display: block;
  color: var(--muted);
  font-size: 0.92rem;
}

.faq-list {
  display: grid;
  gap: 10px;
}

.faq-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 4px 16px;
}

.faq-item summary {
  cursor: pointer;
  font-weight: 600;
  padding: 12px 0;
  min-height: 44px;
  display: flex;
  align-items: center;
}

.faq-item p {
  color: var(--muted);
  font-size: 0.94rem;
  margin: 0 0 14px;
}

/* Footer */

.site-footer {
  border-top: 1px solid var(--border);
  background: var(--surface);
  padding: 30px 0 26px;
  margin-top: 20px;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
  align-items: start;
}

.footer-brand {
  font-weight: 700;
  margin: 0 0 2px;
}

.footer-note {
  margin-top: 18px;
  font-size: 0.82rem;
}

.not-found {
  padding-top: 30px;
}

/* Responsive */

@media (max-width: 720px) {
  .wrap {
    padding: 0 16px;
  }

  .header-inner {
    gap: 10px;
  }

  .nav {
    order: 3;
    width: 100%;
    gap: 12px;
  }

  .lang-switch {
    margin-left: auto;
  }

  .panel {
    padding: 16px;
  }

  .local-card {
    flex-direction: column;
  }

  .countdown-display {
    gap: 6px;
  }

  .countdown-display .unit {
    padding: 12px 4px;
  }

  .hero {
    padding-top: 34px;
  }

  .tool-grid,
  .related-grid {
    grid-template-columns: 1fr;
  }

  .footer-inner {
    flex-direction: column;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }

  .tool-card:hover,
  .related-card:hover {
    transform: none;
  }
}
