:root {
  --navy: #0c2b4a;
  --navy-2: #10375c;
  --blue: #4f93cf;
  --blue-2: #6aaee5;
  --rail: #91a2b6;
  --rail-button: #7a8ea4;
  --panel: #c7d7e6;
  --panel-2: #b8cadb;
  --panel-3: #d8e3ed;
  --ink: #052b4f;
  --muted: #496a88;
  --green-glass: rgba(79, 164, 117, 0.46);
  --green-ink: #0d4938;
  --line: rgba(16, 55, 92, 0.18);
  font-family: "Aptos", "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

.is-hidden {
  display: none !important;
}

html,
body {
  margin: 0;
  height: 100%;
  background: #96afc6;
  color: var(--ink);
  overflow: hidden;
}

button,
input,
textarea {
  font: inherit;
}

button {
  -webkit-tap-highlight-color: transparent;
}

.app-shell {
  height: 100vh;
  background: linear-gradient(135deg, #a5bdd4, #c6d7e7);
  overflow: hidden;
}

.topbar {
  min-height: 104px;
  padding: calc(14px + env(safe-area-inset-top)) 28px 16px;
  background: var(--navy);
  color: white;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  box-shadow: 0 12px 32px rgba(9, 31, 54, 0.18);
}

.topbar h1 {
  margin: 0;
  font-size: clamp(30px, 3.2vw, 44px);
  line-height: 1;
  letter-spacing: -0.04em;
}

.topbar p {
  margin: 6px 0 8px;
  color: #e3effa;
}

.install-button,
.close-button {
  border: 0;
  background: var(--blue);
  color: white;
  font-weight: 800;
  padding: 12px 22px;
  border-radius: 0;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.auth-summary {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #e3effa;
}

.auth-button {
  min-height: 40px;
  border: 0;
  padding: 0 14px;
  background: rgba(79, 147, 207, 0.28);
  color: white;
  font-weight: 800;
}

.body-layout {
  display: grid;
  grid-template-columns: 44px 1fr;
  height: calc(100vh - 104px);
  overflow: hidden;
}

.side-rail {
  background: var(--rail);
  min-height: 0;
  padding: 14px 4px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

.rail-button {
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 0;
  background: #7a8ea4;
  color: white;
  display: grid;
  place-items: center;
}

#scheduleButton {
  background: #4f93cf;
}

.rail-button.active {
  background: #4f93cf;
}

.rail-gap {
  height: 4px;
}

.rail-dots {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

.rail-dots span {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #0c2b4a;
}

.clock-icon {
  width: 23px;
  height: 23px;
  border: 2.5px solid white;
  border-radius: 50%;
  position: relative;
}

.clock-icon::before,
.clock-icon::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 2.5px;
  background: white;
  border-radius: 999px;
  transform-origin: center top;
}

.clock-icon::before {
  height: 8px;
  transform: translate(-50%, -50%);
}

.clock-icon::after {
  height: 7px;
  transform: translate(-50%, -50%) rotate(90deg);
}

.workspace {
  display: grid;
  grid-template-columns: minmax(430px, 0.9fr) minmax(620px, 1.1fr);
  gap: 28px;
  padding: 28px;
  height: 100%;
  overflow: hidden;
  transition: grid-template-columns 220ms ease;
}

.workspace.calendar-collapsed {
  grid-template-columns: 0 minmax(620px, 1fr);
}

.calendar-pane,
.day-pane {
  min-width: 0;
  min-height: 0;
}

.workspace.calendar-collapsed .calendar-pane {
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

.month-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 14px;
}

.month-button,
.day-button,
.card {
  border: 0;
  color: var(--ink);
  background: var(--panel-3);
  transition: transform 140ms ease, background 140ms ease, box-shadow 140ms ease;
}

.month-button {
  min-height: 44px;
  border-radius: 0;
  font-weight: 700;
}

.month-button.active,
.day-button.selected {
  background: #3e78b8;
  color: white;
}

.month-button:active,
.day-button:active,
.card:active {
  transform: scale(0.975);
}

.calendar-card,
.day-pane,
.study-box {
  background: rgba(203, 216, 229, 0.94);
  border: 1px solid var(--line);
}

.calendar-card {
  height: 440px;
  padding: 20px;
  overflow: hidden;
}

.calendar-card h2,
.day-header h2 {
  margin: 0 0 14px;
  font-size: clamp(28px, 2.4vw, 34px);
  letter-spacing: -0.04em;
}

.days-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px;
}

.weekday {
  min-height: 36px;
  display: grid;
  place-items: center;
  background: #aac2d9;
  font-weight: 800;
}

.day-button {
  min-height: 54px;
  text-align: left;
  padding: 10px 12px;
  font-size: 17px;
  font-weight: 700;
}

.day-button.today:not(.selected) {
  background: #a7bed4;
}

.day-pane {
  padding: 26px;
  height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: none;
}

.day-pane::-webkit-scrollbar {
  display: none;
}

.day-header p,
.homework-box p {
  margin: -12px 0 22px;
  color: var(--muted);
}

.study-box {
  padding: 20px 22px 24px;
  margin-bottom: 26px;
  overflow: hidden;
  min-height: 0;
}

.study-box h3 {
  margin: 0 0 14px;
  font-size: 24px;
}

.study-box h4 {
  margin: 0 0 8px;
  font-size: 17px;
}

.study-grid {
  display: grid;
  grid-template-columns: minmax(260px, 0.85fr) minmax(300px, 1.15fr);
  gap: 22px;
  align-items: start;
}

.palette,
.board {
  height: 196px !important;
  min-height: 196px !important;
  max-height: 196px !important;
  align-self: start !important;
  flex: 0 0 auto !important;
  padding: 14px;
  border: 1px solid rgba(16, 55, 92, 0.55);
  background: rgba(177, 197, 216, 0.86);
  display: flex;
  flex-wrap: wrap;
  align-content: flex-start;
  gap: 10px;
  overflow-y: scroll;
  overflow-x: hidden;
  scrollbar-color: rgba(16, 55, 92, 0.52) rgba(203, 216, 229, 0.7);
  scrollbar-width: thin;
}

.board {
  border-left: 12px solid #6abdf0;
  min-height: 196px !important;
}

.palette::-webkit-scrollbar,
.board::-webkit-scrollbar,
.calendar-card::-webkit-scrollbar,
.day-pane::-webkit-scrollbar {
  width: 10px;
}

.palette::-webkit-scrollbar-track,
.board::-webkit-scrollbar-track,
.calendar-card::-webkit-scrollbar-track,
.day-pane::-webkit-scrollbar-track {
  background: rgba(203, 216, 229, 0.72);
}

.palette::-webkit-scrollbar-thumb,
.board::-webkit-scrollbar-thumb,
.calendar-card::-webkit-scrollbar-thumb,
.day-pane::-webkit-scrollbar-thumb {
  background: rgba(16, 55, 92, 0.45);
  border-radius: 999px;
  border: 2px solid rgba(203, 216, 229, 0.72);
}

.board.dragover {
  outline: 4px solid rgba(106, 189, 240, 0.7);
}

.card {
  min-width: 132px;
  min-height: 52px;
  padding: 10px 14px;
  border: 1px solid rgba(16, 55, 92, 0.58);
  font-weight: 800;
  background: #d9e3ed;
  position: relative;
}

.card-editor {
  width: 100%;
  min-height: 34px;
  border: 0;
  border-bottom: 2px solid rgba(16, 55, 92, 0.48);
  background: rgba(255, 255, 255, 0.32);
  color: var(--ink);
  font-weight: 800;
  text-align: center;
  padding: 4px 6px;
}

.card-editor:focus {
  outline: 2px solid rgba(79, 147, 207, 0.8);
  outline-offset: 2px;
}

.card.done {
  color: var(--green-ink);
  background:
    linear-gradient(var(--green-glass), var(--green-glass)),
    #d9e3ed;
  box-shadow: inset 0 0 0 999px rgba(82, 177, 128, 0.12);
}

.card .remove-card {
  position: absolute;
  top: -8px;
  right: -8px;
  width: 22px;
  height: 22px;
  border: 0;
  border-radius: 50%;
  background: var(--navy);
  color: white;
  font-size: 14px;
  line-height: 1;
}

.other-editor {
  display: none;
  margin-top: 14px;
  font-weight: 800;
}

.other-editor.visible {
  display: grid;
  gap: 8px;
}

.other-editor input {
  min-height: 42px;
  border: 0;
  border-bottom: 3px solid #257bd0;
  background: #eaf1f8;
  color: var(--ink);
  padding: 8px 10px;
}

.homework-list {
  display: grid;
  gap: 8px;
  max-height: 230px;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-color: rgba(16, 55, 92, 0.52) rgba(203, 216, 229, 0.7);
  scrollbar-width: thin;
}

.homework-row {
  display: grid;
  grid-template-columns: 32px minmax(140px, 0.8fr) minmax(110px, 0.8fr) minmax(180px, 1.4fr);
  gap: 10px;
  align-items: center;
  background: #e1e9f2;
  border: 1px solid rgba(16, 55, 92, 0.14);
  padding: 8px;
}

.homework-row input[type="text"] {
  min-height: 38px;
  border: 1px solid rgba(16, 55, 92, 0.22);
  padding: 8px;
  background: #f6f9fc;
}

.homework-subject-editor {
  width: 100%;
  font-weight: 800;
}

.schedule-dialog {
  width: min(96vw, 1320px);
  height: min(92vh, 920px);
  border: 0;
  padding: 0;
  background: transparent;
}

.schedule-dialog::backdrop {
  background: rgba(7, 22, 38, 0.42);
}

.schedule-shell {
  width: 100%;
  height: 100%;
  padding: 26px;
  background: #cbdbe9;
  border: 10px solid var(--navy);
  display: grid;
  grid-template-rows: auto auto 1fr;
  gap: 16px;
}

.schedule-shell header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.schedule-shell h2 {
  margin: 0;
  font-size: 34px;
}

.drop-zone {
  border: 0;
  background: #4f93cf;
  color: white;
  font-weight: 800;
  min-height: 72px;
  display: grid;
  place-items: center;
  cursor: pointer;
}

.drop-zone.dragover {
  outline: 4px solid #0c2b4a;
  background: #6aaee5;
}

.drop-zone input {
  display: none;
}

.schedule-preview {
  overflow: auto;
  background: white;
  border: 1px solid rgba(16, 55, 92, 0.42);
  display: grid;
  place-items: center;
}

.schedule-preview img,
.schedule-preview iframe {
  width: 100%;
  height: 100%;
  border: 0;
  object-fit: contain;
}

.welcome-overlay {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 50% 42%, rgba(106, 174, 229, 0.46), transparent 34%),
    #0c2b4a;
  transition: transform 360ms ease, opacity 260ms ease;
}

.welcome-overlay.hidden {
  transform: translateY(-100%);
  opacity: 0;
  pointer-events: none;
}

.welcome-card {
  width: min(520px, 86vw);
  padding: 34px;
  background: #123b61;
  color: white;
  text-align: center;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.28);
}

.welcome-card img {
  width: 132px;
  height: 132px;
  object-fit: contain;
}

.welcome-card h2 {
  margin: 8px 0;
  font-size: 42px;
}

.welcome-card p {
  color: #d7e8f7;
  line-height: 1.5;
}

.welcome-card button {
  min-width: 220px;
  min-height: 60px;
  margin-top: 18px;
  border: 0;
  background: #5699d2;
  color: white;
  font-size: 20px;
  font-weight: 900;
  animation: welcomePulse 1.6s ease-in-out infinite;
}

@keyframes welcomePulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.045); }
}

.subscription-overlay {
  position: fixed;
  inset: 0;
  z-index: 19;
  display: grid;
  place-items: center;
  padding: 26px;
  background:
    radial-gradient(circle at 50% 32%, rgba(106, 174, 229, 0.42), transparent 38%),
    rgba(12, 43, 74, 0.96);
}

.subscription-overlay.hidden {
  display: none;
}

.subscription-card {
  width: min(620px, 92vw);
  padding: 34px;
  background: #cbdbe9;
  border: 8px solid #10375c;
  color: var(--ink);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.32);
}

.subscription-kicker {
  display: inline-grid;
  min-height: 32px;
  place-items: center;
  padding: 0 12px;
  background: #4f93cf;
  color: white;
  font-weight: 900;
  letter-spacing: 0.02em;
}

.subscription-card h2 {
  margin: 18px 0 10px;
  font-size: clamp(34px, 5vw, 52px);
  line-height: 0.96;
  letter-spacing: -0.05em;
}

.subscription-card p,
.subscription-card small {
  color: #355a7a;
  line-height: 1.5;
}

.subscription-price {
  display: grid;
  gap: 4px;
  margin: 22px 0;
  padding: 18px;
  border: 1px solid rgba(16, 55, 92, 0.24);
  background: rgba(216, 227, 237, 0.82);
}

.subscription-price strong {
  font-size: 22px;
}

.pix-qr {
  width: min(260px, 72vw);
  aspect-ratio: 1;
  display: block;
  margin: 20px auto;
  background: white;
  border: 10px solid white;
  object-fit: contain;
}

.pix-copy,
.subscriber-fields label {
  display: grid;
  gap: 8px;
  font-weight: 900;
}

.pix-copy textarea {
  min-height: 78px;
  resize: vertical;
  border: 1px solid rgba(16, 55, 92, 0.22);
  background: #eaf1f8;
  color: var(--ink);
  padding: 10px;
  font-size: 13px;
}

.subscriber-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 16px 0 18px;
}

.subscriber-fields input {
  min-height: 46px;
  border: 1px solid rgba(16, 55, 92, 0.22);
  background: #eef5fb;
  color: var(--ink);
  padding: 10px;
}

.subscription-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 18px;
}

.pay-button,
.unlock-button {
  min-height: 54px;
  border: 0;
  padding: 0 20px;
  font-weight: 900;
}

.pay-button {
  background: var(--navy);
  color: white;
}

.unlock-button {
  background: #4f93cf;
  color: white;
}

.subscription-status {
  min-height: 24px;
  margin: 0 0 12px;
  font-weight: 900;
  color: #10375c;
}

.auth-actions {
  margin-top: 18px;
}

.auth-switch-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: -4px 0 16px;
  color: #355a7a;
  font-size: 14px;
  font-weight: 800;
}

.auth-switch-button {
  border: 0;
  background: transparent;
  color: #3e78b8;
  font-weight: 900;
  font-size: 14px;
  padding: 0;
  text-decoration: underline;
}

.auth-form {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.auth-form label {
  display: grid;
  gap: 8px;
  font-weight: 900;
}

.auth-form input {
  min-height: 48px;
  border: 1px solid rgba(16, 55, 92, 0.22);
  background: #eef5fb;
  color: var(--ink);
  padding: 10px 12px;
}

.password-field {
  position: relative;
  display: block;
}

.password-field input {
  width: 100%;
  padding-right: 52px;
}

.toggle-password-button {
  position: absolute;
  top: 50%;
  right: 8px;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  border: 0;
  background: transparent;
  color: #355a7a;
  font-size: 18px;
  line-height: 1;
  display: grid;
  place-items: center;
}

.toggle-password-button.is-active {
  color: #0c2b4a;
}

.social-actions {
  margin-top: 2px;
}

.social-button {
  min-height: 54px;
  border: 0;
  padding: 0 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-weight: 900;
}

.google-button {
  background: white;
  color: #173a5c;
}

.social-icon {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: inline-grid;
  place-items: center;
  font-size: 16px;
  font-weight: 900;
}

.google-icon {
  background: #ffffff;
  color: #4285f4;
  border: 1px solid rgba(16, 55, 92, 0.14);
}

.admin-page {
  min-height: 100dvh;
  padding: 34px;
  background: #a5bdd4;
  color: var(--ink);
}

.admin-shell {
  max-width: 1120px;
  margin: 0 auto;
  padding: 28px;
  background: rgba(203, 216, 229, 0.94);
  border: 8px solid var(--navy);
}

.admin-login {
  min-height: calc(100dvh - 68px);
  display: grid;
  place-items: center;
}

.admin-login-card {
  width: min(460px, 92vw);
  padding: 28px;
  background: rgba(203, 216, 229, 0.96);
  border: 8px solid var(--navy);
}

.admin-login-card h1 {
  margin: 0 0 10px;
  font-size: clamp(30px, 5vw, 46px);
}

.admin-login-card label {
  display: grid;
  gap: 8px;
  margin: 20px 0 14px;
  font-weight: 900;
}

.admin-login-card input {
  min-height: 48px;
  border: 1px solid rgba(16, 55, 92, 0.28);
  background: #eef5fb;
  color: var(--ink);
  padding: 10px;
}

.admin-login-card small {
  display: block;
  min-height: 22px;
  margin-top: 12px;
  color: #8a1f1f;
  font-weight: 900;
}

.admin-shell h1 {
  margin: 0 0 8px;
  font-size: clamp(34px, 5vw, 56px);
}

.admin-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 22px 0;
}

.admin-button {
  min-height: 44px;
  border: 0;
  padding: 0 16px;
  background: var(--navy);
  color: white;
  font-weight: 900;
}

.admin-list {
  display: grid;
  gap: 12px;
}

.admin-request {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 16px;
  background: #e1e9f2;
  border: 1px solid rgba(16, 55, 92, 0.22);
}

.admin-request strong,
.admin-request code {
  display: block;
}

.admin-request small {
  color: var(--muted);
}

.admin-request-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.admin-delete-button {
  width: 38px;
  height: 38px;
  border: 0;
  background: #8a1f1f;
  color: white;
  font-size: 24px;
  font-weight: 900;
  line-height: 1;
}

@media (max-width: 980px) {
  .workspace,
  .workspace.calendar-collapsed {
    grid-template-columns: 1fr;
  }

  .workspace.calendar-collapsed .calendar-pane {
    display: none;
  }

  .day-pane {
    max-height: none;
  }

  .study-grid,
  .homework-row {
    grid-template-columns: 1fr;
  }
}

@media (hover: none) and (pointer: coarse) {
  html,
  body {
    height: auto;
    min-height: 100%;
    overflow: auto;
  }

  .app-shell {
    min-height: 100dvh;
    height: auto;
    overflow: visible;
  }

  .topbar {
    min-height: 96px;
    padding: calc(12px + env(safe-area-inset-top)) 22px 14px;
  }

  .topbar h1 {
    font-size: clamp(32px, 5vw, 48px);
  }

  .topbar p {
    max-width: 820px;
    line-height: 1.35;
  }

  .topbar-actions {
    align-self: start;
  }

  .body-layout {
    grid-template-columns: 44px minmax(0, 1fr);
    height: auto;
    min-height: calc(100dvh - 96px);
    overflow: visible;
  }

  .side-rail {
    position: sticky;
    top: 0;
    align-self: start;
    min-height: 100dvh;
  }

  .workspace,
  .workspace.calendar-collapsed {
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 20px;
    height: auto;
    overflow: visible;
  }

  .workspace.calendar-collapsed .calendar-pane {
    display: none;
  }

  .month-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
  }

  .month-button {
    min-height: 54px;
    font-size: 18px;
  }

  .calendar-card {
    height: auto;
    padding: 22px;
  }

  .calendar-card h2 {
    font-size: clamp(34px, 5.5vw, 46px);
    margin-bottom: 20px;
  }

  .days-grid {
    gap: 10px;
  }

  .weekday {
    min-height: 44px;
    font-size: 18px;
  }

  .day-button {
    min-height: 76px;
    padding: 14px 16px;
    font-size: 22px;
  }

  .day-pane {
    height: auto;
    padding: 24px;
    overflow: visible;
    scrollbar-width: auto;
  }

  .day-pane::-webkit-scrollbar {
    display: none;
  }

  .study-box {
    margin-bottom: 24px;
  }

  .study-grid {
    grid-template-columns: minmax(260px, 0.82fr) minmax(300px, 1.18fr);
  }

  .palette,
  .board {
    height: 220px !important;
    min-height: 220px !important;
    max-height: 220px !important;
    overflow-y: auto;
    overflow-x: hidden;
  }

  .schedule-dialog {
    width: min(94vw, 1120px);
    height: min(88dvh, 820px);
  }

  .subscription-overlay {
    align-items: start;
    justify-items: center;
    padding: max(18px, env(safe-area-inset-top)) 18px max(18px, env(safe-area-inset-bottom));
    overflow-y: auto;
  }

  .subscription-card {
    width: min(640px, 94vw);
    max-height: calc(100dvh - 36px);
    overflow-y: auto;
    padding: 26px;
  }

  .subscription-card h2 {
    font-size: clamp(34px, 6vw, 46px);
  }

  .pix-qr {
    width: min(220px, 48vw);
    margin: 14px auto;
  }

  .subscription-price {
    margin: 16px 0;
    padding: 14px;
  }

  .subscriber-fields {
    grid-template-columns: 1fr;
  }
}

@media (hover: none) and (pointer: coarse) and (max-width: 760px) {
  .topbar {
    min-height: 112px;
    padding: calc(14px + env(safe-area-inset-top)) 24px 14px;
  }

  .topbar h1 {
    font-size: 31px;
  }

  .topbar p,
  .topbar strong {
    font-size: 14px;
  }

  .topbar-actions {
    width: 100%;
    justify-content: space-between;
  }

  .auth-summary {
    flex-wrap: wrap;
  }

  .body-layout {
    grid-template-columns: 38px minmax(0, 1fr);
    min-height: calc(100dvh - 112px);
  }

  .side-rail {
    padding: 10px 3px;
  }

  .rail-button {
    width: 32px;
    height: 32px;
  }

  .clock-icon {
    width: 20px;
    height: 20px;
  }

  .workspace,
  .workspace.calendar-collapsed {
    padding: 14px;
    gap: 16px;
  }

  .month-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 12px;
  }

  .month-button {
    min-height: 38px;
    padding: 6px 4px;
    font-size: 13px;
  }

  .calendar-card {
    padding: 16px;
  }

  .calendar-card h2 {
    font-size: 25px;
    margin-bottom: 14px;
  }

  .days-grid {
    gap: 6px;
  }

  .weekday {
    min-height: 30px;
    font-size: 13px;
  }

  .day-button {
    min-height: 38px;
    padding: 7px 8px;
    font-size: 16px;
  }

  .day-pane {
    padding: 18px;
  }

  .day-header h2 {
    font-size: 28px;
  }

  .day-header p,
  .homework-box p {
    margin: -8px 0 18px;
    font-size: 14px;
  }

  .study-box {
    padding: 18px;
    margin-bottom: 20px;
  }

  .study-box h3 {
    font-size: 25px;
    line-height: 1.05;
  }

  .study-grid,
  .homework-row {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .palette,
  .board {
    height: 172px !important;
    min-height: 172px !important;
    max-height: 172px !important;
    padding: 12px;
    flex-wrap: nowrap;
    flex-direction: column;
    align-items: stretch;
  }

  .card {
    width: 100%;
    min-width: 0;
  }

  .homework-list {
    max-height: 220px;
  }

  .schedule-dialog {
    width: min(92vw, 420px);
    height: min(84dvh, 700px);
  }

  .schedule-shell {
    padding: 20px;
    border-width: 7px;
    gap: 14px;
  }

  .schedule-shell h2 {
    font-size: 30px;
    line-height: 1.08;
  }

  .close-button {
    padding: 10px 16px;
  }

  .drop-zone {
    min-height: 58px;
    padding: 10px;
    text-align: left;
  }

  .subscription-card {
    width: min(330px, 92vw);
    max-height: calc(100dvh - 28px);
    padding: 18px;
    border-width: 6px;
  }

  .subscription-card h2 {
    margin: 12px 0 8px;
    font-size: 28px;
  }

  .subscription-actions {
    display: grid;
    gap: 10px;
  }

  .social-button {
    width: 100%;
  }

  .subscriber-fields {
    grid-template-columns: 1fr;
  }

  .subscription-card p,
  .subscription-card small {
    font-size: 13px;
    line-height: 1.35;
  }

  .subscription-kicker {
    min-height: 26px;
    font-size: 12px;
  }

  .pix-qr {
    width: min(170px, 54vw);
    border-width: 6px;
    margin: 10px auto;
  }

  .subscription-price {
    margin: 12px 0;
    padding: 12px;
  }

  .subscription-price strong {
    font-size: 17px;
  }

  .pix-copy textarea {
    min-height: 58px;
    font-size: 11px;
  }

  .subscriber-fields {
    margin: 12px 0;
  }

  .subscriber-fields input,
  .pay-button,
  .unlock-button {
    min-height: 44px;
  }

  .subscription-status {
    font-size: 13px;
  }
}
