:root {
  --bg: #fff9f2;
  --surface: #ffffff;
  --ink: #333333;
  --muted: #6e6b66;
  --line: #efe5d9;
  --yellow: #fff2a6;
  --pink: #ffd6e5;
  --focus: #ffb4cc;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  font-family: "Sora", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top right, #fff7c9 0%, #fff9f2 45%),
    radial-gradient(circle at bottom left, #ffddea 0%, #fff9f2 35%),
    var(--bg);
  min-height: 100vh;
  line-height: 1.6;
}

.timetable-page .site-header,
.timetable-page main,
.timetable-page footer {
  width: min(1180px, calc(100% - 2rem));
}

.site-header,
main,
footer {
  width: min(960px, calc(100% - 2rem));
  margin-inline: auto;
}

.site-header {
  position: sticky;
  top: 0;
  margin-top: 1rem;
  padding: 0.9rem 1rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #ffffffe8;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 10;
  backdrop-filter: blur(6px);
}

.logo {
  color: var(--ink);
  text-decoration: none;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.site-nav {
  display: flex;
  gap: 1rem;
}

.site-nav a {
  color: var(--muted);
  text-decoration: none;
  font-weight: 500;
}

.site-nav a:hover,
.site-nav a:focus-visible {
  color: var(--ink);
}

main {
  padding: 2.2rem 0 1rem;
}

section {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
  padding: 1.6rem;
}

section + section {
  margin-top: 1rem;
}

.home-section {
  background: linear-gradient(145deg, #fffdf7, #fff8ee);
}

.eyebrow {
  margin: 0;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.11em;
  color: var(--muted);
}

h1,
h2,
h3 {
  margin-top: 0;
}

h1 {
  margin: 0.8rem 0 0.7rem;
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  line-height: 1.2;
}

.home-copy {
  max-width: 60ch;
  margin-bottom: 1rem;
  color: var(--muted);
}

.primary-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  color: var(--ink);
  background: linear-gradient(120deg, var(--yellow), var(--pink));
  border-radius: 999px;
  padding: 0.62rem 1rem;
  font-weight: 600;
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 1rem;
  margin-bottom: 1rem;
}

.section-head p {
  margin: 0;
  color: var(--muted);
}

.timetable-section {
  background: linear-gradient(145deg, #fffef7, #fff7fb);
}

.timetable-editor {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 1rem;
  margin-bottom: 0.9rem;
  background: #fffdf9;
}

.editor-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
}

.editor-kicker {
  margin: 0;
  color: var(--muted);
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

#selected-slot {
  margin: 0;
  font-weight: 600;
  color: #5d5049;
}

.editor-form {
  margin-top: 0.7rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.8rem;
}

.editor-form label {
  display: grid;
  gap: 0.35rem;
  color: #574b45;
  font-size: 0.84rem;
  font-weight: 500;
}

.editor-form input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.58rem 0.66rem;
  font: inherit;
  background: #fffefe;
}

.editor-form input:focus-visible {
  outline: 2px solid #f8c7d9;
  outline-offset: 1px;
}

.editor-actions {
  grid-column: 1 / -1;
  display: flex;
  gap: 0.55rem;
  flex-wrap: wrap;
}

.editor-btn {
  border: 1px solid var(--line);
  background: #fffefb;
  color: var(--ink);
  border-radius: 10px;
  padding: 0.48rem 0.8rem;
  font: inherit;
  cursor: pointer;
}

.editor-btn-primary {
  background: linear-gradient(120deg, var(--yellow), var(--pink));
  border-color: #f0dcc4;
  font-weight: 600;
}

.editor-note {
  margin: 0.7rem 0 0;
  color: var(--muted);
  font-size: 0.8rem;
}

.timetable-wrap {
  overflow-x: auto;
  border: 1px solid #e9dfcf;
  border-radius: 14px;
  background: #fffdfa;
}

.timetable-table {
  width: 100%;
  min-width: 1120px;
  border-collapse: separate;
  border-spacing: 0;
  table-layout: fixed;
}

.timetable-table thead th {
  background: #ffefb8;
  color: #393532;
  font-size: 0.92rem;
  font-weight: 600;
  padding: 0.85rem 0.5rem;
  text-align: center;
  border-bottom: 1px solid #e5d6bf;
  white-space: nowrap;
}

.timetable-table thead th:first-child {
  border-top-left-radius: 12px;
}

.timetable-table thead th:last-child {
  border-top-right-radius: 12px;
}

.timetable-table tbody th {
  background: #fff3d6;
  color: #4f4740;
  font-size: 0.88rem;
  font-weight: 600;
  text-align: center;
  padding: 0.78rem 0.5rem;
  border-right: 1px solid var(--line);
  width: 84px;
}

.timetable-table td {
  background: #fff;
  border-left: 1px solid var(--line);
  border-top: 1px solid var(--line);
  padding: 0.28rem;
  vertical-align: top;
}

.timetable-table tbody tr:nth-child(even) td {
  background: #fffcff;
}

.slot-button {
  display: block;
  width: 100%;
  min-height: 78px;
  border: 1px solid #f3ede3;
  border-radius: 10px;
  background: #fffefb;
  text-align: left;
  padding: 0.5rem 0.5rem 0.44rem;
  cursor: pointer;
}

.slot-button:hover,
.slot-button:focus-visible {
  border-color: #e7cfd5;
  background: #fff8fb;
  outline: none;
}

.slot-button.is-selected {
  border-color: #e4acc2;
  background: #fff1f7;
}

.slot-button .slot-title {
  display: block;
  color: #342f2c;
  font-weight: 600;
  font-size: 0.9rem;
  line-height: 1.28;
}

.slot-button .slot-meta {
  display: block;
  margin-top: 0.22rem;
  color: #7a6f67;
  font-size: 0.78rem;
  line-height: 1.3;
}

.slot-button.slot-empty .slot-title {
  color: #8f7c71;
  font-weight: 500;
}

.slot-button.slot-empty .slot-meta {
  color: #a18e84;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.8rem;
}

.project-card {
  padding: 1rem;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: #fffdfa;
}

.project-card:nth-child(odd) {
  background: linear-gradient(150deg, #fffefa, #fffce9);
}

.project-card:nth-child(even) {
  background: linear-gradient(150deg, #fffefa, #fff2f8);
}

.project-type {
  margin: 0;
  font-size: 0.8rem;
  color: var(--muted);
}

.project-card h3 {
  margin: 0.35rem 0 0.85rem;
  font-size: 1.15rem;
}

.open-project {
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  border-radius: 10px;
  padding: 0.52rem 0.8rem;
  font: inherit;
  cursor: pointer;
}

.open-project:hover,
.open-project:focus-visible {
  border-color: var(--focus);
  outline: none;
}

.project-view {
  background: linear-gradient(145deg, #fffef9, #fff9fc);
}

.project-view-label {
  margin: 0;
  text-transform: uppercase;
  font-size: 0.75rem;
  color: var(--muted);
  letter-spacing: 0.1em;
}

#project-title {
  margin: 0.5rem 0;
}

.project-meta {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.project-description {
  margin: 0.7rem 0;
}

.project-points {
  margin: 0;
  padding-left: 1.1rem;
}

.project-points li {
  margin-bottom: 0.45rem;
}

.contact-section p {
  margin-top: -0.4rem;
  color: var(--muted);
}

.contact-links {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.contact-links a {
  text-decoration: none;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.55rem 0.95rem;
  background: #fffefa;
}

footer {
  padding: 1.2rem 0 2rem;
  color: var(--muted);
  font-size: 0.9rem;
}

@media (max-width: 760px) {
  .site-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.7rem;
  }

  .site-nav {
    flex-wrap: wrap;
  }

  .projects-grid {
    grid-template-columns: 1fr;
  }

  .section-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .editor-header,
  .editor-actions {
    flex-direction: column;
    align-items: flex-start;
  }

  .editor-form {
    grid-template-columns: 1fr;
  }

  .timetable-table {
    min-width: 940px;
  }
}
