:root {
  --bg: #08090c;
  --bg-soft: #0d1016;
  --surface: #121722;
  --surface-raised: #171d2a;
  --surface-muted: #0f131b;
  --ink: #f4f7fb;
  --muted: #98a2b3;
  --line: #273142;
  --line-strong: #354258;
  --accent: #00d8ee;
  --accent-strong: #00a9c2;
  --accent-soft: rgba(0, 216, 238, 0.14);
  --gold: #d6a94a;
  --danger: #e35b4f;
  --danger-soft: rgba(227, 91, 79, 0.13);
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.38);
}

* {
  box-sizing: border-box;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

html {
  background: var(--bg);
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 18% 0%, rgba(0, 216, 238, 0.11), transparent 30%),
    linear-gradient(180deg, #0b0e13 0%, var(--bg) 42%, #07080b 100%);
  color: var(--ink);
  font-family: "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
}

.site-announcement {
  overflow: hidden;
  max-height: 64px;
  opacity: 1;
  transform: translateY(0);
  transition:
    max-height 0.52s cubic-bezier(0.22, 1, 0.36, 1),
    opacity 0.34s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.52s cubic-bezier(0.22, 1, 0.36, 1);
}

.site-announcement.closing {
  max-height: 0;
  opacity: 0;
  transform: translateY(-12px);
}

.site-announcement-inner {
  min-height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 8px 48px;
  background-color: #1197f5;
  background-position: center;
  background-size: cover;
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.4;
  position: relative;
  text-align: center;
}

.site-announcement-label {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  border: 1px solid rgba(255, 255, 255, 0.74);
  border-radius: 4px;
  padding: 0 8px;
  background: rgba(255, 255, 255, 0.15);
  font-size: 12px;
}

.site-announcement-link {
  color: inherit;
  text-decoration: none;
}

.site-announcement-link:hover {
  text-decoration: underline;
}

.site-announcement-close {
  position: absolute;
  top: 50%;
  right: 14px;
  transform: translateY(-50%);
  width: 30px;
  height: 30px;
  min-height: 30px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: transparent;
  color: inherit;
  font-size: 24px;
  line-height: 30px;
  opacity: 0.76;
}

.site-announcement-close:hover {
  background: rgba(255, 255, 255, 0.16);
  opacity: 1;
}

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

button {
  cursor: pointer;
}

button:disabled {
  cursor: wait;
  opacity: 0.62;
}

.app-shell {
  width: min(1480px, calc(100vw - 36px));
  margin: 0 auto;
  padding: 28px 0 44px;
}

.topbar {
  position: relative;
  min-height: 190px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  margin-bottom: 20px;
  overflow: hidden;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(0, 8, 20, 0.92) 0%, rgba(0, 8, 20, 0.68) 48%, rgba(0, 8, 20, 0.28) 100%),
    url("/brand/banner.png") center / cover no-repeat;
  box-shadow: var(--shadow);
}

.topbar-content {
  position: relative;
  z-index: 1;
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 18px;
}

.brand-logo {
  width: 118px;
  height: 72px;
  object-fit: contain;
}

.brand-subtitle {
  margin-top: 7px;
  color: #c8d3e0;
  font-size: 13px;
}

.topbar-actions {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 10px;
}

.eyebrow {
  margin: 0 0 7px;
  color: var(--gold);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1 {
  font-size: 32px;
  line-height: 1.15;
  font-weight: 800;
}

h2 {
  font-size: 18px;
  line-height: 1.35;
}

.panel-head p {
  margin-top: 5px;
  color: var(--muted);
  font-size: 13px;
}

.view-tabs {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  background: rgba(15, 19, 27, 0.9);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.tutorial-nav-link {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 1px solid rgba(32, 199, 167, 0.34);
  border-radius: 7px;
  padding: 0 12px;
  background: rgba(12, 25, 27, 0.82);
  color: #aeeedd;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  transition: border-color 0.18s ease, background 0.18s ease, color 0.18s ease;
}

.tutorial-nav-link:hover {
  border-color: rgba(32, 199, 167, 0.4);
  background: rgba(32, 199, 167, 0.1);
  color: #effffb;
}

.tutorial-link-short {
  display: none;
}

.sub-tabs {
  display: inline-flex;
  gap: 4px;
  margin-bottom: 14px;
  padding: 4px;
  background: rgba(9, 12, 18, 0.9);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.tab-button,
.sub-tab-button,
.primary-button,
.ghost-button,
.danger-button,
.preset-button,
.small-button {
  min-height: 38px;
  border: 1px solid transparent;
  border-radius: 7px;
  padding: 0 14px;
  background: var(--surface-muted);
  color: var(--ink);
  white-space: nowrap;
  transition: border-color 0.18s ease, background 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.tab-button:hover,
.sub-tab-button:hover,
.ghost-button:hover,
.preset-button:hover,
.small-button:hover {
  border-color: var(--line-strong);
  background: #1a2130;
}

.tab-button.active,
.sub-tab-button.active,
.primary-button {
  background: linear-gradient(180deg, var(--accent) 0%, var(--accent-strong) 100%);
  color: #031411;
  font-weight: 700;
}

.primary-button:hover {
  background: linear-gradient(180deg, #2ae0bd 0%, var(--accent-strong) 100%);
  transform: translateY(-1px);
}

.ghost-button {
  border-color: var(--line);
}

.danger-button {
  color: #fff;
  background: #9f352f;
  border-color: rgba(227, 91, 79, 0.42);
}

.danger-button:hover {
  background: var(--danger);
}

.mode-panel {
  display: none;
}

.mode-panel.active {
  display: block;
}

.view {
  display: none;
}

.view.active {
  display: block;
}

.editor-grid,
.settings-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.18fr) minmax(380px, 0.82fr);
  gap: 16px;
}

.panel {
  background: linear-gradient(180deg, rgba(23, 29, 42, 0.96), rgba(18, 23, 34, 0.96));
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: 18px;
}

.panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

.toolbar,
.settings-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.custom-form .settings-actions {
  margin-top: 18px;
}

.field-label {
  display: block;
  margin: 14px 0 7px;
  color: #b7c0ce;
  font-size: 13px;
  font-weight: 700;
}

.prompt-textarea,
.notes-textarea,
.text-input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #090c12;
  color: var(--ink);
  outline: none;
}

.prompt-textarea::placeholder,
.notes-textarea::placeholder,
.text-input::placeholder {
  color: #5f6b7c;
}

.prompt-textarea,
.notes-textarea {
  resize: vertical;
  padding: 13px;
  line-height: 1.75;
}

.prompt-textarea {
  min-height: 214px;
}

.prompt-textarea.large {
  min-height: 310px;
}

.prompt-textarea.compact {
  min-height: 132px;
}

.notes-textarea {
  min-height: 92px;
}

.prompt-edit-box,
#generalPromptEditor {
  min-height: 250px;
  font-family: Consolas, "Microsoft YaHei", monospace;
  font-size: 13px;
  line-height: 1.6;
}

.shot-common-prompt {
  min-height: 156px;
  font-family: Consolas, "Microsoft YaHei", monospace;
  font-size: 13px;
  line-height: 1.6;
  margin-bottom: 4px;
}

.text-input {
  min-height: 42px;
  padding: 0 12px;
}

.prompt-textarea:focus,
.notes-textarea:focus,
.text-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.json-output {
  min-height: 532px;
  height: 532px;
  max-height: 690px;
  margin: 0;
  overflow: auto;
  resize: vertical;
  padding: 15px;
  border: 1px solid #1d2635;
  border-radius: 7px;
  background: #070a0f;
  color: #d9f8ef;
  line-height: 1.58;
  font-size: 13px;
  white-space: pre-wrap;
}

.plain-text-output {
  min-height: 118px;
  margin: 0;
  overflow: auto;
  padding: 14px;
  border: 1px solid #1d2635;
  border-radius: 7px;
  background: #0b0f15;
  color: #eef7f4;
  font-family: "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
  font-size: 13px;
  line-height: 1.65;
  white-space: pre-wrap;
}

.plain-text-output[hidden] {
  display: none;
}

.share-action-button {
  min-height: 38px;
  border: 1px solid rgba(32, 199, 167, 0.5);
  border-radius: 7px;
  padding: 0 14px;
  background: rgba(13, 61, 52, 0.92);
  color: #b5f7e8;
  font-weight: 700;
  white-space: nowrap;
  transition: border-color 0.18s ease, background 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.share-action-button:hover:not(:disabled) {
  border-color: var(--accent);
  background: #155e50;
  color: #effffb;
  transform: translateY(-1px);
}

.share-action-button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.ui-icon {
  display: inline-block;
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  background: currentColor;
  mask-position: center;
  mask-repeat: no-repeat;
  mask-size: contain;
  vertical-align: -3px;
}

.icon-share {
  mask-image: url("/icons/share-2.svg");
}

.icon-copy {
  mask-image: url("/icons/copy.svg");
}

.icon-download {
  mask-image: url("/icons/download.svg");
}

.icon-close {
  mask-image: url("/icons/x.svg");
}

.icon-trash {
  mask-image: url("/icons/trash-2.svg");
}

.icon-save {
  mask-image: url("/icons/save.svg");
}

.icon-book {
  mask-image: url("/icons/book-open.svg");
}

.icon-external {
  mask-image: url("/icons/external-link.svg");
}

.app-dialog {
  width: min(calc(100vw - 32px), 620px);
  max-height: min(760px, calc(100vh - 32px));
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: #111722;
  color: var(--ink);
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.48);
}

.app-dialog::backdrop {
  background: rgba(3, 5, 9, 0.76);
  backdrop-filter: blur(4px);
}

.dialog-shell {
  max-height: inherit;
  overflow: auto;
  padding: 22px;
}

.dialog-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 18px;
}

.dialog-head h2 {
  margin: 4px 0 0;
  font-size: 21px;
}

.dialog-eyebrow {
  color: #7ee5d0;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.share-privacy-note {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

.dialog-icon-button {
  display: inline-flex;
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #171e2a;
  color: var(--muted);
}

.dialog-icon-button:hover {
  border-color: var(--line-strong);
  color: var(--ink);
}

.share-preview-meta {
  display: flex;
  min-height: 28px;
  margin: 14px 0 10px;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 12px;
}

.share-mode-badge {
  display: inline-flex;
  min-height: 26px;
  padding: 0 9px;
  align-items: center;
  border: 1px solid rgba(32, 199, 167, 0.4);
  border-radius: 6px;
  background: rgba(13, 61, 52, 0.65);
  color: #a6f2e2;
  font-weight: 700;
}

.share-prompt-preview {
  max-height: 260px;
  min-height: 150px;
  margin: 0;
  overflow: auto;
  padding: 14px;
  border: 1px solid #1d2635;
  border-radius: 7px;
  background: #080b11;
  color: #edf7f3;
  font: 13px/1.75 Consolas, "Microsoft YaHei", monospace;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.dialog-primary-action {
  margin-top: 18px;
}

.dialog-primary-action .primary-button {
  width: 100%;
}

.share-result[hidden] {
  display: none;
}

.share-url-row,
.share-result-actions,
.share-import-actions,
.temporary-share-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.share-url-row .text-input {
  min-width: 0;
  flex: 1 1 260px;
}

.share-result-actions {
  margin-top: 12px;
}

.share-revoke-button {
  min-height: 38px;
  border: 1px solid rgba(227, 91, 79, 0.42);
  border-radius: 7px;
  padding: 0 12px;
  background: transparent;
  color: #ffaaa2;
}

.share-revoke-button:hover {
  background: rgba(159, 53, 47, 0.28);
}

.dialog-status {
  min-height: 20px;
  margin: 14px 0 0;
  color: #9ff3df;
  font-size: 12px;
}

.tutorial-onboarding-dialog {
  width: min(calc(100vw - 32px), 580px);
  border-radius: 8px;
}

.tutorial-onboarding-lead {
  color: #b5bfcc;
  font-size: 14px;
  line-height: 1.75;
}

.tutorial-onboarding-steps {
  display: grid;
  gap: 8px;
  margin: 18px 0;
  padding: 0;
  list-style: none;
}

.tutorial-onboarding-steps li {
  min-height: 60px;
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 10px 12px;
  background: #0c1119;
}

.tutorial-onboarding-steps li > span {
  width: 30px;
  height: 30px;
  flex: 0 0 30px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(32, 199, 167, 0.42);
  border-radius: 6px;
  background: rgba(32, 199, 167, 0.1);
  color: #8cebd8;
  font-size: 12px;
  font-weight: 800;
}

.tutorial-onboarding-steps strong,
.tutorial-onboarding-steps small {
  display: block;
}

.tutorial-onboarding-steps strong {
  color: #edf4f2;
  font-size: 13px;
}

.tutorial-onboarding-steps small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
}

.tutorial-onboarding-actions {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: 8px;
}

.tutorial-onboarding-actions .primary-button,
.tutorial-onboarding-actions .ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.tutorial-onboarding-note {
  margin-top: 12px;
  color: #758194;
  font-size: 11px;
  text-align: center;
}

.tutorial-notice-toast {
  position: fixed;
  z-index: 9000;
  right: 18px;
  bottom: 18px;
  width: min(390px, calc(100vw - 28px));
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) 30px;
  align-items: start;
  gap: 11px;
  border: 1px solid rgba(32, 199, 167, 0.35);
  border-radius: 8px;
  padding: 14px;
  background: rgba(15, 21, 30, 0.97);
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.42);
  color: var(--ink);
}

.tutorial-notice-toast[hidden] {
  display: none;
}

.tutorial-notice-icon {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(32, 199, 167, 0.42);
  border-radius: 7px;
  background: rgba(32, 199, 167, 0.1);
  color: #8cebd8;
}

.tutorial-notice-toast strong {
  display: block;
  margin: 1px 0 5px;
  font-size: 13px;
}

.tutorial-notice-toast p {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

.tutorial-notice-toast a {
  display: inline-block;
  margin-top: 7px;
  color: #80ead5;
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
}

.tutorial-notice-toast a:hover {
  text-decoration: underline;
}

.tutorial-notice-toast > button {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
}

.tutorial-notice-toast > button:hover {
  background: #202938;
  color: var(--ink);
}

.share-import-actions .primary-button,
.share-import-actions .ghost-button,
.share-import-actions .danger-button {
  flex: 1 1 160px;
}

.temporary-share-bar {
  display: flex;
  min-height: 46px;
  margin-bottom: 16px;
  padding: 8px 12px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid rgba(32, 199, 167, 0.34);
  border-radius: 7px;
  background: rgba(13, 61, 52, 0.56);
  color: #baf6e9;
  font-size: 13px;
}

.temporary-share-bar[hidden] {
  display: none;
}

.temporary-share-actions {
  justify-content: flex-end;
}

.presets-panel {
  margin-top: 16px;
}

.workspace-preset-search-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.workspace-preset-search-row .text-input {
  flex: 1;
}

.preset-groups {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.preset-group {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 13px;
  background: rgba(9, 12, 18, 0.68);
}

.preset-group.dragging {
  opacity: 0.48;
  border-color: var(--accent);
}

.preset-groups.is-dragging .preset-group:not(.dragging) {
  transition: transform 0.14s ease, border-color 0.14s ease;
}

.preset-group-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.preset-group h3 {
  margin: 0;
  color: #dfe6f0;
  font-size: 15px;
}

.category-drag-handle {
  width: 30px;
  height: 30px;
  min-height: 28px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  cursor: grab;
  opacity: 0.72;
  touch-action: none;
  user-select: none;
  transition: background-color 0.16s ease, border-color 0.16s ease, color 0.16s ease, opacity 0.16s ease;
}

.category-drag-handle::before {
  width: 14px;
  height: 18px;
  background: radial-gradient(circle, currentColor 1.45px, transparent 1.6px) 0 0 / 7px 6px;
  content: "";
}

.category-drag-handle:hover {
  border-color: rgba(152, 162, 179, 0.24);
  background: rgba(255, 255, 255, 0.055);
  color: #dfe6f0;
  opacity: 1;
}

.category-drag-handle:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.category-drag-handle:active {
  background: rgba(32, 199, 167, 0.1);
  color: var(--accent);
  cursor: grabbing;
}

.button-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 34px;
}

.preset-button {
  min-height: 34px;
  border-color: #2a3446;
  background: #111722;
  color: #d6deeb;
  font-size: 13px;
  cursor: grab;
  touch-action: none;
  user-select: none;
  will-change: transform;
}

.preset-button:active {
  cursor: grabbing;
}

.preset-button.dragging {
  z-index: 2;
  opacity: 0.58;
  border-color: var(--accent);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.34);
}

.button-cloud.is-dragging .preset-button:not(.dragging) {
  transition: border-color 0.14s ease, background-color 0.14s ease;
}

@media (prefers-reduced-motion: reduce) {
  .button-cloud.is-dragging .preset-button {
    animation: none;
    transition: none;
  }
}

.preset-button:hover {
  border-color: rgba(32, 199, 167, 0.56);
  background: #172337;
  color: #fff;
}

.preset-button.negative {
  border-color: rgba(227, 91, 79, 0.34);
  color: #ffb7b0;
  background: var(--danger-soft);
}

.preset-button.selected {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: #f4fffb;
}

.preset-tooltip {
  position: fixed;
  z-index: 9999;
  display: none;
  max-width: min(420px, calc(100vw - 28px));
  padding: 10px 12px;
  border: 1px solid rgba(32, 199, 167, 0.42);
  border-radius: 8px;
  background: rgba(7, 10, 15, 0.96);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.46);
  color: #eafaf5;
  font-size: 13px;
  line-height: 1.6;
  pointer-events: none;
  white-space: pre-wrap;
}

.preset-tooltip.visible {
  display: block;
}

.status-message {
  min-height: 22px;
  margin-top: 10px;
  color: var(--accent);
  font-size: 13px;
}

.shot-base-grid,
.shot-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.shot-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 16px 0 10px;
}

.shots-list {
  display: grid;
  gap: 12px;
}

.shot-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 13px;
  background: rgba(9, 12, 18, 0.68);
  transition: border-color 0.18s ease, box-shadow 0.18s ease, opacity 0.18s ease;
}

.shot-card.dragging {
  border-color: rgba(32, 199, 167, 0.72);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.26);
  opacity: 0.62;
}

.shots-list.is-dragging .shot-card:not(.dragging) {
  border-color: rgba(255, 255, 255, 0.14);
}

.shot-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 4px;
}

.shot-title-group {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 10px;
}

.shot-drag-handle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  flex: 0 0 30px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--muted);
  cursor: grab;
  font-size: 16px;
  line-height: 1;
}

.shot-drag-handle:hover {
  border-color: rgba(32, 199, 167, 0.48);
  color: #eafaf5;
  background: rgba(32, 199, 167, 0.12);
}

.shot-drag-handle:active {
  cursor: grabbing;
}

.shot-card h3,
.shot-toolbar h3 {
  color: #eef3fa;
  font-size: 15px;
}

.shot-card h3 span {
  margin-left: 8px;
  color: var(--gold);
  font-size: 12px;
  font-weight: 600;
}

.custom-form {
  display: block;
}

.checkbox-line {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 14px 0;
  color: var(--muted);
  font-size: 14px;
}

.checkbox-line input {
  accent-color: var(--accent);
}

.preset-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.saved-presets-panel {
  margin-top: 16px;
}

.preset-search-row {
  display: grid;
  grid-template-columns: minmax(220px, 420px) auto;
  align-items: end;
  gap: 10px;
  margin: -2px 0 14px;
}

.preset-search-row .field-label {
  grid-column: 1 / -1;
  margin-top: 0;
}

.preset-search-count {
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;
  padding-bottom: 11px;
}

.empty-search-result {
  grid-column: 1 / -1;
  border: 1px dashed var(--line-strong);
  border-radius: 8px;
  padding: 18px;
  color: var(--muted);
  text-align: center;
  background: rgba(9, 12, 18, 0.44);
}

.category-list {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  margin-top: 14px;
}

.category-item {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: rgba(9, 12, 18, 0.68);
  transition: border-color 0.16s ease, background-color 0.16s ease, color 0.16s ease;
}

.category-item:has(.category-filter-button:hover) {
  border-color: rgba(32, 199, 167, 0.5);
  background: rgba(14, 26, 35, 0.82);
}

.category-item.selected {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.category-item:has(.category-filter-button:focus-visible) {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.category-filter-button {
  width: 100%;
  display: block;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  text-align: left;
}

.category-filter-button:focus-visible {
  outline: 0;
}

.category-filter-button strong,
.category-filter-button span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.category-filter-button strong {
  color: #eef3fa;
  font-size: 13px;
}

.category-filter-button span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.category-item .small-actions {
  gap: 5px;
  margin-top: 8px;
}

.category-item .small-button {
  min-height: 28px;
  flex: 1;
  padding: 0 6px;
}

.compact-list {
  grid-template-columns: 1fr;
  margin-top: 14px;
}

.preset-list-item {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: rgba(9, 12, 18, 0.68);
}

.preset-list-item h3 {
  margin: 0 0 6px;
  color: #eef3fa;
  font-size: 15px;
}

.preset-list-item p {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.preset-meta {
  margin-top: 8px;
  color: var(--gold);
  font-size: 12px;
}

.small-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.small-button {
  min-height: 30px;
  padding: 0 10px;
  border-color: var(--line);
  font-size: 12px;
}

.empty-text {
  color: var(--muted);
  font-size: 13px;
}

.site-footer {
  margin-top: 28px;
  padding: 18px 0 0;
  border-top: 1px solid var(--line);
  text-align: center;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.8;
}

.site-footer .footer-links {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 6px;
}

.site-footer .footer-links a {
  color: var(--accent);
  text-decoration: none;
}

.site-footer .footer-links a:hover {
  text-decoration: underline;
}

@media (max-width: 1100px) {
  .editor-grid,
  .settings-grid,
  .preset-groups,
  .preset-list {
    grid-template-columns: 1fr 1fr;
  }

  .category-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .app-shell {
    width: min(100vw - 18px, 720px);
    padding-top: 14px;
  }

  .topbar,
  .panel-head {
    align-items: stretch;
    flex-direction: column;
  }

  .brand-lockup {
    align-items: flex-start;
    flex-direction: row;
  }

  .brand-logo {
    width: 92px;
    height: 58px;
  }

  .view-tabs,
  .sub-tabs,
  .toolbar,
  .settings-actions {
    width: 100%;
  }

  .topbar-actions {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }

  .topbar-actions .view-tabs {
    width: auto;
    flex: 1 1 auto;
  }

  .tab-button,
  .sub-tab-button,
  .primary-button,
  .ghost-button,
  .danger-button,
  .share-action-button {
    flex: 1;
  }

  .tutorial-nav-link {
    width: 100%;
    flex: 0 0 auto;
    padding-inline: 10px;
  }

  .tutorial-link-full {
    display: inline;
  }

  .tutorial-link-short {
    display: none;
  }

  .temporary-share-bar {
    align-items: stretch;
    flex-direction: column;
  }

  .temporary-share-actions {
    width: 100%;
  }

  .temporary-share-actions .small-button {
    flex: 1;
  }

  .share-url-row,
  .share-result-actions,
  .share-import-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .share-url-row .text-input {
    grid-column: 1 / -1;
  }

  .share-result-actions .share-revoke-button {
    grid-column: 1 / -1;
  }

  .dialog-shell {
    padding: 18px;
  }

  .tutorial-onboarding-actions {
    grid-template-columns: 1fr;
  }

  .tutorial-notice-toast {
    right: 14px;
    bottom: 14px;
  }

  .editor-grid,
  .settings-grid,
  .preset-groups,
  .preset-list,
  .preset-search-row,
  .workspace-preset-search-row,
  .category-list,
  .shot-base-grid,
  .shot-fields {
    grid-template-columns: 1fr;
  }

  h1 {
    font-size: 24px;
  }
}
