:root {
  color-scheme: dark;
  --ink: #f7f4ed;
  --muted: rgba(247,244,237,.68);
  --faint: rgba(247,244,237,.14);
  --line: rgba(247,244,237,.22);
  --glass: rgba(15,17,18,.38);
  --accent: #f4c84c;
  --accent-dark: #211d0f;
  --danger: #ff7474;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
html, body { min-height: 100%; margin: 0; background: #121415; color: var(--ink); }
body { min-height: 100svh; overflow-x: hidden; }
button, input, textarea { font: inherit; }
button { color: inherit; }
.photo-layer { position: fixed; inset: 0; background: url('./windmill.png') center/cover no-repeat; transform: scale(1.02); transition: background-image 1s ease; }
.looping-photo-frame { position: absolute; inset: -72px; width: calc(100% + 144px); height: calc(100% + 144px); border: 0; pointer-events: none; }
.shade { position: fixed; inset: 0; background: linear-gradient(180deg,rgba(8,10,11,.3),rgba(8,10,11,.52) 45%,rgba(8,10,11,.83)), linear-gradient(90deg,rgba(8,10,11,.38),rgba(8,10,11,.1)); backdrop-filter: saturate(.85); }
.dashboard { position: relative; z-index: 1; min-height: 100svh; display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(330px, .92fr); gap: clamp(28px,4vw,72px); padding: clamp(26px,4vw,68px); max-width: 1540px; margin: auto; }
.left-column, .right-column { min-width: 0; }
.left-column { display: flex; flex-direction: column; gap: 28px; }
.right-column { display: flex; flex-direction: column; gap: 24px; }
.clock-block { padding: 0 4px 6px; text-shadow: 0 2px 18px rgba(0,0,0,.55); }
.time-line { display: flex; align-items: flex-start; gap: 8px; font-size: clamp(3.2rem,7vw,6.8rem); line-height: .9; font-weight: 260; letter-spacing: -.07em; }
.seconds { margin-top: .15em; font-size: .28em; font-weight: 650; letter-spacing: 0; }
#fullDate { margin-top: 14px; font-size: clamp(1rem,1.5vw,1.25rem); font-weight: 650; }
.panel { background: transparent; border: 0; border-radius: 0; box-shadow: none; backdrop-filter: none; }
.calendar-panel { padding: 12px 4px 18px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-kicker { color: var(--accent); font-size: .77rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.section-heading-row { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
h1,h2,p { margin: 0; }
h1,h2 { font-size: 1.12rem; letter-spacing: -.02em; }
.section-heading-row h1 { margin-top: 2px; font-size: 1.35rem; }
.calendar-toolbar { display: flex; align-items: center; justify-content: flex-end; gap: 12px; }
.month-nav { display: flex; align-items: center; gap: 4px; }
.month-nav button, .photo-caption button { border: 0; background: transparent; padding: 7px 8px; border-radius: 9px; color: var(--muted); cursor: pointer; }
.month-nav button:hover, .photo-caption button:hover { background: rgba(255,255,255,.1); color: white; }
.calendar-grid { display: grid; grid-template-columns: repeat(7,1fr); }
.weekdays { color: var(--muted); font-size: .72rem; font-weight: 750; text-align: center; letter-spacing: .04em; }
.days { margin-top: 7px; gap: 4px; }
.day { min-height: 100px; padding: 6px 5px; border-radius: 10px; position: relative; display: flex; flex-direction: column; align-items: stretch; text-align: center; font-size: .9rem; }
.day.other { color: rgba(255,255,255,.28); }
.date-number { align-self: center; }
.day.today .date-number { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--accent); color: var(--accent-dark); font-weight: 850; }
.calendar-event-list { display: grid; gap: 3px; margin-top: 5px; color: var(--ink); font-size: .63rem; font-weight: 720; line-height: 1.2; text-align: left; }
.calendar-event { display: block; padding: 3px 4px; border-radius: 3px; overflow-wrap: anywhere; }
.calendar-event time { margin-right: 3px; font-size: .84em; font-weight: 850; opacity: .92; }
.calendar-event.calendar-color-0 { background: #e3ad1b; color: #201909; }
.calendar-event.calendar-color-1 { background: #5c9fd6; color: #071827; }
.calendar-event.calendar-color-2 { background: #6eb798; color: #092218; }
.calendar-event.calendar-color-3 { background: #d37a9a; color: #2a0815; }
.day.other .calendar-event { opacity: .58; }
.calendar-event-more { color: var(--muted); font-size: .67rem; padding-left: 2px; }
.agenda { padding: 2px 4px 30px; }
.agenda-title { padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.sync-state, .task-count { color: var(--muted); font-size: .78rem; }
.agenda-list { display: grid; }
.agenda-day { display: grid; grid-template-columns: 76px 1fr; gap: 10px; padding: 17px 0; border-bottom: 1px solid var(--faint); }
.day-mark strong { display: block; font-size: 1.9rem; font-weight: 350; line-height: 1; }
.day-mark span { color: var(--muted); font-size: .77rem; }
.agenda-events { display: grid; gap: 8px; }
.agenda-event { border-left: 3px solid var(--accent); padding-left: 11px; display: grid; grid-template-columns: 82px 1fr; gap: 8px; font-size: .92rem; }
.agenda-event time { color: var(--muted); font-size: .78rem; font-weight: 750; padding-top: 2px; }
.agenda-event strong { font-weight: 650; }
.feature-photo { aspect-ratio: 4 / 3; min-height: 0; max-height: 360px; overflow: hidden; position: relative; }
.feature-photo-image { position: absolute; inset: 0; background: url('./canal.png') center/cover no-repeat; transition: background-image .7s ease; }
.feature-photo::after { content:""; position:absolute; inset:40% 0 0; background:linear-gradient(transparent,rgba(0,0,0,.64)); pointer-events:none; }
.photo-caption { position: absolute; z-index: 1; left: 18px; right: 12px; bottom: 12px; display: flex; align-items: center; justify-content: space-between; font-size: .85rem; font-weight: 700; }
.weather { padding: 14px 4px 18px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.current-weather { display: flex; justify-content: space-between; align-items: center; padding: 8px 4px 18px; }
.temperature { font-size: clamp(3.5rem,7vw,6.5rem); line-height: .95; font-weight: 280; letter-spacing: -.06em; }
.temperature sup { font-size: .42em; }
.current-weather p { margin-top: 6px; color: var(--muted); text-transform: capitalize; }
.weather-icon { font-size: clamp(3.5rem,7vw,6rem); line-height: 1; }
.forecast { display: grid; grid-template-columns: repeat(4,1fr); gap: 8px; }
.forecast-day { text-align: center; padding: 12px 5px 6px; border-top: 1px solid var(--line); }
.forecast-day .icon { display: block; font-size: 1.7rem; margin: 8px 0; }
.forecast-day strong { font-size: .84rem; }
.forecast-day .temps { font-size: .8rem; color: var(--muted); }
.tasks { padding: 18px 4px; border-bottom: 1px solid var(--line); }
.task-form { display: grid; grid-template-columns: 1fr auto; gap: 8px; margin: 14px 0 6px; }
.task-form input, .settings-dialog input, .settings-dialog textarea { min-width: 0; border: 1px solid var(--line); background: rgba(0,0,0,.24); color: white; border-radius: 10px; padding: 11px 12px; outline: none; }
.settings-dialog textarea { width: 100%; resize: vertical; line-height: 1.35; }
.task-form input:focus, .settings-dialog input:focus, .settings-dialog textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(244,200,76,.14); }
.task-form button, .primary-button { border: 0; border-radius: 10px; background: var(--accent); color: var(--accent-dark); padding: 10px 14px; font-weight: 850; cursor: pointer; }
.task-list { list-style: none; padding: 0; margin: 8px 0 0; display: grid; }
.task-item { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 11px; padding: 12px 0; border-bottom: 1px solid var(--faint); }
.task-item:last-child { border-bottom: 0; }
.task-item input { width: 18px; height: 18px; accent-color: var(--accent); }
.task-item.done span { color: var(--muted); text-decoration: line-through; }
.delete-task { border: 0; background: transparent; color: var(--muted); cursor: pointer; font-size: 1.2rem; }
.news { padding: 3px 4px 50px; }
.news-heading { padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.news-list { display: grid; }
.news-card { display: grid; grid-template-columns: 124px 1fr; gap: 14px; padding: 16px 0; border-bottom: 1px solid var(--faint); color: inherit; text-decoration: none; }
.news-image { min-height: 86px; border-radius: 12px; overflow: hidden; background: linear-gradient(135deg,rgba(244,200,76,.45),rgba(255,255,255,.08)); }
.news-image img { display: block; width: 100%; height: 100%; min-height: 86px; object-fit: cover; }
.news-image > span { display: none; }
.news-image-fallback { display: grid; place-items: center; background: linear-gradient(135deg, rgba(244,200,76,.38), rgba(18,20,21,.68)); color: rgba(255,255,255,.92); font-size: 2rem; font-weight: 800; text-shadow: 0 2px 10px rgba(0,0,0,.55); }
.news-image-fallback > span { display: block; }
.news-copy h3 { font-size: .96rem; line-height: 1.25; margin: 0 0 6px; }
.news-copy p { color: var(--muted); font-size: .78rem; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.news-copy small { display: block; margin-top: 6px; color: var(--accent); }
.settings-button { position: fixed; z-index: 4; right: 18px; bottom: 18px; width: 48px; height: 48px; border-radius: 50%; border: 1px solid rgba(255,255,255,.24); background: rgba(18,20,21,.72); backdrop-filter: blur(14px); box-shadow: 0 8px 22px rgba(0,0,0,.3); cursor: pointer; }
.settings-dialog { width: min(620px,calc(100vw - 28px)); max-height: calc(100svh - 28px); padding: 0; border: 1px solid rgba(255,255,255,.16); border-radius: 22px; background: #171a1b; color: var(--ink); box-shadow: 0 30px 100px rgba(0,0,0,.65); }
.settings-dialog::backdrop { background: rgba(0,0,0,.72); backdrop-filter: blur(6px); }
.dialog-card { padding: 24px; overflow-y: auto; }
.dialog-header { display: flex; justify-content: space-between; align-items: start; gap: 16px; }
.dialog-header h2 { font-size: 1.45rem; margin-top: 4px; }
.icon-button { border: 0; background: transparent; color: var(--muted); font-size: 1.8rem; cursor: pointer; }
.dialog-intro { margin: 14px 0 18px; color: var(--muted); line-height: 1.55; }
.dialog-card label { display: grid; gap: 7px; margin: 14px 0; font-size: .9rem; font-weight: 700; }
.dialog-card small { color: var(--muted); font-size: .75rem; line-height: 1.45; font-weight: 450; }
.dialog-card code { color: var(--accent); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.dialog-actions { display: flex; justify-content: space-between; gap: 12px; margin-top: 20px; }
.quiet-button { border: 1px solid var(--line); border-radius: 10px; background: transparent; padding: 10px 14px; cursor: pointer; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
@media (max-width: 780px) {
  .dashboard { grid-template-columns: 1fr; padding: 24px 18px 70px; gap: 24px; }
  .time-line { font-size: clamp(4rem,18vw,6rem); }
  .right-column { gap: 18px; }
  .feature-photo { order: -1; min-height: 0; }
  .day { min-height: 84px; padding-inline: 3px; }
  .calendar-event-list { font-size: .62rem; }
}
@media (max-width: 430px) {
  .calendar-panel, .weather, .tasks { padding-inline: 15px; }
  .month-nav #todayMonth { display: none; }
  .agenda-event { grid-template-columns: 68px 1fr; }
  .forecast { gap: 2px; }
  .news-card { grid-template-columns: 96px 1fr; }
  .form-row { grid-template-columns: 1fr; gap: 0; }
}
@media (min-width: 900px) and (orientation: portrait) {
  .dashboard { grid-template-columns: 1fr 1fr; gap: 34px; padding: 34px 30px; }
}
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; transition: none !important; } }
