:root {
  --bg: #f5f3ee;
  --panel: #ffffff;
  --text: #111827;
  --muted: #6b7280;
  --primary: #17313a;
  --primary-dark: #10242b;
  --accent: #b56b2d;
  --accent-soft: #f6ebe1;
  --panel-soft: #fcfaf6;
  --border: #e2ddd4;
  --danger: #b42318;
  --shadow-soft: 0 12px 34px rgba(23, 49, 58, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Avenir Next", "Helvetica Neue", "SF Pro Text", "PingFang SC", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(181, 107, 45, 0.08), transparent 26%),
    radial-gradient(circle at top right, rgba(23, 49, 58, 0.08), transparent 24%),
    linear-gradient(180deg, #fbfaf7 0%, var(--bg) 100%);
  color: var(--text);
  -webkit-text-size-adjust: 100%;
}

.container {
  max-width: min(98vw, 1680px);
  margin: 0 auto;
  padding: 16px 14px 28px;
}

.hero,
.tool,
.card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 20px;
  box-shadow: var(--shadow-soft);
}

.hero {
  padding: 20px;
}

.hero p {
  color: var(--muted);
}

.home-hero {
  padding: clamp(16px, 2vw, 22px);
  margin-bottom: 14px;
  background:
    linear-gradient(135deg, rgba(255, 251, 245, 0.96), rgba(255, 255, 255, 0.98)),
    var(--panel);
}

.home-hero-copy {
  min-width: 0;
  margin-bottom: 10px;
}

.home-hero-kicker,
.section-kicker,
.tool-group-kicker,
.home-jump-title,
.home-hero-aside-title {
  margin: 0 0 8px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 11px;
  font-weight: 700;
  color: var(--accent);
}

.home-hero-title {
  margin: 0;
  max-width: none;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.06;
  letter-spacing: -0.03em;
  color: #0f1f25;
  white-space: nowrap;
}

.home-hero-text {
  margin: 10px 0 0;
  max-width: 72ch;
  color: #44505c;
  font-size: 15px;
  line-height: 1.55;
}

.home-hero-points {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.hero-point {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid #ead8ca;
  background: rgba(255, 255, 255, 0.82);
  color: #22323c;
  font-size: 12px;
  font-weight: 600;
}

.home-hero-quick {
  margin-top: 12px;
}

.home-hero-shortcuts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.home-hero-shortcut {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid #eee4d8;
  background: var(--panel-soft);
  text-decoration: none;
  color: inherit;
  transition: transform 0.15s ease, border-color 0.15s ease, background-color 0.15s ease;
}

.home-hero-shortcut:hover {
  transform: translateY(-1px);
  border-color: #d5c1af;
  background: #fff;
}

.home-hero-shortcut-title {
  font-size: 13px;
  font-weight: 700;
  color: #10242b;
}

.home-hero-shortcut-meta {
  font-size: 11px;
  color: #6b7280;
}

.home-search-panel {
  background: linear-gradient(180deg, #ffffff 0%, #fcfbf8 100%);
  border: 1px solid #e9e0d6;
  border-radius: 18px;
  padding: 14px 16px;
  margin-bottom: 0;
}

.home-search-wrap {
  max-width: 980px;
}

.home-search-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 10px;
  flex-wrap: wrap;
}

.home-search-clear {
  min-height: 38px;
  padding: 8px 14px;
  border-radius: 999px;
}

.home-search-panel.is-searching {
  border-color: #d7c3ae;
  box-shadow: inset 0 0 0 1px rgba(181, 107, 45, 0.08);
}

.home-topbar {
  position: sticky;
  top: 10px;
  z-index: 40;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(226, 221, 212, 0.92);
  border-radius: 18px;
  padding: 10px 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  backdrop-filter: blur(14px);
  box-shadow: 0 10px 28px rgba(17, 24, 39, 0.06);
}

.brand-copy {
  display: grid;
  gap: 4px;
}

.brand-subline {
  margin: 0;
  color: #657280;
  font-size: 12px;
}

.home-cards {
  margin-top: 0;
}

.home-groups {
  display: grid;
  gap: 16px;
}

.home-jump-bar {
  margin-bottom: 16px;
}

.home-jump-title {
  margin-bottom: 10px;
}

.home-jump-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.home-jump-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid #e2d7ca;
  background: rgba(255, 255, 255, 0.88);
  text-decoration: none;
  color: #22323c;
  font-size: 13px;
  font-weight: 600;
}

.home-jump-link:hover {
  background: #fff;
  border-color: #ccb29c;
}

.home-jump-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 28px;
  padding: 0 8px;
  border-radius: 999px;
  background: #f4ede4;
  color: #7a4b1f;
  font-size: 12px;
}

.home-featured-panel {
  margin-bottom: 16px;
  padding: 16px;
  background: linear-gradient(180deg, #fffcf7 0%, #ffffff 100%);
}

.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
  margin-bottom: 12px;
}

.section-heading h2 {
  margin: 0;
  font-size: 22px;
  line-height: 1.15;
}

.section-subtitle {
  margin: 0;
  max-width: 56ch;
  color: #5b6470;
  font-size: 13px;
  line-height: 1.5;
}

.home-featured-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.tool-group {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid #e5ddd3;
  border-radius: 18px;
  padding: 14px;
  box-shadow: 0 10px 28px rgba(17, 24, 39, 0.05);
}

.tool-group-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0 2px 14px;
}

.tool-group-title {
  margin: 0;
  font-size: 22px;
  color: #1c2831;
}

.tool-group-count {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  background: #f5efe6;
  color: #725131;
  font-size: 12px;
  font-weight: 700;
}

.cards.home-group-cards {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.admin-topbar {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 8px 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.admin-top-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.admin-top-actions .lang-switch-wrap {
  margin: 0;
}

.admin-panel-intro {
  margin-bottom: 14px;
}

.admin-panel-welcome {
  margin: 0 0 8px;
}

.admin-page-intro {
  margin-bottom: 14px;
}

.admin-page-subtitle {
  margin: 0 0 8px;
}

.admin-page-controls {
  margin-bottom: 0;
}

.admin-page-controls label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #374151;
  font-size: 13px;
}

.admin-check-label {
  user-select: none;
}

.admin-check-label input[type="checkbox"] {
  width: 16px;
  height: 16px;
  margin: 0;
}

.admin-quick-links {
  margin-bottom: 14px;
}

.admin-quick-links .card {
  text-decoration: none;
}

.admin-quick-links .card h2 {
  margin-bottom: 6px;
}

.search-label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #7a4b1f;
  margin-bottom: 8px;
}

.search-meta {
  margin: 0;
  font-size: 13px;
  color: #586270;
}

#tool-search {
  min-height: 54px;
  padding: 0 16px;
  border-radius: 16px;
  font-size: 17px;
  font-weight: 500;
  background: #ffffff;
}

#tool-search::placeholder {
  color: #94a3b8;
}

.brand-title {
  display: flex;
  align-items: center;
  gap: 8px;
}

.brand-title h1 {
  margin: 0;
  letter-spacing: 0.2px;
}

.brand-icon {
  width: 30px;
  height: 30px;
  border-radius: 8px;
}

.brand-home-link {
  display: inline-flex;
  line-height: 0;
  border-radius: 12px;
}

.brand-home-link:focus-visible {
  outline: 2px solid #c7d2fe;
  outline-offset: 2px;
}

.brand-home-title-link {
  color: inherit;
  text-decoration: none;
  display: inline-flex;
  line-height: 0;
}

.brand-home-title-link:focus-visible {
  outline: 2px solid #c7d2fe;
  outline-offset: 2px;
  border-radius: 6px;
}

.brand-wordmark {
  height: 26px;
  width: auto;
  display: block;
}

.auth-line {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

.lang-switch-wrap {
  display: flex;
  justify-content: flex-end;
  margin: 0 0 12px;
}

.home-top-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 12px;
  margin: 0;
  flex-wrap: wrap;
}

.home-top-actions .lang-switch-wrap {
  margin: 0 0 0 auto;
}

.site-footer {
  margin-top: 16px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.92);
}

.site-footer-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.site-footer-links a {
  font-size: 13px;
  color: #4b5563;
  text-decoration: none;
}

.site-footer-record-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.site-footer-record-icon {
  width: 14px;
  height: 14px;
  object-fit: contain;
  flex: 0 0 auto;
}

.site-footer-links a:hover {
  color: #111827;
  text-decoration: underline;
}

.topbar-group-navs {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  flex: 1 1 auto;
  min-width: 0;
}

.topbar-group-nav {
  position: relative;
}

.topbar-group-nav::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  height: 10px;
}

.topbar-group-nav-btn {
  border: 1px solid #ddd2c6;
  background: #fffaf4;
  color: #17313a;
  border-radius: 999px;
  min-height: 36px;
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
}

.topbar-group-nav-btn:hover,
.topbar-group-nav.is-open .topbar-group-nav-btn {
  background: #ffffff;
  border-color: #ccb29c;
}

.topbar-group-nav-btn:focus-visible {
  outline: 2px solid #c7d2fe;
  outline-offset: 1px;
}

.topbar-group-nav-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  width: min(280px, calc(100vw - 24px));
  max-height: min(68vh, 560px);
  overflow: auto;
  padding: 12px;
  border: 1px solid #ddd5ca;
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 24px 42px rgba(15, 23, 42, 0.15);
  z-index: 50;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  pointer-events: none;
  transition: opacity 0.12s ease, transform 0.12s ease;
}

.topbar-group-nav:hover .topbar-group-nav-menu,
.topbar-group-nav:focus-within .topbar-group-nav-menu,
.topbar-group-nav.is-open .topbar-group-nav-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
}

.topbar-group-nav-menu-head {
  margin: 0 0 8px;
  font-size: 12px;
  color: #64748b;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.topbar-group-nav-links {
  display: grid;
  gap: 4px;
}

.topbar-group-nav-link {
  font-size: 13px;
  color: #0f172a;
  text-decoration: none;
  line-height: 1.35;
  padding: 7px 8px;
  border-radius: 8px;
}

.topbar-group-nav-link:hover {
  background: #eef2ff;
}

.topbar-mini-link {
  font-size: 12px;
  color: #4b5563;
  text-decoration: none;
  padding: 4px 0;
}

.topbar-mini-link:hover {
  color: #111827;
  text-decoration: underline;
}

.home-feedback-entry {
  min-height: 38px;
  padding: 8px 14px;
  border-radius: 999px;
}

.lang-switch {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  color: #334155;
  background: #ffffff;
  border: 1px solid #ddd2c6;
  border-radius: 999px;
  padding: 3px 6px 3px 8px;
}

.lang-switch label {
  margin: 0;
  white-space: nowrap;
}

.lang-switch select {
  width: auto;
  min-width: 102px;
  margin: 0;
  min-height: 28px;
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid #ddd2c6;
  background: #ffffff;
  font-size: 12px;
  color: #0f172a;
}

.lang-switch select:focus {
  outline: 2px solid #c7d2fe;
  outline-offset: 1px;
}

.home-topbar .btn,
.admin-topbar .btn {
  min-height: 34px;
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 13px;
}

.cards {
  margin-top: 0;
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.card {
  padding: 18px 18px 16px;
  text-decoration: none;
  color: inherit;
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 100%;
}

.card:hover {
  transform: translateY(-2px);
  border-color: #d2c0af;
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.08);
  background: #fffdfa;
}

.card h2 {
  margin: 0;
  font-size: 19px;
  line-height: 1.22;
}

.card p {
  margin: 0;
  color: #5f6875;
  line-height: 1.64;
}

.tag {
  display: inline-block;
  border-radius: 999px;
  border: 1px solid #e4d9cd;
  padding: 5px 11px;
  font-size: 12px;
  background: #fff;
}

.tool-meta-line {
  display: flex;
  gap: 8px;
  margin-top: auto;
  flex-wrap: wrap;
}

.tool-card {
  position: relative;
}

.tool-card::before {
  content: "";
  display: block;
  width: 42px;
  height: 4px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent), #dbb48a);
}

.tool-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 4px;
  flex-wrap: wrap;
}

.tool-card-open,
.home-featured-cta {
  color: var(--primary);
  font-size: 13px;
  font-weight: 700;
}

.home-featured-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 100%;
  padding: 18px;
  border-radius: 18px;
  border: 1px solid #e7ddd2;
  background: linear-gradient(180deg, #fffdf9 0%, #ffffff 100%);
  text-decoration: none;
  color: inherit;
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.home-featured-card:hover {
  transform: translateY(-2px);
  border-color: #cfae8f;
  box-shadow: 0 16px 34px rgba(17, 24, 39, 0.08);
}

.home-featured-category {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: #f5ede3;
  color: #7a4b1f;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.home-featured-card h2 {
  margin: 0;
  font-size: 22px;
  line-height: 1.2;
}

.home-featured-card p {
  margin: 0;
  color: #5c6671;
  line-height: 1.65;
}

.tag-muted {
  background: #faf6f0;
  color: #4b5563;
}

.page-head {
  margin: 2px 0 14px;
  padding: 4px 2px 0;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 10px;
}

.page-head a {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid #e3d8cb;
  background: rgba(255, 255, 255, 0.92);
  color: var(--primary-dark);
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
}

.page-head h1 {
  margin: 0 0 2px;
  font-size: clamp(24px, 3.4vw, 34px);
  line-height: 1.14;
  font-weight: 750;
  letter-spacing: -0.02em;
}

.tool-page-head {
  margin: 6px 0 12px;
  padding: 12px 14px 6px;
  border: 1px solid #eadfd2;
  border-radius: 20px;
  background:
    radial-gradient(circle at top right, rgba(214, 178, 136, 0.16), transparent 34%),
    linear-gradient(180deg, #fffdf8 0%, #f9f7f3 100%);
}

.tool-page-kicker {
  margin: 0 0 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #8b5b2b;
}

.tool-page-title {
  margin: 0 0 6px;
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1.1;
  font-weight: 780;
  letter-spacing: -0.03em;
  color: #18212b;
}

.tool-page-summary {
  max-width: 760px;
  margin: 0;
  color: #4b5563;
  font-size: 14px;
  line-height: 1.5;
}

.json-preset-intro {
  margin: 0 0 8px;
  line-height: 1.5;
}

.json-preset-grid {
  margin-top: 10px;
}

@media (min-width: 960px) {
  .tool-page-head {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
    column-gap: 20px;
    row-gap: 0;
    align-items: center;
  }

  .tool-page-kicker,
  .tool-page-title {
    grid-column: 1;
  }

  .tool-page-summary {
    grid-column: 2;
    grid-row: 1 / span 2;
    align-self: center;
  }
}

@media (max-width: 720px) {
  .tool-page-head {
    border-radius: 16px;
    padding: 10px 12px 4px;
  }

  .tool-page-title {
    font-size: clamp(22px, 6.5vw, 28px);
  }

  .tool-page-summary {
    font-size: 13px;
    line-height: 1.5;
  }
}

.seo-home-block h2 {
  margin: 0 0 8px;
  font-size: 22px;
}

.seo-home-block p {
  margin: 0 0 8px;
  color: #41505f;
  font-size: 14px;
  line-height: 1.7;
}

.seo-home-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.seo-home-links a {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid #dbe3ec;
  color: #0f172a;
  background: #ffffff;
  text-decoration: none;
  font-size: 12px;
}

.seo-home-links a:hover {
  background: #f1f5f9;
  border-color: #cbd5e1;
}

.tool {
  padding: 18px;
}

.tool > p {
  color: #4d5865;
  line-height: 1.68;
}

.tool > p:first-of-type {
  margin-top: 0;
}

.tool form {
  display: grid;
}

.colorbook-controls {
  display: grid;
  grid-template-columns: minmax(0, 1.8fr) minmax(180px, 1fr);
  gap: 12px;
  margin-bottom: 12px;
}

.colorbook-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.colorbook-card {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #ffffff;
  padding: 10px;
}

.colorbook-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.colorbook-card-title {
  margin: 0;
  font-size: 14px;
  font-weight: 650;
  color: #1f2937;
}

.colorbook-copy-btn {
  min-height: 26px;
  padding: 4px 8px;
  font-size: 12px;
}

.colorbook-swatches {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 6px;
}

.colorbook-swatch {
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  padding: 8px 4px;
  min-height: 56px;
  font-family: "Consolas", "Menlo", monospace;
  font-size: 11px;
  letter-spacing: 0.15px;
}

.colorbook-swatch:hover {
  box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.12) inset;
}

.legal-doc h2 {
  margin-top: 16px;
  margin-bottom: 8px;
  font-size: 17px;
}

.legal-doc p {
  margin: 0 0 10px;
  line-height: 1.62;
  color: #374151;
}

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

.tool-grid-equal {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}

.tool-grid > * {
  min-width: 0;
}

.timezone-tool-grid {
  align-items: start;
}

.timezone-output {
  height: 240px;
}

.timezone-world-panel {
  border: 1px solid #eadfd2;
  border-radius: 18px;
  background: linear-gradient(180deg, #fffdfa 0%, #fff 100%);
  padding: 16px;
}

.timezone-world-kicker {
  margin: 0 0 8px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 11px;
  font-weight: 700;
  color: var(--accent);
}

.timezone-world-panel h2 {
  margin: 0;
  font-size: 24px;
  line-height: 1.15;
}

.timezone-world-subtitle {
  margin: 10px 0 0;
  color: #56606b;
  font-size: 14px;
  line-height: 1.6;
}

.timezone-world-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.calc-result-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.calc-input-inline {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.calc-input-unit {
  min-width: 104px;
  color: #8a5a2d;
  font-size: 13px;
  font-weight: 600;
  text-align: right;
  white-space: nowrap;
}

.calc-result-card {
  min-height: 110px;
  border: 1px solid #eadfd2;
  border-radius: 16px;
  background: linear-gradient(180deg, #fffdfa 0%, #fff7ee 100%);
  padding: 16px;
}

.calc-result-label {
  color: #56606b;
  font-size: 13px;
  line-height: 1.5;
}

.calc-result-value {
  margin-top: 8px;
  color: #17232d;
  font-size: clamp(1.25rem, 2vw, 1.75rem);
  font-weight: 700;
  line-height: 1.25;
  word-break: break-word;
}

.tool-inline-tip {
  margin: 0 0 12px;
  color: #5e6873;
  font-size: 14px;
  line-height: 1.55;
}

.tool-mini-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 14px;
}

.btn-pill {
  min-height: 34px;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12px;
}

.subnet-detail-block {
  margin-top: 12px;
  border: 1px solid #eadfd2;
  border-radius: 16px;
  background: #fffdfa;
  overflow: hidden;
}

.subnet-detail-head {
  padding: 12px 14px;
  border-bottom: 1px solid #f0e5d7;
  color: #51606c;
  font-size: 13px;
  font-weight: 700;
}

.subnet-detail-block .code-output {
  margin: 0;
  min-height: 180px;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.watermark-control-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.watermark-control-grid input[type="range"] {
  margin-bottom: 6px;
}

.watermark-control-meta {
  min-height: 20px;
  color: #7a4b1f;
  font-size: 12px;
  font-weight: 700;
}

.watermark-setting-block {
  border: 1px solid transparent;
  border-radius: 16px;
  padding: 6px 8px;
  transition: border-color 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease;
}

.watermark-setting-block.is-active {
  border-color: #d7b89a;
  background: #fff8ef;
  box-shadow: inset 0 0 0 1px rgba(181, 107, 45, 0.08);
}

.watermark-toggle-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  margin: 4px 0 14px;
}

.watermark-toggle-line {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid #eadfd2;
  border-radius: 999px;
  background: #fffdfa;
  color: #334155;
  font-size: 13px;
  font-weight: 600;
}

.watermark-toggle-line input[type="checkbox"] {
  width: 16px;
  height: 16px;
  margin: 0;
}

.watermark-preview-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}

.watermark-compare-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.watermark-preview-panel {
  min-width: 0;
}

.watermark-preview-wrap {
  margin-top: 6px;
  border: 1px solid #eadfd2;
  border-radius: 16px;
  background:
    linear-gradient(45deg, #f6f1ea 25%, transparent 25%, transparent 75%, #f6f1ea 75%),
    linear-gradient(45deg, #f6f1ea 25%, transparent 25%, transparent 75%, #f6f1ea 75%);
  background-position: 0 0, 12px 12px;
  background-size: 24px 24px;
  overflow: auto;
  padding: 12px;
}

.watermark-preview-wrap canvas {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 12px;
  background: #fffdfa;
}

.meal-items {
  display: grid;
  gap: 10px;
  margin: 12px 0 14px;
}

.meal-item-row {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) repeat(2, minmax(0, 1fr)) auto;
  gap: 10px;
  align-items: end;
}

.meal-item-row .btn {
  white-space: nowrap;
}

.wordcloud-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  gap: 18px;
}

.wordcloud-panel {
  border: 1px solid #eadfd2;
  border-radius: 18px;
  background: #fffdfa;
  padding: 18px;
}

.wordcloud-controls {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 12px;
  margin-bottom: 14px;
}

.wordcloud-checkline {
  display: flex;
  align-items: end;
}

.wordcloud-canvas-wrap {
  margin-top: 8px;
  border: 1px solid #eadfd2;
  border-radius: 16px;
  background: linear-gradient(180deg, #fffefb 0%, #f7fafc 100%);
  padding: 12px;
  overflow: auto;
}

.wordcloud-canvas-wrap canvas {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 12px;
  background: #fffdf8;
}

.wordcloud-summary {
  min-height: 220px;
  margin-top: 8px;
}

.background-canvas-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  gap: 18px;
}

.background-canvas-panel {
  border: 1px solid #eadfd2;
  border-radius: 18px;
  background: #fffdfa;
  padding: 18px;
}

.background-canvas-controls {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 0 0 12px;
}

.background-canvas-preview-wrap {
  margin-top: 8px;
  min-height: 520px;
  border: 1px solid #eadfd2;
  border-radius: 16px;
  background:
    linear-gradient(45deg, #f2eadf 25%, transparent 25%, transparent 75%, #f2eadf 75%),
    linear-gradient(45deg, #f2eadf 25%, transparent 25%, transparent 75%, #f2eadf 75%);
  background-position: 0 0, 12px 12px;
  background-size: 24px 24px;
  padding: 12px;
  overflow: auto;
  display: flex;
  align-items: center;
  justify-content: center;
}

.background-canvas-preview-wrap canvas {
  display: block;
  max-width: 100%;
  height: auto;
  border-radius: 14px;
  box-shadow: 0 18px 48px rgba(41, 30, 18, 0.14);
  background: transparent;
  touch-action: none;
}

.background-canvas-seo h2 {
  margin: 0 0 12px;
}

.background-canvas-scene-list,
.tool-scene-list {
  margin: 0 0 20px;
  padding-left: 20px;
  color: #475569;
  line-height: 1.7;
}

.tool-extra-sections h2 {
  margin: 0 0 12px;
}

.base-converter-results {
  display: grid;
  gap: 12px;
}

.base-result-card {
  border: 1px solid #eadfd2;
  border-radius: 16px;
  background: linear-gradient(180deg, #fffefb 0%, #fff8ef 100%);
  padding: 14px;
}

.base-result-card.is-source {
  border-color: #d99353;
  box-shadow: 0 0 0 1px rgba(217, 147, 83, 0.18);
}

.base-result-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.base-result-title-wrap {
  min-width: 0;
}

.base-result-title {
  display: block;
  margin-bottom: 2px;
  color: #17232d;
}

.base-result-meta {
  color: var(--muted);
  font-size: 12px;
}

.base-result-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 9px;
  border-radius: 999px;
  background: rgba(217, 147, 83, 0.12);
  color: #a85e1a;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.base-result-output {
  min-height: 54px;
  height: 54px;
  margin: 0;
  font-family: "Consolas", "Menlo", monospace;
  line-height: 1.3;
  resize: none;
}

.btn-small {
  min-height: 32px;
  padding: 6px 10px;
  font-size: 12px;
}

.base-converter-input {
  min-height: 54px;
  height: 54px;
  line-height: 1.3;
  resize: vertical;
}

.emoji-groups {
  display: grid;
  gap: 14px;
}

.emoji-group {
  border: 1px solid #eadfd2;
  border-radius: 18px;
  background: #fffdfa;
  padding: 16px;
}

.emoji-group-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.emoji-group-title {
  margin: 0;
  font-size: 18px;
  color: #17232d;
}

.emoji-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.emoji-card {
  width: 100%;
  border: 1px solid #ece2d7;
  border-radius: 16px;
  background: linear-gradient(180deg, #fffefb 0%, #fff8ef 100%);
  padding: 14px;
  text-align: left;
  font: inherit;
  color: inherit;
  cursor: pointer;
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.emoji-card:hover {
  transform: translateY(-1px);
  border-color: #d7b89a;
  box-shadow: 0 12px 24px rgba(17, 24, 39, 0.06);
}

.emoji-card-symbol {
  font-size: 34px;
  line-height: 1;
}

.emoji-card-name {
  margin-top: 10px;
  font-size: 14px;
  font-weight: 700;
  color: #17232d;
}

.emoji-card-hint {
  margin-top: 4px;
  font-size: 12px;
  color: #7a4b1f;
}

.emoji-card-meta {
  margin-top: 8px;
  color: #7c8895;
  font-size: 12px;
  line-height: 1.45;
  font-family: "Consolas", "Menlo", monospace;
  word-break: break-word;
}

.emoji-card-keywords {
  margin-top: 8px;
  color: #667085;
  font-size: 12px;
  line-height: 1.55;
  word-break: break-word;
}

.timezone-city-card {
  width: 100%;
  border: 1px solid #ebe0d4;
  border-radius: 16px;
  background: #fffdfa;
  padding: 14px;
  font: inherit;
  color: inherit;
  text-align: left;
  cursor: pointer;
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.timezone-city-card:hover {
  transform: translateY(-1px);
  border-color: #d7b89a;
  box-shadow: 0 12px 24px rgba(17, 24, 39, 0.06);
}

.timezone-city-flag {
  display: block;
  font-size: 22px;
  line-height: 1;
  margin-bottom: 10px;
}

.timezone-city-head {
  margin-bottom: 10px;
}

.timezone-city-name {
  font-size: 16px;
  font-weight: 700;
  color: #17232d;
}

.timezone-city-country {
  margin-top: 2px;
  font-size: 12px;
  color: #6b7280;
}

.timezone-city-time {
  font-family: "Consolas", "Menlo", monospace;
  font-size: 24px;
  line-height: 1.1;
  color: #0f1f25;
}

.timezone-city-meta {
  margin-top: 8px;
  font-size: 12px;
  color: #667085;
}

.timezone-city-badge {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  background: #f5ede3;
  color: #7a4b1f;
  font-size: 11px;
  font-weight: 700;
}

.tool-right {
  min-height: 0;
}

.feedback-section h3 {
  margin: 0 0 10px;
  font-size: 18px;
}

.compact-textarea {
  min-height: 130px;
  height: 130px;
}

textarea,
input[type="text"],
input[type="password"],
input[type="number"],
input[type="datetime-local"],
select {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 12px 14px;
  font: inherit;
  margin-top: 6px;
  margin-bottom: 12px;
  background: #fffdfa;
  color: #17232d;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}

textarea:focus,
input[type="text"]:focus,
input[type="password"]:focus,
input[type="number"]:focus,
input[type="datetime-local"]:focus,
select:focus {
  outline: none;
  border-color: #b56b2d;
  box-shadow: 0 0 0 4px rgba(181, 107, 45, 0.14);
  background: #ffffff;
}

input[type="file"] {
  width: 100%;
  border: 1px dashed #cbd5e1;
  border-radius: 16px;
  background: linear-gradient(180deg, #fffdf9 0%, #f8fafc 100%);
  color: #334155;
  font: inherit;
  font-size: 13px;
  line-height: 1.3;
  padding: 10px;
  margin-top: 6px;
  margin-bottom: 12px;
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}

input[type="file"]:hover {
  border-color: #94a3b8;
  background: #f8fbff;
}

input[type="file"]:focus,
input[type="file"]:focus-visible {
  outline: none;
  border-color: #b56b2d;
  box-shadow: 0 0 0 4px rgba(181, 107, 45, 0.14);
}

input[type="file"]::file-selector-button {
  border: 1px solid var(--primary);
  background: var(--primary);
  color: #ffffff;
  border-radius: 10px;
  padding: 8px 14px;
  margin-right: 10px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, transform 0.08s ease;
}

input[type="file"]::file-selector-button:hover {
  background: #0b1220;
  border-color: #0b1220;
}

input[type="file"]::file-selector-button:active {
  transform: translateY(1px);
}

.file-input-shell {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  border: 1px dashed #cbd5e1;
  border-radius: 16px;
  background: linear-gradient(180deg, #fffdf9 0%, #f8fafc 100%);
  padding: 10px 12px;
  margin-top: 6px;
  margin-bottom: 12px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
  cursor: pointer;
}

.file-input-shell:hover {
  border-color: #94a3b8;
  background: #f8fbff;
}

.file-input-shell.is-focused {
  border-color: #b56b2d;
  box-shadow: 0 0 0 4px rgba(181, 107, 45, 0.14);
}

.file-input-shell.is-dragover {
  border-color: #b56b2d;
  background: #fff7ed;
  box-shadow: 0 0 0 4px rgba(181, 107, 45, 0.12);
}

.file-input-shell.has-file .file-input-summary {
  color: #0f172a;
}

.file-input-native {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.file-input-copy {
  min-width: 0;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.file-input-trigger {
  flex: 0 0 auto;
  border: 1px solid var(--primary);
  background: var(--primary);
  color: #ffffff;
  border-radius: 10px;
  padding: 8px 14px;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, transform 0.08s ease;
}

.file-input-trigger:hover {
  background: #0b1220;
  border-color: #0b1220;
}

.file-input-trigger:active {
  transform: translateY(1px);
}

.file-input-summary {
  min-width: 0;
  color: #64748b;
  font-size: 13px;
  line-height: 1.35;
  word-break: break-all;
}

.file-input-detail {
  min-width: 0;
  color: #94a3b8;
  font-size: 12px;
  line-height: 1.35;
  word-break: break-word;
}

.file-input-clear {
  flex: 0 0 auto;
  border: 1px solid #d7dee8;
  background: #ffffff;
  color: #475569;
  border-radius: 10px;
  padding: 8px 12px;
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
  transition: border-color 0.15s ease, background-color 0.15s ease, color 0.15s ease;
}

.file-input-clear:hover {
  border-color: #bfc9d8;
  background: #f8fafc;
  color: #0f172a;
}

.file-input-clear[hidden] {
  display: none;
}

.file-input-extra {
  margin-top: -4px;
  margin-bottom: 12px;
}

.file-input-preview-card,
.file-input-list-card {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  background: #ffffff;
  padding: 10px 12px;
}

.file-input-preview-card-simple {
  align-items: flex-start;
}

.file-input-preview-image {
  width: 72px;
  height: 72px;
  flex: 0 0 72px;
  object-fit: cover;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
}

.file-input-preview-badge {
  min-width: 72px;
  height: 72px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  color: #475569;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.file-input-preview-meta {
  min-width: 0;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.file-input-preview-name,
.file-input-list-name {
  color: #0f172a;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.35;
  word-break: break-all;
}

.file-input-preview-detail,
.file-input-list-meta,
.file-input-list-title {
  color: #64748b;
  font-size: 12px;
  line-height: 1.35;
  word-break: break-word;
}

.file-input-list-card {
  align-items: stretch;
  flex-direction: column;
}

.file-input-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 220px;
  overflow: auto;
}

.file-input-list-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 8px 10px;
  border-radius: 10px;
  background: #f8fafc;
}

@media (max-width: 640px) {
  .file-input-shell {
    align-items: stretch;
    flex-wrap: wrap;
  }

  .file-input-trigger,
  .file-input-clear {
    min-height: 40px;
  }

  .file-input-copy {
    order: 3;
    width: 100%;
  }

  .file-input-preview-card {
    align-items: flex-start;
  }
}

textarea {
  resize: vertical;
  min-height: 540px;
}

label {
  display: block;
  font-size: 14px;
  font-weight: 700;
  color: #1f2937;
}

.actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.actions select {
  width: auto;
  min-width: 190px;
  margin: 0;
}

.inline-field-label {
  align-self: center;
  font-size: 12px;
  color: #475569;
  white-space: nowrap;
}

.tz-select {
  width: 220px;
  min-width: 220px;
}

.json-format-options {
  align-items: center;
  margin-top: -2px;
}

.json-format-options > label {
  margin: 0;
  color: #334155;
  font-size: 13px;
}

.json-format-options select {
  min-width: 96px;
}

.json-option-check {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: 8px;
}

.json-option-check input[type="checkbox"] {
  width: 16px;
  height: 16px;
  margin: 0;
}

.cookie-format-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.cookie-format-options {
  margin-top: -2px;
}

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

.cookie-faq-list details {
  border: 1px solid var(--border);
  border-radius: 16px;
  background: #fffdfa;
  padding: 14px 16px;
}

.cookie-faq-list summary {
  cursor: pointer;
  font-weight: 700;
  color: #1f2937;
}

.cookie-faq-list p {
  margin: 12px 0 0;
  color: #475569;
  line-height: 1.7;
}

.security-note-block {
  border: 1px solid #f0d4b0;
  border-radius: 16px;
  background: linear-gradient(180deg, #fffaf2 0%, #fffdf9 100%);
  padding: 16px 18px;
  margin-bottom: 18px;
}

.security-note-block h2 {
  margin: 0 0 10px;
  font-size: 18px;
}

.security-note-list {
  margin: 0;
  padding-left: 18px;
  color: #7a4b1f;
  line-height: 1.7;
}

.totp-config-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.totp-default-hint {
  margin-top: 4px;
}

.totp-advanced {
  border: 1px solid var(--border);
  border-radius: 16px;
  background: #fffdfa;
  padding: 14px 16px;
  margin-bottom: 14px;
}

.totp-advanced summary {
  cursor: pointer;
  font-weight: 700;
  color: #1f2937;
}

.totp-advanced-tip {
  margin: 12px 0 0;
}

.totp-code-card {
  border: 1px solid var(--border);
  border-radius: 18px;
  background: linear-gradient(180deg, #fffefb 0%, #f8fafc 100%);
  padding: 18px;
  margin-top: 6px;
  margin-bottom: 18px;
}

.totp-code-value {
  font-size: 42px;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: #10242b;
}

.totp-progress {
  height: 10px;
  border-radius: 999px;
  background: #e2e8f0;
  overflow: hidden;
  margin: 14px 0 10px;
}

.totp-progress-bar {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, #c97a32 0%, #355a68 100%);
  transition: width 0.2s linear;
}

.totp-remaining {
  margin: 0;
  color: #475569;
  font-size: 13px;
}

.totp-meta-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.totp-meta-item {
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 12px 14px;
  background: #fffdfa;
}

.totp-meta-label {
  display: block;
  font-size: 12px;
  color: #64748b;
  margin-bottom: 6px;
}

.btn {
  border: none;
  background: var(--primary);
  color: #fff;
  padding: 10px 14px;
  border-radius: 12px;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  font-weight: 700;
  box-shadow: 0 8px 18px rgba(16, 36, 43, 0.14);
  transition: transform 0.12s ease, background-color 0.15s ease, box-shadow 0.15s ease;
}

.btn:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
}

.btn-secondary {
  background: #355a68;
}

.btn-secondary:hover {
  background: #294854;
}

.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
  box-shadow: none;
}

.btn-ghost:hover {
  background: #eef2f7;
  border-color: #d1d5db;
  color: #0f172a;
}

.msg {
  margin: 8px 0 0;
  color: var(--muted);
  min-height: 20px;
  font-size: 14px;
  line-height: 1.55;
}

.msg-error {
  color: var(--danger);
}

.json-msg {
  margin: 8px 0 0;
  min-height: 0;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  color: #334155;
}

.json-msg:empty {
  display: none;
}

.json-msg.msg-error {
  border-color: #fecaca;
  background: #fff1f2;
}

.hidden {
  display: none !important;
}

.search-empty {
  margin-top: 12px;
  color: #6b7280;
}

.admin-hero {
  margin-bottom: 16px;
}

.stats-cards {
  margin-bottom: 14px;
}

.admin-nav {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 0 0 14px;
}

.admin-nav a {
  text-decoration: none;
  color: #1f2937;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 13px;
}

.admin-nav a.active {
  border-color: #111827;
  background: #eef2ff;
  color: #111827;
}

.kpi-value {
  margin: 0;
  font-size: 30px;
  font-weight: 700;
  color: #111827;
}

.table-wrap {
  overflow-x: auto;
}

.stats-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 640px;
}

.stats-table th,
.stats-table td {
  text-align: left;
  padding: 10px 8px;
  border-bottom: 1px solid #eef2f7;
  font-size: 13px;
}

.stats-table th {
  color: #6b7280;
  font-weight: 600;
  background: #fafafa;
  position: sticky;
  top: 0;
}

.daily-bars {
  display: block;
  color: #6b7280;
  font-size: 13px;
}

.daily-bars.daily-line-chart {
  overflow-x: auto;
  padding: 6px 2px 2px;
}

.daily-line-svg {
  display: block;
  width: 100%;
  min-width: 420px;
}

.daily-line-plot {
  fill: #f8fafc;
  stroke: #e2e8f0;
  stroke-width: 1;
}

.daily-line-grid {
  stroke: #e5e7eb;
  stroke-width: 0.8;
}

.daily-line-y-label,
.daily-line-x-label {
  fill: #64748b;
  font-size: 10px;
}

.daily-line-area {
  fill: rgba(37, 99, 235, 0.12);
}

.daily-line-path {
  fill: none;
  stroke: #2563eb;
  stroke-width: 1.2;
}

.daily-line-dot {
  fill: #ffffff;
  stroke: #2563eb;
  stroke-width: 1.2;
}

.daily-bars.daily-chart {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  overflow-x: auto;
  padding: 8px 2px 2px;
  min-height: 210px;
}

.daily-col {
  flex: 0 0 30px;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 6px;
  align-items: end;
}

.daily-col-value {
  text-align: center;
  font-size: 11px;
  color: #4b5563;
  line-height: 1;
}

.daily-col-track {
  height: 150px;
  background: #f1f5f9;
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
}

.daily-col-bar {
  width: 100%;
  min-height: 4px;
  background: linear-gradient(180deg, #60a5fa, #2563eb);
}

.daily-col-date {
  text-align: center;
  font-size: 11px;
  color: #64748b;
  letter-spacing: 0.1px;
}

.stats-pagination {
  margin-top: 10px;
  align-items: center;
}

.stats-page-info {
  margin: 0;
  color: #4b5563;
  font-size: 13px;
}

.auth-box {
  max-width: 420px;
}

.captcha-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
  margin-bottom: 12px;
}

.captcha-row input[type="text"] {
  flex: 1 1 auto;
  min-width: 0;
  margin: 0;
}

.captcha-image {
  width: 124px;
  height: 42px;
  border: 1px solid #d1d9e6;
  border-radius: 10px;
  background: #ffffff;
  cursor: pointer;
  object-fit: cover;
}

.captcha-refresh {
  min-width: 74px;
  min-height: 42px;
  padding: 0 10px;
}

.tab-actions {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.subtab-actions {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.tab-btn {
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text);
  padding: 8px 12px;
  border-radius: 10px;
  cursor: pointer;
  min-height: 40px;
}

.subtab-btn {
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text);
  padding: 8px 12px;
  border-radius: 10px;
  cursor: pointer;
  min-height: 40px;
}

.tab-btn.active {
  background: #e9f4f3;
  border-color: var(--primary);
  color: var(--primary-dark);
}

.subtab-btn.active {
  background: #e9f4f3;
  border-color: var(--primary);
  color: var(--primary-dark);
}

.tab-panel {
  display: none;
  min-height: 0;
}

.subtab-panel {
  display: none;
  min-height: 0;
}

.tab-panel.active {
  display: block;
  min-width: 0;
}

.subtab-panel.active {
  display: block;
  min-width: 0;
}

.json-tree {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  background: #fbfdff;
  height: clamp(360px, 68vh, 760px);
  overflow-y: auto;
  overflow-x: hidden;
  margin-bottom: 6px;
  max-width: 100%;
}

#json-input {
  font-family: "Consolas", "Menlo", "Monaco", monospace;
  font-size: 14px;
  line-height: 1.52;
  color: #0f172a;
  caret-color: #0f172a;
}

#json-input::placeholder {
  color: #94a3b8;
}

.code-output {
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #f8fafc;
  height: clamp(360px, 68vh, 760px);
  overflow-y: auto;
  overflow-x: auto;
  padding: 12px;
  margin: 0;
  font-family: "Consolas", "Menlo", monospace;
  font-size: 13px;
  line-height: 1.45;
  white-space: pre;
  max-width: 100%;
  width: 100%;
}

.code-output.myip-mini {
  height: auto;
  min-height: 72px;
  white-space: pre-wrap;
}

.media-preview-box {
  margin-top: 10px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #fffdfa;
}

.media-preview-box img {
  display: block;
  max-width: 100%;
  max-height: 360px;
  margin: 0 auto;
  border-radius: 10px;
}

.video-gif-preview-box {
  min-height: 280px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.video-gif-preview {
  display: block;
  width: 100%;
  max-height: 360px;
  border-radius: 10px;
  background: #111827;
}

.video-gif-empty {
  color: #7a4b1f;
  text-align: center;
  font-size: 14px;
  line-height: 1.6;
}

.ws-page {
  overflow-x: hidden;
  overflow-y: auto;
}

.ws-container {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 10px 10px 10px;
}

.ws-page .page-head {
  margin: 0 0 8px;
}

.ws-workspace {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  padding: 10px;
}

.ws-tip {
  margin: 0 0 8px;
  color: #475569;
  font-size: 13px;
}

.ws-layout {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.12fr);
  gap: 10px;
}

.ws-left-col {
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 10px;
}

.ws-panel {
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #ffffff;
  padding: 10px;
  min-height: 0;
}

.ws-params input[type="text"] {
  margin-bottom: 10px;
}

.ws-actions {
  margin-bottom: 0;
  align-items: center;
}

.ws-state {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 12px;
  line-height: 1;
  font-weight: 600;
  border-radius: 999px;
  border: 1px solid #dbe3ec;
  background: #eef2f7;
  color: #334155;
  vertical-align: middle;
}

.ws-state-disconnected {
  background: #f1f5f9;
  color: #475569;
  border-color: #d0d9e4;
}

.ws-state-connecting {
  background: #fff7ed;
  color: #c2410c;
  border-color: #fdba74;
}

.ws-state-connected {
  background: #ecfdf3;
  color: #027a48;
  border-color: #86efac;
}

.ws-state-closing {
  background: #fef3c7;
  color: #92400e;
  border-color: #fcd34d;
}

.ws-output-panel,
.ws-log-panel {
  display: flex;
  flex-direction: column;
}

.ws-send-input {
  min-height: 108px;
  height: 108px;
  resize: none;
  margin-bottom: 8px;
}

.ws-output {
  flex: 1;
  min-height: 0;
  height: auto;
  overflow: hidden;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.ws-log {
  flex: 1;
  min-height: 0;
  height: auto;
  white-space: normal;
  overflow-x: hidden;
  overflow-y: auto;
  scroll-behavior: smooth;
}

.ws-log-line {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  padding: 2px 0;
}

.ws-log-meta {
  color: #64748b;
  font-family: "Consolas", "Menlo", monospace;
  font-size: 12px;
  flex: 0 0 auto;
}

.ws-log-text {
  overflow-wrap: anywhere;
  word-break: break-word;
  white-space: pre-wrap;
}

.ws-log-out .ws-log-text {
  color: #1d4ed8;
}

.ws-log-error .ws-log-text {
  color: #b42318;
}

.ws-hints {
  margin-top: 8px;
  border-top: 1px dashed #e2e8f0;
  padding-top: 8px;
}

.ws-hints summary {
  cursor: pointer;
  color: #334155;
  font-size: 12px;
  user-select: none;
}

.ws-hints ul {
  margin: 8px 0 0;
  padding-left: 18px;
  color: #334155;
  line-height: 1.5;
  font-size: 12px;
}

.json-node {
  font-family: "Consolas", "Menlo", monospace;
  font-size: 14px;
  line-height: 1.5;
  overflow-wrap: normal;
  word-break: normal;
}

.json-node-line {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  min-width: 0;
}

.json-node details {
  margin: 3px 0;
}

.json-node summary {
  cursor: pointer;
  user-select: none;
}

.json-node-delete {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #fecaca;
  background: #fff1f2;
  color: #b42318;
  border-radius: 999px;
  padding: 0 6px;
  font-size: 11px;
  line-height: 18px;
  height: 18px;
  cursor: pointer;
  visibility: hidden;
}

.json-node-line:hover .json-node-delete,
.json-node summary:hover .json-node-delete {
  visibility: visible;
}

.json-node summary .json-node-delete {
  margin-left: 8px;
}

.json-node-delete:hover {
  background: #ffe4e6;
}

.json-children {
  border-left: 1px dashed var(--border);
  margin-left: 10px;
  padding-left: 12px;
}

.json-key {
  color: #005db5;
  white-space: nowrap;
  overflow-wrap: normal;
  word-break: normal;
  flex: 0 0 auto;
}

.json-meta,
.json-string,
.json-number,
.json-boolean,
.json-null {
  overflow-wrap: anywhere;
  word-break: break-word;
  flex: 1 1 auto;
  min-width: 0;
}

.json-meta {
  color: #5e7083;
}

.json-string {
  color: #0f766e;
}

.json-number {
  color: #8a3ffc;
}

.json-boolean {
  color: #b45309;
}

.json-null {
  color: #6b7280;
}

.dep-state {
  display: inline-block;
  min-width: 44px;
  text-align: center;
  border-radius: 999px;
  padding: 3px 8px;
  font-size: 12px;
}

.ws-state.dep-state {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 12px;
  line-height: 1.2;
}

.dep-ok {
  background: #ecfdf3;
  color: #027a48;
  border: 1px solid #abefc6;
}

.dep-mid {
  background: #eff8ff;
  color: #175cd3;
  border: 1px solid #b2ddff;
}

.dep-bad {
  background: #fef3f2;
  color: #b42318;
  border: 1px solid #fecdca;
}

@media (max-width: 1200px) {
  .ws-page {
    overflow: auto;
  }

  .ws-container {
    height: auto;
    min-height: 100vh;
  }

  .ws-layout {
    grid-template-columns: 1fr;
  }

  .ws-left-col {
    grid-template-rows: auto auto;
  }

  .ws-log {
    min-height: 260px;
  }

  .ws-output {
    min-height: 180px;
  }
}

@media (max-width: 1360px) {
  .home-featured-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .cards.home-group-cards {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .colorbook-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 1024px) {
  .section-heading {
    flex-direction: column;
    align-items: flex-start;
  }

  .cards.home-group-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 600px) {
  .colorbook-controls {
    grid-template-columns: 1fr;
  }

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

  .emoji-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .watermark-control-grid {
    grid-template-columns: 1fr;
  }

  .watermark-compare-grid {
    grid-template-columns: 1fr;
  }

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

  .background-canvas-layout {
    grid-template-columns: 1fr;
  }

  .background-canvas-controls {
    grid-template-columns: 1fr;
  }

  .background-canvas-panel {
    padding: 14px;
  }

  .background-canvas-preview-wrap {
    min-height: 360px;
  }

  .home-featured-grid {
    grid-template-columns: 1fr;
  }

  .timezone-world-grid {
    grid-template-columns: 1fr;
  }

  .container {
    padding: 10px 8px 18px;
  }

  textarea {
    min-height: 260px;
  }

  .compact-textarea {
    min-height: 140px;
    height: 140px;
  }

  .cookie-format-grid {
    grid-template-columns: 1fr;
  }

  .totp-config-grid,
  .totp-meta-grid {
    grid-template-columns: 1fr;
  }

  .totp-code-value {
    font-size: 34px;
  }

  .json-tree {
    height: 320px;
  }

  .code-output {
    height: 320px;
  }

  .hero,
  .tool,
  .card {
    border-radius: 12px;
  }

  .hero {
    padding: 16px;
  }

  .home-hero-title {
    font-size: 28px;
    max-width: none;
    white-space: normal;
  }

  .timezone-world-panel h2 {
    font-size: 20px;
  }

  .timezone-city-time {
    font-size: 22px;
  }

  .home-topbar {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }

  .admin-topbar {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }

  .home-top-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .home-jump-links {
    display: grid;
    grid-template-columns: 1fr;
  }

  .home-search-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .home-search-clear {
    width: 100%;
  }

  .topbar-group-navs {
    width: 100%;
  }

  .topbar-group-nav-menu {
    width: min(320px, calc(100vw - 16px));
  }

  .admin-top-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .home-brand-title h1 {
    font-size: 18px;
  }

  .brand-wordmark {
    height: 26px;
  }

  .cards.home-group-cards {
    grid-template-columns: 1fr;
  }

  .calc-result-grid {
    grid-template-columns: 1fr;
  }

  .calc-input-inline {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .calc-input-unit {
    min-width: 0;
    text-align: left;
  }

  .meal-item-row {
    grid-template-columns: 1fr;
  }

  .tool-group-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }

  .stats-table {
    min-width: 520px;
  }

  .daily-col {
    flex-basis: 26px;
  }

  .page-head h1 {
    margin: 0;
    font-size: 18px;
  }

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

  .actions {
    gap: 8px;
  }

  .actions .btn,
  .tab-actions .tab-btn,
  .subtab-actions .subtab-btn {
    width: 100%;
    text-align: center;
  }

  .actions select {
    width: 100%;
    min-width: 0;
  }

  textarea,
  input[type="text"],
  input[type="password"],
  input[type="number"],
  input[type="file"],
  input[type="datetime-local"],
  select {
    font-size: 16px;
  }
}

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

  .wordcloud-layout,
  .wordcloud-controls {
    grid-template-columns: 1fr;
  }

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

  .json-tree,
  .code-output {
    height: 360px;
    max-height: 60vh;
  }
}
