/* === Tapping page === */

.source-note {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin: -20px 0 32px;
    padding: 12px 16px;
    background: #fdf9f3;
    border: 1px solid var(--border-light);
    border-radius: 10px;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.source-note a {
    color: var(--accent-color);
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
}

.visual-grid {
    display: grid;
    grid-template-columns: minmax(180px, 0.8fr) minmax(220px, 1.2fr);
    gap: 20px;
    margin: 28px 0;
}

.tapping-figure {
    margin: 0;
    background: #fff;
    border: 1px solid var(--border-light);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.tapping-map {
    position: relative;
    width: 100%;
    background: #fff;
}

.tapping-map img {
    display: block;
    width: 100%;
    height: auto;
    background: #fff;
}

.torso-map {
    height: 420px;
    overflow: hidden;
    background: #050505;
}

.torso-map img {
    height: 100%;
    object-fit: cover;
    object-position: center bottom;
}

.tapping-figure--dark .tapping-map,
.tapping-figure--dark .tapping-map img {
    background: #050505;
}

.map-marker {
    position: absolute;
    left: var(--x);
    top: var(--y);
    z-index: 2;
    transform: translate(-50%, -50%);
    pointer-events: none;
}

.map-marker b {
    width: 28px;
    height: 28px;
    display: grid;
    place-items: center;
    background: #a64f6a;
    color: #fff;
    border: 2px solid #fff;
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(26, 26, 46, 0.24);
    font-size: 0.78rem;
    font-weight: 800;
    font-style: normal;
}

.map-legend {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px 10px;
    list-style: none;
    margin: 0;
    padding: 14px;
    background: #fff;
    border-top: 1px solid var(--border-light);
}

.map-legend li {
    display: grid;
    grid-template-columns: 28px minmax(0, 1fr);
    gap: 8px;
    align-items: start;
    margin: 0;
    color: var(--text-secondary);
    font-size: 0.82rem;
    line-height: 1.35;
}

.map-legend b {
    width: 22px;
    height: 22px;
    display: grid;
    place-items: center;
    background: #a64f6a;
    color: #fff;
    border-radius: 50%;
    font-size: 0.68rem;
    line-height: 1;
}

.map-legend--hand {
    grid-template-columns: 1fr;
}

.tapping-figure figcaption {
    padding: 12px 14px;
    color: var(--text-secondary);
    font-size: 0.85rem;
    line-height: 1.5;
    border-top: 1px solid var(--border-light);
}

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

.point-card {
    position: relative;
    padding: 20px 20px 18px;
    background: #faf7f1;
    border: 1px solid var(--border-light);
    border-radius: 10px;
    overflow: hidden;
}

.point-card h3 {
    margin: 0 0 8px;
    padding-right: 44px;
    font-size: 1.1rem;
}

.point-card p {
    margin: 0;
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.65;
}

.point-number {
    position: absolute;
    top: 14px;
    right: 16px;
    color: var(--accent-color);
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.08em;
}

.hand-layout {
    display: grid;
    grid-template-columns: minmax(220px, 0.85fr) minmax(260px, 1.15fr);
    gap: 24px;
    align-items: start;
    margin-top: 24px;
}

.hand-points {
    display: grid;
    gap: 12px;
}

.hand-points div {
    padding: 15px 16px;
    background: #faf7f1;
    border: 1px solid var(--border-light);
    border-left: 4px solid var(--accent-color);
    border-radius: 8px;
}

.hand-points strong {
    display: block;
    color: var(--primary-color);
    font-size: 0.98rem;
}

.hand-points span {
    display: block;
    margin-top: 4px;
    color: var(--text-secondary);
    font-size: 0.92rem;
    line-height: 1.45;
}

.gamma-grid {
    display: grid;
    grid-template-columns: minmax(220px, 0.8fr) minmax(280px, 1.2fr);
    gap: 22px;
    align-items: start;
}

.step-list {
    counter-reset: gamma;
    list-style: none;
    padding: 0;
    margin: 0;
}

.step-list li {
    position: relative;
    padding: 14px 16px 14px 44px;
    margin-bottom: 10px;
    background: #fff;
    border: 1px solid var(--border-light);
    border-radius: 8px;
    color: var(--text-secondary);
    line-height: 1.55;
}

.step-list li::before {
    counter-increment: gamma;
    content: counter(gamma);
    position: absolute;
    left: 14px;
    top: 14px;
    width: 20px;
    height: 20px;
    display: grid;
    place-items: center;
    background: var(--accent-color);
    color: #fff;
    border-radius: 50%;
    font-size: 0.72rem;
    font-weight: 700;
}

.sequence-list {
    display: grid;
    gap: 18px;
}

.sequence-list article {
    position: relative;
    padding: 24px 24px 22px 74px;
    background: #faf7f1;
    border: 1px solid var(--border-light);
    border-radius: 12px;
}

.sequence-list article > span {
    position: absolute;
    top: 22px;
    left: 22px;
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    background: var(--primary-color);
    color: #fff;
    border-radius: 50%;
    font-weight: 700;
}

.sequence-list h3 {
    margin-bottom: 8px;
}

.sequence-list p {
    margin: 0 0 10px;
    color: var(--text-secondary);
    line-height: 1.65;
}

.breath-pattern {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 10px;
    align-items: center;
    margin: 14px 0;
    padding: 12px 14px;
    background: #fff;
    border: 1px solid var(--border-light);
    border-radius: 8px;
    color: var(--text-secondary);
    font-size: 0.94rem;
}

.breath-pattern b {
    color: var(--accent-color);
}

.example-line {
    font-family: var(--heading-font);
    font-style: italic;
    color: var(--primary-color) !important;
}

[data-theme="dark"] .source-note,
[data-theme="dark"] .point-card,
[data-theme="dark"] .hand-points div,
[data-theme="dark"] .sequence-list article {
    background: #1e1e28;
}

[data-theme="dark"] .tapping-figure,
[data-theme="dark"] .step-list li,
[data-theme="dark"] .breath-pattern {
    background: #1a1a24;
}

[data-theme="dark"] .tapping-map,
[data-theme="dark"] .tapping-map img {
    background: #f6f6f6;
}

[data-theme="dark"] .tapping-figure--dark .tapping-map,
[data-theme="dark"] .tapping-figure--dark .tapping-map img {
    background: #050505;
}

[data-theme="dark"] .map-legend {
    background: #1a1a24;
}

@media (max-width: 760px) {
    .source-note,
    .visual-grid,
    .hand-layout,
    .gamma-grid {
        grid-template-columns: 1fr;
    }

    .source-note {
        display: grid;
    }

    .point-grid {
        grid-template-columns: 1fr;
    }

    .torso-map {
        height: 340px;
    }

    .map-marker b {
        width: 24px;
        height: 24px;
        font-size: 0.68rem;
    }

    .map-legend {
        grid-template-columns: 1fr;
    }

    .sequence-list article {
        padding: 68px 18px 18px;
    }

    .sequence-list article > span {
        top: 18px;
        left: 18px;
    }
}
