body.live { min-height: 100dvh; display: flex; flex-direction: column; }

.livehead {
  position: sticky; top: 0; z-index: 20;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  padding: 12px 0;
  backdrop-filter: saturate(1.4) blur(6px);
}
.headinner { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.crumb { font-size: .74rem; text-transform: uppercase; letter-spacing: .09em; color: var(--accent); font-weight: 700; }
.decktitle { font-weight: 650; font-size: 1.02rem; letter-spacing: -.01em; }

.pulse { width: 9px; height: 9px; border-radius: 50%; background: var(--ok); flex: none; }
.pulse.live { animation: beat 2.4s ease-in-out infinite; }
.pulse.off { background: var(--ink-3); animation: none; }
@keyframes beat { 0%,100% { opacity: .35; transform: scale(.85); } 50% { opacity: 1; transform: scale(1); } }

main.wrap { flex: 1; padding-top: 22px; padding-bottom: 40px; }
.skeleton { color: var(--ink-3); padding: 40px 0; text-align: center; }

/* waiting state */
.idle { text-align: center; padding: 12vh 0; color: var(--ink-2); }
.idle .dots { font-size: 2rem; color: var(--accent); letter-spacing: .2em; animation: beat 1.8s ease-in-out infinite; }
.idle h2 { margin-top: .6em; color: var(--ink); }

/* card */
.card { animation: rise .28s ease; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.card > h1 { font-size: 1.6rem; margin-bottom: .15em; }
.card .sub { color: var(--ink-2); margin-bottom: 1.4em; }

.item {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 14px;
  overflow: hidden;
}
.item .ihead {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-2);
}
.item .ihead .lbl { font-weight: 650; flex: 1; min-width: 0; }
.item .ihead .kind {
  font-size: .68rem; text-transform: uppercase; letter-spacing: .08em;
  color: var(--ink-3); font-weight: 700;
}

.prompttext {
  margin: 0; padding: 14px;
  white-space: pre-wrap; word-break: break-word;
  font-family: var(--mono); font-size: .88rem; line-height: 1.6;
  max-height: 13.5em; overflow: hidden; position: relative;
}
.prompttext.open { max-height: none; }
.fade {
  position: absolute; left: 0; right: 0; bottom: 0; height: 3.2em;
  background: linear-gradient(to bottom, transparent, var(--surface));
  pointer-events: none;
}
.prompttext.open .fade { display: none; }

.itemactions { display: flex; gap: 8px; padding: 0 14px 14px; flex-wrap: wrap; }

.filerow {
  display: flex; align-items: center; gap: 12px;
  padding: 14px; text-decoration: none; color: inherit;
}
.filerow:hover { background: var(--surface-2); }
.filerow .ficon {
  width: 38px; height: 38px; flex: none; border-radius: 9px;
  display: grid; place-items: center; font-weight: 700; font-size: .68rem;
  letter-spacing: .02em;
}
.filerow .fname { font-weight: 600; overflow-wrap: anywhere; }
.filerow .fmeta { color: var(--ink-3); font-size: .8rem; }
.filerow .arrow { margin-left: auto; color: var(--ink-3); flex: none; }

.notebody { padding: 14px; white-space: pre-wrap; }

.copied { color: var(--ok) !important; border-color: var(--ok) !important; }

/* archive */
.archive { margin-top: 34px; border-top: 1px solid var(--line); padding-top: 18px; }
.archive > summary {
  cursor: pointer; color: var(--ink-2); font-weight: 600; font-size: .9rem;
  list-style: none; display: flex; align-items: center; gap: 8px;
}
.archive > summary::-webkit-details-marker { display: none; }
.archive > summary::before { content: "▸"; transition: transform .15s ease; }
.archive[open] > summary::before { transform: rotate(90deg); }
.archive .arcard { margin-top: 18px; }
.archive .arcard > h2 { font-size: 1.05rem; }

.foot { padding: 18px; text-align: center; opacity: .6; }
