:root {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Yu Gothic', sans-serif;
  color: #142b37;
  background: #eef3f4;
  line-height: 1.7;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
main {
  max-width: 860px;
  margin: 36px auto;
  padding: 32px;
  background: #fff;
  border: 1px solid #dae3e6;
  border-radius: 16px;
}
header {
  border-bottom: 1px solid #dce5e9;
  padding-bottom: 16px;
  margin-bottom: 24px;
}
h1 {
  font-size: 1.65rem;
  line-height: 1.4;
  margin: 8px 0;
}
h2 {
  font-size: 1.15rem;
  margin: 0 0 14px;
}
p {
  margin: 10px 0;
}
section {
  margin-top: 24px;
}
label {
  display: block;
  font-weight: 600;
  margin: 14px 0 6px;
}
input,
textarea {
  font: inherit;
  width: 100%;
  padding: 10px;
  border: 1px solid #8eabb8;
  border-radius: 6px;
  background: white;
}
input[type='number'] {
  max-width: 140px;
}
input[type='checkbox'] {
  width: auto;
  margin-right: 8px;
}
textarea {
  min-height: 104px;
  overflow-wrap: anywhere;
}
button,
.button {
  font: inherit;
  display: inline-block;
  border: 0;
  padding: 10px 18px;
  border-radius: 6px;
  background: #086a78;
  color: white;
  text-decoration: none;
  cursor: pointer;
  margin: 12px 8px 0 0;
}
button:disabled {
  opacity: 0.5;
  cursor: wait;
}
.secondary {
  background: #e4ecef;
  color: #243c48;
}
.danger {
  background: #9e3b3b;
}
a {
  color: #075e77;
}
small,
.note {
  color: #49616d;
  font-size: 0.91rem;
}
.badge {
  font-size: 0.8rem;
  border-radius: 20px;
  background: #e8f4f2;
  padding: 4px 10px;
  color: #12584d;
}
#status {
  padding: 16px;
  background: #eef5f7;
  border-left: 4px solid #086a78;
  margin: 22px 0;
  overflow-wrap: anywhere;
}
#image {
  display: block;
  max-width: 100%;
  height: auto;
  border: 1px solid #dce5e9;
  margin: 20px auto;
}
[hidden] {
  display: none !important;
}
summary {
  cursor: pointer;
  font-weight: 600;
}
:focus-visible {
  outline: 3px solid #dc9400;
  outline-offset: 3px;
}
@media (max-width: 600px) {
  main {
    margin: 0;
    padding: 22px 18px;
    border: 0;
    border-radius: 0;
  }
}

pre {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font: inherit;
  font-size: 0.9rem;
}

#preview {
  display: block;
  max-width: 100%;
  max-height: 50vh;
  object-fit: contain;
  margin: 1rem 0;
}
#preview[hidden] {
  display: none;
}

main {
  max-width: 1100px;
}
.capture-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}
select {
  font: inherit;
  padding: 8px;
  border: 1px solid #8eabb8;
  border-radius: 6px;
  max-width: 100%;
}
.capture-controls label {
  margin: 5px 0;
}
.annotation-tools label {
  margin: 0;
}
.annotation-tools input[type='checkbox'] {
  width: auto;
}
.annotation-tools button {
  margin: 2px 0;
}
.stage {
  max-height: 65vh;
  overflow: auto;
  background: #e4ecef;
  padding: 10px;
}
.canvas-wrap {
  position: relative;
  margin: 0 auto;
}
.canvas-wrap canvas {
  display: block;
  width: 100%;
  height: auto;
  touch-action: none;
}
.annotation-panel select {
  font-size: 0.85rem;
}
#editing h2 {
  margin-top: 16px;
}
.annotation-tools button[aria-pressed='true'] {
  background: #16483f;
  outline: 3px solid #dca84c;
  outline-offset: 2px;
}
.canvas-wrap.editing canvas {
  cursor: crosshair;
}
