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

html {
    min-height: 100%;
    background: #f5f6f8;
}

body {
    width: min(560px, 100%);
    min-height: 100vh;
    margin: 0 auto;
    background: #fff;
    color: #1a1a1a;
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC", "Microsoft YaHei", sans-serif;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

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

button,
textarea {
    font: inherit;
}

.back-btn {
    height: 30px;
    min-width: 70px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    position: fixed;
    top: 12px;
    left: calc(50% - min(280px, 50%) + 12px);
    z-index: 30;
    padding: 0 12px;
    border: 1px solid rgba(229, 231, 235, .9);
    border-radius: 40px;
    background: rgba(255, 255, 255, .95);
    color: #374151;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .08);
    font-size: 12px;
}

.back-btn span {
    font-size: 18px;
    line-height: 1;
}

.teach-container {
    padding: 18px 16px 28px;
}

.teach-header {
    padding: 0 0 22px;
    border-bottom: 2px solid #e5e7eb;
    text-align: center;
}

.teach-header h1 {
    color: #172033;
    font-size: 30px;
    font-weight: 900;
    line-height: 1.2;
}

.teach-header p {
    margin-top: 5px;
    color: #6b7280;
    font-size: 14px;
}

.teach-card {
    margin-top: 40px;
    overflow: hidden;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    background: #fff;
}

.card-title {
    min-height: 48px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-bottom: 1px solid #e5e7eb;
    background: linear-gradient(180deg, #fbfcff 0%, #f8fafc 100%);
}

.card-title span {
    min-width: 48px;
    padding: 4px 10px;
    border-radius: 999px;
    background: #111827;
    color: #fff;
    font-size: 11px;
    font-weight: 800;
    text-align: center;
}

.card-title strong {
    color: #111827;
    font-size: 16px;
    font-weight: 800;
}

.card-body {
    padding: 16px;
}

.lead {
    margin-bottom: 14px;
    color: #111827;
    font-size: 16px;
}

.media-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.shot-card {
    min-width: 0;
    overflow: hidden;
    position: relative;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    background: #f3f4f6;
    cursor: pointer;
    text-align: left;
}

.demo-shot {
    height: 170px;
    display: block;
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(circle at 30% 28%, rgba(255, 255, 255, .72), transparent 26%),
        linear-gradient(135deg, #94a3b8, #111827 66%);
}

.demo-shot::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(12deg, rgba(255, 255, 255, .12) 0 18%, transparent 19% 100%),
        repeating-linear-gradient(90deg, rgba(255,255,255,.08) 0 1px, transparent 1px 28px);
    opacity: .85;
}

.demo-shot.has-image {
    background: #eef2f7;
}

.demo-shot.has-image::before {
    display: none;
}

.demo-shot img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

.demo-shot.gold {
    background: linear-gradient(135deg, #d9b15f, #64748b 45%, #111827);
}

.demo-shot.blue {
    background: linear-gradient(135deg, #68b6ff, #475569 45%, #111827);
}

.demo-shot.green {
    background: linear-gradient(135deg, #34d399, #64748b 42%, #111827);
}

.demo-scene,
.form-demo {
    width: 76%;
    min-height: 70px;
    display: grid;
    place-items: center;
    position: absolute;
    top: 52px;
    left: 12%;
    z-index: 1;
    border-radius: 4px;
    background: rgba(255, 255, 255, .78);
    box-shadow: 0 6px 24px rgba(0,0,0,.25);
}

.demo-label {
    color: #e11d48;
    font-size: 16px;
    font-weight: 900;
    text-shadow: 0 1px 0 #fff;
}

.demo-arrow {
    width: 42px;
    height: 2px;
    position: absolute;
    right: 26px;
    bottom: 18px;
    transform: rotate(50deg);
    background: #ef4444;
}

.demo-arrow::after {
    content: "";
    position: absolute;
    right: -2px;
    top: -4px;
    border: 5px solid transparent;
    border-left-color: #ef4444;
}

.form-demo {
    align-items: stretch;
    padding: 12px;
    gap: 8px;
}

.form-demo span {
    display: block;
    border-radius: 8px;
    background: #e5e7eb;
}

.form-demo span:nth-child(2) {
    background: #dbeafe;
}

.form-demo span:nth-child(3) {
    background: #2563eb;
}

.shot-mark {
    position: absolute;
    left: 8px;
    bottom: 38px;
    z-index: 2;
    padding: 3px 8px;
    border-radius: 4px;
    background: rgba(31, 41, 55, .82);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
}

.shot-title {
    min-height: 37px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
    color: #4b5563;
    background: #f9fafb;
    font-size: 12px;
}

.scan-link {
    display: inline-block;
    margin: 4px 0 14px;
    color: #007bff;
    font-size: 15px;
}

.mini-steps {
    margin: 0 0 12px 18px;
    color: #111827;
    font-size: 15px;
}

.mini-steps li {
    margin: 5px 0;
}

.mini-steps b {
    margin-right: 10px;
}

.note {
    margin: 12px 0 14px;
    color: #4b5563;
    font-size: 14px;
}

.teach-footer {
    padding: 24px 0 0;
    color: #9ca3af;
    text-align: center;
    font-size: 13px;
}

.lightbox {
    position: fixed;
    inset: 0;
    z-index: 80;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 22px;
    background: rgba(0, 0, 0, .9);
}

.lightbox.show {
    display: flex;
}

.lightbox-close {
    width: 38px;
    height: 38px;
    position: fixed;
    top: 18px;
    right: 18px;
    border: 0;
    border-radius: 50%;
    background: rgba(255,255,255,.16);
    color: #fff;
    cursor: pointer;
    font-size: 28px;
    line-height: 1;
}

.lightbox-panel {
    width: min(520px, 100%);
    color: #fff;
    text-align: center;
}

.lightbox-demo {
    height: min(62vh, 440px);
    overflow: hidden;
    border-radius: 12px;
    background: linear-gradient(135deg, #94a3b8, #111827);
    background-position: center;
    background-size: contain;
    background-repeat: no-repeat;
}

.lightbox-panel p {
    margin-top: 14px;
    font-size: 15px;
}

@media (max-width: 480px) {
    .teach-container {
        padding: 18px 16px 24px;
    }

    .teach-header h1 {
        font-size: 26px;
    }

    .teach-card {
        margin-top: 38px;
    }

    .card-body {
        padding: 15px;
    }

    .media-grid {
        gap: 12px;
    }

    .demo-shot {
        height: 138px;
    }

    .demo-label {
        font-size: 13px;
    }

    .demo-scene,
    .form-demo {
        top: 42px;
        min-height: 58px;
    }
}
