/* nebenan – öffentliche Seite */
:root {
  --bg: #0d0b10;
  --panel: #17141c;
  --line: rgba(255, 255, 255, .1);
  --text: #f6f2f8;
  --muted: #a59dae;
  --accent: #ff4f8b;
  --accent-ink: #1a0610;
  --glass: rgba(20, 16, 24, .45);
  --w: 460px;
  --font: 'Bricolage', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}
.lang-ja { --font: 'Bricolage', 'Hiragino Sans', 'Hiragino Kaku Gothic ProN', 'Yu Gothic UI', 'Meiryo', 'Noto Sans JP', sans-serif; }

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--text); }
body { font-family: var(--font); -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent; }
a { color: inherit; }
button { font: inherit; color: inherit; }

.app { position: relative; max-width: var(--w); height: 100dvh; margin: 0 auto; overflow: hidden; background: #000; }
@media (min-width: 520px) {
  body { background: radial-gradient(1200px 600px at 50% -10%, #2a1320 0%, var(--bg) 60%); }
  .app { box-shadow: 0 0 0 1px var(--line), 0 30px 80px rgba(0, 0, 0, .6); }
}

/* ---------- Kopfzeile ---------- */
.top { position: absolute; inset: 0 0 auto 0; z-index: 10; padding: calc(10px + env(safe-area-inset-top)) 14px 18px;
  background: linear-gradient(to bottom, rgba(0,0,0,.65), rgba(0,0,0,0)); pointer-events: none; }
.top > * { pointer-events: auto; }
.bar { display: flex; align-items: center; justify-content: space-between; }
.logo { font-weight: 800; font-size: 23px; letter-spacing: -.03em; text-decoration: none; }
.logo .dot { color: var(--accent); }
.menu-btn { display: flex; align-items: center; gap: 6px; height: 36px; padding: 0 10px 0 12px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--glass); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); cursor: pointer; }
.lang-code { font-size: 12px; font-weight: 700; letter-spacing: .06em; }
.tags-bar { display: flex; gap: 6px; margin: 10px -14px 0; padding: 0 14px; overflow-x: auto; scrollbar-width: none; }
.tags-bar::-webkit-scrollbar { display: none; }
.chip { flex: none; padding: 6px 12px; border-radius: 999px; font-size: 13px; font-weight: 600; text-decoration: none;
  background: var(--glass); border: 1px solid var(--line); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.chip.on { background: var(--text); color: #000; border-color: var(--text); }

/* ---------- Menü ---------- */
.menu { position: absolute; inset: 0; z-index: 30; background: rgba(0,0,0,.5); display: flex; justify-content: flex-end; align-items: flex-start;
  padding: calc(56px + env(safe-area-inset-top)) 12px 12px; }
.menu[hidden] { display: none; }
.menu-inner { width: min(300px, 100%); background: var(--panel); border: 1px solid var(--line); border-radius: 18px; padding: 16px;
  box-shadow: 0 20px 60px rgba(0,0,0,.6); max-height: 100%; overflow: auto; }
.menu-h { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-bottom: 8px; }
.langs { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; margin-bottom: 14px; }
.langs a { padding: 8px 10px; border-radius: 10px; text-decoration: none; font-size: 14px; }
.langs a:hover { background: rgba(255,255,255,.06); }
.langs a.on { background: var(--accent); color: var(--accent-ink); font-weight: 700; }
.legal { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 13px; color: var(--muted); }
.legal a { text-decoration: none; padding: 4px 0; }
.legal a:hover { color: var(--text); }
.credit { display: block; margin-top: 12px; font-size: 11px; color: var(--muted); text-decoration: none; opacity: .7; }

/* ---------- Feed ---------- */
.feed { height: 100dvh; overflow-y: scroll; scroll-snap-type: y mandatory; overscroll-behavior-y: contain; scrollbar-width: none; }
.feed::-webkit-scrollbar { display: none; }
.slide { position: relative; height: 100dvh; scroll-snap-align: start; scroll-snap-stop: always; overflow: hidden; background: #000; }

.poster, .stage video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.wide .poster, .wide .stage video { object-fit: contain; }
.stage video { opacity: 0; transition: opacity .25s ease; }
.stage video.on { opacity: 1; }
.shade { position: absolute; inset: auto 0 0 0; height: 55%; pointer-events: none;
  background: linear-gradient(to top, rgba(0,0,0,.82) 0%, rgba(0,0,0,.35) 45%, rgba(0,0,0,0) 100%); }
.slide.paused::after { content: ''; position: absolute; left: 50%; top: 50%; width: 72px; height: 72px; margin: -36px 0 0 -36px; border-radius: 50%;
  background: rgba(0,0,0,.45) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M8 5v14l11-7z' fill='white'/%3E%3C/svg%3E") center/34px no-repeat;
  pointer-events: none; }

.rail { position: absolute; right: 10px; bottom: calc(150px + env(safe-area-inset-bottom)); z-index: 4; display: flex; flex-direction: column; gap: 14px; align-items: center; }
.rbtn { display: flex; flex-direction: column; align-items: center; gap: 3px; background: none; border: 0; padding: 0; cursor: pointer; }
.rbtn svg { width: 48px; height: 48px; padding: 11px; border-radius: 50%; background: var(--glass); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  fill: none; stroke: #fff; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform .15s; }
.rbtn:active svg { transform: scale(.9); }
.rbtn .n { font-size: 12px; font-weight: 700; text-shadow: 0 1px 3px rgba(0,0,0,.6); min-height: 1em; }
.like[aria-pressed="true"] svg { fill: var(--accent); stroke: var(--accent); }
.like.pop svg { animation: pop .35s ease; }
@keyframes pop { 40% { transform: scale(1.25); } }
.sound svg path:first-child { fill: #fff; stroke: none; }
.sound .on { display: none; }
body.unmuted .sound .on { display: block; }
body.unmuted .sound .off { display: none; }

.meta { position: absolute; left: 0; right: 0; bottom: 0; z-index: 3; padding: 0 76px calc(18px + env(safe-area-inset-bottom)) 16px; }
.creator { font-weight: 800; font-size: 17px; letter-spacing: -.01em; text-shadow: 0 1px 4px rgba(0,0,0,.5); }
.title { margin: 4px 0 0; font-size: 15px; font-weight: 500; line-height: 1.35; text-shadow: 0 1px 4px rgba(0,0,0,.5);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tags { display: flex; flex-wrap: wrap; gap: 2px 10px; margin-top: 6px; font-size: 14px; font-weight: 600; }
.tags a { text-decoration: none; color: #ffc2d6; }
.profile { display: inline-flex; align-items: center; justify-content: center; gap: 8px; margin-top: 12px; min-height: 46px; width: 100%;
  border-radius: 14px; background: var(--accent); color: var(--accent-ink); font-weight: 800; font-size: 16px; text-decoration: none;
  box-shadow: 0 8px 24px rgba(255, 79, 139, .35); transition: transform .12s; }
.profile:active { transform: scale(.98); }
.hint { position: absolute; left: 0; right: 0; top: 42%; z-index: 2; text-align: center; font-size: 14px; font-weight: 600; color: rgba(255,255,255,.85);
  text-shadow: 0 1px 6px rgba(0,0,0,.6); animation: hint 1.6s ease-in-out 3, fadeout .6s ease 4.8s forwards; pointer-events: none; }
@keyframes hint { 50% { transform: translateY(-8px); } }
@keyframes fadeout { to { opacity: 0; } }

/* Werbung */
.slide.ad { display: flex; align-items: center; justify-content: center; background: linear-gradient(160deg, #1b1520, #0d0b10); }
.adbox { width: calc(100% - 40px); max-width: 360px; }
.adlabel { display: inline-block; margin-bottom: 8px; font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.adslot { min-height: 300px; display: flex; align-items: center; justify-content: center; border-radius: 16px; border: 1px dashed rgba(255,255,255,.18); overflow: hidden; }
.adph { color: var(--muted); font-size: 14px; }

/* Leer / Ende */
.slide.empty, .slide.end { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; padding: 24px; text-align: center;
  background: linear-gradient(160deg, #1b1520, #0d0b10); color: var(--muted); }
.slide.end .profile, .slide.empty .profile { width: auto; padding: 0 22px; }
.slide.end .legal { justify-content: center; }

.toast { position: absolute; left: 50%; bottom: calc(90px + env(safe-area-inset-bottom)); z-index: 40; transform: translate(-50%, 20px); opacity: 0;
  padding: 10px 16px; border-radius: 12px; background: #fff; color: #000; font-weight: 700; font-size: 14px; transition: .2s; pointer-events: none; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Altersabfrage ---------- */
.gate { position: absolute; inset: 0; z-index: 50; display: flex; align-items: center; justify-content: center; padding: 20px;
  background: rgba(8, 6, 10, .78); backdrop-filter: blur(22px); -webkit-backdrop-filter: blur(22px); }
.gate-box { width: 100%; max-width: 380px; text-align: center; background: var(--panel); border: 1px solid var(--line); border-radius: 22px; padding: 28px 22px 20px; }
.gate-18 { display: inline-grid; place-items: center; width: 64px; height: 64px; border-radius: 50%; border: 2px solid var(--accent); color: var(--accent); font-weight: 800; font-size: 20px; }
.gate h1 { margin: 14px 0 8px; font-size: 24px; letter-spacing: -.02em; }
.gate p { margin: 0 0 20px; color: var(--muted); font-size: 15px; line-height: 1.5; }
.btn-main { display: block; width: 100%; min-height: 50px; border: 0; border-radius: 14px; background: var(--accent); color: var(--accent-ink); font-weight: 800; font-size: 16px; cursor: pointer; }
.btn-ghost { display: block; margin-top: 8px; padding: 12px; color: var(--muted); text-decoration: none; font-size: 15px; }
.gate-langs { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px; margin-top: 10px; padding-top: 12px; border-top: 1px solid var(--line); }
.gate-langs a { font-size: 12px; font-weight: 700; color: var(--muted); text-decoration: none; padding: 4px 7px; border-radius: 6px; }
.gate-langs a.on { color: var(--text); background: rgba(255,255,255,.08); }

/* ---------- Textseiten (Impressum usw.) ---------- */
body.page { background: var(--bg); }
.doc { max-width: 720px; margin: 0 auto; padding: 24px 20px 60px; line-height: 1.6; }
.doc h1 { font-size: 30px; letter-spacing: -.02em; margin: 18px 0; }
.doc .back { color: var(--muted); text-decoration: none; }
.doc .muted { color: var(--muted); }
.doc .legal { margin-top: 40px; padding-top: 16px; border-top: 1px solid var(--line); }

@media (prefers-reduced-motion: reduce) { .hint { animation: none; } .stage video { transition: none; } }
