/* ═══════════════════════════════════════════════════════════════
   Create Guide wizard — /create
   3-step flow: source → layout → configure
   ═══════════════════════════════════════════════════════════════ */

:root,
html.dark {
    --gc-bg:           #0f1117;
    --gc-surface:      #181c25;
    --gc-surface-hov:  #1f2430;
    --gc-border:       rgba(255,255,255,.1);
    --gc-text:         #f0f0f0;
    --gc-text-sub:     rgba(255,255,255,.65);
    --gc-muted:        rgba(255,255,255,.4);
    --gc-input-bg:     rgba(255,255,255,.04);
    --gc-accent:       #E05A2B;
    --gc-accent-soft:  rgba(224,90,43,.14);
    --gc-shadow:       rgba(0,0,0,.45);
}
html:not(.dark) {
    --gc-bg:           #f7f7f5;
    --gc-surface:      #fff;
    --gc-surface-hov:  #fafafa;
    --gc-border:       rgba(0,0,0,.08);
    --gc-text:         #111;
    --gc-text-sub:     #444;
    --gc-muted:        #888;
    --gc-input-bg:     #fff;
    --gc-accent:       #E05A2B;
    --gc-accent-soft:  rgba(224,90,43,.1);
    --gc-shadow:       rgba(0,0,0,.08);
}

.gc-page {
    min-height: 100vh;
    background: var(--gc-bg);
    color: var(--gc-text);
    padding: 1.5rem 1rem 4rem;
    display: flex;
    justify-content: center;
}

.gc-shell {
    width: 100%;
    max-width: 560px;
    padding: 1.5rem;
    border-radius: 16px;
    background: var(--gc-surface);
    border: 1px solid var(--gc-border);
    box-shadow: 0 8px 32px var(--gc-shadow);
    margin-top: 1rem;
}

/* ── Progress dots ──────────────────────────────────────────── */
.gc-progress {
    display: flex;
    gap: 6px;
    justify-content: center;
    margin-bottom: 1.5rem;
}
.gc-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--gc-border);
    transition: background .25s, width .25s;
}
.gc-dot.active {
    background: var(--gc-accent);
    width: 22px;
    border-radius: 4px;
}

/* ── Step containers ────────────────────────────────────────── */
.gc-step { display: none; }
.gc-step.active {
    display: block;
    animation: gc-fadein .25s ease-out;
}
@keyframes gc-fadein {
    from { opacity: 0; transform: translateY(6px); }
    to   { opacity: 1; transform: translateY(0); }
}

.gc-title {
    font-size: 1.4rem;
    font-weight: 700;
    text-align: center;
    margin: 0 0 0.4rem;
    letter-spacing: -0.015em;
}
.gc-subtitle {
    text-align: center;
    color: var(--gc-text-sub);
    font-size: 0.85rem;
    margin: 0 0 1.5rem;
}

/* ═══════════════════════════════════════════════════════════════
   STEP 1 — Source cards (vertical list)
   ═══════════════════════════════════════════════════════════════ */
.gc-source-list {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.gc-source-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    width: 100%;
    padding: 1rem 1.1rem;
    background: var(--gc-input-bg);
    border: 1px solid var(--gc-border);
    border-radius: 12px;
    cursor: pointer;
    text-align: left;
    color: inherit;
    transition: border-color .18s, background .18s, transform .18s;
}
.gc-source-card:hover {
    border-color: var(--gc-accent);
    background: var(--gc-accent-soft);
    transform: translateY(-1px);
}
.gc-source-text { flex: 1; min-width: 0; }
.gc-source-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--gc-text);
    margin-bottom: 0.1rem;
}
.gc-source-desc {
    font-size: 0.78rem;
    color: var(--gc-text-sub);
    line-height: 1.4;
}
.gc-source-icon {
    color: var(--gc-muted);
    flex-shrink: 0;
}
.gc-source-card:hover .gc-source-icon { color: var(--gc-accent); }
.gc-source-card[data-comingsoon] { opacity: 0.85; }

/* ═══════════════════════════════════════════════════════════════
   STEP 2 — Layout cards
   ═══════════════════════════════════════════════════════════════ */
.gc-layout-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

.gc-layout-card {
    display: flex;
    flex-direction: column;
    background: transparent;
    border: 2px solid var(--gc-border);
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    color: inherit;
    padding: 0;
    transition: border-color .18s, transform .18s;
}
.gc-layout-card:hover { transform: translateY(-2px); }
.gc-layout-card.active {
    border-color: var(--gc-accent);
    box-shadow: 0 0 0 4px var(--gc-accent-soft);
}

.gc-layout-preview {
    height: 130px;
    background: var(--gc-input-bg);
    border-bottom: 1px solid var(--gc-border);
    overflow: hidden;
    display: flex;
}
.gc-preview-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    width: 100%;
    height: 100%;
}
.gc-preview-content {
    background: linear-gradient(135deg, #6b88e0 0%, #4f6ec5 100%);
    position: relative;
}
.gc-preview-content::after {
    content: '';
    position: absolute;
    inset: 8px;
    border-radius: 4px;
    background: linear-gradient(180deg, transparent 60%, rgba(0,0,0,.35) 100%);
}
.gc-preview-map {
    background: #c9e4d6;
    background-image:
        linear-gradient(45deg, rgba(255,255,255,.4) 25%, transparent 25%),
        linear-gradient(-45deg, rgba(255,255,255,.4) 25%, transparent 25%);
    background-size: 14px 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(0,0,0,.35);
}
.gc-preview-full {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #b8d99c 0%, #82b87a 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(0,0,0,.35);
}

.gc-layout-label {
    text-align: center;
    padding: 0.6rem 0.4rem;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--gc-text);
}

/* ═══════════════════════════════════════════════════════════════
   STEP 3 — Configure form
   ═══════════════════════════════════════════════════════════════ */
.gc-form {
    display: flex;
    flex-direction: column;
    gap: 1.1rem;
    margin-bottom: 1.4rem;
}
.gc-field {
    display: block;
}
.gc-field-label {
    display: block;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--gc-text);
    margin-bottom: 0.4rem;
}
.gc-input {
    width: 100%;
    padding: 0.65rem 0.9rem;
    border-radius: 10px;
    border: 1px solid var(--gc-border);
    background: var(--gc-input-bg);
    color: var(--gc-text);
    font-size: 0.9rem;
    transition: border-color .18s, box-shadow .18s;
}
.gc-input::placeholder { color: var(--gc-muted); }
.gc-input:focus {
    outline: none;
    border-color: var(--gc-accent);
    box-shadow: 0 0 0 3px var(--gc-accent-soft);
}

/* Template grid */
.gc-template-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
}
.gc-template-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
    padding: 0.85rem 0.5rem;
    border-radius: 10px;
    border: 2px solid var(--gc-border);
    background: transparent;
    cursor: pointer;
    color: var(--gc-text-sub);
    transition: border-color .18s, color .18s, background .18s;
}
.gc-template-card:hover {
    color: var(--gc-text);
    background: var(--gc-input-bg);
}
.gc-template-card.active {
    border-color: var(--gc-accent);
    color: var(--gc-accent);
    background: var(--gc-accent-soft);
}
.gc-template-icon {
    display: flex;
    align-items: center;
    justify-content: center;
}
.gc-template-label {
    font-size: 0.78rem;
    font-weight: 600;
}

/* ── Step actions ───────────────────────────────────────────── */
.gc-step-actions {
    display: flex;
    justify-content: space-between;
    gap: 0.5rem;
    margin-top: 0.5rem;
}
.gc-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.55rem 1.25rem;
    border-radius: 999px;
    border: 1px solid var(--gc-border);
    background: transparent;
    color: var(--gc-text-sub);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: background .18s, color .18s, border-color .18s;
}
.gc-btn-back:hover {
    background: var(--gc-input-bg);
    color: var(--gc-text);
}
.gc-btn-next,
.gc-btn-primary {
    background: var(--gc-accent);
    border-color: var(--gc-accent);
    color: #fff;
}
.gc-btn-next:hover,
.gc-btn-primary:hover {
    background: #c84d23;
    border-color: #c84d23;
}
.gc-btn-primary:disabled {
    opacity: .6;
    cursor: not-allowed;
}

/* ── Auth gate ──────────────────────────────────────────────── */
.gc-auth-gate {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.6);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 60;
    padding: 1rem;
}
.gc-auth-gate.hidden { display: none; }
.gc-auth-card {
    background: var(--gc-surface);
    border: 1px solid var(--gc-border);
    border-radius: 14px;
    padding: 1.5rem;
    max-width: 360px;
    text-align: center;
    box-shadow: 0 12px 40px var(--gc-shadow);
}
.gc-auth-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--gc-text);
    margin-bottom: 0.4rem;
}
.gc-auth-sub {
    font-size: 0.85rem;
    color: var(--gc-text-sub);
    margin-bottom: 1.1rem;
    line-height: 1.5;
}
.gc-auth-card .gc-btn-primary {
    text-decoration: none;
    display: inline-block;
}

/* ── Toast ──────────────────────────────────────────────────── */
.gp-toast-container {
    position: fixed;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 70;
    pointer-events: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: center;
}
.gp-toast {
    background: var(--gc-surface);
    border: 1px solid var(--gc-border);
    color: var(--gc-text);
    border-radius: 10px;
    padding: 0.6rem 1rem;
    font-size: 0.82rem;
    box-shadow: 0 4px 20px var(--gc-shadow);
    opacity: 0;
    transform: translateY(8px);
    transition: opacity .3s, transform .3s;
    max-width: 340px;
    pointer-events: all;
}
.gp-toast.visible { opacity: 1; transform: translateY(0); }

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 600px) {
    .gc-page { padding: 1rem 0.75rem 4rem; }
    .gc-shell { padding: 1.25rem 1rem; border-radius: 12px; }
    .gc-title { font-size: 1.15rem; }
    .gc-layout-preview { height: 110px; }
    .gc-template-row { gap: 0.4rem; }
    .gc-template-card { padding: 0.7rem 0.3rem; }
    .gc-template-label { font-size: 0.72rem; }
}
