:root {
    --base: #100a10;
    --panel: #160e17;
    --ink: #e9e3de;
    --accent: #c64144;
    --sub: #f6d29b;
    --edge: #773637;
    --body-font: Verdana, Arial, sans-serif;
    --head-font: Georgia, 'Times New Roman', serif;
    --title-font: 'DejaVu Sans', 'Times New Roman', serif;
    --mono-font: 'Courier New', monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    color: var(--ink);
    background: var(--base) url('assets/background.png') repeat;
    font: 13px/1.48 var(--body-font);
    min-height: 100vh;
}
a { color: var(--sub); text-decoration: underline; text-underline-offset: 2px; }
a:hover { color: var(--accent); }
a:focus-visible, button:focus-visible { outline: 2px dashed var(--sub); outline-offset: 3px; }
button { cursor: pointer; font: inherit; }
img { max-width: 100%; vertical-align: middle; }
p { margin: 0 0 9px; }
p:last-child { margin-bottom: 0; }
small { font-size: 11px; }
[hidden] { display: none !important; }
.svg-defs { position: absolute; }

.site { width: min(1190px, calc(100% - 32px)); margin: 17px auto 24px; }
.columns {
    display: grid;
    grid-template-columns: minmax(0, .96fr) minmax(0, 1.45fr) minmax(0, .77fr);
    gap: 10px;
    align-items: start;
}
.column { min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.unit {
    min-width: 0;
    width: 100%;
    border: 3px double var(--edge);
    background: var(--panel);
    box-shadow: 2px 2px 0 var(--base);
}
.panel { min-width: 0; }
.panel + .panel { border-top: 1px solid var(--edge); }
.panel h2 {
    margin: 0;
    font: bold 18px/1.2 var(--head-font);
    font-variant: small-caps;
    color: var(--accent);
    padding: 6px 9px 5px;
    border-bottom: 1px solid var(--edge);
    letter-spacing: .03em;
    background: linear-gradient(0deg, var(--base), var(--panel));
    overflow-wrap: anywhere;
}
.panel h2::before { content: '> '; font: 12px sans-serif; color: var(--sub); font-weight: 800; }
.small-label { font: 10px/1.2 var(--mono-font); float: right; color: var(--sub); margin-top: 3px; }
.panel h2.with-action { display: flex; align-items: center; gap: 5px; }
.panel h2.with-action::before { flex: 0 0 auto; }
.pad { padding: 10px; }
.gamba {
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: var(--base);
    color: var(--sub);
    border: none;
    padding: 2px 6px;
    font: bold 10px/1.3 var(--mono-font);
    white-space: nowrap;
}
.gamba:hover { color: var(--accent); }
.dice { display: block; width: 16px; height: 16px; flex: 0 0 16px; fill: currentColor; }
.gamba:active .dice { transform: rotate(38deg); }

.hero { position: relative; text-align: center; min-height: 270px; overflow: hidden; isolation: isolate; }
.hero-art { display: block; width: 100%; max-height: 270px; object-fit: contain; margin: -4px auto -15px; }
.hero-title {
    position: absolute;
    z-index: 1;
    top: 10px;
    left: 10px;
    right: 10px;
    margin: 0;
    font: bold clamp(25px, 3.2vw, 43px)/1 var(--title-font);
    color: var(--sub);
    text-shadow: 2px 2px #050505, -1px -1px var(--accent), 1px -1px var(--accent), -1px 1px var(--accent);
    overflow-wrap: anywhere;
}
.welcome .avatar {
    float: left;
    width: 83px;
    height: 83px;
    object-fit: cover;
    border: 2px solid var(--accent);
    outline: 1px dotted var(--sub);
    margin: 0 12px 5px 0;
    border-radius: 50%;
}
.welcome .pad { display: flow-root; }
.welcome strong { color: var(--accent); }
.rule {
    height: 6px;
    margin: 10px 0;
    background: repeating-linear-gradient(90deg, var(--accent) 0 5px, transparent 5px 8px, var(--sub) 8px 11px, transparent 11px 15px);
    opacity: .8;
}
.mini-status { width: 100%; border-collapse: collapse; table-layout: fixed; font-size: 11.5px; }
.mini-status th { color: var(--accent); text-align: left; width: 35%; font-weight: bold; }
.mini-status th, .mini-status td { padding: 4px 3px; vertical-align: top; border-bottom: 1px dotted var(--edge); }
.mini-status td { overflow-wrap: anywhere; }
.mini-status tr:last-child th, .mini-status tr:last-child td { border: 0; }
.is-live { color: #ff6a7c !important; font-weight: bold; }
.plink-button {
    display: block;
    width: 100%;
    border: 0;
    border-top: 1px solid var(--edge);
    background: transparent;
    padding: 0;
    color: var(--ink);
    text-align: center;
}
.plink-button img { width: 100%; display: block; aspect-ratio: 498/199; object-fit: cover; background: var(--base); }
.plink-button .countline { display: block; font: bold 10px/1.2 var(--mono-font); padding: 5px; color: var(--sub); }
.plink-button:hover { border-color: var(--sub); }
.plink-button:hover .countline { color: var(--accent); }
.plink-button:active img { filter: contrast(1.2); }

.player { position: relative; background: #07070a; aspect-ratio: 16/9; overflow: hidden; border-bottom: 1px solid var(--edge); }
.player-art { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 34%; opacity: .62; }
.player-stars {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(0,0,0,.92), rgba(0,0,0,.13) 72%, rgba(0,0,0,.5)), repeating-linear-gradient(0deg, transparent 0 3px, rgba(0,0,0,.12) 3px 4px);
}
.player-copy { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: center; align-items: flex-start; padding: 7%; color: #fff; }
.channel-tag { color: #e6d3ff; font: bold 11px/1.4 var(--mono-font); letter-spacing: .07em; }
.player-copy b { font: bold clamp(19px, 2.4vw, 36px)/1.1 var(--head-font); margin: 7px 0 10px; color: #fff; text-shadow: 1px 2px black; }
.player-copy a { display: inline-block; font: bold 12px/1.4 Verdana, sans-serif; text-decoration: none; color: #fff; padding: 7px 11px; border: 1px solid #fff; background: #6441a5; }
.player-copy a:hover { background: #8156c9; }
.player.embedded { min-height: 300px; width: 100%; max-width: 100%; }
.player iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; z-index: 3; }
.stream-info .pad { padding: 7px 10px; }
.stream-info .line { display: flex; gap: 7px; margin: 3px 0; align-items: baseline; }
.stream-info .line::before { content: '- '; color: var(--sub); font-weight: bold; flex: none; }
.stream-info .line b { color: var(--accent); }
.latest .pad { padding: 5px 9px 8px; }
.news-item { padding: 5px 0; border-bottom: 1px dotted var(--edge); }
.news-item:last-child { border-bottom: 0; }
.news-item time { display: block; color: var(--accent); font: bold 10px/1.4 var(--mono-font); }
.news-item a { text-decoration: none; }
.news-item a:hover { text-decoration: underline; }
.latest-note { margin: 6px 0 0; color: var(--ink); font-size: 10px; opacity: .8; }
.watch-card { display: grid; grid-template-columns: minmax(85px, 34%) minmax(0, 1fr); align-items: center; gap: 10px; }
.thumb {
    display: block;
    width: 100%;
    aspect-ratio: 16/9;
    border: 1px solid var(--edge);
    background: var(--base) url('assets/plinksd.gif') center/cover no-repeat;
    padding: 0;
    position: relative;
    overflow: hidden;
}
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb span { position: absolute; bottom: 3px; right: 3px; color: white; background: #a71929; padding: 1px 5px; font-size: 11px; pointer-events: none; }
.thumb:hover { border-color: var(--sub); }
.watch-card a { font-weight: bold; overflow-wrap: anywhere; }
.watch-card p { margin: 4px 0 0; font-size: 11px; }
.watch-date { display: block; font-size: 10px; color: var(--accent); }
.watch-embed { aspect-ratio: 16/9; margin-top: 8px; background: #000; }
.watch-embed iframe { width: 100%; height: 100%; border: 0; }

.moments .pad { padding: 0; }
.moment-stage {
    background: #08080b;
    width: 100%;
    aspect-ratio: 1/1;
    display: grid;
    grid-template: minmax(0, 1fr) / minmax(0, 1fr);
    place-items: center;
    overflow: hidden;
}
.moment-stage img, .moment-stage video { display: block; width: 100%; height: 100%; min-height: 0; object-fit: cover; object-position: center; }
.moment-note { margin: 0; padding: 5px 8px; border-top: 1px solid var(--edge); display: flex; justify-content: space-between; gap: 5px; font: 10px/1.3 var(--mono-font); color: var(--sub); }
.moment-note span:last-child { color: var(--ink); text-align: right; }
.emotes .pad { padding: 6px 5px; }
.emote-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; }
.emote {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    min-width: 0;
    min-height: 55px;
    border: 1px dotted var(--edge);
    padding: 4px 1px;
    background: var(--base);
    color: var(--ink);
    text-align: center;
    font: 9px/1.15 var(--mono-font);
    overflow-wrap: anywhere;
}
.emote img { width: 32px; height: 32px; object-fit: contain; }
.emote:hover { border-color: var(--sub); color: var(--sub); }
.emote-unavailable::before { content: '✧'; width: 32px; height: 32px; line-height: 32px; font-size: 18px; }
.emote-note { margin: 6px 2px 0; font-size: 10px; text-align: center; }
.sitemap ul { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 4px 7px; }
.sitemap li { min-width: 0; }
.sitemap a { font-weight: bold; font-size: 11px; }
.sitemap a::before { content: '➥ '; color: var(--accent); }
.links .pad { display: flex; flex-wrap: wrap; gap: 4px; }
.links a { display: inline-block; border: 1px solid var(--edge); color: var(--ink); padding: 3px 5px; text-decoration: none; font: bold 10px/1.25 var(--mono-font); }
.links a:hover { background: var(--accent); color: var(--base); }
.site-footer { margin-top: 10px; padding: 8px 10px; border-top: 2px solid var(--accent); text-align: center; background: var(--panel); font: 11px/1.45 var(--mono-font); }

.entrance { display: grid; place-items: center; padding: 22px; text-align: center; }
.entry-panel { max-width: 470px; background: var(--panel); border: 3px double var(--edge); padding: 16px 24px 23px; box-shadow: 4px 4px 0 var(--base); }
.entry-panel img { width: min(100%, 340px); }
.entry-panel h1 { font: bold 25px/1.2 var(--head-font); color: var(--accent); margin: 0 0 12px; }
.entry-panel > a { display: inline-block; font: bold 16px/1.3 var(--head-font); color: var(--sub); border: 2px solid var(--edge); padding: 8px 14px; margin: 12px 0; }
.entry-small { font-size: 11px; }

@media (max-width: 1000px) {
    .columns { grid-template-columns: minmax(0, .86fr) minmax(0, 1.45fr); }
    .right { grid-column: 1/-1; }
    .hero-title { font-size: 33px; }
}
@media (min-width: 651px) and (max-width: 1000px) {
    .right .unit {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        grid-template-areas: 'gifs emotes' 'gifs sitemap' 'gifs outbound';
    }
    .right .moments { grid-area: gifs; border-right: 1px solid var(--edge); }
    .right .emotes { grid-area: emotes; border-top: 0; }
    .right .sitemap { grid-area: sitemap; }
    .right .links { grid-area: outbound; }
}
@media (max-width: 650px) {
    .site { width: calc(100% - 16px); margin: 8px auto; }
    .columns { display: flex; flex-direction: column; }
    .column { width: 100%; }
    .hero-art { max-height: 260px; }
    .hero-title { font-size: clamp(26px, 9.5vw, 37px); }
    .player-copy b { font-size: 25px; }
    .watch-card { gap: 8px; }
}
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
}
