:root {
  color-scheme: light;
  font-family: "Segoe UI Variable", "Segoe UI", "PingFang SC", "Microsoft YaHei UI", system-ui, sans-serif;
  color: #19262e;
  background: #f6f7f9;
  --muted: #4e626b;
  --line: #dbe4e7;
  --dark: #243e43;
  --paper: #fff;
  --accent: #d2f7aa;
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; min-width: 0; }
h1, h2, p { margin: 0; }
[hidden] { display: none !important; }
button, input, select, textarea { font: inherit; }
button, select { cursor: pointer; }
button:disabled { cursor: default; opacity: .55; }
a { color: inherit; text-decoration: none; }
:focus-visible { outline: 3px solid #398773; outline-offset: 3px; }
main:focus { outline: none; }
.skip { position: fixed; z-index: 4; top: 8px; left: 8px; transform: translateY(-145%); padding: 10px 13px; border-radius: 7px; background: #fff; }
.skip:focus { transform: none; }

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  min-height: 70px;
  padding: 11px max(22px, calc((100vw - 1080px) / 2));
  border-bottom: 1px solid #e2e9eb;
  background: #fdfefe;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: #223b40;
  font-size: 19px;
  font-weight: 770;
  letter-spacing: -.045em;
  white-space: nowrap;
}
.brand-mark { flex: 0 0 34px; display: grid; width: 34px; height: 34px; place-items: center; border-radius: 9px; background: var(--dark); }
.brand-mark::before { content: ""; width: 16px; height: 13px; margin-left: 1px; background: var(--accent); clip-path: polygon(0 1%, 100% 50%, 0 99%, 23% 50%); }
.locale { display: flex; align-items: center; gap: 6px; padding-left: 8px; background: #fff; border: 1px solid var(--line); border-radius: 8px; color: #3e6068; }
.locale select { min-height: 38px; padding: 3px 6px 3px 2px; border: 0; border-radius: 7px; color: #2d4951; background: transparent; font-size: 13px; font-weight: 650; }
.locale-icon { position: relative; width: 13px; height: 13px; border: 1.3px solid currentColor; border-radius: 50%; }
.locale-icon::before { content: ""; position: absolute; inset: -1px 2px; border: 1.2px solid currentColor; border-radius: 50%; }
.locale-icon::after { content: ""; position: absolute; top: 5px; right: 0; left: 0; border-top: 1px solid currentColor; }

main { max-width: 1124px; margin-inline: auto; padding: 24px 22px 0; }
.intro {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 25px;
  min-height: 170px;
  padding: 25px 31px;
  border-radius: 18px;
  color: #f2f8f7;
  background: radial-gradient(ellipse at 100% 0%, #456963, #264747 44%, #223544 79%);
  box-shadow: 0 10px 32px #1832401b;
}
.intro::after {
  content: "";
  position: absolute;
  top: -143px;
  right: -47px;
  z-index: -1;
  width: 460px;
  height: 460px;
  border-radius: 50%;
  background: repeating-radial-gradient(circle at center, #dceee92b 0 1px, transparent 2px 26px);
  mask-image: linear-gradient(70deg, transparent, #000);
}
.intro-copy { min-width: 0; }
.intro h1 { font-size: clamp(30px, 4.8vw, 52px); line-height: 1.12; letter-spacing: -.06em; }
.intro p { margin-top: 10px; max-width: 570px; color: #dce9ea; font-size: 15px; line-height: 1.58; }
.channel-symbol { flex: 0 0 97px; display: grid; width: 97px; height: 69px; margin-right: 13px; place-items: center; border: 1px solid #bed9d488; border-radius: 15px; background: #24484b; }
.channel-symbol span { width: 24px; height: 26px; margin-left: 4px; background: var(--accent); clip-path: polygon(0 0, 100% 50%, 0 100%); }

.card { min-width: 0; padding: 19px; border: 1px solid var(--line); border-radius: 12px; background: var(--paper); box-shadow: 0 2px 9px #203b4910; }
.card h2 { font-size: 20px; line-height: 1.3; letter-spacing: -.03em; }
.card p { margin-top: 5px; color: var(--muted); font-size: 14px; line-height: 1.56; overflow-wrap: anywhere; }
.preview, .channel-card { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 10px 12px; margin-top: 16px; }
.channel-copy, .preview-copy { min-width: 0; }
.section-icon { position: relative; display: inline-grid; place-items: center; width: 42px; height: 42px; flex: 0 0 42px; border-radius: 9px; color: #2d6c6c; background: #e8f2f0; }
.section-icon::before, .section-icon::after { position: absolute; content: ""; box-sizing: border-box; }
.check-icon::before { width: 21px; height: 21px; border: 1.5px solid currentColor; border-radius: 50%; }
.check-icon::after { top: 15px; left: 16px; width: 8px; height: 10px; border: 1.7px solid currentColor; border-top: 0; border-left: 0; transform: rotate(39deg); }
.channel-icon::before { width: 23px; height: 16px; border: 1.5px solid currentColor; border-radius: 4px; }
.channel-icon::after { top: 17px; left: 19px; border: 4px solid transparent; border-left: 6px solid currentColor; border-right: 0; }
.file-icon::before { width: 17px; height: 22px; border: 1.5px solid currentColor; border-radius: 3px; }
.file-icon::after { top: 18px; left: 19px; border: 4px solid transparent; border-left: 6px solid currentColor; border-right: 0; }
.button {
  display: inline-flex;
  min-width: 0;
  min-height: 42px;
  padding: 8px 13px;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: 8px;
  background: #fff;
  color: #264b51;
  font-size: 13px;
  line-height: 1.35;
  font-weight: 700;
  text-align: center;
}
.button.primary { color: #fff; background: var(--dark); }
.button.primary:hover:not(:disabled) { background: #355d62; }
.button-outline { border-color: #c8dcdd; background: #f6fbfa; }
.button-outline:hover:not(:disabled) { background: #e9f4f0; }
.inline-message { padding: 8px 10px; border-radius: 7px; background: #eff5f4; color: #304c51 !important; font-size: 13px !important; }
#auth-message { grid-column: 1 / -1; background: #fdf1e7; color: #75442e !important; }
.authorization-consent { grid-column: 1 / -1; display: flex; align-items: start; gap: 8px; padding-top: 8px; border-top: 1px solid var(--line); font-size: 13px; }
.authorization-consent input { flex: 0 0 auto; width: 17px; height: 17px; margin: 1px 0 0; accent-color: #347f72; }
.authorization-consent p { margin-top: 3px; font-size: 12px; }
.authorization-consent a { color: #255d62; text-decoration: underline; text-underline-offset: 2px; }

.workspace { display: grid; grid-template-columns: minmax(0, 1fr) minmax(235px, 34%); align-items: start; gap: 16px; margin-top: 16px; }
.settings-card { position: sticky; top: 13px; }
.section-header { display: flex; align-items: start; justify-content: space-between; flex-wrap: wrap; gap: 10px; }
.drop-area {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 82px;
  margin-top: 13px;
  padding: 12px;
  border: 1px dashed #8baeb0;
  border-radius: 9px;
  background: #f5faf9;
  cursor: pointer;
}
.drop-area:hover, .drop-area[data-dragging="true"] { background: #eaf6f2; border-color: #4c887f; }
.drop-area:focus-within { outline: 3px solid #398773; outline-offset: 2px; }
.drop-area:has(input:disabled) { opacity: .62; cursor: default; }
.drop-label { display: grid; gap: 2px; }
.drop-label strong { color: #234b51; font-size: 14px; }
.drop-label span { color: #52666f; font-size: 13px; }
.drop-area input { position: absolute; inset: 0; width: 100%; cursor: inherit; opacity: 0; }
#file-message, #drive-message { margin-top: 10px; }
.file-list { display: grid; gap: 9px; margin: 11px 0 0; padding: 0; list-style: none; }
.file-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; padding: 11px; border: 1px solid #dce8e8; border-radius: 8px; }
.file-header { display: grid; align-content: center; gap: 1px; min-width: 0; overflow-wrap: anywhere; }
.file-header strong { font-size: 14px; line-height: 1.35; }
.file-size { color: var(--muted); font-size: 12px; }
.file-title, .file-settings, .file-result, progress { grid-column: 1 / -1; }
.file-title { display: grid; gap: 4px; min-width: 0; }
.file-title label, .field label, .file-field label { color: #38515c; font-size: 13px; font-weight: 680; }
.file-title input, .field select, .file-field select, .file-field textarea { width: 100%; min-width: 0; min-height: 42px; padding: 8px; border: 1px solid #bdcfd1; border-radius: 7px; color: #263f48; background: #fdfefe; font-size: 16px; }
.file-title input:disabled, .file-field :disabled { opacity: .8; }
.file-settings { min-width: 0; border-top: 1px solid #e6eeee; }
.file-settings summary { min-height: 40px; padding: 9px 2px; cursor: pointer; color: #345a61; font-size: 13px; line-height: 1.5; overflow-wrap: anywhere; }
.file-settings summary > span:first-child { font-weight: 680; }
.file-settings-summary { margin-inline-start: 7px; color: var(--muted); }
.file-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; padding: 1px 0 5px; }
.file-field { display: grid; gap: 4px; align-content: start; }
.file-field:first-child { grid-column: 1 / -1; }
.file-field textarea { resize: vertical; }
.remove-button { min-height: 34px; align-self: start; padding: 5px 8px; border-color: #dbe7e8; }
.remove-button:hover:not(:disabled) { background: #eef5f5; }
.file-result { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 9px; color: #496572; font-size: 13px; line-height: 1.4; }
.file-row[data-state="accepted"] .file-status { color: #245c4b; font-weight: 640; }
.file-row[data-state="failed"] .file-status, .file-row[data-state="unknown"] .file-status { color: #843c2e; }
.file-link { color: #286a6a; font-weight: 660; text-decoration: underline; text-underline-offset: 3px; }
progress { appearance: none; width: 100%; height: 7px; accent-color: #347f72; background: #dce8e8; border: 0; border-radius: 4px; overflow: hidden; }
progress::-webkit-progress-bar { background: #dce8e8; }
progress::-webkit-progress-value { background: #347f72; }
progress::-moz-progress-bar { background: #347f72; }
.field { display: grid; gap: 5px; margin-top: 14px; }
.settings-card .upload-notice {
  margin-top: 14px;
  padding: 9px 10px;
  border-radius: 7px;
  background: #f3f7f6;
  color: #405b61;
  font-size: 12px;
}
.upload-notice a { color: #255d62; text-decoration: underline; text-underline-offset: 2px; }
.send-button { width: 100%; margin-top: 16px; }
.settings-card .settings-help { margin-top: 8px; font-size: 12px; }
#batch-message { margin-top: 10px; }

.footer { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; margin-top: 24px; padding: 16px 0 23px; border-top: 1px solid var(--line); color: #506572; font-size: 13px; }
.footer a:hover { text-decoration: underline; text-underline-offset: 3px; }
.footer nav { display: flex; flex-wrap: wrap; gap: 12px; }

@media (max-width: 700px) {
  .workspace { grid-template-columns: minmax(0, 1fr); gap: 11px; }
  .settings-card { position: static; }
}
@media (max-width: 540px) {
  .topbar { min-height: 60px; padding-inline: 13px; }
  .brand { font-size: 17px; }
  main { padding: 14px 13px 0; }
  .intro { min-height: 130px; gap: 9px; padding: 16px; border-radius: 13px; }
  .intro h1 { font-size: 30px; }
  .intro p { margin-top: 7px; font-size: 13px; }
  .channel-symbol { flex-basis: 46px; width: 46px; height: 36px; margin: 0; border-radius: 8px; }
  .channel-symbol span { width: 12px; height: 13px; margin-left: 2px; }
  .card { padding: 13px; }
  .preview, .channel-card { grid-template-columns: auto minmax(0, 1fr); gap: 9px; margin-top: 11px; }
  .preview .button, .channel-card .button { grid-column: 1 / -1; justify-self: start; }
  .card h2 { font-size: 18px; }
  .card p { font-size: 13px; }
  .section-icon { width: 37px; height: 37px; flex-basis: 37px; }
  .check-icon::after { top: 12px; left: 14px; }
  .channel-icon::after { top: 15px; left: 17px; }
  .file-icon::after { top: 15px; left: 17px; }
  .workspace { margin-top: 11px; }
  .file-fields { grid-template-columns: minmax(0, 1fr); }
}
