* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: "Segoe UI", "Meiryo", sans-serif;
  background: #f4f6f8;
  color: #222;
}
.header {
  background: #1a365d;
  color: #fff;
}
.header-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.logo {
  color: #fff;
  text-decoration: none;
  font-weight: 700;
}
.header nav a {
  color: #dbeafe;
  text-decoration: none;
  margin-left: 14px;
  font-size: 14px;
}
.header nav a.nav-download {
  color: #5eead4;
  font-weight: 700;
}
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 24px 20px 48px;
}
h1 { margin-top: 0; }
.muted { color: #666; }
.flash {
  padding: 10px 14px;
  border-radius: 6px;
  margin-bottom: 16px;
}
.flash-success { background: #d1fae5; color: #065f46; }
.flash-error { background: #fee2e2; color: #991b1b; }
.login-box {
  max-width: 420px;
  margin: 60px auto;
  background: #fff;
  padding: 28px;
  border-radius: 10px;
  box-shadow: 0 2px 12px rgba(0,0,0,.08);
}
.login-box label {
  display: block;
  margin-bottom: 14px;
  font-size: 14px;
}
.login-box input {
  width: 100%;
  margin-top: 6px;
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 6px;
}
button, .btn {
  display: inline-block;
  background: #2563eb;
  color: #fff;
  border: none;
  padding: 10px 16px;
  border-radius: 6px;
  cursor: pointer;
  text-decoration: none;
  font-size: 14px;
}
.btn-secondary { background: #64748b; }
.btn-outline {
  background: #fff;
  color: #334155;
  border: 1px solid #cbd5e1;
}
.btn-download {
  background: #0f766e;
  color: #fff;
}
.btn-download:hover { background: #115e59; color: #fff; }
button.danger, .danger { background: #dc2626; }
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px;
  margin-bottom: 20px;
}
.card {
  background: #fff;
  border-radius: 8px;
  padding: 16px;
  box-shadow: 0 1px 4px rgba(0,0,0,.06);
  border-top: 3px solid #0f766e;
}
.card-label { font-size: 12px; color: #666; }
.card-value { font-size: 22px; font-weight: 700; margin-top: 6px; }
.card-value.small { font-size: 14px; font-weight: 400; word-break: break-all; }
.panel {
  background: #fff;
  padding: 16px;
  border-radius: 8px;
  margin-bottom: 20px;
}
table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
}
th, td {
  border-bottom: 1px solid #e5e7eb;
  padding: 10px 12px;
  text-align: left;
  vertical-align: middle;
}
th { background: #f8fafc; font-size: 13px; }
.url-cell {
  max-width: 320px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
}
.hit { color: #059669; font-weight: 700; }
.miss { color: #dc2626; font-weight: 700; }
.inline-form, .row-form {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}
.inline-form input, .row-form input, table input, table select {
  padding: 8px;
  border: 1px solid #ccc;
  border-radius: 6px;
}
.wide { min-width: 280px; flex: 1; }
.actions { white-space: nowrap; }
.info-list {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 8px 16px;
}
.info-list dt { color: #666; }
.info-list dd { margin: 0; }

.small { font-size: 13px; }
.panel-compact { padding: 12px 14px; }
.panel-compact h2 { margin: 0 0 8px; font-size: 15px; }
.toolbar { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.upload-form {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}
.checkbox-label {
  font-size: 13px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.btn-small {
  padding: 5px 10px;
  font-size: 12px;
}
.compact-form input { padding: 5px 8px; font-size: 13px; }
.table-wrap { overflow-x: auto; }
.table-compact th,
.table-compact td {
  padding: 4px 8px;
  font-size: 13px;
  vertical-align: middle;
}
.table-compact input {
  padding: 4px 6px;
  font-size: 13px;
  border: 1px solid #ccc;
  border-radius: 4px;
  width: 100%;
}
.col-id { width: 48px; }
.col-num { width: 56px; }
.col-serial { width: 72px; }
.col-actions { width: 130px; }
.col-name { min-width: 180px; }
.col-url { min-width: 260px; }
.col-machine { min-width: 220px; }
.input-name { min-width: 160px; }
.input-url { min-width: 240px; }
.actions-row {
  display: flex;
  gap: 6px;
  align-items: center;
}
.inline-delete { display: inline; margin: 0; }

.ac-wrap { position: relative; }
.ac-input {
  width: 100%;
  padding: 4px 6px;
  font-size: 13px;
  border: 1px solid #ccc;
  border-radius: 4px;
}
.ac-list {
  display: none;
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  z-index: 20;
  max-height: 220px;
  overflow-y: auto;
  background: #fff;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  box-shadow: 0 4px 12px rgba(0,0,0,.12);
}
.ac-item {
  display: block;
  width: 100%;
  text-align: left;
  background: #fff;
  color: #222;
  border: none;
  border-bottom: 1px solid #f1f5f9;
  padding: 6px 8px;
  font-size: 13px;
  cursor: pointer;
}
.ac-input.ac-valid {
  border-color: #86efac;
}
.ac-input.ac-invalid {
  border-color: #dc2626;
  background: #fef2f2;
}
.ac-error-msg {
  color: #dc2626;
  font-size: 11px;
  line-height: 1.3;
  margin-top: 2px;
  min-height: 14px;
}
.ac-wrap-error .ac-input {
  border-color: #dc2626;
}

.schedule-bulk-form {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 16px;
  align-items: flex-end;
}
.schedule-bulk-form label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 13px;
}
.schedule-bulk-form input[type="datetime-local"] {
  padding: 6px 8px;
  font-size: 13px;
  border: 1px solid #ccc;
  border-radius: 4px;
}
.schedule-machine-label {
  min-width: 240px;
}
.schedule-row-form {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: flex-start;
}
.schedule-row-form input[type="datetime-local"] {
  padding: 4px 6px;
  font-size: 13px;
  border: 1px solid #ccc;
  border-radius: 4px;
  width: auto;
}
.schedule-row-form .ac-wrap {
  min-width: 180px;
  flex: 1;
}
.inline-cancel {
  display: inline;
  margin: 0;
}
.muted.small {
  font-size: 12px;
}
.hidden-form {
  display: none;
}
.schedule-bulk-form label,
.panel-compact label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 13px;
  max-width: 280px;
}
.panel-compact input[type="datetime-local"] {
  padding: 6px 8px;
  font-size: 13px;
  border: 1px solid #ccc;
  border-radius: 4px;
}
.schedule-top-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 16px;
  align-items: flex-end;
}
.autosave-status {
  min-height: 1.4em;
  margin: 0 0 10px;
  font-size: 13px;
  color: #0f766e;
}
.autosave-status.is-error {
  color: #b91c1c;
}

.units-form-with-sticky {
  padding-bottom: 72px;
}
.number-skip-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
  margin: 0 0 14px;
  padding: 10px 12px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
}
.number-skip-label {
  font-size: 13px;
  font-weight: 700;
  color: #334155;
}
.number-skip-opt {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: #334155;
  cursor: pointer;
}

.units-sticky-bar {
  position: sticky;
  bottom: 0;
  z-index: 20;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 16px;
  margin-top: 12px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.96);
  border-top: 1px solid #e2e8f0;
  box-shadow: 0 -4px 12px rgba(15, 23, 42, 0.06);
}
.units-sticky-hint {
  font-size: 13px;
  color: #64748b;
}

.table-units th,
.table-units td {
  padding: 2px 6px;
  font-size: 13px;
  line-height: 1.2;
  vertical-align: middle;
}
.table-units thead th {
  position: sticky;
  top: 0;
  z-index: 5;
  background: #f8fafc;
  box-shadow: 0 1px 0 #e2e8f0;
}
.table-units .col-num {
  width: 44px;
  text-align: center;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.table-units .col-test {
  width: 118px;
  text-align: center;
}
.table-units .ac-input {
  padding: 3px 6px;
  font-size: 13px;
  min-height: 28px;
}
.table-units .ac-error-msg {
  min-height: 0;
  font-size: 10px;
  margin-top: 0;
}
.table-units .ac-error-msg:empty {
  display: none;
}
.unit-check {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 0;
}
.unit-check .btn-small {
  padding: 3px 8px;
  font-size: 12px;
}

.qr-modal[hidden] {
  display: none !important;
}
.qr-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.qr-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
}
.qr-modal-panel {
  position: relative;
  z-index: 1;
  width: min(360px, 100%);
  background: #fff;
  border-radius: 10px;
  padding: 20px 18px;
  text-align: center;
  box-shadow: 0 12px 40px rgba(15, 23, 42, 0.25);
}
.qr-modal-title {
  margin: 0 0 12px;
  font-size: 20px;
}
.qr-modal-img {
  display: block;
  width: 240px;
  height: auto;
  max-width: 100%;
  margin: 0 auto 10px;
  image-rendering: pixelated;
  border: 1px solid #e2e8f0;
  border-radius: 4px;
  background: #fff;
}
body.qr-modal-open {
  overflow: hidden;
}

.stats-panel h2 {
  margin-top: 0;
  font-size: 16px;
}
.stats-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}
.stats-filter {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
  margin: 0 0 10px;
}
.stats-filter-range.is-hidden { display: none; }
.stats-filter input[type="date"],
.stats-filter input[type="month"],
.stats-filter select {
  padding: 6px 8px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
}
.stats-tab {
  background: #e2e8f0;
  color: #334155;
  border: none;
  padding: 8px 14px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 13px;
}
.stats-tab.is-active {
  background: #1a365d;
  color: #fff;
}
.stats-pane {
  display: block;
}
.stats-pane[hidden] {
  display: none !important;
}
.vbar-chart {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  min-height: 220px;
  padding: 8px 4px 0;
  margin-bottom: 18px;
  border-bottom: 1px solid #cbd5e1;
  overflow-x: auto;
}
.vbar-col {
  flex: 1 1 0;
  min-width: 40px;
  max-width: 72px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
}
.vbar-count {
  font-size: 11px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: #334155;
  white-space: nowrap;
}
.vbar-track {
  width: 100%;
  max-width: 36px;
  height: 160px;
  background: transparent;
  border-radius: 4px 4px 0 0;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}
.vbar-col.is-empty .vbar-track {
  background: transparent;
}
.vbar-fill {
  width: 100%;
  background: linear-gradient(#2dd4bf, #0f766e);
  border-radius: 4px 4px 0 0;
  min-height: 2px;
}
.vbar-col.is-empty .vbar-count {
  color: #94a3b8;
  font-weight: 400;
}
.vbar-label {
  font-size: 11px;
  color: #64748b;
  text-align: center;
  line-height: 1.25;
  word-break: break-all;
}
.stats-split {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  align-items: stretch;
  margin-top: 8px;
}
.stats-split-col {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
}
.stats-split-col .stats-sub {
  margin-top: 0;
}
.stats-split-scroll {
  flex: 1 1 auto;
  min-height: 320px;
  overflow: auto;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #fff;
}
.stats-split-scroll .stats-table,
.stats-split-scroll .machine-stats-table {
  margin: 0;
}
.stats-split-scroll thead th {
  position: sticky;
  top: 0;
  background: #fff;
  z-index: 1;
}
.stats-table {
  width: 100%;
  max-width: none;
}
@media (min-width: 900px) {
  .stats-split {
    grid-template-columns: minmax(220px, 280px) minmax(0, 1fr);
  }
}
.stats-table th,
.stats-table td {
  text-align: left;
}
.stats-table td.num {
  text-align: right;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  font-size: 15px;
}
.stats-sub { margin: 28px 0 8px; font-size: 16px; }
.kind-totals { margin: 0 0 8px; font-size: 14px; }
.kind-filter { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 12px; }
.kind-filter .js-kind-filter.is-on {
  background: #0f766e;
  color: #fff;
  border-color: #0f766e;
}
.sort-btn {
  background: none;
  border: none;
  padding: 0;
  color: inherit;
  font: inherit;
  cursor: pointer;
  text-decoration: underline;
}
.machine-stats-table { width: 100%; max-width: 100%; }
.machine-stats-table td.num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.hbar-track {
  height: 8px;
  background: #e2e8f0;
  border-radius: 99px;
  overflow: hidden;
  min-width: 80px;
}
.hbar-fill {
  height: 100%;
  background: #0f766e;
}

.guide h1 { margin-bottom: 8px; }
.guide-toc h2 { margin: 0 0 8px; font-size: 15px; }
.guide-toc ol { margin: 0; padding-left: 1.3em; }
.guide-toc a { color: #1d4ed8; }
.guide-section { margin-top: 16px; }
.guide-section h2 { margin-top: 0; font-size: 18px; }
.guide-section h3 { font-size: 15px; margin: 18px 0 8px; }
.guide-steps { padding-left: 1.3em; }
.guide-steps li { margin-bottom: 6px; line-height: 1.5; }
.guide-important {
  border-left: 4px solid #dc2626;
}
.guide-callout {
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 6px;
  padding: 10px 12px;
}
.guide-table { width: 100%; margin-top: 8px; }
.guide-table th,
.guide-table td {
  text-align: left;
  vertical-align: top;
}
.guide-axes {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin: 14px 0;
}
@media (min-width: 720px) {
  .guide-axes {
    grid-template-columns: 1fr 1fr;
  }
}
.guide-axis {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 12px;
}
.guide-axis-title {
  margin: 0 0 8px;
  font-size: 14px;
  font-weight: 700;
  color: #1a365d;
}
.guide-flow {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 14px 0;
}
.guide-flow-single {
  margin: 0;
}
.guide-flow-step {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 10px 12px;
  min-width: 120px;
  text-align: center;
  flex: 1 1 110px;
}
.guide-flow-step p { margin: 6px 0 0; font-size: 13px; }
.guide-flow-icon {
  display: inline-block;
  min-width: 42px;
  padding: 6px 8px;
  border-radius: 6px;
  background: #1a365d;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
}
.guide-flow-arrow {
  color: #64748b;
  font-weight: 700;
}
.guide-figure {
  margin: 12px 0;
  padding: 12px;
  background: #f8fafc;
  border: 1px dashed #cbd5e1;
  border-radius: 8px;
}
.guide-mock-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 8px 10px;
  font-size: 13px;
}
.guide-mock-num {
  font-weight: 700;
  width: 28px;
  text-align: center;
}
.guide-mock-input {
  flex: 1;
  min-width: 140px;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  padding: 4px 8px;
  color: #94a3b8;
}
.guide-mock-btns {
  font-size: 12px;
  color: #475569;
}
.guide-figure-qr {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
}
.guide-qr-card {
  text-align: center;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 12px 16px;
}
.guide-qr-num {
  font-size: 28px;
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 4px;
}
.guide-qr-box {
  position: relative;
  width: 120px;
  height: 120px;
  margin: 0 auto 6px;
  background: #fff;
  border: 1px solid #94a3b8;
  overflow: hidden;
}
.guide-qr-noise {
  position: absolute;
  inset: 18px;
  background-image:
    radial-gradient(#111 1.2px, transparent 1.3px),
    radial-gradient(#111 1px, transparent 1.1px);
  background-size: 7px 7px, 11px 11px;
  background-position: 0 0, 3px 5px;
  opacity: 0.85;
}
.guide-qr-finder {
  position: absolute;
  width: 22px;
  height: 22px;
  border: 3px solid #111;
  box-shadow: inset 0 0 0 3px #fff, inset 0 0 0 7px #111;
  background: #fff;
}
.guide-qr-finder-tl { top: 4px; left: 4px; }
.guide-qr-finder-tr { top: 4px; right: 4px; }
.guide-qr-finder-bl { bottom: 4px; left: 4px; }
.guide-qr-caption {
  margin: 4px 0 0;
  font-size: 11px;
  color: #b45309;
  font-weight: 600;
  line-height: 1.35;
}
.guide-note-list {
  margin: 0;
  padding-left: 1.2em;
  font-size: 13px;
  line-height: 1.6;
}
.guide-figure-place {
  text-align: center;
}
.guide-machine {
  display: inline-block;
  width: 180px;
  border: 2px solid #334155;
  border-radius: 8px;
  overflow: hidden;
  background: #e2e8f0;
}
.guide-machine-label {
  background: #1a365d;
  color: #fff;
  font-size: 12px;
  padding: 6px;
}
.guide-machine-body {
  height: 110px;
  position: relative;
  background: linear-gradient(180deg, #cbd5e1, #94a3b8);
}
.guide-sticker {
  position: absolute;
  right: 10px;
  bottom: 10px;
  width: 52px;
  background: #fff;
  border: 1px solid #64748b;
  border-radius: 4px;
  padding: 4px;
  text-align: center;
  font-size: 14px;
  font-weight: 700;
  box-shadow: 0 2px 6px rgba(0,0,0,.15);
}
.guide-sticker i {
  display: block;
  width: 36px;
  height: 36px;
  margin: 2px auto 0;
  position: relative;
  background: #fff;
  border: 1px solid #64748b;
  background-image:
    radial-gradient(#111 0.8px, transparent 0.9px);
  background-size: 4px 4px;
}
.guide-sticker i::before,
.guide-sticker i::after {
  content: "";
  position: absolute;
  width: 8px;
  height: 8px;
  border: 1.5px solid #111;
  box-shadow: inset 0 0 0 1.5px #fff, inset 0 0 0 3px #111;
}
.guide-sticker i::before { top: 2px; left: 2px; }
.guide-sticker i::after { top: 2px; right: 2px; }
.guide-footer { margin-top: 20px; }
.ops-create { margin: 16px 0 20px; }
.ops-create-form {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: flex-end;
}
.ops-create-form label {
  display: flex;
  flex-direction: column;
  font-size: 13px;
  gap: 4px;
}
.ops-create-form input { min-width: 140px; padding: 8px; }
.ops-issued {
  background: #fffbeb;
  border: 1px solid #f59e0b;
  border-radius: 8px;
  padding: 14px 16px;
  margin: 12px 0 18px;
}
.ops-issued h2 { margin: 0 0 6px; font-size: 16px; }
.ops-issued dl {
  display: grid;
  grid-template-columns: 8em 1fr;
  gap: 6px 12px;
  margin: 10px 0 0;
}
.ops-issued dt { color: #64748b; }
.ops-issued dd { margin: 0; font-weight: 700; }
.ops-rename { display: flex; gap: 6px; align-items: center; flex-wrap: nowrap; }
.ops-rename input { min-width: 120px; }
.ops-cell-nowrap {
  white-space: nowrap;
  vertical-align: middle;
}
.ops-add-units {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  margin: 0;
  flex-wrap: nowrap;
}
.ops-add-units input {
  width: 4em;
  padding: 4px 6px;
}
.ops-inline {
  display: inline-flex;
  align-items: center;
  margin: 0 0 0 6px;
  vertical-align: middle;
}
.ops-actions { white-space: nowrap; }
.ops-actions form { display: inline-block; margin: 0 4px 0 0; }

.status-badge {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}
.status-active {
  background: #d1fae5;
  color: #065f46;
}
.status-stopped {
  background: #fee2e2;
  color: #991b1b;
}
.help-steps {
  margin: 0 0 14px;
  padding-left: 1.2em;
}
.help-steps li { margin: 6px 0; }
.machine-csv-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 10px 0;
}
.bulk-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin: 0 0 10px;
}

.logo-shape-row label {
  margin-right: 16px;
}
.logo-preview-row {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  margin: 16px 0;
  align-items: flex-start;
}
.logo-preview-row figure {
  margin: 0;
  text-align: center;
}
.logo-preview-row figcaption {
  margin-top: 6px;
  color: #64748b;
  font-size: 13px;
}
.logo-viewport {
  width: 280px;
  height: 280px;
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(45deg, #cbd5e1 25%, transparent 25%) 0 0 / 16px 16px,
    linear-gradient(45deg, transparent 75%, #cbd5e1 75%) 0 0 / 16px 16px,
    linear-gradient(45deg, transparent 75%, #cbd5e1 75%) 8px 8px / 16px 16px,
    linear-gradient(45deg, #cbd5e1 25%, #e2e8f0 25%) 8px 8px / 16px 16px;
  border: 1px solid #cbd5e1;
  cursor: grab;
  touch-action: none;
  user-select: none;
}
.logo-viewport.is-empty::after {
  content: "画像を選ぶとここに表示されます";
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  text-align: center;
  color: #475569;
  font-size: 13px;
  pointer-events: none;
}
.logo-viewport.is-dragging { cursor: grabbing; }
.logo-viewport.is-circle { border-radius: 50%; }
.logo-viewport img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 50%;
  transform-origin: 50% 50%;
  pointer-events: none;
}
.logo-viewport img.is-blank { display: none; }
.qr-live {
  position: relative;
  display: inline-block;
  background: #fff;
  border: 1px solid #e2e8f0;
}
.qr-live > img {
  display: block;
  width: 240px;
  height: auto;
}
.logo-viewport-on-qr {
  position: absolute;
  left: 50%;
  top: 58%;
  width: 31%;
  height: auto;
  aspect-ratio: 1 / 1;
  transform: translate(-50%, -50%);
  border: 2px solid #fff;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.15);
  cursor: default;
}
.logo-viewport-on-qr.size-small { width: 24%; }
.logo-viewport-on-qr.size-medium { width: 31%; }
.logo-viewport-on-qr.size-large { width: 38%; }
