:root {
  --black: #111318;
  --slate: #1b1f26;
  --slate-raised: #242a34;
  --line: #343c49;
  --line-soft: #2a303a;
  --white: #f0ebdd;
  --muted: #9ba5b4;
  --sea: #78d5c8;
  --amber: #e6b566;
  --coral: #ef7d72;
  --blue: #70a7d9;
  --shadow: 0 24px 64px rgb(0 0 0 / 32%);
  font-family: "Hiragino Sans", "Yu Gothic", sans-serif;
  color: var(--white);
  background: var(--black);
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--black);
}

body {
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(circle at 13% 8%, rgb(112 167 217 / 8%), transparent 28rem),
    var(--black);
}

button,
input {
  font: inherit;
}

button {
  color: inherit;
}

button:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid var(--sea);
  outline-offset: 3px;
}

.calibration-bar {
  position: fixed;
  inset: 0 0 auto;
  z-index: 20;
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  height: 5px;
}

.calibration-bar i:nth-child(1) { background: #d7d5bd; }
.calibration-bar i:nth-child(2) { background: #d4cf65; }
.calibration-bar i:nth-child(3) { background: #62c4c1; }
.calibration-bar i:nth-child(4) { background: #68b46d; }
.calibration-bar i:nth-child(5) { background: #c170b2; }
.calibration-bar i:nth-child(6) { background: #bd665f; }
.calibration-bar i:nth-child(7) { background: #5874b3; }

.app-shell {
  width: min(1480px, calc(100% - 48px));
  margin: 0 auto;
  padding: 76px 0 48px;
}

.app-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 48px;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--line);
}

.eyebrow,
.section-index {
  margin: 0 0 10px;
  color: var(--sea);
  font-family: "SFMono-Regular", "Menlo", monospace;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.16em;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 10px;
  font-family: "Avenir Next", "Hiragino Sans", sans-serif;
  font-size: clamp(2.5rem, 6vw, 5.6rem);
  font-weight: 750;
  letter-spacing: -0.055em;
  line-height: 0.92;
}

h1 span {
  color: var(--amber);
  font-weight: 450;
}

.lead {
  max-width: 680px;
  margin-bottom: 0;
  color: #c6cbd3;
  font-size: clamp(0.95rem, 1.4vw, 1.1rem);
  line-height: 1.8;
}

.privacy-stamp {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 12px;
  max-width: 250px;
  padding: 14px 16px;
  border: 1px solid #36524f;
  background: #14201f;
  color: #b6c7c4;
  font-size: 0.72rem;
  line-height: 1.45;
}

.privacy-stamp b {
  display: block;
  color: var(--sea);
  font-family: "SFMono-Regular", "Menlo", monospace;
  font-size: 0.65rem;
  letter-spacing: 0.08em;
}

.privacy-stamp__lamp {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--sea);
  box-shadow: 0 0 16px rgb(120 213 200 / 55%);
}

.drop-zone {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 24px;
  min-height: 150px;
  margin-top: 34px;
  padding: 28px 32px;
  border: 1px dashed #566170;
  background: rgb(27 31 38 / 82%);
  transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

.drop-zone.is-dragging {
  border-color: var(--sea);
  background: #192724;
  transform: translateY(-2px);
}

.drop-zone__mark {
  display: grid;
  place-items: center;
  width: 84px;
  aspect-ratio: 16 / 9;
  border: 1px solid var(--amber);
  color: var(--amber);
  font-family: "SFMono-Regular", "Menlo", monospace;
  font-size: 0.8rem;
}

.drop-zone h2 {
  margin-bottom: 7px;
  font-family: "Avenir Next", "Hiragino Sans", sans-serif;
  font-size: clamp(1.05rem, 2vw, 1.35rem);
  letter-spacing: -0.02em;
}

.drop-zone p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.82rem;
}

.button,
.icon-button {
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 140ms ease, border-color 140ms ease, color 140ms ease;
}

.button {
  min-height: 44px;
  padding: 10px 16px;
  font-size: 0.85rem;
  font-weight: 700;
}

.button--primary {
  background: var(--sea);
  color: #10201f;
}

.button--primary:hover {
  background: #98e7dc;
}

.button--quiet {
  border-color: var(--line);
  background: var(--slate);
  color: #d9dde2;
}

.button--quiet:hover {
  border-color: #5c6878;
  background: var(--slate-raised);
}

.button--danger {
  border-color: #5b3938;
  background: transparent;
  color: #e9a19a;
}

.button--danger:hover {
  background: #352120;
}

.status {
  min-height: 24px;
  margin: 12px 2px 0;
  color: var(--muted);
  font-size: 0.8rem;
}

.status.is-error {
  color: #f1aaa2;
}

.result-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-top: 36px;
  padding: 18px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.summary-meter {
  display: flex;
  align-items: center;
  gap: 0;
}

.summary-stat {
  min-width: 118px;
  padding: 0 22px;
  border-left: 1px solid var(--line);
}

.summary-stat:first-child {
  padding-left: 0;
  border-left: 0;
}

.summary-stat span {
  display: block;
  margin-bottom: 3px;
  color: var(--muted);
  font-size: 0.68rem;
}

.summary-stat strong {
  font-family: "SFMono-Regular", "Menlo", monospace;
  font-size: 1.25rem;
  font-variant-numeric: tabular-nums;
}

.toolbar-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: end;
  gap: 8px;
}

.coordinate-guide {
  margin-top: 34px;
  padding: 26px;
  border: 1px solid var(--line);
  background:
    linear-gradient(135deg, rgb(112 167 217 / 5%), transparent 42%),
    #0b0d11;
}

.coordinate-guide__heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 28px;
  margin-bottom: 18px;
}

.coordinate-guide__heading h2 {
  margin-bottom: 0;
  font-family: "Avenir Next", "Hiragino Sans", sans-serif;
  font-size: clamp(1.3rem, 2.4vw, 2rem);
  letter-spacing: -0.035em;
}

.coordinate-guide__heading > p {
  margin-bottom: 2px;
  color: var(--muted);
  font-size: 0.76rem;
}

.coordinate-guide__heading > p b {
  color: var(--white);
  font-family: "SFMono-Regular", "Menlo", monospace;
}

.coordinate-guide__scroll {
  width: 100%;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scrollbar-color: #5d6877 #171b21;
}

.coordinate-board {
  display: grid;
  grid-template-columns: repeat(16, 1fr);
  grid-template-rows: repeat(9, 1fr);
  width: min(960px, 100%);
  min-width: 760px;
  aspect-ratio: 16 / 9;
  margin: 0 auto;
  overflow: hidden;
  border: 1px solid #566170;
  background:
    radial-gradient(circle at center, rgb(120 213 200 / 7%), transparent 42%),
    #151920;
}

.coordinate-cell {
  display: grid;
  place-items: center;
  min-width: 0;
  border-right: 1px solid #303844;
  border-bottom: 1px solid #303844;
  color: #aeb7c3;
  font-family: "SFMono-Regular", "Menlo", monospace;
  font-size: clamp(0.54rem, 0.75vw, 0.72rem);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  transition: background 120ms ease, color 120ms ease;
}

.coordinate-cell:hover {
  background: #27313c;
  color: #fff;
}

.coordinate-cell[data-column="6"],
.coordinate-cell[data-column="11"] {
  border-left: 2px solid #687382;
}

.coordinate-cell[data-row="4"],
.coordinate-cell[data-row="7"] {
  border-top: 2px solid #687382;
}

.coordinate-cell--light {
  position: relative;
  z-index: 1;
  border: 2px solid var(--coral);
  background: rgb(239 125 114 / 14%);
  color: #ffd1cd;
  box-shadow: inset 0 0 18px rgb(239 125 114 / 18%);
}

.coordinate-cell--gaze {
  position: relative;
  z-index: 1;
  border: 2px solid #ffd166;
  background: rgb(255 209 102 / 13%);
  color: #ffe9aa;
  box-shadow: inset 0 0 18px rgb(255 209 102 / 18%);
}

.coordinate-guide__legend {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
  margin-top: 14px;
  color: #929dab;
  font-size: 0.68rem;
}

.coordinate-guide__example {
  padding: 4px 7px;
  border: 1px solid var(--coral);
  background: rgb(239 125 114 / 11%);
  color: #ffd1cd;
  font-family: "SFMono-Regular", "Menlo", monospace;
  font-size: 0.62rem;
  font-weight: 800;
}

.coordinate-guide__example--gaze {
  border-color: #ffd166;
  background: rgb(255 209 102 / 10%);
  color: #ffe9aa;
}

.coordinate-guide__note {
  margin: 9px 0 0;
  color: #727d8b;
  font-size: 0.64rem;
  line-height: 1.6;
}

.analysis-section {
  padding: 46px 0 8px;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 32px;
  margin-bottom: 20px;
}

.section-heading h2 {
  margin-bottom: 0;
  font-family: "Avenir Next", "Hiragino Sans", sans-serif;
  font-size: clamp(1.4rem, 2.7vw, 2.35rem);
  letter-spacing: -0.035em;
}

.section-heading > p {
  max-width: 430px;
  margin-bottom: 1px;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.7;
}

.contact-sheet,
.blur-sheet {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(235px, 1fr));
  gap: 22px 14px;
  padding: 20px;
  border: 1px solid var(--line);
  background: #0b0d11;
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / 2%);
}

.blur-analysis {
  padding-bottom: 32px;
}

.blur-sheet {
  background:
    linear-gradient(rgb(11 13 17 / 92%), rgb(11 13 17 / 92%)),
    repeating-linear-gradient(90deg, transparent 0 31px, rgb(120 213 200 / 7%) 31px 32px);
}

.blur-card {
  min-width: 0;
}

.blur-card__image-button {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  overflow: hidden;
  border: 1px solid #353c46;
  background: #090b0e;
  cursor: pointer;
}

.blur-card__image-button:hover {
  border-color: var(--sea);
}

.blur-card__image-button img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.blur-card__meta {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  padding-top: 9px;
}

.blur-card__name {
  overflow: hidden;
  margin: 0;
  color: #dadddf;
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.45;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.blur-card__indicator {
  padding: 3px 6px;
  border: 1px solid rgb(120 213 200 / 36%);
  color: #8edbd1;
  font-family: "SFMono-Regular", "Menlo", monospace;
  font-size: 0.58rem;
  letter-spacing: 0.05em;
}

.thumbnail-card {
  min-width: 0;
}

.thumbnail-card__image-button {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  overflow: hidden;
  border: 1px solid #353c46;
  background: #090b0e;
  cursor: pointer;
}

.thumbnail-card__image-button:hover {
  border-color: var(--sea);
}

.thumbnail-card img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.rank-badge,
.score-badge,
.duration-badge {
  position: absolute;
  font-family: "SFMono-Regular", "Menlo", monospace;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.rank-badge {
  top: 8px;
  left: 8px;
  min-width: 30px;
  padding: 5px 7px;
  background: rgb(17 19 24 / 88%);
  color: var(--white);
  font-size: 0.7rem;
  backdrop-filter: blur(6px);
}

.score-badge {
  top: 8px;
  right: 8px;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid rgb(255 255 255 / 30%);
  border-radius: 50%;
  background: rgb(17 19 24 / 88%);
  color: var(--amber);
  font-size: 0.88rem;
  backdrop-filter: blur(6px);
}

.duration-badge {
  right: 5px;
  bottom: 5px;
  padding: 3px 5px;
  border-radius: 3px;
  background: rgb(0 0 0 / 86%);
  color: #fff;
  font-size: 0.62rem;
}

.thumbnail-card__meta {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  padding-top: 9px;
}

.thumbnail-card__name {
  overflow: hidden;
  margin: 0;
  color: #dadddf;
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.45;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.thumbnail-card__saturation {
  color: var(--muted);
  font-family: "SFMono-Regular", "Menlo", monospace;
  font-size: 0.68rem;
}

.thumbnail-card__spatial {
  grid-column: 1 / -1;
  color: #7f8997;
  font-family: "SFMono-Regular", "Menlo", monospace;
  font-size: 0.61rem;
  letter-spacing: 0.03em;
}

.palette-strip {
  display: flex;
  grid-column: 1 / -1;
  height: 5px;
  overflow: hidden;
  background: var(--line-soft);
}

.palette-strip span {
  min-width: 8px;
  flex-grow: var(--ratio, 1);
}

.detail-palette {
  margin-top: 16px;
  padding: 16px;
  border: 1px solid var(--line);
  background: #11151b;
}

.detail-palette__heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.detail-palette__heading .section-index {
  margin: 0;
}

.detail-palette__heading h3 {
  margin: 0;
  color: #dfe4e8;
  font-family: "Avenir Next", "Hiragino Sans", sans-serif;
  font-size: 0.86rem;
  letter-spacing: -0.02em;
}

.detail-palette__grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 7px;
}

.detail-palette__item {
  min-width: 0;
  overflow: hidden;
  border: 1px solid #3b434e;
  background: #0a0d11;
}

.detail-palette__swatch {
  display: block;
  height: 48px;
  border-bottom: 1px solid rgb(255 255 255 / 20%);
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / 12%);
}

.detail-palette__item b,
.detail-palette__item > span:last-child {
  display: block;
  overflow: hidden;
  padding-inline: 8px;
  font-family: "SFMono-Regular", "Menlo", monospace;
  font-variant-numeric: tabular-nums;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.detail-palette__item b {
  padding-top: 8px;
  color: #e4e8eb;
  font-size: 0.67rem;
}

.detail-palette__item > span:last-child {
  padding-top: 3px;
  padding-bottom: 8px;
  color: #808c99;
  font-size: 0.6rem;
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--line);
  background: var(--slate);
}

table {
  width: 100%;
  min-width: 1540px;
  border-collapse: collapse;
  font-size: 0.78rem;
}

th,
td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line-soft);
  text-align: right;
  white-space: nowrap;
}

th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #202630;
  color: #aeb7c3;
  font-size: 0.68rem;
  font-weight: 700;
}

th:first-child,
td:first-child {
  position: sticky;
  left: 0;
  z-index: 1;
  min-width: 270px;
  text-align: left;
}

th:first-child {
  z-index: 3;
}

td:first-child {
  background: var(--slate);
}

tbody tr:hover td {
  background-color: #222933;
}

tbody tr:hover td:first-child {
  background-color: #222933;
}

.sort-button {
  display: inline-flex;
  align-items: center;
  justify-content: end;
  gap: 5px;
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  cursor: pointer;
}

th:first-child .sort-button {
  justify-content: start;
}

.sort-button::after {
  content: "↕";
  color: #687382;
}

.sort-button[data-active="true"]::after {
  content: attr(data-arrow);
  color: var(--sea);
}

.table-thumb {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  max-width: 360px;
}

.table-thumb img {
  display: block;
  width: 72px;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.table-thumb button {
  overflow: hidden;
  padding: 0;
  border: 0;
  background: none;
  color: #dce0e5;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: pointer;
}

.score-cell {
  color: var(--amber);
  font-family: "SFMono-Regular", "Menlo", monospace;
  font-size: 0.9rem;
  font-weight: 800;
}

.metric-cell {
  font-family: "SFMono-Regular", "Menlo", monospace;
  font-variant-numeric: tabular-nums;
}

.remove-button {
  padding: 5px 8px;
  border: 1px solid transparent;
  background: transparent;
  color: #a5adb8;
  cursor: pointer;
}

.remove-button:hover {
  border-color: #5b3938;
  color: var(--coral);
}

.app-footer {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  margin-top: 42px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  color: #7f8997;
  font-size: 0.7rem;
  line-height: 1.6;
}

.app-footer p {
  margin-bottom: 0;
}

.app-footer b {
  margin-right: 8px;
  color: var(--amber);
  font-family: "SFMono-Regular", "Menlo", monospace;
}

.detail-dialog {
  width: min(1120px, calc(100% - 32px));
  max-height: calc(100vh - 32px);
  padding: 0;
  overflow: auto;
  border: 1px solid #4b5666;
  background: #151920;
  color: var(--white);
  box-shadow: var(--shadow);
}

.detail-dialog::backdrop {
  background: rgb(3 5 8 / 82%);
  backdrop-filter: blur(6px);
}

.dialog-close-row {
  position: sticky;
  top: 0;
  z-index: 8;
  display: flex;
  justify-content: end;
  height: 0;
}

.icon-button {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 0;
  background: #2b323d;
  font-size: 1.5rem;
}

.icon-button:hover {
  background: var(--coral);
  color: #151515;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(300px, 0.65fr);
  gap: 0;
}

.detail-visual {
  min-width: 0;
  padding: 34px;
  background: #090b0e;
}

.detail-visual img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: contain;
  background: #000;
}

.selection-stage {
  position: relative;
  overflow: hidden;
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 1px solid #3c4552;
  background: #000;
  cursor: crosshair;
  touch-action: none;
  user-select: none;
}

.selection-stage img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
}

.duration-safe-area {
  position: absolute;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: end;
  justify-content: end;
  width: 24%;
  height: 22%;
  padding: 7px;
  border: 1px dashed rgb(239 125 114 / 80%);
  background: rgb(239 125 114 / 10%);
  pointer-events: none;
}

.duration-safe-area span {
  padding: 3px 5px;
  border-radius: 3px;
  background: rgb(0 0 0 / 88%);
  color: #fff;
  font-family: "SFMono-Regular", "Menlo", monospace;
  font-size: 0.62rem;
  font-weight: 800;
}

.selection-box {
  position: absolute;
  z-index: 3;
  min-width: 2px;
  min-height: 2px;
  border: 2px solid var(--sea);
  background: rgb(120 213 200 / 12%);
  pointer-events: none;
}

.selection-box--subject {
  border-color: var(--amber);
  background: rgb(230 181 102 / 12%);
}

.selection-box--draft {
  border-style: dashed;
}

.selection-box span {
  position: absolute;
  top: 0;
  left: 0;
  padding: 3px 6px;
  background: var(--sea);
  color: #101715;
  font-size: 0.62rem;
  font-weight: 800;
}

.selection-box--subject span {
  background: var(--amber);
  color: #1f180d;
}

.eyedropper-marker {
  position: absolute;
  z-index: 5;
  width: 20px;
  height: 20px;
  border: 3px solid #fff;
  border-radius: 50%;
  background: var(--picked-color);
  box-shadow: 0 0 0 2px #101318, 0 3px 12px rgb(0 0 0 / 65%);
  pointer-events: none;
  transform: translate(-50%, -50%);
}

.eyedropper-marker > span {
  position: absolute;
  top: 24px;
  left: 50%;
  padding: 3px 6px;
  border: 1px solid #526071;
  background: rgb(9 11 14 / 92%);
  color: #fff;
  font-family: "SFMono-Regular", "Menlo", monospace;
  font-size: 0.58rem;
  font-weight: 800;
  white-space: nowrap;
  transform: translateX(-50%);
}

.region-tools {
  margin-top: 18px;
  padding: 18px;
  border: 1px solid var(--line);
  background: var(--slate);
}

.region-tools__heading {
  margin-bottom: 4px;
  font-size: 0.82rem;
  font-weight: 800;
}

.region-tools__description {
  margin-bottom: 12px;
  color: var(--muted);
  font-size: 0.7rem;
}

.region-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.region-button {
  min-height: 36px;
  padding: 7px 11px;
  border: 1px solid #46505e;
  background: #252b34;
  color: #cbd1d8;
  font-size: 0.72rem;
  font-weight: 700;
  cursor: pointer;
}

.region-button[data-active="true"] {
  border-color: var(--sea);
  background: #1b3733;
  color: #a4ebe1;
}

.region-button[data-region-mode="subject"][data-active="true"] {
  border-color: var(--amber);
  background: #3b3020;
  color: #f0c986;
}

.region-button[data-region-mode="picker"][data-active="true"] {
  border-color: var(--blue);
  background: #203448;
  color: #b5d7f4;
}

.region-button--clear {
  margin-left: auto;
  border-color: #51484a;
  background: transparent;
  color: #bca5a5;
}

.eyedropper-panel {
  margin-top: 13px;
  padding: 13px;
  border: 1px solid rgb(112 167 217 / 38%);
  background: rgb(112 167 217 / 7%);
}

.eyedropper-panel--empty {
  border-color: var(--line);
  background: rgb(255 255 255 / 2%);
}

.eyedropper-panel__heading {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: #cbd4db;
  font-size: 0.7rem;
  font-weight: 800;
}

.eyedropper-panel__heading > span:last-child {
  color: var(--blue);
  font-family: "SFMono-Regular", "Menlo", monospace;
  font-variant-numeric: tabular-nums;
}

.eyedropper-panel--empty p,
.eyedropper-panel__note {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 0.65rem;
}

.eyedropper-colors {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  margin-top: 9px;
}

.eyedropper-color {
  display: flex;
  min-width: 0;
  padding: 5px;
  border: 1px solid #3d4755;
  background: #171b21;
  cursor: pointer;
  text-align: left;
}

.eyedropper-color:hover,
.eyedropper-color[data-latest="true"] {
  border-color: var(--blue);
  background: #202a35;
}

.eyedropper-color__swatch {
  flex: 0 0 28px;
  width: 28px;
  min-height: 38px;
  border: 1px solid rgb(255 255 255 / 30%);
}

.eyedropper-color__values {
  display: flex;
  min-width: 0;
  padding: 2px 0 2px 7px;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
  font-family: "SFMono-Regular", "Menlo", monospace;
}

.eyedropper-color__values b {
  overflow: hidden;
  color: #eef3f6;
  font-size: 0.66rem;
  text-overflow: ellipsis;
}

.eyedropper-color__values span {
  overflow: hidden;
  color: #8e9cab;
  font-size: 0.52rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.region-measurements {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin-top: 13px;
  color: #aab3be;
  font-family: "SFMono-Regular", "Menlo", monospace;
  font-size: 0.66rem;
}

.readability-card {
  margin-top: 16px;
  padding: 14px;
  border: 1px solid rgb(120 213 200 / 38%);
  background: rgb(120 213 200 / 7%);
}

.readability-card--empty {
  border-color: var(--line);
  background: rgb(255 255 255 / 2%);
}

.readability-card__heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  color: #cbd4db;
  font-size: 0.72rem;
  font-weight: 800;
}

.readability-card__score {
  color: var(--sea);
  font-family: "SFMono-Regular", "Menlo", monospace;
  font-size: 1rem;
  font-variant-numeric: tabular-nums;
}

.readability-card__label {
  margin: 6px 0 10px;
  color: var(--white);
  font-size: 0.86rem;
  font-weight: 800;
}

.readability-card--empty p {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 0.68rem;
}

.readability-breakdown {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
}

.readability-breakdown span {
  min-width: 0;
  padding: 8px;
  background: rgb(0 0 0 / 22%);
  color: #d7dcdf;
  font-family: "SFMono-Regular", "Menlo", monospace;
  font-size: 0.68rem;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.readability-breakdown b {
  display: block;
  margin-bottom: 3px;
  color: #8995a2;
  font-family: "Avenir Next", "Hiragino Sans", sans-serif;
  font-size: 0.58rem;
  font-weight: 700;
  text-align: left;
}

.metric-explanations {
  display: grid;
  gap: 5px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line-soft);
}

.metric-explanations p {
  margin: 0;
  color: #8995a2;
  font-size: 0.64rem;
  line-height: 1.6;
}

.metric-explanations b {
  margin-right: 0.6em;
  color: #bdc6ce;
}

.blur-detail {
  margin-top: 22px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

.blur-detail__heading {
  margin-bottom: 12px;
}

.blur-detail__heading .section-index {
  margin-bottom: 5px;
}

.blur-detail__heading h3 {
  margin: 0 0 4px;
  font-family: "Avenir Next", "Hiragino Sans", sans-serif;
  font-size: 1rem;
  letter-spacing: -0.02em;
}

.blur-detail__heading > p:last-child {
  margin: 0;
  color: var(--muted);
  font-size: 0.68rem;
  line-height: 1.6;
}

.blur-detail__comparison {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.blur-detail__panel {
  min-width: 0;
  margin: 0;
}

.blur-detail__frame {
  overflow: hidden;
  aspect-ratio: 16 / 9;
  border: 1px solid #46505e;
  background: #000;
}

.detail-visual .blur-detail__frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.blur-detail__panel figcaption {
  padding-top: 6px;
  color: #aab3be;
  font-family: "SFMono-Regular", "Menlo", monospace;
  font-size: 0.62rem;
  letter-spacing: 0.04em;
}

.spatial-panel {
  margin-top: 22px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

.spatial-panel__heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.spatial-panel__heading h3 {
  margin: 0;
  font-family: "Avenir Next", "Hiragino Sans", sans-serif;
  font-size: 1rem;
  letter-spacing: -0.02em;
}

.spatial-panel__heading .section-index {
  margin-bottom: 5px;
}

.spatial-legend {
  display: flex;
  flex-wrap: wrap;
  justify-content: end;
  gap: 9px 14px;
  color: #aab3be;
  font-size: 0.62rem;
}

.spatial-legend span::before {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 5px;
  border-radius: 50%;
  background: var(--coral);
  box-shadow: 0 0 8px rgb(239 125 114 / 70%);
}

.spatial-legend .spatial-legend__attention::before {
  background: #ffd166;
  box-shadow: 0 0 8px rgb(255 209 102 / 70%);
}

.spatial-map {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border: 1px solid #46505e;
  background: #000;
}

.spatial-map > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  opacity: 0.76;
}

.spatial-cell {
  position: absolute;
  z-index: 1;
  border-right: 1px solid rgb(255 255 255 / 8%);
  border-bottom: 1px solid rgb(255 255 255 / 8%);
  background: rgb(112 167 217 / var(--heat-alpha));
  pointer-events: none;
}

.third-line {
  position: absolute;
  z-index: 2;
  background: rgb(255 255 255 / 42%);
  pointer-events: none;
}

.third-line--third-v-1,
.third-line--third-v-2 {
  top: 0;
  bottom: 0;
  width: 1px;
}

.third-line--third-v-1 { left: 33.333%; }
.third-line--third-v-2 { left: 66.666%; }

.third-line--third-h-1,
.third-line--third-h-2 {
  right: 0;
  left: 0;
  height: 1px;
}

.third-line--third-h-1 { top: 33.333%; }
.third-line--third-h-2 { top: 66.666%; }

.spatial-safe-area {
  position: absolute;
  right: 0;
  bottom: 0;
  z-index: 3;
  display: flex;
  align-items: end;
  justify-content: end;
  width: 24%;
  height: 22%;
  padding: 5px;
  border: 1px dashed rgb(239 125 114 / 78%);
  background: rgb(239 125 114 / 10%);
  color: #f4aaa3;
  font-family: "SFMono-Regular", "Menlo", monospace;
  font-size: 0.52rem;
  pointer-events: none;
}

.spatial-marker {
  position: absolute;
  z-index: 5;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.spatial-marker > span {
  display: block;
  width: 15px;
  height: 15px;
  border: 3px solid #fff;
  border-radius: 50%;
  background: var(--coral);
  box-shadow: 0 0 0 3px rgb(239 125 114 / 45%), 0 0 18px rgb(239 125 114 / 90%);
}

.spatial-marker > b {
  position: absolute;
  top: 19px;
  left: 50%;
  padding: 3px 5px;
  transform: translateX(-50%);
  background: rgb(12 14 18 / 90%);
  color: #ffd0cc;
  font-family: "SFMono-Regular", "Menlo", monospace;
  font-size: 0.55rem;
  line-height: 1;
  white-space: nowrap;
}

.spatial-marker--attention > span {
  background: #ffd166;
  box-shadow: 0 0 0 3px rgb(255 209 102 / 42%), 0 0 18px rgb(255 209 102 / 92%);
}

.spatial-marker--attention > b {
  color: #ffe9ae;
}

.spatial-readout {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  margin-top: 1px;
  background: var(--line);
}

.spatial-readout span {
  padding: 9px 11px;
  background: var(--slate);
  color: #d8dde3;
  font-family: "SFMono-Regular", "Menlo", monospace;
  font-size: 0.65rem;
}

.spatial-readout b {
  display: block;
  margin-bottom: 3px;
  color: var(--muted);
  font-family: "Hiragino Sans", "Yu Gothic", sans-serif;
  font-size: 0.61rem;
}

.spatial-note {
  margin: 9px 0 0;
  color: #77818e;
  font-size: 0.64rem;
  line-height: 1.6;
}

.safe-area-warning {
  flex-basis: 100%;
  margin: 3px 0 0;
  padding: 8px 10px;
  border-left: 3px solid var(--coral);
  background: #352120;
  color: #f0aaa3;
  font-family: "Hiragino Sans", "Yu Gothic", sans-serif;
  line-height: 1.6;
}

.detail-info {
  padding: 34px;
  border-left: 1px solid var(--line);
}

.detail-info h2 {
  padding-right: 32px;
  font-family: "Avenir Next", "Hiragino Sans", sans-serif;
  font-size: 1.4rem;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.score-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  margin: 24px 0;
  background: var(--line);
}

.score-grid div {
  padding: 13px;
  background: var(--slate);
}

.score-grid span {
  display: block;
  color: var(--muted);
  font-size: 0.68rem;
}

.score-grid strong {
  font-family: "SFMono-Regular", "Menlo", monospace;
  font-size: 1.2rem;
}

.hint-list {
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
}

.hint-list li {
  padding: 11px 0 11px 18px;
  border-top: 1px solid var(--line-soft);
  color: #c6ccd4;
  font-size: 0.78rem;
  line-height: 1.7;
}

.hint-list li::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  margin: 0 10px 2px -16px;
  background: var(--amber);
}

noscript {
  display: block;
  padding: 20px;
  background: #47201e;
  color: #fff;
}

@media (max-width: 900px) {
  .app-header,
  .section-heading,
  .result-toolbar,
  .app-footer {
    align-items: start;
    flex-direction: column;
  }

  .privacy-stamp {
    max-width: none;
  }

  .result-toolbar {
    align-items: stretch;
  }

  .toolbar-actions {
    justify-content: start;
  }

  .detail-layout {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 650px) {
  .app-shell {
    width: min(100% - 24px, 1480px);
    padding-top: 52px;
  }

  .app-header {
    gap: 24px;
  }

  .drop-zone {
    grid-template-columns: 1fr;
    padding: 22px;
  }

  .drop-zone__mark {
    width: 68px;
  }

  .drop-zone .button {
    width: 100%;
  }

  .summary-meter {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
  }

  .summary-stat,
  .summary-stat:first-child {
    min-width: 0;
    padding: 10px 14px;
    border-left: 1px solid var(--line);
  }

  .summary-stat:nth-child(odd) {
    border-left: 0;
  }

  .toolbar-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .toolbar-actions .button--danger {
    grid-column: 1 / -1;
  }

  .analysis-section {
    padding-top: 34px;
  }

  .coordinate-guide {
    padding: 18px 14px;
  }

  .coordinate-guide__heading {
    align-items: start;
    flex-direction: column;
    gap: 8px;
  }

  .coordinate-board {
    margin: 0;
  }

  .contact-sheet,
  .blur-sheet {
    grid-template-columns: 1fr;
    padding: 12px;
  }

  .detail-visual,
  .detail-info {
    padding: 22px;
  }

  .spatial-panel__heading {
    align-items: start;
    flex-direction: column;
  }

  .spatial-legend {
    justify-content: start;
  }

  .spatial-readout {
    grid-template-columns: 1fr;
  }

  .blur-detail__comparison {
    grid-template-columns: 1fr;
  }

  .readability-breakdown {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .eyedropper-colors {
    grid-template-columns: 1fr;
  }

  .detail-palette__heading {
    align-items: start;
    flex-direction: column;
    gap: 4px;
  }

  .detail-palette__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
