:root {
  --bg: #f8fbfa;
  --panel: #ffffff;
  --panel-soft: #fcfafd;
  --ink: #162235;
  --muted: #69758a;
  --line: #edf1f5;
  --mint: #7eddd0;
  --green: #bfe58d;
  --yellow: #f7d66b;
  --orange: #ffa86b;
  --pink: #ff9bb3;
  --lavender: #c7a6f8;
  --blue: #8cc9ff;
  --blue-strong: #29aaa7;
  --danger: #ef6e85;
  --shadow: 0 18px 48px rgba(56, 72, 92, 0.08);
  --shadow-soft: 0 10px 28px rgba(56, 72, 92, 0.06);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at 18% 18%, rgba(126, 221, 208, 0.18), transparent 34%),
    radial-gradient(circle at 72% 8%, rgba(255, 155, 179, 0.17), transparent 32%),
    radial-gradient(circle at 82% 82%, rgba(255, 168, 107, 0.13), transparent 30%),
    linear-gradient(135deg, #f8fbfa, #fcfafd);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    "PingFang SC", "Microsoft YaHei", sans-serif;
}

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

button,
a {
  -webkit-tap-highlight-color: transparent;
}

a {
  color: inherit;
  text-decoration: none;
}

[hidden] {
  display: none !important;
}

.login-view {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.login-card {
  width: min(420px, 100%);
  display: grid;
  gap: 18px;
  padding: 30px;
  border: 1px solid rgba(229, 236, 243, 0.9);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: var(--shadow);
  backdrop-filter: blur(22px);
}

.login-brand {
  padding-bottom: 10px;
}

.login-error {
  min-height: 20px;
  margin: -6px 0 0;
  color: var(--danger);
  font-size: 14px;
}

.app-shell {
  display: grid;
  grid-template-columns: 290px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 38px 24px 28px;
  border-right: 1px solid rgba(229, 236, 243, 0.9);
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(24px) saturate(1.12);
}

.brand {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 2px 36px;
}

.brand-mark {
  display: grid;
  width: 56px;
  height: 56px;
  place-items: center;
  border: 0;
  border-radius: 18px;
  background: linear-gradient(135deg, #7eddd0 0%, #f8d97b 42%, #ff9bb3 100%);
  color: rgba(255, 255, 255, 0.88);
  box-shadow: 0 14px 30px rgba(255, 155, 179, 0.18);
}

.brand-mark svg {
  display: none;
}

.brand-mark::before {
  content: "P";
  color: #fff;
  font-size: 32px;
  font-weight: 500;
}

.brand strong,
.brand small {
  display: block;
}

.brand small {
  margin-top: 3px;
  color: var(--muted);
  max-width: 150px;
  font-size: 14px;
  line-height: 1.35;
  letter-spacing: 0;
}

.nav {
  display: grid;
  gap: 14px;
  margin-top: 0;
}

.nav a,
.mobile-nav a {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  border-radius: 14px;
  border: 1px solid transparent;
  color: #667287;
  font-size: 18px;
  font-weight: 600;
  transition:
    background 0.16s ease,
    border-color 0.16s ease,
    color 0.16s ease,
    transform 0.16s ease;
}

.nav a {
  padding: 16px 18px;
}

.nav a:hover,
.mobile-nav a:hover {
  background: rgba(126, 221, 208, 0.1);
  color: var(--blue-strong);
  transform: translateX(2px);
}

.nav a.active,
.mobile-nav a.active {
  background: linear-gradient(90deg, rgba(126, 221, 208, 0.22), rgba(140, 201, 255, 0.1));
  border-color: rgba(126, 221, 208, 0.18);
  color: var(--blue-strong);
  box-shadow: none;
}

.nav a.active::before {
  display: none;
}

.main {
  min-width: 0;
  padding: 40px clamp(24px, 3vw, 48px) 28px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 34px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 17px;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
}

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

h1 {
  margin-bottom: 0;
  font-size: clamp(34px, 5vw, 44px);
  line-height: 1.05;
  letter-spacing: 0;
  color: #202b3a;
}

h2 {
  margin-bottom: 14px;
  font-size: 20px;
}

h3 {
  margin-bottom: 8px;
  font-size: 16px;
}

.primary-action,
.button,
.icon-button,
.danger-button,
.ghost-button,
.favorite-button,
.back-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  border: 1px solid transparent;
  border-radius: 13px;
  cursor: pointer;
  font-weight: 750;
  transition:
    transform 0.16s ease,
    box-shadow 0.16s ease,
    border-color 0.16s ease,
    background 0.16s ease,
    color 0.16s ease;
}

.ui-icon {
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.primary-action,
.button {
  min-height: 50px;
  padding: 0 24px;
  border-color: transparent;
  border-radius: 18px;
  background: linear-gradient(135deg, #5bd3c9, #37b9b6);
  color: #fff;
  box-shadow: 0 16px 28px rgba(55, 185, 182, 0.22);
  font-size: 17px;
}

.ghost-button,
.icon-button {
  padding: 0 14px;
  border-color: rgba(212, 219, 224, 0.9);
  background: rgba(255, 253, 249, 0.88);
  color: var(--ink);
}

.danger-button {
  padding: 0 14px;
  border-color: rgba(203, 123, 136, 0.36);
  background: #f8e9eb;
  color: var(--danger);
}

.favorite-button {
  padding: 0 14px;
  border-color: rgba(212, 219, 224, 0.9);
  background: rgba(255, 253, 249, 0.9);
  color: var(--ink);
}

.favorite-button.is-active,
.icon-button.is-copied {
  border-color: rgba(203, 123, 136, 0.4);
  background: #faecef;
  color: var(--danger);
}

.back-button {
  width: fit-content;
  min-height: 34px;
  padding: 0 11px;
  border-color: rgba(96, 127, 159, 0.24);
  background: rgba(231, 238, 242, 0.72);
  color: var(--blue-strong);
  box-shadow: none;
}

.primary-action:hover,
.button:hover,
.ghost-button:hover,
.icon-button:hover,
.danger-button:hover,
.favorite-button:hover,
.back-button:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.primary-action:active,
.button:active,
.ghost-button:active,
.icon-button:active,
.danger-button:active,
.favorite-button:active,
.back-button:active {
  transform: translateY(0) scale(0.985);
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.54;
  transform: none;
  box-shadow: none;
}

button:disabled:hover {
  transform: none;
  box-shadow: none;
}

.view {
  display: grid;
  gap: 18px;
}

.grid {
  display: grid;
  gap: 14px;
}

.stats-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.dashboard-stats {
  gap: 24px;
}

.content-grid {
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.65fr);
  align-items: start;
}

.dashboard-main-grid {
  grid-template-columns: minmax(0, 1.55fr) minmax(330px, 0.8fr);
  align-items: stretch;
  gap: 24px;
}

.dashboard-bottom-grid {
  grid-template-columns: minmax(0, 1.1fr) minmax(330px, 0.9fr);
  gap: 24px;
}

.card {
  border: 1px solid rgba(229, 236, 243, 0.9);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 18px 42px rgba(43, 58, 80, 0.07);
  backdrop-filter: blur(18px);
}

.card-pad {
  padding: 26px;
}

.stat {
  display: flex;
  min-height: 108px;
  align-items: center;
  gap: 22px;
  padding: 22px 24px;
  overflow: hidden;
  transition:
    transform 0.16s ease,
    box-shadow 0.16s ease;
}

.stat:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 48px rgba(64, 75, 90, 0.12);
}

.stat span {
  color: var(--muted);
  font-size: 15px;
  font-weight: 600;
}

.stat strong {
  display: block;
  margin-top: 8px;
  font-size: 28px;
  line-height: 1;
}

.stat-icon {
  display: grid;
  width: 54px;
  height: 54px;
  place-items: center;
  border-radius: 18px;
}

.stat-icon .ui-icon {
  width: 28px;
  height: 28px;
}

.stat-mint {
  background: linear-gradient(135deg, rgba(126, 221, 208, 0.2), rgba(255, 255, 255, 0.86));
}

.stat-mint .stat-icon {
  background: rgba(126, 221, 208, 0.55);
  color: #1d9b98;
}

.stat-green {
  background: linear-gradient(135deg, rgba(191, 229, 141, 0.25), rgba(255, 255, 255, 0.9));
}

.stat-green .stat-icon {
  background: rgba(191, 229, 141, 0.62);
  color: #6eab2e;
}

.stat-yellow {
  background: linear-gradient(135deg, rgba(247, 214, 107, 0.24), rgba(255, 255, 255, 0.9));
}

.stat-yellow .stat-icon {
  background: rgba(247, 214, 107, 0.58);
  color: #e39b11;
}

.stat-pink {
  background: linear-gradient(135deg, rgba(255, 155, 179, 0.22), rgba(255, 255, 255, 0.9));
}

.stat-pink .stat-icon {
  background: rgba(255, 143, 143, 0.62);
  color: #ef6d6d;
}

.stat:nth-child(2) {
  background: inherit;
}

.stat:nth-child(3) {
  background: inherit;
}

.stat:nth-child(4) {
  background: inherit;
}

.toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 180px 130px 104px;
  gap: 10px;
  align-items: center;
}

.bulk-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
  padding: 12px;
  border: 1px solid rgba(157, 177, 200, 0.35);
  border-radius: 15px;
  background: rgba(231, 238, 242, 0.58);
}

.bulk-bar strong {
  margin-right: auto;
  color: var(--blue-strong);
  font-size: 13px;
}

.field,
.select,
.textarea {
  width: 100%;
  border: 1px solid rgba(212, 219, 224, 0.92);
  border-radius: 13px;
  background: rgba(255, 253, 249, 0.9);
  color: var(--ink);
  outline: none;
  transition:
    border-color 0.16s ease,
    box-shadow 0.16s ease,
    background 0.16s ease;
}

.field,
.select {
  height: 42px;
  padding: 0 12px;
}

.search-field {
  padding-left: 38px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%23788190' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.5-3.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: 13px center;
}

.textarea {
  min-height: 150px;
  padding: 12px;
  resize: vertical;
  line-height: 1.65;
}

.format-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  width: fit-content;
  max-width: 100%;
  padding: 7px;
  border: 1px solid rgba(212, 219, 224, 0.72);
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(255, 253, 249, 0.94), rgba(241, 246, 248, 0.88));
}

.format-button {
  min-width: 32px;
  height: 30px;
  padding: 0 10px;
  border: 1px solid rgba(197, 207, 215, 0.78);
  border-radius: 10px;
  color: #435066;
  background: rgba(255, 255, 255, 0.78);
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  transition:
    background 0.16s ease,
    border-color 0.16s ease,
    color 0.16s ease,
    transform 0.16s ease,
    box-shadow 0.16s ease;
}

.format-button:hover,
.format-button.is-active {
  border-color: rgba(96, 127, 159, 0.5);
  color: var(--blue-strong);
  background: rgba(231, 238, 242, 0.86);
  box-shadow: 0 8px 18px rgba(75, 96, 124, 0.1);
  transform: translateY(-1px);
}

.format-bold {
  font-size: 14px;
  font-weight: 900;
}

.format-label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.format-divider {
  width: 1px;
  height: 18px;
  background: rgba(197, 207, 215, 0.86);
}

.field:focus,
.select:focus,
.textarea:focus {
  border-color: rgba(96, 127, 159, 0.52);
  background: #fffdf9;
  box-shadow: 0 0 0 4px rgba(157, 177, 200, 0.18);
}

.form {
  display: grid;
  gap: 14px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
}

.image-field {
  gap: 10px;
}

.image-upload-card {
  display: grid;
  min-height: 112px;
  place-items: center;
  gap: 4px;
  padding: 18px;
  border: 1.5px dashed rgba(96, 127, 159, 0.48);
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(231, 238, 242, 0.72), rgba(255, 253, 249, 0.88));
  color: var(--blue-strong);
  cursor: pointer;
  text-align: center;
  transition:
    transform 0.16s ease,
    border-color 0.16s ease,
    box-shadow 0.16s ease;
}

.image-upload-card:hover {
  transform: translateY(-1px);
  border-color: rgba(96, 127, 159, 0.72);
  box-shadow: 0 12px 24px rgba(75, 96, 124, 0.12);
}

.image-upload-card span {
  color: var(--blue-strong);
  font-size: 16px;
  font-weight: 850;
}

.image-upload-card small,
.image-empty {
  color: var(--muted);
  font-size: 12px;
}

.file-preview-list {
  display: grid;
  gap: 9px;
}

.file-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  min-height: 58px;
  padding: 10px 12px;
  border: 1px solid rgba(210, 222, 229, 0.78);
  border-radius: 14px;
  background: rgba(255, 253, 249, 0.86);
}

.file-icon {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 10px;
  color: var(--blue-strong);
  background: rgba(231, 238, 242, 0.86);
}

.file-info {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.file-info strong {
  overflow: hidden;
  color: #243044;
  font-size: 13px;
  font-weight: 820;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-info small,
.file-empty {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.file-remove {
  position: static;
  transform: none;
}

.mind-map-panel {
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 1px solid rgba(201, 218, 224, 0.66);
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(255, 253, 249, 0.94), rgba(241, 249, 246, 0.86));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.mind-map-head,
.mind-map-preview-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.mind-map-head h3,
.mind-map-preview-head h3 {
  margin: 0;
  color: #202b3a;
  font-size: 17px;
}

.mind-map-head p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
  line-height: 1.6;
}

.mind-map-tools {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.mind-map-tools span,
.mind-map-preview-head span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  color: #607f9f;
  background: rgba(231, 238, 242, 0.78);
  font-size: 12px;
  font-weight: 800;
}

.mind-map-scroll,
.mindmap-viewport {
  position: relative;
  height: 420px;
  overflow: auto;
  overscroll-behavior: contain;
  border: 1px solid rgba(196, 216, 219, 0.68);
  border-radius: 18px;
  background:
    radial-gradient(circle at 1px 1px, rgba(96, 127, 159, 0.12) 1px, transparent 0) 0 0 / 22px 22px,
    linear-gradient(135deg, rgba(255, 254, 250, 0.96), rgba(238, 249, 245, 0.9) 54%, rgba(247, 243, 255, 0.82));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.86);
}

.mindmap-scale-layer {
  position: relative;
  width: 2400px;
  height: 1400px;
}

.mind-map-canvas,
.mindmap-canvas {
  position: relative;
  width: 2400px;
  height: 1400px;
  outline: none;
  touch-action: pan-x pan-y;
  transform-origin: 0 0;
}

.mind-map-lines {
  position: absolute;
  inset: 0;
  width: 2400px;
  height: 1400px;
  pointer-events: none;
}

.mind-edge-path {
  fill: none;
  stroke: url(#mindEdgeGradient);
  stroke-width: 2.75;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0.76;
}

.mind-node {
  position: absolute;
  z-index: 2;
  width: fit-content;
  min-width: 96px;
  max-width: 260px;
  min-height: 0;
  padding: 12px 18px;
  border: 1.5px solid rgba(157, 216, 198, 0.58);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.94);
  color: #243044;
  box-shadow: 0 16px 34px rgba(75, 96, 124, 0.13);
  cursor: grab;
  user-select: none;
  touch-action: none;
  transition:
    border-color 0.16s ease,
    box-shadow 0.16s ease,
    transform 0.16s ease,
    background 0.16s ease;
}

.mind-node.level-1 {
  border-color: rgba(123, 211, 180, 0.68);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(238, 249, 245, 0.94));
}

.mind-node.level-2 {
  border-color: rgba(139, 185, 255, 0.66);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(239, 247, 255, 0.94));
}

.mind-node.level-3 {
  border-color: rgba(183, 154, 255, 0.58);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(247, 243, 255, 0.95));
}

.mind-node.level-4 {
  border-color: rgba(255, 190, 151, 0.62);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(255, 246, 239, 0.95));
}

.mind-node:active {
  cursor: grabbing;
}

.mind-node.is-dragging {
  cursor: grabbing;
  transform: scale(1.015);
  box-shadow: 0 22px 44px rgba(75, 96, 124, 0.18);
}

.mind-node.is-selected {
  border: 1.5px solid transparent;
  border-color: transparent;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(248, 253, 251, 0.95)) padding-box,
    linear-gradient(135deg, rgba(123, 211, 180, 0.95), rgba(183, 154, 255, 0.82)) border-box;
  box-shadow:
    0 0 0 2px rgba(255, 255, 255, 0.96),
    0 0 0 5px rgba(123, 211, 180, 0.34),
    0 18px 38px rgba(75, 96, 124, 0.16);
}

.mind-node.is-editing {
  border: 1.5px solid transparent;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.99), rgba(247, 243, 255, 0.96)) padding-box,
    linear-gradient(135deg, rgba(183, 154, 255, 0.9), rgba(139, 185, 255, 0.82)) border-box;
  box-shadow:
    0 0 0 5px rgba(183, 154, 255, 0.18),
    0 18px 40px rgba(75, 96, 124, 0.16);
}

.mind-node-text {
  white-space: normal;
  word-break: break-word;
  overflow-wrap: anywhere;
  color: #243044;
  font-size: 13px;
  font-weight: 760;
  line-height: 1.55;
}

.mind-node-input {
  width: 100%;
  min-width: 96px;
  max-width: 224px;
  min-height: 48px;
  border: 0;
  outline: none;
  resize: none;
  color: #243044;
  background: transparent;
  font: inherit;
  font-size: 13px;
  font-weight: 760;
  line-height: 1.55;
  white-space: normal;
  word-break: break-word;
}

.mind-map-hint {
  position: sticky;
  left: calc(100% - 360px);
  top: calc(100% - 46px);
  z-index: 3;
  width: max-content;
  max-width: 330px;
  padding: 8px 11px;
  border: 1px solid rgba(199, 212, 220, 0.6);
  border-radius: 999px;
  color: #6a7788;
  background: rgba(255, 255, 255, 0.8);
  font-size: 12px;
  font-weight: 760;
  backdrop-filter: blur(12px);
  box-shadow: 0 10px 22px rgba(75, 96, 124, 0.1);
}

.mind-map-preview {
  display: grid;
  gap: 12px;
  width: min(100%, 1180px);
  margin: 0 auto;
  padding: 18px;
  border: 1px solid rgba(210, 222, 229, 0.72);
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(251, 252, 251, 0.96), rgba(241, 248, 246, 0.78));
}

.mind-map-readonly {
  height: 520px;
  overflow: auto;
  cursor: grab;
  scrollbar-width: none;
  user-select: none;
  touch-action: none;
}

.mind-map-readonly::-webkit-scrollbar {
  width: 0;
  height: 0;
}

.mind-map-readonly.is-panning {
  cursor: grabbing;
}

.mind-map-readonly .mind-node {
  cursor: inherit;
  pointer-events: none;
}

.image-preview-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(116px, 1fr));
  gap: 10px;
}

.image-preview {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(223, 228, 232, 0.9);
  border-radius: 15px;
  background: #eef2f4;
  aspect-ratio: 1 / 1;
}

.image-preview img,
.prompt-cover img,
.detail-image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cover-badge,
.image-remove {
  position: absolute;
  border-radius: 999px;
  backdrop-filter: blur(12px);
  font-size: 12px;
  font-weight: 800;
}

.cover-badge {
  top: 8px;
  left: 8px;
  padding: 3px 8px;
  background: rgba(255, 253, 249, 0.84);
  color: var(--blue-strong);
}

.image-remove {
  right: 8px;
  bottom: 8px;
  min-height: 28px;
  padding: 0 9px;
  border: 1px solid rgba(203, 123, 136, 0.42);
  background: rgba(248, 233, 235, 0.92);
  color: var(--danger);
  cursor: pointer;
}

.image-empty {
  margin: 0;
  padding: 4px 2px;
}

.prompt-list {
  display: grid;
  gap: 10px;
}

.recent-card,
.category-card,
.quick-card,
.tips-card {
  min-height: 100%;
}

.dashboard-prompt-list {
  display: grid;
  gap: 18px;
}

.dashboard-prompt {
  display: grid;
  grid-template-columns: 100px minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 22px;
  min-height: 126px;
  padding: 16px;
  border: 1px solid rgba(235, 240, 245, 0.96);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.74);
  box-shadow: 0 10px 28px rgba(43, 58, 80, 0.045);
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease,
    border-color 0.18s ease;
}

.dashboard-prompt:hover {
  transform: translateY(-2px);
  border-color: rgba(126, 221, 208, 0.32);
  box-shadow: 0 18px 38px rgba(43, 58, 80, 0.08);
}

.dashboard-thumb {
  overflow: hidden;
  width: 100px;
  height: 100px;
  border-radius: 13px;
  background: #f3f7f9;
}

.dashboard-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.dashboard-thumb-fallback {
  width: 100%;
  height: 100%;
}

.thumb-0 {
  background:
    radial-gradient(circle at 72% 24%, rgba(255, 155, 179, 0.75), transparent 28%),
    linear-gradient(135deg, #8cc9ff, #ff9bb3 62%, #f7d66b);
}

.thumb-1 {
  background:
    radial-gradient(circle at 35% 32%, rgba(255, 255, 255, 0.78), transparent 22%),
    radial-gradient(circle at 68% 68%, rgba(255, 168, 107, 0.76), transparent 24%),
    linear-gradient(135deg, #7eddd0, #f6d7df);
}

.thumb-2 {
  background: linear-gradient(135deg, #c7a6f8, #8cc9ff 50%, #7eddd0);
}

.thumb-3 {
  background: linear-gradient(135deg, #bfe58d, #f7d66b 50%, #ffa86b);
}

.dashboard-prompt-main h3 {
  margin: 0 0 10px;
  font-size: 20px;
}

.mini-icon {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: #9aa5b7;
  cursor: pointer;
}

.mini-icon.is-active {
  color: #f7b42c;
}

.mini-icon:hover {
  background: #f6f8fb;
  color: #f7b42c;
}

.category-progress-row {
  display: grid;
  gap: 8px;
}

.quick-actions {
  display: grid;
  grid-template-columns: repeat(5, minmax(92px, 1fr));
  gap: 24px;
  margin-top: 24px;
}

.quick-action {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 12px;
  color: var(--muted);
  font-weight: 600;
  text-align: center;
}

.quick-action .ui-icon {
  width: 28px;
  height: 28px;
}

.quick-action::before {
  display: grid;
  width: 68px;
  height: 68px;
  place-items: center;
  border-radius: 16px;
  content: "";
}

.quick-action .ui-icon {
  position: absolute;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  margin-top: 0;
}

.qa-mint::before { background: linear-gradient(135deg, rgba(126, 221, 208, 0.74), rgba(126, 221, 208, 0.34)); }
.qa-green::before { background: linear-gradient(135deg, rgba(191, 229, 141, 0.74), rgba(191, 229, 141, 0.34)); }
.qa-yellow::before { background: linear-gradient(135deg, rgba(247, 214, 107, 0.74), rgba(247, 214, 107, 0.34)); }
.qa-orange::before { background: linear-gradient(135deg, rgba(255, 168, 107, 0.62), rgba(255, 155, 179, 0.26)); }
.qa-purple::before { background: linear-gradient(135deg, rgba(199, 166, 248, 0.7), rgba(199, 166, 248, 0.34)); }

.qa-mint { color: #29aaa7; }
.qa-green { color: #7eb63f; }
.qa-yellow { color: #e8a41a; }
.qa-orange { color: #ef7163; }
.qa-purple { color: #9b5bea; }

.quick-action span {
  margin-top: 4px;
  color: var(--muted);
}

.tips-card h2 {
  display: flex;
  align-items: center;
  gap: 10px;
}

.tips-card h2 .ui-icon {
  color: #f5b933;
}

.tips-card p {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 18px 0 0;
  color: var(--muted);
  line-height: 1.6;
}

.tips-card p::before {
  color: #7f8ba0;
  content: "›";
  font-size: 22px;
  font-weight: 800;
}

.todo-board {
  display: grid;
  gap: 20px;
  max-width: 100%;
  margin: 0 0 18px;
  box-sizing: border-box;
  overflow: hidden;
  background:
    radial-gradient(circle at 8% 0%, rgba(126, 221, 208, 0.26), transparent 34%),
    radial-gradient(circle at 92% 10%, rgba(199, 166, 248, 0.2), transparent 30%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.94), rgba(244, 251, 248, 0.9));
  box-shadow:
    0 22px 54px rgba(56, 72, 92, 0.09),
    0 0 0 1px rgba(126, 221, 208, 0.12);
}

.todo-board-head h2 {
  margin-bottom: 4px;
  color: #202b3a;
  font-size: clamp(22px, 3vw, 30px);
  line-height: 1.15;
}

.todo-board-head p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.todo-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr);
  align-items: stretch;
  gap: 24px;
  max-width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}

.todo-list-panel,
.todo-timeline-panel {
  display: flex;
  flex-direction: column;
  min-width: 0;
  max-width: 100%;
  height: 390px;
  min-height: 0;
  padding: 16px;
  box-sizing: border-box;
  overflow: hidden;
  border: 1px solid rgba(213, 229, 230, 0.78);
  border-radius: 20px;
  background: rgba(255, 253, 249, 0.82);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.todo-form {
  flex: 0 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  max-width: 100%;
  margin-bottom: 14px;
  box-sizing: border-box;
  overflow: hidden;
}

.todo-form > * {
  max-width: 100%;
  box-sizing: border-box;
}

.todo-input {
  flex: 1 1 220px;
  min-width: 200px;
}

.todo-date {
  flex: 0 1 180px;
  min-width: 160px;
}

.todo-priority-select {
  flex: 0 1 140px;
  min-width: 120px;
}

.todo-add {
  flex: 0 0 auto;
  min-width: 140px;
  white-space: nowrap;
}

.todo-list,
.todo-timeline {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.todo-list-scroll,
.todo-timeline-scroll {
  min-height: 0;
  overflow-y: auto;
  padding-right: 4px;
  scrollbar-width: thin;
  scrollbar-color: rgba(126, 221, 208, 0.6) rgba(231, 238, 242, 0.38);
}

.todo-list-scroll {
  flex: 1 1 auto;
}

.todo-timeline-scroll {
  flex: 1 1 auto;
}

.todo-list-scroll::-webkit-scrollbar,
.todo-timeline-scroll::-webkit-scrollbar {
  width: 7px;
}

.todo-list-scroll::-webkit-scrollbar-track,
.todo-timeline-scroll::-webkit-scrollbar-track {
  border-radius: 999px;
  background: rgba(231, 238, 242, 0.38);
}

.todo-list-scroll::-webkit-scrollbar-thumb,
.todo-timeline-scroll::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(126, 221, 208, 0.72), rgba(140, 201, 255, 0.55));
}

.todo-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid rgba(223, 228, 232, 0.76);
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.78);
  transition:
    border-color 0.18s ease,
    background 0.18s ease,
    transform 0.18s ease;
}

.todo-item:hover {
  border-color: rgba(126, 221, 208, 0.42);
  transform: translateY(-1px);
}

.todo-check {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border: 1.5px solid rgba(96, 127, 159, 0.34);
  border-radius: 9px;
  color: #fff;
  background: rgba(255, 255, 255, 0.78);
  cursor: pointer;
  transition:
    background 0.18s ease,
    border-color 0.18s ease,
    transform 0.18s ease;
}

.todo-check span {
  font-size: 15px;
  font-weight: 900;
  transform: scale(0.78);
  transition: transform 0.18s ease;
}

.todo-item.is-completed .todo-check {
  border-color: transparent;
  background: linear-gradient(135deg, var(--mint), var(--blue));
}

.todo-item.is-completed .todo-check span {
  transform: scale(1);
}

.todo-main {
  min-width: 0;
}

.todo-main p {
  margin: 0 0 7px;
  color: #243044;
  font-size: 14px;
  font-weight: 760;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.todo-item.is-completed .todo-main p {
  color: #95a0ae;
  text-decoration: line-through;
  text-decoration-thickness: 1px;
}

.todo-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  color: var(--muted);
  font-size: 12px;
}

.todo-priority {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 2px 8px;
  border-radius: 999px;
  font-weight: 850;
}

.priority-low {
  background: rgba(231, 238, 242, 0.86);
  color: #607f9f;
}

.priority-medium {
  background: rgba(247, 214, 107, 0.28);
  color: #d58b0b;
}

.priority-high {
  background: rgba(255, 155, 179, 0.24);
  color: #e65e78;
}

.todo-delete {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border: 1px solid transparent;
  border-radius: 10px;
  color: #b6bfcb;
  background: transparent;
  cursor: pointer;
  opacity: 0.64;
}

.todo-delete:hover {
  border-color: rgba(239, 110, 133, 0.2);
  color: var(--danger);
  background: rgba(250, 236, 239, 0.66);
  opacity: 1;
}

.todo-delete .ui-icon {
  width: 16px;
  height: 16px;
}

.todo-empty,
.todo-timeline-empty {
  padding: 18px;
  border: 1px dashed rgba(199, 212, 220, 0.8);
  border-radius: 15px;
  color: var(--muted);
  text-align: center;
  background: rgba(255, 255, 255, 0.5);
}

.todo-timeline-panel h3 {
  margin: 0 0 12px;
  color: #202b3a;
  font-size: 16px;
}

.todo-timeline {
  position: relative;
}

.todo-timeline::before {
  position: absolute;
  top: 8px;
  bottom: 8px;
  left: 8px;
  width: 2px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(126, 221, 208, 0.6), rgba(199, 166, 248, 0.28));
  content: "";
}

.todo-timeline-item {
  position: relative;
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 10px;
}

.timeline-dot {
  position: relative;
  z-index: 1;
  width: 16px;
  height: 16px;
  margin-top: 4px;
  border: 3px solid rgba(255, 255, 255, 0.96);
  border-radius: 999px;
  box-shadow: 0 0 0 1px rgba(157, 177, 200, 0.2);
}

.timeline-dot.priority-low { background: var(--blue); }
.timeline-dot.priority-medium { background: var(--yellow); }
.timeline-dot.priority-high { background: var(--pink); }

.todo-timeline-item time {
  color: #607f9f;
  font-size: 12px;
  font-weight: 800;
}

.todo-timeline-item p {
  margin: 4px 0 7px;
  color: #243044;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.made-with-love {
  margin: 14px 0 0;
  color: var(--muted);
  text-align: center;
}

.prompt-item {
  display: grid;
  gap: 10px;
  padding: 16px;
  border: 1px solid rgba(223, 228, 232, 0.84);
  border-radius: 16px;
  background: rgba(255, 253, 249, 0.88);
  box-shadow: 0 8px 22px rgba(64, 75, 90, 0.05);
  transition:
    transform 0.18s ease,
    border-color 0.18s ease,
    box-shadow 0.18s ease,
    background 0.18s ease;
}

.prompt-item.has-cover {
  grid-template-columns: 132px minmax(0, 1fr);
  gap: 14px;
  align-items: stretch;
  padding: 12px;
}

.prompt-item.is-managing {
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  cursor: default;
}

.prompt-item.has-cover.is-managing {
  grid-template-columns: auto 132px minmax(0, 1fr);
}

.prompt-item.is-managing:hover {
  border-color: rgba(139, 185, 255, 0.48);
  box-shadow: 0 10px 22px rgba(79, 141, 247, 0.08);
}

.manage-check {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid rgba(139, 185, 255, 0.44);
  border-radius: 10px;
  background: #f8fbff;
}

.manage-check input {
  width: 18px;
  height: 18px;
  accent-color: var(--blue-strong);
  cursor: pointer;
}

.prompt-cover {
  overflow: hidden;
  border-radius: 14px;
  background: #e9eef1;
  aspect-ratio: 4 / 3;
}

.prompt-card-main {
  display: grid;
  min-width: 0;
  gap: 10px;
  align-content: center;
}

.prompt-item:hover {
  transform: translateY(-2px);
  border-color: rgba(96, 127, 159, 0.34);
  background: rgba(255, 253, 249, 0.96);
  box-shadow: 0 18px 42px rgba(64, 75, 90, 0.1);
}

.prompt-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.prompt-title {
  margin: 0;
  font-size: 16px;
  line-height: 1.35;
  color: #202b3a;
}

.prompt-meta,
.tag-row,
.actions,
.section-head {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.section-head {
  justify-content: space-between;
}

.prompt-meta {
  color: var(--muted);
  font-size: 12px;
}

.detail-card {
  display: grid;
  gap: 20px;
  padding: clamp(18px, 3vw, 26px);
}

.detail-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-top: 2px;
}

.detail-title {
  margin: 12px 0 0;
  font-size: clamp(22px, 4vw, 30px);
  line-height: 1.22;
  color: #202b3a;
}

.detail-meta {
  gap: 10px;
  padding: 8px 10px;
  border: 1px solid rgba(223, 228, 232, 0.86);
  border-radius: 999px;
  background: rgba(246, 248, 248, 0.82);
  width: fit-content;
}

.detail-gallery {
  display: grid;
  gap: 12px;
}

.detail-gallery.single {
  max-width: 760px;
}

.detail-gallery.multi {
  grid-auto-flow: column;
  grid-auto-columns: minmax(220px, 42%);
  overflow-x: auto;
  padding-bottom: 4px;
  scroll-snap-type: x mandatory;
}

.detail-gallery.multi::-webkit-scrollbar {
  height: 8px;
}

.detail-gallery.multi::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(139, 185, 255, 0.46);
}

.detail-image {
  overflow: hidden;
  margin: 0;
  border: 1px solid rgba(223, 228, 232, 0.9);
  border-radius: 18px;
  background: #eef2f4;
  box-shadow: 0 18px 40px rgba(64, 75, 90, 0.1);
  scroll-snap-align: start;
  cursor: zoom-in;
}

.detail-gallery.single .detail-image,
.detail-gallery.multi .detail-image {
  aspect-ratio: 4 / 5;
}

.detail-gallery.single .detail-image {
  max-height: 680px;
}

.detail-files {
  display: grid;
  gap: 10px;
  width: min(100%, 760px);
}

.detail-files h3 {
  margin: 0;
  color: #4b5563;
  font-size: 16px;
}

.detail-file-list {
  gap: 8px;
}

.file-download {
  min-height: 34px;
  padding: 0 10px;
}

body.is-preview-open {
  overflow: hidden;
}

.detail-preview-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 64px 72px;
  background: rgba(8, 12, 18, 0.88);
}

.detail-preview-image {
  display: block;
  max-width: min(100%, 1180px);
  max-height: 86vh;
  border-radius: 14px;
  object-fit: contain;
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.46);
}

.detail-preview-close,
.detail-preview-nav {
  position: fixed;
  z-index: 1001;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  color: #fff;
  background: rgba(18, 24, 32, 0.58);
  cursor: pointer;
  backdrop-filter: blur(14px);
  transition:
    background 0.18s ease,
    transform 0.18s ease;
}

.detail-preview-close:hover,
.detail-preview-nav:hover {
  background: rgba(40, 48, 60, 0.78);
  transform: translateY(-1px);
}

.detail-preview-close {
  top: 22px;
  right: 22px;
  width: 48px;
  height: 48px;
  font-size: 34px;
  line-height: 1;
}

.detail-preview-nav {
  top: 50%;
  width: 52px;
  height: 52px;
  font-size: 42px;
  line-height: 1;
  transform: translateY(-50%);
}

.detail-preview-nav:hover {
  transform: translateY(calc(-50% - 1px));
}

.detail-preview-prev {
  left: 24px;
}

.detail-preview-next {
  right: 24px;
}

.detail-preview-count {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  min-width: 64px;
  padding: 7px 12px;
  border-radius: 999px;
  color: #fff;
  background: rgba(18, 24, 32, 0.62);
  font-size: 14px;
  font-weight: 700;
  text-align: center;
  backdrop-filter: blur(14px);
}

.pill,
.tag {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.pill {
  background: #e7eef2;
  color: var(--blue-strong);
}

.tag {
  background: #f1efea;
  color: #66707f;
}

.favorite {
  color: var(--danger);
}

.favorite-state {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 9px;
  border-radius: 999px;
  background: #f3f4f6;
  color: #6b7280;
  font-size: 12px;
  font-weight: 800;
}

.favorite-state.is-active {
  background: #faecef;
  color: var(--danger);
}

.muted {
  color: var(--muted);
}

.storage-debug {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid rgba(157, 177, 200, 0.34);
  border-radius: 15px;
  background: rgba(231, 238, 242, 0.48);
  color: #435066;
  font-size: 13px;
}

.storage-meter {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(237, 241, 245, 0.9);
}

.storage-meter span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--mint), var(--yellow), var(--pink));
}

.storage-warning {
  color: var(--danger);
  font-size: 13px;
  line-height: 1.5;
}

.empty {
  display: grid;
  min-height: 220px;
  place-items: center;
  padding: 22px;
  border: 1px dashed #cbd5dc;
  border-radius: 16px;
  color: var(--muted);
  text-align: center;
  background: rgba(255, 253, 249, 0.58);
}

.detail-content-stack {
  display: grid;
  gap: 22px;
  width: min(100%, 1180px);
  margin: 8px auto 0;
}

.detail-body,
.detail-reading-card {
  width: 100%;
  min-height: 260px;
  margin: 0;
  padding: clamp(32px, 3.4vw, 40px);
  border: 1px solid rgba(210, 222, 229, 0.72);
  border-radius: 20px;
  background: #fbfcfb;
  color: #202b3a;
  font-size: 17px;
  font-weight: 400;
  white-space: pre-wrap;
  line-height: 1.9;
  letter-spacing: 0;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.86);
}

.detail-body strong {
  color: #202b3a;
  font-weight: 700;
}

.text-highlight {
  display: inline;
  padding: 0.08em 0.28em;
  border-radius: 7px;
  background: rgba(247, 214, 107, 0.38);
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}

.text-large {
  font-size: 1.2em;
  font-weight: 650;
  color: #202b3a;
}

.text-small {
  font-size: 0.88em;
  color: #5f6b7a;
}

.detail-note {
  display: grid;
  gap: 8px;
  margin-top: 2px;
}

.detail-note h3 {
  margin: 0;
  color: #4b5563;
}

.note-box {
  padding: 14px;
  border: 1px solid rgba(156, 188, 175, 0.34);
  border-radius: 16px;
  background: #f2f7f4;
  color: #435066;
  line-height: 1.65;
  white-space: pre-wrap;
}

.category-list {
  display: grid;
  gap: 10px;
}

.category-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 10px;
  align-items: center;
  padding: 12px;
  border: 1px solid rgba(223, 228, 232, 0.86);
  border-radius: 15px;
  background: rgba(255, 253, 249, 0.9);
}

.progress {
  height: 8px;
  overflow: hidden;
  border-radius: 99px;
  background: #edf1f4;
}

.progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--mint);
}

.sidebar-tools {
  display: grid;
  gap: 0;
  margin-top: auto;
}

.storage-mini,
.side-import {
  border: 1px solid rgba(237, 209, 221, 0.7);
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 14px 38px rgba(43, 58, 80, 0.045);
}

.storage-mini {
  display: grid;
  grid-template-columns: 1fr 72px;
  gap: 10px;
  align-items: center;
  padding: 20px 22px;
  border-radius: 16px 16px 0 0;
}

.storage-mini span,
.storage-mini small {
  color: var(--muted);
}

.storage-mini strong {
  display: block;
  margin-top: 14px;
  color: #e85f96;
}

.mini-ring {
  display: grid;
  width: 72px;
  height: 72px;
  place-items: center;
  border: 8px solid #f0f2f5;
  border-top-color: #55c7bd;
  border-radius: 50%;
  color: var(--ink);
  font-weight: 800;
}

.storage-mini small {
  grid-column: 1 / -1;
}

.side-import {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: center;
  padding: 18px;
  border-top: 0;
  border-radius: 0 0 16px 16px;
  color: var(--muted);
  font-weight: 600;
}

.dashboard-stats .stat-green {
  background: linear-gradient(135deg, rgba(191, 229, 141, 0.25), rgba(255, 255, 255, 0.9));
}

.dashboard-stats .stat-yellow {
  background: linear-gradient(135deg, rgba(247, 214, 107, 0.24), rgba(255, 255, 255, 0.9));
}

.dashboard-stats .stat-pink {
  background: linear-gradient(135deg, rgba(255, 155, 179, 0.22), rgba(255, 255, 255, 0.9));
}

.file-input {
  display: none;
}

.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 20;
  max-width: min(360px, calc(100vw - 36px));
  padding: 12px 14px;
  border: 1px solid rgba(223, 228, 232, 0.86);
  border-radius: 15px;
  background: rgba(255, 253, 249, 0.94);
  box-shadow: var(--shadow);
  color: var(--ink);
  opacity: 0;
  transform: translateY(14px);
  pointer-events: none;
  backdrop-filter: blur(18px);
  transition:
    opacity 0.2s ease,
    transform 0.2s ease;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

.mobile-nav {
  display: none;
}

@media (max-width: 980px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    display: none;
  }

  .main {
    padding-bottom: 92px;
  }

  .stats-grid,
  .content-grid,
  .dashboard-main-grid,
  .dashboard-bottom-grid {
    grid-template-columns: 1fr 1fr;
  }

  .quick-actions {
    grid-template-columns: repeat(3, minmax(92px, 1fr));
  }

  .mobile-nav {
    position: fixed;
    right: 12px;
    bottom: 12px;
    left: 12px;
    z-index: 10;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 4px;
    padding: 6px;
    border: 1px solid rgba(223, 228, 232, 0.86);
    border-radius: 18px;
    background: rgba(255, 253, 249, 0.9);
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
  }

  .mobile-nav a {
    display: grid;
    min-height: 42px;
    place-items: center;
    gap: 2px;
    font-size: 12px;
  }

  .mobile-nav .ui-icon {
    width: 16px;
    height: 16px;
  }

  .mobile-nav a:hover {
    transform: none;
  }
}

@media (max-width: 1100px) {
  .todo-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .main {
    padding: 18px 14px 90px;
  }

  .topbar {
    align-items: flex-start;
  }

  .primary-action {
    min-width: 88px;
    padding: 0 12px;
  }

  .stats-grid,
  .content-grid,
  .dashboard-main-grid,
  .dashboard-bottom-grid,
  .toolbar,
  .form-row {
    grid-template-columns: 1fr;
  }

  .stat {
    min-height: 98px;
  }

  .dashboard-prompt {
    grid-template-columns: 82px minmax(0, 1fr);
    gap: 14px;
  }

  .dashboard-thumb {
    width: 82px;
    height: 82px;
  }

  .dashboard-prompt .mini-icon {
    display: none;
  }

  .quick-actions {
    grid-template-columns: repeat(2, minmax(110px, 1fr));
  }

  .todo-layout {
    grid-template-columns: 1fr;
  }

  .todo-input,
  .todo-date,
  .todo-priority-select,
  .todo-add {
    flex: 1 1 100%;
    min-width: 0;
  }

  .todo-list-panel,
  .todo-timeline-panel {
    height: 380px;
    padding: 12px;
  }

  .todo-item {
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: flex-start;
  }

  .todo-check {
    width: 34px;
    height: 34px;
  }

  .category-item {
    grid-template-columns: 1fr;
  }

  .detail-top {
    display: grid;
    gap: 14px;
  }

  .detail-meta {
    width: 100%;
    border-radius: var(--radius);
  }

  .detail-gallery.multi {
    grid-auto-columns: minmax(210px, 78%);
  }

  .detail-preview-modal {
    padding: 58px 46px;
  }

  .detail-preview-image {
    max-height: 82vh;
    border-radius: 12px;
  }

  .detail-preview-close {
    top: 14px;
    right: 14px;
    width: 48px;
    height: 48px;
    font-size: 34px;
  }

  .detail-preview-nav {
    width: 42px;
    height: 42px;
    font-size: 34px;
  }

  .detail-preview-prev {
    left: 8px;
  }

  .detail-preview-next {
    right: 8px;
  }

  .detail-preview-count {
    bottom: 16px;
  }

  .detail-body {
    width: 100%;
    min-height: 220px;
    padding: 18px;
    border-radius: 16px;
    font-size: 16px;
    line-height: 1.9;
  }

  .detail-content-stack {
    width: 100%;
    gap: 16px;
  }

  .prompt-item.has-cover {
    grid-template-columns: 104px minmax(0, 1fr);
  }

  .prompt-item.is-managing,
  .prompt-item.has-cover.is-managing {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .prompt-item.has-cover.is-managing .prompt-cover {
    grid-column: 1 / -1;
    width: 100%;
  }

  .bulk-bar .ghost-button,
  .bulk-bar .danger-button {
    flex: 1 1 118px;
  }

  .bulk-bar strong {
    flex: 1 1 100%;
  }

  .image-preview-list {
    grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
  }

  .format-toolbar {
    width: 100%;
    gap: 6px;
  }

  .format-button {
    flex: 0 0 auto;
    min-width: 30px;
    padding: 0 9px;
  }

  .mind-map-panel,
  .mind-map-preview {
    padding: 12px;
    border-radius: 16px;
  }

  .mind-map-head,
  .mind-map-preview-head {
    display: grid;
  }

  .mind-map-tools {
    justify-content: flex-start;
  }

  .mind-map-scroll {
    height: 320px;
  }

  .mind-map-readonly {
    height: 380px;
  }

  .mind-map-hint {
    left: 12px;
    top: calc(100% - 44px);
    max-width: calc(100vw - 64px);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .detail-card .actions {
    width: 100%;
  }

  .actions .button,
  .actions .ghost-button,
  .actions .danger-button,
  .actions .icon-button,
  .actions .favorite-button {
    flex: 1 1 120px;
  }
}
