
:root {
  --ink: #33445b;
  --muted: #718097;
  --blue: #dcecf7;
  --blue-deep: #7ea9c7;
  --cream: #fffaf0;
  --paper: #f7f3e9;
  --line: rgba(81, 108, 132, 0.14);
  --shadow: 0 14px 35px rgba(72, 95, 116, 0.12);
  --radius: 24px;
  font-family: ui-rounded, "SF Pro Rounded", "PingFang TC", "Noto Sans TC", system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--paper);
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    linear-gradient(rgba(255,255,255,.72), rgba(255,255,255,.72)),
    repeating-linear-gradient(
      to bottom,
      transparent 0,
      transparent 31px,
      rgba(112, 143, 169, .13) 32px,
      transparent 33px
    ),
    var(--paper);
  padding-bottom: calc(88px + env(safe-area-inset-bottom));
}

button,
input,
textarea {
  font: inherit;
}

button {
  color: inherit;
}

.paper-noise {
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: .18;
  background-image:
    radial-gradient(circle at 20% 30%, rgba(94, 116, 134, .12) 0 1px, transparent 1.4px),
    radial-gradient(circle at 70% 60%, rgba(94, 116, 134, .08) 0 1px, transparent 1.3px);
  background-size: 19px 19px, 23px 23px;
  mix-blend-mode: multiply;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: calc(18px + env(safe-area-inset-top)) 18px 14px;
  background: rgba(247, 243, 233, .88);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--line);
}

.topbar h1 {
  margin: 2px 0 0;
  font-size: clamp(1.4rem, 5vw, 2rem);
  letter-spacing: .04em;
}

.eyebrow {
  margin: 0;
  color: var(--blue-deep);
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .18em;
}

.app-shell {
  width: min(100%, 980px);
  margin: 0 auto;
  padding: 18px;
}

.card {
  background: rgba(255,255,255,.72);
  border: 1px solid rgba(255,255,255,.86);
  box-shadow: var(--shadow);
  border-radius: var(--radius);
}

.toolbar {
  display: grid;
  gap: 14px;
  padding: 14px;
  margin-bottom: 22px;
}

.search-box {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: 18px;
}

.search-box span {
  font-size: 1.35rem;
  color: var(--blue-deep);
}

.search-box input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font-size: 1rem;
}

.toolbar-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.chips {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 2px;
  scrollbar-width: none;
}

.chips::-webkit-scrollbar {
  display: none;
}

.chip,
.ghost-btn,
.primary-btn,
.danger-btn,
.copy-btn,
.edit-btn,
.bottom-dock button,
.import-label {
  border: 0;
  border-radius: 999px;
  padding: 10px 14px;
  font-weight: 750;
  cursor: pointer;
  transition: transform .16s ease, box-shadow .16s ease, background .16s ease;
  -webkit-tap-highlight-color: transparent;
}

button:active,
.import-label:active {
  transform: scale(.97);
}

.primary-btn {
  background: linear-gradient(135deg, #a8c9df, #7faac7);
  color: white;
  box-shadow: 0 8px 18px rgba(99, 143, 174, .28);
}

.primary-btn span {
  font-size: 1.2rem;
}

.ghost-btn,
.chip,
.edit-btn,
.bottom-dock button,
.import-label {
  background: rgba(255,255,255,.8);
  color: var(--ink);
  border: 1px solid var(--line);
}

.chip.active {
  background: var(--blue);
  border-color: rgba(93, 143, 179, .34);
  color: #426f8e;
}

.notes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr));
  gap: 18px;
}

.note-card {
  position: relative;
  min-height: 260px;
  display: flex;
  flex-direction: column;
  padding: 26px 18px 16px;
  border-radius: 11px 11px 19px 11px;
  box-shadow: 0 16px 28px rgba(69, 88, 104, .13);
  border: 1px solid rgba(255,255,255,.72);
  overflow: hidden;
  transform: rotate(var(--tilt, -0.6deg));
}

.note-card:nth-child(2n) { --tilt: .55deg; }
.note-card:nth-child(3n) { --tilt: -.25deg; }

.note-card[data-color="blue"] { background: #dcecf7; }
.note-card[data-color="cream"] { background: #fff8e8; }
.note-card[data-color="pink"] { background: #f5e5e8; }
.note-card[data-color="gray"] { background: #e9e7e2; }

.note-card::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  width: 34px;
  height: 34px;
  background: linear-gradient(135deg, transparent 50%, rgba(255,255,255,.66) 51%);
  filter: drop-shadow(-3px -3px 4px rgba(67,85,100,.08));
}

.note-tape {
  position: absolute;
  top: 7px;
  left: 50%;
  width: 82px;
  height: 22px;
  transform: translateX(-50%) rotate(-1.5deg);
  background: rgba(255,255,255,.5);
  border-left: 1px solid rgba(255,255,255,.68);
  border-right: 1px solid rgba(255,255,255,.68);
}

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

.note-title {
  margin: 7px 0 10px;
  font-size: 1.18rem;
  line-height: 1.4;
}

.category-badge {
  display: inline-flex;
  padding: 5px 9px;
  border-radius: 999px;
  background: rgba(255,255,255,.52);
  color: #657a8e;
  font-size: .72rem;
  font-weight: 800;
}

.pin-btn,
.icon-btn {
  border: 0;
  background: transparent;
  font-size: 1.35rem;
  cursor: pointer;
  padding: 4px;
}

.pin-btn.active {
  color: #6f9fbd;
}

.note-preview {
  flex: 1;
  margin: 0 0 16px;
  color: #48596c;
  line-height: 1.72;
  white-space: pre-wrap;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 7;
  -webkit-box-orient: vertical;
}

.note-actions {
  display: flex;
  gap: 9px;
  position: relative;
  z-index: 2;
}

.copy-btn {
  flex: 1;
  background: rgba(71, 112, 142, .9);
  color: white;
  box-shadow: 0 6px 14px rgba(76, 111, 135, .2);
}

.edit-btn {
  padding-inline: 16px;
  background: rgba(255,255,255,.58);
}

.empty-state {
  text-align: center;
  padding: 56px 20px;
  color: var(--muted);
}

.empty-state h2 {
  color: var(--ink);
  margin-bottom: 8px;
}

.empty-sticker {
  font-size: 3rem;
  filter: drop-shadow(0 8px 12px rgba(60,80,96,.14));
}

.hidden {
  display: none !important;
}

.bottom-dock {
  position: fixed;
  z-index: 30;
  left: 50%;
  bottom: calc(12px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  width: max-content;
  max-width: calc(100% - 28px);
  padding: 8px;
  background: rgba(255,255,255,.78);
  border: 1px solid rgba(255,255,255,.92);
  border-radius: 999px;
  box-shadow: 0 12px 30px rgba(62, 84, 102, .18);
  backdrop-filter: blur(16px);
}

.bottom-dock button,
.import-label {
  font-size: .82rem;
}

.note-dialog {
  width: min(92vw, 620px);
  max-height: 88vh;
  border: 0;
  border-radius: 28px;
  padding: 0;
  background: #fffdf7;
  color: var(--ink);
  box-shadow: 0 28px 80px rgba(45, 62, 78, .28);
}

.note-dialog::backdrop {
  background: rgba(43, 57, 71, .34);
  backdrop-filter: blur(5px);
}

.note-dialog form {
  display: grid;
  gap: 16px;
  padding: 20px;
  max-height: 88vh;
  overflow: auto;
}

.dialog-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.dialog-header h2 {
  margin: 3px 0 0;
}

.note-dialog label {
  display: grid;
  gap: 7px;
  font-weight: 750;
}

.note-dialog input[type="text"],
.note-dialog input:not([type]),
.note-dialog textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: white;
  color: var(--ink);
  padding: 12px 13px;
  outline: none;
}

.note-dialog input:focus,
.note-dialog textarea:focus {
  border-color: #9abdd5;
  box-shadow: 0 0 0 4px rgba(146, 185, 211, .18);
}

.note-dialog textarea {
  resize: vertical;
  line-height: 1.65;
}

fieldset {
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 12px;
}

legend {
  font-weight: 750;
  padding: 0 6px;
}

.color-options {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.color-options label {
  display: block;
}

.color-options input {
  position: absolute;
  opacity: 0;
}

.swatch {
  display: block;
  padding: 11px;
  border-radius: 14px;
  text-align: center;
  border: 2px solid transparent;
}

.color-options input:checked + .swatch {
  border-color: #6f9fbd;
  box-shadow: 0 0 0 3px rgba(111,159,189,.13);
}

.swatch.blue { background: #dcecf7; }
.swatch.cream { background: #fff8e8; }
.swatch.pink { background: #f5e5e8; }
.swatch.gray { background: #e9e7e2; }

.pin-row {
  display: flex !important;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 10px !important;
  padding: 10px 2px;
}

.pin-row input {
  width: 20px;
  height: 20px;
}

.dialog-actions {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding-top: 4px;
}

.dialog-actions-right {
  display: flex;
  gap: 8px;
  margin-left: auto;
}

.danger-btn {
  background: #f4dede;
  color: #a84f58;
}

.toast {
  position: fixed;
  z-index: 9999;
  left: 50%;
  top: calc(78px + env(safe-area-inset-top));
  bottom: auto;
  transform: translate(-50%, -14px) scale(.96);
  width: max-content;
  max-width: calc(100% - 32px);
  padding: 13px 18px;
  background: rgba(48, 66, 82, .96);
  color: white;
  border: 1px solid rgba(255,255,255,.34);
  border-radius: 999px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease, transform .2s ease;
  font-weight: 800;
  text-align: center;
  box-shadow: 0 14px 34px rgba(41, 54, 66, .28);
  backdrop-filter: blur(12px);
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0) scale(1);
}

.copy-btn.copied {
  background: rgba(91, 145, 119, .94);
  transform: scale(.98);
}

@media (max-width: 520px) {
  .topbar {
    align-items: flex-end;
  }

  .topbar .primary-btn {
    padding: 9px 12px;
  }

  .toolbar-row {
    align-items: stretch;
  }

  .toolbar-row .ghost-btn {
    width: 100%;
  }

  .color-options {
    grid-template-columns: 1fr 1fr;
  }

  .note-card {
    min-height: 238px;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    scroll-behavior: auto !important;
  }
}


/* v4: view switcher and inspiration draw */
.view-switcher {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
  padding: 7px;
  margin-bottom: 18px;
  background: rgba(255,255,255,.66);
  position: sticky;
  top: calc(78px + env(safe-area-inset-top));
  z-index: 15;
  backdrop-filter: blur(16px);
}

.view-tab {
  border: 0;
  border-radius: 17px;
  padding: 11px 12px;
  background: transparent;
  color: var(--muted);
  font-weight: 800;
  cursor: pointer;
  transition: .18s ease;
}

.view-tab.active {
  background: linear-gradient(135deg, #edf6fb, #d6e8f4);
  color: #4c7691;
  box-shadow: 0 7px 16px rgba(91, 128, 153, .15);
}

.inspiration-hero {
  position: relative;
  overflow: hidden;
  padding: 20px;
  margin-bottom: 18px;
}

.inspiration-hero::after {
  content: "✦";
  position: absolute;
  right: -10px;
  top: -30px;
  font-size: 9rem;
  color: rgba(142, 183, 211, .10);
  transform: rotate(15deg);
  pointer-events: none;
}

.hero-copy {
  position: relative;
  z-index: 1;
}

.hero-copy h2,
.draw-board-head h2 {
  margin: 4px 0 8px;
}

.hero-copy > p:last-child {
  margin: 0 0 18px;
  color: var(--muted);
  line-height: 1.65;
}

.idea-controls {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr);
  gap: 12px;
}

.idea-controls label {
  display: grid;
  gap: 7px;
  font-weight: 800;
  font-size: .88rem;
}

.idea-controls select,
.idea-controls input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 12px 13px;
  background: rgba(255,250,240,.9);
  color: var(--ink);
  outline: none;
}

.idea-controls select:focus,
.idea-controls input:focus {
  border-color: #9abdd5;
  box-shadow: 0 0 0 4px rgba(146, 185, 211, .16);
}

.toggle-pills {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.toggle-pill {
  display: block;
  cursor: pointer;
}

.toggle-pill input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.toggle-pill span {
  display: block;
  padding: 9px 12px;
  border-radius: 999px;
  background: rgba(255,255,255,.76);
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: .84rem;
  font-weight: 800;
  transition: .16s ease;
}

.toggle-pill input:checked + span {
  background: #dcecf7;
  color: #426f8e;
  border-color: rgba(93,143,179,.34);
  box-shadow: 0 6px 14px rgba(82,121,148,.12);
}

.draw-board {
  padding: 18px;
  transition: .25s ease;
}

.draw-board.chaos-active {
  box-shadow: 0 18px 45px rgba(112, 89, 141, .18);
  background:
    linear-gradient(135deg, rgba(255,255,255,.80), rgba(239,232,248,.82));
}

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

.draw-mode-badge {
  flex: 0 0 auto;
  display: inline-flex;
  padding: 7px 10px;
  border-radius: 999px;
  background: #fff8e8;
  color: #806f55;
  border: 1px solid rgba(138,115,82,.12);
  font-size: .74rem;
  font-weight: 850;
}

.draw-fields {
  display: grid;
  gap: 10px;
}

.draw-field {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 12px;
  border-radius: 18px;
  background: rgba(255,250,240,.76);
  border: 1px solid rgba(85,113,137,.11);
  transition: .18s ease;
}

.draw-field.locked {
  background: #e7f1f7;
  border-color: rgba(96,143,174,.25);
}

.draw-field-main {
  min-width: 0;
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  align-items: start;
  gap: 9px;
}

.draw-field-icon {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 10px;
  background: rgba(220,236,247,.9);
  font-size: 1rem;
}

.draw-field-label {
  margin: 0 0 3px;
  color: var(--blue-deep);
  font-size: .72rem;
  font-weight: 900;
  letter-spacing: .08em;
}

.draw-field-value {
  margin: 0;
  line-height: 1.52;
  font-weight: 750;
  overflow-wrap: anywhere;
}

.draw-field-actions {
  display: flex;
  gap: 5px;
  flex: 0 0 auto;
}

.reroll-field-btn,
.lock-field-btn {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255,255,255,.82);
  cursor: pointer;
  font-size: 1rem;
}

.lock-field-btn.active {
  background: #cfe3ef;
  border-color: rgba(91,139,170,.30);
}

.draw-primary-actions,
.draw-secondary-actions {
  display: grid;
  gap: 9px;
  margin-top: 14px;
}

.draw-primary-actions {
  grid-template-columns: 1.25fr .75fr;
}

.draw-secondary-actions {
  grid-template-columns: 1fr 1fr;
  margin-top: 9px;
}

.draw-main-btn,
.chaos-btn,
.save-idea-btn {
  border: 0;
  border-radius: 999px;
  padding: 12px 14px;
  font-weight: 850;
  cursor: pointer;
}

.chaos-btn {
  background: linear-gradient(135deg, #eee5f5, #d8c9e6);
  color: #6a567f;
  box-shadow: 0 7px 16px rgba(105,83,127,.14);
}

.chaos-btn.active {
  background: linear-gradient(135deg, #846a9d, #655078);
  color: white;
}

.save-idea-btn {
  background: #f3e6e9;
  color: #8a5d66;
  border: 1px solid rgba(138,93,102,.10);
}

.idea-tip {
  margin: 14px 8px 0;
  color: var(--muted);
  font-size: .82rem;
  line-height: 1.55;
  text-align: center;
}

@media (max-width: 620px) {
  .view-switcher {
    top: calc(72px + env(safe-area-inset-top));
  }

  .idea-controls {
    grid-template-columns: 1fr;
  }

  .draw-field {
    align-items: flex-start;
  }

  .draw-primary-actions,
  .draw-secondary-actions {
    grid-template-columns: 1fr;
  }
}


.prompt-builder {
  margin-top: 18px;
  padding: 18px;
  display: grid;
  gap: 14px;
}

.prompt-builder-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 12px;
  flex-wrap: wrap;
}

.prompt-builder-head h2 {
  margin: 4px 0 0;
}

.prompt-style-control {
  display: grid;
  gap: 6px;
  font-weight: 750;
}

.prompt-style-control select {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255,255,255,.85);
  padding: 10px 12px;
  color: var(--ink);
}

.prompt-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.prompt-output {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255,255,255,.84);
  color: var(--ink);
  padding: 14px;
  line-height: 1.65;
  resize: vertical;
  min-height: 220px;
}

.prompt-output:focus {
  outline: none;
  border-color: #9abdd5;
  box-shadow: 0 0 0 4px rgba(146, 185, 211, .18);
}

@media (max-width: 520px) {
  .prompt-actions > * {
    flex: 1 1 calc(50% - 8px);
  }

  .prompt-actions > .primary-btn {
    flex-basis: 100%;
  }
}


.prompt-note-section {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px dashed rgba(126, 169, 199, .45);
  border-radius: 18px;
  background: rgba(220,236,247,.18);
}

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

.prompt-note-head h3 {
  margin: 4px 0 0;
  font-size: 1rem;
}

.small-btn {
  padding: 8px 12px;
  font-size: .84rem;
}

.prompt-note-tip {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.prompt-note-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.prompt-note-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: 100%;
  padding: 10px 12px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.86);
  cursor: pointer;
  transition: transform .16s ease, background .16s ease, border-color .16s ease, box-shadow .16s ease;
}

.prompt-note-chip.active {
  background: var(--blue);
  border-color: rgba(93, 143, 179, .44);
  box-shadow: 0 8px 18px rgba(106, 140, 163, .16);
}

.prompt-note-chip-main {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.prompt-note-chip-title {
  font-weight: 800;
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.prompt-note-chip-meta {
  color: var(--muted);
  font-size: .75rem;
}

.prompt-note-check {
  font-size: 1rem;
  flex-shrink: 0;
}

.prompt-note-empty {
  color: var(--muted);
  line-height: 1.6;
  background: rgba(255,255,255,.7);
  border: 1px dashed var(--line);
  border-radius: 14px;
  padding: 12px 14px;
}


/* v8: compact note wall + unlock all */
.draw-head-tools {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 7px;
  flex-wrap: wrap;
}

.unlock-all-btn {
  border: 1px solid rgba(93,143,179,.24);
  border-radius: 999px;
  padding: 7px 10px;
  background: #e6f1f7;
  color: #527f9c;
  font-size: .74rem;
  font-weight: 850;
  cursor: pointer;
}

.unlock-all-btn:disabled {
  opacity: .42;
  cursor: default;
}

@media (max-width: 520px) {
  .app-shell {
    padding: 12px;
  }

  .toolbar {
    padding: 10px;
    margin-bottom: 14px;
    gap: 10px;
  }

  .search-box {
    padding: 9px 11px;
  }

  .notes-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .note-card {
    min-height: 190px;
    padding: 21px 10px 10px;
    border-radius: 10px 10px 15px 10px;
    box-shadow: 0 10px 20px rgba(69, 88, 104, .12);
  }

  .note-card::after {
    width: 24px;
    height: 24px;
  }

  .note-tape {
    top: 5px;
    width: 56px;
    height: 15px;
  }

  .note-head {
    gap: 5px;
  }

  .note-title {
    margin: 5px 0 7px;
    font-size: .9rem;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .category-badge {
    padding: 3px 6px;
    font-size: .61rem;
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .pin-btn {
    font-size: 1.02rem;
    padding: 1px;
  }

  .note-preview {
    margin: 0 0 9px;
    font-size: .72rem;
    line-height: 1.42;
    -webkit-line-clamp: 4;
  }

  .note-actions {
    gap: 5px;
  }

  .copy-btn,
  .edit-btn {
    min-width: 0;
    padding: 7px 6px;
    font-size: .69rem;
    white-space: nowrap;
  }

  .edit-btn {
    padding-inline: 7px;
  }

  .draw-board-head {
    align-items: flex-start;
  }

  .draw-head-tools {
    max-width: 145px;
  }
}


.negative-settings {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px dashed rgba(126, 169, 199, .45);
  border-radius: 18px;
  background: rgba(255,255,255,.68);
}

.negative-settings-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 12px;
  flex-wrap: wrap;
}

.negative-settings-head h3 {
  margin: 4px 0 0;
  font-size: 1rem;
}

.compact-pill {
  transform: scale(.96);
  transform-origin: right bottom;
}

.negative-settings-controls {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}


.pack-section-wrap {
  display: grid;
  gap: 12px;
  margin-bottom: 14px;
}

.pack-section {
  padding: 12px;
  border-radius: 18px;
  border: 1px dashed rgba(126, 169, 199, .4);
  background: rgba(255,255,255,.52);
}

.pack-section-head h3 {
  margin: 4px 0 10px;
  font-size: 1rem;
}

.pack-chip-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pack-chip {
  border: 1px solid var(--line);
  background: rgba(255,255,255,.88);
  color: var(--ink);
  border-radius: 999px;
  padding: 9px 12px;
  cursor: pointer;
  font-size: .84rem;
  font-weight: 750;
  transition: .16s ease;
}

.pack-chip.active {
  background: var(--blue);
  border-color: rgba(93, 143, 179, .44);
  box-shadow: 0 8px 18px rgba(106, 140, 163, .16);
}

.draw-field.skipped {
  background: rgba(245, 245, 245, .9);
  border-style: dashed;
}

.draw-field.skipped .draw-field-value {
  color: var(--muted);
}

.clear-field-btn {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255,255,255,.82);
  cursor: pointer;
  font-size: 1rem;
}

/* v11: mode-aware outfits, inspiration packs and multi-panel layouts */
.idea-controls {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.pack-section {
  padding: 0;
  overflow: hidden;
}

.pack-section summary {
  list-style: none;
  cursor: pointer;
  padding: 12px 14px;
  color: var(--blue-deep);
  font-size: .9rem;
  font-weight: 900;
  user-select: none;
}

.pack-section summary::-webkit-details-marker {
  display: none;
}

.pack-section summary::after {
  content: "＋";
  float: right;
  color: var(--muted);
}

.pack-section[open] summary::after {
  content: "−";
}

.pack-section .pack-chip-group {
  padding: 0 12px 12px;
}

.draw-field-value {
  white-space: pre-line;
}

.draw-field[data-field="action"] .draw-field-main {
  align-items: start;
}

.draw-field[data-field="action"] .draw-field-value {
  line-height: 1.62;
}

.reroll-field-btn,
.lock-field-btn,
.clear-field-btn {
  flex-shrink: 0;
}

@media (max-width: 620px) {
  .idea-controls {
    grid-template-columns: 1fr;
  }

  .pack-section-wrap {
    gap: 9px;
  }

  .pack-chip {
    padding: 8px 10px;
    font-size: .78rem;
  }

  .draw-field-actions {
    gap: 4px;
  }

  .reroll-field-btn,
  .lock-field-btn,
  .clear-field-btn {
    width: 33px;
    height: 33px;
    border-radius: 11px;
  }
}
