/* SwimStory — dark purple theme (matches production) */

:root {
  --color-primary: #613DC7;
  --color-primary-dark: #4a2da0;
  --color-primary-deep: #2d1b69;
  --color-accent: #8b6fd4;
  --color-bg: #131315;
  --color-surface: #1e1e24;
  --color-surface-light: #282832;
  --color-text: #ffffff;
  --color-text-light: #9ca3af;
  --color-text-muted: #6b7280;
  --color-border: #2e2e38;
  --color-danger: #e63946;
  --radius: 12px;
  --radius-lg: 16px;
  --sidebar-width: 220px;
}

/* ── Light mode overrides ──────────────────── */
body.light-mode {
  --color-bg: #f5f5f7;
  --color-surface: #ffffff;
  --color-surface-light: #eeeef2;
  --color-text: #1a1a2e;
  --color-text-light: #555568;
  --color-text-muted: #8888a0;
  --color-border: #d8d8e0;
}

body.light-mode .chat-input-bar input {
  background: var(--color-surface-light);
}

body.light-mode .story-card__delete {
  background: rgba(0, 0, 0, 0.35);
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.6;
  min-height: 100vh;
}

a {
  color: var(--color-accent);
}

/* ── Sidebar ───────────────────────────────── */
.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: var(--sidebar-width);
  height: 100vh;
  background: var(--color-primary);
  display: flex;
  flex-direction: column;
  padding: 1.25rem 0;
  z-index: 100;
}

.sidebar__brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0 1.25rem;
  margin-bottom: 1.5rem;
  font-size: 1.25rem;
  font-weight: 700;
  color: #fff;
  text-decoration: none;
}

.sidebar__brand-icon {
  width: 32px;
  height: 32px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
}

.sidebar__nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
}

.sidebar__link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 1.25rem;
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: background 0.15s, color 0.15s;
  border-left: 3px solid transparent;
}

.sidebar__link:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.sidebar__link--active {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  border-left-color: #fff;
}

.sidebar__link-icon {
  font-size: 1.1rem;
  width: 1.5rem;
  text-align: center;
}

.sidebar__divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.15);
  margin: 0.75rem 1.25rem;
}

.sidebar__theme-toggle {
  background: none;
  border: none;
  cursor: pointer;
  width: 100%;
  font-family: inherit;
}

.sidebar__footer {
  padding: 0.75rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  margin-top: auto;
}

.sidebar__avatar {
  width: 32px;
  height: 32px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  color: #fff;
  font-weight: 600;
}

.sidebar__username {
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.85rem;
  font-weight: 500;
}

.sidebar__logout {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.6);
  cursor: pointer;
  font-size: 0.8rem;
  margin-left: auto;
  padding: 0.3rem 0.5rem;
  border-radius: 6px;
  transition: background 0.15s;
}

.sidebar__logout:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

/* ── Hamburger toggle (hidden on desktop) ──── */
.sidebar__hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  margin-left: auto;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  z-index: 110;
}

.sidebar__hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: #fff;
  border-radius: 2px;
  transition: transform 0.25s, opacity 0.2s;
}

/* Animate into X when open */
.sidebar__hamburger[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}
.sidebar__hamburger[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}
.sidebar__hamburger[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

/* ── Main content area ─────────────────────── */
.main-content {
  margin-left: var(--sidebar-width);
  min-height: 100vh;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 2rem 2.5rem;
}

/* ── Top bar (search/filter, used on feed) ─── */
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
}

.topbar__title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-text);
}

.topbar__actions {
  display: flex;
  gap: 0.75rem;
  align-items: center;
}

/* ── Cards ──────────────────────────────────── */
.card {
  background: var(--color-surface);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 1.25rem;
  border: 1px solid var(--color-border);
}

.card__title {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
  color: var(--color-text);
}

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

.card__title a:hover {
  color: var(--color-accent);
}

.card__meta {
  font-size: 0.85rem;
  color: var(--color-text-light);
  margin-bottom: 0.75rem;
}

.card__body {
  line-height: 1.7;
  color: var(--color-text-light);
}

/* ── Story grid (feed page) ────────────────── */
.story-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1.5rem;
}

.story-card {
  background: var(--color-surface);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.15s, box-shadow 0.15s;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--color-border);
  min-width: 0;
}

.story-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.story-card__image {
  aspect-ratio: 1;
  background: var(--color-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  color: rgba(255, 255, 255, 0.3);
  overflow: hidden;
  flex: 1;
}

.story-card__info {
  padding: 0.85rem 1rem;
}

.story-card__title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 0.2rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.story-card__author {
  font-size: 0.8rem;
  color: var(--color-text-light);
}

/* Draft card wrapper — keeps delete btn positioned */
.story-card--draft {
  position: relative;
  overflow: visible;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.story-card__link {
  display: flex;
  flex-direction: column;
  flex: 1;
  text-decoration: none;
  color: inherit;
  border-radius: var(--radius);
  overflow: hidden;
}

.story-card__delete {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  z-index: 10;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  border: none;
  border-radius: 50%;
  width: 2.2rem;
  height: 2.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  cursor: pointer;
  color: #fff;
  opacity: 0;
  transition: opacity 0.15s, background 0.15s;
  padding: 0;
  line-height: 1;
}

.story-card--draft:hover .story-card__delete {
  opacity: 1;
}

.story-card__delete:hover {
  background: var(--color-danger);
  color: #fff;
}

/* ── Modal ──────────────────────────────────── */
.modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal[hidden] { display: none; }

.modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
}

.modal__dialog {
  position: relative;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  max-width: 400px;
  width: 90%;
}

.modal__title {
  font-size: 1.15rem;
  margin-bottom: 0.5rem;
}

.modal__body {
  color: var(--color-text-light);
  font-size: 0.95rem;
  line-height: 1.5;
  margin-bottom: 1.25rem;
}

.modal__actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
}

/* ── Buttons ────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.6rem 1.4rem;
  font-size: 0.9rem;
  font-weight: 600;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s, transform 0.1s;
  gap: 0.4rem;
}

.btn:active {
  transform: scale(0.97);
}

.btn--primary {
  background: var(--color-primary);
  color: #fff;
}

.btn--primary:hover {
  background: var(--color-primary-dark);
}

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

.btn--secondary:hover {
  background: var(--color-border);
}

.btn--danger {
  background: var(--color-danger);
  color: #fff;
}

.btn--ghost {
  background: rgba(255, 255, 255, 0.1);
  color: var(--color-text);
  border: 1px solid var(--color-border);
}

.btn--ghost:hover {
  background: rgba(255, 255, 255, 0.15);
}

/* ── Forms ──────────────────────────────────── */
.form-group {
  margin-bottom: 1rem;
}

.form-group label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.3rem;
  color: var(--color-text-light);
  font-size: 0.9rem;
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 0.7rem 1rem;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius);
  font-size: 0.95rem;
  font-family: inherit;
  background: rgba(255, 255, 255, 0.08);
  color: var(--color-text);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--color-text-muted);
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(97, 61, 199, 0.25);
}

/* ── Emotions / Tags ────────────────────────── */
.tag {
  display: inline-block;
  padding: 0.2rem 0.65rem;
  background: rgba(97, 61, 199, 0.2);
  color: var(--color-accent);
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 500;
  margin-right: 0.35rem;
  margin-bottom: 0.35rem;
}

/* ── Section headings ───────────────────────── */
.section-title {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--color-text);
}

/* ── Helpers ────────────────────────────────── */
.text-center { text-align: center; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-2 { margin-bottom: 1rem; }

/* ── Chat ───────────────────────────────────── */
.chat-container {
  display: flex;
  flex-direction: column;
  height: 100vh;
  margin-left: var(--sidebar-width);
}

.chat-header {
  padding: 1rem 1.5rem;
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.chat-header strong {
  color: var(--color-text);
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  background: var(--color-bg);
}

.chat-bubble {
  max-width: 75%;
  padding: 0.85rem 1.1rem;
  border-radius: var(--radius);
  line-height: 1.55;
  white-space: pre-wrap;
}

.chat-bubble--user {
  align-self: flex-end;
  background: var(--color-primary);
  color: #fff;
  border-bottom-right-radius: 3px;
}

.chat-bubble--assistant {
  align-self: flex-start;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  color: var(--color-text);
  border-bottom-left-radius: 3px;
}

.chat-input-bar {
  display: flex;
  gap: 0.75rem;
  padding: 1rem 1.5rem;
  background: var(--color-surface);
  border-top: 1px solid var(--color-border);
}

.chat-input-bar input {
  flex: 1;
  padding: 0.65rem 1rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  font-size: 1rem;
  font-family: inherit;
  background: rgba(255, 255, 255, 0.06);
  color: var(--color-text);
}

.chat-input-bar input::placeholder {
  color: var(--color-text-muted);
}

.chat-input-bar input:focus {
  outline: none;
  border-color: var(--color-primary);
}

.chat-typing {
  align-self: flex-start;
  color: var(--color-text-light);
  font-style: italic;
  font-size: 0.9rem;
  display: none;
}

/* ── Auth pages (login/signup) ─────────────── */
.auth-page {
  min-height: 100vh;
  background: var(--color-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.auth-card {
  background: var(--color-primary-deep);
  border-radius: var(--radius-lg);
  padding: 2.5rem 2rem;
  width: 100%;
  max-width: 440px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.auth-card__logo {
  text-align: center;
  margin-bottom: 1.5rem;
}

.auth-card__logo-icon {
  width: 56px;
  height: 56px;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: var(--color-primary);
  font-weight: 700;
}

.auth-card h2 {
  text-align: center;
  color: #fff;
  font-size: 1.6rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.auth-card__subtitle {
  text-align: center;
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.9rem;
  margin-bottom: 2rem;
}

.auth-card .form-group input {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.15);
  color: #fff;
}

.auth-card .form-group input::placeholder {
  color: rgba(255, 255, 255, 0.4);
}

.auth-card .form-group input:focus {
  border-color: rgba(255, 255, 255, 0.4);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.1);
}

.auth-card .form-group label {
  color: rgba(255, 255, 255, 0.6);
}

.auth-card .btn--primary {
  width: 100%;
  padding: 0.75rem;
  font-size: 1rem;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: rgba(255, 255, 255, 0.8);
  margin-top: 0.5rem;
}

.auth-card .btn--primary:hover {
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
}

.auth-footer {
  text-align: center;
  margin-top: 1.5rem;
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.9rem;
}

.auth-footer a {
  color: rgba(255, 255, 255, 0.8);
  text-decoration: underline;
}

.auth-footer a:hover {
  color: #fff;
}

/* ── Hero (landing page) ──────────────────── */
.hero {
  text-align: center;
  padding: 6rem 1rem 4rem;
}

.hero h1 {
  font-size: 3rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: 1rem;
}

.hero h1 span {
  color: var(--color-accent);
}

.hero p {
  font-size: 1.15rem;
  color: var(--color-text-light);
  max-width: 500px;
  margin: 0 auto 2.5rem;
}

.hero__actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
}

/* ── Messages (Django messages) ────────────── */
.message-banner {
  background: var(--color-surface);
  border-left: 4px solid var(--color-primary);
  padding: 1rem 1.5rem;
  border-radius: var(--radius);
  margin-bottom: 1.25rem;
  color: var(--color-text);
}

/* ── Responsive ────────────────────────────── */

/* Touch-friendly: ensure minimum tap target sizes */
@media (pointer: coarse) {
  .btn {
    min-height: 44px;
    padding: 0.65rem 1.4rem;
  }

  .sidebar__link {
    min-height: 44px;
  }

  .chat-input-bar input {
    min-height: 44px;
  }

  /* Show delete button always on touch devices (no hover) */
  .story-card__delete {
    opacity: 1;
  }
}

/* ── Tablet & small desktop (≤ 768px) ─────── */
@media (max-width: 768px) {
  /* Sidebar → horizontal top bar */
  .sidebar {
    width: 100%;
    height: auto;
    position: sticky;
    top: 0;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    padding: 0.6rem 1rem;
    gap: 0;
  }

  .sidebar__brand {
    margin-bottom: 0;
    padding: 0;
    font-size: 1.1rem;
    flex: 1;
    order: 1;
  }

  .sidebar__brand-icon {
    width: 28px;
    height: 28px;
    font-size: 0.9rem;
  }

  /* Show hamburger on mobile — pinned to far right */
  .sidebar__hamburger {
    display: flex;
    position: absolute;
    right: 1rem;
    top: 0.55rem;
    order: 2;
    padding: 0.5rem;
  }

  /* Collapsible nav — full-width dropdown below the top bar */
  .sidebar__nav {
    flex-direction: column;
    gap: 0;
    order: 3;
    width: 100%;
    overflow: hidden;
    max-height: 0;
    padding: 0;
    transition: max-height 0.3s ease, padding 0.3s ease;
  }

  .sidebar__nav--open {
    max-height: 300px;
    padding-top: 0.5rem;
  }

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

  .sidebar__link {
    padding: 0.6rem 1rem;
    border-left: 3px solid transparent;
    border-bottom: none;
    white-space: nowrap;
    font-size: 0.88rem;
  }

  .sidebar__link--active {
    border-left-color: #fff;
    border-bottom-color: transparent;
    background: rgba(255, 255, 255, 0.12);
  }

  .sidebar__divider {
    margin: 0.4rem 1rem;
  }

  /* Footer collapses with nav — zero padding when hidden */
  .sidebar__footer {
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    margin-top: 0;
    padding: 0 1rem;
    order: 4;
    width: 100%;
    overflow: hidden;
    max-height: 0;
    transition: max-height 0.3s ease, padding 0.3s ease;
  }

  .sidebar__footer--open {
    max-height: 60px;
    padding: 0.6rem 1rem;
  }

  .sidebar__avatar {
    width: 28px;
    height: 28px;
    font-size: 0.7rem;
  }

  /* Main content */
  .main-content {
    margin-left: 0;
  }

  .container {
    padding: 1rem 1rem;
    padding-bottom: calc(1rem + env(safe-area-inset-bottom, 0px));
  }

  /* Topbar stacks on narrow screens */
  .topbar {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }

  .topbar__title {
    font-size: 1.3rem;
  }

  /* Story grid adapts */
  .story-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }

  .story-card__image {
    font-size: 2.2rem;
  }

  /* Chat full-viewport below top bar */
  .chat-container {
    margin-left: 0;
    height: calc(100dvh - 3.75rem);
  }

  .chat-messages {
    padding: 1rem;
  }

  .chat-bubble {
    max-width: 88%;
  }

  .chat-input-bar {
    padding: 0.75rem;
    padding-bottom: calc(0.75rem + env(safe-area-inset-bottom, 0px));
  }

  .chat-header {
    padding: 0.75rem 1rem;
  }

  .chat-header strong {
    font-size: 0.95rem;
  }

  /* Hero */
  .hero {
    padding: 3rem 1rem 2rem;
  }

  .hero h1 {
    font-size: 2rem;
  }

  .hero p {
    font-size: 1rem;
  }

  .hero__actions {
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
  }

  .hero__actions .btn {
    width: 100%;
    max-width: 300px;
  }

  /* Auth pages */
  .auth-page {
    padding: 1rem;
  }

  .auth-card {
    padding: 2rem 1.5rem;
  }

  .auth-card h2 {
    font-size: 1.35rem;
  }

  /* Choose method */
  .choose-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .choose-card {
    padding: 1.5rem 1.25rem;
  }

  /* Edit form */
  .edit-form {
    max-width: 100%;
  }

  /* Modal */
  .modal__dialog {
    max-width: 92%;
    padding: 1.5rem;
  }

  /* Cards */
  .card {
    padding: 1.25rem;
  }
}

/* ── Small phone (≤ 480px) ─────────────────── */
@media (max-width: 480px) {
  .sidebar {
    padding: 0.4rem 0.5rem;
  }

  .sidebar__brand {
    font-size: 1rem;
    gap: 0.4rem;
  }

  .sidebar__link {
    padding: 0.5rem 0.65rem;
    font-size: 0.78rem;
  }

  .sidebar__logout {
    font-size: 0.75rem;
    padding: 0.25rem 0.4rem;
  }

  .container {
    padding: 0.75rem;
  }

  .topbar__title {
    font-size: 1.15rem;
  }

  .story-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.65rem;
  }

  .story-card__info {
    padding: 0.6rem 0.7rem;
  }

  .story-card__title {
    font-size: 0.85rem;
  }

  .story-card__author {
    font-size: 0.72rem;
  }

  .chat-bubble {
    max-width: 92%;
    padding: 0.7rem 0.9rem;
    font-size: 0.92rem;
  }

  .hero h1 {
    font-size: 1.65rem;
  }

  .hero p {
    font-size: 0.92rem;
  }

  .btn {
    padding: 0.55rem 1rem;
    font-size: 0.85rem;
  }

  .card__title {
    font-size: 1rem;
  }

  .section-title {
    font-size: 1.1rem;
  }

  .auth-card {
    padding: 1.5rem 1.25rem;
    border-radius: var(--radius);
  }

  .auth-card h2 {
    font-size: 1.2rem;
  }

  .auth-card__subtitle {
    font-size: 0.82rem;
  }

  .choose-card__icon {
    font-size: 2rem;
  }

  .choose-card__title {
    font-size: 1rem;
  }

  .choose-card__desc {
    font-size: 0.85rem;
  }
}

/* ── Choose-method page ────────────────────── */
.choose-subtitle {
  color: var(--color-text-light);
  margin-bottom: 1.5rem;
}

.choose-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
  max-width: 680px;
}

.choose-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 2rem 1.5rem;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  text-decoration: none;
  color: var(--color-text);
  transition: border-color 0.2s, transform 0.15s;
}

.choose-card:hover {
  border-color: var(--color-accent);
  transform: translateY(-2px);
}

.choose-card__icon {
  font-size: 2.5rem;
  margin-bottom: 0.75rem;
}

.choose-card__title {
  font-size: 1.15rem;
  margin-bottom: 0.5rem;
}

.choose-card__desc {
  font-size: 0.9rem;
  color: var(--color-text-light);
  line-height: 1.5;
}

/* ── Edit form ─────────────────────────────── */
.edit-form {
  max-width: 640px;
}

.edit-form__label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.35rem;
  margin-top: 1.25rem;
  color: var(--color-text-light);
  font-size: 0.9rem;
}

.edit-form__input {
  width: 100%;
  padding: 0.65rem 0.75rem;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  color: var(--color-text);
  font-size: 1rem;
}

.edit-form__input:focus,
.edit-form__textarea:focus {
  outline: none;
  border-color: var(--color-accent);
}

.edit-form__textarea {
  width: 100%;
  padding: 0.65rem 0.75rem;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  color: var(--color-text);
  font-size: 1rem;
  resize: vertical;
  font-family: inherit;
  line-height: 1.6;
}

.edit-form__actions {
  margin-top: 1.5rem;
}
