:root {
  --bg: #f7f8fa;
  --paper: #fff;
  --ink: #1f302e;
  --muted: #83908e;
  --line: #e4e9e6;
  --green: #276455;
  --light: #eaf1ed;
  --danger: #b2574e;
  font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  color: var(--ink);
  font-synthesis: none;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--bg);
  font-size: 14px;
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a,
input,
select,
textarea {
  -webkit-tap-highlight-color: transparent;
}
button,
a {
  touch-action: manipulation;
}
button {
  cursor: pointer;
}
button:disabled {
  opacity: 0.5;
  cursor: wait;
}
a {
  color: inherit;
  text-decoration: none;
}
button {
  color: inherit;
}
button:focus-visible,
a:focus-visible,
summary:focus-visible {
  outline: 3px solid #6fa28e;
  outline-offset: 3px;
}
h1,
h2,
h3,
p {
  margin: 0;
}
.lucide {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  vertical-align: middle;
  pointer-events: none;
}
[hidden] {
  display: none !important;
}
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border: 1px solid var(--line);
  background: var(--paper);
  padding: 11px 17px;
  border-radius: 10px;
  line-height: 1.25;
  font-weight: 500;
  transition:
    background 0.16s,
    border-color 0.16s,
    transform 0.16s;
  white-space: nowrap;
}
.button:hover {
  background: var(--hover);
  border-color: var(--border-hover);
}
.button:active {
  transform: translateY(1px);
}
.button.primary {
  background: var(--green);
  color: white;
  border-color: var(--green);
}
.button.primary:hover {
  background: #1d5143;
}
.button.subtle {
  border-color: transparent;
  background: transparent;
}
.icon-button {
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  color: #82918c;
  cursor: pointer;
}
.icon-button:hover {
  background: var(--hover);
  color: var(--green);
}
.icon-button .lucide {
  width: 18px;
  height: 18px;
}
.danger {
  color: var(--danger) !important;
}
.button.danger-button {
  border-color: #a84e46;
  background: var(--danger);
  color: #fff;
}
.button.danger-button:hover {
  border-color: #954139;
  background: #a84e46;
}
.button.danger:disabled {
  opacity: 0.45;
  cursor: default;
}
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 226px;
  background: var(--paper);
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  padding: 36px 21px 21px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 22px;
  font-weight: 650;
  letter-spacing: 1px;
  padding-left: 13px;
  color: #285d50;
}
.brand .lucide {
  width: 27px;
  height: 27px;
}
.sidebar nav {
  display: flex;
  flex-direction: column;
  gap: 9px;
  margin-top: 48px;
}
.nav-item {
  border: 0;
  border-radius: 10px;
  display: flex;
  align-items: center;
  gap: 12px;
  background: transparent;
  color: #7f8d89;
  width: 100%;
  padding: 13px 15px;
  text-align: left;
  font-size: 14px;
}
.nav-item:hover {
  background: var(--hover);
}
.nav-item.active {
  color: var(--accent-ink);
  background: var(--light);
  font-weight: 600;
}
.nav-item .lucide {
  width: 19px;
  height: 19px;
}
.nav-item small {
  margin-left: auto;
  font-size: 12px;
  font-weight: 400;
  opacity: 0.7;
}
.account {
  margin-top: 8px;
  border-top: 1px solid var(--line);
  padding: 21px 0 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.sidebar-theme {
  align-self: stretch;
  box-sizing: border-box;
  width: 100%;
  margin-top: auto;
  padding: 4px;
  display: flex;
  align-items: center;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--soft);
}
.sidebar-theme button {
  width: auto;
  height: 34px;
  flex: 1;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  transition: 0.15s ease;
}
.sidebar-theme button:hover {
  color: var(--ink);
  background: var(--hover);
}
.sidebar-theme button[aria-selected="true"] {
  color: var(--accent-ink);
  background: var(--paper);
  box-shadow: 0 1px 4px #183d2d17;
}
.sidebar-theme svg {
  width: 16px;
  height: 16px;
}
.account-name {
  display: flex;
  align-items: center;
  gap: 0;
  flex: 1;
  min-width: 0;
  border: 0;
  border-radius: 10px;
  background: transparent;
  text-align: left;
  padding: 9px 10px;
  font-size: 13px;
  transition:
    background 0.18s,
    color 0.18s;
}
.account-name:hover {
  background: var(--hover);
}
.account-copy {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.account-settings-icon {
  display: none;
}
.account > .icon-button {
  flex: none;
}
.avatar {
  width: 34px;
  height: 34px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  background: #e5eee7;
  color: #44785f;
  font-weight: 600;
  flex: none;
}
.account-name small {
  display: block;
  font-size: 10px;
  color: #a4aca8;
  margin-top: 4px;
}
.library {
  margin-left: 226px;
  padding: 47px 54px;
  max-width: 1840px;
}
.library-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 25px;
}
.eyebrow {
  color: #a0aaa5;
  font-size: 12px;
  margin-bottom: 10px;
  letter-spacing: 1px;
}
.library-header h1 {
  font-size: 29px;
  font-weight: 600;
  letter-spacing: -0.6px;
}
.header-actions {
  display: flex;
  gap: 10px;
}
.library-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 34px 0 27px;
  gap: 20px;
}
.trash-kind-tabs {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 28px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--soft);
}
.trash-kind-tabs button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 88px;
  height: 36px;
  padding: 0 14px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 13px;
  cursor: pointer;
  transition:
    color 0.16s ease,
    background 0.16s ease,
    box-shadow 0.16s ease;
}
.trash-kind-tabs button:hover {
  color: var(--ink);
}
.trash-kind-tabs button[aria-selected="true"] {
  background: var(--paper);
  color: var(--accent-ink);
  box-shadow: 0 1px 4px #17362912;
}
.trash-kind-tabs small {
  display: inline-grid;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  place-items: center;
  border-radius: 999px;
  background: color-mix(in srgb, currentColor 9%, transparent);
  font-size: 11px;
  line-height: 1;
}
.search {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 320px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 0 13px;
  height: 41px;
  color: #a5afa9;
}
.search .lucide {
  width: 17px;
  height: 17px;
}
.search input {
  border: 0;
  background: transparent;
  outline: none;
  flex: 1;
  min-width: 0;
  color: var(--ink);
  font-size: 13px;
}
.search input::placeholder {
  color: #a9b2ae;
}
#sort {
  width: 130px;
  background: transparent;
  color: #75867e;
  border: 0;
  font-size: 12px;
}
.deck-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 25px;
}
.room-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-top: 34px;
}
.room-list-card {
  min-width: 0;
  display: grid;
  gap: 18px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--paper);
  box-shadow: 0 5px 18px #17362908;
}
.room-list-status,
.room-list-main,
.room-list-meta,
.room-list-link,
.room-permission-tags {
  display: flex;
  align-items: center;
}
.room-list-status {
  gap: 8px;
  color: var(--muted);
  font-size: 11px;
}
.room-list-status > i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #a8b2ad;
  box-shadow: 0 0 0 4px color-mix(in srgb, #a8b2ad 14%, transparent);
}
.room-list-status > i.live {
  background: #43a477;
  box-shadow: 0 0 0 4px #43a47718;
}
.room-list-status em {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
  padding: 4px 8px;
  border-radius: 999px;
  background: var(--soft);
  color: var(--muted);
  font-size: 10px;
  font-style: normal;
}
.room-list-status em svg {
  width: 12px;
  height: 12px;
}
.room-list-main {
  justify-content: space-between;
  gap: 18px;
}
.room-list-main > div {
  min-width: 0;
}
.room-list-main h2 {
  margin: 0;
  overflow: hidden;
  color: var(--ink);
  font-size: 18px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.room-list-main p {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 12px;
}
.room-list-main .button {
  flex: none;
}
.room-list-main .button svg {
  width: 15px;
}
.room-list-meta {
  flex-wrap: wrap;
  gap: 8px 13px;
  color: var(--muted);
  font-size: 10px;
}
.room-permission-tags {
  flex-wrap: wrap;
  gap: 5px;
  margin-right: auto;
}
.room-permission-tags span {
  padding: 4px 7px;
  border-radius: 6px;
  background: var(--light);
  color: var(--accent-ink);
}
.room-list-link {
  min-width: 0;
  gap: 6px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}
.room-list-link code {
  min-width: 0;
  flex: 1;
  overflow: hidden;
  color: var(--muted);
  font-family: inherit;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.room-list-link .icon-button {
  flex: none;
}
.room-empty {
  grid-column: 1 / -1;
  min-height: 380px;
}
.room-empty > svg {
  width: 34px;
  height: 34px;
}
.room-empty p {
  color: var(--muted);
  font-size: 12px;
}
.deck-card {
  position: relative;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 15px;
  overflow: visible;
  min-width: 0;
  box-shadow: 0 3px 9px #102e1803;
  transition:
    box-shadow 0.18s,
    translate 0.18s;
}
.deck-card:hover {
  box-shadow: 0 8px 25px #234c3910;
  translate: 0 -2px;
}
.deck-card:has(.card-more[open]) {
  z-index: 3;
}
.deck-preview {
  position: relative;
  aspect-ratio: 16/9;
  background: #e5eae7;
  overflow: hidden;
  border-radius: 14px 14px 0 0;
}
.deck-preview iframe {
  width: 100%;
  height: 100%;
  border: 0;
  pointer-events: none;
  display: block;
}
.preview-link {
  position: absolute;
  inset: 0;
  z-index: 1;
  border-radius: inherit;
}
.page-count {
  position: absolute;
  bottom: 12px;
  right: 12px;
  background: #152b369c;
  color: #f5f8f7;
  font-size: 10px;
  padding: 4px 7px;
  border-radius: 5px;
  backdrop-filter: blur(8px);
  pointer-events: none;
}
.card-info {
  padding: 20px 20px 11px;
}
.card-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.card-title-row h2 {
  font-size: 16px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
  line-height: 1.45;
}
.card-more {
  position: relative;
  z-index: 3;
}
.card-actions a,
.card-actions button {
  position: relative;
  z-index: 2;
}
.card-more summary {
  display: grid;
  place-items: center;
  width: 27px;
  height: 26px;
  border-radius: 6px;
  color: #a2aca6;
  cursor: pointer;
  list-style: none;
}
.card-more summary::-webkit-details-marker {
  display: none;
}
.card-more summary:hover,
.card-more[open] summary {
  background: var(--light);
  color: var(--green);
}
.card-menu {
  position: absolute;
  right: 0;
  top: 30px;
  z-index: 8;
  border: 1px solid var(--line);
  background: var(--paper);
  box-shadow: 0 8px 28px #15351d17;
  border-radius: 10px;
  padding: 6px;
  min-width: 160px;
}
.card-menu button {
  width: 100%;
  border: 0;
  background: transparent;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 11px 10px;
  border-radius: 6px;
  text-align: left;
  font-size: 12px;
}
.card-menu button:hover {
  background: var(--hover);
}
.card-menu .lucide {
  width: 16px;
  height: 16px;
}
.card-meta {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-top: 12px;
  font-size: 11px;
  color: #9eaaa4;
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--soft);
  padding: 4px 7px;
  border-radius: 5px;
  font-size: 10px;
  color: #8a9790;
}
.badge .lucide {
  width: 11px;
  height: 11px;
}
.badge.shared {
  color: #5a856e;
  background: #edf5ec;
}
.card-actions {
  border-top: 1px solid var(--line);
  margin-top: 19px;
  padding-top: 9px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.card-actions > div {
  display: flex;
  gap: 4px;
}
.present-link {
  display: flex;
  gap: 7px;
  align-items: center;
  color: var(--accent-ink);
  font-size: 12px;
  font-weight: 500;
  padding: 6px 0;
}
.present-link .lucide {
  width: 17px;
  height: 17px;
}
.empty-state {
  grid-column: 1/-1;
  text-align: center;
  padding: 115px 20px;
  color: #9ba9a2;
}
.empty-state > .lucide {
  width: 43px;
  height: 43px;
  stroke-width: 1.1;
}
.empty-state h2 {
  font-size: 17px;
  font-weight: 400;
  margin-top: 20px;
  color: #7d9084;
}
.empty-state .button {
  margin-top: 25px;
}
.destructive-confirm {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 16px;
  border: 1px solid #b2574e2b;
  border-radius: 12px;
  background: #b2574e0a;
}
.destructive-confirm > span {
  width: 38px;
  height: 38px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: #b2574e12;
  color: var(--danger);
}
.destructive-confirm > span .lucide {
  width: 18px;
  height: 18px;
}
.destructive-confirm p {
  margin: 1px 0 6px;
  color: var(--ink);
  line-height: 1.6;
}
.destructive-confirm small {
  display: block;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
}
.archived-cover {
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 25px;
  color: #7c9588;
  background: var(--soft);
}
.archived-cover > .lucide {
  width: 34px;
  height: 34px;
}
.archived-cover h2 {
  font-size: 19px;
  margin-top: 15px;
  text-align: center;
  font-weight: 500;
}
.boot {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #84978d;
  gap: 15px;
}
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 90px 25px;
}
.auth-brand {
  position: absolute;
  top: 36px;
  left: 43px;
}
.auth-card {
  width: 400px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 36px;
  box-shadow: 0 15px 70px #274c3010;
}
.auth-symbol {
  background: var(--soft);
  color: #5a886b;
  display: grid;
  place-items: center;
  width: 47px;
  height: 47px;
  border-radius: 13px;
  margin-bottom: 25px;
}
.auth-symbol .lucide {
  width: 24px;
  height: 24px;
}
.auth-card h1 {
  font-size: 26px;
  font-weight: 600;
}
.auth-card > p {
  font-size: 12px;
  color: #98a69e;
  line-height: 1.7;
  margin-top: 12px;
  margin-bottom: 29px;
}
.auth-card .button {
  width: 100%;
  justify-content: space-between;
  margin-top: 10px;
}
.auth-card label {
  margin-top: 17px;
}
label {
  font-size: 12px;
  color: var(--secondary);
  display: block;
  font-weight: 500;
}
label > input:not([type="checkbox"]),
label > textarea,
label > select {
  display: block;
  margin-top: 8px;
  width: 100%;
}
input:not([type="checkbox"]),
textarea,
select {
  border: 1px solid var(--line);
  background: var(--paper);
  border-radius: 8px;
  padding: 11px 12px;
  color: var(--ink);
  outline: none;
  min-width: 0;
  transition:
    border-color 0.15s,
    box-shadow 0.15s;
}
input:focus,
textarea:focus,
select:focus {
  border-color: #7aa18b;
  box-shadow: 0 0 0 3px #5d8b6810;
}
input::placeholder,
textarea::placeholder {
  color: var(--muted);
}
textarea {
  resize: vertical;
}
.form-error {
  font-size: 12px;
  color: var(--danger);
  line-height: 1.7;
  margin-top: 12px;
  min-height: 0;
}
.form-error:empty {
  display: none;
}
#toast {
  position: fixed;
  bottom: 27px;
  left: 50%;
  transform: translate(-50%, 10px);
  border: 1px solid #ffffff30;
  background: #294d3ff5;
  color: #f5f9f6;
  padding: 12px 20px;
  border-radius: 11px;
  box-shadow: 0 6px 24px #102e2225;
  font-size: 13px;
  opacity: 0;
  pointer-events: none;
  z-index: 100;
  transition:
    opacity 0.18s,
    transform 0.18s;
  max-width: 90vw;
}
#toast.visible {
  opacity: 1;
  transform: translate(-50%, 0);
}
#exportNotifications {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 105;
  width: min(410px, calc(100vw - 32px));
  display: grid;
  gap: 10px;
  pointer-events: none;
}
.export-notice {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 11px;
  padding: 13px 13px 13px 14px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: color-mix(in srgb, var(--paper) 94%, transparent);
  color: var(--ink);
  box-shadow: 0 15px 48px #17392b28;
  backdrop-filter: blur(22px) saturate(120%);
  pointer-events: auto;
  animation: export-notice-in 180ms ease-out both;
}
.export-notice-icon {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  background: var(--light);
  color: var(--green);
}
.export-notice.error .export-notice-icon {
  background: #fff0ee;
  color: var(--danger);
}
.export-notice-icon .lucide {
  width: 19px;
  height: 19px;
}
.export-notice > div {
  min-width: 0;
}
.export-notice b,
.export-notice small {
  display: block;
}
.export-notice b {
  font-size: 14px;
}
.export-notice small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}
.export-notice > .button {
  min-height: 34px;
  padding: 7px 14px;
}
.export-notice > .icon-button {
  width: 32px;
  height: 32px;
}
@keyframes export-notice-in {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.98);
  }
}
@media (max-width: 600px) {
  #exportNotifications {
    right: 16px;
    bottom: 16px;
  }
  .export-notice {
    grid-template-columns: 36px minmax(0, 1fr) auto;
  }
  .export-notice > .button {
    grid-column: 2;
    justify-self: start;
  }
}
dialog {
  border: 1px solid #ffffffa0;
  background: var(--paper);
  border-radius: 19px;
  padding: 27px 29px;
  max-height: calc(100dvh - 60px);
  width: 510px;
  max-width: calc(100vw - 32px);
  box-shadow: 0 30px 120px #17392b29;
  overflow: auto;
  color: var(--ink);
}
dialog[open] {
  animation: dialog-in 0.22s cubic-bezier(0.2, 0.7, 0.2, 1);
}
dialog::backdrop {
  background: #20372b50;
  backdrop-filter: blur(4px);
}
dialog.closing {
  animation: dialog-out 0.14s ease-in forwards;
}
dialog.wide {
  width: 700px;
}
.version-dialog {
  width: min(1080px, calc(100vw - 32px));
  overflow: hidden;
}
.version-dialog .dialog-body {
  margin: 0 -29px -27px;
}
.version-history {
  display: grid;
  grid-template-columns: 270px minmax(0, 1fr);
  min-height: 560px;
  border-top: 1px solid var(--line);
}
.revision-list {
  padding: 14px 10px;
  border-right: 1px solid var(--line);
  overflow: auto;
  max-height: 560px;
}
.revision-item {
  border: 0;
  background: transparent;
  width: 100%;
  padding: 12px 13px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  text-align: left;
  color: var(--ink);
  cursor: pointer;
}
.revision-item:hover,
.revision-item.active {
  background: var(--soft);
}
.revision-item.active {
  box-shadow: inset 0 0 0 1px var(--line);
}
.revision-item b,
.revision-item small {
  display: block;
}
.revision-item b {
  font-size: 13px;
  font-weight: 600;
}
.revision-item small {
  color: var(--muted);
  margin-top: 5px;
}
.revision-item em {
  font-size: 10px;
  color: var(--accent-ink);
  background: var(--accent-soft);
  border-radius: 999px;
  padding: 4px 7px;
  font-style: normal;
}
.revision-preview {
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: var(--paper);
  padding: 18px;
  gap: 14px;
}
.revision-preview-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.revision-preview-heading b,
.revision-preview-heading small {
  display: block;
}
.revision-preview-heading b {
  font-size: 14px;
}
.revision-preview-heading small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
}
.revision-preview-stage {
  position: relative;
  flex: 0 0 auto;
  width: 100%;
  aspect-ratio: var(--revision-aspect, 16 / 9);
  min-height: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: #f2f4f3;
  box-shadow: 0 12px 30px #17392b17;
}
.revision-preview iframe {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 0;
  border: 0;
  background: white;
  opacity: 1;
  transition: opacity 0.16s;
}
.revision-preview-stage[aria-busy="true"] iframe {
  opacity: 0;
}
.revision-preview-loading {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 12px;
  pointer-events: none;
  opacity: 0;
}
.revision-preview-stage[aria-busy="true"] .revision-preview-loading {
  opacity: 1;
}
.revision-preview-footer {
  display: flex;
  min-height: 42px;
  align-items: center;
  gap: 12px;
  font-size: 12px;
  color: var(--muted);
}
.revision-preview-footer .button {
  margin-left: auto;
}
.revision-page-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  font-variant-numeric: tabular-nums;
}
.revision-page-controls .icon-button {
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  background: var(--paper);
}
.revision-page-controls span {
  min-width: 54px;
  text-align: center;
}
.revision-current {
  color: var(--accent-ink);
}
@media (max-width: 900px) {
  .version-dialog {
    width: calc(100vw - 20px);
    max-width: none;
  }
  .version-history {
    grid-template-columns: 1fr;
    grid-template-rows: auto minmax(0, 1fr);
    min-height: min(720px, calc(100dvh - 120px));
  }
  .revision-list {
    display: flex;
    gap: 8px;
    padding: 10px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    max-height: none;
    overflow-x: auto;
    overscroll-behavior-x: contain;
  }
  .revision-item {
    min-width: 190px;
    flex: 0 0 190px;
  }
}
@media (max-width: 560px) {
  .version-dialog {
    max-height: calc(100dvh - 16px);
    padding: 20px 18px;
  }
  .version-dialog .dialog-body {
    margin: 0 -18px -20px;
  }
  .version-history {
    min-height: calc(100dvh - 94px);
  }
  .revision-preview {
    padding: 12px;
  }
  .revision-preview-heading .button {
    padding: 9px 10px;
    font-size: 11px;
  }
  .revision-preview-footer {
    flex-wrap: wrap;
  }
  .revision-preview-footer .button {
    margin-left: auto;
  }
}
.dialog-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 26px;
}
.dialog-head h2 {
  font-size: 20px;
  font-weight: 600;
}
.dialog-head > .icon-button {
  background: var(--soft);
  color: #a1aea5;
  border: 1px solid var(--line);
  width: 31px;
  height: 31px;
  border-radius: 9px;
}
.dialog-head > .icon-button:hover {
  background: var(--hover);
  color: var(--accent-ink);
}
.dialog-body > label + label {
  margin-top: 21px;
}
.dialog-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 28px;
}
.share-deck {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 17px;
  border: 1px solid var(--line);
  background: var(--soft);
  border-radius: 11px;
  margin-bottom: 24px;
}
.share-deck > .lucide {
  color: #89a289;
}
.share-deck strong {
  font-size: 13px;
  font-weight: 500;
}

.new-link {
  margin-top: 23px;
  border-top: 1px solid var(--line);
  padding-top: 22px;
}
.two-fields {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 130px);
  gap: 15px;
}
.checkbox {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 20px 0;
  font-weight: 400;
}
.checkbox input {
  accent-color: var(--green);
}
.new-link > .button {
  width: 100%;
  padding: 12px;
}
.share-list {
  max-height: 300px;
  overflow: auto;
}
.share-item {
  min-width: 0;
}
.share-item b {
  font-size: 13px;
  font-weight: 600;
}
.share-item-actions {
  display: flex;
  align-items: center;
}
.import-file {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 16px;
  background: var(--soft);
  border-radius: 9px;
  margin: 20px 0;
  color: #80957f;
  font-size: 12px;
}
.import-file small {
  margin-left: auto;
  white-space: nowrap;
}
.import-file span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.editor {
  height: 100dvh;
  display: flex;
  flex-direction: column;
}
.editor-header {
  height: 56px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 12px;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}
.editor-header h1 {
  font-size: 16px;
  font-weight: 600;
}
.editor-header span {
  display: block;
  font-size: 10px;
  color: #a5b0a5;
  margin-top: 7px;
}
.editor-header span.unsaved {
  color: #b29458;
}
.editor-actions {
  margin-left: auto;
  display: flex;
  gap: 11px;
}
.present-split {
  display: flex;
  align-self: stretch;
}
.present-split > .button {
  min-height: 44px;
}
.present-split .present-main {
  border-radius: 10px 0 0 10px;
  border-right: 0;
  padding-right: 13px;
}
.present-split .present-options {
  width: 32px;
  min-width: 32px;
  padding: 0;
  gap: 0;
  border-radius: 0 10px 10px 0;
}
.present-options .lucide {
  width: 14px;
  height: 14px;
  color: var(--muted);
  transition: transform 0.16s;
}
.present-options[aria-expanded="true"] {
  background: var(--hover);
  border-color: var(--border-hover);
}
.present-options[aria-expanded="true"] .lucide {
  transform: rotate(180deg);
}
.present-menu {
  z-index: 20;
}
.present-menu a {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 42px;
  padding: 10px 11px;
  border-radius: 7px;
  font-size: 13px;
  text-align: left;
}
.present-menu a:hover,
.present-menu a:focus-visible {
  background: var(--light);
  outline: 0;
}
.editor-header .present-menu span {
  display: inline;
  margin-top: 0;
  color: var(--ink);
  font-size: 13px;
}
.present-menu .lucide {
  width: 16px;
  height: 16px;
  color: #7c9588;
}
.present-menu small {
  margin-left: auto;
  color: var(--muted);
  font-size: 11px;
}
.present-menu-label {
  margin: 5px 10px 4px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 600;
}

.editor-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  flex: 1;
  min-height: 0;
}
.source-panel {
  display: flex;
  flex-direction: column;
  min-height: 0;
  background: var(--paper);
}
.editor-tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--line);
  padding: 0 13px;
  flex-shrink: 0;
}
.editor-tabs button {
  padding: 17px 16px;
  background: transparent;
  border: 0;
  border-bottom: 2px solid transparent;
  font-size: 12px;
  color: #9aa59a;
}
.editor-tabs button[aria-selected="true"] {
  border-color: #65856b;
  color: var(--accent-ink);
  font-weight: 600;
}
.code-editor {
  border: 0;
  outline: none !important;
  box-shadow: none !important;
  border-radius: 0;
  flex: 1;
  resize: none;
  padding: 23px;
  font:
    12px/1.9 "SFMono-Regular",
    Consolas,
    monospace;
  color: #50614e;
  background: #fcfdfb;
  white-space: pre;
  tab-size: 2;
}
#assetPanel {
  overflow: auto;
  padding: 20px;
  flex: 1;
}
.asset-toolbar {
  margin-bottom: 20px;
}
.asset-toolbar .button {
  font-size: 12px;
}
.asset-item {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
}
.asset-item > img,
.font-asset {
  width: 48px;
  height: 40px;
  object-fit: contain;
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 6px;
}
.font-asset {
  display: grid;
  place-items: center;
}
.asset-item > div {
  flex: 1;
  min-width: 0;
}
.asset-item b {
  display: block;
  font-size: 12px;
  font-weight: 400;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.asset-item small {
  display: block;
  font-size: 10px;
  margin-top: 6px;
  color: #aab39f;
}
.asset-empty {
  color: #a3ae98;
  font-size: 12px;
  margin-top: 30px;
  text-align: center;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}
@keyframes dialog-in {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@keyframes dialog-out {
  to {
    opacity: 0;
    transform: translateY(6px) scale(0.99);
  }
}
@media (min-width: 1700px) {
  .deck-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}
@media (max-width: 1250px) {
  .deck-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .room-list {
    grid-template-columns: 1fr;
  }
  .library {
    padding: 38px 32px;
  }
}
@media (max-width: 800px) {
  .sidebar {
    width: 180px;
    padding: 30px 12px 17px;
  }
  .library {
    margin-left: 180px;
    padding: 32px 22px;
  }
  .header-actions {
    gap: 6px;
  }
  .header-actions .button {
    padding: 10px;
    font-size: 12px;
  }
  .library-header h1 {
    font-size: 24px;
  }
  .deck-grid {
    grid-template-columns: 1fr;
  }

  .editor-workspace {
    display: flex;
    flex-direction: column;
    overflow: auto;
  }
  .source-panel {
    min-height: 380px;
    flex: 1;
  }
  .preview-panel {
    min-height: 300px;
  }
  .editor-header {
    padding: 0 12px;
  }
  .editor-header h1 {
    max-width: 180px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .editor-actions .button {
    padding: 9px;
    font-size: 12px;
  }
}
@media (max-width: 560px) {
  .sidebar {
    position: static;
    width: auto;
    padding: 20px 20px 0;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .brand {
    font-size: 20px;
    padding-left: 0;
  }
  .sidebar nav {
    margin-top: 22px;
    display: flex;
    flex-direction: row;
    gap: 5px;
    padding-bottom: 12px;
  }
  .nav-item {
    width: auto;
    flex: 1;
    justify-content: center;
    padding: 10px 5px;
    gap: 5px;
    font-size: 11px;
  }
  .room-list {
    margin-top: 24px;
  }
  .room-list-card {
    gap: 15px;
    padding: 18px;
  }
  .room-list-main {
    align-items: flex-start;
  }
  .room-list-main .button {
    padding: 9px 10px;
    font-size: 11px;
  }
  .nav-item .lucide {
    width: 14px;
    height: 14px;
  }
  .nav-item small {
    display: none;
  }
  .account {
    position: absolute;
    top: 17px;
    right: 14px;
    padding: 0;
    border: 0;
  }
  .sidebar-theme {
    position: absolute;
    top: 17px;
    right: 92px;
    width: auto;
    min-height: 36px;
    margin: 0;
    padding: 3px;
    border: 1px solid var(--line);
    background: var(--soft);
  }
  .sidebar-theme button {
    width: 27px;
    height: 28px;
    flex: none;
  }
  .account-copy {
    display: none;
  }
  .account-name {
    padding: 5px;
    flex: none;
  }
  .account-settings-icon {
    display: grid;
    place-items: center;
    width: 29px;
    height: 29px;
  }
  .account-settings-icon svg {
    width: 17px;
  }
  .account > .icon-button {
    width: 27px;
  }
  .library {
    margin-left: 0;
    padding: 27px 20px;
  }
  .eyebrow {
    display: none;
  }
  .library-header h1 {
    font-size: 22px;
  }
  .library-toolbar {
    margin: 25px 0 22px;
  }
  .trash-kind-tabs {
    display: flex;
    margin-top: 22px;
  }
  .trash-kind-tabs button {
    flex: 1;
    min-width: 0;
    padding: 0 9px;
  }
  .search {
    width: auto;
    flex: 1;
    min-width: 0;
  }
  #sort {
    width: 94px;
    font-size: 10px;
    padding: 5px;
  }
  .deck-grid {
    gap: 22px;
  }
  .auth-brand {
    left: 25px;
    top: 27px;
  }
  .auth-card {
    padding: 29px;
  }
  .auth-page {
    padding: 80px 20px 30px;
  }
  .header-actions .lucide {
    width: 14px;
    height: 14px;
  }
  .header-actions {
    gap: 6px;
  }
  .header-actions .button {
    font-size: 11px;
    padding: 9px 10px;
    border-radius: 8px;
  }
  .dialog-body > label {
    font-size: 11px;
  }
  .two-fields {
    grid-template-columns: minmax(0, 1fr) minmax(0, 110px);
    gap: 10px;
  }
  .editor-header h1 {
    max-width: 135px;
    font-size: 13px;
  }
  .editor-actions .button .lucide {
    width: 16px;
    height: 16px;
  }
  .editor-header {
    gap: 7px;
  }
  .editor-tabs {
    padding: 0;
  }
  .editor-tabs button {
    flex: 1;
    padding: 15px 4px;
    font-size: 11px;
  }

  .preview-panel {
    padding: 20px;
  }
  .card-info {
    padding: 20px;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}

.search > input[type="search"] {
  border: 0;
  box-shadow: none;
  padding: 0;
  margin: 0;
  background: transparent;
  height: 100%;
  width: 100%;
  display: block;
}

/* Shared form geometry: every control stays inside its grid column. */
.dialog-body,
.dialog-body label,
.two-fields > * {
  min-width: 0;
}
dialog {
  overflow-x: hidden;
}
.dialog-body
  input:not([type="checkbox"]):not([type="hidden"]):not([type="file"]) {
  min-height: 44px;
  border-radius: 10px;
  font-size: 13px;
}
.dialog-body .slug-prefix input {
  border-radius: 0;
  min-height: 42px;
}
.share-dialog {
  width: 620px;
  padding: 26px 28px;
}
.share-dialog .dialog-head {
  margin-bottom: 18px;
}
.share-dialog .share-deck {
  padding: 0 0 20px;
  margin-bottom: 20px;
  background: none;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  gap: 11px;
}
.share-deck > img {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  object-fit: contain;
  flex: none;
}
.share-dialog .share-deck strong {
  min-width: 0;
  font-size: 14px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.share-dialog label {
  font-size: 12px;
  color: #718579;
}
.share-dialog .new-link {
  display: grid;
  gap: 18px;
  padding-top: 20px;
  margin-top: 20px;
}
.share-dialog .two-fields {
  grid-template-columns: minmax(0, 1fr) 138px;
  gap: 14px;
}
.share-dialog .checkbox {
  margin: 0;
  gap: 9px;
  line-height: 1.5;
  color: #5f7467;
}
.share-dialog .checkbox input {
  width: 16px;
  height: 16px;
  margin: 0;
  flex: none;
}
.share-permissions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 16px;
  margin: 18px 0;
}
.share-permissions .checkbox {
  margin: 0;
}
.share-dialog #generateLink {
  min-height: 44px;
  padding: 11px 14px;
}
.share-list-section {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}
.share-list-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.share-list-head h3 {
  margin: 0;
  color: var(--secondary);
  font-size: 13px;
  font-weight: 600;
}
.share-list-head p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 11px;
}
.share-list-head > span {
  padding: 4px 8px;
  border-radius: 999px;
  background: var(--soft);
  color: var(--muted);
  font-size: 10px;
}
.share-dialog .share-list {
  display: grid;
  gap: 9px;
  max-height: 292px;
  overflow-x: hidden;
  padding-right: 5px;
  overscroll-behavior: contain;
}
.share-dialog .share-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--paper);
}
.share-dialog .share-item.is-inactive {
  background: var(--soft);
  opacity: 0.72;
}
.share-item-main {
  flex: 1;
  min-width: 0;
}
.share-item-title {
  display: flex;
  align-items: center;
  gap: 8px;
}
.share-item-title b {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.share-status {
  flex: none;
  padding: 3px 7px;
  border-radius: 999px;
  background: #eef0ee;
  color: var(--muted);
  font-size: 9px;
  font-weight: 600;
}
.share-status.active {
  background: #e8f4ee;
  color: var(--green);
}
.share-path {
  margin: 6px 0 0;
  overflow: hidden;
  color: var(--accent-ink);
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.share-tags,
.share-metrics {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}
.share-tags {
  margin-top: 10px;
}
.share-tags > span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 6px;
  border-radius: 5px;
  background: var(--soft);
  color: var(--muted);
  font-size: 9px;
}
.share-tags .lucide,
.share-metrics .lucide {
  width: 11px;
  height: 11px;
}
.share-metrics {
  gap: 13px;
  margin-top: 11px;
  color: #87968d;
  font-size: 10px;
}
.share-metrics > span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.share-metrics strong {
  color: var(--secondary);
  font-weight: 600;
}
.share-dialog .share-item-actions {
  display: flex;
  gap: 2px;
  flex: none;
}
.share-dialog .share-item-actions .icon-button {
  width: 29px;
  height: 29px;
  padding: 7px;
}
.share-empty {
  display: grid;
  place-items: center;
  padding: 26px 16px;
  border: 1px dashed var(--line);
  border-radius: 11px;
  color: var(--muted);
  text-align: center;
}
.share-empty .lucide {
  width: 21px;
  height: 21px;
  margin-bottom: 7px;
}
.share-empty p {
  margin: 0;
  color: var(--secondary);
  font-size: 12px;
}
.share-empty span {
  margin-top: 5px;
  font-size: 10px;
}
@media (max-width: 560px) {
  .share-dialog {
    padding: 22px 20px;
    max-width: calc(100vw - 24px);
    max-height: calc(100dvh - 32px);
  }
  .share-dialog .two-fields {
    grid-template-columns: minmax(0, 1fr) 112px;
    gap: 12px;
  }
  .share-dialog .new-link {
    gap: 17px;
  }
}
@media (max-width: 360px) {
  .share-dialog .two-fields {
    grid-template-columns: minmax(0, 1fr);
    gap: 17px;
  }
}

.editor-title {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.editor-title h1 {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 340px;
}
.save-indicator {
  width: 22px;
  height: 22px;
  border: 0;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #5d8b74;
  background: transparent;
  padding: 0;
  flex: none;
}
.save-indicator .lucide {
  width: 14px;
  height: 14px;
}
.save-indicator[data-state="pending"] {
  color: #a59056;
  background: transparent;
}
.save-indicator[data-state="saving"] {
  color: #6e9380;
}
.save-indicator[data-state="saving"] .lucide {
  animation: save-spin 0.9s linear infinite;
}
.save-indicator[data-state="error"] {
  color: #b65f50;
  background: transparent;
}
@keyframes save-spin {
  to {
    transform: rotate(360deg);
  }
}
.deck-metadata-fields {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
  gap: 17px;
  margin: 24px 0;
}
.deck-metadata-fields .metadata-description {
  grid-column: 1/-1;
}
.deck-metadata-fields textarea {
  resize: vertical;
  min-height: 80px;
}
.app-loading {
  position: relative;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  background: #f4f7f4;
  isolation: isolate;
}
.loading-skeleton {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: 192px 1fr 256px;
  grid-template-rows: 56px minmax(0, 1fr);
  gap: 1px;
  background: var(--line);
  z-index: -1;
}
.skeleton-top {
  grid-column: 1/-1;
  background: var(--paper);
}
.skeleton-rail,
.skeleton-inspector {
  background: var(--paper);
  padding: 14px 16px;
}
.skeleton-rail {
  grid-row: 2;
}
.skeleton-rail i,
.skeleton-inspector i {
  display: block;
  height: 88px;
  margin-bottom: 24px;
  border-radius: 8px;
  background: linear-gradient(110deg, #f1f4f2 20%, #fafcfb 40%, #f1f4f2 60%);
  background-size: 200% 100%;
  animation: skeleton-shine 1.8s ease-in-out infinite;
}
.skeleton-inspector i {
  height: 38px;
}
.skeleton-canvas {
  grid-column: 2;
  grid-row: 2;
  background: #eef2ef;
}
.skeleton-inspector {
  grid-column: 3;
  grid-row: 2;
}
.editor {
  position: relative;
}
.editor-loading-overlay {
  position: absolute;
  inset: 0;
  z-index: 10;
}
.editor-loading-overlay .app-loading {
  min-height: 0;
  height: 100%;
}
.workspace-loading .loading-skeleton {
  grid-template-rows: minmax(0, 1fr);
  row-gap: 0;
}
.workspace-loading :is(.skeleton-rail, .skeleton-canvas, .skeleton-inspector) {
  grid-row: 1;
}
@keyframes skeleton-shine {
  to {
    background-position: -200% 0;
  }
}
@media (max-width: 760px) {
  .loading-skeleton {
    grid-template-columns: 100px 1fr;
  }
  .skeleton-inspector {
    display: none;
  }
  .editor-loading-overlay {
    inset: 0;
  }
  .deck-metadata-fields {
    grid-template-columns: 1fr;
  }
}
@media (prefers-reduced-motion: reduce) {
  .save-indicator .lucide,
  .loading-skeleton i {
    animation: none !important;
  }
}

.save-indicator[data-state="pending"]::after {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
}
.save-indicator[data-state="pending"] .lucide {
  display: none;
}

.create-deck-dialog {
  width: 880px;
}
.template-picker {
  border: 0;
  padding: 0;
  margin: 0 0 26px;
  min-width: 0;
}
.template-picker legend {
  padding: 0;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 12px;
}
.template-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
.template-option {
  position: relative;
  margin: 0 !important;
  cursor: pointer;
  min-width: 0;
}
.template-option input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  padding: 0;
  margin: 0;
}
.template-choice {
  display: block;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 5px;
  transition:
    border-color 0.15s,
    box-shadow 0.15s;
}
.template-option input:checked + .template-choice {
  border-color: var(--green);
  box-shadow: 0 0 0 1px var(--green);
}
.template-option input:focus-visible + .template-choice {
  outline: 3px solid var(--focus-ring);
  outline-offset: 3px;
}
.template-preview {
  display: flex;
  flex-direction: column;
  position: relative;
  aspect-ratio: 16/9;
  padding: 14px 12px;
  overflow: hidden;
  border-radius: 7px;
  background: var(--template-bg);
  color: var(--template-ink);
}
.template-preview-tag {
  font-size: 7px;
  letter-spacing: 1px;
  color: var(--template-accent);
}
.template-preview strong {
  position: relative;
  z-index: 1;
  font-size: 17px;
  margin-top: 9px;
  font-weight: 600;
}
.template-preview-line {
  position: absolute;
  left: 12px;
  bottom: 13px;
  height: 2px;
  width: 28px;
  background: var(--template-accent);
}
.template-preview-art {
  position: absolute;
  right: 10px;
  bottom: 16px;
  width: 38px;
  height: 42px;
  display: flex;
  align-items: flex-end;
  gap: 4px;
  transform: skewY(-12deg);
}
.template-preview-art i {
  width: 10px;
  height: 40%;
  background: var(--template-accent);
  opacity: 0.25;
  border-radius: 2px;
}
.template-preview-art i:nth-child(2) {
  height: 65%;
  opacity: 0.55;
}
.template-preview-art i:nth-child(3) {
  height: 100%;
  opacity: 0.9;
}
.template-caption {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  padding: 10px 5px 6px;
}
.template-caption strong {
  font-size: 12px;
  font-weight: 500;
  color: var(--ink);
}
.template-caption small {
  font-size: 10px;
  color: var(--muted);
}
.create-deck-fields {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 20px;
  margin-bottom: 20px;
}
@media (max-width: 640px) {
  .template-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .create-deck-fields {
    grid-template-columns: 1fr;
    gap: 0;
  }
}

.library-toolbar .search {
  flex: 1;
  min-width: 160px;
}
.library-toolbar #visibilityFilterTrigger {
  min-width: 130px;
}
.template-live-preview {
  padding: 0;
  position: relative;
}
.template-live-preview iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  pointer-events: none;
}
.template-picker .template-grid {
  max-height: min(260px, 36vh);
  overflow-y: auto;
  padding: 3px;
  margin: -3px;
}
.card-actions button.present-link {
  border: 0;
  padding: 0;
  background: transparent;
  font: inherit;
}
.template-caption strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.import-dialog .dialog-body {
  display: grid;
  gap: 20px;
}
.import-dialog .dialog-body > label + label {
  margin-top: 0;
}
.import-dialog .import-file {
  margin: 0;
}
.import-progress {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--accent-ink);
  font-size: 13px;
  padding: 12px 0;
}
.import-progress svg {
  width: 18px;
  height: 18px;
  animation: save-spin 0.9s linear infinite;
}
.import-result {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
}
.import-result svg {
  color: var(--accent-ink);
  width: 22px;
}
.import-result span {
  color: var(--muted);
  margin-left: auto;
  font-size: 13px;
}
.import-notes {
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--soft);
  font-size: 13px;
  line-height: 1.8;
}
.import-notes h3 {
  font-size: 13px;
  margin: 0 0 10px;
}
.import-notes ul {
  margin: 0;
  padding-left: 18px;
}
@media (max-width: 760px) {
  .library-toolbar {
    flex-wrap: wrap;
  }
  .library-toolbar .search {
    flex-basis: 100%;
  }
}
@media (prefers-reduced-motion: reduce) {
  .import-progress svg {
    animation: none;
  }
}
.export-options {
  border: 0;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 10px;
}
.export-options label {
  margin: 0;
  cursor: pointer;
}
.export-options input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}
.export-options label > span {
  display: flex;
  gap: 14px;
  align-items: center;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--paper);
}
.export-options label > span > .lucide {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
}
.export-options label > span > span {
  flex: 1;
}
.export-options b {
  display: block;
  font-size: 14px;
  color: var(--ink);
}
.export-options small {
  display: block;
  font-size: 12px;
  font-weight: 400;
  line-height: 1.7;
  margin-top: 4px;
  color: var(--muted);
}
.export-options label > span > .lucide:last-child {
  width: 18px;
  opacity: 0;
}
.export-options input:checked + span {
  border-color: var(--green);
  background: var(--light);
}
.export-options input:checked + span > .lucide:last-child {
  opacity: 1;
  color: var(--green);
}
.export-options input:focus-visible + span {
  outline: 2px solid var(--green);
  outline-offset: 3px;
}
#dialog .spin {
  animation: export-spin 0.8s linear infinite;
}
@keyframes export-spin {
  to {
    transform: rotate(360deg);
  }
}
