@font-face {
  font-family: "Futurist";
  src: url("fonts/FG_FuturistTRIAL-Regular.otf") format("opentype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Futurist";
  src: url("fonts/FG_FuturistTRIAL-Medium.otf") format("opentype");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Futurist";
  src: url("fonts/FG_FuturistTRIAL-Bold.otf") format("opentype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Product Sans";
  src: url("fonts/ProductSans-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Product Sans";
  src: url("fonts/ProductSans-Medium.ttf") format("truetype");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Product Sans";
  src: url("fonts/ProductSans-Bold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --bg: #05040a;
  --fg: #f4f0e8;
  --muted: #a39cb4;
  --line: rgba(244, 240, 232, 0.18);
  --gold: #f0c27a;
  --edition: #8eb4ff;
  --title: "Futurist", sans-serif;
  --body: "Product Sans", sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--body);
}

#stage {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  cursor: grab;
  touch-action: none;
}

#stage:active { cursor: grabbing; }
body.intro #stage { cursor: default; }

.logo {
  width: 36px;
  height: 36px;
  display: block;
  margin: 0 0 18px;
  mix-blend-mode: screen;
  opacity: 0.9;
}

.screen {
  position: relative;
  z-index: 2;
  max-width: 640px;
  min-height: 100vh;
  margin: 0 auto;
  padding: 10vh 28px 64px;
}

.kicker {
  margin: 0 0 12px;
  font-family: var(--title);
  font-weight: 500;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
}

.reg {
  letter-spacing: 0;
  font-size: 0.62em;
  line-height: 0;
  position: relative;
  top: -0.45em;
  margin-left: 0.08em;
}

h1 {
  margin: 0 0 16px;
  font-family: var(--title);
  font-weight: 700;
  font-size: clamp(40px, 6vw, 68px);
  letter-spacing: 0;
  line-height: 0.96;
}

.lede {
  max-width: 38ch;
  margin: 0 0 24px;
  font-size: 18px;
  line-height: 1.45;
  color: #ddd6ea;
}

.lede.tight { margin-bottom: 14px; }

button {
  font-family: var(--body);
  font-weight: 500;
  font-size: 15px;
  color: #14120f;
  background: var(--fg);
  border: 0;
  border-radius: 999px;
  padding: 12px 18px;
  cursor: pointer;
}

button:hover { background: #fff; }

button.ghost {
  background: transparent;
  color: var(--fg);
  border: 1px solid var(--line);
}

button.ghost:hover { background: rgba(255, 255, 255, 0.06); }

button.texty {
  align-self: flex-start;
  margin-top: 8px;
  padding: 0;
  background: transparent;
  color: var(--muted);
  border-radius: 0;
  text-decoration: underline;
  text-underline-offset: 3px;
}

button.texty:hover { background: transparent; color: var(--fg); }

.quiet, .status, .hint {
  font-family: var(--body);
  font-weight: 400;
  font-size: 13px;
  line-height: 1.45;
  color: var(--muted);
}

.status { color: var(--fg); min-height: 1.4em; }
.hint { margin: 0; }
#save-note:empty { display: none; }

.turn {
  position: absolute;
  z-index: 4;
  top: 22px;
  left: 50%;
  margin: 0;
  padding: 6px 12px;
  transform: translateX(-50%);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.38);
  color: #f4f0e8;
  font-family: var(--body);
  font-weight: 500;
  font-size: 12px;
  letter-spacing: 0.04em;
  text-align: center;
  pointer-events: none;
  transition: opacity 0.6s ease;
}

.turn span {
  display: block;
  margin-top: 7px;
  font-weight: 400;
  letter-spacing: 0;
  opacity: 0.86;
}

.turn.gone { opacity: 0; }

.birth-note {
  position: absolute;
  z-index: 6;
  left: 50%;
  bottom: 12%;
  margin: 0;
  transform: translateX(-50%);
  color: #f4f0e8;
  font-family: var(--title);
  font-weight: 500;
  font-size: 13px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.9s ease;
}

body.birthing .birth-note { opacity: 0.9; }
body.birthing.birth-late .birth-note { opacity: 0; }

body.showing .turn,
body.showing .zoom,
body.showing .dock,
body.showing .live-head,
body.showing .live-facts,
body.showing .live-address {
  transition: opacity 1.15s ease;
}

body.birthing .turn,
body.birthing .zoom,
body.birthing .live-head,
body.birthing .live-facts,
body.birthing .live-address {
  opacity: 0;
  pointer-events: none;
  transition: none;
}

body.handoff::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 21;
  background: var(--handoff, #05040a);
  opacity: 1;
  pointer-events: none;
  transition: opacity 0.8s ease;
}

body.handoff.handoff-go::after { opacity: 0; }

body.handoff .screen.leaving {
  position: fixed;
  z-index: 22;
  top: 0;
  left: 0;
  right: 0;
  max-width: 640px;
  min-height: 100vh;
  margin: 0 auto;
  opacity: 1;
  pointer-events: none;
  transition: opacity 0.8s ease;
}

body.handoff.handoff-go .screen.leaving { opacity: 0; }

.modal.leaving { transition: opacity 0.75s ease; }
.modal.leaving.gone { opacity: 0; }

.vacant-prompt {
  position: absolute;
  z-index: 6;
  left: 50%;
  top: 50%;
  width: min(520px, 88%);
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  text-align: center;
}

.vacant-prompt[hidden] { display: none; }

.vacant-prompt p {
  margin: 0;
  font-family: var(--title);
  font-weight: 500;
  font-size: clamp(22px, 3vw, 34px);
  line-height: 1.05;
  color: #f4f0e8;
}

.vacant-prompt button.cta { width: auto; min-width: 180px; }

body.vacant .turn,
body.vacant .zoom,
body.vacant .live-head,
body.vacant .live-facts,
body.vacant .live-address {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: none;
}

body.vacant .dock .id-block .identity,
body.vacant #format-block,
body.vacant #copy-page,
body.vacant #export-open {
  display: none;
}

body.vacant #panel-picture .panel-scroll {
  display: contents;
}

body.vacant #panel-picture .id-block { order: 1; }

body.vacant #panel-picture .dock-foot {
  order: 2;
  margin-top: 8px;
}

body.vacant #panel-picture .hint { display: none; }

body.vacant #panel-saved {
  overflow: auto;
}

body.vacant #panel-saved .panel-scroll {
  display: contents;
}

body.vacant #panel-saved .panel-scroll > .hint {
  order: 1;
  margin-top: 22px;
}

body.vacant #panel-saved .dock-foot {
  order: 2;
  margin-top: 8px;
}

body.vacant #panel-saved .sort-by { order: 3; }

body.vacant #panel-saved #saved-list { order: 4; }

#vacant-note[hidden],
#edition[hidden] { display: none; }

.modal .qr-wrap { margin: 8px auto 14px; }
.code-pop-card { width: min(440px, 100%); }

.zoom {
  position: absolute;
  z-index: 5;
  right: 18px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.zoom button {
  width: 36px;
  height: 36px;
  padding: 0;
  display: grid;
  place-items: center;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(0, 0, 0, 0.38);
  color: #f4f0e8;
}

.zoom button:hover { background: rgba(0, 0, 0, 0.55); color: #f4f0e8; }

.zoom button:disabled {
  opacity: 0.35;
  cursor: default;
}

#zoom-reset {
  width: auto;
  height: 28px;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 500;
}

.frame.tall .zoom,
.frame.square .zoom { right: 14px; }

.frame.tall .turn,
.frame.square .turn {
  top: 72px;
  font-size: 11px;
  padding: 5px 10px;
}

.qr-wrap {
  width: 280px;
  height: 280px;
  margin: 8px 0 16px;
  background: #f6f3ec;
  border-radius: 18px;
  display: grid;
  place-items: center;
}

.qr-wrap img { width: 252px; height: 252px; image-rendering: pixelated; }

#genome { min-height: 100vh; }

body.showing {
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
}

@property --dock {
  syntax: "<length>";
  inherits: true;
  initial-value: 420px;
}

body.showing { --dock: clamp(380px, 30vw, 480px); }

body.birth-open { transition: --dock 1.15s ease; }

body.birth-open.birthing {
  --dock: 0px;
  transition: none;
}

body.birth-open.birthing .dock {
  opacity: 0;
  visibility: hidden;
  min-width: 0;
  overflow: hidden;
  pointer-events: none;
  transition: none;
}

body.showing #genome {
  display: grid;
  grid-template-columns: minmax(0, 1fr) var(--dock);
  height: 100%;
  overflow: hidden;
}

body.showing #stage {
  position: absolute;
  z-index: 1;
  inset: 0;
  width: 100%;
  height: 100%;
}

.view {
  display: grid;
  place-items: center;
  min-height: 0;
  height: 100%;
  padding: 28px;
}

.view:has(.frame.wide) {
  padding: 0;
  place-items: stretch;
}

.frame {
  position: relative;
  background: #000;
  overflow: hidden;
}

.frame.wide {
  width: auto;
  height: auto;
  border-radius: 0;
  box-shadow: none;
}

.frame.tall {
  width: min(44vh, 440px);
  aspect-ratio: 9 / 16;
  border-radius: 38px;
  border: 10px solid #1a1a1a;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.28), 0 24px 50px rgba(0, 0, 0, 0.45);
}

.frame.tall::after {
  content: "";
  position: absolute;
  z-index: 2;
  top: 12px;
  left: 50%;
  width: 54px;
  height: 5px;
  margin-left: -27px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.38);
  pointer-events: none;
}

.frame.square {
  width: min(60vh, 600px);
  aspect-ratio: 1;
  border-radius: 28px;
  border: 7px solid #161616;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.28), 0 24px 50px rgba(0, 0, 0, 0.4);
}

.dock {
  z-index: 3;
  display: flex;
  flex-direction: column;
  gap: clamp(6px, 1vh, 12px);
  height: 100%;
  min-height: 0;
  overflow: hidden;
  padding: clamp(12px, 2vh, 28px) clamp(16px, 1.4vw, 24px) clamp(12px, 1.6vh, 24px);
  border-left: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg) 82%, black);
}

.dock .logo { margin-bottom: 4px; }

.tabs { display: flex; flex-wrap: nowrap; gap: 6px; }

.tabs button, #add-another, #add-another-saved {
  font-size: 13px;
}

.tabs button {
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 10px;
}

#tab-saved { flex: 0 0 auto; }

#tab-picture {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tabs button[aria-pressed="true"] {
  background: var(--fg);
  color: #14120f;
  border-color: transparent;
}

.sort-by {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 2px 0 4px;
  color: var(--muted);
  font-size: 13px;
}

.sort-by select {
  flex: 1 1 auto;
  min-width: 0;
  font-family: var(--body);
  font-size: 13px;
  color: var(--fg);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 12px;
}

#panel-picture, #panel-saved {
  display: flex;
  flex-direction: column;
  gap: clamp(6px, 1vh, 10px);
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
}

.panel-scroll {
  display: flex;
  flex-direction: column;
  gap: clamp(8px, 1.2vh, 14px);
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
}

.id-block {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 22px;
}

.rule {
  display: block;
  flex: 0 0 auto;
  align-self: stretch;
  width: 100%;
  height: 1px;
  margin: 18px 0 14px;
  border: 0;
  background: rgba(244, 240, 232, 0.28);
}

.dock-foot {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

#panel-picture[hidden], #panel-saved[hidden] { display: none; }

#saved-list { display: flex; flex-direction: column; gap: 8px; }

.saved {
  position: relative;
}

button.saved-open {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 10px;
  align-items: center;
  width: 100%;
  padding: 8px 36px 34px 8px;
  text-align: left;
  color: var(--fg);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid transparent;
  border-radius: 14px;
}

button.saved-open[aria-pressed="true"] { border-color: var(--fg); }
button.saved-open:hover { background: rgba(255, 255, 255, 0.08); color: var(--fg); }

button.saved-open canvas {
  width: 96px;
  height: 64px;
  border-radius: 8px;
  background: #000;
}

button.saved-x,
button.saved-share {
  position: absolute;
  z-index: 1;
  background: rgba(0, 0, 0, 0.45);
  color: #f4f0e8;
  border: 1px solid rgba(255, 255, 255, 0.16);
}

button.saved-x {
  top: 6px;
  right: 6px;
  width: 22px;
  height: 22px;
  padding: 0;
  display: grid;
  place-items: center;
  border-radius: 999px;
}

button.saved-x:hover,
button.saved-share:hover { background: rgba(0, 0, 0, 0.7); color: #f4f0e8; }

button.saved-share {
  right: 8px;
  bottom: 8px;
  height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 500;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(0, 0, 0, 0.55);
}

.modal[hidden] { display: none; }

.modal-card {
  width: min(420px, 100%);
  padding: 22px;
  border-radius: 18px;
  background: #16141c;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.modal-title {
  margin: 0 0 8px;
  font-family: var(--title);
  font-weight: 500;
  font-size: 26px;
  line-height: 1.1;
  color: #f4f0e8;
}

.modal-card .quiet { margin: 0 0 8px; }

.modal-actions {
  display: flex;
  gap: 8px;
  margin-top: 16px;
}

.share-page-card { width: min(520px, 100%); }

.share-url {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-top: 12px;
  padding: 10px 10px 10px 12px;
  border: 1px solid rgba(244, 240, 232, 0.28);
  border-radius: 12px;
}

.share-url p {
  flex: 1 1 auto;
  margin: 0;
  font-family: var(--body);
  font-weight: 400;
  font-size: 13px;
  line-height: 1.4;
  color: #f4f0e8;
  overflow-wrap: anywhere;
}

.share-url button.copy { color: #f4f0e8; }

body.share-view.showing #genome { grid-template-columns: 1fr; }
body.share-view .dock { display: none; }

.saved-name {
  margin: 0;
  font-family: var(--title);
  font-weight: 500;
  font-size: 16px;
  line-height: 1.15;
  overflow-wrap: anywhere;
}

.saved-meta {
  margin: 4px 0 0;
  color: var(--muted);
  font-family: var(--body);
  font-size: 12px;
  letter-spacing: 0;
}

.given {
  margin: 0;
  font-family: var(--title);
  font-weight: 500;
  font-size: 22px;
  line-height: 1.05;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  overflow-wrap: anywhere;
}

.given.as-chosen {
  font-size: clamp(24px, 3vh, 32px);
  letter-spacing: 0;
  text-transform: none;
}

.identity {
  margin: 0;
}

.identity img {
  display: block;
  height: 10px;
  width: auto;
}

.edition {
  margin: 0;
  font-family: var(--title);
  font-weight: 500;
  font-size: clamp(20px, 2.6vh, 26px);
  line-height: 1.05;
  letter-spacing: 0;
  color: var(--edition);
}

.address {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: 0 0 8px;
}

.address[hidden] { display: none; }

.address span,
.live-address span {
  font-family: var(--body);
  font-weight: 400;
  font-size: 13px;
  line-height: 1.3;
  letter-spacing: 0.07em;
  color: var(--muted);
  overflow-wrap: anywhere;
}

button.copy {
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  border: 0;
}

button.copy svg {
  width: 15px;
  height: 15px;
  display: block;
}

button.copy svg[hidden],
button.copy .copy-note[hidden] {
  display: none;
}

button.copy.is-copied {
  width: auto;
  padding: 0 2px 0 4px;
}

button.copy .copy-note {
  font-family: var(--body);
  font-weight: 500;
  font-size: 12px;
  letter-spacing: 0;
  color: var(--fg);
}

button.copy:hover,
button.copy:focus-visible {
  background: rgba(255, 255, 255, 0.08);
  color: var(--fg);
}

.live-address {
  position: absolute;
  z-index: 4;
  right: 4.5%;
  bottom: 4%;
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: 70%;
  color: #f4f0e8;
}

.live-address[hidden] { display: none; }

.live-address span { color: #f4f0e8; font-size: clamp(11px, 1.4vw, 14px); letter-spacing: 0.08em; }

.live-head {
  position: absolute;
  z-index: 4;
  left: 4.5%;
  top: 22px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  max-width: 36%;
}

.live-head[hidden] { display: none; }

.live-head .identity img { height: 11px; }

.live-head .given {
  font-size: clamp(16px, 2.1vw, 26px);
  color: #f7f1e4;
}

.live-head .edition { font-size: clamp(18px, 2.5vw, 30px); }

#copy-page-live { display: none; }

body.share-view #copy-page-live {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: auto;
  margin-top: 4px;
  padding: 8px 12px;
  border-radius: 999px;
  background: transparent;
  color: #f4f0e8;
  border: 1px solid rgba(244, 240, 232, 0.9);
  font-size: 13px;
}

body.share-view #copy-page-live svg {
  width: 14px;
  height: 14px;
  display: block;
}

body.share-view #copy-page-live:hover {
  background: rgba(0, 0, 0, 0.35);
  color: #f4f0e8;
}

.live-facts {
  position: absolute;
  z-index: 4;
  left: 4.5%;
  bottom: 4.2%;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 7px;
  max-width: 58%;
}

.live-facts[hidden] { display: none; }

.live-facts .edition { font-size: clamp(18px, 2.5vw, 30px); }

.live-facts .when {
  margin: 12px 0 0;
  font-family: var(--body);
  font-weight: 400;
  font-size: 13px;
  line-height: 1.3;
  color: #f4f0e8;
}

.frame.tall .live-head { left: 8%; top: 28px; max-width: 42%; gap: 6px; }
.frame.tall .live-head .given { font-size: 14px; }
.frame.tall .live-head .edition { font-size: 16px; }
.frame.tall .live-head .identity img { height: 9px; }
.frame.tall .live-facts { left: 8%; bottom: 13%; max-width: 84%; gap: 5px; }
.frame.tall .live-facts .edition { font-size: 16px; }
.frame.tall .live-facts .when { margin-top: 12px; font-size: 11px; }
.frame.tall .live-address {
  left: 8%;
  right: auto;
  bottom: 4%;
  max-width: 84%;
}
.frame.tall .live-address span { letter-spacing: 0.05em; font-size: 11px; }
.frame.square .live-head { top: 28px; max-width: 42%; }
.frame.square .live-head .given { font-size: 18px; }
.frame.square .live-head .edition { font-size: 20px; }
.frame.square .live-facts .edition { font-size: 20px; }

.callout {
  position: fixed;
  z-index: 30;
  max-width: 280px;
  padding: 7px 9px;
  border-radius: 8px;
  background: #22262b;
  color: #f4f0e8;
  font-family: var(--body);
  font-weight: 400;
  font-size: 12px;
  line-height: 1.35;
  letter-spacing: 0;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.4);
  pointer-events: none;
}

.callout[hidden] { display: none; }

.callout .caret {
  position: absolute;
  width: 0;
  height: 0;
  border-style: solid;
}

.callout[data-place="right"] .caret {
  left: -6px;
  border-width: 6px 6px 6px 0;
  border-color: transparent #22262b transparent transparent;
}

.callout[data-place="left"] .caret {
  right: -6px;
  border-width: 6px 0 6px 6px;
  border-color: transparent transparent transparent #22262b;
}

.callout[data-place="below"] .caret {
  top: -6px;
  border-width: 0 6px 6px 6px;
  border-color: transparent transparent #22262b transparent;
}

.callout[data-place="above"] .caret {
  bottom: -6px;
  border-width: 6px 6px 0 6px;
  border-color: #22262b transparent transparent transparent;
}
.live-address button.copy { color: #f4f0e8; }

.frame.square .live-address { right: 6%; bottom: 5%; max-width: 42%; }
.frame.square .live-facts { max-width: 50%; }

button.cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  font-size: 16px;
  padding: 14px 18px;
}

button.cta .plus {
  width: 22px;
  height: 22px;
  display: block;
  flex: 0 0 22px;
  line-height: 0;
  background: none;
}

button.cta .plus svg {
  display: block;
  width: 22px;
  height: 22px;
}

button#copy-page {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 2px;
  padding: 8px 12px;
  background: transparent;
  color: #f4f0e8;
  border: 1px solid rgba(244, 240, 232, 0.9);
  border-radius: 999px;
  font-size: 14px;
}

button#copy-page svg {
  width: 14px;
  height: 14px;
  display: block;
}

button#copy-page:hover,
button#copy-page:focus-visible {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

button#copy-page[hidden] { display: none; }

button.export {
  width: 100%;
  background: transparent;
  color: #f4f0e8;
  border: 1px solid #f4f0e8;
  font-size: 16px;
  padding: 14px 18px;
}

button.export:hover,
button.export:focus-visible {
  background: rgba(255, 255, 255, 0.08);
  color: #f4f0e8;
}

.export-label { margin: 14px 0 8px; }

.modal-card .export-list + .export-label { margin-top: 28px; }

.export-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.export-list button {
  width: 100%;
  padding: 12px 14px;
  border-radius: 12px;
  background: transparent;
  color: #f4f0e8;
  border: 1px solid rgba(244, 240, 232, 0.45);
  text-align: left;
  font-size: 15px;
}

.export-list button:hover,
.export-list button:focus-visible {
  background: rgba(255, 255, 255, 0.08);
  color: #f4f0e8;
}

.menu { position: relative; }

.menu > button { width: 100%; }

.menu-pop {
  position: absolute;
  z-index: 6;
  left: 0;
  right: 0;
  top: auto;
  bottom: calc(100% + 6px);
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 6px;
  background: #14120f;
  border: 1px solid var(--line);
  border-radius: 14px;
}

.menu-pop[hidden] { display: none; }

.menu-pop button {
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  background: transparent;
  color: var(--fg);
  text-align: left;
  font-size: 13px;
}

.menu-pop button:hover { background: rgba(255, 255, 255, 0.08); }

.previews {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(72px, 0.78fr) minmax(88px, 1fr);
  gap: 8px;
  align-items: end;
}

.previews button {
  min-width: 0;
  padding: 6px 6px 8px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid transparent;
  color: inherit;
}

.previews button[aria-pressed="true"] {
  border-color: var(--fg);
  background: rgba(255, 255, 255, 0.06);
}

.previews canvas {
  display: block;
  width: 100%;
  height: auto;
  background: #000;
  border-radius: 8px;
}

.previews button[data-id="wide"] canvas { aspect-ratio: 16 / 9; }
.previews button[data-id="tall"] canvas {
  aspect-ratio: 9 / 16;
  width: auto;
  max-width: 100%;
  max-height: min(132px, 16vh);
  margin-inline: auto;
}
.previews button[data-id="square"] canvas { aspect-ratio: 1; }

.shot-label {
  display: block;
  padding: 6px 0 0;
  font-family: var(--body);
  font-weight: 500;
  font-size: 12px;
  letter-spacing: 0;
  line-height: 1.2;
  white-space: nowrap;
  text-align: center;
  color: var(--muted);
}

.actions {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
}
.actions button { width: 100%; }

@media (max-height: 760px) {
  .logo { width: 28px; height: 28px; margin-bottom: 8px; }
  .dock .logo { margin-bottom: 0; }
  .hint { font-size: 12px; }
}

@media (max-width: 900px) {
  body.showing { height: auto; overflow: visible; }
  body.showing #genome {
    grid-template-columns: 1fr;
    height: auto;
    overflow: visible;
  }
  .view { height: auto; min-height: 70vh; padding: 20px 16px; }
  .view:has(.frame.wide) {
    min-height: 100vh;
    min-height: 100dvh;
    padding: 0;
  }
  .frame.wide {
    width: 100%;
    height: 100vh;
    height: 100dvh;
  }
  .dock {
    height: auto;
    overflow: visible;
    border-left: 0;
    border-top: 1px solid var(--line);
  }
  #panel-picture, #panel-saved, .panel-scroll { overflow: visible; }
  .previews { max-width: 460px; }
}
