/* Homepage only (index.html). Shared shell + panels live in style.css.
   Layout: Sections sidebar | content panels (main.bare) | profile column (.home-right). */

/* ─────────────────────────────── COLUMNS ─────────────────────────────── */
.home-right { flex: 0 0 236px; width: 236px; min-width: 0; }

/* ─────────────────────────── ANNOUNCEMENT BAR ─────────────────────────── */
.alert {
    display: flex; align-items: center; gap: 10px;
    margin: 14px 16px 0; padding: 7px 10px;
    background: var(--alert-bg); border: 1px solid var(--alert-line); border-radius: 6px;
}
.alert[hidden] { display: none; }
.pill {
    flex: 0 0 auto; font: bold 10px var(--ui-font); color: #fff; background: var(--gloss-orange);
    padding: 1px 7px; border-radius: 9px; text-shadow: 0 1px 0 #a24a00;
}
.alert a { font-weight: bold; }
.alert button {
    margin-left: auto; border: 0; background: none; padding: 0 4px; cursor: pointer;
    font: bold 14px var(--ui-font); color: var(--alert-ink);
}
.alert button:hover { color: var(--ink); }

/* ─────────────────────────────── WELCOME ─────────────────────────────── */
.welcome { overflow: hidden; }
.welcome h1 { margin: 2px 0 6px; font-size: 22px; }
.welcome h1 span { color: var(--orange); }
.polaroid {
    float: right; width: 236px; margin: 8px 4px 10px 16px; padding: 6px 6px 8px; background: #fff;
    box-shadow: 0 3px 10px rgba(0,0,0,.25); transform: rotate(2.5deg); position: relative;
}
.polaroid::before { /* tape */
    content: ""; position: absolute; top: -9px; left: 50%; width: 70px; height: 18px; margin-left: -35px;
    background: rgba(255,240,170,.75); transform: rotate(-4deg); box-shadow: 0 1px 2px rgba(0,0,0,.15);
}
.polaroid img { display: block; aspect-ratio: 4/3; object-fit: cover; width: 100%; }
.polaroid figcaption { font: italic 11px Georgia, serif; color: #555; text-align: center; margin-top: 5px; }

/* ─────────────────────── TOY CAROUSEL (scroll-snap) ─────────────────────── */
.carousel { position: relative; }
.track {
    display: grid; grid-auto-flow: column; grid-auto-columns: calc((100% - 20px) / 3); gap: 10px;
    overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth; padding: 2px 2px 10px;
    scrollbar-width: thin;
}
.toy {
    scroll-snap-align: start; background: var(--card); border: 1px solid var(--line); border-radius: 8px;
    overflow: hidden; text-decoration: none; color: var(--ink); transition: transform .15s, box-shadow .15s;
}
.toy:hover { transform: translateY(-3px); box-shadow: 0 6px 14px rgba(11,31,92,.18); color: var(--ink); }
.toy img { display: block; width: 100%; aspect-ratio: 16/10; object-fit: cover; background: #000; }
.toy b { display: block; padding: 6px 8px 0; color: var(--blue); font: bold 12px var(--head-font); }
.toy small { display: block; padding: 0 8px 8px; color: var(--muted); font-size: 10px; line-height: 1.4; }
.arrow {
    position: absolute; top: 34%; z-index: 2; width: 28px; height: 28px; border-radius: 50%;
    border: 1px solid #1a4aa8; background: var(--gloss-blue); color: #fff; cursor: pointer;
    font: bold 14px/26px var(--ui-font); text-align: center; padding: 0; box-shadow: 0 2px 4px rgba(0,0,0,.3);
}
.arrow.l { left: -10px; }
.arrow.r { right: -10px; }
.arrow:hover { background: var(--gloss-orange); border-color: #c25e00; }

/* ─────────────────────────── INTERESTS TABLE ─────────────────────────── */
.interests { width: 100%; border-collapse: separate; border-spacing: 0 3px; }
.interests td { padding: 5px 8px; vertical-align: top; background: var(--card); }
.interests td:first-child { width: 96px; font-weight: bold; color: #fff; background: var(--label); border-radius: 4px 0 0 4px; }
.interests td:last-child { border: 1px solid var(--line); border-left: 0; border-radius: 0 4px 4px 0; }

/* ─────────────────────────── RIGHT: PROFILE ─────────────────────────── */
.profile { text-align: center; padding: 12px 10px 10px; }
.avatar {
    width: 112px; height: 112px; margin: 0 auto 8px; border-radius: 10px; padding: 6px;
    background: radial-gradient(circle at 50% 30%, #2f6ad8, #061544);
    border: 3px solid var(--card); box-shadow: 0 0 0 1px var(--line), 0 3px 8px rgba(0,0,0,.25);
}
.avatar img { display: block; width: 100%; height: 100%; object-fit: cover; }
.profile h2 { margin: 0; font-size: 17px; }
.profile .role { color: var(--muted); font-size: 11px; margin: 2px 0 8px; }
.online { display: inline-flex; align-items: center; gap: 6px; font-weight: bold; color: var(--ok); font-size: 11px; }
.online i {
    width: 9px; height: 9px; border-radius: 50%; background: var(--lime);
    box-shadow: 0 0 0 0 rgba(108,201,58,.7); animation: ping 1.8s infinite;
}
@keyframes ping {
    70% { box-shadow: 0 0 0 7px rgba(108,201,58,0); }
    100% { box-shadow: 0 0 0 0 rgba(108,201,58,0); }
}
.facts { text-align: left; margin: 10px 0 0; padding: 8px 0 0; border-top: 1px dotted var(--line); font-size: 11px; }
.facts div { display: flex; justify-content: space-between; gap: 8px; padding: 1px 0; }
.facts span { color: var(--muted); }

/* ──────────────────── RIGHT: NOW PLAYING (from now.json) ──────────────────── */
/* A little dark "player" screen in both themes. */
.player { background: linear-gradient(#1a2a5a, #0a1436); color: #dfe8ff; padding: 10px; }
.player .row { display: flex; gap: 10px; align-items: center; }
.player .art {
    width: 54px; height: 54px; flex: 0 0 auto; border-radius: 4px; object-fit: cover;
    border: 1px solid #000; box-shadow: 0 0 0 1px rgba(255,255,255,.15);
}
.player .art[hidden] { display: none; }
.player .lbl { font-size: 9px; letter-spacing: 1px; color: var(--sky); }
.player b { display: block; color: #fff; font-size: 12px; line-height: 1.3; }
.player small { color: #9fb4e0; }
.eq { display: flex; gap: 2px; align-items: flex-end; height: 14px; margin-left: auto; flex: 0 0 auto; align-self: flex-start; }
.eq i { width: 3px; background: var(--lime); animation: eq 1s ease-in-out infinite; }
.eq i:nth-child(2) { animation-delay: -.3s; }
.eq i:nth-child(3) { animation-delay: -.6s; }
.eq i:nth-child(4) { animation-delay: -.15s; }
@keyframes eq { 0%, 100% { height: 3px; } 50% { height: 14px; } }
.player ul { list-style: none; margin: 10px 0 0; padding: 8px 0 0; border-top: 1px solid rgba(255,255,255,.12); font-size: 11px; }
.player li { display: flex; gap: 6px; padding: 2px 0; }
.player li span { color: var(--sky); width: 62px; flex: 0 0 auto; }

/* ─────────────────────── RIGHT: CAT OF THE DAY + SAY HI ─────────────────────── */
.cotd { display: block; padding: 10px; text-align: center; text-decoration: none; color: var(--ink); }
.cotd:hover { color: var(--ink); }
.cotd img {
    display: block; width: 100%; aspect-ratio: 1; object-fit: cover; object-position: 50% 30%; margin-bottom: 6px;
    border-radius: 6px; border: 2px solid var(--card); box-shadow: 0 0 0 1px var(--line); transition: transform .15s;
}
.cotd:hover img { transform: rotate(-2deg) scale(1.03); }
.cotd b { display: block; font: bold 15px var(--head-font); color: var(--navy); }
.cotd small { display: block; font-size: 11px; line-height: 1.45; color: var(--muted); margin: 2px 0 4px; }
.cotd-go { font-size: 11px; font-weight: bold; color: var(--blue); }
.cotd:hover .cotd-go { color: var(--orange); }
.say-where { display: block; text-align: left; }

/* ═══════════════════════════════ MOTION + MOBILE ═══════════════════════════════ */
@media (prefers-reduced-motion: reduce) {
    .online i, .eq i { animation: none; }
    .eq i { height: 8px; }
    .track { scroll-behavior: auto; }
    .toy, .cotd img { transition: none; }
}

/* Tablet: the shared sidebar spans the top (as on every page); content + profile sit side by side. */
@media (max-width: 900px) {
    #flex.home-cols { display: grid; grid-template-columns: minmax(0, 1fr) 236px; }
    #flex.home-cols > sideBar { grid-column: 1 / -1; }
    .home-right { width: auto; }
    .polaroid { width: 180px; }
    .track { grid-auto-columns: calc((100% - 10px) / 2); }
}

/* Phone: one column -- sidebar, content, then the profile column. */
@media (max-width: 680px) {
    #flex.home-cols { grid-template-columns: minmax(0, 1fr); }
    .alert { margin: 10px 8px 0; }
    .polaroid { float: none; width: auto; margin: 6px 6px 12px; transform: rotate(1deg); }
    .track { grid-auto-columns: 70%; }
    .arrow { display: none; }
}
