@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/inter-latin.woff2') format('woff2');
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('../fonts/inter-latin.woff2') format('woff2');
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('../fonts/inter-latin.woff2') format('woff2');
}
@font-face {
  font-family: 'Poppins';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('../fonts/poppins-latin-600.woff2') format('woff2');
}
@font-face {
  font-family: 'Poppins';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('../fonts/poppins-latin-700.woff2') format('woff2');
}
@font-face {
  font-family: 'Poppins';
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url('../fonts/poppins-latin-800.woff2') format('woff2');
}

:root {
  --ink-900: oklch(0.26 0.035 260);
  --ink-700: oklch(0.4 0.03 260);
  --ink-500: oklch(0.52 0.02 260);
  --surface: oklch(0.995 0.004 260);
  --surface-muted: oklch(0.97 0.006 250);
  --border: oklch(0.9 0.015 260 / 0.55);
  --accent: oklch(0.6 0.16 265);
  --accent-2: oklch(0.68 0.17 320);
  --shadow-sm: 0 1px 2px oklch(0.3 0.02 260 / 0.06), 0 2px 5px oklch(0.3 0.02 260 / 0.06);
  --shadow-md: 0 10px 28px oklch(0.3 0.02 260 / 0.09);
  --shadow-lg: 0 22px 55px oklch(0.3 0.02 260 / 0.14);
  --radius-lg: 24px;
  --radius-md: 12px;
  --radius-sm: 8px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(1100px 560px at 12% -8%, oklch(0.92 0.035 265 / 0.22), transparent 60%),
    radial-gradient(900px 480px at 100% 0%, oklch(0.93 0.03 230 / 0.16), transparent 55%),
    radial-gradient(oklch(0.88 0.01 260 / 0.5) 1px, transparent 1px),
    var(--surface-muted);
  background-size: auto, auto, 24px 24px, auto;
  background-position: 0 0, 0 0, 0 0, 0 0;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.week-page { font-family: 'Inter', sans-serif; max-width: 1180px; margin: 0 auto; padding: 64px 32px 80px; }

.week-header { text-align: center; margin-bottom: 34px; }
.week-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: 'Inter', sans-serif;
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
}
.week-kicker::before,
.week-kicker::after { content: ''; width: 18px; height: 1.5px; background: currentColor; opacity: 0.5; border-radius: 2px; }

.week-title {
  font-family: 'Poppins', sans-serif;
  font-weight: 800;
  font-size: 46px;
  letter-spacing: -0.6px;
  background: linear-gradient(115deg, var(--ink-900) 35%, var(--accent) 100%);
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
}
.week-subtitle { font-size: 17px; color: var(--ink-500); margin-top: 12px; }

.week-actions { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 12px; margin-top: 20px; }
.week-hint {
  font-size: 13px;
  color: var(--ink-500);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: oklch(1 0 0 / 0.7);
  border: 1px solid var(--border);
  padding: 8px 16px;
  border-radius: 999px;
  box-shadow: var(--shadow-sm);
}

.week-legend { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-bottom: 36px; }
.legend-item {
  display: flex;
  align-items: center;
  gap: 9px;
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 6px 16px 6px 6px;
  border-radius: 999px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow .15s ease, transform .15s ease, border-color .15s ease;
}
.legend-item:hover { box-shadow: var(--shadow-md); transform: translateY(-1px); border-color: oklch(0.9 0.015 260 / 0.9); }
.legend-icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  flex-shrink: 0;
  box-shadow: inset 0 0 0 1px oklch(1 0 0 / 0.35);
}
.legend-name { font-weight: 600; font-size: 14px; color: var(--ink-700); }

.week-grid-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px;
  box-shadow: var(--shadow-lg);
}
.week-grid { display: grid; grid-template-columns: 200px repeat(5, 1fr); gap: 8px; }
.day-header {
  text-align: center;
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  font-size: 14px;
  color: var(--ink-700);
  padding: 10px 0;
  background: var(--surface-muted);
  border-radius: var(--radius-sm);
  margin-bottom: 2px;
}
.row-label {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 3px;
  border-radius: var(--radius-md);
  padding: 12px 14px;
  min-height: 52px;
  box-shadow: inset 0 1px 0 oklch(1 0 0 / 0.22);
}
.row-time { font-size: 12px; font-weight: 600; opacity: 0.85; }
.row-title-wrap { display: flex; align-items: center; gap: 6px; }
.row-icon { font-size: 13px; line-height: 1; }
.row-title { font-size: 14px; font-weight: 700; }
.row-cell {
  border-radius: var(--radius-md);
  min-height: 52px;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  box-shadow: inset 0 1px 0 oklch(1 0 0 / 0.18);
  transition: filter .15s ease, box-shadow .15s ease;
}
.row-cell:hover { filter: brightness(0.97); box-shadow: inset 0 1px 0 oklch(1 0 0 / 0.18), 0 4px 10px oklch(0.3 0.02 260 / 0.1); }
.row-note { width: 100%; font-size: 12.5px; line-height: 1.4; white-space: pre-wrap; word-break: break-word; }
.row-note.is-empty:not(:focus)::before { content: attr(data-placeholder); opacity: 0.55; }

[contenteditable="true"] { outline: none; cursor: text; border-radius: 6px; padding: 1px 4px; margin: -1px -4px; transition: background-color .15s ease; }
[contenteditable="true"]:hover { background: oklch(1 0 0 / 0.3); }
[contenteditable="true"]:focus { background: oklch(1 0 0 / 0.5); outline: 1.5px dashed currentColor; outline-offset: 3px; }

.week-footer { text-align: center; margin-top: 34px; font-size: 13.5px; color: var(--ink-500); }

.week-scroll-hint { display: none; text-align: center; font-size: 12px; color: var(--ink-500); margin: 10px 0 16px; }

@media (max-width: 720px) {
  .week-page { padding: 32px 12px 52px; }
  .week-title { font-size: 27px; }
  .week-subtitle { font-size: 13.5px; }
  .week-actions { flex-direction: column; gap: 10px; }
  .week-hint { font-size: 11.5px; padding: 6px 14px; text-align: center; }

  .week-legend { gap: 8px; margin-bottom: 20px; }
  .legend-item { padding: 6px 12px 6px 6px; }
  .legend-name { font-size: 12.5px; }

  .week-scroll-hint { display: block; }

  .week-grid-card { padding: 12px; border-radius: 18px; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .week-grid { grid-template-columns: 124px repeat(5, 148px); min-width: 864px; gap: 6px; }
  .day-header { font-size: 12.5px; padding: 6px 0; }
  .row-label, .row-cell { padding: 8px 10px; min-height: 46px; border-radius: 8px; }
  .row-title { font-size: 12.5px; }
  .row-time { font-size: 11px; }
  .row-note { font-size: 11.5px; }
}
