:root {
  font-family:system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI","Noto Sans JP",sans-serif;
  color:#263348;
  background:#f3f5f9;
  font-synthesis:none;
  --blue:#2563eb;
  --line:#e5eaf1
}
* {
  box-sizing:border-box
}
body {
  margin:0
}
button,input,select {
  font:inherit
}
button {
  cursor:pointer;
  transition:background .15s;
  border:1px solid var(--line);
  border-radius:7px;
  background:#fff;
  color:#41516a;
  font-size:12px;
  font-weight:600;
  padding:9px 12px
}
button:disabled {
  cursor:default;
  opacity:.45
}
button:focus-visible,input:focus-visible,select:focus-visible {
  outline:3px solid #93b4fa;
  outline-offset:3px
}
button:hover:not(:disabled) {
  background:#eff4ff
}
h1,h2,h3,p {
  margin:0
}
.app-header {
  height:94px;
  padding:0 36px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  border-bottom:1px solid var(--line);
  background:#fff
}
.brand {
  display:flex;
  align-items:center;
  gap:13px
}
.brand-icon {
  display:grid;
  place-items:center;
  width:40px;
  height:40px;
  background:var(--blue);
  color:#fff;
  border-radius:11px;
  font-size:30px
}
.brand h1 {
  font-size:20px;
  letter-spacing:-.6px
}
.version {
  vertical-align:middle;
  background:#eef3ff;
  color:var(--blue);
  font-size:10px;
  padding:3px 6px;
  border-radius:5px;
  margin-left:6px;
  letter-spacing:0
}
.brand p {
  font-size:11px;
  color:#8490a1;
  margin-top:5px
}
.privacy {
  font-size:11px;
  color:#7a8798
}
.workspace {
  display:grid;
  grid-template-columns:minmax(0,1fr) 355px;
  gap:24px;
  padding:26px 30px;
  height:calc(100dvh - 94px);
  min-height:520px;
  max-width:1800px;
  margin:auto
}
.preview-panel {
  min-width:0;
  display:flex;
  flex-direction:column
}
.preview-toolbar {
  display:flex;
  justify-content:space-between;
  align-items:center;
  padding:0 3px 17px
}
.eyebrow {
  font-size:9px;
  font-weight:700;
  letter-spacing:1.7px;
  color:#929dae
}
h2 {
  font-size:16px;
  margin-top:4px
}
.source-info {
  font-size:11px;
  color:#8993a2;
  padding:0 3px 15px;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap
}
.preview-stage {
  flex:1;
  min-height:220px;
  min-width:0;
  border:1px dashed #cbd5e2;
  border-radius:12px;
  position:relative;
  display:flex;
  align-items:center;
  justify-content:center;
  overflow:hidden;
  background:#fafbfd
}
.preview-stage.has-image {
  border:1px solid #dfe5ee;
  background-color:#f8fafc;
  background-image:linear-gradient(45deg,#edf0f5 25%,transparent 25%),linear-gradient(-45deg,#edf0f5 25%,transparent 25%),linear-gradient(45deg,transparent 75%,#edf0f5 75%),linear-gradient(-45deg,transparent 75%,#edf0f5 75%);
  background-size:20px 20px;
  background-position:0 0,0 10px,10px -10px,-10px 0
}
canvas {
  display:block;
  box-shadow:0 5px 25px #24375916;
  max-width:calc(100% - 48px);
  max-height:calc(100% - 48px);
  object-fit:contain
}
canvas[hidden] {
  display:none
}
.empty-state {
  text-align:center;
  padding:24px
}
.upload-icon {
  width:64px;
  height:64px;
  background:#edf3ff;
  color:var(--blue);
  border-radius:18px;
  font-size:39px;
  margin:0 auto 22px
}
.empty-state h2 {
  font-size:19px;
  margin-bottom:10px
}
.empty-state p {
  font-size:12px;
  color:#909cad;
  margin-bottom:23px
}
.primary {
  background:var(--blue);
  border-color:var(--blue);
  color:white;
  padding:12px 23px
}
.primary:hover:not(:disabled) {
  background:#1b51c9
}
.file-types {
  display:block;
  color:#9ba5b3;
  font-size:10px;
  letter-spacing:1px;
  margin-top:17px
}
.drop-overlay {
  display:none;
  position:absolute;
  inset:0;
  align-items:center;
  justify-content:center;
  background:#edf4fff2;
  color:var(--blue);
  border:2px dashed var(--blue);
  border-radius:11px;
  font-weight:600;
  pointer-events:none
}
.dragging .drop-overlay {
  display:flex
}
.preview-caption {
  display:flex;
  justify-content:space-between;
  font-size:10px;
  color:#939daf;
  padding:13px 2px
}
.message {
  font-size:12px;
  color:#b45309;
  min-height:22px;
  padding:0 2px 7px
}
.status-bar {
  display:flex;
  gap:11px;
  align-items:center;
  background:white;
  border:1px solid var(--line);
  border-radius:8px;
  padding:15px;
  font-size:11px;
  color:#586780
}
.status-dot {
  height:6px;
  width:6px;
  border-radius:50%;
  background:#85a0cc
}
.status-separator {
  height:13px;
  border-left:1px solid var(--line)
}
.file-size {
  margin-left:auto;
  color:#8b97a8
}
.settings-panel {
  min-height:0;
  display:flex;
  flex-direction:column;
  background:#fff;
  border:1px solid var(--line);
  border-radius:12px;
  overflow:hidden;
  box-shadow:0 3px 10px #24375904
}
.settings-heading {
  display:flex;
  justify-content:space-between;
  align-items:center;
  padding:20px 21px 17px;
  border-bottom:1px solid var(--line)
}
.text-button {
  padding:7px 0;
  color:#8290a4;
  background:transparent;
  border:0;
  font-size:11px
}
.settings-scroll {
  overflow-y:auto;
  min-height:0;
  flex:1;
  margin:0;
  border:0;
  padding:0 19px;
  scrollbar-width:thin;
  scrollbar-color:#d6deea transparent
}
.setting-card {
  padding:21px 1px;
  border-bottom:1px solid var(--line)
}
.setting-card:last-child {
  border-bottom:0
}
.setting-card h3 {
  font-size:12px;
  display:flex;
  align-items:center;
  gap:9px;
  margin-bottom:17px
}
.setting-card h3>span {
  font-size:9px;
  color:#8b9bb3;
  background:#f0f4fa;
  border-radius:4px;
  padding:4px 5px
}
.dimensions {
  display:flex;
  gap:11px;
  align-items:end
}
.dimensions label {
  flex:1;
  min-width:0;
  font-size:11px;
  font-weight:600;
  color:#6d7c91
}
.unit-input {
  display:flex;
  align-items:center;
  border:1px solid #dce3ed;
  border-radius:7px;
  margin-top:7px;
  padding-right:11px
}
.unit-input input {
  width:100%;
  min-width:0;
  border:0;
  padding:10px;
  background:transparent;
  color:#263348;
  font-size:16px;
  font-weight:600
}
.unit-input span {
  font-size:10px;
  color:#9aa5b5
}
.times {
  color:#a3adbb;
  margin-bottom:12px
}
.check-label {
  display:flex;
  align-items:center;
  gap:7px;
  font-size:11px;
  margin-top:14px;
  color:#61728b
}
input[type=checkbox],input[type=radio] {
  accent-color:var(--blue)
}
.field-label {
  display:block;
  font-size:11px;
  color:#718098;
  margin:18px 0 8px
}
.field-label span {
  float:right;
  color:#a0aab8;
  font-size:10px
}
.quick-buttons {
  display:grid;
  grid-template-columns:repeat(4,1fr);
  gap:6px
}
.quick-buttons button {
  font-size:11px;
  padding:8px 3px
}
.preset {
  width:100%;
  display:flex;
  justify-content:space-between;
  background:#f0f5ff;
  border-color:#dbe6ff;
  color:#396ace;
  font-size:11px
}
.fit-options {
  display:grid;
  gap:7px
}
.fit-options label {
  display:flex;
  gap:9px;
  align-items:center;
  padding:9px;
  border:1px solid var(--line);
  border-radius:7px;
  cursor:pointer
}
.fit-options label:has(input:checked) {
  border-color:#90b2f9;
  background:#f5f8ff
}
.fit-options label span {
  display:flex;
  width:100%;
  align-items:center;
  justify-content:space-between
}
.fit-options strong {
  font-size:11px;
  font-weight:600
}
.fit-options small {
  font-size:10px;
  color:#8995a7
}
.color-row {
  display:flex;
  gap:9px
}
.color-row input[type=text] {
  width:100%;
  border:1px solid var(--line);
  border-radius:6px;
  padding:8px 10px;
  font-size:12px;
  color:#65758d
}
input[type=color] {
  width:36px;
  height:34px;
  border:1px solid var(--line);
  border-radius:6px;
  padding:4px;
  background:#fff;
  cursor:pointer;
  flex-shrink:0
}
.range-label {
  display:flex;
  justify-content:space-between;
  font-size:11px;
  color:#718098;
  margin:13px 0 8px
}
output {
  color:var(--blue);
  font-weight:600
}
input[type=range] {
  width:100%;
  margin:3px 0;
  accent-color:var(--blue);
  height:14px
}
.range-hints {
  display:flex;
  justify-content:space-between;
  color:#a4aebc;
  font-size:9px;
  margin-top:4px
}
.border-color-row {
  display:flex;
  align-items:center;
  justify-content:space-between;
  font-size:11px;
  color:#718098;
  margin-top:10px
}
select {
  width:100%;
  background:#fff;
  padding:11px 8px;
  border:1px solid var(--line);
  border-radius:6px;
  color:#52627b;
  font-size:11px
}
.help {
  font-size:10px;
  color:#97a2b2;
  line-height:1.7;
  margin-top:10px
}
#quality-control:has(input:disabled) {
  opacity:.4
}
.save-bar {
  position:sticky;
  bottom:0;
  background:#fff;
  padding:17px 20px 13px;
  border-top:1px solid var(--line);
  box-shadow:0 -5px 14px #20345004
}
.download {
  width:100%;
  font-size:12px
}
.download span {
  font-size:17px;
  margin-right:6px
}
.save-bar p {
  text-align:center;
  margin-top:9px;
  font-size:9px;
  color:#94a0b1;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap
}
fieldset:disabled .setting-card {
  opacity:.55
}
@media(min-width:1500px) {
  .workspace {
    grid-template-columns:minmax(0,1fr) 380px;
    gap:32px;
    padding:30px 40px
  }
  
}
@media(max-width:800px) {
  .app-header {
    height:auto;
    min-height:85px;
    padding:18px 20px;
    gap:14px;
    flex-wrap:wrap
  }
  .privacy {
    font-size:9px
  }
  .workspace {
    height:auto;
    min-height:0;
    grid-template-columns:1fr;
    padding:20px 16px;
    gap:18px
  }
  .preview-stage {
    height:360px;
    flex:none
  }
  .settings-panel {
    max-height:740px
  }
  .settings-scroll {
    flex:auto
  }
  .brand h1 {
    font-size:18px
  }
  .file-size {
    font-size:10px
  }
  .status-bar {
    gap:7px;
    padding:12px
  }
  .preview-caption {
    font-size:9px
  }
  
}
@media(prefers-reduced-motion:reduce) {
  * {
    transition:none!important
  }
  
}

