:root {
    --bg: #f7f7f7;
    --card: #ffffff;
    --text: #202124;
    --muted: #5f6368;
    --line: #e2e2e2;
    --link: #0b57d0;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.6;
    overflow-x: hidden;
}

main {
    max-width: 760px;
    margin: 36px auto;
    padding: 0 16px;
}

.card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 20px;
}

h1 {
    margin: 0 0 8px;
    font-size: 1.5rem;
}

p {
    margin: 0 0 12px;
    color: var(--muted);
}

ul {
    margin: 0 0 16px;
    padding-left: 18px;
}

a {
    color: var(--link);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

.small {
    margin-top: 14px;
    font-size: 0.92rem;
    color: var(--muted);
}

.video {
    margin-top: 14px;
}

.video-frame {
    position: relative;
    width: 100%;
    padding-top: 56.25%;
    border: 1px solid var(--line);
    border-radius: 8px;
    overflow: hidden;
    background: #000;
}

.video-frame iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

/* =========================================
   背景の3Dテキスト用スタイル
   ========================================= */
.bg-container {
    position: fixed;
    top: 0; left: 0;
    width: 100vw; height: 100vh;
    z-index: -1;
    perspective: 600px;
    transform-style: preserve-3d;
    overflow: hidden;
    pointer-events: none;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* 流れ1：下から上への縦ストリーム */
.vertical-window {
    position: absolute;
    top: -20vh; left: -25vw;
    width: 120vw; height: 140vh;
    transform: rotateX(37deg) rotateY(-8deg) translateZ(-50px);
    transform-origin: center;
    backface-visibility: hidden;
    will-change: transform;
}

.flow-vertical-wrapper {
    display: flex;
    flex-direction: column;
    width: 100%;
    animation: scrollVert 30s linear infinite;
}

.flow-vertical-content {
    width: 100%;
    font-family: serif;
    font-size: 24px;
    line-height: 1.6;
    color: rgba(0, 0, 0, 0.25);
    text-shadow: 1px 1px 0 rgba(255, 255, 255, 0.8);
    word-break: break-all;
    text-align: justify;
    padding-bottom: 0;
}

/* 流れ2：右から左への横ストリーム */
.horizontal-window {
    position: absolute;
    top: 0vh; left: 0;
    width: 100vw; height: 80vh;
    transform: rotateX(15deg) rotateY(20deg) rotateZ(-12deg) translateZ(30px);
    transform-origin: center;
    backface-visibility: hidden;
    will-change: transform;
}

.flow-horizontal-wrapper {
    display: flex;
    flex-direction: row;
    width: fit-content;
    animation: scrollHoriz 80s linear infinite;
}

.flow-horizontal-content {
    font-family: serif;
    font-size: 28px;
    line-height: 2.2;
    color: rgba(0, 0, 0, 0.18);
    text-shadow: 1px 1px 0 rgba(255, 255, 255, 0.7);
    white-space: nowrap;
    padding-right: 0; 
}

@keyframes scrollVert {
    0% { transform: translateY(0); }
    100% { transform: translateY(-50%); }
}

@keyframes scrollHoriz {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}