:root {
  --ink: #17211f;
  --muted: #63706d;
  --paper: #f7f5ef;
  --surface: #ffffff;
  --green: #11443f;
  --green-soft: #dcece4;
  --wine: #7b263b;
  --gold: #c89534;
  --line: rgba(23, 33, 31, 0.12);
  --shadow: 0 18px 45px rgba(17, 68, 63, 0.16);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: Arial, Helvetica, sans-serif;
  background:
    linear-gradient(135deg, rgba(17, 68, 63, 0.08), transparent 32%),
    linear-gradient(315deg, rgba(123, 38, 59, 0.09), transparent 36%),
    var(--paper);
}

a {
  color: inherit;
  text-decoration: none;
}

.app-shell {
  display: flex;
  flex-direction: column;
  width: min(1120px, 100%);
  min-height: 100vh;
  margin: 0 auto;
  padding: 22px;
}

main {
  flex: 1;
}

.config-button {
  position: fixed;
  top: 18px;
  right: 18px;
  z-index: 5;
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 10px 24px rgba(17, 68, 63, 0.16);
  color: var(--green);
  cursor: pointer;
  font-size: 1.2rem;
  font-weight: 900;
}

.config-button:hover,
.config-button:focus-visible {
  border-color: var(--gold);
  outline: none;
}

.eyebrow,
.section-kicker {
  margin: 0 0 6px;
  color: var(--wine);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2 {
  margin: 0;
  letter-spacing: 0;
}

h1 {
  font-size: clamp(1.45rem, 3vw, 2.15rem);
}

h2 {
  font-size: clamp(1.55rem, 5vw, 3.4rem);
  line-height: 1.02;
}

.welcome-band {
  display: flex;
  justify-content: center;
  min-height: 22vh;
  padding: 42px 0 34px;
  text-align: center;
}

.welcome-title {
  display: grid;
  gap: 10px;
}

.welcome-title p {
  margin: 0;
  color: var(--wine);
  font-size: clamp(1.05rem, 2vw, 1.35rem);
  font-weight: 800;
  line-height: 1.25;
}

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

.portal-card,
.platform-entry {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 244px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: var(--shadow);
  color: inherit;
  cursor: pointer;
  font: inherit;
  text-align: left;
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.portal-card:hover,
.portal-card:focus-visible,
.platform-entry:hover,
.platform-entry:focus-visible {
  border-color: rgba(200, 149, 52, 0.68);
  box-shadow: 0 22px 56px rgba(17, 68, 63, 0.22);
  outline: none;
  transform: translateY(-3px);
}

.portal-icon {
  position: relative;
  display: grid;
  flex: 0 0 74px;
  width: 74px;
  height: 74px;
  place-items: center;
  border-radius: 8px;
  color: var(--surface);
  font-weight: 800;
}

.floating-scene {
  position: relative;
  display: block;
  flex: 0 0 210px;
  width: 210px;
  height: 188px;
  overflow: hidden;
  border-radius: 8px;
  background: #cde9ff;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.42);
}

.sky-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.06);
}

.angel-image {
  position: absolute;
  left: 50%;
  bottom: 6px;
  width: 180px;
  max-width: none;
  transform: translateX(-50%);
  filter:
    brightness(1.12)
    saturate(1.08)
    drop-shadow(0 0 6px rgba(255, 255, 255, 0.92))
    drop-shadow(0 0 13px rgba(236, 248, 255, 0.58))
    drop-shadow(0 14px 18px rgba(17, 68, 63, 0.2));
  animation: angelFloat 3.8s ease-in-out infinite;
}

.trinitas-scene::after {
  content: "";
  position: absolute;
  inset: 0;
  background: transparent;
}

.trinitas-symbol {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  animation: angelFloat 4.2s ease-in-out infinite;
}

.trinitas-image {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 1;
  width: 86%;
  height: auto;
  max-height: 76%;
  max-width: none;
  transform: translate(-50%, -50%);
  animation: trinitasImageFloat 4.2s ease-in-out infinite;
}

.trinitas-symbol span {
  width: 16px;
  height: 62px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 10px 18px rgba(23, 33, 31, 0.18);
}

.trinitas-symbol span:nth-child(2) {
  height: 82px;
  background: rgba(255, 244, 214, 0.94);
}

@keyframes angelFloat {
  0%,
  100% {
    transform: translate(-50%, 0);
  }
  50% {
    transform: translate(-50%, -10px);
  }
}

.trinitas-symbol {
  transform: translateX(0);
}

.trinitas-symbol {
  animation-name: trinitasFloat;
}

@keyframes trinitasFloat {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-8px);
  }
}

@keyframes trinitasImageFloat {
  0%,
  100% {
    transform: translate(-50%, -50%);
  }
  50% {
    transform: translate(-50%, calc(-50% - 8px));
  }
}

.guardianes-icon {
  background: linear-gradient(145deg, var(--green), #23675f);
}

.guardianes-icon::before {
  content: "";
  position: absolute;
  top: 13px;
  width: 34px;
  height: 18px;
  border: 3px solid rgba(255, 255, 255, 0.86);
  border-bottom: 0;
  border-radius: 24px 24px 0 0;
}

.guardianes-icon span {
  width: 28px;
  height: 38px;
  border: 3px solid rgba(255, 255, 255, 0.9);
  border-radius: 18px 18px 8px 8px;
  transform: translateY(8px);
}

.trinitas-icon {
  grid-template-columns: repeat(3, 12px);
  gap: 5px;
  background: linear-gradient(145deg, var(--wine), #a8425a);
}

.trinitas-icon span {
  width: 12px;
  height: 40px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.88);
}

.trinitas-icon span:nth-child(2) {
  height: 52px;
}

.pending-icon {
  background: linear-gradient(145deg, #6d7471, #303836);
  font-size: 2rem;
}

.portal-content,
.platform-entry span:last-child {
  display: grid;
  gap: 8px;
}

.portal-content strong,
.platform-entry strong {
  font-size: 1.05rem;
}

.portal-content small,
.platform-entry small,
.module-row small {
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.35;
}

.session-person {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.view-panel {
  margin-top: 22px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow);
}

.view-header {
  display: grid;
  gap: 8px;
  margin-bottom: 20px;
}

.back-button {
  width: fit-content;
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--green);
  background: var(--green-soft);
  font-weight: 700;
}

.platform-entry {
  min-height: 112px;
  box-shadow: none;
}

.platform-mark {
  display: grid;
  flex: 0 0 62px;
  width: 62px;
  height: 62px;
  place-items: center;
  border-radius: 8px;
  color: var(--surface);
  background: var(--gold);
  font-weight: 800;
}

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

.module-row {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 0;
  border-top: 1px solid var(--line);
}

.module-row span {
  font-weight: 700;
}

.task-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.task-filter {
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
  background: var(--surface);
  color: var(--green);
  cursor: pointer;
  font: inherit;
  font-size: 0.88rem;
  font-weight: 800;
}

.task-filter.active {
  border-color: var(--green);
  background: var(--green);
  color: white;
}

.tasks-empty {
  padding: 18px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.72);
}

.task-list {
  display: grid;
  gap: 20px;
}

.task-day {
  display: grid;
  gap: 10px;
}

.task-day h3 {
  margin: 0;
  color: var(--wine);
  font-size: 1.15rem;
}

.task-card {
  display: grid;
  gap: 7px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.86);
}

.task-card time {
  width: fit-content;
  padding: 4px 8px;
  border-radius: 8px;
  background: var(--green-soft);
  color: var(--green);
  font-size: 0.78rem;
  font-weight: 900;
}

.task-card strong {
  color: var(--ink);
  line-height: 1.35;
}

.task-title {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.task-number {
  flex: 0 0 auto;
  min-width: 34px;
  padding: 3px 7px;
  border-radius: 8px;
  background: rgba(123, 38, 59, 0.1);
  color: var(--wine);
  font-size: 0.78rem;
  font-weight: 900;
  line-height: 1.35;
  text-align: center;
}

.task-card small {
  color: var(--muted);
  line-height: 1.35;
}

.task-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.45;
}

.access-modal {
  width: min(430px, calc(100% - 28px));
  border: 0;
  border-radius: 8px;
  padding: 0;
  background: transparent;
}

.config-modal {
  width: min(820px, calc(100% - 28px));
  border: 0;
  border-radius: 8px;
  padding: 0;
  background: transparent;
}

.config-modal::backdrop {
  background: rgba(12, 25, 23, 0.55);
  backdrop-filter: blur(3px);
}

.access-modal::backdrop {
  background: rgba(12, 25, 23, 0.55);
  backdrop-filter: blur(3px);
}

.access-box {
  position: relative;
  display: grid;
  gap: 14px;
  padding: 24px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 24px 70px rgba(17, 33, 31, 0.28);
}

.config-box {
  position: relative;
  display: grid;
  max-height: min(86vh, 760px);
  gap: 14px;
  padding: 24px;
  overflow: auto;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 24px 70px rgba(17, 33, 31, 0.28);
}

.access-box h2 {
  font-size: 1.7rem;
}

.config-box h2 {
  font-size: 1.75rem;
}

.access-box label,
.config-box label {
  display: grid;
  gap: 7px;
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 700;
}

.access-box input,
.access-box select,
.config-box input,
.config-box select {
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
  color: var(--ink);
  font: inherit;
  background: white;
}

.access-box input:focus,
.access-box select:focus,
.config-box input:focus,
.config-box select:focus {
  border-color: var(--gold);
  outline: 3px solid rgba(200, 149, 52, 0.18);
}

.config-login,
.config-panel {
  display: grid;
  gap: 14px;
}

.config-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.ghost-button {
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 14px;
  background: var(--paper);
  color: var(--wine);
  cursor: pointer;
  font: inherit;
  font-weight: 800;
}

.config-counter {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
}

.config-task-list {
  display: grid;
  max-height: 360px;
  gap: 8px;
  overflow: auto;
  padding-right: 4px;
}

.config-task {
  display: grid;
  grid-template-columns: 22px 1fr;
  align-items: start;
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(247, 245, 239, 0.52);
}

.config-task input {
  width: 18px;
  height: 18px;
  min-height: 0;
  margin-top: 2px;
}

.config-task span {
  display: grid;
  gap: 4px;
}

.config-task strong {
  line-height: 1.35;
}

.config-task small {
  color: var(--muted);
  line-height: 1.35;
}

.close-button {
  position: absolute;
  top: 12px;
  right: 12px;
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  color: var(--muted);
  cursor: pointer;
  font-weight: 800;
}

.primary-button {
  min-height: 46px;
  border: 0;
  border-radius: 8px;
  background: var(--green);
  color: white;
  cursor: pointer;
  font: inherit;
  font-weight: 800;
}

.access-message {
  min-height: 20px;
  margin: 0;
  color: var(--wine);
  font-size: 0.9rem;
  line-height: 1.35;
}

.access-message.ok {
  color: var(--green);
}

.site-footer {
  padding: 30px 0 8px;
  color: #4f5a57;
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.35;
  text-align: center;
}

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

  .welcome-band {
    min-height: auto;
    padding: 30px 0 24px;
  }

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

  .portal-card {
    min-height: 190px;
  }

  .floating-scene {
    flex-basis: 136px;
    width: 136px;
    height: 124px;
  }

  .angel-image {
    width: 118px;
  }

  .trinitas-image {
    top: 47%;
    width: 78%;
    max-height: 66%;
    animation-name: trinitasImageFloatMobile;
  }

  @keyframes trinitasImageFloatMobile {
    0%,
    100% {
      transform: translate(-50%, -50%);
    }
    50% {
      transform: translate(-50%, calc(-50% - 5px));
    }
  }

  .module-row {
    display: grid;
  }
}
