/* Base layout */
body{
  font-family:system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  max-width:760px;
  margin:40px auto;
  padding:0 16px;
}

.sr-only{
  position:absolute;
  width:1px;
  height:1px;
  padding:0;
  margin:-1px;
  overflow:hidden;
  clip:rect(0,0,0,0);
  white-space:nowrap;
  border:0;
}

.subtitle{
  color:#444;
  margin-top:-6px;
  line-height:1.4;
}

/* Cards / blocks */
.card{
  border:1px solid #ddd;
  border-radius:14px;
  padding:18px;
  margin-top:16px;
  background:#fff;
}

/* Generic row helper */
.row{
  margin-top:14px;
  display:flex;
  gap:10px;
  align-items:center;
  flex-wrap:wrap;
  justify-content:center;
}

.row > *{
  min-width:0;
}

/* Buttons */
.btn{
  padding:10px 14px;
  border-radius:10px;
  background:#111;
  color:#fff;
  border:0;
  cursor:pointer;
  text-decoration:none;
  display:inline-flex;
  align-items:center;
  justify-content:center;
}

.btn.secondary{ background:#444; }

.btn:active{ transform:translateY(1px); }

/* Text helpers */
.link{
  font-size:18px;
  font-weight:800;
  word-break:break-all;
}

.muted{ color:#555; }

.err{
  color:#b00020;
  font-weight:700;
  margin-top:10px;
}

/* Progress / images */
progress{
  width:100%;
  height:14px;
  margin-top:12px;
  display:none;
}

img{
  border:1px solid #ddd;
  border-radius:12px;
  max-width:100%;
  height:auto;
}

/* Drop area */
.drop{
  border:2px dashed #aaa;
  border-radius:14px;
  padding:28px;
  text-align:center;
}

.drop.drag{
  border-color:#111;
  background:#f6f6f6;
}

/* Open-by-ID */
.idbox h3{
  margin:0 0 8px 0;
  font-size:16px;
}

.idrow{
  display:flex;
  gap:10px;
  align-items:center;
  flex-wrap:wrap;
}

.idinput{
  flex:1;
  min-width:220px;
  padding:10px 12px;
  border:1px solid #ccc;
  border-radius:10px;
  font-size:16px;
}

.hint{
  font-size:13px;
  color:#666;
  margin-top:8px;
  line-height:1.35;
}

/* ID highlight block (shown after upload + on landing) */
.idresult{
  margin-top:16px;
  border:1px solid #ddd;
  border-radius:14px;
  padding:14px;
  text-align:left;
}

.idline{
  display:flex;
  align-items:center;
  gap:12px;
  flex-wrap:wrap;
}

.idprefix{
  color:#555;
  font-weight:600;
}

.idtoken{
  display:inline-flex;
  align-items:center;
  background:#111;
  color:#fff;
  border-radius:12px;
  padding:10px 12px;
  font-size:22px;
  font-weight:900;
  letter-spacing:1px;
  line-height:1;
}

.idbadge{
  display:inline-flex;
  align-items:center;
  gap:8px;
  background:#f2f2f2;
  border:1px solid #ddd;
  color:#111;
  border-radius:999px;
  padding:6px 10px;
  font-weight:800;
  white-space:nowrap;
}

.arrow{
  font-size:18px;
  line-height:1;
}

/* File meta row on landing: keep it readable on mobile */
.fileRow{
  justify-content:flex-start;
  align-items:flex-start;
}

.filename{
  min-width:0;
  overflow-wrap:anywhere;
  word-break:break-word;
  line-height:1.2;
  cursor:pointer;
  display:-webkit-box;
  -webkit-line-clamp:2;
  -webkit-box-orient:vertical;
  overflow:hidden;
}

.filename.is-open{
  -webkit-line-clamp:unset;
  overflow:visible;
}

/* Expires block: push it to the right when there is space */
.expires{
  margin-left:auto;
}

/* Boss / Ad block */
.bosswrap{
  margin:22px auto 0;
  display:flex;
  justify-content:center;
}

.bossbox{
  width:100%;
  border:1px solid #e3e3e3;
  border-radius:14px;
  padding:10px;
  background:#fff;
  box-sizing:border-box;
}

.bossbox svg{
  display:block;
  width:100%;
  max-width:100%;
  height:auto;
}

/* Mobile tweaks */
@media (max-width:480px){
  body{ margin:24px auto; }
  .drop{ padding:20px; }
  .idtoken{ font-size:20px; }
  .btn{ width:auto; }
  .expires{ margin-left:0; }
}
/* Text publish UI */
.textArea{
  width:100%;
  resize:vertical;
  min-height:140px;
  padding:12px;
  border:1px solid #ccc;
  border-radius:12px;
  font: 14px/1.4 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono","Courier New", monospace;
  box-sizing:border-box;
}

.textOut{
  margin-top:12px;
}

body[data-kind="file"] .kind-text { display:none; }
body[data-kind="text"] .kind-file { display:none; }

.textCard{
  margin-top:12px;
  border:1px solid #e7e7e7;
  border-radius:14px;
  padding:14px;
  background:#fff;
}

.textTitle{
  font-weight:800;
  margin-bottom:10px;
}

.textContent{
  overflow-wrap:anywhere;
  word-break:break-word;
}

.textContent pre{
  white-space:pre-wrap;
  word-break:break-word;
}

.textContent a{
  word-break:break-word;
}
.brandLink,
.brandLink:visited,
.brandLink:hover,
.brandLink:active{
  color: inherit;          /* no color change */
  text-decoration: none;   /* no underline */
}

.brandLink:hover{
  text-decoration: none;   /* keep same on hover */
}
