@import url("https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;700;800&display=swap");
@import url("https://fonts.googleapis.com/css2?family=Noto+Sans+JP:wght@400;500;600&display=swap");

@font-face {
  font-family: Obys;
  src: url("fonts/ObysSans4.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #322d2d;
  --line: rgba(249, 241, 231, 0.18);
  --yellow: #f9f1e7;
  --pink: #b85a1a;
  --pink-70: rgba(184, 90, 26, 0.7);
  --icon-bg-70: rgba(218, 212, 210, 0.7);
  --icon-bg-dark-70: rgba(42, 35, 32, 0.7);
  --icon-bg-photo-70: rgba(59, 53, 52, 0.7);
  --paper: #f9f1e7;
  --ink: #322d2d;
  --border: rgba(249, 241, 231, 0.14);
  --panel-bg: transparent;
  --panel-shadow: none;
  --right-col: clamp(200px, 28vw, 320px);
  --main-gap: 14px;
  --font: Montserrat, "Noto Sans JP", "Hiragino Kaku Gothic ProN", sans-serif;
}

body {
  color: var(--paper);
  background-color: var(--bg);
  background-image:
    linear-gradient(rgba(50, 45, 45, 0.82), rgba(50, 45, 45, 0.9)),
    var(--bg-image, none);
  background-size: auto, cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
  font-family: var(--font);
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
}

html[style*="--bg-image:url"] body {
  background-color: transparent;
  background-image: var(--bg-image);
  background-size: var(--bg-size, cover);
  background-position: var(--bg-position, center);
  background-repeat: var(--bg-repeat, no-repeat);
  background-attachment: fixed;
}

body::before { display: none; }

.page {
  gap: 12px;
  padding: 18px 28px 14px;
}

.topbar {
  position: relative;
  padding-bottom: 14px;
  border-bottom: 0;
}

.topbar::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: var(--line);
}

.brand {
  gap: 6px 18px;
}

.brand .en,
.brand .ja {
  color: rgba(60, 60, 60, 0.78);
  font-family: var(--font);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: none;
  text-shadow: none;
}

.brand .en::before,
.brand .ja::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 8px;
  border-radius: 50%;
  background: var(--pink);
  vertical-align: middle;
  transform: translateY(-1px);
}

.brand .en::before,
.brand .ja::before {
  display: none;
}

.top-button {
  min-height: 28px;
  padding: 2px 12px;
  color: rgba(55, 55, 55, 0.95);
  background: transparent;
  border: 1px solid rgba(95, 95, 95, 0.28);
  border-radius: 0;
  box-shadow: none;
  font-family: var(--font);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: lowercase;
}

.top-button:hover {
  background: transparent;
  border-color: rgba(75, 75, 75, 0.42);
  color: rgba(35, 35, 35, 0.98);
}

.intro::before,
.photo-panel::before,
.controls::before { display: none; }

.panel,
.intro {
  background: var(--panel-bg);
  border: 0;
  box-shadow: none;
}

.intro {
  min-height: auto;
  padding: 10px 8px 6px;
}

.fit-title {
  color: var(--paper) !important;
  font-family: var(--font);
  font-size: clamp(30px, 3.8vw, 56px) !important;
  font-weight: 400;
  letter-spacing: -0.03em;
  word-spacing: normal;
  line-height: 0.92;
  text-shadow: none !important;
}

.fit-title.title-stegano {
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

html[style*="--bg-image:url"] .fit-title.title-stegano {
  background-image: var(--bg-image-photo, var(--bg-image));
  background-repeat: var(--bg-repeat-photo, no-repeat);
  background-position: var(--bg-position-photo, center);
  background-size: var(--bg-size-photo, cover);
  background-blend-mode: var(--bg-blend-photo, normal);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent !important;
  -webkit-text-stroke: 0.6px rgba(249, 241, 231, 0.28);
  text-shadow: 0 0 1px rgba(249, 241, 231, 0.35);
  paint-order: fill;
  filter: none;
}

@supports not ((-webkit-background-clip: text) or (background-clip: text)) {
  html[style*="--bg-image:url"] .fit-title.title-stegano {
    color: var(--paper) !important;
    -webkit-text-fill-color: var(--paper);
    background: none;
  }
}

.main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) var(--right-col);
  grid-template-rows: minmax(0, 1fr);
  gap: var(--main-gap);
  align-items: stretch;
  width: 100%;
  min-width: 0;
  min-height: 0;
}

.left-col {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: var(--main-gap);
  min-width: 0;
  min-height: 0;
  height: 100%;
}

.photo-panel {
  display: flex;
  flex-direction: column;
  min-height: 0;
  min-width: 0;
  height: 100%;
  border: 0;
  border-radius: 0;
  background: #000;
}

.stream-wrap {
  flex: 1 1 auto;
  width: 100%;
  min-height: 0;
  max-height: 100%;
  aspect-ratio: 16 / 9;
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: #000;
}

.stream-waiting {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #000;
}

.stream-waiting[hidden] {
  display: none;
}

.stream-waiting-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.stream-wrap.is-offline .stream-iframe {
  visibility: hidden;
  pointer-events: none;
}

.stream-wrap.is-live .stream-waiting {
  display: none;
}

.stream-iframe,
.stream-wrap iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  background: #000;
  z-index: 2;
}

.stream-fallback {
  color: var(--paper);
  background: rgba(50, 45, 45, 0.82);
  border: 1px solid var(--line);
  border-radius: 4px;
  font-family: var(--font);
  font-size: 10px;
  letter-spacing: 0.04em;
}

.stream-fallback:hover { opacity: 0.8; }

.next-live {
  flex-shrink: 0;
  padding: 10px 12px 0;
  text-align: center;
}

.next-live[hidden] {
  display: none;
}

.next-live-label {
  margin: 0;
  color: rgba(249, 241, 231, 0.48);
  font-family: var(--font);
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: lowercase;
}

.next-live-when {
  margin: 6px 0 0;
  color: rgba(249, 241, 231, 0.88);
  font-family: var(--font);
  font-size: 11px;
  line-height: 1.55;
}

.written-message {
  color: rgba(249, 241, 231, 0.94);
  mix-blend-mode: normal;
  text-shadow: none;
}

.mark-lightning,
.mark-lightning-s,
.mark-lightning-m,
.mark-lightning-l { color: var(--paper); }

.controls {
  width: var(--right-col);
  max-width: var(--right-col);
  min-width: 0;
  justify-self: end;
  height: 100%;
  padding: 14px 16px 12px;
  gap: 14px;
  overflow: hidden;
}

.controls > .payment-options {
  background: var(--bg);
}

html[style*="--bg-image:url"] .controls {
  background: rgba(255, 255, 255, 0.22);
}

html[style*="--bg-image:url"] .controls > .payment-options {
  background: transparent;
}

html[style*="--bg-image:url"] .pay:hover {
  background: transparent;
}

.feed {
  border: 0;
  border-radius: 6px;
  padding: 10px 12px;
  background: transparent;
}

.card {
  min-height: 48px;
  padding: 10px 4px 12px;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--line);
}

.card:nth-child(2n) { border-right: 0; }

.card span {
  display: flex;
  align-items: center;
  gap: 6px;
  color: rgba(249, 241, 231, 0.55);
  font-family: var(--font);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: lowercase;
}

.card span::before {
  content: "";
  flex-shrink: 0;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--pink);
}

.feed .stats-value,
.card strong.stats-value,
#public-status.stats-value {
  display: block;
  margin-top: 4px;
  color: #111;
  font-family: var(--font);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: -0.01em;
  font-variant-numeric: tabular-nums;
  line-height: 1.65;
  min-height: 1.2em;
  opacity: 1;
  visibility: visible;
  white-space: normal;
  word-break: break-word;
}

html[style*="--bg-image:url"] .feed .card span {
  color: #333 !important;
}

html[data-theme="minimal"] .feed .stats-value,
html[data-theme="minimal"] #total-sats,
html[data-theme="minimal"] #public-count,
html[data-theme="minimal"] #last-sats,
html[data-theme="minimal"] #last-time,
html[data-theme="minimal"] #public-status {
  color: #111 !important;
  -webkit-text-fill-color: #111 !important;
  opacity: 1 !important;
  visibility: visible !important;
}

html[style*="--bg-image:url"][data-theme="minimal"] .feed .stats-value,
html[style*="--bg-image:url"][data-theme="minimal"] #public-status.stats-value {
  color: #111 !important;
  -webkit-text-fill-color: #111 !important;
}

html[data-theme="minimal"]:not([style*="--bg-image:url"]) .feed .stats-value,
html[data-theme="minimal"]:not([style*="--bg-image:url"]) #public-status.stats-value {
  color: #f9f1e7 !important;
  -webkit-text-fill-color: #f9f1e7 !important;
}

.card.wide .stats-value {
  min-height: 1.4em;
}

.payment-options {
  border: 1px solid var(--line);
  border-radius: 4px;
  box-shadow: none;
  overflow: hidden;
}

.pay {
  gap: 6px;
  padding: 14px 4px;
  color: var(--paper);
  background: transparent;
  border-right: 1px solid var(--line);
  font-family: var(--font);
  font-weight: 500;
  text-transform: lowercase;
}

.pay:hover { background: rgba(249, 241, 231, 0.05); }
.pay[data-sats="210"] { background: var(--pink); color: var(--paper); }
.payment-options > div:last-child .pay { background: transparent; }
.pay span:last-child { font-size: 11px; letter-spacing: 0.06em; }

.text-icon {
  background: var(--icon-bg-70);
  color: var(--paper);
  border: 0;
  border-radius: 4px;
  box-shadow: none;
}

.pay[data-sats="210"] .text-icon {
  background: var(--icon-bg-dark-70);
  color: var(--pink);
}

.text-icon {
  transition: color 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}

.pay:hover .text-icon {
  background: var(--pink-70);
  color: var(--paper);
  border-color: var(--pink-70);
}

.text-icon-symbol { font-size: 20px; }
.text-icon-lightning-s { --icon-size: 30px; font-size: 16px; }
.text-icon-lightning-m { --icon-size: 36px; font-size: 20px; }
.text-icon-lightning-l { --icon-size: 42px; font-size: 24px; }

.qr {
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #3a3535;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.45);
}

.qr img {
  background: #fff;
  border-radius: 2px;
}

.payment-desc {
  padding: var(--text-block-pad) 0;
  color: rgba(249, 241, 231, 0.72);
  font-size: 11px;
  line-height: 1.65;
}

.payment-desc-loc {
  color: rgba(249, 241, 231, 0.48);
  font-family: var(--font);
  font-size: 10px;
  letter-spacing: 0.06em;
}

.payment-history {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  padding: var(--text-block-pad) 0 0;
  border-top: 1px solid var(--line);
}

.payment-history-title {
  margin: 0 0 8px;
  color: rgba(249, 241, 231, 0.48);
  font-family: var(--font);
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: lowercase;
}

.controls-scroll {
  padding: 0 2px;
}

.talk-static {
  color: rgba(249, 241, 231, 0.72);
  font-size: 11px;
  line-height: 1.65;
}

.talk-static b {
  color: var(--paper);
  font-family: var(--font);
  font-weight: 400;
  letter-spacing: -0.02em;
}

.talk-static a {
  color: var(--paper);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.talk-static a:hover { color: var(--pink); }

.log {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  color: rgba(249, 241, 231, 0.42);
  font-family: var(--font);
  font-size: 10px;
  line-height: 1.5;
}

.log-row {
  padding: 3px 0;
  border-bottom: 1px solid rgba(249, 241, 231, 0.08);
}

.sat-ticker,
.page > footer.sat-ticker {
  background: transparent;
}

.page > footer.sat-ticker {
  position: relative;
  padding: 10px 0 0;
  border-top: 0;
  border-bottom: 0;
  min-height: 34px;
}

.page > footer.sat-ticker::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 1px;
  background: var(--line);
}

.sat-head {
  color: rgba(249, 241, 231, 0.48) !important;
  font-family: var(--font);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: lowercase;
}

.sat-card span {
  color: rgba(249, 241, 231, 0.48) !important;
  font-family: var(--font);
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: lowercase;
}

.sat-card strong {
  color: var(--paper) !important;
  font-family: var(--font);
  font-size: 10px;
  font-weight: 400;
  text-shadow: none;
}

.cursor-pixel {
  width: 30px;
  height: 30px;
  font-size: 0;
  color: transparent;
  background: transparent;
  border: 1.5px solid var(--pink);
  border-radius: 50%;
  box-shadow: none;
  text-shadow: none;
  transform: translate(-50%, -50%);
  transition: width 0.14s ease, height 0.14s ease, background 0.14s ease, border-color 0.14s ease, opacity 0.12s ease;
}

.cursor-pixel::before {
  content: none;
}

.cursor-pixel.is-hovering {
  width: 20px;
  height: 20px;
  background: transparent;
  border-color: var(--paper);
  box-shadow: none;
  transform: translate(-50%, -50%);
}

.cursor-trail {
  width: 8px;
  height: 8px;
  background: var(--paper);
  border: 0;
  border-radius: 50%;
  box-shadow: none;
  opacity: 0.55;
}

@media (max-width: 1100px) {
  :root { --right-col: clamp(190px, 30vw, 280px); }

  .page { padding: 14px 16px; }
  .fit-title {
    font-size: clamp(18px, 4.2vw, 30px) !important;
    white-space: normal;
  }
  .controls { padding: 12px 12px 10px; gap: 10px; }
}

@media (max-width: 740px) {
  .page { padding: 12px 14px; }
  .brand .en, .brand .ja { font-size: 10px; }
}

html[style*="--bg-image:url"] .controls-scroll {
  --scroll-text: #111;
  --scroll-text-muted: #444;
}

html[style*="--bg-image:url"] .payment-desc {
  color: var(--scroll-text);
}

html[style*="--bg-image:url"] .payment-desc-loc {
  color: var(--scroll-text-muted);
}

html[style*="--bg-image:url"] .payment-history-title {
  color: var(--scroll-text-muted);
}

html[style*="--bg-image:url"] .log {
  color: var(--scroll-text-muted);
}

html[style*="--bg-image:url"] .log-row {
  border-bottom-color: rgba(0, 0, 0, 0.08);
}

html[style*="--bg-image:url"] .pay,
html[style*="--bg-image:url"] .pay[data-sats="210"],
html[style*="--bg-image:url"] .payment-options > div:last-child .pay {
  color: #111;
  background: transparent;
}

html[style*="--bg-image:url"] .text-icon,
html[style*="--bg-image:url"] .pay[data-sats="210"] .text-icon {
  color: var(--paper);
  background: var(--icon-bg-photo-70);
  border: 1px solid rgba(0, 0, 0, 0.18);
}

html[style*="--bg-image:url"] .pay[data-sats="210"] .text-icon {
  color: var(--pink);
}

html[style*="--bg-image:url"] .pay:hover .text-icon {
  background: var(--pink-70);
  color: var(--paper);
  border-color: var(--pink-70);
}

@media (max-width: 740px) {
  :root { --right-col: 100%; }

  .main {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto;
  }

  .left-col { grid-template-rows: auto minmax(220px, 42svh); }
  .photo-panel { height: auto; }
  .stream-wrap { aspect-ratio: 16 / 9; max-height: none; }

  .controls {
    width: 100%;
    max-width: 100%;
    height: auto;
    justify-self: stretch;
  }
}
