/* daily-art/art.css — match “original” thread-style art page */

:root{
  --bg: #efefef;
  --card: #ffffff;
  --border: #d9d9d9;
  --border2: #e6e6e6;
  --text: #111;
  --muted: #666;
  --link: #1a5fb4;
}

*{ box-sizing:border-box; }
html,body{ height:100%; }
body{
  margin:0;
  background: var(--bg);
  color: var(--text);
  font: 12px/1.4 Arial, Helvetica, sans-serif;
}

a{ color: var(--link); text-decoration: none; }
a:hover{ text-decoration: underline; }
/* ===== Topbar (shared with index) ===== */
:root{
  --topbar: #0b0b0b; /* black bar */
}
.topbar{
  background: var(--topbar, #0b0b0b);
  background: var(--topbar);
  color: #fff;
  height: 56px;
  display:flex;
  align-items:center;
}

.topbar-inner{
  width: min(1200px, calc(100% - 40px));
  margin: 0 auto;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 16px;
}

.brand{
  display:flex;
  align-items:center;
  gap:10px;
  font-weight:700;
  letter-spacing:.2px;
}

.brand-title{
  font-size: 16px;
}

.topbar-nav{
  display:flex;
  gap:14px;
}

.toplink{
  color:#cbd5e1;
  text-decoration:none;
  font-weight:600;
}

.toplink:hover{
  color:#fff;
}

/* ===== Art page: sidebar section rewritten to match index sidebar ===== */

/* Use the same container sizes as index */
.wrap{
  width: min(1200px, calc(100% - 40px));
  margin: 26px auto;
}

/* Match index grid: 280px sidebar + main column */
.grid{
  display:grid;
  grid-template-columns: 280px 1fr;
  gap: 22px;
  align-items:start;
}

/* Same card base */
.card{
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 4px;
}

/* Profile card styling (same vibe as index.php) */
.profile{
  padding: 18px;
  text-align: center;
}

.pfp{
  width: fit-content;
  height: fit-content;
  margin: 0 auto 12px;
  padding: 10px;
  background: #f3f4f6;
  border: 1px solid var(--border);
  border-radius: 6px;
}

/* Uses your existing avatar image rule (same as index) */
.pfp-img{
  width: 140px;
  height: 140px;
  background-image: url("https://assets.junkumori.rip/RDP/32x32-02.gif");
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  image-rendering: pixelated;
}

.profile-name{
  font-weight: 700;
  margin-top: 6px;
}

.profile-actions{
  margin-top: 14px;
  display:flex;
  justify-content:center;
}

/* Responsive: stack like index */
@media (max-width: 860px){
  .grid{ grid-template-columns: 1fr; }
  .profile{ max-width: 520px; margin: 0 auto; }
}


.btn{
  display:inline-block;
  padding: 6px 12px;
  border: 1px solid #1d4ed8;
  background:#1d4ed8;
  color:#fff;
  font-weight:700;
  border-radius: 2px;
  cursor:pointer;
}
.btn:hover{ background:#1e40af; border-color:#1e40af; text-decoration:none; }

/* MAIN: artwork */
.main .card-b{ padding: 0; }

.titlebar{
  padding: 8px 10px;
  text-align:center;
  font-weight:700;
  background:#f6f6f6;
  border-bottom:1px solid var(--border2);
}

.art-stage{
  padding: 18px 18px 6px;
  display:flex;
  justify-content:center;
}

.art-frame{
  max-width: 820px;
  width: 100%;
  display:flex;
  justify-content:center;
}

.art-frame img,
.art-frame video{
  max-width: 100%;
  height: auto;
  border: 1px solid var(--border);
  background:#fff;
  display:block;
}

/* caption like original */
.caption{
  padding: 10px 18px 18px;
  text-align:center;
  color:#333;
  white-space: pre-line;
}

/* SPOILER (twitter-like blur + prompt + Show button; no eye icon) */
.spoiler-box{
  position: relative;
}

.spoiler-box.is-hidden img,
.spoiler-box.is-hidden video{
  filter: blur(22px);
  transform: scale(1.02); /* hides blur edge artifacts */
}

.spoiler-overlay{
  position:absolute;
  inset:0;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:10px;
  background: rgba(255,255,255,0.65);
}

.spoiler-text{
  font-weight:700;
  color:#111;
  text-shadow: 0 1px 0 rgba(255,255,255,0.9);
}

.spoiler-btn{
  border: 1px solid #999;
  background: #fff;
  color: #111;
  font-weight:700;
  padding: 6px 14px;
  border-radius: 999px;
  cursor: pointer;
}
.spoiler-btn:hover{
  background: #f2f2f2;
}
/* Hide old <details class="spoiler"> UI (summary arrow + label) */
details.spoiler > summary{
  display:none !important;
}

/* Keep the contents visible */
details.spoiler[open] > summary{
  display:none !important;
}
.spoiler-text {
  text-align: center;
  font-weight: 700;
  color: #111;
}

.spoiler-level {
  font-size: 15px;
}

.spoiler-desc {
  margin-top: 4px;
  font-size: 13px;
  font-weight: 400;
  opacity: 0.85;
}


/* ===== NAV: Previous / Next (even stretch, wide panels) ===== */

.nav-row{
  margin-top: 14px;
  display: flex;
  gap: 24px;                 /* space between prev / next */
}

/* each card fills half the row */
.nav-card{
  flex: 1 1 0;               /* stretch evenly */
  min-width: 0;
  border: 1px solid var(--border);
  background: #fff;
  display: flex;
  flex-direction: column;
}

/* header bar */
.nav-card .nav-h{
  background: #f6f6f6;
  border-bottom: 1px solid var(--border2);
  padding: 8px 10px;
  text-align: center;
  font-weight: 700;
  color: #333;
}

/* body area */
.nav-card .nav-b{
  flex: 1;                   /* fill remaining height */
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px;
  min-height: 64px;
  text-align: center;
}

/* thumbnail preview */
.nav-thumb{
  width: 48px;
  height: 48px;
  border: 1px solid var(--border);
  background: #fafafa;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.nav-thumb img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}


/* COMMENTS: match original thread blocks */
.comments{
  margin-top: 14px;
}
.comments .card-b{
  padding: 0;
}

.reply-box{
  border-bottom: 1px solid var(--border2);
  padding: 10px;
}

.reply-grid{
  display:grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 10px;
  margin-bottom: 10px;
}
.reply-grid label,
.reply-area label{
  display:block;
  font-size: 11px;
  color:#444;
  margin-bottom: 4px;
  font-weight:700;
}

input[type="text"],
input[type="email"],
input[type="url"],
textarea{
  width:100%;
  padding: 7px 8px;
  border: 1px solid #cfcfcf;
  border-radius: 2px;
  font: 12px Arial, Helvetica, sans-serif;
  background:#fff;
  color:#111;
}
textarea{
  min-height: 90px;
  resize: vertical;
}

.reply-actions{
  display:flex;
  justify-content: space-between;
  align-items:center;
  margin-top: 8px;
}
.reply-actions .note{
  color:#666;
  font-size: 11px;
}

.thread{
  padding: 8px 10px 12px;
}
.thread .comment{
  border: 1px solid var(--border);
  margin: 10px 0;
  background:#fff;
}
.thread .comment .comment-h{
  background:#f6f6f6;
  border-bottom: 1px solid var(--border2);
  padding: 6px 8px;
  font-size: 11px;
}
.thread .comment .comment-h a{
  font-weight:700;
}
.thread .comment .comment-b{
  padding: 8px;
  white-space: normal;
  word-break: break-word;
  font-size: 12px;
}

/* responsive */
@media (max-width: 980px){
  .art-grid{ grid-template-columns: 1fr; }
  .nav-row{ justify-content: space-between; }
  .nav-card{ width: calc(50% - 12px); }
}
@media (max-width: 640px){
  .reply-grid{ grid-template-columns: 1fr; }
  .nav-card{ width: calc(50% - 12px); }
}
.reply-cancel{
  border: 0;
  background: transparent;
  padding: 0;
  margin-left: 2px; /* try 2px if you want it tighter */
  font-size: 12px;
  font-weight: 700;
  color: #d33; /* red */
  cursor: pointer;
}
.reply-cancel:hover{
  text-decoration: underline;
}/* Align the @reply label with the comment paragraph inset */
/* ----- Reply + threading (FINAL – FLAT NESTING) ----- */

/* Top-level comments */
.comment{
  margin-left: 0 !important;
}

/* ALL replies (any depth) share the same indent */
.comment.is-reply{
  margin-left: 22px !important;
}

/* header row (name + date + reply button) */
.comment-h{
  position: relative;
  padding-right: 44px;
}

/* reply button */
.reply-btn{
  position: absolute;
  top: 50%;
  right: 8px;
  transform: translateY(-50%);
  border: 0;
  background: transparent;
  padding: 0;
  font-size: 12px;
  font-weight: 700;
  color: #6aaeff;
  cursor: pointer;
  white-space: nowrap;
}
.reply-btn::before{ content: "("; }
.reply-btn::after{ content: ")"; }
.reply-btn:hover{ text-decoration: underline; }

/* comment body */
.comment-b{
  margin: 0;
  padding-left: 12px;
  box-sizing: border-box;
}

/* inline @reply at start of paragraph */
.comment-b .inline-reply{
  font-weight: 700;
  color: #555;
  text-decoration: underline;
  margin-right: 4px;
  white-space: nowrap;
}

.comment-b .inline-reply:hover{
  text-decoration: none;
}

/* kill any browser-added spacing */
.comment-b p{
  margin: 0;
}

/* cancel button in reply form */
.reply-cancel{
  border: 0;
  background: transparent;
  padding: 0;
  margin-left: 4px;
  font-size: 12px;
  font-weight: 700;
  color: #d33;
  cursor: pointer;
}
.reply-cancel:hover{
  text-decoration: underline;
}

/* highlight when jumping to parent */
.comment.is-highlight{
  outline: 2px solid #111;
  outline-offset: 3px;
  box-shadow: 0 0 0 4px rgba(0,0,0,0.08);
}


/* inline @reply at start of comment text */
.comment-b .inline-reply{
  font-weight: 700;
  color: #555;
  text-decoration: underline;
  margin-right: 6px;
}
.comment-b .inline-reply:hover{
  text-decoration: none;
}
/* ----- Lightbox (zoom) — MATCH miniblog look ----- */
.lb{
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: none;
}
.lb.is-open{ display:block; }

.lb-backdrop{
  position:absolute;
  inset:0;
  background: rgba(0,0,0,0.82);
}

/* side buttons (miniblog-like) */
.lb-side{
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 56px;
  height: 56px;
  border: 0;
  background: transparent;
  color: #fff;
  font-size: 34px;
  line-height: 1;
  cursor: pointer;
  user-select: none;
  opacity: 0.9;
  z-index: 3;
}
.lb-side:hover{ opacity: 1; }
.lb-side.left{ left: 14px; }
.lb-side.right{ right: 14px; }

/* top-right controls */
.lb-ui{
  position:absolute;
  top: 14px;
  right: 14px;
  display:flex;
  gap:10px;
  align-items:center;
  z-index:4;
}
.lb-btn{
  border: 0;
  background: transparent;
  color: #fff;
  font-weight: 800;
  padding: 0;
  cursor: pointer;
  line-height: 1;
  font-size: 28px;
  opacity: 0.9;
}
.lb-btn:hover{ opacity: 1; }

.lb-stage{
  position:absolute;
  inset: 0;
  display:flex;
  align-items:center;
  justify-content:center;
  padding: 56px 18px 18px;
  z-index:2;
}

/* remove rounded edges */
.lb-viewport{
  max-width: min(92vw, 1300px);
  max-height: 86vh;
  overflow: hidden;
  border-radius: 0;              /* <- no rounded edges */
  background: rgba(255,255,255,0.02);
  box-shadow: 0 12px 48px rgba(0,0,0,0.55);
  touch-action: none;            /* for drag/pan */
}

.lb-media{
  display:block;
  max-width: 92vw;
  max-height: 86vh;
  transform-origin: 0 0;
  cursor: grab;
  user-select: none;
}
.lb-media.is-grabbing{ cursor: grabbing; }

#spoilerBox img,
#spoilerBox video{ cursor: zoom-in; }
#spoilerBox.is-hidden img,
#spoilerBox.is-hidden video{ cursor: default; }

.brand-title{
  color: inherit;
  text-decoration: none;
}
