  :root {
    --bg: #0b1020;
    --panel: #121a31;
    --panel-2: #1a2442;
    --text: #edf2ff;
    --muted: #aab4d6;
    --line: #2a3763;
    --accent: #77a7ff;
    --accent-2: #9bffcf;
    --warn: #ffd36e;
    --shadow: 0 14px 40px rgba(0,0,0,.28);
    --radius: 18px;
  }
  * { box-sizing: border-box; }
  body {
    margin: 0;
    font-family: Inter, Pretendard, "Noto Sans KR", system-ui, sans-serif;
    color: var(--text-main);
    background: var(--bg-main);
  }
  .wrap {
    max-width: 1280px;
    margin: 0 auto;
    padding: 28px 12px 72px;
  }
  .hero {
    display: grid;
    gap: 18px;
    margin-bottom: 22px;
  }
  @media (min-width: 640px) {
    .wrap {
      padding-left: 16px;
      padding-right: 16px;
    }
  }
  .hero-card {
    background:
      radial-gradient(120% 140% at 0% 0%, rgba(34,211,238,.2), transparent 50%),
      radial-gradient(120% 120% at 100% 0%, rgba(59,130,246,.24), transparent 58%),
      linear-gradient(145deg, #0f172a, #0b1222);
    border: 1px solid rgba(148,163,184,.26);
    border-radius: 14px;
    padding: 22px;
    box-shadow: 0 6px 20px rgba(0,0,0,.3);
    overflow: hidden;
    position: relative;
  }
  .hero-card::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg, rgba(255,255,255,.08), transparent 22%, transparent 75%, rgba(255,255,255,.05));
    pointer-events: none;
  }
  .quest-shell {
    position: relative;
    overflow: hidden;
  }
  .quest-hero {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 1rem;
    position: relative;
    z-index: 1;
  }
  .quest-hero-icon {
    width: 58px;
    height: 58px;
    border-radius: 12px;
    border: 1px solid rgba(148,163,184,.45);
    background: rgba(15,23,42,.75);
    padding: .45rem;
    object-fit: contain;
    flex-shrink: 0;
  }
  .hero-eyebrow {
    font-size: 11px;
    letter-spacing: .16em;
    color: #67e8f9;
    font-weight: 700;
    margin: 0 0 6px;
  }
.hero-title {
  margin-top: 0.5rem;   /* mt-2 */
  margin-bottom: 0;     
  font-size: 1.875rem;  /* text-3xl */
  line-height: 1.25;    /* leading-tight */
  font-weight: 900;     /* font-black */
}
  .sub {
    color: var(--text-muted);
    margin: 0;
    line-height: 1.7;
    font-size: 14px;
    max-width: 720px;
  }
  .stats {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
  }
  .stat {
    min-width: 152px;
    background: rgba(15,23,42,.45);
    border: 1px solid rgba(148,163,184,.25);
    border-radius: 999px;
    padding: 10px 14px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
  }
  .stat b {
    display: inline;
    font-size: 16px;
    margin: 0;
    font-weight: 800;
  }
  .stat span {
    font-size: 13px;
    color: #cbd5e1;
  }
  .controls {
    display: grid;
    grid-template-columns: 1.8fr repeat(3, minmax(130px, 180px));
    gap: 12px;
    margin: 30px 0 30px;
    padding: 14px;
    border-radius: 14px;
    border: 1px solid var(--border-color);
    background: linear-gradient(180deg, rgba(17,24,34,.9), rgba(17,24,34,.74));
  }
  input, select {
    width: 100%;
    min-height: 44px;
    background: var(--panel-bg);
    color: var(--text-main);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 12px 14px;
    outline: none;
    font-size: 14px;
    transition: border-color .15s ease, box-shadow .15s ease;
  }
  input:focus, select:focus {
    border-color: #60a5fa;
    box-shadow: 0 0 0 3px rgba(96,165,250,.16);
  }
  input::placeholder { color: #91a0cb; }
  .layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 420px;
    gap: 18px;
    align-items: start;
  }
  .list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 10px;
  }
  .card {
    background: linear-gradient(180deg, rgba(17,24,34,.95), rgba(17,24,34,.84));
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 12px;
    min-height: 132px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 8px;
    transition: transform .14s ease, border-color .14s ease, background .14s ease;
  }
  .card:hover {
    transform: translateY(-2px);
    border-color: #4864aa;
    background: linear-gradient(180deg, rgba(119,167,255,.07), rgba(255,255,255,.01));
  }
  .card.active {
    border-color: var(--accent);
    box-shadow: 0 0 0 1px rgba(119,167,255,.15) inset;
  }
  .topline {
    display: flex;
    gap: 10px;
    align-items: start;
    justify-content: space-between;
    margin-bottom: 8px;
  }
  .quest-id {
    color: var(--accent-2);
    font-size: 13px;
    letter-spacing: .04em;
  }
  .title {
    font-size: 15px;
    font-weight: 700;
    margin: 2px 0 0;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  .badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 2px 0 0;
  }
  .badge {
    font-size: 11px;
    padding: 5px 8px;
    border-radius: 999px;
    border: 1px solid var(--line);
    color: #d7e0ff;
    background: rgba(255,255,255,.03);
  }
  .badge-lv {
    font-size: 12px;
    font-weight: 800;
    color: #dbeafe;
    background: linear-gradient(135deg, rgba(37,99,235,.42), rgba(14,116,144,.32));
    border-color: rgba(125,211,252,.42);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.2);
  }
  .grid2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
  .card-meta {
    display: grid;
    grid-template-columns: 1fr;
    gap: 6px;
    margin-top: auto;
  }
  .compact-box {
    background: rgba(255,255,255,.03);
    border: 1px solid rgba(255,255,255,.06);
    border-radius: 10px;
    padding: 8px 9px;
    min-height: 42px;
  }
  .compact-label {
    color: var(--muted);
    font-size: 10px;
    margin-bottom: 4px;
  }
  .compact-value {
    font-size: 12px;
    font-weight: 700;
    line-height: 1.35;
    word-break: break-word;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  .reward-preview {
    display: flex;
    align-items: center;
    gap: 8px;
  }
  .reward-preview-icons {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
  }
  .reward-preview-icons img {
    width: 18px;
    height: 18px;
    border-radius: 5px;
    border: 1px solid rgba(148,163,184,.35);
    background: rgba(15,23,42,.65);
    object-fit: cover;
  }
  .reward-preview-text {
    min-width: 0;
  }
  .mini {
    background: rgba(255,255,255,.02);
    border: 1px solid rgba(255,255,255,.05);
    border-radius: 14px;
    padding: 10px 12px;
  }
  .mini .label {
    color: var(--muted);
    font-size: 12px;
    margin-bottom: 4px;
  }
  .mini .value {
    font-weight: 600;
    line-height: 1.45;
    word-break: break-word;
  }
  .excerpt {
    margin-top: 12px;
    color: #dfe6ff;
    line-height: 1.6;
    white-space: pre-line;
  }
  .detail {
    position: sticky;
    top: 20px;
    background: linear-gradient(180deg, rgba(17,24,34,.96), rgba(17,24,34,.84));
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 20px;
    box-shadow: 0 8px 24px rgba(2,6,23,.34);
    min-height: 360px;
  }
  .detail h2 {
    margin: 4px 0 12px;
    font-size: 28px;
    font-weight: 800;
  }
  .section {
    margin-top: 18px;
  }
  .section h3 {
    font-size: 14px;
    letter-spacing: .03em;
    text-transform: uppercase;
    color: var(--accent-2);
    margin: 0 0 10px;
  }
  .panel {
    background: rgba(17,24,34,.78);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 14px;
    line-height: 1.7;
    white-space: pre-line;
    word-break: break-word;
  }
  .items {
    display: grid;
    gap: 10px;
  }
  .itemrow {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    background: rgba(17,24,34,.78);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 12px 14px;
  }
  .item-left {
    display: flex;
    align-items: center;
    gap: 10px;
  }
  .item-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    object-fit: cover;
    border: 1px solid rgba(148,163,184,.3);
    background: rgba(15,23,42,.6);
    flex-shrink: 0;
  }
  .itemrow small {
    color: var(--muted);
    display: block;
    margin-top: 2px;
  }
  .empty {
    color: var(--muted);
    padding: 18px;
    border: 1px dashed rgba(255,255,255,.12);
    border-radius: 16px;
  }
  .count {
    color: var(--muted);
    margin: 6px 0 10px;
  }

  .type-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 0 0 18px;
    align-items: center;
  }
  .filter-group {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    padding: 10px 12px;
    background: rgba(255,255,255,.02);
    border: 1px solid var(--line);
    border-radius: 16px;
  }
  .group-label {
    font-size: 12px;
    color: var(--muted);
    margin-right: 2px;
  }
  .second-job-group {
    flex-basis: 100%;
    width: 100%;
  }
  .type-btn {
    appearance: none;
    border: 1px solid var(--line);
    background: var(--panel);
    color: var(--text);
    padding: 8px 11px;
    border-radius: 999px;
    font-size: 12px;
    cursor: pointer;
    line-height: 1.1;
  }
  .type-btn:hover {
    border-color: #4864aa;
  }
  .type-btn.active {
    border-color: var(--accent);
    background: rgba(119,167,255,.12);
    color: white;
  }
  .footer-note {
    margin-top: 18px;
    color: #91a0cb;
    font-size: 13px;
  }
  @media (max-width: 1100px) {
    .controls { grid-template-columns: 1fr 1fr; padding: 12px; margin: 24px 0; }
    .layout { grid-template-columns: 1fr; }
    .list { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
    .detail { position: static; }
  }
  @media (max-width: 700px) {
    .controls { grid-template-columns: 1fr; padding: 10px; margin: 20px 0; }
    .grid2 { grid-template-columns: 1fr; }
    .topline { flex-direction: column; }
    .quest-hero-icon { display: none; }
    .detail { order: -1; margin-bottom: 12px; }
    .list { order: 1; }
  }

.card.starred::after {
  content: "⭐";
  position: absolute;
  top: 6px;
  right: 6px;
  font-size: 16px;
}
.card { position: relative; }


.need-summary {
  margin: 12px 0 18px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255,255,255,.02);
}
.need-summary h3 {
  margin: 0 0 10px;
  font-size: 15px;
}
.need-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.need-box {
  background: rgba(255,255,255,.03);
  border: 1px solid rgba(255,255,255,.06);
  border-radius: 14px;
  padding: 12px;
}
.need-box-title {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 8px;
}
.need-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.need-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 10px;
  border-radius: 999px;
  background: var(--panel);
  border: 1px solid var(--line);
  font-size: 12px;
  line-height: 1.2;
}
.need-tag img {
  width: 16px;
  height: 16px;
  border-radius: 4px;
  object-fit: cover;
  border: 1px solid rgba(148,163,184,.35);
  background: rgba(15,23,42,.65);
}
.need-empty {
  color: var(--muted);
  font-size: 13px;
}
@media (max-width: 900px) {
  .need-grid { grid-template-columns: 1fr; }
}


.profit-info {
  margin: 12px 0 18px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(119,167,255,.06);
}
.profit-info h3 {
  margin: 0 0 8px;
  font-size: 15px;
}
.profit-info .desc {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}
