.essays-scene {
  position: absolute; inset: 0; display: grid;
  grid-template-rows: auto minmax(0, 1fr); gap: 18px;
  padding: clamp(16px, 3vw, 44px); visibility: hidden;
  color: #dce9eb; overflow: hidden;
  font-family: 'Terminal Pixel', 'Fusion Pixel SC', monospace;
}
.essays-scene[hidden] { display: none; }
.essays-scene.is-visible { visibility: visible; }
.essays-header { display: flex; align-items: center; gap: 20px; padding-right: 220px; min-height: 32px; }
.essays-back { position: static; flex-shrink: 0; }
.essays-header h2 { margin: 0; font: 400 clamp(20px, 2.3vw, 32px)/1.2 'Terminal Pixel', 'Fusion Pixel SC', monospace; }
.essays-shell { min-height: 0; display: grid; grid-template-rows: auto minmax(0, 1fr) auto; border: 1px solid #526c7a; background: rgb(2 9 18 / 90%); box-shadow: inset 0 0 40px #79dfff08; }
.essays-toolbar { display: flex; align-items: center; gap: 8px; padding: 4px 12px; border-bottom: 1px solid #344b5a; background: #0c1724; font-family: 'Terminal Pixel', 'Fusion Pixel SC', monospace; }
.essays-toolbar button, .essay-month-nav button { border: 0; background: transparent; color: #8ca4b4; font: inherit; padding: 6px; cursor: var(--cursor-pointer, pointer); }
.essays-toolbar button:hover, .essays-toolbar button:focus-visible, .essays-toolbar button[aria-pressed='true'], .essay-month-nav button:hover, .essay-month-nav button:focus-visible { color: #89ecff; outline: none; text-shadow: 0 0 8px #89ecff55; }
.essay-tool-art { margin: 0; color: inherit; font: 1.25px/.75px 'Local Cascadia Mono', monospace; letter-spacing: 0; white-space: pre; pointer-events: none; }
.essays-view-name { margin-left: 8px; font-size: 18px; color: #9ab3c2; }
.essays-clock { margin-left: auto; font-size: 18px; white-space: nowrap; color: #b6c6d1; font-variant-numeric: tabular-nums; }
.essays-content { min-height: 0; overflow: auto; padding: clamp(16px, 3vw, 36px); }
.essays-status { border-top: 1px solid #344b5a; padding: 8px 16px; color: #8095a7; font-size: 12px; }
.essay-calendar { max-width: 840px; margin: 0 auto; }
.essays-content.is-calendar { display: flex; align-items: center; justify-content: center; overflow: hidden; container-type: size; }
.is-calendar .essay-calendar {
  --calendar-cols: 7; --calendar-rows: 6; --calendar-weekday: 24px;
  --calendar-gap: clamp(3px, 1cqh, 10px); --calendar-gap-rows: var(--calendar-rows);
  --calendar-cell: min(110px, calc((100cqw - (var(--calendar-cols) - 1) * var(--calendar-gap)) / var(--calendar-cols)), calc((100cqh - 52px - var(--calendar-weekday) - var(--calendar-gap-rows) * var(--calendar-gap)) / var(--calendar-rows)));
  display: grid; grid-template-rows: 40px auto; gap: 12px; width: max-content; height: auto; min-height: 0; max-width: 100%; margin: 0;
}
.is-calendar .essay-calendar.is-period-picker { --calendar-cols: 4; --calendar-rows: 3; --calendar-weekday: 0px; --calendar-gap-rows: calc(var(--calendar-rows) - 1); }
.is-calendar .essay-month-nav { height: 40px; min-width: 0; margin: 0; gap: 4px; }
.is-calendar .essay-month-nav h3 { font-size: clamp(12px, 3cqh, 26px); white-space: nowrap; }
.is-calendar .essay-month-nav button { padding: 4px; font-size: clamp(10px, 2.5cqh, 16px); }
.is-calendar .essay-calendar-grid { min-height: 0; grid-template-columns: repeat(7, var(--calendar-cell)); grid-template-rows: 24px repeat(var(--calendar-rows), var(--calendar-cell)); gap: var(--calendar-gap); }
.is-calendar .essay-day { width: 100%; height: 100%; aspect-ratio: 1; min-height: 0; font-size: clamp(10px, 3.5cqh, 22px); line-height: 1; }
.is-calendar .essay-weekday { padding: 0; align-content: center; }
.essay-period-grid { display: grid; min-height: 0; grid-template-columns: repeat(var(--calendar-cols), var(--calendar-cell)); grid-auto-rows: var(--calendar-cell); gap: var(--calendar-gap); }
.essay-period-cell { border: 1px solid #22323f; background: #0a1420; color: #637586; font: 400 clamp(14px, 4cqh, 26px)/1 'Terminal Pixel', 'Fusion Pixel SC', monospace; cursor: var(--cursor-pointer, pointer); }
.essay-period-cell.has-essays { color: #a5f5d0; border-color: #579c8a; background: #102b2c; text-shadow: 0 0 14px #79efaa55; }
.essay-period-cell:hover, .essay-period-cell:focus-visible { color: #effff8; outline: 1px solid #89ecff; outline-offset: -2px; }
.essay-month-nav .essay-period { padding: 3px 8px; color: #c9e8ec; }
.essay-period:disabled { cursor: default; }
.essay-month-nav button:disabled { opacity: .45; cursor: default; }
.essay-month-nav button:disabled:hover { outline: none; color: #8ca4b4; }
.essay-month-nav { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 24px; }
.essay-month-nav h3 { font-size: clamp(20px, 3vw, 30px); margin: 0; font-weight: 400; color: #c9e8ec; }
.essay-calendar-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: clamp(4px, 1vw, 12px); }
.essay-weekday { text-align: center; padding: 8px 0; color: #8095a7; font-size: 12px; }
.essay-day { position: relative; height: clamp(42px, 7vh, 70px); min-height: 42px; border: 1px solid #22323f; background: #0a1420; color: #637586; font: inherit; font-size: clamp(14px, 2vw, 22px); }
.essay-day.has-essays { color: #a5f5d0; border-color: #579c8a; background: #102b2c; cursor: var(--cursor-pointer, pointer); text-shadow: 0 0 14px #79efaa55; }
.essay-day.has-essays:hover, .essay-day.has-essays:focus-visible { color: #effff8; background: #1a3c3d; outline: 1px solid #89ecff; }
.essay-day.is-today::after { content: ''; position: absolute; bottom: 5px; left: 35%; right: 35%; height: 2px; background: #89ecff; }
.essay-day.is-selected { border-color: #89ecff; }
.essay-day-count { position: absolute; top: 4px; right: 5px; font-size: 10px; }
.essay-month-nav h3, .essay-weekday, .essay-day { font-family: 'Terminal Pixel', 'Fusion Pixel SC', monospace; font-weight: 400; }
.essay-list { max-width: 1000px; margin: 0 auto; display: grid; gap: 12px; }
.essay-list-heading { margin: 0 0 16px; font-weight: 400; color: #89ecff; }
.essay-content-heading { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.essay-content-heading .essay-list-heading { margin: 0; }
.essays-content-back { padding: 4px 0; border: 0; background: transparent; color: #89ecff; font: inherit; cursor: var(--cursor-pointer, pointer); }
.essays-content-back:hover, .essays-content-back:focus-visible { color: #dffaff; outline: none; text-shadow: 0 0 8px #89ecff55; }
.essay-grid { display: grid; grid-template-columns: repeat(auto-fill, 300px); min-width: 300px; gap: 20px; align-items: start; justify-content: start; }
.essay-card { width: 100%; text-align: left; border: 1px solid #344b5a; background: #0b1723; color: inherit; padding: 22px; display: flex; flex-direction: column; gap: 18px; min-width: 0; cursor: var(--cursor-pointer, pointer); font: inherit; }
.essay-card:hover, .essay-card:focus-visible { border-color: #89ecff; background: #10202e; outline: 1px solid #89ecff; outline-offset: 2px; }
.essay-card h3 { margin: 0; font-size: 18px; line-height: 1.6; font-weight: 400; color: #b3f4c8; overflow-wrap: anywhere; }
.essay-pinned { color: #e8cf91; font-size: 12px; letter-spacing: .08em; }
.essay-card-body { flex: 1; margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.9; font-size: 14px; color: #b6c6d1; }
.essay-grid .essay-card { width: 300px; height: 240px; padding: 16px; overflow: hidden; gap: 8px; }
.essay-grid .essay-card h3 { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; flex: 0 0 auto; line-height: 1.4; }
.essay-grid .essay-pinned, .essay-grid .essay-card time { flex-shrink: 0; }
.essay-grid .essay-card-body { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden; flex: 0 0 auto; max-height: calc(3 * 1.9 * 14px); }
.essay-grid .essay-card time { margin-top: auto; }
.essay-modal { position: fixed; inset: 0; margin: auto; width: min(860px, calc(100vw - 32px)); height: min(720px, calc(100dvh - 48px)); max-width: none; max-height: none; padding: 0; border: 1px solid #638e9e; color: #dce9eb; background: #07131f; box-shadow: 0 0 40px #89ecff1a; font-family: 'Terminal Pixel', 'Fusion Pixel SC', monospace; overflow: hidden; }
.essay-modal[open] { display: grid; grid-template-rows: auto minmax(0, 1fr); }
.essay-modal::backdrop { background: rgb(1 5 14 / 85%); }
.essay-modal-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 18px 24px; border-bottom: 1px solid #344b5a; background: #0c1724; }
.essay-modal-header h3 { margin: 0; color: #b3f4c8; font-size: clamp(18px, 2.3vw, 26px); font-weight: 400; line-height: 1.5; overflow-wrap: anywhere; max-height: 4.5em; overflow-y: auto; }
.essay-modal-close { flex-shrink: 0; padding: 4px; border: 0; background: transparent; color: #89ecff; font: inherit; cursor: var(--cursor-pointer, pointer); }
.essay-modal-close:hover, .essay-modal-close:focus-visible { color: #dffaff; outline: none; text-shadow: 0 0 8px #89ecff55; }
.essay-modal-body { min-height: 0; padding: clamp(16px, 3vw, 32px); overflow-y: auto; }
.essay-modal-body:focus-visible { outline: none; }
.essay-modal-body .essay-pinned { display: block; margin-bottom: 12px; }
.essay-modal-body .essay-detail p:last-child { margin-bottom: 0; }
.essay-card time, .essay-detail time { color: #829aaa; font-size: 12px; }
.essay-list .essay-card { gap: 8px; }
.essay-list .essay-card-body { display: none; }
.essay-detail { max-width: 860px; margin: 0 auto; }
.essay-detail h3 { margin: 12px 0 24px; color: #b3f4c8; font-size: clamp(22px, 3vw, 32px); font-weight: 400; line-height: 1.6; overflow-wrap: anywhere; }
.essay-detail p { margin: 28px 0; white-space: pre-wrap; overflow-wrap: anywhere; line-height: 2.1; font-size: clamp(15px, 1.2vw, 18px); }
.essay-detail p, .essay-detail h3, .essay-card-body { user-select: text; -webkit-user-select: text; }
.essay-detail ::selection, .essay-card-body::selection { background: #234b59; color: #fff; }
.essay-empty { padding: 32px 0; color: #829aaa; line-height: 1.8; }
.essays-content, .site-updates-list, .essay-modal-body, .essay-modal-header h3 { scrollbar-width: thin; scrollbar-color: #638e9e #0a1420; }
.essays-content::-webkit-scrollbar, .site-updates-list::-webkit-scrollbar, .essay-modal-body::-webkit-scrollbar, .essay-modal-header h3::-webkit-scrollbar { width: 8px; }
.essays-content::-webkit-scrollbar-track, .site-updates-list::-webkit-scrollbar-track, .essay-modal-body::-webkit-scrollbar-track, .essay-modal-header h3::-webkit-scrollbar-track { background: #0a1420; }
.essays-content::-webkit-scrollbar-thumb, .site-updates-list::-webkit-scrollbar-thumb, .essay-modal-body::-webkit-scrollbar-thumb, .essay-modal-header h3::-webkit-scrollbar-thumb { background: #638e9e; border: 2px solid #0a1420; }
.site-updates { position: fixed; z-index: 1800; top: 62px; right: clamp(12px, 2.5vw, 28px); width: min(440px, calc(100vw - 24px)); max-height: calc(100dvh - var(--site-footer-height) - 80px); display: flex; flex-direction: column; border: 1px solid #526c7a; background: #07131f; box-shadow: 0 12px 40px #0009; color: #dce9eb; font-family: 'Terminal Pixel', 'Fusion Pixel SC', monospace; }
.site-updates[hidden] { display: none; }
.site-updates-header { display: flex; justify-content: space-between; align-items: center; flex-shrink: 0; padding: 12px 16px; border-bottom: 1px solid #344b5a; }
.site-updates-header h2 { margin: 0; font-size: 17px; font-weight: 400; color: #b3f4c8; }
.site-updates-close { font: inherit; background: transparent; border: 0; color: #89ecff; padding: 6px; cursor: var(--cursor-pointer, pointer); }
.site-updates-list { min-height: 0; overflow-y: auto; padding: 0; }
.site-updates-list > .essay-empty { padding-inline: 16px; }
.site-update { width: 100%; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 16px; padding: 18px 16px; border: 0; border-bottom: 1px solid #344b5a; background: transparent; color: #b3f4c8; text-align: left; font: inherit; cursor: var(--cursor-pointer, pointer); }
.site-update-title { font-size: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.site-update time { font-size: 12px; color: #829aaa; white-space: nowrap; }
.site-update:hover, .site-update:focus-visible { color: #dffaff; background: #10202e; outline: none; }
.site-update.is-pinned { color: #e8cf91; }
.site-update-ascii { margin: 0; color: inherit; font: 1.25px/.75px 'Local Cascadia Mono', monospace; letter-spacing: 0; white-space: pre; pointer-events: none; }
@media (max-width: 600px) {
  .essays-scene { padding: 66px 12px 12px; gap: 12px; }
  .essays-header { padding-right: 0; gap: 16px; }
  .essays-header h2 { font-size: 22px; }
  .essays-content { padding: 16px 12px; }
  .essay-card { padding: 16px; }
  .essay-month-nav { margin-bottom: 14px; }
  .essay-day { height: 42px; }
  .site-updates { top: 48px; max-height: calc(100dvh - var(--site-footer-height) - 60px); }
}
@media (max-aspect-ratio: 1/1) {
  .essay-grid { grid-template-columns: minmax(0, 1fr); min-width: 0; gap: 12px; }
  .essay-grid .essay-card { width: 100%; height: auto; min-height: 0; padding: 16px; gap: 8px; }
  .essay-grid .essay-card-body { display: none; }
  .essays-scene { padding: clamp(12px, 2.5vh, 24px) 12px 12px; gap: 12px; }
  .essays-header { padding-right: clamp(112px, 27vw, 170px); gap: 10px; min-height: 32px; }
  .essays-header h2 { font-size: clamp(16px, 4vw, 22px); white-space: nowrap; }
  .essays-back { font-size: clamp(12px, 3.2vw, 16px); white-space: nowrap; }
  .essays-shell { grid-template-columns: minmax(0, 1fr) 64px; grid-template-rows: minmax(0, 1fr) auto; }
  .essays-toolbar { grid-column: 2; grid-row: 1 / -1; flex-direction: column; padding: 4px; gap: 8px; min-height: 0; border-bottom: 0; border-left: 1px solid #344b5a; overflow: hidden; }
  .essays-content { grid-column: 1; grid-row: 1; padding: 12px 8px; min-width: 0; }
  .essays-status { grid-column: 1; grid-row: 2; }
  .essays-toolbar button { width: 100%; min-height: 36px; display: flex; justify-content: center; align-items: center; padding: 4px 2px; }
  .essays-view-name { writing-mode: vertical-rl; margin: 8px 0 0; font-size: 18px; }
  .essays-clock { writing-mode: vertical-rl; margin: auto 0 0; padding: 8px 0; font-size: 16px; }
  .is-calendar .essay-calendar.is-period-picker { --calendar-cols: 3; --calendar-rows: 4; }
  .essay-month-nav { gap: 4px; }
  .essay-month-nav h3 { font-size: clamp(16px, 4vw, 24px); }
  .essay-month-nav button { padding: 4px; }
  .essay-day-count { top: 3px; right: 3px; font-size: 9px; }
}
@media (max-height: 600px) and (min-aspect-ratio: 1/1) {
  .essays-scene { padding: 12px 20px; gap: 8px; }
  .essays-header { min-height: 28px; }
  .essays-header h2 { font-size: 22px; }
  .essays-content.is-calendar { padding: 8px; }
}
@media (max-aspect-ratio: 1/1) and (max-width: 520px), (orientation: portrait) and (max-height: 620px) {
  .essays-scene { padding-top: 8px; }
}
@media (max-width: 360px) and (orientation: portrait) {
  .essays-header { gap: 6px; }
  .essays-header h2 { font-size: 14px; }
  .essays-back { padding-inline: 0; font-size: 11px; }
}
