:root {
    --bg: #0f0b1f;
    --bg-elev-1: #171031;
    --bg-elev-2: #21174a;
    --bg-elev-3: #2f2370;
    --line: #42378b;
    --line-strong: #7a6dcb;
    --text: #f7f4ff;
    --text-muted: #bdb5e8;
    --accent-mint: #53ffc6;
    --accent-cyan: #63d7ff;
    --accent-gold: #ffe478;
    --accent-pink: #ff73be;
    --danger: #ff8f97;
    --shadow-lg: 0 22px 60px rgba(5, 5, 18, 0.55);
    --shadow-md: 0 14px 34px rgba(5, 5, 18, 0.45);
    --font-pixel: 'Press Start 2P', monospace;
    --font-retro: 'VT323', monospace;
    --font-body: 'Noto Sans SC', sans-serif;
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    background: radial-gradient(circle at 10% -10%, #2b1966 0%, rgba(43, 25, 102, 0) 45%),
                radial-gradient(circle at 90% 10%, #2b4e88 0%, rgba(43, 78, 136, 0) 42%),
                var(--bg);
    color: var(--text);
    font-family: var(--font-body);
    line-height: 1.7;
}

.bg-layer {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: -2;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px);
    background-size: 24px 24px;
    mask-image: radial-gradient(circle at 50% 35%, black 0%, transparent 75%);
}

.skip-link {
    position: absolute;
    left: -9999px;
    top: 10px;
    z-index: 999;
    padding: 8px 12px;
    background: var(--accent-mint);
    color: #0e0720;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 700;
}

.skip-link:focus {
    left: 10px;
}

.site-shell {
    width: min(1120px, calc(100% - 28px));
    margin: 16px auto 28px;
    border: 4px solid var(--line-strong);
    background: linear-gradient(180deg, rgba(12, 9, 26, 0.95) 0%, rgba(14, 10, 31, 0.96) 100%);
    box-shadow: var(--shadow-lg);
    position: relative;
    overflow: clip;
}

.site-shell::before {
    content: '';
    position: absolute;
    inset: 0;
    border: 6px solid rgba(34, 24, 77, 0.9);
    pointer-events: none;
}

.hero {
    position: relative;
    padding: 34px clamp(18px, 3vw, 34px) 28px;
    border-bottom: 4px solid var(--line);
    overflow: hidden;
}

.hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(130deg, rgba(83, 255, 198, 0.1) 0%, rgba(99, 215, 255, 0.05) 35%, rgba(255, 115, 190, 0.08) 100%);
    pointer-events: none;
}

.hero-noise {
    position: absolute;
    inset: 0;
    opacity: 0.28;
    background-image: radial-gradient(rgba(255, 255, 255, 0.5) 0.7px, transparent 0.9px);
    background-size: 6px 6px;
    mix-blend-mode: overlay;
    pointer-events: none;
}

.hero-inner {
    position: relative;
    z-index: 1;
    display: grid;
    gap: 24px;
    grid-template-columns: minmax(0, 1.15fr) minmax(300px, 0.85fr);
    align-items: stretch;
}

.hero-kicker {
    margin: 0 0 18px;
    color: var(--accent-cyan);
    font-family: var(--font-pixel);
    font-size: clamp(9px, 1.5vw, 11px);
    letter-spacing: 1px;
    text-transform: uppercase;
}

.hero-title {
    margin: 0;
    color: var(--accent-mint);
    font-family: var(--font-pixel);
    font-size: clamp(21px, 4.3vw, 42px);
    line-height: 1.5;
    text-shadow: 4px 4px 0 rgba(2, 25, 13, 0.65);
}

.hero-subtitle {
    margin: 14px 0 6px;
    color: var(--accent-gold);
    font-family: var(--font-retro);
    font-size: clamp(25px, 3.8vw, 38px);
    letter-spacing: 1px;
}

.hero-desc {
    margin: 0;
    max-width: 60ch;
    color: var(--text-muted);
    font-size: clamp(14px, 2vw, 17px);
}

.hero-actions {
    margin-top: 20px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.btn {
    text-decoration: none;
    border: 2px solid;
    padding: 11px 14px;
    font-family: var(--font-pixel);
    font-size: 10px;
    text-transform: uppercase;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn:hover {
    transform: translate(-1px, -1px);
    box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.35);
}

.btn-primary {
    color: #081016;
    background: var(--accent-mint);
    border-color: var(--accent-mint);
}

.btn-ghost {
    color: var(--text);
    background: rgba(103, 90, 196, 0.16);
    border-color: var(--line-strong);
}

.hero-panel {
    background: linear-gradient(145deg, rgba(27, 19, 59, 0.82) 0%, rgba(20, 14, 46, 0.88) 100%);
    border: 3px solid var(--line);
    padding: 16px;
    box-shadow: var(--shadow-md);
}

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

.stat-card {
    border: 2px solid rgba(122, 109, 203, 0.65);
    background: rgba(103, 90, 196, 0.12);
    padding: 13px 10px;
    text-align: center;
}

.stat-value {
    display: block;
    margin-bottom: 4px;
    color: var(--accent-gold);
    font-family: var(--font-pixel);
    font-size: clamp(14px, 2.4vw, 17px);
}

.stat-name {
    display: block;
    color: var(--text-muted);
    font-family: var(--font-retro);
    font-size: 20px;
    line-height: 1.15;
}

.top-nav {
    position: sticky;
    top: 0;
    z-index: 25;
    border-top: 1px solid rgba(255, 255, 255, 0.04);
    border-bottom: 3px solid var(--line);
    background: rgba(18, 13, 43, 0.9);
    backdrop-filter: blur(8px);
}

.nav-track {
    display: flex;
    gap: 8px;
    align-items: center;
    overflow-x: auto;
    padding: 10px clamp(12px, 3vw, 24px);
    scrollbar-width: none;
}

.nav-track::-webkit-scrollbar {
    display: none;
}

.nav-link {
    text-decoration: none;
    white-space: nowrap;
    border: 2px solid transparent;
    color: var(--text-muted);
    font-family: var(--font-pixel);
    font-size: 9px;
    padding: 8px 10px;
    transition: all 0.2s ease;
}

.nav-link:hover,
.nav-link:focus-visible,
.nav-link.is-active {
    color: var(--accent-mint);
    border-color: var(--accent-mint);
    background: rgba(83, 255, 198, 0.08);
    outline: none;
}

.nav-link-github {
    margin-left: auto;
    color: var(--accent-cyan);
    border-color: rgba(99, 215, 255, 0.45);
    background: rgba(99, 215, 255, 0.1);
}

.nav-link-github:hover,
.nav-link-github:focus-visible {
    color: #04131a;
    border-color: var(--accent-cyan);
    background: var(--accent-cyan);
}

.content {
    padding: clamp(18px, 3vw, 30px);
}

.usage-section {
    padding: 0 clamp(12px, 3vw, 24px);
}

.usage-section-top {
    margin: 14px 0 10px;
}

.usage-section-bottom {
    margin: 6px 0 10px;
}

.usage-card {
    border: 3px solid rgba(122, 109, 203, 0.7);
    background: linear-gradient(160deg, rgba(35, 26, 75, 0.86) 0%, rgba(19, 14, 45, 0.9) 100%);
    box-shadow: var(--shadow-md);
    padding: 14px;
}

.usage-title {
    margin: 0 0 10px;
    color: var(--accent-gold);
    font-family: var(--font-pixel);
    font-size: clamp(10px, 1.8vw, 13px);
}

.usage-desc {
    margin: 0 0 8px;
    color: var(--text-muted);
    font-family: var(--font-retro);
    font-size: 22px;
}

.usage-list {
    margin: 0;
    padding-left: 18px;
    color: var(--text-muted);
}

.usage-list li {
    margin: 6px 0;
    font-size: 14px;
    line-height: 1.6;
}

.usage-list a {
    color: var(--accent-cyan);
    word-break: break-all;
}

.usage-list a:hover {
    color: var(--accent-mint);
}

.section {
    margin-bottom: clamp(24px, 4vw, 42px);
    scroll-margin-top: 84px;
}

.section-head {
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.section-title {
    margin: 0;
    font-family: var(--font-pixel);
    color: var(--accent-mint);
    font-size: clamp(12px, 2.2vw, 18px);
    letter-spacing: 0.5px;
}

.prompt-board-section {
    background: #dcdcdc;
    border: 4px solid #111;
    box-shadow: 8px 8px 0 rgba(0, 0, 0, 0.5);
    padding: 16px;
}

.prompt-board-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    border-bottom: 3px solid #111;
    padding-bottom: 10px;
    margin-bottom: 12px;
}

.prompt-board-title {
    margin: 0;
    color: #111;
    font-size: clamp(18px, 3vw, 34px);
    font-weight: 900;
}

.prompt-board-head-right {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.prompt-board-search-wrap {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: 3px solid #111;
    padding: 8px 10px;
    background: #fff;
}

.prompt-board-search-icon {
    color: #111;
    font-size: 16px;
    line-height: 1;
}

.prompt-board-search {
    border: 0;
    outline: none;
    width: min(280px, 52vw);
    font-size: 14px;
    background: transparent;
    color: #222;
}

.prompt-board-total {
    border: 3px solid #111;
    background: #f2e35d;
    color: #111;
    font-family: var(--font-pixel);
    font-size: 12px;
    padding: 10px 12px;
}

.prompt-board-filter-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    border-bottom: 2px solid #bfbfbf;
    padding-bottom: 12px;
    margin-bottom: 12px;
}

.prompt-board-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.prompt-board-filter-btn {
    border: 3px solid #111;
    background: #f4f4f4;
    color: #293043;
    font-size: 14px;
    font-weight: 700;
    padding: 8px 10px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.prompt-board-filter-btn:hover,
.prompt-board-filter-btn:focus-visible {
    transform: translate(-1px, -1px);
}

.prompt-board-filter-btn.is-active {
    background: #f2e35d;
    color: #111;
}

.prompt-board-clear {
    border: 3px solid #111;
    background: #efefef;
    color: #4a5568;
    font-size: 14px;
    font-weight: 700;
    padding: 8px 12px;
    cursor: pointer;
}

.prompt-board-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.prompt-item-card {
    position: relative;
    border: 4px solid #111;
    background: #ededed;
    color: #111;
    padding: 14px;
}

.prompt-item-badge {
    position: absolute;
    top: -16px;
    right: 10px;
    padding: 4px 10px;
    border: 3px solid #111;
    background: #f2e35d;
    font-size: 12px;
    font-weight: 900;
    transform: rotate(6deg);
}

.prompt-item-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    color: #5c6473;
    font-size: 13px;
    font-weight: 700;
    border-bottom: 2px solid #cacaca;
    padding-bottom: 8px;
}

.prompt-item-title {
    margin: 12px 0 12px;
    font-size: 24px;
    line-height: 1.25;
    font-weight: 900;
}

.prompt-item-image {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border: 4px solid #111;
    background: #fff;
    display: block;
}

.prompt-item-image-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    font-weight: 700;
}

.prompt-item-desc {
    margin: 12px 0 14px;
    color: #1f2937;
    font-size: 14px;
    line-height: 1.65;
}

.prompt-item-code-box {
    border: 3px solid #111;
    background: #f8f8f8;
}

.prompt-item-code-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 6px 10px;
    background: #111;
    color: #fff;
    font-size: 13px;
    font-weight: 700;
}

.prompt-item-copy {
    border: 2px solid #fff;
    background: #fff;
    color: #111;
    padding: 3px 7px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
}

.prompt-item-code-box pre {
    margin: 0;
    padding: 10px;
    max-height: 190px;
    overflow: auto;
    white-space: pre-wrap;
    line-height: 1.5;
    font-size: 13px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    color: #111;
    background: #fafafa;
}

.prompt-board-empty {
    margin: 0;
    padding: 8px 2px;
    color: #49505f;
    font-size: 14px;
    font-weight: 700;
}

.latest-x-shell {
    display: grid;
    gap: 14px;
}

.latest-x-summary {
    margin-top: -4px;
}

.latest-x-content {
    display: grid;
    gap: 16px;
}

.latest-x-group {
    display: grid;
    gap: 12px;
}

.latest-x-group-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
}

.latest-x-group-title {
    margin: 0;
    color: var(--accent-gold);
    font-family: var(--font-retro);
    font-size: 28px;
    line-height: 1.1;
}

.latest-x-group-count {
    min-height: 28px;
}

.latest-x-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.latest-x-card {
    background: #f0f0f0;
}

.latest-x-title {
    font-size: 20px;
}

.latest-x-stats,
.latest-x-links {
    margin: 10px 0 0;
    color: #3e4757;
    font-size: 13px;
    line-height: 1.6;
}

.latest-x-links a {
    color: #1f4e8c;
    font-weight: 700;
}

.latest-x-links a:hover {
    color: #0d2d57;
}

.overview-grid {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.overview-card {
    border: 2px solid rgba(122, 109, 203, 0.62);
    background: linear-gradient(170deg, rgba(46, 35, 97, 0.45) 0%, rgba(23, 16, 49, 0.85) 80%);
    padding: 16px 14px;
    box-shadow: var(--shadow-md);
}

.overview-card h3 {
    margin: 0 0 8px;
    font-family: var(--font-pixel);
    font-size: 10px;
    color: var(--accent-cyan);
}

.overview-card p {
    margin: 0;
    color: var(--text-muted);
    font-size: 14px;
}

.case-study-shell {
    display: grid;
    gap: 16px;
}

.case-study-intro {
    display: grid;
    gap: 8px;
}

.case-study-kicker {
    margin: 0;
    color: var(--accent-cyan);
    font-family: var(--font-pixel);
    font-size: 9px;
}

.case-study-title {
    margin: 0;
    color: var(--text);
    font-size: clamp(18px, 3vw, 28px);
    line-height: 1.35;
}

.case-study-desc {
    margin: 0;
    color: var(--text-muted);
    font-size: 15px;
}

.case-study-stats {
    margin-top: 2px;
}

.case-study-divider {
    height: 1px;
    border-top: 2px dashed rgba(122, 109, 203, 0.5);
    margin: 6px 0 2px;
}

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

.case-category-card {
    border: 2px solid rgba(122, 109, 203, 0.52);
    background: linear-gradient(170deg, rgba(44, 33, 95, 0.54) 0%, rgba(18, 13, 43, 0.92) 100%);
    padding: 14px;
    box-shadow: var(--shadow-md);
}

.case-category-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 10px;
}

.case-category-tag,
.case-category-index {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    border: 2px solid rgba(122, 109, 203, 0.65);
    background: rgba(99, 215, 255, 0.08);
    color: var(--accent-cyan);
    padding: 0 10px;
    font-family: var(--font-pixel);
    font-size: 8px;
}

.case-category-card h3 {
    margin: 0 0 8px;
    color: var(--accent-mint);
    font-family: var(--font-pixel);
    font-size: 11px;
    line-height: 1.7;
}

.case-category-card p {
    margin: 0 0 12px;
    color: var(--text-muted);
    font-size: 14px;
}

.case-prompt-quote {
    margin: 0 0 14px;
    padding: 10px 12px;
    border-left: 4px solid var(--accent-gold);
    background: rgba(255, 228, 120, 0.08);
    color: var(--text);
    font-size: 14px;
}

.case-gallery-grid {
    display: grid;
    gap: 10px;
    grid-template-columns: 1fr;
}

.case-gallery-grid-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.case-gallery-grid-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.case-gallery-item {
    margin: 0;
}

.case-gallery-item img {
    width: 100%;
    display: block;
    aspect-ratio: 4 / 5;
    object-fit: cover;
    border: 2px solid rgba(122, 109, 203, 0.65);
    background: rgba(9, 6, 22, 0.6);
    box-shadow: var(--shadow-md);
}

.case-gallery-item figcaption {
    margin-top: 6px;
    color: var(--text-muted);
    font-size: 13px;
}

.case-archive-list {
    margin-top: 2px;
}

.case-infer-box {
    display: grid;
    gap: 10px;
    margin-top: 2px;
    padding: 14px;
    border: 2px solid rgba(122, 109, 203, 0.52);
    background: rgba(26, 19, 59, 0.78);
}

.case-infer-title {
    margin: 0;
    color: var(--accent-gold);
    font-family: var(--font-pixel);
    font-size: 10px;
    line-height: 1.7;
}

.case-infer-list {
    margin: 0;
    padding-left: 18px;
    color: var(--text-muted);
}

.case-infer-list li {
    margin: 8px 0;
    font-size: 14px;
}

.case-gallery-details {
    border: 2px solid rgba(122, 109, 203, 0.52);
    background: rgba(32, 24, 69, 0.58);
    padding: 12px;
}

.case-gallery-details summary {
    cursor: pointer;
    color: var(--accent-cyan);
    font-family: var(--font-pixel);
    font-size: 10px;
    list-style: none;
}

.case-gallery-details summary::-webkit-details-marker {
    display: none;
}

.case-full-gallery {
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin-top: 12px;
}

.case-full-gallery-item {
    margin: 0;
    padding: 8px;
    border: 2px solid rgba(122, 109, 203, 0.42);
    background: rgba(18, 13, 43, 0.76);
}

.case-full-gallery-item img {
    width: 100%;
    display: block;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border: 1px solid rgba(122, 109, 203, 0.55);
    background: rgba(9, 6, 22, 0.6);
}

.case-full-gallery-item figcaption {
    margin-top: 6px;
    color: var(--text-muted);
    font-size: 12px;
}

.case-link-list {
    margin: 8px 0 0;
    padding-left: 18px;
    columns: 2;
    column-gap: 18px;
}

.case-link-list li {
    margin: 4px 0;
    break-inside: avoid;
}

.case-link-list a {
    color: var(--accent-cyan);
    text-decoration: none;
}

.case-link-list a:hover {
    color: var(--accent-mint);
}

.readme-raw-link {
    text-decoration: none;
    color: var(--accent-cyan);
    border: 2px solid rgba(99, 215, 255, 0.5);
    background: rgba(99, 215, 255, 0.08);
    padding: 8px 12px;
    font-family: var(--font-pixel);
    font-size: 9px;
    transition: all 0.2s ease;
}

.readme-raw-link:hover,
.readme-raw-link:focus-visible {
    color: #06131f;
    background: var(--accent-cyan);
    border-color: var(--accent-cyan);
    outline: none;
}

.readme-card {
    border: 3px solid var(--line);
    background: linear-gradient(170deg, rgba(37, 27, 82, 0.5) 0%, rgba(18, 13, 43, 0.92) 90%);
    box-shadow: var(--shadow-lg);
    padding: 14px;
}

.readme-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 2px dashed rgba(122, 109, 203, 0.45);
}

.readme-retry-btn {
    border: 2px solid rgba(255, 228, 120, 0.8);
    background: rgba(255, 228, 120, 0.12);
    color: var(--accent-gold);
    font-family: var(--font-pixel);
    font-size: 8px;
    line-height: 1;
    padding: 7px 10px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.readme-retry-btn:hover,
.readme-retry-btn:focus-visible {
    background: rgba(255, 228, 120, 0.2);
}

.prompt-filter {
    display: grid;
    gap: 8px;
    margin-bottom: 14px;
    padding: 10px 12px;
    border: 2px solid rgba(122, 109, 203, 0.42);
    background: rgba(47, 35, 112, 0.24);
}

.prompt-filter-title {
    color: var(--accent-cyan);
    font-family: var(--font-pixel);
    font-size: 9px;
}

.prompt-filter-summary {
    color: var(--text-muted);
    font-family: var(--font-retro);
    font-size: 20px;
}

.prompt-filter-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.prompt-filter-btn {
    border: 2px solid rgba(122, 109, 203, 0.55);
    background: rgba(23, 16, 49, 0.78);
    color: var(--text-muted);
    font-family: var(--font-pixel);
    font-size: 8px;
    line-height: 1;
    padding: 8px 10px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.prompt-filter-btn:hover,
.prompt-filter-btn:focus-visible {
    border-color: var(--accent-cyan);
    color: var(--accent-cyan);
}

.prompt-filter-btn.is-active {
    border-color: var(--accent-mint);
    background: rgba(83, 255, 198, 0.18);
    color: var(--accent-mint);
}

.readme-status {
    color: var(--text-muted);
    font-family: var(--font-retro);
    font-size: 23px;
}

.readme-clock {
    color: var(--accent-gold);
    font-family: var(--font-retro);
    font-size: 21px;
}

.readme-loading {
    display: grid;
    gap: 8px;
    margin-bottom: 12px;
}

.readme-loading span {
    height: 14px;
    border-radius: 5px;
    background: linear-gradient(90deg, rgba(99, 215, 255, 0.08) 25%, rgba(99, 215, 255, 0.24) 50%, rgba(99, 215, 255, 0.08) 75%);
    background-size: 280% 100%;
    animation: shimmer 1.4s linear infinite;
}

.readme-loading span:nth-child(1) {
    width: 68%;
}

.readme-loading span:nth-child(2) {
    width: 94%;
}

.readme-loading span:nth-child(3) {
    width: 76%;
}

.markdown-body {
    color: var(--text-muted);
    font-size: 15px;
    line-height: 1.85;
    word-break: break-word;
}

.markdown-body h1,
.markdown-body h2,
.markdown-body h3,
.markdown-body h4 {
    color: var(--text);
    line-height: 1.4;
}

.markdown-body h1,
.markdown-body h2 {
    border-bottom: 2px solid rgba(122, 109, 203, 0.45);
    margin: 22px 0 10px;
    padding-bottom: 8px;
    font-family: var(--font-pixel);
    font-size: clamp(13px, 2vw, 16px);
}

.markdown-body h3 {
    margin: 14px 0 8px;
    color: var(--accent-mint);
    font-family: var(--font-pixel);
    font-size: clamp(10px, 1.7vw, 12px);
}

.markdown-body h4 {
    margin: 12px 0 6px;
    font-size: 16px;
}

.markdown-body p,
.markdown-body ul,
.markdown-body ol,
.markdown-body blockquote,
.markdown-body table {
    margin: 10px 0;
}

.markdown-body a {
    color: var(--accent-cyan);
}

.markdown-body a:hover {
    color: var(--accent-mint);
}

.markdown-body code {
    padding: 2px 6px;
    border: 1px solid rgba(83, 255, 198, 0.32);
    background: rgba(83, 255, 198, 0.09);
    color: var(--text);
    font-family: var(--font-retro);
    font-size: 18px;
}

.markdown-body pre {
    border: 2px solid rgba(122, 109, 203, 0.65);
    background: rgba(9, 6, 22, 0.7);
    padding: 40px 12px 12px;
    position: relative;
    overflow-x: auto;
}

.markdown-body pre code {
    border: 0;
    background: transparent;
    padding: 0;
}

.markdown-body blockquote {
    margin-left: 0;
    padding: 10px 12px;
    border-left: 4px solid var(--accent-pink);
    background: rgba(255, 115, 190, 0.08);
}

.copy-code-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    border: 1px solid rgba(99, 215, 255, 0.85);
    background: rgba(99, 215, 255, 0.1);
    color: var(--accent-cyan);
    font-family: var(--font-pixel);
    font-size: 8px;
    line-height: 1;
    padding: 6px 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.copy-code-btn:hover,
.copy-code-btn:focus-visible {
    border-color: var(--accent-mint);
    color: var(--accent-mint);
}

.copy-code-btn.copied {
    border-color: var(--accent-mint);
    background: rgba(83, 255, 198, 0.2);
    color: var(--accent-mint);
}

.markdown-body img {
    max-width: 100%;
    height: auto;
    border: 2px solid rgba(122, 109, 203, 0.65);
    background: rgba(9, 6, 22, 0.6);
    box-shadow: var(--shadow-md);
    display: block;
    margin: 14px auto;
}

.markdown-body table {
    width: 100%;
    border-collapse: collapse;
}

.markdown-body th,
.markdown-body td {
    border: 1px solid rgba(122, 109, 203, 0.7);
    padding: 8px;
    vertical-align: top;
}

.markdown-body th {
    background: rgba(99, 215, 255, 0.14);
    color: var(--text);
}

.faq-list {
    display: grid;
    gap: 10px;
}

.faq-list details {
    border: 2px solid rgba(122, 109, 203, 0.52);
    background: rgba(32, 24, 69, 0.58);
    padding: 10px 12px;
}

.faq-list summary {
    cursor: pointer;
    font-family: var(--font-pixel);
    color: var(--accent-cyan);
    font-size: 10px;
    list-style: none;
}

.faq-list summary::-webkit-details-marker {
    display: none;
}

.faq-list p {
    margin: 10px 0 2px;
    color: var(--text-muted);
    font-size: 14px;
}

.site-footer {
    padding: 20px 16px 24px;
    border-top: 3px solid var(--line);
    background: rgba(17, 12, 39, 0.85);
    text-align: center;
}

.site-footer p {
    margin: 0;
    color: var(--text-muted);
    font-family: var(--font-retro);
    font-size: 21px;
}

.site-footer p + p {
    margin-top: 6px;
}

.back-to-top {
    position: fixed;
    right: 18px;
    bottom: 22px;
    width: 40px;
    height: 40px;
    border: 2px solid var(--accent-mint);
    background: rgba(83, 255, 198, 0.14);
    color: var(--accent-mint);
    font-family: var(--font-pixel);
    cursor: pointer;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.2s ease;
}

.back-to-top.show {
    opacity: 1;
    transform: translateY(0);
}

.back-to-top:hover {
    background: var(--accent-mint);
    color: #06100e;
}

.noscript-box {
    margin: 12px auto;
    width: min(1120px, calc(100% - 28px));
    border: 2px solid var(--danger);
    color: var(--danger);
    background: rgba(255, 143, 151, 0.08);
    padding: 10px 12px;
    font-size: 14px;
}

:focus-visible {
    outline: 2px dashed var(--accent-gold);
    outline-offset: 3px;
}

@keyframes shimmer {
    0% {
        background-position: 100% 0;
    }
    100% {
        background-position: -100% 0;
    }
}

@media (max-width: 940px) {
    .hero-inner {
        grid-template-columns: 1fr;
    }

    .hero-panel {
        max-width: 580px;
    }

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

    .case-category-grid {
        grid-template-columns: 1fr;
    }

    .case-full-gallery {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .prompt-board-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .latest-x-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .site-shell {
        width: calc(100% - 16px);
        margin: 8px auto 18px;
        border-width: 3px;
    }

    .site-shell::before {
        border-width: 4px;
    }

    .hero {
        padding: 20px 12px 18px;
    }

    .hero-title {
        line-height: 1.6;
    }

    .hero-actions .btn {
        width: 100%;
        text-align: center;
    }

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

    .content {
        padding: 14px 10px;
    }

    .usage-section {
        padding: 0 10px;
    }

    .usage-card {
        padding: 10px;
    }

    .usage-desc {
        font-size: 20px;
    }

    .prompt-board-section {
        padding: 10px;
    }

    .prompt-board-head {
        align-items: flex-start;
    }

    .prompt-board-head-right {
        width: 100%;
    }

    .prompt-board-search-wrap {
        width: 100%;
    }

    .prompt-board-search {
        width: 100%;
    }

    .prompt-board-total {
        width: 100%;
        text-align: center;
    }

    .prompt-board-grid {
        grid-template-columns: 1fr;
    }

    .case-gallery-grid-3,
    .case-gallery-grid-4 {
        grid-template-columns: 1fr;
    }

    .case-link-list {
        columns: 1;
    }

    .case-full-gallery {
        grid-template-columns: 1fr;
    }

    .prompt-item-title {
        font-size: 18px;
    }

    .nav-link-github {
        margin-left: 0;
    }

    .readme-card {
        padding: 10px;
    }

    .markdown-body {
        font-size: 14px;
    }

    .markdown-body code {
        font-size: 16px;
    }

    .site-footer p {
        font-size: 19px;
    }

    .back-to-top {
        right: 10px;
        bottom: 12px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}
