:root {
  color-scheme: light;
  --bg: #f3ece0;
  --surface: #fbf5ed;
  --surface-strong: #efe3d7;
  --text: #2c3540;
  --muted: #6f7d88;
  --accent: #7b97b2;
  --accent-soft: #e4edf6;
  --border: rgba(116, 120, 104, 0.2);
  --shadow: 0 18px 45px rgba(50, 58, 65, 0.08);
}

[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0c1420;
  --surface: #121b2f;
  --surface-strong: #19263c;
  --text: #e8f2ff;
  --muted: #94b4d6;
  --accent: #5f96ff;
  --accent-soft: rgba(95, 150, 255, 0.18);
  --border: rgba(140, 168, 210, 0.18);
  --shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
}

* {
  box-sizing: border-box;
}

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  margin-bottom: 30px;
  min-height: 100vh;
  background: radial-gradient(circle at top left, rgba(119, 137, 148, 0.12), transparent 26%),
    radial-gradient(circle at bottom right, rgba(156, 138, 116, 0.08), transparent 20%),
    var(--bg);
  color: var(--text);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background: radial-gradient(circle at 26% 18%, rgba(120, 136, 152, 0.05), transparent 12%),
    radial-gradient(circle at 78% 88%, rgba(166, 142, 116, 0.06), transparent 14%);
  pointer-events: none;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

.page-shell {
  position: relative;
  z-index: 1;
  max-width: 1140px;
  margin: 0 auto;
  margin-top: 2em !important;
  padding: 2.5rem 1.75rem 3rem;
  background: var(--surface);
  border: 1px solid rgba(136, 124, 104, 0.16);
  border-radius: 3rem;
  box-shadow: 0 35px 90px rgba(55, 64, 80, 0.08);
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
  padding: 1.2rem 1.4rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 1.8rem;
  box-shadow: 0 18px 40px rgba(55, 64, 80, 0.06);
}

.topbar nav {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.topbar nav a {
  color: var(--muted);
  text-decoration: none;
  padding: 0.6rem 0.8rem;
  border-radius: 0.9rem;
}

.topbar nav a:hover,
.topbar nav a:focus {
  background: var(--surface-strong);
  color: var(--text);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  text-decoration: none;
  color: var(--text);
}

.brand-mark {
  width: 2rem;
  height: 2rem;
  border-radius: 0.75rem;
  background: linear-gradient(135deg, rgba(123, 151, 178, 1), rgba(190, 170, 138, 1));
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 0.95rem;
  box-shadow: 0 15px 30px rgba(55, 64, 80, 0.18);
}

.theme-toggle {
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  padding: 0.9rem 1.1rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  cursor: pointer;
  font-size: 0.95rem;
  transition: transform 0.18s ease, background 0.2s ease, border-color 0.2s ease;
}

.theme-toggle:hover {
  transform: translateY(-1px);
}

.tool-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
    margin-bottom: 1.25rem;
    flex-wrap: wrap;
    padding: 1rem 1.1rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 2rem;
    box-shadow: 0 16px 32px rgba(55, 64, 80, 0.06);
  }

  .tool-toolbar-summary {
    display: grid;
    gap: 0.2rem;
    min-width: 0;
  }

  .tool-toolbar-copy {
    display: none;
  gap: 0.65rem;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  padding: 0.9rem 1rem;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 700;
}

.hamburger-icon {
  display: inline-flex;
  font-size: 1rem;
}

.tool-menu-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  padding: 0.75rem 1.1rem;
  min-height: 3.1rem;
  border-radius: 999px;
  cursor: pointer;
  font: inherit;
  font-weight: 700;
  text-transform: none;
  transition: transform 0.16s ease, background 0.2s ease, border-color 0.2s ease;
}

.tool-menu-toggle:hover {
  transform: translateY(-1px);
  background: var(--surface-strong);
}

.tool-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  align-items: center;
}

.tool-tab {
  border: 1px solid var(--border);
  background: var(--surface);
  padding: 0.75rem 1.1rem;
  border-radius: 999px;
  cursor: pointer;
  color: var(--text);
  transition: transform 0.16s ease, background 0.2s ease, border-color 0.2s ease;
}

.tool-tab.active {
  background: var(--accent-soft);
  border-color: var(--accent);
}

.tool-tab:hover {
  transform: translateY(-1px);
}

.app-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.75rem;
  align-items: start;
  position: relative;
}

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

.tool-pane {
  position: absolute;
  right: 1.75rem;
  top: 2.5rem;
  width: min(360px, 34vw);
  max-width: 380px;
  background: var(--surface);
  border: 1px solid var(--border);
  /* match surrounding card radii for a seamless overlay */
  border-radius: 2.4rem;
  padding: 1.5rem;
  box-shadow: 0 22px 48px rgba(55, 64, 80, 0.08);
  /* reduce height a bit to account for the top offset so it doesn't overflow the page-shell */
  height: calc(100vh - 8rem);
  overflow-y: auto;
  overflow-x: hidden;
  z-index: 20;
  transition: transform 0.3s ease, opacity 0.25s ease, max-height 0.3s ease;
}

/* When the tools panel is opened as part of the document flow (pushes content down) */
.tool-pane.inline-open {
  position: static;
  right: auto;
  top: auto;
  width: 100%;
  max-width: none;
  /* a slightly smaller radius so it reads as connected to the toolbar */
  border-radius: 1.8rem;
  box-shadow: 0 12px 30px rgba(55, 64, 80, 0.06);
  margin: 0.75rem 0 1rem;
  padding: 1rem 1.1rem;
  height: auto;
  overflow: visible;
}

.notebook-area {
  grid-column: 1;
}

.tool-pane.hidden {
  display: none;
}

.tool-pane:not(.hidden) {
  display: block;
}

.sidebar-header {
  display: grid;
  gap: 0.55rem;
  margin-bottom: 1.1rem;
  grid-template-columns: 1fr auto;
  align-items: center;
}

.sidebar-actions {
  display: inline-flex;
  gap: 0.75rem;
  align-items: center;
}

.close-tool-pane {
  background: rgba(167, 150, 120, 0.1);
  border: 1px solid rgba(167, 150, 120, 0.24);
  color: var(--text);
  border-radius: 999px;
  width: 2.75rem;
  min-width: 2.75rem;
  height: 2.75rem;
  display: grid;
  place-items: center;
  padding: 0;
  cursor: pointer;
  font-weight: 700;
  font-size: 1rem;
  line-height: 1;
}

.close-tool-pane:hover {
  background: rgba(167, 150, 120, 0.18);
}


tool-intro {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

.tool-section {
  border-top: 1px solid var(--border);
  padding-top: 0;
  margin-top: 0.75rem;
}

.tool-section h2 {
  margin: 0;
  padding: 0.25rem 0;
}

/* When only one tool is shown, hide inactive sections entirely */
.tool-pane.single-tool-mode .tool-section:not(.expanded) {
  display: none;
}

.tool-pane.single-tool-mode .tool-section.expanded {
  border-top: none;
  margin-top: 0;
  padding-top: 0;
}

.tool-section:first-of-type {
  border-top: none;
  padding-top: 0;
  margin-top: 0;
}

.tool-section-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: transparent;
  border: none;
  color: var(--text);
  font-weight: 700;
  padding: 0.8rem 0;
  cursor: pointer;
}

.tool-section-toggle:hover {
  color: var(--accent);
}

.tool-toggle-icon {
  font-size: 0.9rem;
  transition: transform 0.2s ease;
}

.tool-section:not(.expanded) .tool-toggle-icon {
  transform: rotate(-90deg);
}

.tool-section-body {
  display: none;
  margin-top: 1rem;
}

.tool-section.expanded .tool-section-body {
  display: block;
}

.tool-note,
.tool-input-label {
  display: block;
  color: var(--muted);
  margin-bottom: 0.9rem;
}

.tool-input-label input,
.tool-input-label select,
select {
  width: 100%;
  margin-top: 0.45rem;
  padding: 0.95rem 1rem;
  border-radius: 1.3rem;
  border: 1px solid var(--border);
  background: var(--surface-strong);
  color: var(--text);
  font: inherit;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, currentColor 0%),
    linear-gradient(135deg, currentColor 50%, transparent 0%);
  background-position: calc(100% - 1rem) center, calc(100% - 0.65rem) center;
  background-size: 0.45em 0.45em;
  background-repeat: no-repeat;
}

.tool-input-label select::-ms-expand,
select::-ms-expand {
  display: none;
}

select:focus,
.tool-input-label input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(123, 151, 178, 0.12);
}

.tool-results {
  min-height: 4rem;
  margin-top: 1rem;
}

.progression-output {
  margin-top: 1rem;
  padding: 1rem 1.1rem;
  border-radius: 1.5rem;
  background: var(--surface-strong);
  border: 1px solid var(--border);
  color: var(--text);
  min-height: 3.6rem;
  display: grid;
  place-items: center;
  text-align: center;
}

.setup-dice-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
  margin-top: 0.75rem;
}

.setup-die {
  width: 100%;
}

#useProgressionButton,
#useSetupButton {
  margin-top: 1rem;
}

.tool-result-list {
  display: grid;
  gap: 0.55rem;
  padding-left: 1rem;
  color: var(--text);
}

.tool-result-list-inline {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding-left: 0;
  list-style: none;
  margin: 0;
}

.rhyme-results-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.rhyme-result-column h3 {
  margin: 0 0 0.75rem;
  font-size: 0.95rem;
  color: var(--text);
}

@media (max-width: 720px) {
  .rhyme-results-grid {
    grid-template-columns: 1fr;
  }
}

.tool-result-item {
  width: fit-content;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  padding: 0.45rem 0.75rem;
  border-radius: 999px;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.2s ease;
  font-size: 0.92rem;
  line-height: 1.2;
}

.tool-result-item:hover {
  transform: translateY(-1px);
  background: var(--accent-soft);
}

.tool-list {
  padding-left: 1rem;
  margin: 0;
  color: var(--text);
}

.notebook-area {
  --idea-board-width: 320px;
  display: grid;
  grid-template-columns: var(--idea-board-width) 0.8rem minmax(0, 1fr);
  gap: 0;
  align-items: stretch;
}

.notebook-area:has(.idea-board.collapsed) {
  grid-template-columns: 3.75rem 0.8rem minmax(0, 1fr);
}

.idea-board {
  grid-column: 1;
  width: 100%;
  min-width: 0;
  min-height: 34rem;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 2.4rem 0 0 2.4rem;
  padding: 1.35rem;
  box-shadow: 0 24px 50px rgba(55, 64, 80, 0.05);
  transition: width 0.25s ease, min-width 0.25s ease, opacity 0.25s ease;
  overflow: hidden;
}

.idea-board-textarea {
  width: 100%;
  min-height: 0;
  height: 100%;
  max-height: 100%;
  resize: none;
  overflow-y: auto;
  padding: 1rem;
  border-radius: 1.35rem;
  border: 1px solid var(--border);
  background: var(--surface-strong);
  color: var(--text);
  font-size: 1rem;
  line-height: 1.7;
}

.idea-chips {
  display: none;
}

.panel-resize-handle {
  grid-column: 2;
  position: relative;
  cursor: col-resize;
  user-select: none;
  background: linear-gradient(180deg, rgba(167, 150, 120, 0.08), rgba(167, 150, 120, 0.18));
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.panel-resize-handle::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 0.18rem;
  height: 3.5rem;
  border-radius: 999px;
  background: rgba(137, 123, 103, 0.35);
}

.notes-panel {
  grid-column: 3;
  display: grid;
  gap: 1rem;
  min-width: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 0 2.4rem 2.4rem 0;
  padding: 1.5rem;
  box-shadow: 0 24px 50px rgba(55, 64, 80, 0.05);
  transition: transform 0.2s ease;
}

.idea-board.collapsed {
  width: 3.75rem;
  min-width: 3.75rem;
  padding: 0.25rem;
  overflow: hidden;
}

.idea-board.collapsed + .panel-resize-handle {
  display: none;
}

.idea-board.collapsed ~ .notes-panel {
  grid-column: 2 / span 2;
}

.idea-board.collapsed .idea-board-textarea,
.idea-board.collapsed .idea-chips,
.idea-board.collapsed .tool-intro,
.idea-board.collapsed .eyebrow {
  display: none;
}

.idea-board-header {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.75rem;
  align-items: start;
}

.idea-board-toggle {
  background: rgba(167, 150, 120, 0.1);
  border: 1px solid rgba(167, 150, 120, 0.24);
  color: var(--text);
  border-radius: 999px;
  width: 2.75rem;
  min-width: 2.75rem;
  height: 2.75rem;
  display: grid;
  place-items: center;
  padding: 0;
  cursor: pointer;
  font-weight: 700;
  font-size: 1rem;
  line-height: 1;
}

.idea-board-toggle:hover {
  background: rgba(167, 150, 120, 0.18);
}

.idea-board.collapsed .idea-board-header {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0;
}

.idea-board.collapsed .idea-board-header > div {
  display: none;
}

.idea-board.collapsed .eyebrow {
  opacity: 0;
}

.hero-copy {
  max-width: 100%;
}

.home-split {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-auto-rows: 1fr;
  gap: 1.5rem;
  align-items: stretch;
}

.home-section {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
  padding: 2rem;
  border-radius: 2rem;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  text-decoration: none;
  color: inherit;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.home-section:hover,
.home-section:focus-visible {
  transform: translateY(-2px);
  border-color: rgba(140, 122, 99, 0.35);
  box-shadow: 0 24px 70px rgba(16, 24, 40, 0.12);
}

.home-section h2 {
  margin: 0;
  font-size: clamp(2rem, 3vw, 2.5rem);
  line-height: 1.05;
}

.home-section p {
  margin: 1.25rem 0 0;
  color: var(--muted);
  line-height: 1.75;
  max-width: 40rem;
}

.home-section .button {
  margin-top: 1.75rem;
  width: fit-content;
}

.home-portfolio {
  background: linear-gradient(135deg, rgba(169, 154, 131, 0.06), var(--surface));
}

.home-generator {
  background: linear-gradient(135deg, rgba(109, 164, 255, 0.15), rgba(248, 252, 255, 0.95));
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 1.3rem;
  font-size: 0.9rem;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.18em;
}

.eyebrow::before {
  content: "";
  width: 0.75rem;
  height: 0.75rem;
  border-radius: 50%;
  background: var(--accent);
}

h1 {
  font-size: clamp(2.75rem, 4vw, 4rem);
  line-height: 1.02;
  margin: 0;
}

p.lead {
  max-width: 720px;
  margin: 1.4rem 0 0;
  font-size: 1.08rem;
  line-height: 1.85;
  color: var(--muted);
}

.hero-actions {
  margin-top: 2.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.button,
.button-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3.1rem;
  padding: 0 1.4rem;
  border-radius: 999px;
  font-weight: 600;
  text-decoration: none;
  transition: transform 0.18s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.button {
  color: #fff;
  background: linear-gradient(135deg, var(--accent), rgba(164, 141, 111, 1));
  box-shadow: 0 16px 28px rgba(90, 86, 75, 0.18);
  border: none;
}

.button-secondary {
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
}

.button:hover,
.button-secondary:hover {
  transform: translateY(-1px);
}

/* Responsive embed wrapper for SoundCloud players */
.embed-responsive {
  width: 100%;
  border-radius: 1rem;
  overflow: hidden;
  background: #000;
}

.embed-responsive iframe {
  width: 100%;
  height: 380px;
  border: 0;
  display: block;
}

@media (max-width: 640px) {
  .embed-responsive iframe {
    height: 300px;
  }
}

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr));
  gap: 1rem;
  margin-top: 2.6rem;
}

.stat-card {
  padding: 1.4rem 1.35rem;
  border-radius: 1.25rem;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.stat-card strong {
  display: block;
  font-size: 1.45rem;
  margin-bottom: 0.35rem;
}

.stat-card span {
  color: var(--muted);
  font-size: 0.95rem;
}

.features {
  display: grid;
  gap: 1.5rem;
  margin-top: 3.5rem;
}


.footer {
  margin-top: 4rem;
  padding-top: 3rem;
  border-top: 1px solid var(--border);
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
}

.footer nav {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.footer a {
  color: var(--muted);
  text-decoration: none;
}

@media (min-width: 900px) {
  .hero {
    grid-template-columns: 1.05fr 0.95fr;
    align-items: center;
  }

  .hero-copy {
    padding-right: 1.5rem;
  }
}

@media (max-width: 840px) {
  .app-layout,
  .app-layout.active {
    grid-template-columns: 1fr;
  }

  .tool-toolbar {
    position: relative;
  }

  .tool-pane {
    position: fixed;
    right: 1rem;
    top: 5.5rem;
    width: min(92vw, 360px);
    max-height: calc(100vh - 7.5rem);
    overflow-y: auto;
    z-index: 30;
    box-shadow: 0 32px 70px rgba(55, 64, 80, 0.14);
  }

  .tool-menu-toggle {
    display: inline-flex;
  }

  .tool-tabs {
    display: none;
  }

  .tool-tabs.open {
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 0.75rem);
    display: flex;
    flex-direction: column;
    width: 100%;
    gap: 0.75rem;
    padding: 1rem;
    border-radius: 1.75rem;
    background: var(--surface);
    border: 1px solid var(--border);
    box-shadow: 0 28px 50px rgba(55, 64, 80, 0.12);
    margin-top: 0;
    z-index: 40;
  }

  .tool-tabs.open .tool-tab {
    width: 100%;
  }

  .tool-pane.hidden {
    display: none;
  }
}

/* Mobile bottom sheet for tools */
@media (max-width: 840px) {
  .tool-pane.mobile-sheet {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    top: auto;
    width: 100vw;
    left: 0;
    right: 0;
    max-height: 72vh;
    border-radius: 1rem 1rem 0 0;
    padding: 1rem 1rem 1.25rem;
    box-shadow: 0 -24px 48px rgba(55, 64, 80, 0.16);
    z-index: 60;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .tool-pane.mobile-sheet .sidebar-header {
    gap: 0.35rem;
  }

  .tool-pane.mobile-sheet .close-tool-pane {
    position: absolute;
    top: 0.6rem;
    right: 0.6rem;
    width: 2.25rem;
    height: 2.25rem;
  }

  /* Make tool-tabs open behave as a stacked list full width */
  .tool-tabs.open {
    position: static;
    box-shadow: none;
    border-radius: 0.75rem;
    padding: 0.5rem;
  }
}

/* when tabs are inside the mobile sheet, show them as a horizontal row */
.tool-pane.mobile-sheet .tool-tabs {
  display: flex !important;
  gap: 0.5rem;
  overflow-x: auto;
  padding-bottom: 0.5rem;
  margin-bottom: 0.5rem;
  -webkit-overflow-scrolling: touch;
}

.tool-pane.mobile-sheet .tool-tabs .tool-tab {
  flex: 0 0 auto;
}


@media (max-width: 1040px) {
  .notebook-area {
    grid-template-columns: 1fr;
  }

  .idea-board {
    width: 100%;
    min-width: 0;
  }
}

@media (max-width: 720px) {
  .topbar,
  .footer {
    flex-direction: column;
    align-items: flex-start;
  }

  .tool-toolbar {
    padding: 1rem;
  }

  .tool-toolbar-summary {
    width: 100%;
  }

  .tool-menu-toggle {
    width: 100%;
    justify-content: center;
  }

  .tool-pane {
    width: 100%;
    margin-top: 1rem;
  }

  /* Stack notebook content and push Ideas panel to the bottom on small screens */
  .notebook-area {
    display: flex;
    flex-direction: column;
    gap: 1rem;
  }

  .notes-panel {
    order: 1;
  }

  .idea-board {
    order: 2;
    width: 100%;
    margin-top: 0.5rem;
  }

  .note-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .note-title input {
    width: 100%;
  }
}

.generator-panel {
  display: grid;
  gap: 1.5rem;
  background: var(--surface);
  padding: 1.75rem;
  border-radius: 1.75rem;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.generator-header {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.generator-intro {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.prompt-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.prompt-card {
  display: grid;
  gap: 0.9rem;
  padding: 1.4rem;
  border-radius: 1.8rem;
  background: var(--surface-strong);
  border: 1px solid var(--border);
}

.prompt-card.locked {
  border-color: var(--accent);
  box-shadow: inset 0 0 0 1px rgba(34, 104, 255, 0.12);
}

.prompt-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  align-items: center;
}

.prompt-name {
  font-size: 0.8rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
}

.prompt-value {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
  min-height: 2rem;
}

.lock-toggle,
.prompt-card-add {
  align-self: start;
  justify-self: start;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  padding: 0.75rem 1rem;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.prompt-card-add {
  background: var(--surface-strong);
}

.lock-toggle.locked {
  background: var(--accent-soft);
  border-color: var(--accent);
}

.prompt-output-card {
  display: grid;
  gap: 1rem;
  padding: 1.5rem;
  border-radius: 2rem;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  margin-top: 10px;
}

.prompt-summary {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--accent);
}

#promptOutput {
  margin: 0;
  font-size: 1.15rem;
  line-height: 1.8;
  color: var(--text);
  min-height: 3rem;
}

.regenerate-button {
  width: fit-content;
}

@media (max-width: 860px) {
  .prompt-grid {
    grid-template-columns: 1fr;
  }
}

.notepad-panel {
  display: grid;
  gap: 1.5rem;
  background: var(--surface);
  padding: 1.75rem;
  border-radius: 2.2rem;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.note-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  justify-content: space-between;
  padding: 1.2rem 1.3rem;
  border-radius: 1.8rem;
  background: var(--surface);
  border: 1px solid var(--border);
}

.note-title {
  display: inline-flex;
  flex-direction: column;
  gap: 0.5rem;
  font-size: 0.9rem;
  color: var(--text);
}

.note-title input {
  width: 18rem;
  min-width: 0;
  padding: 0.9rem 1rem;
  border-radius: 0.95rem;
  border: 1px solid var(--border);
  background: var(--surface-strong);
  color: var(--text);
}

.toolbar-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.section-added-confirmation {
  margin: -0.25rem 0 0.75rem;
  padding: 0.55rem 0.8rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(123, 151, 178, 0.1);
  color: var(--text);
  font-size: 0.8rem;
  letter-spacing: 0.02em;
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.section-added-confirmation.hidden {
  opacity: 0;
  transform: translateY(-4px);
  pointer-events: none;
}

.notes-container {
  display: grid;
  gap: 1rem;
  min-width: 0;
}

.section-card {
  background: var(--surface-strong);
  border: 1px solid var(--border);
  border-radius: 1.35rem;
  padding: 1.25rem;
  box-shadow: var(--shadow);
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.section-type {
  border-radius: 999px;
  border: 1px solid var(--border);
  padding: 0.8rem 1rem;
  background: var(--surface);
  color: var(--text);
}

.section-remove {
  border: 1px solid var(--border);
  background: var(--surface);
  padding: 0.8rem 1rem;
  border-radius: 999px;
  cursor: pointer;
}

.section-text {
  width: 100%;
  min-height: 160px;
  padding: 1rem;
  border-radius: 1.25rem;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font-size: 1rem;
  line-height: 1.7;
  resize: vertical;
}

.prompt-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.confirm-overlay {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  background: rgba(15, 20, 36, 0.55);
  z-index: 60;
}

.confirm-overlay.hidden {
  display: none;
}

.confirm-dialog {
  width: min(100%, 420px);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 1.75rem;
  box-shadow: 0 32px 80px rgba(16, 24, 40, 0.18);
  padding: 1.5rem;
}

.confirm-dialog h2 {
  margin: 0 0 0.75rem;
  font-size: 1.1rem;
}

.confirm-dialog p {
  margin: 0 0 1.25rem;
  color: var(--muted);
  line-height: 1.6;
}

.confirm-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.75rem;
}

.confirm-actions .button,
.confirm-actions .button-secondary {
  min-width: 120px;
}

.button-link {
  text-decoration: none;
}


.hero {
  background: var(--surface-strong);
  box-shadow: 0 40px 90px rgba(16, 38, 60, 0.08);
  border-radius: 2rem;
  padding: 2rem;
  backdrop-filter: blur(6px);
}

.hero-copy {
  background: var(--surface);
  padding: 2rem;
  border-radius: 3.2rem;
  box-shadow: 0 24px 60px rgba(55, 64, 80, 0.08);
  border: 1px solid var(--border);
}

.hero-copy h1 {
  margin-top: 0;
}



.tools-placeholder {
  padding: 1.75rem;
  background: var(--surface-strong);
  border: 1px dashed var(--border);
  color: var(--muted);
  border-radius: 1.5rem;
}



.notes-container {
  position: relative;
}

.notes-container::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: linear-gradient(rgba(34, 104, 255, 0.03) 1px, transparent 1px);
  background-size: 100% 2.1rem;
  pointer-events: none;
  z-index: 0;
}

.section-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 1.9rem;
  padding: 1.25rem;
  box-shadow: 0 18px 36px rgba(55, 64, 80, 0.06);
  z-index: 1;
}

.section-card::before {
  content: "";
  position: absolute;
  top: -12px;
  left: 1.5rem;
  width: 5rem;
  height: 0.8rem;
  background: var(--surface-strong);
  border-radius: 0 0 1rem 1rem;
}

.section-card::after {
  content: "";
  position: absolute;
  bottom: -10px;
  right: 1.5rem;
  width: 3rem;
  height: 0.8rem;
  background: var(--surface-strong);
  border-radius: 1rem 1rem 0 0;
}

.section-text {
  width: 100%;
  min-height: 180px;
  padding: 1rem;
  border-radius: 1.25rem;
  border: 1px dotted var(--border);
  background: var(--surface-strong);
  color: var(--text);
  font-size: 1rem;
  line-height: 1.8;
  resize: vertical;
}

.note-title input {
  width: 100%;
}

@media (max-width: 720px) {
  .note-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .note-title input {
    width: 100%;
  }
}
