:root {
  --blue-900: #003b8f;
  --blue-800: #0052bc;
  --blue-700: #0069e8;
  --blue-500: #2f9bff;
  --blue-300: #8fc5ff;
  --blue-120: #ddecff;
  --blue-80: #eff7ff;
  --yellow: #ffe65a;
  --yellow-strong: #ffd21e;
  --pink: #ff6fa8;
  --green: #12aa69;
  --red: #e64262;
  --ink: #09204a;
  --muted: #61728f;
  --card: rgba(255, 255, 255, .9);
  --line: #2b8cff;
  --shadow: 0 18px 42px rgba(0, 75, 170, .14);
  font-family: "Inter", "Segoe UI", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 8% 8%, rgba(0, 116, 255, .14), transparent 28%),
    radial-gradient(circle at 92% 10%, rgba(255, 230, 90, .24), transparent 30%),
    linear-gradient(135deg, #f7fbff 0%, #eef7ff 45%, #ffffff 100%);
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.app-bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: .8;
  background-image:
    radial-gradient(circle, rgba(47, 155, 255, .16) 0 5px, transparent 6px),
    radial-gradient(circle, rgba(255, 230, 90, .35) 0 4px, transparent 5px);
  background-size: 170px 170px, 230px 230px;
  background-position: 30px 40px, 120px 85px;
}

[hidden] {
  display: none !important;
}

.card,
.panel {
  border: 2px solid var(--line);
  border-radius: 24px;
  background: var(--card);
  box-shadow: var(--shadow);
}

.login-view {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(240px, 340px) minmax(420px, 680px);
  place-content: center;
  gap: 28px;
  padding: 32px;
}

.login-mascot {
  min-height: 300px;
  display: grid;
  place-items: center;
  background: linear-gradient(160deg, #006fe9, #003f9c);
  overflow: hidden;
}

.login-mascot-img {
  width: min(82%, 250px);
  max-height: 270px;
  object-fit: contain;
  filter: drop-shadow(0 18px 20px rgba(0, 24, 75, .28));
}

.login-logo {
  display: block;
  width: min(100%, 480px);
  max-height: 112px;
  margin: 8px 0 12px;
  object-fit: contain;
  object-position: left center;
}

.bird-badge {
  position: relative;
  width: 210px;
  height: 210px;
  display: grid;
  place-items: center;
  border-radius: 36px;
  background: linear-gradient(145deg, rgba(255, 255, 255, .18), rgba(255, 255, 255, .04));
}

.bird-body {
  font-size: 112px;
  filter: drop-shadow(0 18px 18px rgba(0, 26, 80, .34));
}

.bird-heart {
  position: absolute;
  right: 26px;
  bottom: 28px;
  font-size: 38px;
}

.login-panel {
  position: relative;
  padding: 34px;
}

.back-link {
  position: absolute;
  top: 18px;
  right: 24px;
  color: var(--blue-800);
  font-weight: 800;
  text-decoration: none;
}

.eyebrow {
  display: block;
  color: var(--blue-700);
  font-weight: 900;
  font-size: 22px;
}

h1,
h2,
h3,
p {
  margin: 0;
}

.login-panel h1 {
  margin: 6px 0 10px;
  font-size: clamp(38px, 5vw, 58px);
  line-height: .95;
}

.login-panel p,
.page-head p,
.hero p {
  color: var(--muted);
  font-weight: 700;
}

.form {
  display: grid;
  gap: 14px;
  margin-top: 24px;
}

.role-toggle {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.role-toggle label {
  display: block;
}

.role-toggle input {
  position: absolute;
  opacity: 0;
}

.role-toggle span,
.field input,
.search-box,
select {
  width: 100%;
  border: 2px solid var(--blue-300);
  border-radius: 16px;
  background: #fff;
}

.role-toggle span {
  display: grid;
  place-items: center;
  min-height: 52px;
  color: var(--blue-900);
  font-weight: 900;
}

.role-toggle input:checked + span {
  border-color: var(--yellow-strong);
  background: linear-gradient(180deg, #fff8b7, #fff0fd);
}

.field {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-weight: 900;
}

.field input,
.search-box,
select {
  min-height: 50px;
  padding: 0 16px;
  color: var(--ink);
  font-weight: 800;
  outline: none;
}

.primary-btn,
.secondary-btn,
.danger-btn,
.link-btn {
  border: 0;
  border-radius: 16px;
  min-height: 48px;
  padding: 0 18px;
  color: var(--ink);
  font-weight: 900;
}

.primary-btn {
  background: linear-gradient(180deg, #fff689, var(--yellow-strong));
  box-shadow: 0 14px 26px rgba(255, 196, 0, .26);
}

.secondary-btn {
  border: 2px solid var(--blue-300);
  background: #fff;
  color: var(--blue-800);
}

.danger-btn {
  border: 2px solid #ffc5d3;
  background: #fff0f5;
  color: var(--red);
}

.small {
  min-height: 44px;
}

.link-btn {
  width: 100%;
  margin-top: 14px;
  background: var(--blue-80);
  color: var(--blue-800);
}

#appView {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 292px 1fr;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: grid;
  grid-template-rows: auto auto 1fr auto;
  gap: 16px;
  padding: 16px;
  background: linear-gradient(180deg, var(--blue-700), #003579);
}

.brand-card {
  min-height: 285px;
  display: grid;
  place-items: center;
  border: 2px solid rgba(255, 230, 90, .9);
  border-radius: 22px;
  background: linear-gradient(160deg, #0074ed, #0044a5);
  box-shadow: inset 0 0 34px rgba(255, 255, 255, .08);
}

.brand-mascot-img {
  width: min(88%, 230px);
  max-height: 250px;
  object-fit: contain;
  filter: drop-shadow(0 16px 18px rgba(0, 27, 78, .32));
}

.brand-mascot {
  width: 188px;
  height: 188px;
  display: grid;
  place-items: center;
  border-radius: 32px;
  background: rgba(255, 255, 255, .12);
  font-size: 112px;
  filter: drop-shadow(0 16px 14px rgba(0, 27, 78, .28));
}

.desktop-nav {
  display: grid;
  gap: 10px;
}

.nav-btn,
.logout-btn {
  min-height: 52px;
  border: 2px solid rgba(143, 197, 255, .45);
  border-radius: 14px;
  padding: 0 16px;
  background: linear-gradient(180deg, rgba(0, 82, 188, .74), rgba(0, 44, 110, .8));
  color: #fff;
  font-weight: 900;
  text-align: left;
}

.nav-btn.active {
  border-color: var(--yellow-strong);
  background: linear-gradient(180deg, #fff57c, #ffd72d);
  color: #172033;
}

.values-card {
  align-self: end;
  display: grid;
  gap: 10px;
  border: 1px solid rgba(255, 255, 255, .42);
  border-radius: 18px;
  padding: 18px;
  background: rgba(0, 30, 76, .38);
  color: #fff;
}

.values-card strong {
  margin-bottom: 2px;
}

.logout-btn {
  text-align: center;
  background: #fff;
  color: var(--blue-800);
}

.main {
  position: relative;
  z-index: 1;
  padding: 18px 22px 18px;
  overflow: hidden;
}

.page {
  display: none;
}

.page.active {
  display: block;
}

.hero {
  min-height: 96px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 14px;
}

.hero-logo {
  display: block;
  width: min(760px, 52vw);
  max-height: 88px;
  margin: 0 0 6px;
  object-fit: contain;
  object-position: left center;
  filter: drop-shadow(0 10px 16px rgba(0, 76, 160, .13));
}

.hero h1,
.page-head h2 {
  color: var(--blue-900);
  font-size: clamp(32px, 3vw, 46px);
  line-height: 1;
}

.hero-pills {
  display: flex;
  gap: 12px;
}

.hero-pills div {
  min-width: 140px;
  border: 2px solid var(--blue-300);
  border-radius: 16px;
  padding: 14px 16px;
  background: rgba(255, 255, 255, .82);
  box-shadow: var(--shadow);
}

.hero-pills small,
.metric-card small,
.team-row small {
  display: block;
  color: var(--blue-700);
  font-weight: 900;
  text-transform: uppercase;
}

.hero-pills strong {
  display: block;
  margin-top: 4px;
  font-size: 20px;
}

.online {
  color: var(--green);
}

.panel {
  padding: 18px;
  margin-bottom: 14px;
}

.panel-title,
.summary-panel h2 {
  margin-bottom: 14px;
  color: var(--blue-700);
  font-size: 20px;
  font-weight: 950;
  text-transform: uppercase;
}

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

.metric-card {
  min-height: 76px;
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1.5px solid var(--blue-300);
  border-radius: 16px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, .72);
}

.metric-icon {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: transparent;
  overflow: hidden;
  flex: 0 0 auto;
}

.metric-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.metric-card strong {
  display: inline-block;
  margin-right: 4px;
  font-size: 24px;
}

.home-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 14px;
  align-items: stretch;
}

.home-main-stack {
  min-width: 0;
  display: grid;
  gap: 14px;
}

.side-stack {
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 14px;
}

.ranking-home,
.highlights-card,
.team-count-card {
  position: relative;
  margin-bottom: 0;
}

.panel-mascot {
  position: absolute;
  z-index: 0;
  pointer-events: none;
  object-fit: contain;
  opacity: .95;
}

.panel-mascot-yellow {
  width: 96px;
  top: -38px;
  right: -16px;
  transform: rotate(7deg);
}

.panel-mascot-purple {
  width: 110px;
  right: -22px;
  bottom: -30px;
  transform: rotate(-8deg);
}

.highlights-card > :not(.panel-mascot),
.today-diaries > :not(.panel-mascot) {
  position: relative;
  z-index: 1;
}

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

.rank-row {
  display: grid;
  grid-template-columns: 34px 44px minmax(0, 1fr) 64px 74px;
  align-items: center;
  gap: 8px;
  min-height: 52px;
  border-bottom: 1px solid #d8e8ff;
}

.rank-position,
.highlight-position {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #fff4b5;
  color: #956b00;
  font-weight: 950;
}

.avatar {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #eef4ff;
  color: var(--ink);
  font-weight: 950;
  overflow: hidden;
}

.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.rank-name {
  min-width: 0;
  font-weight: 950;
}

.rank-name small {
  display: block;
  color: var(--muted);
  font-size: 11px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-stat,
.rank-total {
  text-align: right;
  font-weight: 950;
}

.rank-stat small,
.rank-total small {
  display: block;
  color: var(--muted);
  font-size: 10px;
  text-transform: uppercase;
}

.bar {
  height: 6px;
  margin-top: 4px;
  border-radius: 999px;
  background: #e8eef7;
  overflow: hidden;
}

.bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--yellow), var(--blue-500));
}

.highlight-podium {
  display: grid;
  grid-template-columns: 1fr 1.12fr 1fr;
  align-items: end;
  gap: 8px;
  min-height: 188px;
  padding-top: 12px;
}

.highlights-card {
  overflow: hidden;
}

.podium-place {
  display: grid;
  place-items: center;
  gap: 5px;
  text-align: center;
}

.podium-place .avatar {
  width: 58px;
  height: 58px;
  font-size: 24px;
  border: 4px solid #fff;
  box-shadow: 0 12px 22px rgba(0, 91, 180, .14);
}

.podium-place.first .avatar {
  width: 72px;
  height: 72px;
}

.podium-base {
  width: 100%;
  min-height: 46px;
  display: grid;
  place-items: center;
  border-radius: 14px 14px 8px 8px;
  background: linear-gradient(180deg, #fff995, #ffce25);
  color: #805b00;
  font-weight: 950;
}

.podium-place.first .podium-base {
  min-height: 66px;
}

.team-rows {
  display: grid;
  gap: 10px;
}

.team-row {
  min-height: 54px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  border-radius: 14px;
  padding: 0 14px;
  background: #eef6ff;
  font-weight: 950;
}

.team-row.gold {
  background: #fff3b1;
  color: #8a6600;
}

.team-row.blue {
  color: var(--blue-800);
}

.team-row.red {
  background: #ffe3eb;
  color: var(--red);
}

.team-row strong {
  font-size: 24px;
}

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

.today-diaries {
  position: relative;
  overflow: hidden;
}

.today-slot {
  border: 1.5px solid var(--blue-300);
  border-radius: 14px;
  padding: 12px;
  background: rgba(255, 255, 255, .72);
}

.today-slot strong,
.today-slot span {
  display: block;
}

.today-slot span {
  color: var(--muted);
  font-weight: 800;
}

.page-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

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

.ranking-list,
.team-list {
  display: grid;
  gap: 12px;
}

.ranking-card,
.member-card {
  display: grid;
  grid-template-columns: 44px 52px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  border: 1.5px solid var(--blue-300);
  border-radius: 16px;
  padding: 14px;
  background: rgba(255, 255, 255, .78);
}

.ranking-card .total {
  color: var(--blue-900);
  font-size: 42px;
  font-weight: 950;
}

.ranking-card .meta,
.member-card .meta {
  color: var(--muted);
  font-weight: 800;
}

.status-pill {
  display: inline-grid;
  place-items: center;
  min-width: 86px;
  min-height: 28px;
  border-radius: 999px;
  padding: 0 10px;
  background: #e5f2ff;
  color: var(--blue-800);
  font-weight: 950;
}

.status-pill.upou {
  background: #dff7e9;
  color: #0c8f52;
}

.status-pill.rpp {
  background: #ffe2ec;
  color: var(--red);
}

.status-pill.obs {
  background: #fff2c2;
  color: #8a6600;
}

.notice {
  min-height: 20px;
  color: var(--blue-800);
  font-weight: 900;
}

.notice.error {
  color: var(--red);
}

.weekly-editor,
.member-editor,
.diary-table {
  display: grid;
  gap: 10px;
  margin-bottom: 16px;
}

.weekly-editor-row {
  display: grid;
  grid-template-columns: minmax(140px, 1.2fr) repeat(6, minmax(78px, .55fr)) minmax(76px, .5fr);
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid #d8e8ff;
  padding: 8px 0;
}

.diary-row {
  display: grid;
  grid-template-columns: minmax(150px, 1.2fr) repeat(5, minmax(90px, .6fr)) minmax(80px, .5fr);
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid #d8e8ff;
  padding: 8px 0;
}

.weekly-editor-row input,
.diary-row input,
.member-editor input,
.member-editor select,
.slot-card select {
  width: 100%;
  min-height: 40px;
  border: 1.5px solid var(--blue-300);
  border-radius: 12px;
  padding: 0 10px;
  background: #fff;
  color: var(--ink);
  font-weight: 850;
}

.checkbox-field .check-row {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 40px;
  border: 1.5px solid var(--blue-300);
  border-radius: 12px;
  padding: 0 10px;
  background: #fff;
  color: var(--ink);
  font-weight: 850;
}

.checkbox-field input[type="checkbox"] {
  width: 20px;
  min-height: 20px;
  border: 0;
  border-radius: 4px;
  padding: 0;
  background: transparent;
  accent-color: var(--blue-700);
}

.weekly-editor-actions,
.member-editor-actions,
.diary-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 12px;
}

.schedule-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.day-card {
  border: 1.5px solid var(--blue-300);
  border-radius: 16px;
  padding: 10px;
  background: rgba(255, 255, 255, .7);
}

.day-card h3 {
  margin-bottom: 8px;
  color: var(--blue-800);
  font-size: 18px;
}

.slot-card {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  margin-bottom: 6px;
}

.slot-time {
  color: var(--blue-900);
  font-size: 14px;
  font-weight: 950;
  white-space: nowrap;
}

.slot-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

.slot-card select {
  min-height: 36px;
  border-radius: 12px;
  padding: 0 10px;
}

.diary-row {
  grid-template-columns: minmax(150px, 1.2fr) repeat(5, minmax(90px, .6fr)) minmax(90px, .5fr);
}

.member-editor {
  border: 1.5px solid var(--blue-300);
  border-radius: 16px;
  padding: 14px;
  background: rgba(255, 255, 255, .72);
}

.member-editor-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.member-card {
  grid-template-columns: 52px minmax(0, 1fr) auto auto;
}

.member-actions {
  display: flex;
  gap: 8px;
}

.mini-btn {
  min-height: 34px;
  border: 1.5px solid var(--blue-300);
  border-radius: 999px;
  padding: 0 12px;
  background: #fff;
  color: var(--blue-800);
  font-weight: 900;
}

.mini-btn.danger {
  border-color: #ffc5d3;
  color: var(--red);
}

.mobile-nav {
  display: none;
}

@media (min-width: 1101px) {
  #appView {
    height: 100vh;
    min-height: 0;
    overflow: hidden;
  }

  .main {
    height: 100vh;
    min-height: 0;
    overflow: auto;
  }

  #home.page.active {
    height: calc(100vh - 36px);
    min-height: 0;
    display: grid;
    grid-template-rows: minmax(76px, 9.5vh) minmax(0, 1fr) minmax(112px, 14vh);
    gap: 10px;
    overflow: hidden;
  }

  #home .hero,
  #home .panel {
    margin-bottom: 0;
  }

  #home .hero {
    min-height: 0;
    align-items: start;
  }

  #home .hero-logo {
    max-height: 74px;
  }

  #home .hero-pills div {
    min-height: 72px;
  }

  #home .summary-panel {
    padding: 14px 18px;
  }

  #home .summary-panel h2,
  #home .panel-title {
    margin-bottom: 10px;
  }

  #home .metric-card {
    min-height: 62px;
    padding: 9px 12px;
  }

  #home .metric-icon {
    width: 42px;
    height: 42px;
  }

  #home .home-grid,
  #home .home-main-stack,
  #home .side-stack,
  #home .ranking-home,
  #home .highlights-card,
  #home .team-count-card {
    min-height: 0;
  }

  #home .home-grid {
    height: 100%;
  }

  #home .home-main-stack {
    grid-template-rows: minmax(104px, auto) minmax(0, 1fr);
  }

  #home .ranking-home,
  #home .highlights-card,
  #home .team-count-card {
    padding: 14px 18px;
    overflow: hidden;
  }

  #home .ranking-home {
    display: flex;
    flex-direction: column;
  }

  #homeRanking {
    min-height: 0;
    flex: 1;
    overflow: hidden;
  }

  #homeRanking .ranking-grid {
    height: 100%;
    grid-template-rows: repeat(6, minmax(40px, 1fr));
  }

  #home .rank-row {
    min-height: 0;
    grid-template-columns: 28px 38px minmax(0, 1fr) 54px 58px;
    gap: 6px;
  }

  #home .rank-position {
    width: 24px;
    height: 24px;
    font-size: 13px;
  }

  #home .avatar {
    width: 36px;
    height: 36px;
  }

  #home .rank-name {
    font-size: 14px;
  }

  #home .rank-name small {
    font-size: 10px;
  }

  #home .rank-stat,
  #home .rank-total {
    font-size: 14px;
  }

  #home .rank-stat small,
  #home .rank-total small {
    font-size: 9px;
  }

  #home .bar {
    height: 5px;
  }

  #home .link-btn {
    min-height: 36px;
    margin-top: 10px;
  }

  #home .side-stack {
    grid-template-rows: minmax(170px, .86fr) minmax(245px, 1.14fr);
    gap: 10px;
  }

  #home .highlight-podium {
    min-height: 134px;
    padding-top: 2px;
  }

  #home .podium-place {
    gap: 3px;
  }

  #home .podium-place .avatar {
    width: 48px;
    height: 48px;
  }

  #home .podium-place.first .avatar {
    width: 58px;
    height: 58px;
  }

  #home .podium-base {
    min-height: 36px;
  }

  #home .podium-place.first .podium-base {
    min-height: 48px;
  }

  #home .team-rows {
    gap: 6px;
  }

  #home .team-row {
    min-height: 42px;
    padding: 0 12px;
  }

  #home .team-row strong {
    font-size: 22px;
  }

  #home .today-diaries {
    display: grid;
    grid-template-columns: 190px minmax(0, 1fr);
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    overflow: hidden;
    min-height: 112px;
  }

  #home .today-diaries .panel-title {
    margin-bottom: 0;
  }

  #home .today-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
    min-width: 0;
  }

  #home .today-slot {
    min-height: 54px;
    padding: 8px 10px;
  }

  #home .panel-mascot-yellow {
    width: 72px;
    top: -28px;
    right: -10px;
  }

  #home .panel-mascot-purple {
    width: 72px;
    right: -12px;
    bottom: -24px;
    opacity: .45;
  }
}

@media (min-width: 1101px) and (max-height: 820px) {
  #home.page.active {
    grid-template-rows: 70px minmax(0, 1fr) 98px;
  }

  #home .today-diaries {
    min-height: 98px;
  }

  #home .side-stack {
    grid-template-rows: minmax(140px, .8fr) minmax(198px, 1fr);
  }

  #home .home-main-stack {
    grid-template-rows: 96px minmax(0, 1fr);
  }

  #home .team-row {
    min-height: 34px;
  }

  #home .highlight-podium {
    min-height: 100px;
  }

  #home .metric-card {
    min-height: 56px;
  }

  #home .link-btn {
    min-height: 32px;
    margin-top: 6px;
  }
}

@media (max-width: 1100px) {
  #appView {
    grid-template-columns: 1fr;
  }

  .sidebar {
    display: none;
  }

  .main {
    padding-bottom: 110px;
  }

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

  .mobile-nav {
    position: fixed;
    z-index: 20;
    left: 18px;
    right: 18px;
    bottom: 18px;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    border: 2px solid var(--blue-300);
    border-radius: 26px;
    background: rgba(255, 255, 255, .94);
    box-shadow: 0 16px 40px rgba(0, 51, 130, .2);
    overflow: hidden;
  }

  .mobile-nav-btn {
    min-height: 74px;
    border: 0;
    background: transparent;
    color: var(--muted);
    font-weight: 950;
  }

  .mobile-nav-btn.active {
    color: var(--blue-700);
    background: #edf6ff;
  }

  .mobile-nav-btn span {
    display: block;
  }
}

@media (max-width: 850px) {
  body {
    background: linear-gradient(180deg, #f7fbff, #fff);
  }

  .login-view {
    grid-template-columns: 1fr;
    padding: 18px;
  }

  .login-mascot {
    min-height: 210px;
  }

  .login-mascot-img {
    max-height: 190px;
  }

  .login-panel {
    padding: 24px;
  }

  .back-link {
    position: static;
    display: inline-block;
    margin-bottom: 16px;
  }

  .main {
    padding: 18px 14px 110px;
  }

  .hero,
  .page-head {
    display: grid;
  }

  .hero-logo {
    width: min(100%, 520px);
    max-height: 82px;
  }

  .hero-pills,
  .head-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hero-pills div:last-child {
    grid-column: span 2;
  }

  .metrics,
  .today-grid,
  .ranking-grid,
  .schedule-grid {
    grid-template-columns: 1fr;
  }

  .ranking-card {
    grid-template-columns: 34px 46px minmax(0, 1fr) auto;
  }

  .ranking-card .total {
    font-size: 32px;
  }

  .weekly-editor-row,
  .diary-row,
  .member-editor-grid {
    grid-template-columns: 1fr;
  }

  .slot-card,
  .slot-fields {
    grid-template-columns: 1fr;
  }

  .member-card {
    grid-template-columns: 46px minmax(0, 1fr);
  }

  .member-card .status-pill,
  .member-actions {
    grid-column: 2;
  }

  .mobile-nav {
    left: 10px;
    right: 10px;
  }

  .panel-mascot-yellow,
  .panel-mascot-purple {
    opacity: .28;
  }
}
