:root {
  color-scheme: light;
  --ink: #1f342d;
  --muted: #64736c;
  --line: #d8dfda;
  --paper: #f7f7f3;
  --panel: #ffffff;
  --green: #69a525;
  --blue: #1ea7d8;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  color: var(--ink);
  background: #e9ece8;
}

button,
input {
  font: inherit;
}

.app {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  min-height: 100vh;
}

.viewer-panel {
  position: relative;
  overflow: hidden;
  min-height: 520px;
  background:
    radial-gradient(circle at 48% 28%, rgba(255, 255, 255, 0.96), transparent 32%),
    linear-gradient(145deg, #d7dcd8 0%, #f7f7f4 52%, #cfd6d2 100%);
}

#viewer {
  display: block;
  width: 100%;
  height: 100%;
}

.status {
  position: absolute;
  left: 24px;
  bottom: 24px;
  max-width: min(520px, calc(100% - 48px));
  padding: 10px 12px;
  border: 1px solid rgba(31, 52, 45, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.82);
  color: var(--muted);
  font-size: 14px;
  backdrop-filter: blur(10px);
}

.controls {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 28px;
  border-left: 1px solid var(--line);
  background: var(--panel);
}

.brand {
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
}

.mark {
  display: block;
  margin-bottom: 16px;
  color: var(--green);
  font-size: 36px;
  font-weight: 800;
  letter-spacing: 0;
}

h1 {
  margin: 0;
  font-size: 30px;
  line-height: 1.05;
  letter-spacing: 0;
}

p {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.45;
}

.upload {
  display: grid;
  place-items: center;
  min-height: 96px;
  padding: 18px;
  border: 1px dashed var(--blue);
  border-radius: 8px;
  background: #f4fbfd;
  color: #136a88;
  font-weight: 700;
  text-align: center;
  cursor: pointer;
}

.upload input {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  opacity: 0;
  pointer-events: none;
}

.button-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

button {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  color: var(--ink);
  font-weight: 700;
  cursor: pointer;
}

button:hover {
  border-color: #aeb9b2;
  background: #eef1ed;
}

.switch {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
}

.switch input {
  inline-size: 18px;
  block-size: 18px;
  accent-color: var(--green);
}

.readout {
  display: grid;
  gap: 8px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
}

.readout strong {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0;
}

.readout span {
  color: var(--muted);
  line-height: 1.45;
  overflow-wrap: anywhere;
}

@media (max-width: 860px) {
  .app {
    grid-template-columns: 1fr;
  }

  .viewer-panel {
    min-height: 62vh;
  }

  .controls {
    border-left: 0;
    border-top: 1px solid var(--line);
  }
}
