:root {
  color-scheme: light;
  --ink: #14223c;
  --muted: #54627d;
  --blue: #244ee9;
  --border: #e1e8f5;
  --ui: Inter, system-ui, sans-serif;
  --mono: 'IBM Plex Mono', SFMono-Regular, Consolas, monospace;
  font-family: var(--ui);
  line-height: 1.5;
  color: var(--ink);
  background: #f5f8ff;
}

:root:lang(zh-Hant) { --ui: Inter, 'PingFang TC', 'Microsoft JhengHei', system-ui, sans-serif; }
:root:lang(zh-Hans) { --ui: Inter, 'PingFang SC', 'Microsoft YaHei', system-ui, sans-serif; }
:root:lang(ja) { --ui: Inter, 'Hiragino Sans', 'Yu Gothic UI', system-ui, sans-serif; }

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; }
[hidden] { display: none !important; }
button, input, textarea { font: inherit; }
svg { width: 1.25rem; height: 1.25rem; stroke: currentColor; stroke-width: 1.65; stroke-linecap: round; stroke-linejoin: round; flex: none; }

.site-header {
  border-bottom: 1px solid #e6ebf7;
  background: #fff;
}

.header-content {
  width: min(100% - 64px, 1104px);
  margin: 0 auto;
  min-height: 70px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.brand, .privacy-badge { display: flex; align-items: center; white-space: nowrap; }
.brand { gap: 11px; font-size: 17px; font-weight: 750; letter-spacing: -.035em; }
.brand-icon, .panel-icon, .upload-icon { display: grid; place-items: center; flex: none; }
.brand-icon { width: 36px; height: 36px; border-radius: 10px; background: var(--blue); color: white; }
.brand-icon svg { width: 22px; height: 22px; }
.brand-secondary { color: var(--blue); }

.privacy-badge {
  gap: 7px;
  border: 1px solid #dce8ff;
  border-radius: 99px;
  padding: 5px 11px;
  color: #3153a8;
  background: #f2f6ff;
  font-size: 12px;
  font-weight: 650;
}
.privacy-badge svg { width: 14px; height: 14px; }

.page {
  position: relative;
  isolation: isolate;
  width: min(100% - 64px, 1104px);
  margin: 0 auto;
  padding: 58px 0 48px;
}

.page::before {
  content: '';
  position: absolute;
  z-index: -1;
  inset: 0 0 auto;
  height: 284px;
  pointer-events: none;
  background: radial-gradient(circle, #b7c9f1 1px, transparent 1.2px) 50% 0 / 18px 18px;
  mask-image: radial-gradient(ellipse 62% 75% at 50% 9%, #000 15%, transparent 90%);
  opacity: .65;
}

.intro { text-align: center; margin-bottom: 39px; }
.intro h1 {
  margin: 0;
  font-size: clamp(36px, 5.5vw, 64px);
  line-height: 1.15;
  letter-spacing: -.058em;
  font-weight: 820;
  text-wrap: balance;
}
.title-format { display: inline-block; color: var(--blue); }
.intro p { margin: 16px 0 0; color: var(--muted); font-size: clamp(14px, 1.8vw, 17px); }

.workspace { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }
.panel {
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 24px 24px 12px;
  background: #fff;
  box-shadow: 0 4px 8px #253f7710, 0 19px 36px -22px #253f772a;
}

.panel-heading { display: flex; align-items: center; gap: 12px; margin-bottom: 22px; }
.panel-icon { width: 42px; height: 42px; border-radius: 11px; background: #eef3ff; color: var(--blue); }
.panel-icon svg { width: 23px; height: 23px; }
.panel-heading h2 { margin: 0; font-size: 18px; font-weight: 760; letter-spacing: -.025em; }
.panel-heading p { margin: 2px 0 0; font-size: 13px; color: var(--muted); }

.drop-area, .code-box { position: relative; height: 258px; border-radius: 12px; }
.drop-area {
  border: 1.5px dashed #aabef5;
  background: #f7f9ff;
  transition: border-color .15s, background-color .15s, box-shadow .15s;
}
.drop-area.is-dragging {
  border-color: var(--blue);
  background: #e8efff;
  box-shadow: 0 0 0 3px #244ee924;
}
.drop-empty {
  height: 100%;
  padding: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  text-align: center;
}
.upload-icon {
  width: 54px;
  height: 54px;
  border: 1px solid #e2eaff;
  border-radius: 15px;
  background: white;
  color: var(--blue);
  box-shadow: 0 3px 8px #244ee912;
}
.upload-icon svg { width: 25px; height: 25px; }
.drop-title { margin: 12px 0 5px; font-weight: 750; font-size: 16px; }
.shortcut { margin: 0 0 16px; color: var(--muted); font-size: 13px; }
kbd {
  display: inline-block;
  padding: 0 5px;
  min-width: 20px;
  border: 1px solid #dce5f7;
  border-bottom-width: 2px;
  border-radius: 4px;
  background: #fff;
  color: #304b85;
  font: 600 11px / 1.5 var(--mono);
}

.button { border: 1px solid transparent; border-radius: 8px; cursor: pointer; font-weight: 700; transition: background-color .15s, border-color .15s; }
.file-button { padding: 7px 14px; border-color: #cedbff; background: #fff; color: #2349c9; font-size: 13px; }
.file-button:hover, .clear-button:hover { background: #eaf0ff; border-color: #bdcefb; }
.clear-button { padding: 7px 9px; color: var(--muted); font-size: 13px; background: transparent; }
.button:focus-visible, input:focus-visible, textarea:focus-visible { outline: 2px solid #527aff; outline-offset: 3px; }

.drop-preview { margin: 0; padding: 12px; height: 100%; display: flex; flex-direction: column; gap: 8px; }
.preview-image {
  display: grid;
  place-items: center;
  flex: 1;
  min-height: 0;
  overflow: hidden;
  border-radius: 7px;
  background: repeating-conic-gradient(#e7edfa 0% 25%, #f8faff 0% 50%) 0 0 / 20px 20px;
  color: var(--muted);
  text-align: center;
  font-size: 13px;
}
.preview-image img { display: block; width: 100%; height: 100%; min-height: 0; object-fit: contain; }
.file-details { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.file-metadata { display: flex; flex-direction: column; min-width: 0; }
.file-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; font-weight: 700; }
.file-size { color: var(--muted); font-size: 12px; }
.file-actions { display: flex; flex: none; gap: 4px; }

.code-box {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #101c32;
  color: #dce7ff;
  font: 13px / 1.65 var(--mono);
}
.code-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 11px 15px;
  border-bottom: 1px solid #ffffff13;
  background: #172541;
  color: #bfd0f1;
  font-size: 10px;
  letter-spacing: .08em;
  font-weight: 700;
}
.code-dot { width: 7px; height: 7px; border-radius: 50%; background: #83a4ff; }
.code-type { margin-left: auto; color: #a1b5de; }
.code-empty { padding: 19px 16px; }
.code-empty code { font: inherit; overflow-wrap: anywhere; }
.code-punctuation { color: #a7b9f8; }
.code-alt { color: #f1d79d; }
.code-data { color: #9ee3c6; }
.code-dots { color: #adbee2; }
.code-empty p { margin: 12px 0 0; color: #a8b9d9; font: 13px / 1.6 var(--ui); }
#markdown-output {
  flex: 1;
  min-height: 0;
  width: 100%;
  margin: 0;
  padding: 16px;
  resize: none;
  background: transparent;
  color: inherit;
  border: 0;
  overflow-wrap: anywhere;
}
#markdown-output:focus-visible { outline-offset: -3px; }

.alt-field, .copy-field { height: 74px; margin-top: 16px; }
.alt-field { display: flex; flex-direction: column; justify-content: flex-end; gap: 6px; }
.alt-field label { color: #263752; font-size: 13px; font-weight: 700; }
.alt-field label span { margin-left: 5px; color: var(--muted); font-size: 12px; font-weight: 400; }
.alt-field input {
  min-height: 43px;
  width: 100%;
  padding: 9px 11px;
  border: 1px solid #dbe4f3;
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font-size: 14px;
}
.alt-field input::placeholder { color: #687895; }
.copy-field { display: flex; align-items: flex-end; }
.copy-button {
  width: 100%;
  min-height: 43px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--blue);
  color: #fff;
  font-size: 14px;
}
.copy-button:enabled:hover { background: #193cce; }
.copy-button:disabled { color: #425da9; background: #eaf0ff; border-color: #e0e9ff; cursor: default; }
.copy-button svg { width: 17px; height: 17px; }
.status { margin: 4px 0 0; min-height: 18px; color: #28539e; font-size: 12px; }
.status[data-error] { color: #a12b32; }

.compatibility {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin-top: 18px;
  padding: 12px 15px;
  border: 1px solid #dce7fd;
  border-radius: 10px;
  background: #eff4ff;
  color: #314a83;
  font-size: 13px;
}
.compatibility svg { width: 17px; height: 17px; margin-top: 1px; color: #3c61c8; }
.compatibility p { margin: 0; font-weight: 700; }
.compatibility p > span { margin-left: 10px; color: #4e6186; font-weight: 400; }
.compatibility code { font-family: var(--mono); color: #2349b2; }

@media (max-width: 720px) {
  .page, .header-content { width: calc(100% - 32px); }
  .header-content { min-height: 62px; }
  .page { padding-top: 38px; }
  .intro { margin-bottom: 28px; }
  .intro p { margin-top: 11px; }
  .workspace { grid-template-columns: 1fr; gap: 16px; }
  .panel { padding: 19px 18px 10px; }
  .panel-heading { margin-bottom: 16px; }
  .drop-area { height: 228px; }
  .code-box { height: 212px; }
  .copy-field { height: auto; }
}

@media (max-width: 380px) {
  .brand { font-size: 15px; gap: 7px; }
  .brand-icon { width: 31px; height: 31px; }
  .privacy-badge { padding-inline: 7px; font-size: 11px; }
  .intro h1 { font-size: 32px; }
  .compatibility p > span { display: block; margin-left: 0; }
}

@media (max-width: 480px) {
  .privacy-badge { max-width: 46%; white-space: normal; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
}
