body {
    background-color: var(--bg); color: var(--text);
    font-family: 'JetBrains Mono', monospace; margin: 0; padding: 0;
    height: 100vh; height: 100dvh; overflow: hidden; font-size: 16px; cursor: crosshair;
}

/* visible by default; #boot overlays it so content survives without JS */
.interface {
    display: flex;
    width: 100%; max-width: 1000px;
    margin: 0 auto;
    height: 100%;
    flex-direction: column; padding: 40px 20px; box-sizing: border-box;
    position: relative; z-index: 10;
}

header { border-bottom: 1px solid var(--primary); padding-bottom: 20px; margin-bottom: 20px; display: flex; justify-content: space-between; align-items: flex-end; }
.brand { font-size: 32px; font-weight: 800; color: var(--primary); letter-spacing: -2px; text-transform: uppercase; text-shadow: 0 0 10px var(--dim); }
.status { font-size: 11px; color: var(--muted); text-align: right; }
.hl { color: #ff3333; }
.live { animation: blink 1.5s infinite; }
.prompt { color: var(--primary); margin-right: 10px; }
.cursor { animation: blink 0.5s infinite; }

.search-box { display: flex; align-items: center; background: var(--panel); border: 1px solid var(--border); padding: 12px; margin-bottom: 30px; backdrop-filter: blur(5px); cursor: text; transition: border-color 0.2s; }
.search-box:hover { border-color: var(--dim); }
.search-box:focus-within { border-color: var(--primary); box-shadow: 0 0 10px rgba(255, 0, 0, 0.1); }
input { background: transparent; border: none; color: #fff; flex: 1; min-width: 0; outline: none; font-family: inherit; font-size: 16px; text-transform: uppercase; }

.clear-btn {
    color: var(--muted); cursor: pointer; font-weight: bold; padding: 2px 8px;
    border: 1px solid transparent; transition: 0.2s; user-select: none;
}
.clear-btn:hover { color: var(--primary); border: 1px solid var(--primary); background: rgba(255, 0, 0, 0.1); box-shadow: 0 0 5px var(--dim); }
.clear-btn:active { background: var(--primary); color: #000; }

.list-header { display: grid; grid-template-columns: 70px minmax(0, 1fr) 180px 80px; column-gap: 15px; padding: 10px 15px; margin-bottom: 10px; color: var(--muted); font-size: 13px; font-weight: bold; letter-spacing: 1px; border-bottom: 1px dashed var(--border); }
.list-header span:nth-child(3) { text-align: right; padding-right: 10px; }
.list-header span:nth-child(4) { text-align: right; }

.feed { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; padding-right: 5px; scrollbar-width: thin; scrollbar-color: var(--dim) var(--bg); }

.entry { display: grid; grid-template-columns: 70px minmax(0, 1fr) 180px 80px; column-gap: 15px; align-items: center; background: rgba(10, 0, 0, 0.3); border: 1px solid transparent; border-left: 2px solid var(--border); margin-bottom: 8px; padding: 12px 15px; transition: all 0.2s ease; cursor: pointer; opacity: 0; animation: slideIn 0.3s forwards; color: inherit; text-decoration: none; }
.entry:hover { background: rgba(255, 0, 0, 0.05); border-color: var(--dim); border-left-color: var(--primary); transform: translateX(5px); box-shadow: 0 0 15px rgba(255, 0, 0, 0.1); }
.entry:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }

.col-id { color: var(--dim); font-family: monospace; font-weight: bold; font-size: 14px; }
.col-main { display: flex; flex-direction: column; gap: 6px; overflow: hidden; min-width: 0; }
.title { color: var(--text); font-weight: 700; font-size: 17px; transition: 0.2s; word-wrap: break-word; overflow-wrap: break-word; }
.entry:hover .title { color: #ff3333; text-shadow: 0 0 5px var(--dim); }
.desc { color: var(--muted); font-size: 14px; word-wrap: break-word; overflow-wrap: break-word; }
.col-date { text-align: right; color: var(--muted); font-size: 13px; font-family: monospace; }

.tags-container { display: flex; gap: 5px; justify-content: flex-end; flex-wrap: wrap; align-content: flex-start; min-width: 0; overflow: hidden; }
.tag-badge { font-size: 12px; padding: 3px 7px; border: 1px solid var(--border); color: var(--muted); border-radius: 2px; text-transform: uppercase; background: rgba(0,0,0,0.5); transition: 0.2s; cursor: pointer; position: relative; z-index: 0; }
.tag-badge:hover { border-color: var(--primary); background-color: var(--primary); color: #000; font-weight: bold; box-shadow: 0 0 10px var(--primary); }
.tag-badge.wip-tag { border-color: #ffaa00; color: #ffaa00; }
.tag-badge.wip-tag:hover { border-color: #ffaa00; background-color: #ffaa00; color: #000; font-weight: bold; box-shadow: 0 0 10px #ffaa00; }

.footer { margin-top: 20px; border-top: 1px solid var(--border); padding-top: 15px; color: var(--muted); font-size: 13px; display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.footer .socials { display: flex; gap: 10px; flex-wrap: wrap; }
.footer .socials a { color: var(--muted); text-decoration: none; border: 1px solid var(--border); padding: 3px 7px; border-radius: 2px; text-transform: uppercase; background: rgba(0,0,0,0.5); transition: 0.2s; }
.footer .socials a:hover { color: var(--primary); border-color: var(--primary); background: rgba(255,0,0,0.1); box-shadow: 0 0 5px var(--dim); }

#boot { position: fixed; inset: 0; background: var(--bg); z-index: 1000; padding: 40px; display: flex; flex-direction: column; justify-content: end; }

@keyframes slideIn { from { opacity: 0; transform: translateX(-10px); } to { opacity: 1; transform: translateX(0); } }
@keyframes blink { 50% { opacity: 0; } }

@media (max-width: 768px) {
    body { font-size: 12px; height: auto; min-height: 100dvh; overflow-y: auto; cursor: default; }
    .interface { padding: 20px 12px; max-width: 100%; height: auto; min-height: 100dvh; }
    .feed { overflow: visible; padding-right: 0; }
    .brand { font-size: 24px; }
    header { flex-direction: column; align-items: flex-start; gap: 10px; }
    .status { text-align: left; font-size: 10px; }
    .search-box { padding: 12px 10px; margin-bottom: 20px; }
    /* 16px keeps iOS from auto-zooming the page on input focus */
    input { font-size: 16px; }
    .clear-btn { font-size: 12px; padding: 4px 8px; }
    .list-header { display: none; }
    .entry { grid-template-columns: 1fr; gap: 8px; padding: 14px 12px; transform: none !important; }
    .entry:hover { transform: none !important; }
    .col-id { font-size: 11px; }
    .col-main { order: 2; }
    .title { font-size: 15px; }
    .desc { font-size: 12px; }
    .tags-container { order: 3; justify-content: flex-start; flex-wrap: wrap; }
    .tag-badge { font-size: 10px; }
    .col-date { order: 1; text-align: left; font-size: 10px; }
    .footer { font-size: 10px; }
    #boot { padding: 20px; font-size: 11px; overflow: hidden; }
}

@media (prefers-reduced-motion: reduce) {
    .entry { opacity: 1 !important; }
}
