:root {
  font-family: "Avenir Next", system-ui, -apple-system, sans-serif;
  color: #202037;
  background: #f5f4fa;
  font-synthesis: none;
  --ink: #202037;
  --muted: #59576d;
  --line: #e1e0ec;
  --accent: #4b32a8;
  --accent-dark: #3e278e;
  --accent-light: #f3efff;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; line-height: 1.55; }
button, input, select { font: inherit; }
button, select { cursor: pointer; }
button:disabled, input:disabled { cursor: default; opacity: .53; }
a { color: var(--accent-dark); text-underline-offset: 3px; }
a:hover { color: #24135e; }
:focus-visible { outline: 3px solid #8a67ef; outline-offset: 3px; }
h1, h2, h3, p { margin: 0; }
.shell { width: min(1120px, calc(100% - 48px)); margin-inline: auto; }
.site-header { background: #fff; border-bottom: 1px solid var(--line); }
.site-header .shell { min-height: 69px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font-weight: 800; font-size: 1.08rem; }
.brand-mark { display: grid; place-items: center; width: 32px; height: 32px; color: #fff; background: #5134ad; border-radius: 9px; }
.brand-mark::after { content: ""; display: block; border-left: 9px solid #fff; border-top: 6px solid transparent; border-bottom: 6px solid transparent; margin-left: 2px; }
.site-header nav { display: flex; align-items: center; gap: 20px; }
.site-header nav a { color: var(--muted); font-size: .9rem; text-decoration: none; font-weight: 650; }
.site-header nav a:hover, .site-header nav a[aria-current] { color: var(--accent-dark); text-decoration: underline; }
.hero { padding: 56px 0 30px; }
.hero h1 { font-size: clamp(2.4rem, 6vw, 4.1rem); line-height: 1.06; letter-spacing: -.045em; font-weight: 750; }
.hero p { max-width: 47rem; margin-top: 14px; font-size: clamp(1.02rem, 2.3vw, 1.23rem); color: var(--muted); }
.hero .primary { margin-top: 19px; }
#tool, #preflight { scroll-margin-top: 18px; }
.workspace { display: grid; grid-template-columns: minmax(0, 1.75fr) minmax(280px, 1fr); gap: 20px; align-items: start; }
.panel { background: #fff; border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 12px 30px #291c5010; padding: 21px; min-width: 0; }
.panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.panel-heading h2 { font-size: 1.13rem; font-weight: 800; letter-spacing: -.02em; }
.panel-heading a { font-size: .85rem; }
.private { display: inline-flex; gap: 7px; align-items: center; font-size: .83rem; font-weight: 650; color: #3c604f; white-space: nowrap; }
.private i { width: 7px; height: 7px; border-radius: 50%; background: #478866; }
.drop { min-height: 335px; border: 1.5px dashed #a99ad3; border-radius: 13px; background: #fbf9ff; padding: 32px 14px 25px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.drop.dragging { background: #ede5ff; border-color: var(--accent); }
.upload-mark { width: 58px; height: 52px; margin: 0 auto 15px; border: 1px solid #dcd2f9; background: #eee7ff; border-radius: 13px; display: grid; place-items: center; }
.upload-mark span { width: 23px; height: 18px; border: 2px solid #5637b4; border-radius: 4px; position: relative; }
.upload-mark span::after { display: block; content: ""; position: absolute; right: -7px; top: 2px; border-radius: 2px; width: 7px; height: 10px; border: 2px solid #5637b4; background: #eee7ff; }
.drop h3 { font-size: 1.37rem; letter-spacing: -.025em; line-height: 1.2; }
.drop p { margin: 8px 0 18px; color: var(--muted); font-size: .92rem; }
.primary, .secondary, .text-button { display: inline-flex; align-items: center; justify-content: center; min-height: 42px; padding: 8px 15px; border: 1px solid transparent; border-radius: 9px; font-weight: 700; font-size: .91rem; text-align: center; text-decoration: none; }
.primary { color: white; background: var(--accent); box-shadow: 0 3px 9px #301f7324; }
.primary:hover:not(:disabled) { color: #fff; background: var(--accent-dark); }
.secondary { background: #fff; border-color: var(--line); color: var(--ink); }
.secondary:hover:not(:disabled) { background: #f5f2ff; }
.text-button { background: transparent; color: var(--accent-dark); box-shadow: none; }
.text-button:hover:not(:disabled) { text-decoration: underline; }
.drop .text-button { margin-top: 4px; }
.check-caption { color: var(--muted); font-size: .9rem; margin: -4px 0 8px; }
.checks { list-style: none; margin: 0; padding: 0; }
.check { min-height: 44px; display: flex; justify-content: space-between; gap: 8px; align-items: flex-start; border-bottom: 1px solid var(--line); padding: 10px 0; }
.check:last-child { border-bottom: 0; }
.check strong { font-size: .89rem; font-weight: 750; margin-right: 9px; }
.check-value { color: var(--muted); font-size: .87rem; white-space: nowrap; font-variant-numeric: tabular-nums; }
.check small { display: block; color: var(--muted); font-size: .81rem; margin-top: 4px; }
.check-status { color: #4d4764; background: #f0edf6; font-size: .76rem; font-weight: 800; letter-spacing: .01em; padding: 2px 8px; line-height: 1.6; border-radius: 99px; }
.check-status.pass { color: #1a5b3a; background: #e5f6ec; }
.check-status.fix { color: #8f272f; background: #fdecee; }
.check-status.review { color: #785508; background: #fff3d9; }
.export-panel { border-top: 1px solid var(--line); margin-top: 10px; padding-top: 13px; }
.export-panel p, .result p { color: var(--muted); font-size: .89rem; margin-bottom: 9px; font-variant-numeric: tabular-nums; }
.export-panel .primary, .result .primary { width: 100%; }
.result { margin-top: 17px; padding: 14px; background: #eaf7ee; border: 1px solid #cbe7d4; border-radius: 12px; }
.result h3 { color: #204c36; margin-bottom: 5px; font-size: 1.05rem; }
.source-bar { display: flex; justify-content: space-between; gap: 10px; align-items: center; margin: -6px 0 7px; }
.source-bar strong { color: var(--ink); overflow: hidden; min-width: 0; text-overflow: ellipsis; white-space: nowrap; font-size: .93rem; }
.source-bar button { white-space: nowrap; padding-inline: 2px; }
.preview-area { background: #222036; border-radius: 12px; min-height: 194px; display: grid; place-items: center; overflow: hidden; }
.frame { position: relative; overflow: hidden; background: #222036; }
.frame video { position: absolute; inset: 0 auto auto 0; object-fit: fill; display: block; }
.fallback { color: #fff; text-align: center; padding: 16px; }
.fallback button { margin-top: 10px; }
.playback { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px; margin: 10px 0 14px; }
.playback output { font-size: .85rem; font-variant-numeric: tabular-nums; color: var(--muted); min-width: 4.3em; text-align: right; }
input[type=range], progress { accent-color: var(--accent); width: 100%; min-width: 0; }
fieldset { margin: 0; border: 1px solid var(--line); padding: 11px; border-radius: 11px; min-width: 0; }
legend { font-weight: 750; font-size: .93rem; padding: 0 5px; }
.control-grid, .pan-controls { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px; }
.pan-controls { margin-top: 11px; }
.control-grid label, .pan-controls label { min-width: 0; display: grid; gap: 4px; align-content: start; font-size: .87rem; color: var(--muted); font-weight: 650; }
.control-grid input, .control-grid select { width: 100%; border: 1px solid #cfccdd; background-color: #fff; color: var(--ink); min-height: 39px; border-radius: 7px; padding: 6px 9px; }
.control-grid select { appearance: none; padding-right: 26px; background-image: linear-gradient(45deg, transparent 50%, #59576d 50%), linear-gradient(135deg, #59576d 50%, transparent 50%); background-position: calc(100% - 15px) 16px, calc(100% - 10px) 16px; background-size: 5px 5px; background-repeat: no-repeat; }
.failure { color: #84252e; background: #fff1f2; border: 1px solid #f4cdd2; border-radius: 8px; padding: 10px 12px; margin-top: 12px; }
.operation { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 2px 12px; margin-top: 12px; color: var(--muted); font-size: .9rem; }
.operation progress { grid-column: 1 / -1; }
.guide { margin: 30px 0; max-width: 780px; }
.guide h2 { font-size: 1.48rem; letter-spacing: -.027em; margin: 23px 0 9px; }
.guide p + p { margin-top: 12px; }
.guide p, .guide li, .guide td { color: var(--muted); }
.guide li { margin-bottom: 6px; }
.spec-table { width: 100%; border-collapse: collapse; background: #fff; border: 1px solid var(--line); border-radius: 12px; margin: 14px 0; }
.spec-table th, .spec-table td { padding: 11px 14px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
.spec-table th { width: 27%; font-weight: 750; }
.site-footer { border-top: 1px solid var(--line); margin-top: 36px; color: var(--muted); font-size: .86rem; padding: 17px 0 24px; }
@media (max-width: 780px) {
  .shell { width: calc(100% - 32px); }
  .hero { padding-top: 39px; }
  .workspace { grid-template-columns: 1fr; }
  .drop { min-height: 281px; }
}
@media (max-width: 430px) {
  .site-header .shell { flex-wrap: wrap; gap: 5px 14px; padding-block: 12px; }
  .site-header nav { flex-wrap: wrap; gap: 4px 12px; }
  .site-header nav a { font-size: .85rem; }
  .panel { padding: 15px; }
  .private { font-size: .78rem; }
  .pan-controls { grid-template-columns: 1fr; }
  .spec-table th, .spec-table td { padding: 9px; }
}
