:root {
  --ink: #123c39;
  --muted: #587774;
  --paper: #f4fbfa;
  --tiffany: #81d8d0;
  --tiffany-soft: #dff6f3;
  --tiffany-pale: #edf9f8;
  --tiffany-deep: #087f77;
  --tiffany-dark: #075e58;
  --line: rgba(18, 60, 57, .14);
  --shadow: 0 24px 70px rgba(7, 94, 88, .1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: "DM Sans", sans-serif; background-image: radial-gradient(circle at 15% 0, rgba(129,216,208,.18), transparent 25%), radial-gradient(circle at 90% 42%, rgba(129,216,208,.11), transparent 22%); }
a { color: inherit; }
button { color: inherit; font: inherit; }
a:focus-visible, button:focus-visible { outline: 3px solid rgba(7,143,133,.3); outline-offset: 3px; }
.site-header, main, footer { width: min(1120px, calc(100% - 48px)); margin-inline: auto; }
.site-header { position: relative; z-index: 2; height: 92px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 10px; font: 500 20px "Newsreader", serif; text-decoration: none; }
.brand span { display: grid; place-items: center; width: 31px; height: 31px; background: var(--tiffany); border: 1px solid var(--tiffany-deep); border-radius: 50%; color: var(--tiffany-dark); font-style: italic; box-shadow: 0 0 0 5px rgba(129,216,208,.17); }
nav { display: flex; gap: 28px; }
nav a { color: var(--muted); font-size: 13px; text-decoration: none; transition: color .2s; }
nav a:hover { color: var(--tiffany-deep); }
.write-button { display: inline-flex; align-items: center; gap: 34px; padding: 16px 20px; background: var(--tiffany-dark); color: #fff; border-radius: 3px; box-shadow: 0 10px 28px rgba(7,94,88,.18); font-size: 13px; text-decoration: none; transition: transform .2s, background .2s, box-shadow .2s; }
.write-button:hover { transform: translateY(-2px); background: var(--tiffany-deep); box-shadow: 0 14px 34px rgba(7,94,88,.24); }
.write-button svg { width: 19px; fill: none; stroke: currentColor; stroke-width: 1.5; }
.entries { padding: 58px 7vw 130px; }
.calendar-panel { position: relative; display: grid; grid-template-columns: minmax(180px, .38fr) minmax(0, 1fr); gap: clamp(32px, 5vw, 58px); overflow: hidden; margin-bottom: 78px; padding: 40px 42px 36px; scroll-margin-top: 24px; background: linear-gradient(135deg, rgba(255,255,255,.84), rgba(223,246,243,.68)); border: 1px solid rgba(7,143,133,.18); border-radius: 4px 38px 4px 4px; box-shadow: var(--shadow); }
.calendar-panel::after { content: ""; position: absolute; top: -86px; right: -74px; width: 205px; height: 205px; border: 1px solid rgba(7,143,133,.1); border-radius: 50%; box-shadow: 0 0 0 38px rgba(129,216,208,.06); pointer-events: none; }
.calendar-header, .calendar-body { position: relative; z-index: 1; }
.section-kicker { margin: 0 0 12px; color: var(--tiffany-deep); font-size: 10px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; }
.calendar-header h1 { margin: 0; font: 400 clamp(34px, 4vw, 46px)/1 "Newsreader", serif; letter-spacing: -.025em; }
.calendar-summary { margin: 16px 0 0; color: var(--muted); font: italic 400 16px/1.5 "Newsreader", serif; }
.calendar-controls { display: flex; align-items: center; gap: 8px; margin-top: 28px; }
.calendar-arrow, .calendar-today { display: grid; place-items: center; height: 36px; background: rgba(255,255,255,.7); border: 1px solid rgba(7,143,133,.2); cursor: pointer; transition: color .2s, border-color .2s, background .2s, transform .2s; }
.calendar-arrow { width: 36px; padding: 0; border-radius: 50%; }
.calendar-arrow svg { width: 17px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.7; }
.calendar-today { padding: 0 12px; border-radius: 18px; color: var(--tiffany-dark); font-size: 11px; font-weight: 600; }
.calendar-arrow:hover:not(:disabled), .calendar-today:hover:not(:disabled) { color: var(--tiffany-deep); background: white; border-color: rgba(7,143,133,.42); transform: translateY(-1px); }
.calendar-arrow:disabled, .calendar-today:disabled { color: rgba(98,129,126,.45); background: rgba(255,255,255,.28); cursor: default; }
.calendar-weekdays, .calendar-row { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.calendar-weekdays { gap: 6px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.calendar-weekdays span { color: var(--muted); font-size: 9px; font-weight: 600; letter-spacing: .08em; text-align: center; text-transform: uppercase; }
.calendar-grid { display: flex; flex-direction: column; gap: 6px; padding-top: 10px; }
.calendar-row { gap: 6px; }
.calendar-cell { min-width: 0; }
.calendar-cell.is-placeholder { min-height: 49px; }
.calendar-day { position: relative; display: flex; align-items: flex-start; justify-content: space-between; width: 100%; min-height: 49px; padding: 9px 10px; color: var(--muted); background: rgba(255,255,255,.4); border: 1px solid transparent; border-radius: 9px; font-size: 12px; text-decoration: none; transition: color .2s, background .2s, border-color .2s, transform .2s, box-shadow .2s; }
.calendar-day.is-empty:hover { color: var(--tiffany-dark); background: rgba(255,255,255,.85); border-color: rgba(7,143,133,.22); transform: translateY(-2px); }
.calendar-day.has-entry { color: var(--tiffany-dark); background: var(--tiffany-soft); border-color: rgba(7,143,133,.2); box-shadow: 0 5px 15px rgba(7,94,88,.06); font-weight: 600; }
.calendar-day.has-entry:hover { color: white; background: var(--tiffany-deep); border-color: var(--tiffany-deep); box-shadow: 0 8px 20px rgba(7,94,88,.18); transform: translateY(-2px); }
.calendar-day.is-today { border-color: var(--tiffany-deep); box-shadow: inset 0 0 0 1px rgba(255,255,255,.8); }
.calendar-entry-mark { align-self: flex-end; width: 6px; height: 6px; background: var(--tiffany-deep); border-radius: 50%; box-shadow: 0 0 0 3px rgba(129,216,208,.24); }
.calendar-day.has-entry:hover .calendar-entry-mark { background: white; box-shadow: 0 0 0 3px rgba(255,255,255,.2); }
.calendar-legend, .calendar-noscript { margin: 14px 0 0; color: var(--muted); font-size: 10px; }
.calendar-legend { display: flex; align-items: center; justify-content: flex-end; gap: 8px; }
.calendar-legend i { width: 7px; height: 7px; background: var(--tiffany); border: 1px solid var(--tiffany-deep); border-radius: 50%; }
.section-heading { display: flex; align-items: end; justify-content: space-between; padding-bottom: 24px; border-bottom: 1px solid var(--ink); }
.section-heading h2 { margin: 0; scroll-margin-top: 24px; font: 400 46px "Newsreader", serif; }
.section-controls { display: flex; align-items: center; gap: 26px; }
.section-controls > span { color: var(--muted); font-size: 12px; }
.section-heading .write-button { gap: 22px; padding: 13px 17px; }
.timeline { position: relative; padding-top: 26px; }
.timeline::before { content: ""; position: absolute; top: 0; bottom: 10px; left: 168px; width: 2px; background: linear-gradient(var(--tiffany-deep) 0 54px, rgba(7,143,133,.18) 54px calc(100% - 30px), transparent); }
.timeline-day { display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: 48px; position: relative; padding: 30px 0 34px; }
.day-marker { position: relative; min-height: 82px; padding-right: 32px; text-align: right; }
.day-marker time { display: flex; flex-direction: column; color: var(--muted); font-size: 10px; letter-spacing: .1em; line-height: 1.3; text-transform: uppercase; }
.day-marker time strong { color: var(--ink); font: 400 44px/.9 "Newsreader", serif; letter-spacing: -.03em; }
.day-marker .weekday { margin-bottom: 6px; color: var(--ink); font-weight: 600; }
.timeline-node { position: absolute; z-index: 1; top: 25px; right: -14px; display: grid; place-items: center; width: 28px; height: 28px; background: var(--paper); border: 1px solid rgba(7,143,133,.24); border-radius: 50%; box-shadow: 0 0 0 8px var(--paper); font-style: normal; }
.timeline-node span { color: var(--muted); font: 500 11px "DM Sans", sans-serif; }
.is-written .timeline-node { background: var(--tiffany); border-color: var(--tiffany-deep); box-shadow: 0 0 0 8px var(--paper), 0 8px 20px rgba(7,143,133,.2); }
.is-written .timeline-node span { color: white; }
.is-today .timeline-node { box-shadow: 0 0 0 7px var(--paper), 0 0 0 10px rgba(129,216,208,.35), 0 8px 24px rgba(7,143,133,.2); }
.diary-card { position: relative; min-width: 0; overflow: hidden; padding: 30px 34px 34px; background: rgba(255,255,255,.64); border: 1px solid rgba(7,143,133,.16); border-radius: 4px 28px 4px 4px; box-shadow: 0 13px 35px rgba(7,94,88,.05); backdrop-filter: blur(6px); transition: transform .2s, border-color .2s, background .2s, box-shadow .2s; }
.is-written .diary-card::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 4px; background: linear-gradient(var(--tiffany), var(--tiffany-deep)); }
.is-written .diary-card:hover { transform: translateY(-3px); background: rgba(255,255,255,.86); border-color: rgba(7,143,133,.32); box-shadow: var(--shadow); }
.entry-topline { display: flex; justify-content: flex-end; }
.edit-link { color: var(--muted); font-size: 11px; text-underline-offset: 3px; }
.entry-content { margin-top: 22px; }
.entry-content.has-thumbnail { display: grid; grid-template-columns: minmax(0, 1fr) 156px; gap: 28px; align-items: start; }
.entry-copy { min-width: 0; }
.excerpt { max-width: 680px; max-height: 6.6em; overflow: hidden; color: var(--ink); font: 400 20px/1.65 "Newsreader", serif; }
.excerpt p { display: -webkit-box; overflow: hidden; margin: 0; -webkit-box-orient: vertical; -webkit-line-clamp: 4; }
.excerpt img { display: block; width: auto; max-width: min(150px, 100%); height: auto; max-height: 108px; margin: 14px 0 0; object-fit: contain; background: var(--tiffany-pale); border: 1px solid rgba(7,143,133,.16); border-radius: 10px; }
.entry-thumbnail { position: relative; display: block; aspect-ratio: 4 / 3; overflow: hidden; background: linear-gradient(145deg, var(--tiffany-pale), rgba(255,255,255,.9)); border: 1px solid rgba(7,143,133,.18); border-radius: 12px; text-decoration: none; transition: transform .2s, border-color .2s, box-shadow .2s; }
.entry-thumbnail:hover { border-color: rgba(7,143,133,.42); box-shadow: 0 12px 24px rgba(7,94,88,.12); transform: translateY(-2px); }
.entry-thumbnail img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: center; transition: transform .25s; }
.entry-thumbnail:hover img { transform: scale(1.035); }
.read-link { display: inline-block; margin-top: 20px; color: var(--tiffany-dark); font-size: 12px; font-weight: 600; text-decoration: none; }
.read-link span { margin-left: 8px; }
.post { max-width: 780px; margin: 0 auto; padding: 72px 0 120px; }
.back-link { color: var(--muted); font-size: 12px; text-decoration: none; }
.back-link:hover { color: var(--tiffany-deep); }
.post > header { position: relative; overflow: hidden; margin-top: 55px; padding: 58px 64px 52px; background: linear-gradient(135deg, rgba(223,246,243,.82), rgba(255,255,255,.62)); border: 1px solid rgba(7,143,133,.16); border-radius: 4px 46px 4px 4px; box-shadow: var(--shadow); }
.post > header::after { content: ""; position: absolute; top: -60px; right: -55px; width: 190px; height: 190px; border: 1px solid rgba(7,143,133,.13); border-radius: 50%; box-shadow: 0 0 0 38px rgba(129,216,208,.06); }
.post-date { position: relative; z-index: 1; display: flex; align-items: center; gap: 30px; }
.post-date strong { color: var(--tiffany-deep); font: 400 clamp(88px, 14vw, 138px)/.72 "Newsreader", serif; letter-spacing: -.07em; }
.post-date span { padding-left: 28px; color: var(--ink); border-left: 1px solid rgba(7,143,133,.25); font: italic 400 21px/1.45 "Newsreader", serif; }
.post-content { padding: 64px 36px 54px; font: 400 21px/1.85 "Newsreader", serif; }
.post-content p { margin: 0 0 1.4em; }
.post-content a, .excerpt a { overflow-wrap: anywhere; }
.post-content img {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  margin: 1.4em auto;
}
.post-content h2 { margin-top: 1.8em; font-weight: 500; }
.post-content blockquote { margin: 2em 0; padding-left: 24px; color: var(--tiffany-dark); border-left: 2px solid var(--tiffany); font-style: italic; }
.comments { margin: 0 36px; padding: 42px 0 34px; border-top: 1px solid var(--line); }
.comments-header { margin-bottom: 28px; }
.comments-header .section-kicker { margin-bottom: 8px; }
.comments-header h2 { margin: 0; font: 400 36px/1.1 "Newsreader", serif; letter-spacing: -.02em; }
.comments-header > p:last-child { margin: 10px 0 0; color: var(--muted); font-size: 13px; line-height: 1.6; }
.giscus { min-height: 160px; }
.giscus-frame { width: 100%; }
.post-actions { padding: 20px 36px 0; }
footer { display: flex; justify-content: space-between; padding: 32px 0; color: var(--muted); border-top: 1px solid var(--line); font: 400 12px "Newsreader", serif; }
.sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }

@media (max-width: 900px) {
  .calendar-panel { grid-template-columns: 1fr; gap: 32px; }
  .calendar-header { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; column-gap: 28px; }
  .calendar-header .section-kicker, .calendar-header h1, .calendar-summary { grid-column: 1; }
  .calendar-controls { grid-column: 2; grid-row: 1 / span 3; margin-top: 0; }
}

@media (max-width: 820px) {
  .timeline::before { left: 98px; }
  .timeline-day { grid-template-columns: 100px minmax(0, 1fr); gap: 28px; }
  .day-marker { padding-right: 18px; }
  .entry-content.has-thumbnail { grid-template-columns: minmax(0, 1fr) 124px; gap: 20px; }
}

@media (max-width: 650px) {
  .site-header, main, footer { width: min(100% - 28px, 1120px); }
  .site-header { height: 72px; }
  nav { gap: 18px; }
  nav a:last-child { display: none; }
  .entries { padding: 48px 12px 90px; }
  .calendar-panel { gap: 26px; margin-bottom: 60px; padding: 28px 20px 24px; border-radius: 4px 28px 4px 4px; }
  .calendar-header { display: block; }
  .calendar-header h1 { font-size: 36px; }
  .calendar-summary { max-width: 230px; font-size: 15px; }
  .calendar-controls { margin-top: 22px; }
  .calendar-weekdays, .calendar-grid, .calendar-row { gap: 3px; }
  .calendar-weekdays span { overflow: hidden; font-size: 8px; letter-spacing: 0; }
  .calendar-cell.is-placeholder { min-height: 39px; }
  .calendar-day { min-height: 39px; padding: 7px; border-radius: 7px; font-size: 11px; }
  .calendar-entry-mark { width: 5px; height: 5px; box-shadow: none; }
  .calendar-legend { justify-content: flex-start; }
  .section-heading { align-items: stretch; flex-direction: column; gap: 22px; }
  .section-heading h2 { font-size: 40px; }
  .section-controls { justify-content: space-between; gap: 16px; }
  .section-controls > span { max-width: 105px; line-height: 1.5; }
  .section-heading .write-button { gap: 14px; padding: 12px 14px; }
  .timeline::before { left: 78px; }
  .timeline-day { grid-template-columns: 80px minmax(0, 1fr); gap: 22px; padding: 26px 0 20px; }
  .day-marker { padding-right: 14px; }
  .day-marker time strong { font-size: 32px; }
  .day-marker .weekday { overflow: hidden; font-size: 9px; text-overflow: ellipsis; }
  .timeline-node { top: 22px; right: -11px; width: 22px; height: 22px; box-shadow: 0 0 0 6px var(--paper); }
  .is-today .timeline-node { box-shadow: 0 0 0 5px var(--paper), 0 0 0 8px rgba(129,216,208,.38); }
  .diary-card { padding: 22px 20px 24px; }
  .entry-topline { gap: 12px; }
  .edit-link { white-space: nowrap; }
  .entry-content { margin-top: 18px; }
  .entry-content.has-thumbnail { grid-template-columns: minmax(0, 1fr) 88px; gap: 16px; }
  .excerpt { max-height: 6.2em; font-size: 17px; line-height: 1.55; }
  .entry-thumbnail { border-radius: 9px; }
  .post { padding: 48px 8px 90px; }
  .post > header { margin-top: 40px; padding: 42px 26px 38px; border-radius: 4px 32px 4px 4px; }
  .post-date { gap: 18px; }
  .post-date strong { font-size: 88px; }
  .post-date span { padding-left: 18px; font-size: 17px; }
  .post-content { padding: 48px 10px 38px; }
  .comments { margin-inline: 10px; padding-top: 34px; }
  .comments-header h2 { font-size: 32px; }
  .post-actions { padding-inline: 10px; }
}

@media (max-width: 500px) {
  .entry-content.has-thumbnail { display: block; }
  .entry-thumbnail { width: 104px; margin-top: 18px; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; }
}
