:root {
  color-scheme: light;
  font-family: Arial, Helvetica, sans-serif;
  background: #dff6ff;
  color: #232323;
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  background: linear-gradient(135deg, #dff6ff 0%, #cfeeff 100%);
}

button,
input {
  font: inherit;
}

button {
  min-height: 44px;
  border: 0;
  border-radius: 8px;
  background: #3157d5;
  color: #ffffff;
  cursor: pointer;
  font-weight: 700;
}

button:hover {
  background: #2445b1;
}

button:focus-visible,
input:focus-visible {
  outline: 3px solid #ffcc4d;
  outline-offset: 3px;
}

.app-shell {
  width: min(100%, 920px);
  min-height: 100vh;
  margin: 0 auto;
  padding: 24px;
  display: grid;
  place-items: center;
}

.screen {
  width: 100%;
}

.hidden {
  display: none;
}

.login-screen {
  max-width: 440px;
  padding: 28px;
  border: 2px solid #222222;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 8px 8px 0 #222222;
}

.brand-mark {
  width: 64px;
  height: 64px;
  display: grid;
  place-items: center;
  border: 2px solid #222222;
  border-radius: 8px;
  background: #ffcc4d;
  font-size: 2rem;
  font-weight: 800;
}

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

h1 {
  margin-bottom: 10px;
  font-size: clamp(2rem, 7vw, 3.25rem);
  line-height: 1;
}

h2 {
  margin-bottom: 8px;
  font-size: 1.45rem;
}

.intro {
  color: #555555;
}

.login-form {
  display: grid;
  gap: 10px;
}

label {
  font-weight: 700;
}

.password-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
}

input {
  min-width: 0;
  min-height: 44px;
  padding: 0 12px;
  border: 2px solid #222222;
  border-radius: 8px;
  background: #ffffff;
}

.message {
  min-height: 1.4em;
  margin-bottom: 0;
  color: #a71919;
  font-weight: 700;
}

.sophie-screen {
  align-self: stretch;
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 20px 0;
}

.sophie-screen.hidden {
  display: none;
}

.top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  position: relative;
}

.top-bar h1 {
  margin-bottom: 0;
}

.eyebrow {
  margin-bottom: 6px;
  color: #6b4b00;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0;
}

.ghost-button {
  min-width: 80px;
  border: 2px solid #222222;
  background: #ffffff;
  color: #222222;
}

.ghost-button:hover {
  background: #f3f3f3;
}

.menu-wrap {
  position: relative;
}

.menu-button {
  width: 54px;
  min-width: 54px;
  height: 54px;
  display: grid;
  gap: 5px;
  place-content: center;
  border: 2px solid #222222;
  background: #ffffff;
  box-shadow: 3px 3px 0 #222222;
}

.menu-button:hover {
  background: #f3f3f3;
}

.menu-button span {
  display: block;
  width: 24px;
  height: 3px;
  border-radius: 999px;
  background: #222222;
}

.main-menu {
  position: absolute;
  z-index: 10;
  top: calc(100% + 10px);
  right: 0;
  display: grid;
  min-width: 210px;
  gap: 8px;
  padding: 10px;
  border: 2px solid #222222;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 5px 5px 0 #222222;
}

.main-menu.hidden {
  display: none;
}

.main-menu button {
  width: 100%;
  border: 2px solid #222222;
  background: #fff8df;
  color: #222222;
  text-align: left;
}

.main-menu button:hover {
  background: #ffefb0;
}

#sophie-title,
.todo-group h2,
.todo-name {
  font-family: Georgia, "Times New Roman", serif;
}

.page-view {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.page-view.hidden {
  display: none;
}

.score-band {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border: 2px solid #222222;
  border-radius: 8px;
  background: #1f3552;
  color: #ffffff;
  box-shadow: 4px 4px 0 #222222;
  font-size: 1.2rem;
  font-weight: 800;
}

.star-count {
  display: grid;
  min-width: 44px;
  min-height: 44px;
  place-items: center;
  border-radius: 50%;
  background: #ffcc4d;
  color: #222222;
}

.todo-layout {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.todo-group {
  display: grid;
  gap: 10px;
}

.todo-list {
  display: grid;
  gap: 10px;
}

.todo-item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
  min-height: 74px;
  padding: 12px;
  border: 2px solid #222222;
  border-radius: 8px;
  background: #1f3552;
  color: #ffffff;
}

.todo-item input {
  width: 28px;
  min-width: 28px;
  height: 28px;
  min-height: 28px;
  accent-color: #3157d5;
}

.todo-name {
  color: #ffffff;
  font-weight: 800;
}

.todo-stars {
  min-width: 72px;
  padding: 7px 9px;
  border-radius: 8px;
  background: #fff0ba;
  color: #222222;
  text-align: center;
  font-weight: 800;
}

.todo-item.done {
  background: #274d78;
}

.todo-item.done .todo-name {
  text-decoration: line-through;
  text-decoration-thickness: 3px;
}

.sky-panel {
  display: grid;
  gap: 12px;
  padding-top: 4px;
  font-family: Georgia, "Times New Roman", serif;
}

.sky-eyebrow {
  color: #6d4f00;
}

.sky {
  position: relative;
  min-height: 260px;
  overflow: hidden;
  border: 2px solid #222222;
  border-radius: 8px;
  background: linear-gradient(180deg, #14244b 0%, #1f3552 62%, #274d78 100%);
  box-shadow: 6px 6px 0 #222222;
}

.sky-star {
  position: absolute;
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  color: #ffef87;
  filter: drop-shadow(0 0 6px rgba(255, 239, 135, 0.8));
  font-size: 1.5rem;
  line-height: 1;
}

.sky-note {
  position: absolute;
  right: 18px;
  bottom: 16px;
  left: 18px;
  margin: 0;
  color: #ffffff;
  font-size: 1.1rem;
  font-weight: 700;
  text-align: center;
}

.reset-button {
  align-self: flex-start;
}

.schedule-page {
  min-height: 55vh;
}

.schedule-scroll {
  overflow-x: auto;
  border: 2px solid #222222;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 5px 5px 0 #222222;
}

.schedule-table {
  width: 100%;
  min-width: 760px;
  border-collapse: separate;
  border-spacing: 0;
}

.schedule-table th,
.schedule-table td {
  border: 0;
  border-right: 2px solid #222222;
  border-bottom: 2px solid #222222;
  padding: 8px;
  text-align: left;
}

.schedule-table tr:last-child th,
.schedule-table tr:last-child td {
  border-bottom: 0;
}

.schedule-table th:last-child,
.schedule-table td:last-child {
  border-right: 0;
}

.schedule-table th {
  background: #fff0ba;
  font-weight: 800;
}

.schedule-table tbody th {
  width: 86px;
  text-align: center;
}

.schedule-table input {
  width: 100%;
  min-height: 48px;
  padding: 0 8px;
  border: 2px solid #9ec9e8;
  border-radius: 6px;
  background: #ffffff;
  color: #222222;
  font-weight: 700;
}

.schedule-table input:focus {
  outline: 3px solid #3157d5;
  outline-offset: 1px;
}

.schedule-table input::placeholder {
  color: #7b8a92;
}

.schedule-table input.subject-blue {
  border-color: #4f8ef7;
  background: #d9eaff;
}

.schedule-table input.subject-red {
  border-color: #e05252;
  background: #ffd9d9;
}

.schedule-table input.subject-green {
  border-color: #49a35b;
  background: #ddf3df;
}

.schedule-table input.subject-yellow {
  border-color: #d1aa28;
  background: #fff1a8;
}

.schedule-table input.subject-orange {
  border-color: #ef8d24;
  background: #ffdcb3;
}

.schedule-table input.subject-purple {
  border-color: #8b68d8;
  background: #eadfff;
}

.schedule-table input.subject-pink {
  border-color: #d8509f;
  background: #ffd8ee;
}

.schedule-table input.subject-white {
  border-color: #c7d3da;
  background: #ffffff;
}

.schedule-table .break-row th,
.schedule-table .break-row td {
  padding: 5px 8px;
  background: #ffffff;
}

.schedule-table .break-row th {
  color: #3157d5;
  font-size: 0.82rem;
}

.break-chip {
  display: grid;
  min-height: 34px;
  place-items: center;
  padding: 5px 8px;
  border: 2px solid #c7d3da;
  border-radius: 6px;
  background: #ffffff;
  color: #1f3552;
  font-size: 0.82rem;
  font-weight: 800;
  line-height: 1.15;
  text-align: center;
}

.break-extra {
  display: block;
  margin-top: 3px;
  color: #6b4b00;
  font-size: 0.78rem;
}

.schedule-table .empty-break {
  background: #ffffff;
}

.schedule-table .extra-schedule-row th,
.schedule-table .extra-schedule-row td {
  border-bottom: 0;
}

.schedule-table .extra-schedule-row .wednesday-extra-cell {
  border-left: 2px solid #222222;
  border-right: 2px solid #222222;
  border-bottom: 2px solid #222222;
}

.schedule-table .gone-cell {
  border: 0;
  background: transparent;
}

.schedule-end {
  display: block;
  margin-top: 4px;
  color: #6b4b00;
  font-size: 0.78rem;
  font-weight: 800;
}

.weather-page {
  min-height: 55vh;
}

.weather-card {
  display: grid;
  gap: 16px;
  max-width: 560px;
  padding: 18px;
  border: 2px solid #222222;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 6px 6px 0 #222222;
}

.weather-place {
  margin-bottom: 0;
  color: #6b4b00;
  font-weight: 800;
  text-transform: uppercase;
}

.weather-main {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 16px;
}

.weather-mark {
  display: grid;
  min-width: 110px;
  min-height: 110px;
  place-items: center;
  border: 2px solid #222222;
  border-radius: 8px;
  background: #fff0ba;
  color: #222222;
  font-size: 1.35rem;
  font-weight: 900;
  text-align: center;
}

.weather-temp {
  margin-bottom: 4px;
  font-size: clamp(2.2rem, 10vw, 4rem);
  font-weight: 900;
  line-height: 1;
}

.weather-text {
  margin-bottom: 0;
  color: #555555;
  font-weight: 800;
}

.weather-tip {
  margin-bottom: 0;
  padding: 14px;
  border: 2px solid #222222;
  border-radius: 8px;
  background: #e8f7ff;
  font-weight: 800;
}

@media (max-width: 560px) {
  .app-shell {
    padding: 16px;
  }

  .login-screen {
    padding: 20px;
    box-shadow: 5px 5px 0 #222222;
  }

  .password-row {
    grid-template-columns: 1fr;
  }

  .top-bar {
    align-items: flex-start;
  }

  .top-bar h1 {
    font-size: 2.25rem;
  }

  .todo-layout {
    grid-template-columns: 1fr;
  }

  .todo-item {
    grid-template-columns: auto 1fr;
  }

  .todo-stars {
    grid-column: 2;
    width: fit-content;
  }

  .sky {
    min-height: 230px;
  }

  .main-menu {
    min-width: min(220px, calc(100vw - 32px));
  }
}
