html {
  overflow-y: scroll;
}

body {
  margin: 0;
  min-height: 100vh;
  background-color: #fa5858;
  transition: background-color 220ms ease;
}

.pomodoro-layout {
  max-width: 1260px;
  margin: 0 auto;
  padding: 20px 18px 40px;
  display: grid;
  grid-template-columns: 220px minmax(0, 900px) 220px;
  gap: 18px;
  align-items: start;
}

.content {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

#timer-label {
  margin: 2px 0 0;
  font-size: 34px;
  line-height: 1.15;
}

.intro,
.timer,
#timer-description,
.guide {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.1);
}

body.theme-short-focus .intro,
body.theme-short-focus .timer,
body.theme-short-focus #timer-description,
body.theme-short-focus .guide {
  background: rgba(255, 240, 240, 0.92);
  border-color: #fecaca;
}

body.theme-long-focus .intro,
body.theme-long-focus .timer,
body.theme-long-focus #timer-description,
body.theme-long-focus .guide {
  background: rgba(255, 247, 237, 0.92);
  border-color: #fed7aa;
}

body.theme-short-break .intro,
body.theme-short-break .timer,
body.theme-short-break #timer-description,
body.theme-short-break .guide {
  background: rgba(240, 253, 244, 0.92);
  border-color: #bbf7d0;
}

body.theme-long-break .intro,
body.theme-long-break .timer,
body.theme-long-break #timer-description,
body.theme-long-break .guide {
  background: rgba(239, 246, 255, 0.92);
  border-color: #bfdbfe;
}

.intro {
  margin: 0;
  padding: 14px 16px;
  color: #475569;
  line-height: 1.65;
}

.body {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 14px;
}

.timer {
  padding: 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: center;
}

.timer button {
  height: 40px;
  padding: 0 12px;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  background: #0f172a;
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
}

.timer button:hover {
  filter: brightness(1.06);
}

#time-left {
  width: 100%;
  text-align: center;
  margin: 6px 0;
  font-size: clamp(2.7rem, 7vw, 5.2rem);
  font-weight: 800;
  line-height: 1;
  color: #0f172a;
}

#timer-description {
  padding: 14px;
  color: #334155;
}

#timer-description h2 {
  margin: 0 0 10px;
  font-size: 18px;
}

#shortcuts {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 8px;
  font-size: 14px;
}

.guide {
  margin-top: 4px;
  padding: 18px;
  color: #334155;
  line-height: 1.7;
}

.guide h2,
.guide h3 {
  color: #0f172a;
}

.ad-placeholder {
  padding: 16px 10px;
  border: 1px dashed #cbd5e1;
  border-radius: 12px;
  background: #f8fafc;
  color: #64748b;
  text-align: center;
  font-weight: 700;
  display: none;
}

.advertisement {
  display: none;
}

body.ads-enabled .advertisement {
  display: block;
}

.ad-inline,
.ad-banner {
  margin: 14px 0;
}

.desktop-only {
  display: block;
}

.mobile-only {
  display: none;
}

.footer {
  margin-top: 18px;
  padding: 0;
}

.modal {
  display: none;
  position: fixed;
  z-index: 50;
  inset: 0;
  background-color: rgba(2, 6, 23, 0.45);
}

.modal-content {
  position: relative;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  width: min(620px, calc(100% - 24px));
  margin: 80px auto 0;
  padding: 18px;
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.2);
}

.close {
  position: absolute;
  top: 10px;
  right: 14px;
  font-size: 22px;
  font-weight: 800;
  line-height: 1;
  color: #334155;
  cursor: pointer;
}

.modal-content input,
.modal-content select,
.modal-content button {
  margin-top: 6px;
  margin-bottom: 10px;
}

.modal-content input,
.modal-content select {
  height: 36px;
  padding: 0 10px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
}

.modal-content button {
  height: 36px;
  padding: 0 12px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #0f172a;
  color: #fff;
  font-weight: 700;
  cursor: pointer;
}

@media (max-width: 1100px) {
  .pomodoro-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .desktop-only {
    display: none;
  }

  .mobile-only {
    display: block;
  }
}

@media (max-width: 860px) {
  .body {
    grid-template-columns: 1fr;
  }
}
