/* MastersGuild brand tokens */
:root {
    --mg-primary: #752b03;
    --mg-dark: #1a1a2e;
    --mg-text: #333333;
    --mg-text-light: #888888;
    --mg-bg: #ffffff;
    --mg-border: #e5e5e5;
    --mg-card-width: 280px;
    --mg-card-gap: 16px;
}

/* Container */
.mg-quests-container {
    overflow: hidden;
    position: relative;
    padding: 16px 0;
}

/* Track (horizontal scroll) */
.mg-quests-track {
    display: flex;
    gap: var(--mg-card-gap);
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding: 8px 4px;
}
.mg-quests-track::-webkit-scrollbar { display: none; }

/* Quest card */
.mg-quest-card {
    flex: 0 0 var(--mg-card-width);
    scroll-snap-align: start;
    background: var(--mg-bg);
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
}
.mg-quest-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.12);
}

/* Photo */
.mg-quest-photo {
    height: 140px;
    background-size: cover;
    background-position: center;
    background-color: #f0f0f0;
}
.mg-quest-photo--placeholder {
    background: linear-gradient(135deg, var(--mg-dark) 0%, var(--mg-primary) 100%);
}

/* Body */
.mg-quest-body { padding: 12px 16px 16px; }
.mg-quest-category {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--mg-primary);
    font-weight: 600;
}
.mg-quest-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--mg-text);
    margin: 4px 0 8px;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.mg-quest-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}
.mg-quest-amount {
    font-size: 18px;
    font-weight: 700;
    color: var(--mg-primary);
}
.mg-quest-location {
    font-size: 12px;
    color: var(--mg-text-light);
    text-align: right;
    max-width: 60%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* CTA button */
.mg-quest-cta {
    display: block;
    text-align: center;
    padding: 10px;
    background: var(--mg-primary);
    color: #ffffff;
    text-decoration: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    transition: background 0.2s;
}
.mg-quest-cta:hover {
    background: #5c2202;
    color: #ffffff;
}

/* Grid style */
.mg-style-grid .mg-quests-track {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(var(--mg-card-width), 1fr));
    overflow-x: visible;
}

/* List style */
.mg-style-list .mg-quests-track {
    flex-direction: column;
}
.mg-style-list .mg-quest-card {
    flex: 0 0 auto;
    display: flex;
    flex-direction: row;
}
.mg-style-list .mg-quest-photo {
    width: 120px;
    height: auto;
    min-height: 100px;
}

/* Empty state */
.mg-quests-empty {
    text-align: center;
    padding: 40px 20px;
    color: var(--mg-text-light);
    font-size: 14px;
}

/* Responsive */
@media (max-width: 640px) {
    .mg-quest-card { flex: 0 0 calc(100vw - 48px); }
}
