.icon-presentation {
  --symbol: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.6' stroke-linejoin='round'%3E%3Crect x='2.7' y='4.7' width='18.6' height='14.6' rx='1.8'/%3E%3Crect x='6.8' y='8.3' width='10.4' height='7.4' rx='.5'/%3E%3C/svg%3E");
}
.presentation-shortcut {
  gap: 5px;
  min-height: 32px;
  padding-inline: 8px;
  font-size: 12px;
}
.presentation-settings { padding-block: 10px; }
.presentation-setting.button {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 10px;
  width: 100%;
  height: auto;
  padding: 8px 10px;
  text-align: start;
  font-size: 12px;
}
.presentation-setting strong { font-weight: 650; }
.presentation-current { display: block; color: var(--muted); font-size: 11px; }
.presentation-open { color: var(--accent-soft-foreground); }

body:has(.presentation[open]) { overflow: hidden; }
.presentation {
  position: fixed;
  inset: 0;
  box-sizing: border-box;
  width: min(calc(100% - 28px), 1220px, max(660px, calc((100dvh - 164px) * 1.5)));
  max-width: none;
  max-height: calc(100dvh - 28px);
  margin: auto;
  padding: 0;
  overflow: auto;
  overscroll-behavior: contain;
  border: 1px solid var(--field-border);
  border-radius: 13px;
  color: var(--foreground);
  background: var(--surface);
  box-shadow: var(--dialog-shadow);
}
.presentation::backdrop { background: var(--dialog-backdrop); backdrop-filter: blur(5px); }
.presentation-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 16px;
}
.presentation-header h2 { margin: 0; font: 550 clamp(15px, 2vw, 20px)/1.25 var(--display); }
.presentation-generator { margin: 2px 0 0; color: var(--muted); font-size: 12px; }
.presentation-close.button { width: 34px; height: 34px; padding: 0; font-size: 23px; font-weight: 400; }

.presentation [data-scene="light"] { --scene-image: url("../assets/presentation/light.webp"); --scene-color: #bfb097; }
.presentation [data-scene="dark"] { --scene-image: url("../assets/presentation/dark.webp"); --scene-color: #33312b; }
.presentation [data-scene="paper"] { --scene-image: url("../assets/presentation/paper.webp"); --scene-color: #80786b; }
.presentation [data-scene="postcard"] { --scene-image: url("../assets/presentation/postcard.webp"); --scene-color: #74765c; }
.presentation [data-scene="phone"] { --scene-image: url("../assets/presentation/phone.webp"); --scene-color: #24333b; }
.presentation-stage {
  position: relative;
  container-type: size;
  aspect-ratio: 3 / 2;
  width: 100%;
  overflow: hidden;
  background: var(--scene-color) var(--scene-image) center / cover;
}
.presentation-object {
  position: absolute;
  top: var(--art-y, 42%);
  left: var(--art-x, 50%);
  width: min(var(--art-width, 39cqw), calc(var(--art-height, 53cqh) * var(--art-ratio)));
  transform: translate(-50%, -50%) rotate(var(--art-angle, 0deg));
  box-shadow: var(--art-shadow, 2px 4px 12px #241a175e, 0 1px 2px #17130c70);
}
.presentation-surface { position: relative; aspect-ratio: var(--art-ratio); }
.presentation-surface canvas { display: block; width: 100%; height: 100%; object-fit: contain; }
.presentation-clock { display: none; }
.presentation-stage[data-scene="dark"] {
  --art-shadow: 2px 5px 15px #0009, 0 1px 2px #0009;
}
.presentation-stage[data-scene="paper"], .presentation-stage[data-scene="postcard"] {
  --art-y: 50%;
  --art-angle: -4deg;
  --art-height: 69cqh;
  --art-width: 64cqw;
  --art-shadow: 2px 4px 11px #2e251a42, 6px 15px 28px #2e251a33, 1px 1px 1px #746c5c75;
}
.presentation-stage[data-scene="paper"] .presentation-object {
  box-sizing: content-box;
  padding: 2.6cqh 2.6cqh 4.2cqh;
  background: linear-gradient(126deg, #fffcf1, #e9e2d2 90%);
}
.presentation-stage[data-scene="postcard"] {
  --art-x: 51%;
  --art-y: 46%;
  --art-angle: 9deg;
  --art-width: 48cqw;
  --art-height: 58cqh;
}
.presentation-stage[data-scene="postcard"] .presentation-object {
  box-sizing: content-box;
  padding: .85cqh;
  border-radius: .35cqh;
  background: #f8f1e3;
}
.presentation-stage[data-scene="postcard"] .presentation-surface { overflow: hidden; border-radius: .15cqh; }
.presentation-stage[data-scene="phone"] {
  --art-y: 50%;
  --art-angle: -7deg;
  --art-shadow: 1px 2px 1px #0008, 6px 12px 25px #0009, 18px 26px 44px #0005;
}
.presentation-stage[data-scene="phone"] .presentation-object {
  box-sizing: content-box;
  width: 33cqh;
  padding: .85cqh;
  border: .36cqh solid #83878a;
  border-bottom-color: #42484f;
  border-right-color: #4f555c;
  border-radius: 5cqh;
  background: #141515;
}
.presentation-stage[data-scene="phone"] .presentation-surface {
  aspect-ratio: 9 / 19.5;
  overflow: hidden;
  border-radius: 3.85cqh;
  background: #161616;
  color: white;
}
.presentation-stage[data-scene="phone"] canvas { object-fit: cover; }
.presentation-stage[data-scene="phone"] .presentation-surface::before,
.presentation-stage[data-scene="phone"] .presentation-surface::after {
  content: "";
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}
.presentation-stage[data-scene="phone"] .presentation-surface::before {
  top: 1.3%; width: 25%; height: 3.1%; border-radius: 99px; background: #141515;
}
.presentation-stage[data-scene="phone"] .presentation-surface::after {
  bottom: 1.5%; width: 35%; height: .65%; border-radius: 99px; background: #ffffffe0;
  box-shadow: 0 1px 3px #0006;
}
.presentation-stage[data-scene="phone"] .presentation-clock {
  position: absolute;
  inset: 8% 0 auto;
  display: block;
  color: #fff;
  text-align: center;
  text-shadow: 0 1px 6px #0009;
  font: 600 6.5cqh/1 Golos, sans-serif;
}

.presentation-scenes {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 6px;
  min-width: 0;
  margin: 0;
  padding: 9px 12px 11px;
  border: 0;
}
.presentation-choice {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 4px 6px;
  border: 1px solid var(--border);
  border-radius: 7px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.2;
  cursor: pointer;
}
.presentation-choice:hover { color: var(--foreground); background: var(--default); }
.presentation-choice:has(:checked) { color: var(--foreground); border-color: var(--muted); background: var(--default); }
.presentation-choice:has(:focus-visible) { outline: 2px solid var(--focus); outline-offset: 1px; }
.presentation-choice-image {
  flex: 0 0 36px;
  height: 26px;
  border-radius: 3px;
  background: var(--scene-color) var(--scene-image) center / cover;
}

@media (max-width: 1200px) {
  .studio:has([data-generator="cyanotype"]) .presentation-shortcut .presentation-label { display: none; }
}
@media (max-width: 760px) {
  .presentation-settings { padding-block: 9px; }
}
@media (max-width: 560px) {
  .presentation { width: calc(100% - 20px); max-height: calc(100dvh - 20px); }
  .presentation-header { padding: 10px 12px; }
  .presentation-stage { aspect-ratio: 1 / 1; }
  .presentation-stage:is([data-scene="light"], [data-scene="dark"]) { --art-width: 60cqw; }
  .presentation-stage[data-scene="postcard"] { --art-width: 58cqw; }
  .presentation-scenes { grid-template-columns: repeat(3, minmax(0, 1fr)); padding: 7px; }
  .presentation-choice { gap: 5px; padding-inline: 4px; font-size: 11px; }
  .presentation-choice-image { flex-basis: 22px; height: 22px; }
}
