/* Daily log — same navy, blue and violet palette as the rest of the site. */
.daily-page { min-height: 100vh; }

.back-container {
    max-width: 1100px;
    margin: 24px auto 0;
    padding: 0 24px;
}
.back-button {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 9px 14px;
    border: 1px solid var(--border);
    border-radius: 11px;
    color: var(--muted);
    background: rgba(255,255,255,.035);
    text-decoration: none;
    transition: color .18s ease, background .18s ease, border-color .18s ease, transform .18s ease;
}
.back-button span { color: var(--accent); font-size: 1.1rem; transition: transform .18s ease; }
.back-button:hover {
    color: var(--text);
    background: rgba(110,168,254,.08);
    border-color: rgba(110,168,254,.22);
    transform: translateX(-2px);
}
.back-button:hover span { transform: translateX(-2px); }

.page-header {
    max-width: 1100px;
    margin: 28px auto 26px;
    padding: 0 24px;
    text-align: left;
}
.daily-kicker {
    display: flex;
    align-items: center;
    gap: 9px;
    margin-bottom: 10px;
    color: var(--muted);
    font-size: .75rem;
    font-weight: 650;
    letter-spacing: .09em;
    text-transform: uppercase;
}
.daily-kicker span {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 12px rgba(110,168,254,.3);
}
.page-header h1 {
    margin: 0;
    color: var(--text);
    font-size: clamp(2.1rem, 4.5vw, 3rem);
    letter-spacing: -.045em;
    line-height: 1.1;
}
.page-header h1 span { color: var(--accent); }

.daily-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px 44px;
}
.calendar-card {
    padding: clamp(18px, 3vw, 30px);
    border: 1px solid var(--border);
    border-radius: 20px;
    background: linear-gradient(145deg, rgba(22,29,49,.96), rgba(15,22,39,.94));
    box-shadow: var(--shadow);
}
.calendar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 12px;
}
.calendar-eyebrow {
    margin-bottom: 3px;
    color: var(--muted);
    font-size: .7rem;
    font-weight: 650;
    letter-spacing: .1em;
    text-transform: uppercase;
}
.calendar-header h2 {
    margin: 0;
    color: var(--text);
    font-size: clamp(1.5rem, 3.5vw, 2rem);
    line-height: 1.2;
    letter-spacing: -.035em;
}
.calendar-controls { display: flex; align-items: center; gap: 7px; }
.calendar-controls button {
    display: inline-grid;
    place-items: center;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 1px solid var(--border);
    border-radius: 11px;
    color: var(--text);
    background: rgba(255,255,255,.04);
    box-shadow: none;
    font-size: 1.6rem;
    line-height: 1;
}
.calendar-controls button:hover {
    transform: translateY(-1px);
    border-color: rgba(110,168,254,.28);
    background: rgba(110,168,254,.1);
    box-shadow: 0 6px 16px rgba(0,0,0,.16);
}
.calendar-controls .calendar-today {
    width: auto;
    padding: 0 13px;
    color: var(--accent);
    font-size: .78rem;
    font-weight: 650;
}
.calendar-hint { margin: 0 0 18px; color: var(--muted); font-size: .8rem; }
.weekday-row, .calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: clamp(5px, 1.2vw, 12px);
}
.weekday-row {
    margin-bottom: 9px;
    color: var(--muted);
    font-size: .75rem;
    font-weight: 650;
    letter-spacing: .04em;
    text-align: center;
    text-transform: uppercase;
}
.weekday-row span { padding: 5px 0; }
.calendar-grid { row-gap: clamp(5px, 1.2vw, 12px); }
.day-cell {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-width: 0;
    aspect-ratio: 1;
    padding: 0;
    border: 1px solid transparent;
    border-radius: 12px;
    font-family: inherit;
    font-size: .92rem;
    font-weight: 650;
    font-variant-numeric: tabular-nums;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    transition: transform .16s ease, filter .16s ease, box-shadow .16s ease, border-color .16s ease;
}
.day-cell:hover {
    transform: translateY(-2px);
    filter: brightness(1.06);
    box-shadow: 0 8px 16px rgba(0,0,0,.2);
}
.day-cell:active { transform: scale(.97); }
.day-cell:focus-visible { position: relative; z-index: 1; outline: 2px solid var(--accent); outline-offset: 2px; }
.today { outline: 2px solid var(--accent); outline-offset: -3px; box-shadow: inset 0 0 0 1px rgba(110,168,254,.16); }
.excellent { background: #22c55e; color: #fff; }
.good { background: #eab308; color: #111827; }
.average { background: var(--accent2); color: #fff; }
.poor { background: #7f1d35; color: #fff; border-color: rgba(248,113,113,.28); }
.nostudy { background: #f8fafc; color: #475569; border-color: #d1d5db; }
.missing { background: #334155; color: #e2e8f0; }
.future { background: rgba(15,23,42,.72); color: #718096; border-color: rgba(255,255,255,.035); }
.empty { visibility: hidden; }

.calendar-legend {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px 17px;
    margin-top: 22px;
    padding-top: 17px;
    border-top: 1px solid var(--border);
}
.legend-item { display: inline-flex; align-items: center; gap: 7px; color: var(--muted); font-size: .74rem; }
.legend-dot { width: 8px; height: 8px; border-radius: 3px; background: #334155; }
.excellent-dot { background: #22c55e; }
.good-dot { background: #eab308; }
.average-dot { background: var(--accent2); }
.poor-dot { background: #7f1d35; }
.nostudy-dot { background: #f8fafc; border: 1px solid #cbd5e1; }
.missing-dot { background: #334155; }
.future-dot { background: #0f172a; border: 1px solid rgba(255,255,255,.15); }

.day-tooltip {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 9999;
    width: min(290px, calc(100vw - 24px));
    max-height: min(62vh, 390px);
    overflow-y: auto;
    padding: 17px 18px;
    border: 1px solid rgba(110,168,254,.2);
    border-radius: 15px;
    color: var(--text);
    background: rgba(14,20,36,.97);
    box-shadow: 0 22px 55px rgba(0,0,0,.48);
    backdrop-filter: blur(18px);
    pointer-events: none;
    transition: opacity .16s ease, transform .16s ease, visibility .16s ease;
}
.day-tooltip h3 {
    margin: 0 0 11px;
    padding-bottom: 9px;
    border-bottom: 1px solid var(--border);
    color: var(--text);
    font-size: .96rem;
    font-weight: 650;
}
.day-tooltip p, #tipTopics {
    margin: 7px 0;
    color: #d8deeb;
    font-size: .82rem;
    line-height: 1.65;
    overflow-wrap: anywhere;
}
#tipTopics strong { color: var(--accent); }
.hidden { opacity: 0; visibility: hidden; transform: translateY(6px); }

@media (max-width: 700px) {
    .back-container { margin-top: 18px; padding: 0 16px; }
    .page-header { margin: 25px auto 21px; padding: 0 16px; }
    .page-header h1 { font-size: 2.3rem; }
    .daily-container { padding: 0 12px 30px; }
    .calendar-card { padding: 15px 11px; border-radius: 16px; }
    .calendar-header { align-items: flex-start; gap: 10px; }
    .calendar-header h2 { font-size: 1.4rem; }
    .calendar-controls { gap: 4px; }
    .calendar-controls button { width: 34px; height: 36px; border-radius: 9px; font-size: 1.4rem; }
    .calendar-controls .calendar-today { width: auto; padding: 0 9px; font-size: .72rem; }
    .weekday-row { gap: 4px; font-size: .65rem; }
    .calendar-grid { gap: 5px; row-gap: 6px; }
    .day-cell { border-radius: 9px; font-size: .78rem; }
    .calendar-legend { gap: 9px 12px; margin-top: 17px; padding-top: 14px; }
    .legend-item { font-size: .69rem; }
    .day-tooltip { padding: 14px 15px; }
}

@media (prefers-reduced-motion: reduce) {
    .day-cell, .calendar-controls button, .back-button, .back-button span { transition: none !important; }
}
