:root {
  color-scheme: light;
  --ink: #24263a;
  --muted: #858ba0;
  --line: #e2e5ee;
  --primary: #6078e6;
  --primary-dark: #7650af;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Segoe UI", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: linear-gradient(135deg, #657ee7 0%, #636bd5 52%, #774ca8 100%);
}

.shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 40px 20px;
}

.panel {
  width: min(100%, 510px);
  padding: 40px;
  background: rgba(255, 255, 255, .97);
  border-radius: 22px;
  box-shadow: 0 24px 70px rgba(32, 24, 89, .22);
}

.brand-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  margin: 0 auto 12px;
  border-radius: 12px;
  color: #fff;
  font-size: 19px;
  background: linear-gradient(145deg, var(--primary), var(--primary-dark));
}

h1 { margin: 0; text-align: center; font-size: clamp(24px, 4vw, 30px); letter-spacing: .02em; }
.subtitle { margin: 9px 0 28px; text-align: center; color: var(--muted); font-size: 14px; }

.tabs { display: grid; grid-template-columns: 1fr 1fr; margin-bottom: 28px; padding: 4px; background: #f2f4f9; border-radius: 12px; }
.tab { border: 0; border-radius: 9px; padding: 13px 10px; color: #72788a; background: transparent; font: inherit; cursor: pointer; transition: .2s ease; }
.tab.active { color: #fff; background: var(--primary); box-shadow: 0 5px 13px rgba(96, 120, 230, .25); }
.tab:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible { outline: 3px solid rgba(96, 120, 230, .27); outline-offset: 2px; }

.notice { min-height: 0; margin: -12px 0 16px; padding: 0; border-radius: 9px; font-size: 14px; }
.notice:not(:empty) { padding: 10px 12px; background: #f0f4ff; color: #4c61bd; }
.notice.error:not(:empty) { background: #fff1f1; color: #c45353; }
.notice.success:not(:empty) { background: #edf9f2; color: #2b8c59; }

.view { display: grid; gap: 10px; }
.view[hidden] { display: none; }
label { margin-top: 2px; font-size: 14px; font-weight: 600; }
.input-wrap { position: relative; }
.input-icon { position: absolute; left: 15px; top: 50%; transform: translateY(-50%); color: #a1a7b8; font-weight: 700; }
input, textarea { width: 100%; border: 1px solid var(--line); border-radius: 10px; color: var(--ink); background: #fbfcfe; font: inherit; transition: border .2s, box-shadow .2s; }
input { height: 51px; padding: 0 15px 0 39px; }
textarea { min-height: 145px; padding: 14px 15px; line-height: 1.65; resize: vertical; }
input::placeholder, textarea::placeholder { color: #abb0bd; }
input:focus, textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 4px rgba(96, 120, 230, .1); outline: 0; }
.field-meta { display: flex; justify-content: space-between; gap: 12px; color: #a0a5b4; font-size: 12px; }
.primary { display: flex; justify-content: center; align-items: center; gap: 12px; min-height: 53px; margin-top: 10px; border: 0; border-radius: 10px; color: #fff; background: linear-gradient(100deg, var(--primary), var(--primary-dark)); font: inherit; font-weight: 600; cursor: pointer; box-shadow: 0 7px 18px rgba(96, 120, 230, .22); transition: transform .2s, filter .2s; }
.primary:hover { filter: brightness(1.05); transform: translateY(-1px); }
.primary:disabled { opacity: .65; cursor: wait; transform: none; }
.button-arrow { font-size: 20px; line-height: 0; }
.result { margin-top: 14px; padding-top: 17px; border-top: 1px solid var(--line); }
.result-heading { display: flex; align-items: center; justify-content: space-between; margin-bottom: 9px; font-size: 14px; font-weight: 600; }
.copy { border: 0; padding: 6px 10px; border-radius: 7px; color: #596fcf; background: #eef1ff; font: inherit; font-size: 12px; cursor: pointer; }
#result-content { min-height: 160px; background: #f7f8fc; }
#result-time { display: block; margin-top: 7px; color: #a1a6b5; font-size: 12px; }
.privacy { margin: 26px 0 0; color: #a1a6b5; text-align: center; font-size: 12px; }
.privacy span { margin-right: 5px; color: #71bd91; font-size: 9px; vertical-align: 1px; }

@media (max-width: 560px) {
  .shell { padding: 16px 12px; align-items: start; }
  .panel { margin-top: 5vh; padding: 28px 20px 22px; border-radius: 18px; }
  .subtitle { margin-bottom: 22px; }
  .tabs { margin-bottom: 23px; }
  textarea { min-height: 170px; }
}

@media (max-width: 350px) {
  .panel { padding-inline: 15px; }
  h1 { font-size: 23px; }
  .field-meta { display: block; }
  .field-meta span:last-child { display: block; margin-top: 3px; }
}
