/* Wishlist uses the shared MotionGit shell and design tokens. */
.idea-top {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 28px;
  flex-wrap: wrap;
}
.idea-top a,
.idea-filters a {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}
.idea-filters {
  display: flex;
  align-items: end;
  gap: 16px;
  flex-wrap: wrap;
  padding: 18px;
  margin: 24px 0;
  border: 1px solid var(--border-muted);
  border-radius: 12px;
  background: var(--bg-1);
}
.idea-filters label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}
.idea-filters .btn {
  min-height: 44px;
}
.idea-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 24px;
}
.idea-card {
  background: var(--bg-1);
  border: 1px solid var(--border-muted);
  border-radius: 12px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 290px;
}
.idea-card h2 {
  font-size: 19px;
  line-height: 1.5;
  margin: 0 0 14px;
  overflow-wrap: anywhere;
  letter-spacing: -0.015em;
}
.idea-card h2 a {
  color: var(--fg);
}
.idea-card h2 a:hover {
  color: var(--blue);
}
.idea-label {
  font-size: 12px;
  color: var(--muted);
  margin: 0 0 14px;
}
.idea-excerpt {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 14px;
  line-height: 1.75;
  color: var(--fg-2);
  margin: 0 0 24px;
  overflow-wrap: anywhere;
}
.idea-card-bottom {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: auto;
  flex-wrap: wrap;
}
.idea-vote {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  min-height: 44px;
  padding: 10px 12px;
  display: inline-flex;
  gap: 10px;
  align-items: center;
  justify-content: center;
  color: var(--fg-2);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  white-space: normal;
  text-decoration: none;
}
.idea-vote b {
  font-family: var(--mono);
  color: var(--blue);
}
.idea-vote[aria-pressed='true'] {
  background: rgba(56, 139, 253, 0.15);
  border-color: var(--blue);
  color: var(--fg);
}
.idea-vote:disabled {
  opacity: 0.65;
  cursor: wait;
}
.idea-state {
  font-size: 12px;
  color: var(--muted);
}
.idea-action-error {
  display: block;
  color: #ff7b72;
  margin-top: 4px;
}
.idea-rules {
  margin-top: 32px;
  max-width: 800px;
}
.home-ideas {
  display: flex;
  align-items: center;
  gap: 20px;
  min-height: 80px;
  padding: 14px 20px;
  background: var(--bg-1);
  border: 1px solid var(--hair);
  border-radius: 16px;
  margin-block: 24px 0;
}
/* Keep the wishlist in the same rhythm as the adjacent template panels. */
.home-ideas + .more-row {
  margin-top: 24px;
}
.home-ideas-title {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 240px;
}
.home-ideas-title b {
  display: block;
  font-size: 17px;
  line-height: 1.4;
  color: var(--fg);
}
.home-ideas-title small {
  display: block;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}
.home-ideas-plus {
  display: grid;
  place-items: center;
  background: rgba(56, 139, 253, 0.1);
  border: 1px solid rgba(56, 139, 253, 0.3);
  width: 40px;
  height: 40px;
  border-radius: 9px;
  font-size: 24px;
  color: var(--blue);
  flex-shrink: 0;
}
.home-ideas-tags {
  display: flex;
  gap: 10px;
  flex: 1;
  min-width: 0;
}
.home-ideas-tags a {
  font-size: 12px;
  background: var(--bg-2);
  border: 1px solid var(--border-muted);
  border-radius: 20px;
  padding: 8px 12px;
  max-width: 160px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  color: var(--fg-2);
}
.home-ideas-explore,
.home-ideas-new {
  font-size: 13px;
  color: var(--blue);
  min-height: 44px;
  display: flex;
  align-items: center;
}
.home-ideas-explore {
  margin-left: auto;
}
.home-ideas-new {
  border: 1px solid var(--border);
  padding: 0 12px;
  border-radius: 8px;
  color: var(--fg-2);
}
.idea-form-wrap {
  max-width: 720px;
  margin: auto;
}
.idea-form {
  padding: 28px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--bg-1);
}
.idea-form fieldset {
  border: 0;
  padding: 0;
  margin: 0;
  min-width: 0;
}
.idea-form legend {
  font-size: 24px;
  font-weight: 700;
  margin: 24px 0;
  line-height: 1.4;
}
.idea-form .field {
  margin: 20px 0;
  display: grid;
  gap: 10px;
}
.idea-form textarea.input {
  resize: vertical;
  height: auto;
  min-height: 148px;
}
.idea-form textarea[name='difficulty'] {
  min-height: 96px;
}
.idea-form [hidden] {
  display: none !important;
}
.idea-step-label {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--muted);
}
.idea-progress {
  display: flex;
  gap: 12px;
}
.idea-progress i {
  height: 3px;
  flex: 1;
  background: var(--border);
}
.idea-progress i.on {
  background: var(--blue);
}
.idea-options {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.idea-options label {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 14px;
}
.idea-options input {
  width: 18px;
  height: 18px;
  accent-color: var(--blue);
}
.idea-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.idea-body {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  line-height: 1.85;
}
.idea-preview {
  min-height: 160px;
  background: var(--bg-2);
}
.idea-preview p {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.idea-reward {
  padding: 18px 0;
  font-size: 13px;
  line-height: 1.8;
  color: var(--muted);
}
.idea-reward b {
  color: var(--fg-2);
}
.idea-report summary {
  min-height: 44px;
  cursor: pointer;
  padding: 12px 0;
}
.idea-report form {
  max-width: 480px;
}
.idea-form [role='alert'] {
  color: #ff7b72;
  overflow-wrap: anywhere;
}
.idea-form [role='alert']:empty {
  display: none;
}
.idea-form .form-actions {
  margin: 24px 0 12px;
}
.idea-form .btn {
  min-height: 44px;
}
.idea-similar-links {
  display: grid;
  gap: 8px;
}
.idea-similar-links a {
  min-height: 44px;
  display: flex;
  align-items: center;
  text-decoration: underline;
  color: var(--blue);
}
.idea-grid a:focus-visible,
.home-ideas a:focus-visible,
.idea-vote:focus-visible,
.idea-form :focus-visible,
.idea-report :focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
}
@media (max-width: 1200px) {
  .idea-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .home-ideas-tags {
    display: none;
  }
}
@media (max-width: 900px) {
  .idea-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 600px) {
  .idea-grid {
    grid-template-columns: 1fr;
  }
  .idea-card {
    min-height: 245px;
    padding: 22px;
  }
  .home-ideas {
    padding: 12px 14px;
    min-height: 100px;
    gap: 4px;
    flex-wrap: wrap;
  }
  .home-ideas-title {
    min-width: 0;
    flex: 1;
    gap: 10px;
  }
  .home-ideas-title b {
    font-size: 16px;
  }
  .home-ideas-plus {
    width: 36px;
    height: 36px;
  }
  .home-ideas-explore {
    font-size: 12px;
    width: 100%;
    margin-left: 46px;
    min-height: 28px;
  }
  .home-ideas-new {
    display: none;
  }
  .idea-form {
    padding: 20px 16px;
  }
  .idea-pair {
    grid-template-columns: 1fr;
    gap: 0;
  }
  .idea-filters {
    gap: 10px;
    padding: 14px;
  }
  .idea-filters label {
    flex: 1;
    min-width: 120px;
  }
  .idea-filters .select {
    width: 100%;
    min-width: 0;
  }
  .idea-top {
    gap: 18px;
  }
  .idea-card h2 {
    font-size: 20px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .idea-card,
  .idea-vote,
  .home-ideas,
  .idea-form * {
    animation: none !important;
    transition: none !important;
  }
}

/* ---- 许愿表单 v2 (11-25): three light steps, chips, live summary, similar-wish prompt, thanks page ---- */
.iw { max-width: 760px; margin: 0 auto; }
/* Steps, buttons and the preview set their own display; the hidden attribute still wins inside the form. */
.iw [hidden] { display: none !important; }
.iw-form { position: relative; display: grid; }
.iw-form:not(.is-wizard) .iw-progress { display: none; }
.iw-form:not(.is-wizard) .iw-step + .iw-step { margin-top: 28px; padding-top: 28px; border-top: 1px solid var(--border-muted); }
.iw-progress { display: flex; gap: 10px; margin: 0 0 24px; padding: 0; list-style: none; }
.iw-progress li { position: relative; flex: 1; display: flex; align-items: center; gap: 8px; padding-top: 12px; color: var(--subtle); font-size: 13px; transition: color .3s var(--ease); }
.iw-progress li::before, .iw-progress li::after { content: ""; position: absolute; top: 0; left: 0; height: 3px; border-radius: 3px; }
.iw-progress li::before { right: 0; background: var(--border-muted); }
.iw-progress li::after { width: 0; background: var(--grad); transition: width .5s var(--ease); }
.iw-progress li.is-current::after, .iw-progress li.is-done::after { width: 100%; }
.iw-progress i { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; border: 1px solid var(--border); font: 600 11px var(--mono); font-style: normal; transition: background .3s, color .3s, border-color .3s; }
.iw-progress li.is-current { color: var(--fg); }
.iw-progress li.is-current i { border-color: var(--fg); background: var(--fg); color: #0b0d12; }
.iw-progress li.is-done i { border-color: rgba(63,185,80,.6); color: var(--green); }
.iw-step { display: grid; gap: 14px; }
.iw-step.is-enter[data-dir="next"] { animation: iw-in-next .42s var(--ease) both; }
.iw-step.is-enter[data-dir="back"] { animation: iw-in-back .42s var(--ease) both; }
@keyframes iw-in-next { from { opacity: 0; transform: translateX(28px); } to { opacity: 1; transform: none; } }
@keyframes iw-in-back { from { opacity: 0; transform: translateX(-28px); } to { opacity: 1; transform: none; } }
.iw-q { margin: 0; font-size: clamp(22px, 1.3vw + 15px, 30px); font-weight: 750; letter-spacing: -.01em; }
.iw-tip { margin: -6px 0 2px; color: var(--muted); font-size: 14px; line-height: 1.6; }
.iw-field { position: relative; display: grid; gap: 8px; }
.iw-label { color: var(--muted); font-size: 14px; }
.iw-title textarea { min-height: 80px; padding: 14px 16px 28px; border-radius: 14px; font-size: 18px; line-height: 1.5; resize: vertical; }
.iw-count { position: absolute; right: 12px; bottom: 9px; color: var(--subtle); font: 12px var(--mono); pointer-events: none; }
.iw-examples { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; color: var(--subtle); font-size: 13px; }
.iw-example { padding: 5px 11px; border: 1px dashed var(--border); border-radius: 999px; background: none; color: var(--muted); font: inherit; font-size: 13px; cursor: pointer; transition: color .2s, border-color .2s, background .2s; }
.iw-example:hover { border-color: rgba(163,113,247,.6); background: rgba(163,113,247,.06); color: var(--fg); }
.iw-group { min-width: 0; margin: 6px 0 0; padding: 0; border: 0; }
.iw-group legend { display: flex; align-items: baseline; gap: 8px; margin-bottom: 10px; padding: 0; font-size: 15px; font-weight: 600; }
.iw-group legend small { color: var(--subtle); font-size: 12px; font-weight: 400; transition: color .3s; }
.iw-group legend small.is-pulse { animation: iw-pulse .6s var(--ease); color: #f0b72f; }
@keyframes iw-pulse { 0%, 100% { transform: none; } 40% { transform: scale(1.08); } }
.iw-req { padding: 1px 7px; border-radius: 999px; background: var(--grad); color: #0b0d12; font-size: 11px; font-style: normal; font-weight: 700; }
.iw-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.iw-chip { position: relative; }
.iw-chip input { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.iw-chip span { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 8px 15px; border: 1px solid var(--border); border-radius: 999px; color: var(--muted); font-size: 14px; user-select: none;
  transition: color .2s, border-color .2s, background .2s, transform .2s var(--ease); }
.iw-chip:hover span { border-color: rgba(240,246,252,.35); color: var(--fg); }
.iw-chip input:checked + span { border-color: var(--fg); background: var(--fg); color: #0b0d12; animation: iw-pop .32s var(--ease); }
.iw-chip input:focus-visible + span { outline: 2px solid #79c0ff; outline-offset: 2px; }
@keyframes iw-pop { 0% { transform: scale(.94); } 60% { transform: scale(1.04); } 100% { transform: none; } }
.iw-frame { display: inline-block; width: calc(var(--fw) / max(var(--fw), var(--fh)) * 15px); height: calc(var(--fh) / max(var(--fw), var(--fh)) * 15px); border: 1.5px solid currentColor; border-radius: 3px; }
.iw-upload { display: grid; gap: 10px; }
.iw-upload-btn { position: relative; display: flex; align-items: center; gap: 12px; padding: 14px 16px; border: 1px dashed var(--border); border-radius: 14px; color: var(--muted); cursor: pointer; transition: border-color .2s, background .2s, color .2s; }
.iw-upload-btn:hover, .iw-upload-btn:focus-within { border-color: rgba(163,113,247,.6); background: rgba(163,113,247,.06); color: var(--fg); }
.iw-upload-btn svg { flex: 0 0 auto; width: 22px; height: 22px; }
.iw-upload-btn b { display: block; color: var(--fg); font-size: 14px; font-weight: 600; }
.iw-upload-btn small { color: var(--subtle); font-size: 12px; }
.iw-file { position: absolute; inset: 0; width: 100%; opacity: 0; cursor: pointer; }
.iw-upload-preview { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--border-muted); border-radius: 12px; background: rgba(240,246,252,.04); }
.iw-upload-preview.is-in { animation: iw-rise .4s var(--ease) both; }
.iw-thumb { flex: 0 0 auto; width: 56px; height: 56px; overflow: hidden; border-radius: 8px; background: #0d1117; }
.iw-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.iw-thumb-video { display: grid; place-items: center; width: 100%; height: 100%; color: var(--muted); font-size: 20px; }
.iw-upload-name { flex: 1; min-width: 0; overflow: hidden; font-size: 14px; white-space: nowrap; text-overflow: ellipsis; }
.iw-link { padding: 0; border: 0; background: none; color: var(--muted); font: inherit; font-size: 13px; text-decoration: underline; cursor: pointer; }
.iw-keep { color: var(--muted); font-size: 13px; }
.iw-boost { display: flex; align-items: center; gap: 8px; margin: 0; color: #d2a8ff; font-size: 13px; transition: color .3s; }
.iw-boost i { font-style: normal; }
.iw-boost.is-done { color: var(--green); }
.iw-summary { display: grid; gap: 8px; padding: 16px 18px; border: 1px solid var(--border-muted); border-radius: 14px; background: linear-gradient(180deg, rgba(163,113,247,.06), rgba(240,246,252,.015)); }
.iw-summary small { color: var(--subtle); font: 600 11px var(--mono); letter-spacing: .12em; }
.iw-summary b { font-size: 17px; }
.iw-summary p, .iw-tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; }
.iw-tag { display: inline-flex; align-items: center; padding: 3px 9px; border: 1px solid var(--border-muted); border-radius: 999px; color: var(--muted); font-size: 12px; animation: iw-rise .3s var(--ease) both; }
.iw-tag.is-auto { border-color: rgba(63,185,80,.35); color: #7ee787; }
.iw-similar { padding: 14px 16px; border: 1px solid rgba(240,183,47,.35); border-radius: 14px; background: rgba(240,183,47,.06); }
.iw-similar.is-on { animation: iw-rise .45s var(--ease) both; }
.iw-similar-title { margin: 0; font-weight: 600; }
.iw-similar-hint { margin: 4px 0 10px; color: var(--muted); font-size: 13px; }
.iw-similar ul { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.iw-similar li { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.iw-similar li a { min-width: 0; overflow: hidden; color: var(--fg); white-space: nowrap; text-overflow: ellipsis; }
.iw-similar li form { flex: 0 0 auto; margin: 0; }
@keyframes iw-rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.iw-error:empty, .iw-draft:empty { display: none; }
.iw-error { margin: 0 0 14px; padding: 10px 14px; border: 1px solid rgba(248,81,73,.45); border-radius: 10px; background: rgba(248,81,73,.08); color: #ffa198; }
.iw-error.is-shake { animation: iw-shake .4s var(--ease); }
@keyframes iw-shake { 0%, 100% { transform: none; } 25% { transform: translateX(-5px); } 75% { transform: translateX(5px); } }
.iw-draft { margin: 0 0 12px; color: var(--muted); font-size: 13px; }
.iw-bar { position: sticky; bottom: 0; z-index: 5; display: grid; gap: 8px; margin-top: 22px; padding: 14px 0 calc(14px + env(safe-area-inset-bottom)); border-top: 1px solid var(--border-muted); background: rgba(1,4,9,.96); backdrop-filter: blur(10px); }
.iw-bar::before { content: ""; position: absolute; left: 0; right: 0; bottom: 100%; height: 24px; background: linear-gradient(180deg, rgba(1,4,9,0), rgba(1,4,9,.96)); pointer-events: none; }
.iw-note { margin: 0; color: var(--muted); font-size: 13px; transition: color .3s; }
.iw-note.is-boost { color: #d2a8ff; }
.iw-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; }
.iw-actions .btn span { margin-left: 6px; }
.iw-actions [data-submit] { min-width: 132px; transition: box-shadow .3s var(--ease), opacity .2s; }
.iw-actions [data-submit].is-ready { box-shadow: 0 0 0 4px rgba(163,113,247,.2); }
.iw-actions [data-submit].is-busy { opacity: .7; }
.iw-discard { display: inline-block; margin-top: 6px; color: var(--subtle); font-size: 13px; }
.iw-done { display: grid; justify-items: center; gap: 14px; max-width: 640px; margin: 24px auto 0; text-align: center; }
.iw-done-mark svg { width: 72px; height: 72px; }
.iw-done-mark circle { fill: none; stroke: rgba(63,185,80,.85); stroke-width: 2.5; stroke-dasharray: 151; stroke-dashoffset: 151; animation: iw-draw .7s var(--ease) .1s forwards; }
.iw-done-mark path { fill: none; stroke: var(--green); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 40; stroke-dashoffset: 40; animation: iw-draw .45s var(--ease) .65s forwards; }
@keyframes iw-draw { to { stroke-dashoffset: 0; } }
.iw-done h1 { margin: 6px 0 0; font-size: clamp(26px, 2vw + 16px, 36px); }
.iw-done-lead { margin: 0; color: var(--muted); line-height: 1.7; }
.iw-done-wish { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 8px; margin: 0; font-size: 16px; }
.iw-done-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 6px; }
.iw-done-similar { width: 100%; margin-top: 12px; text-align: left; }
.iw-done-browse { font-size: 14px; }
.iw-ref-private { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--border-muted); }
.iw-ref-media { display: block; max-width: 100%; max-height: 360px; border-radius: 12px; }
@media (max-width: 640px) {
  .iw-actions { justify-content: stretch; }
  .iw-actions .btn { flex: 1 1 auto; justify-content: center; }
  .iw-actions [data-submit] { order: 3; flex-basis: 100%; min-height: 48px; }
  .iw-chip span { min-height: 42px; }
  .iw-title textarea { font-size: 17px; }
}
@media (max-width: 380px) { .iw-progress span { display: none; } }
@media (prefers-reduced-motion: reduce) {
  .iw-step.is-enter, .iw-chip input:checked + span, .iw-similar.is-on, .iw-upload-preview.is-in, .iw-error.is-shake, .iw-tag, .iw-group legend small.is-pulse,
  .iw-done-mark circle, .iw-done-mark path { animation: none; }
  .iw-done-mark circle, .iw-done-mark path { stroke-dashoffset: 0; }
  .iw-progress li::after { transition: none; }
}
