:root { color-scheme: light; font-family: "Segoe UI", system-ui, sans-serif; color: #182324; background: #f4f6f4; }
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-width: 280px; }
svg { width: 1.25em; height: 1.25em; stroke: currentColor; fill: none; stroke-width: 1.65; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.top { background: #fff; border-bottom: 1px solid #dce4df; }
.top-inner, main { width: min(1080px, calc(100% - 48px)); margin-inline: auto; }
.top-inner { min-height: 62px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.brand, .access { display: inline-flex; align-items: center; gap: 8px; }
.brand { font-size: 18px; font-weight: 700; }
.brand svg { color: #1e6657; }
.access { font-size: 14px; color: #4d5d57; }
main { margin-block: 42px; }
h1, h2, p { margin: 0; }
h1 { font-size: 36px; line-height: 1.15; }
h2 { font-size: 16px; line-height: 1.3; }
.heading { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 23px; }
.sub { color: #53635c; margin-top: 7px; }
.ratio { font-size: 14px; color: #46695e; white-space: nowrap; border: 1px solid #c6dad0; padding: 6px 10px; border-radius: 5px; }
.work-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }
.panel { background: #fff; border: 1px solid #dce4df; border-radius: 7px; overflow: hidden; min-width: 0; }
.panel-header { padding: 12px 16px; display: flex; align-items: center; gap: 10px; justify-content: space-between; min-height: 48px; }
.panel-header span { font-size: 14px; color: #53635c; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stage { position: relative; margin: 0 12px; background: #eef2ef; border: 1px solid #e0e7e2; border-radius: 4px; height: min(52vh, 470px); min-height: 220px; display: grid; place-items: center; overflow: hidden; }
.result-stage { background: #f1f3f4; border-color: #e1e6e9; }
.stage img { max-width: 100%; max-height: 100%; width: 100%; height: 100%; object-fit: contain; }
.drop, .empty { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: 18px; text-align: center; color: #4c5d55; }
.drop { position: absolute; inset: 16px; border: 1px dashed #9fb7ac; border-radius: 5px; cursor: pointer; }
.drop strong { color: #215b4e; }
.drop span, .empty span { font-size: 14px; }
.drop svg, .empty svg { width: 28px; height: 28px; margin-bottom: 5px; }
.over, .drop:hover { background: #e1efe8; }
.stage:focus-within { outline: 2px solid #297866; outline-offset: 2px; }
.file-input { position: absolute; width: 1px; height: 1px; clip-path: inset(50%); }
.panel-actions { min-height: 64px; padding: 10px 12px; display: flex; align-items: center; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
button, .primary, .secondary { display: inline-flex; min-height: 40px; padding: 7px 14px; align-items: center; justify-content: center; gap: 7px; border: 1px solid transparent; border-radius: 5px; font: inherit; font-size: 15px; font-weight: 600; text-decoration: none; cursor: pointer; }
.primary { background: #236859; color: #fff; }
.primary:hover { background: #184f43; }
.primary:disabled { cursor: default; background: #e2e9e4; color: #52665c; }
.secondary { color: #245c50; border-color: #c1d4c9; background: #fff; }
.secondary:hover { background: #edf5f0; }
.status { min-height: 24px; margin-top: 14px; color: #495a52; }
#login { max-width: 400px; margin: 55px auto; }
.login-form { display: grid; gap: 12px; margin-top: 23px; }
.login-form input { font: inherit; padding: 10px 12px; border: 1px solid #a6b8ae; border-radius: 5px; min-width: 0; background: #fff; color: inherit; }
.error { min-height: 22px; color: #9b3027; }
:focus-visible { outline: 2px solid #297866; outline-offset: 3px; }
@media (max-width: 650px) {
  .top-inner, main { width: calc(100% - 28px); }
  main { margin-block: 26px; }
  h1 { font-size: 30px; }
  .work-grid { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .stage { height: 280px; }
  .access { font-size: 13px; }
}
