:root {
  --bg: #f3f4f6;
  --panel: #ffffff;
  --paper: #ffffff;
  --ink: #111827;
  --muted: #6b7280;
  --accent: #111827;
  --accent-strong: #000000;
  --line: #d1d5db;
  --shadow: rgba(17, 24, 39, 0.08);
  --flip-duration: 560ms;
  --perspective: 900px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  color: var(--ink);
  background: var(--bg);
  letter-spacing: -0.01em;
}

body.is-embedded {
  overflow: hidden;
}

button,
a,
input,
select {
  font: inherit;
}

.app {
  width: min(1080px, calc(100vw - 32px));
  margin: 24px auto 14px;
  padding: 14px 10px;
  border-radius: 0;
  background: var(--panel);
  border: 1px solid var(--line);
  position: relative;
  overflow: hidden;
}

.app.is-embedded {
  width: 100%;
  min-height: 100vh;
  margin: 0;
  padding: 12px;
  border: 0;
}

.app.is-initializing #prevButton,
.app.is-initializing #nextButton,
.app.is-initializing #bookmarkButton,
.app.is-initializing #fullscreenButton,
.app.is-initializing #spreadSlider {
  pointer-events: none;
}

.drop-overlay {
  position: absolute;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 12;
  background: rgba(17, 24, 39, 0.08);
  border: 2px dashed #6b7280;
  pointer-events: none;
}

.app.is-dragging .drop-overlay {
  display: flex;
}

.drop-card {
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid #9ca3af;
  color: var(--ink);
  font-size: 0.95rem;
  box-shadow: 0 8px 24px rgba(17, 24, 39, 0.08);
}

.side-panel {
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: min(320px, 82vw);
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 14px 12px;
  background: rgba(255, 255, 255, 0.98);
  border-right: 1px solid var(--line);
  transform: translateX(-100%);
  transition: transform 180ms ease;
  z-index: 11;
}

.app.side-panel-open .side-panel {
  transform: translateX(0);
}

.side-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 36px;
  min-width: 0;
}

.side-panel-close {
  min-width: 36px;
  flex: 0 0 auto;
}

.side-panel-label {
  margin: 0;
  color: var(--muted);
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  min-width: 0;
  overflow-wrap: anywhere;
}

.side-panel-file {
  margin: 0;
  color: var(--ink);
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.2;
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.side-panel-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.side-panel-button-link {
  min-height: 36px;
  padding: 0 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #1f2937;
  border-radius: 0;
  background: #ffffff;
  color: var(--accent);
  text-decoration: none;
  font-size: 0.88rem;
}

.side-panel-actions-secondary {
  padding-top: 8px;
  border-top: 1px solid var(--line);
}

.side-panel-bookmarks {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 0;
}

.side-panel-about {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-top: 4px;
  border-top: 1px solid var(--line);
}

.side-panel-about-text {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.45;
}

.side-panel-about-meta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.side-panel-version {
  margin: 0;
  color: var(--ink);
  font-size: 0.8rem;
  font-weight: 600;
}

.side-panel-about-link {
  align-self: flex-start;
  color: var(--accent);
  font-size: 0.78rem;
  text-decoration: underline;
}

.side-panel-section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.side-panel-info-button {
  flex: 0 0 20px;
  width: 20px;
  height: 20px;
  min-width: 20px;
  min-height: 20px;
  padding: 0;
  border: 1px solid #d1d5db;
  border-radius: 999px;
  background: #ffffff;
  color: #6b7280;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: center;
  line-height: 1;
  font-size: 0.72rem;
  font-weight: 700;
  transition:
    background 140ms ease,
    border-color 140ms ease,
    color 140ms ease,
    transform 140ms ease;
}

.side-panel-info-button:hover {
  color: var(--ink);
  border-color: #9ca3af;
  background: #f9fafb;
}

.side-panel-info-button:focus-visible {
  outline: 2px solid #111827;
  outline-offset: 2px;
}

.bookmarks-empty {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
}

.bookmarks-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  height: 180px;
  overflow: auto;
}

.bookmark-item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.bookmark-content {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.bookmark-link {
  min-height: 24px;
  padding: 0;
  justify-content: flex-start;
  text-align: left;
  border: 0;
  background: transparent;
  color: var(--ink);
}

.bookmark-note-text {
  margin: 0;
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.35;
  text-align: left;
  overflow-wrap: anywhere;
}

.bookmark-actions {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.bookmark-remove {
  flex: 0 0 auto;
  min-width: 24px;
  min-height: 24px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--muted);
}

.bookmark-rename {
  flex: 0 0 auto;
  min-width: 24px;
  min-height: 24px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--muted);
}

.side-panel-feedback {
  min-height: 1.1rem;
  margin: 0;
  color: var(--muted);
  font-size: 0.78rem;
}

.side-panel-actions button,
.side-panel-actions a,
.side-panel > button,
.side-panel-close {
  min-height: 36px;
  padding: 0 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.88rem;
}

.bookmark-link,
.bookmark-remove,
.bookmark-rename {
  display: inline-flex;
  align-items: center;
}


.book {
  position: relative;
  width: min(100%, 980px);
  aspect-ratio: 16 / 9.7;
  margin: 0 auto;
  perspective: var(--perspective);
}

.app.is-embedded .book {
  width: min(100%, 1600px);
  height: calc(100vh - 78px);
  max-height: 100%;
  aspect-ratio: auto;
}

.spread {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.book.is-cover .spread {
  grid-template-columns: 1fr;
}

.page,
.flip-face {
  position: relative;
  overflow: hidden;
  background: var(--paper);
  border: 1px solid var(--line);
  box-shadow: 0 2px 8px var(--shadow);
}

.page.can-turn {
  cursor: pointer;
}

.page-left {
  border-radius: 0;
}

.page-right {
  border-radius: 0;
}

.book.is-cover .page-right {
  width: 50%;
  margin-left: auto;
  margin-right: 0;
  border-radius: 0;
}

.page::after,
.flip-face::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(
    90deg,
    rgba(17, 24, 39, 0.012),
    transparent 10%,
    transparent 90%,
    rgba(17, 24, 39, 0.02)
  );
}

.page.can-turn:hover::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background: linear-gradient(
    90deg,
    rgba(17, 24, 39, 0.04),
    transparent 24%,
    transparent 76%,
    rgba(17, 24, 39, 0.04)
  );
}

.page canvas,
.flip-face canvas {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.placeholder {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  padding: 24px;
  text-align: center;
  color: var(--muted);
  font-size: 0.95rem;
}

.flip-sheet {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 50%;
  z-index: 5;
  transform-style: preserve-3d;
  overflow: visible;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

.flip-sheet.hidden {
  display: none;
}

.flip-sheet.next {
  right: 0;
  transform-origin: left center;
}

.flip-sheet.prev {
  left: 0;
  transform-origin: right center;
}

.flip-sheet.next.flipping {
  animation: flip-next var(--flip-duration) linear forwards;
}

.flip-sheet.prev.flipping {
  animation: flip-prev var(--flip-duration) linear forwards;
}

.flip-face {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  transform: translateZ(0.1px);
  transform-style: preserve-3d;
}

.flip-sheet.next .flip-face {
  border-radius: 0;
}

.flip-sheet.prev .flip-face {
  border-radius: 0;
}

.flip-back {
  transform: rotateY(180deg) translateZ(0.1px);
}

.loading-panel {
  position: absolute;
  inset: 18px;
  display: grid;
  place-items: center;
  gap: 12px;
  background: rgba(255, 255, 255, 0.94);
  border-radius: 0;
}

.loading-panel.hidden {
  display: none;
}

.choice-dialog {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(17, 24, 39, 0.28);
  z-index: 20;
}

.choice-dialog.hidden {
  display: none;
}

.page-editor-dialog {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 12px;
  background: rgba(17, 24, 39, 0.28);
  z-index: 21;
}

.page-editor-dialog.hidden {
  display: none;
}

.page-editor-card {
  width: min(100%, 920px);
  max-height: calc(100% - 24px);
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px;
  background: #ffffff;
  border: 1px solid #1f2937;
  box-shadow: 0 10px 28px rgba(17, 24, 39, 0.12);
  overflow: hidden;
}

.page-editor-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding-right: 40px;
  position: relative;
}

.page-editor-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.page-editor-toolbar-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.page-editor-button-group {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.page-editor-button-group + .page-editor-button-group {
  padding-left: 10px;
  margin-left: 2px;
  border-left: 1px solid var(--line);
}

.page-editor-status {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  min-width: 0;
}

.page-editor-selection {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
}

.page-editor-feedback {
  margin: 0;
  color: var(--muted);
  font-size: 0.8rem;
}

.page-editor-unsaved {
  margin: 0;
  color: var(--muted);
  font-size: 0.8rem;
}

.page-editor-unsaved.hidden {
  display: none;
}

.page-editor-grid {
  flex: 1 1 auto;
  min-height: 340px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  align-content: start;
  align-items: start;
  gap: 12px;
  overflow: auto;
  padding-right: 4px;
}

.page-editor-tile {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--line);
  background: #ffffff;
  cursor: grab;
  user-select: none;
  transition: border-color 140ms ease, background 140ms ease, box-shadow 140ms ease;
}

.page-editor-tile:hover {
  border-color: #9ca3af;
  background: #fcfcfd;
  box-shadow: 0 6px 16px rgba(17, 24, 39, 0.06);
}

.page-editor-tile.is-dragging {
  opacity: 0.45;
}

.page-editor-tile.is-selected {
  border-color: #111827;
  background: #f9fafb;
}

.page-editor-tile.is-drop-before::before,
.page-editor-tile.is-drop-after::after {
  content: "";
  position: absolute;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: #111827;
}

.page-editor-tile.is-drop-before::before {
  left: -7px;
}

.page-editor-tile.is-drop-after::after {
  right: -7px;
}

.page-editor-thumb {
  aspect-ratio: 3 / 4;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: #f9fafb;
  border: 1px solid var(--line);
}

.page-editor-thumb canvas {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.page-editor-tile-top {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.page-editor-label {
  margin: 0;
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 600;
  text-align: center;
}

.page-editor-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.page-editor-actions button:disabled,
.page-editor-toolbar button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.choice-dialog-card {
  position: relative;
  width: min(100%, 480px);
  max-width: 100%;
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 16px;
  background: #ffffff;
  border: 1px solid #1f2937;
  box-shadow: 0 10px 28px rgba(17, 24, 39, 0.12);
}

.choice-dialog-close {
  position: absolute;
  top: 10px;
  right: 10px;
  min-width: 28px;
  min-height: 28px;
  padding: 0;
}

.choice-dialog-title {
  margin: 0 0 8px;
  color: var(--ink);
  font-size: 0.98rem;
  font-weight: 700;
}

.choice-dialog-message {
  margin: 0;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.45;
}

.choice-dialog-input {
  width: 100%;
  min-height: 36px;
  margin-top: 12px;
  padding: 8px 10px;
  border: 1px solid #1f2937;
  border-radius: 0;
  background: #ffffff;
  color: var(--ink);
}

.choice-dialog-input.hidden {
  display: none;
}

.choice-dialog-options {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.choice-dialog-options.hidden {
  display: none;
}

.choice-dialog-options-group {
  display: flex;
  gap: 8px;
}

.choice-dialog-options-group-checkbox {
  width: 100%;
}

.choice-dialog-option {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--ink);
  font-size: 0.84rem;
}

.choice-dialog-option input {
  margin: 0;
}

.choice-dialog-content {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 12px;
  min-height: 0;
}

.choice-dialog-content.hidden {
  display: none;
}

.choice-dialog-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.choice-dialog-tab {
  min-height: 32px;
  padding: 0 10px;
  border: 1px solid var(--line);
  background: #ffffff;
  color: var(--muted);
}

.choice-dialog-tab.is-active {
  border-color: #1f2937;
  background: #f3f4f6;
  color: var(--ink);
}

.choice-dialog-tab-panel {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.choice-dialog-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.choice-dialog-field-label {
  color: var(--muted);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.choice-dialog-share-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.choice-dialog-share-row button {
  min-height: 36px;
  padding: 0 12px;
}

.choice-dialog-share-row .choice-dialog-share-link {
  flex: 1 1 auto;
  min-width: 0;
}

.choice-dialog-embed-label {
  margin: 0;
  color: var(--muted);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.choice-dialog-embed-code {
  width: 100%;
  min-height: 84px;
  padding: 10px;
  border: 1px solid #1f2937;
  border-radius: 0;
  background: #ffffff;
  color: var(--ink);
  font: inherit;
  font-size: 0.8rem;
  line-height: 1.35;
  resize: vertical;
}

.choice-dialog-share-link {
  min-height: 36px;
  height: 36px;
  padding: 8px 10px;
  line-height: 1.2;
  resize: none;
  white-space: nowrap;
  overflow-x: hidden;
  overflow-y: hidden;
  text-overflow: ellipsis;
  scrollbar-width: none;
}

.choice-dialog-share-link::-webkit-scrollbar {
  display: none;
}

.choice-dialog-icon-button {
  min-width: 36px;
  padding: 0;
  justify-content: center;
  flex: 0 0 auto;
  font-size: 0.95rem;
}

.choice-dialog-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 14px;
}

.choice-dialog-actions button {
  min-height: 36px;
  justify-content: flex-start;
  padding: 0 12px;
}

.select-file-button.hidden {
  display: none;
}

.select-file-button {
  min-width: auto;
  min-height: auto;
  padding: 8px 12px;
}

.spinner {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  border: 3px solid rgba(17, 24, 39, 0.12);
  border-top-color: var(--accent);
  animation: spin 0.9s linear infinite;
}

.controls {
  position: static;
  width: min(100%, 980px);
  padding: 6px 8px;
  margin-top: 8px;
  margin-left: auto;
  margin-right: auto;
  z-index: 8;
  transition: opacity 180ms ease, transform 180ms ease;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid var(--line);
  box-shadow: 0 4px 18px rgba(17, 24, 39, 0.08);
}

.app.is-embedded .controls {
  margin-top: 6px;
}

.controls-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.controls-toggle {
  display: inline-flex;
}

.side-panel-close,
.side-panel-actions a {
  border: 1px solid #1f2937;
  border-radius: 0;
  background: #ffffff;
  color: var(--accent);
  text-decoration: none;
}

#bookmarkButton.is-active {
  background: #111827;
  color: #ffffff;
}

.bookmark-link:hover,
.bookmark-link:focus-visible,
.bookmark-rename:hover,
.bookmark-rename:focus-visible,
.bookmark-remove:hover,
.bookmark-remove:focus-visible {
  background: transparent;
}

.bookmark-link:hover,
.bookmark-link:focus-visible {
  text-decoration: underline;
}

.bookmark-rename:hover,
.bookmark-rename:focus-visible,
.bookmark-remove:hover,
.bookmark-remove:focus-visible {
  color: var(--ink);
}

button,
select {
  border: 1px solid #1f2937;
  border-radius: 0;
  background: #ffffff;
  color: var(--accent);
  padding: 5px 10px;
  line-height: 1.1;
  font-size: 0.88rem;
}

.controls button {
  min-width: 34px;
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  font-size: 0.95rem;
}

button:hover,
select:hover {
  background: #f9fafb;
  cursor: pointer;
}

button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
}

button:disabled:hover {
  background: #ffffff;
}

#spreadSlider {
  flex: 1;
  min-width: 0;
  accent-color: #374151;
}

.status {
  margin: 0;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.05;
  font-weight: 500;
  margin-left: auto;
  min-width: 2.5rem;
  text-align: right;
}

.app:fullscreen {
  width: 100vw;
  height: 100vh;
  max-width: none;
  padding: 12px;
  border-radius: 0;
  border: 0;
  background: #f3f4f6;
  box-shadow: none;
}

.app:fullscreen .book {
  width: min(100%, 1600px);
  height: calc(100vh - 24px);
  max-height: 100%;
}

.app:fullscreen .controls {
  position: absolute;
  left: 12px;
  right: 12px;
  width: auto;
  bottom: 12px;
  margin-top: 0;
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  box-shadow: 0 4px 18px rgba(17, 24, 39, 0.08);
}

.app:fullscreen.show-controls .controls,
.app:fullscreen .controls:hover,
.app:fullscreen .controls:focus-within {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

@keyframes flip-next {
  from {
    transform: rotateY(0deg) scaleX(1);
  }
  50% {
    transform: rotateY(-90deg) scaleX(0.985);
  }
  to {
    transform: rotateY(-180deg) scaleX(1);
  }
}

@keyframes flip-prev {
  from {
    transform: rotateY(0deg) scaleX(1);
  }
  50% {
    transform: rotateY(90deg) scaleX(0.985);
  }
  to {
    transform: rotateY(180deg) scaleX(1);
  }
}

@media (max-width: 860px) {
  .app {
    width: min(100vw - 16px, 1120px);
    margin: 8px auto;
    padding: 12px 8px;
  }

  .book {
    width: min(100%, calc((100svh - 150px) * (16 / 9.7)));
    height: min(calc(100svh - 150px), calc((100vw - 16px) / (16 / 9.7)));
    aspect-ratio: auto;
  }

  .controls-row {
    flex-wrap: nowrap;
    gap: 6px;
  }

  .status {
    width: auto;
    margin-left: 0;
    min-width: max-content;
    white-space: nowrap;
    text-align: right;
    font-size: 0.74rem;
  }

  .controls {
    padding: 7px 8px;
  }

  .side-panel {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: min(84vw, 320px);
    height: 100dvh;
    padding-top: max(14px, env(safe-area-inset-top));
    padding-bottom: max(14px, env(safe-area-inset-bottom));
    border-right: 1px solid var(--line);
    box-shadow: 0 10px 30px rgba(17, 24, 39, 0.12);
  }

  .choice-dialog,
  .page-editor-dialog {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100dvh;
    padding: 10px;
  }

  .choice-dialog-card {
    width: min(100%, 420px);
    max-height: calc(100dvh - 20px);
    overflow: auto;
    padding: 14px;
  }

  .choice-dialog-share-row {
    flex-wrap: nowrap;
  }

  .choice-dialog-share-row button {
    flex: 0 0 auto;
  }

  .choice-dialog-embed-code {
    min-height: 72px;
  }

  .page-editor-card {
    width: min(100%, 100%);
    max-height: calc(100dvh - 20px);
  }

  .app:fullscreen .controls {
    left: 8px;
    right: 8px;
    bottom: 8px;
  }

  .app:fullscreen .controls {
    display: block;
  }
}
