@import url('https://fonts.googleapis.com/css2?family=Cinzel+Decorative:wght@700;900&family=IBM+Plex+Mono:wght@400;500;600&family=Noto+Serif+KR:wght@400;500;600;700&display=swap');

.ra0-board {
  --r-void: #030206;
  --r-panel: #0a0711;
  --r-purple: #32104a;
  --r-purple-glow: #8921e0;
  --r-silver: #d5cee5;
  --r-muted: #6b5f82;
  --r-red: #cc0044;
  --r-cyan: #00f5d4;
  --r-magenta: #e60073;

  position: relative;
  display: block;
  box-sizing: border-box;
  width: 265px;
  max-width: calc(100vw - 24px);
  margin: 10px auto;
  padding: 14px 10px 10px;
  color: var(--r-silver);
  background:
    radial-gradient(circle at 50% 0%, rgba(65, 16, 105, 0.55), transparent 60%),
    var(--r-void);
  border: 1px solid rgba(137, 33, 224, 0.75);
  border-radius: 5px;
  outline: 1px solid rgba(0, 245, 212, 0.2);
  outline-offset: -2px;
  box-shadow:
    0 14px 38px rgba(0, 0, 0, 0.98),
    0 0 24px rgba(137, 33, 224, 0.45),
    inset 0 0 28px rgba(3, 2, 6, 0.95);
  font-family: 'IBM Plex Mono', monospace;
  overflow: hidden;
  z-index: 900;
  user-select: none;
  -webkit-user-select: none;
  transition: width 0.25s ease, height 0.25s ease, padding 0.25s ease;
}

.ra0-board.is-floating {
  position: fixed;
  margin: 0;
  z-index: 9990;
}

.ra0-board.is-dragging {
  opacity: 0.95;
  box-shadow:
    0 18px 42px rgba(0, 0, 0, 0.99),
    0 0 30px rgba(137, 33, 224, 0.65);
  cursor: grabbing !important;
}

.ra0-board.is-minimized {
  width: 48px !important;
  height: 48px !important;
  padding: 0 !important;
  border-radius: 50% !important;
  overflow: hidden;
  background: var(--r-void);
  border: 2px solid var(--r-purple-glow);
  box-shadow: 0 0 16px rgba(137, 33, 224, 0.7);
  cursor: pointer;
}
.ra0-board.is-minimized .r-scanlines,
.ra0-board.is-minimized .r-topline,
.ra0-board.is-minimized .r-heading,
.ra0-board.is-minimized .r-ascii,
.ra0-board.is-minimized .r-content-wrap,
.ra0-board.is-minimized .r-draw-btn,
.ra0-board.is-minimized .r-bottom-status,
.ra0-board.is-minimized .r-admin,
.ra0-board.is-minimized .r-reset-pos {
  display: none !important;
}

.r-minimized-icon {
  display: none;
  width: 100%;
  height: 100%;
  align-items: center;
  justify-content: center;
  font-family: 'Cinzel Decorative', serif;
  font-size: 20px;
  color: var(--r-cyan);
  text-shadow: 0 0 8px var(--r-cyan);
}
.ra0-board.is-minimized .r-minimized-icon {
  display: flex !important;
}

.ra0-board:before,
.ra0-board:after {
  content: "";
  position: absolute;
  left: 0;
  width: 100%;
  height: 6px;
  background-image: repeating-linear-gradient(
    90deg,
    var(--r-purple) 0px,
    var(--r-purple) 4px,
    var(--r-void) 4px,
    var(--r-void) 8px
  );
  opacity: 0.85;
  pointer-events: none;
}
.ra0-board:before { top: 0; }
.ra0-board:after { bottom: 0; }

.r-scanlines {
  position: absolute;
  inset: 0;
  background: linear-gradient(rgba(10, 7, 17, 0) 50%, rgba(0, 0, 0, 0.45) 50%);
  background-size: 100% 4px;
  pointer-events: none;
  z-index: 1;
}

.ra0-board * { box-sizing: border-box; }

.r-topline {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 5px;
  color: var(--r-silver);
  font-size: 7px;
  letter-spacing: 1.5px;
  border-bottom: 1px solid rgba(137, 33, 224, 0.4);
  padding-bottom: 5px;
  cursor: grab;
  text-transform: uppercase;
}
.r-topline:active { cursor: grabbing; }
.r-led {
  width: 4px;
  height: 4px;
  flex-shrink: 0;
  background: var(--r-red);
  box-shadow: 0 0 6px var(--r-red);
}
.r-drag-hint {
  margin-left: auto;
  color: var(--r-muted);
  font-size: 7px;
}
.r-toggle-min {
  border: 1px solid var(--r-purple);
  background: #050308;
  color: var(--r-cyan);
  font: 7px 'Cinzel Decorative', monospace;
  padding: 1px 4px;
  cursor: pointer;
  margin-left: 3px;
}
.r-toggle-min:hover { background: var(--r-purple-glow); color: #fff; }

.r-reset-pos {
  border: 1px solid var(--r-purple);
  background: #050308;
  color: var(--r-silver);
  font: 6px 'IBM Plex Mono', monospace;
  padding: 1px 3px;
  cursor: pointer;
}
.r-reset-pos:hover { background: var(--r-purple-glow); color: #fff; }
.r-reset-pos[hidden] { display: none !important; }

.r-heading {
  position: relative;
  z-index: 2;
  padding: 7px 0 6px;
  cursor: grab;
}
.r-heading:active { cursor: grabbing; }

.r-title {
  font-family: 'Cinzel Decorative', serif;
  font-size: 11.5px;
  font-weight: 900;
  letter-spacing: 1.2px;
  color: #fff;
  text-shadow:
    0 0 6px rgba(137, 33, 224, 0.9),
    2px 0 0 rgba(230, 0, 115, 0.6),
    -2px 0 0 rgba(0, 245, 212, 0.6);
  position: relative;
  animation: reddit-glitch 4s infinite;
}

@keyframes reddit-glitch {
  0%, 90%, 100% { transform: translate(0); text-shadow: 0 0 6px rgba(137, 33, 224, 0.9), 2px 0 0 rgba(230, 0, 115, 0.6), -2px 0 0 rgba(0, 245, 212, 0.6); }
  92% { transform: translate(-1px, 1px); text-shadow: 0 0 8px var(--r-cyan), -3px 0 0 var(--r-magenta); }
  95% { transform: translate(1px, -1px); text-shadow: 0 0 8px var(--r-magenta), 3px 0 0 var(--r-cyan); }
  97% { transform: translate(0); text-shadow: 0 0 4px #fff; }
}

.r-sub {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 7px;
  color: var(--r-muted);
  letter-spacing: 0.5px;
  margin-top: 2px;
}

.r-ascii {
  position: relative;
  z-index: 2;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 5.8px;
  line-height: 1.12;
  color: var(--r-cyan);
  text-align: center;
  background: rgba(3, 2, 6, 0.85);
  border: 1px solid rgba(137, 33, 224, 0.5);
  padding: 4px;
  margin: 3px 0 5px;
  text-shadow: 0 0 5px rgba(0, 245, 212, 0.4);
  white-space: pre;
}

.r-content-wrap {
  position: relative;
  z-index: 2;
  min-height: 135px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2px 0 6px;
}

.r-intro-card {
  width: 100%;
  height: 135px;
  padding: 8px;
  background: rgba(10, 7, 17, 0.9);
  border: 1px dashed var(--r-purple);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
}
.r-intro-card:hover {
  border-color: var(--r-cyan);
  background: rgba(15, 10, 24, 0.95);
}
.r-intro-symbol {
  font-family: 'Cinzel Decorative', serif;
  font-size: 18px;
  color: var(--r-purple-glow);
  margin-bottom: 6px;
  text-shadow: 0 0 8px var(--r-purple-glow);
}
.r-intro-text {
  font-size: 8px;
  line-height: 1.5;
  color: var(--r-silver);
  word-break: keep-all;
}

.r-post-view {
  width: 100%;
  min-height: 135px;
  padding: 8px;
  background: rgba(6, 4, 10, 0.96);
  border: 1px solid var(--r-purple);
  border-left: 2px solid var(--r-red);
  animation: r-fade 0.35s ease both;
}
.r-post-view[hidden] { display: none !important; }

.r-post-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 6.5px;
  color: var(--r-muted);
  border-bottom: 1px dashed rgba(137, 33, 224, 0.3);
  padding-bottom: 3px;
  margin-bottom: 5px;
}
.r-post-upvote {
  color: #ff4500;
  font-weight: 700;
}
.r-post-title {
  font-family: 'Noto Serif KR', serif;
  font-size: 10px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 4px;
  word-break: keep-all;
  text-shadow: 0 0 4px rgba(255,255,255,0.2);
}
.r-post-body {
  font-family: 'Noto Serif KR', serif;
  font-size: 8.5px;
  line-height: 1.55;
  color: #c9c2d8;
  margin: 0;
  word-break: keep-all;
}
.r-post-footer-info {
  margin-top: 6px;
  padding-top: 4px;
  border-top: 1px solid rgba(255,255,255,0.06);
  display: flex;
  justify-content: space-between;
  font-size: 6px;
  color: var(--r-muted);
}

.r-draw-btn {
  position: relative;
  z-index: 2;
  width: 100%;
  border: 1px solid var(--r-purple-glow);
  border-radius: 3px;
  background: #08050d;
  color: var(--r-silver);
  padding: 6px;
  font: 600 8.5px 'IBM Plex Mono', serif;
  letter-spacing: 0.8px;
  cursor: pointer;
  text-transform: uppercase;
  transition: all 0.2s ease;
}
.r-draw-btn:hover {
  background: var(--r-purple);
  color: #fff;
  border-color: var(--r-cyan);
  box-shadow: 0 0 10px rgba(0, 245, 212, 0.3);
}
.r-draw-btn:disabled { opacity: 0.5; cursor: wait; }

.r-bottom-status {
  position: relative;
  z-index: 2;
  text-align: center;
  font-size: 6px;
  letter-spacing: 1px;
  color: var(--r-muted);
  margin-top: 6px;
}

.r-admin {
  position: relative;
  z-index: 2;
  display: block;
  margin: 4px auto 0;
  border: 0;
  background: none;
  color: var(--r-muted);
  font: 6.5px 'IBM Plex Mono', monospace;
  cursor: pointer;
}
.r-admin:hover { color: var(--r-cyan); }

@keyframes r-fade {
  from { opacity: 0; transform: scale(0.98); }
  to { opacity: 1; transform: scale(1); }
}