:root{
    --bg:#f5f5f7;
    --card:rgba(255,255,255,.78);
    --text:#1d1d1f;
    --secondary:#6e6e73;
    --line:rgba(60,60,67,.12);

    --green:#34c759;
    --blue:#007aff;
    --orange:#ff9500;
  }

  *{
    box-sizing:border-box;
  }

  html{
    -webkit-text-size-adjust:100%;
  }

  body{
    margin:0;
    min-height:100vh;

    background:
      radial-gradient(
        circle at 50% -10%,
        #ffffff 0,
        transparent 42%
      ),
      var(--bg);

    color:var(--text);

    font-family:
      -apple-system,
      BlinkMacSystemFont,
      "SF Pro Display",
      "SF Pro Text",
      "Helvetica Neue",
      Arial,
      sans-serif;

    -webkit-font-smoothing:antialiased;
  }

  .wrap{
    width:min(100%,760px);
    margin:0 auto;

    padding:
      calc(30px + env(safe-area-inset-top))
      18px
      calc(34px + env(safe-area-inset-bottom));
  }

  /* HEADER */

  header{
    padding:10px 4px 28px;
  }

  .eyebrow{
    margin:0 0 7px;

    color:var(--secondary);

    font-size:13px;
    font-weight:600;

    letter-spacing:.02em;
  }

  h1{
    margin:0;

    font-size:clamp(34px,9vw,48px);
    line-height:1.05;

    letter-spacing:-.045em;
    font-weight:700;
  }

  .date{
    margin-top:9px;

    color:var(--secondary);
    font-size:15px;
  }

  /* SECTIONS */

  section{
    margin-top:8px;
  }

  .section-title{
    margin:0 5px 9px;

    color:var(--secondary);

    font-size:13px;
    font-weight:600;

    text-transform:uppercase;
    letter-spacing:.055em;
  }

  /* GENERAL CARD */

  .card{
    overflow:hidden;

    border:1px solid rgba(60,60,67,.09);
    border-radius:18px;

    background:var(--card);

    backdrop-filter:blur(20px);
    -webkit-backdrop-filter:blur(20px);

    box-shadow:
      0 8px 30px rgba(0,0,0,.045);
  }

  /* TODAY / YESTERDAY / TOMORROW */

  .daily-status{
    display:grid;
    grid-template-columns:1.35fr 1fr 1fr;
  }

  .daily-column{
    min-width:0;
    padding:17px 15px 18px;
  }

  .daily-column + .daily-column{
    border-left:1px solid var(--line);
  }

  .daily-title{
    margin:0 0 12px;

    font-size:13px;
    line-height:1.25;

    font-weight:700;
    letter-spacing:-.01em;
  }

  .daily-title.today{
    color:var(--orange);
  }

  .daily-title.yesterday{
    color:var(--green);
  }

  .daily-title.tomorrow{
    color:var(--blue);
  }

  .daily-subject{
    margin:0 0 7px;

    font-size:14px;
    line-height:1.3;

    font-weight:650;
  }

  .daily-tasks{
    margin:0;
    padding:0;

    list-style:none;
  }

  .daily-tasks li{
    position:relative;

    margin:6px 0;
    padding-left:13px;

    color:#4b4b50;

    font-size:12.5px;
    line-height:1.35;
  }

  .daily-tasks li::before{
    content:"";

    position:absolute;

    left:1px;
    top:.56em;

    width:4px;
    height:4px;

    border-radius:50%;

    background:#a1a1a6;
  }

  .daily-note{
    color:var(--secondary);

    font-size:12.5px;
    line-height:1.4;
  }

  /* SUBJECT STATUS */

  .subject{
    padding:17px 16px 16px;
  }

  .subject + .subject{
    border-top:1px solid var(--line);
  }

  .row{
    display:flex;

    align-items:center;
    justify-content:space-between;

    gap:14px;
  }

  .name{
    min-width:0;

    font-size:17px;
    line-height:1.25;

    font-weight:600;
    letter-spacing:-.015em;
  }

  .badge{
    flex:0 0 auto;

    padding:6px 9px;

    border-radius:999px;

    font-size:11px;
    line-height:1;

    font-weight:700;
    letter-spacing:.015em;
  }

  .done{
    color:#16883e;
    background:rgba(52,199,89,.13);
  }

  .ready{
    color:#0067d9;
    background:rgba(0,122,255,.11);
  }

  .remaining{
    color:#b86600;
    background:rgba(255,149,0,.13);
  }

  ul{
    margin:10px 0 0;
    padding:0;

    list-style:none;
  }

  li{
    position:relative;

    padding-left:18px;
    margin-top:7px;

    color:#4b4b50;

    font-size:14px;
    line-height:1.35;
  }

  li:before{
    content:"";

    position:absolute;

    left:2px;
    top:.52em;

    width:5px;
    height:5px;

    border-radius:50%;

    background:#a1a1a6;
  }

  /* LEARNING */

  .learning{
    padding:20px 17px;
  }

  .learning-title{
    font-size:17px;
    font-weight:600;

    letter-spacing:-.015em;
  }

  .learning-text{
    margin-top:7px;

    color:var(--secondary);

    font-size:14px;
    line-height:1.45;
  }

  /* DESKTOP */

  @media (min-width:700px){

    .wrap{
      padding-left:28px;
      padding-right:28px;
    }

    header{
      padding-top:22px;
    }

    .daily-column{
      padding-left:20px;
      padding-right:20px;
    }
  }

  /* SMALL MOBILE */

  @media (max-width:380px){

    .daily-column{
      padding-left:11px;
      padding-right:11px;
    }

    .daily-title{
      font-size:12px;
    }

    .daily-subject{
      font-size:13px;
    }

    .daily-tasks li,
    .daily-note{
      font-size:11.5px;
    }
  }

/* =========================
   DATA LOADING
   ========================= */

.loading {
  padding: 30px 5px;
  color: var(--secondary);
  font-size: 15px;
}

/* =========================
   INSTALL APP POPUP
   ========================= */

.install-popup {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.35);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: .3s ease;
  z-index: 9999;
}

.install-popup.show {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.install-popup-content {
  width: 100%;
  max-width: 420px;
  background: rgba(255,255,255,.95);
  border-radius: 28px;
  padding: 28px 24px 22px;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0,0,0,.18);
  position: relative;
  transform: translateY(30px);
  transition: .35s ease;
}

.install-popup.show .install-popup-content {
  transform: translateY(0);
}

.install-close {
  position: absolute;
  top: 14px;
  right: 16px;
  width: 34px;
  height: 34px;
  border: none;
  border-radius: 50%;
  background: #f1f1f1;
  font-size: 24px;
  line-height: 30px;
  cursor: pointer;
}

.install-icon {
  width: 70px;
  height: 70px;
  margin: 0 auto 16px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 34px;
  background: linear-gradient(135deg,#dbeafe,#e0e7ff);
  box-shadow: 0 8px 20px rgba(0,0,0,.08);
}

.install-popup-content h2 {
  margin: 0 0 8px;
  font-size: 23px;
  font-weight: 700;
}

.install-popup-content p {
  margin: 0 auto 22px;
  max-width: 320px;
  color: #666;
  line-height: 1.5;
}

.install-button {
  width: 100%;
  padding: 14px;
  border: none;
  border-radius: 15px;
  background: #007aff;
  color: white;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(0,122,255,.25);
}

.later-button {
  width: 100%;
  margin-top: 10px;
  padding: 12px;
  border: none;
  background: transparent;
  color: #666;
  font-size: 15px;
  cursor: pointer;
}

.ios-install-guide {
  text-align: center;
}

.ios-share-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 16px;
  border-radius: 18px;
  background: #007aff;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 34px;
  font-weight: 600;
}

.ios-install-guide h2 {
  margin: 0 0 8px;
  font-size: 22px;
}

.ios-install-guide > p {
  color: #666;
  margin-bottom: 22px;
}

.ios-step {
  display: flex;
  align-items: center;
  text-align: left;
  gap: 14px;
  padding: 13px 0;
  border-bottom: 1px solid #eee;
}

.ios-step span {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  border-radius: 50%;
  background: #007aff;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
}

.ios-close-guide {
  width: 100%;
  margin-top: 22px;
  padding: 14px;
  border: none;
  border-radius: 15px;
  background: #007aff;
  color: white;
  font-size: 16px;
  font-weight: 600;
}
