:root {
  color-scheme: light;
  --ink: #202624;
  --muted: #6f7774;
  --paper: #f5f7f6;
  --surface: #fff;
  --line: #e1e7e4;
  --accent: #1aa37a;
  --accent-dark: #0c7c5d;
  --soft: #edf9f5;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  color: var(--ink);
  font:
    15px/1.7 system-ui,
    -apple-system,
    "Segoe UI",
    "Microsoft YaHei",
    sans-serif;
  background: var(--paper);
}
button,
textarea,
input,
select {
  font: inherit;
}
.tool-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  padding: 0 max(20px, calc((100% - 1080px) / 2));
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.94);
}
.tool-logo {
  color: var(--ink);
  font-weight: 750;
  text-decoration: none;
}
.tool-logo span {
  color: var(--accent);
}
.tool-back {
  color: var(--muted);
  text-decoration: none;
}
.tool-shell {
  width: min(1080px, calc(100% - 28px));
  margin: 36px auto 70px;
}
.tool-hero {
  margin-bottom: 24px;
}
.tool-kicker {
  color: var(--accent-dark);
  font-size: 12px;
  font-weight: 750;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.tool-hero h1 {
  margin: 8px 0 9px;
  font-size: clamp(30px, 5vw, 48px);
  line-height: 1.16;
  letter-spacing: -0.035em;
}
.tool-hero p {
  max-width: 760px;
  margin: 0;
  color: var(--muted);
}
.tool-panel {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--surface);
  box-shadow: 0 14px 40px rgba(32, 45, 40, 0.05);
}
.tool-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
.tool-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.tool-field label {
  font-weight: 700;
}
.tool-field small {
  color: var(--muted);
}
textarea,
.tool-input {
  width: 100%;
  min-height: 240px;
  padding: 15px;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 12px;
  outline: 0;
  background: #fbfcfc;
  resize: vertical;
}
textarea:focus,
.tool-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(26, 163, 122, 0.1);
}
.tool-input {
  min-height: auto;
}
.tool-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin: 18px 0 0;
}
.tool-button {
  padding: 10px 16px;
  border: 0;
  border-radius: 10px;
  color: #fff;
  cursor: pointer;
  background: var(--accent);
}
.tool-button.secondary {
  color: var(--ink);
  border: 1px solid var(--line);
  background: #fff;
}
.tool-button:hover {
  filter: brightness(0.96);
}
.tool-status {
  min-height: 24px;
  margin-top: 10px;
  color: var(--accent-dark);
  font-size: 13px;
}
.tool-options {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 22px;
  margin-bottom: 18px;
}
.tool-options label {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--muted);
  cursor: pointer;
  white-space: nowrap;
}
.tool-options .tool-input {
  width: auto;
  min-width: 0;
  min-height: 42px;
  padding: 9px 12px;
  border-radius: 8px;
}
.tool-options select.tool-input {
  min-width: 138px;
}
.tool-options input[type="number"].tool-input {
  width: 92px;
}
.tool-options input[type="color"] {
  width: 42px;
  height: 34px;
  padding: 2px;
  cursor: pointer;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}
.tool-options input[type="checkbox"],
.tool-options input[type="radio"] {
  width: 17px;
  height: 17px;
  margin: 0;
  flex: 0 0 17px;
  accent-color: var(--accent);
  cursor: pointer;
}
.color-fields {
  display: grid;
  gap: 14px;
}
.color-control {
  min-width: 0;
}
.color-label {
  display: block;
  margin-bottom: 8px;
  font-weight: 700;
}
.color-input-row {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.color-swatch {
  position: relative;
  display: block;
  width: 50px;
  height: 42px;
  flex: 0 0 50px;
  padding: 2px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
  appearance: none;
  overflow: hidden;
}
.color-swatch input[type="color"] {
  width: 100%;
  height: 100%;
  padding: 2px;
  border: 0;
  background: transparent;
  cursor: pointer;
}
/* Hide the button injected beside color inputs by the ColorPick browser extension. */
.color-swatch .colorpick-eyedropper-input-trigger,
.color-swatch img[src^="chrome-extension://"]
{
  display: none !important;
}
.color-control .tool-input {
  width: 100%;
  min-width: 0;
  min-height: 42px;
  padding: 9px 12px;
  border-radius: 8px;
}
.color-preview {
  border: 1px dashed #aeb8b4;
  border-radius: 5px;
}
.tool-info {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-top: 22px;
}
.tool-info article {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: var(--surface);
}
.tool-info h2 {
  margin: 0 0 8px;
  font-size: 17px;
}
.tool-info p {
  margin: 0;
  color: var(--muted);
}
.tool-content {
  margin-top: 26px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #fff;
}
.tool-content h2 {
  margin: 0 0 12px;
  font-size: 23px;
}
.tool-content h3 {
  margin: 24px 0 8px;
  font-size: 17px;
}
.tool-content p,
.tool-content li {
  color: var(--muted);
}
.tool-content code {
  padding: 2px 6px;
  border-radius: 5px;
  background: var(--soft);
}
.time-now {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
  padding: 18px;
  border-radius: 14px;
  background: var(--soft);
}
.time-now strong {
  font:
    700 clamp(22px, 4vw, 34px) / 1.2 ui-monospace,
    monospace;
}
.time-result {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-top: 16px;
}
.time-result div {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 11px;
}
.time-result span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}
.time-result strong {
  word-break: break-all;
}
@media (max-width: 720px) {
  .tool-shell {
    margin-top: 24px;
  }
  .tool-grid,
  .tool-info,
  .time-result {
    grid-template-columns: 1fr;
  }
  .tool-panel,
  .tool-content {
    padding: 18px;
  }
  .tool-nav {
    height: 58px;
  }
  .time-now {
    align-items: flex-start;
    flex-direction: column;
  }
  textarea {
    min-height: 190px;
  }
  .tool-options {
    align-items: flex-start;
    gap: 12px 16px;
  }
  .tool-options label {
    gap: 7px;
  }
  .tool-options select.tool-input {
    min-width: 132px;
  }
  .tool-options input[type="number"].tool-input {
    width: 72px;
  }
}
