/* Major areas have distinct surfaces and spacing, rather than one continuous grid. */
@font-face {
  font-family: Caveat;
  src: url("/assets/fonts/Caveat.ttf") format("truetype");
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
}
:root {
  --action: #b7513a;
}
.brand-logo {
  width: 42px;
  height: 42px;
  flex-shrink: 0;
}
.brand-mark {
  display: block;
  width: 158px;
  height: 76px;
}
.site-header {
  padding-top: 6px;
  padding-bottom: 6px;
}
.button {
  background: var(--action);
}
.button:hover {
  background: #9c432e;
}
.button.light {
  background: #e8e1d5;
  color: var(--ink);
}
.button.light:hover {
  background: #ddd3c2;
}
.hero-landing {
  position: relative;
  background: var(--paper);
  overflow: hidden;
}
.hero-illustration {
  position: absolute;
  inset: 0 auto 0 0;
  width: 56%;
  background-image:
    linear-gradient(90deg, transparent 66%, var(--paper) 99%),
    url("/assets/dormitory.webp");
  background-size: cover;
  background-position: center;
}
.hero-layout {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 55px;
  min-height: 545px;
  align-items: center;
  padding: 55px 0;
}
.hero-copy {
  padding: 12px 0 12px 25px;
}
.hero-copy h1 {
  font-size: clamp(39px, 4vw, 54px);
  line-height: 1.13;
  max-width: 560px;
}
.hero-copy p {
  font-size: 17px;
  max-width: 440px;
  color: var(--muted);
}
.hero-secret {
  position: absolute;
  left: 25%;
  top: 23%;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  opacity: 0;
  color: var(--paper);
  background: var(--ink);
  border-radius: 5px;
}
.hero-secret:hover,
.hero-secret:focus-visible {
  opacity: 1;
}
.home-zone {
  padding: 55px 0;
  border-top: 1px solid #d8ded8;
}
.zone-events {
  background: #e7eeed;
}
.zone-events .event-card {
  background: var(--white);
}
.zone-collection {
  background: var(--paper);
}
.zone-collection .collection-band {
  margin-bottom: 0;
}
.zone-diary {
  background: var(--white);
  padding-bottom: 65px;
}
.student-corner {
  height: 370px;
  background-image:
    linear-gradient(
      180deg,
      var(--white),
      transparent 22%,
      transparent 88%,
      var(--cream)
    ),
    url("/assets/student-corner.webp");
  background-size: cover;
  background-position: center 70%;
}
.calendar-month {
  font-size: 15px;
  font-weight: 500;
  text-transform: capitalize;
  color: var(--muted);
}
.calendar-toolbar {
  margin-bottom: 14px;
}
.category-select {
  display: flex;
  align-items: center;
  gap: 13px;
  font-size: 13px;
  color: var(--muted);
}
.category-select select {
  min-width: 215px;
  padding: 12px 38px 12px 15px;
  border: 1px solid #d0d9d5;
  border-radius: 12px;
  background: var(--white);
  color: var(--ink);
}
.calendar-day:hover:not(.boundary) {
  border-radius: 0;
  background: #b8533a20;
}
/* The range's rectangular backing reaches underneath the rounded endpoint pills. */
.calendar-day.in-range {
  background: #e6dfd4;
}
.calendar-day.boundary {
  background: transparent;
  isolation: isolate;
}
.calendar-day.boundary::before {
  content: "";
  position: absolute;
  inset: 0;
  background: #e6dfd4;
  z-index: -2;
}
.calendar-day.range-start::before {
  left: 50%;
}
.calendar-day.range-end::before {
  right: 50%;
}
.calendar-day.boundary::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 22px;
  background: var(--coral);
  z-index: -1;
}
.calendar-day.range-start.range-end::before {
  display: none;
}
.calendar-day.in-range:hover:not(.boundary) {
  background: #e6dfd4;
}
/* Keep the range geometry identical on hover, including rounded endpoints. */
.calendar-day.range-start:hover,
.calendar-day.range-end:hover {
  border-radius: 22px;
}
.calendar-nav:disabled {
  cursor: default;
  opacity: 0.3;
}
.calendar-nav:disabled:hover {
  background: transparent;
}
.mini-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  width: 100%;
  max-width: 450px;
  margin: auto;
  padding: 8px;
}
.mini-cards .achievement-card {
  width: auto;
  height: auto;
  min-height: 218px;
  padding: 15px 11px;
  display: grid;
  grid-template-rows: 22px 80px minmax(44px, auto);
  gap: 9px;
  align-content: center;
}
.mini-cards .achievement-card small {
  white-space: nowrap;
  font-size: 8px;
  letter-spacing: 0.5px;
  align-self: center;
}
.mini-cards .achievement-icon {
  margin: 0;
}
.mini-cards .achievement-card h3 {
  margin: 0;
  font-size: 14px;
  line-height: 1.25;
  align-self: center;
}
.diary-pair {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 30px;
}
.diary-story {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 24px;
  align-items: center;
}
.diary-story > img {
  height: 100%;
  min-height: 235px;
  border-radius: 20px;
}
.diary-story h3 {
  font-size: 25px;
  margin: 10px 0 14px;
}
.diary-story p {
  font-size: 14px;
  color: var(--muted);
}
.idea-highlight {
  padding: 35px;
  background: #f0decb;
  border-radius: 24px;
  border: 1px solid #e4c5a8;
}
.idea-highlight .tag {
  color: #854736;
}
.idea-highlight h3 {
  font-size: 29px;
  margin: 12px 0 18px;
  line-height: 1.2;
}
.idea-highlight p {
  font-size: 15px;
  max-width: 440px;
}
.idea-highlight .buttons {
  gap: 15px;
}
.idea-highlight .button {
  white-space: normal;
}
.panel {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 30px;
}
.profile-page section {
  margin: 0;
  max-width: none;
}
.profile-page {
  max-width: 1236px;
}
.profile-layout {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 28px;
  align-items: start;
}
.profile-summary {
  text-align: center;
}
.profile-avatar {
  width: 116px;
  height: 116px;
  margin: 0 auto 18px;
  background: #e2ebe7;
  border-radius: 50%;
  overflow: hidden;
  display: grid;
  place-items: center;
}
.profile-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.profile-avatar > span {
  font: 650 45px var(--heading);
  color: var(--teal);
}
.profile-summary h2 {
  font-size: 23px;
  margin-bottom: 8px;
  overflow-wrap: anywhere;
}
.profile-summary > p:not(.helper) {
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 18px;
}
.photo-picker {
  display: inline-block;
  position: relative;
  padding: 8px 16px;
  border-radius: 10px;
  background: var(--cream);
  font-size: 13px;
  cursor: pointer;
}
.photo-picker:hover {
  background: #dfd4c4;
}
.photo-picker:focus-within {
  outline: 3px solid var(--teal);
  outline-offset: 4px;
}
.photo-picker input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}
.profile-summary > .helper {
  font-size: 11px;
  margin: 13px 0 0;
}
.profile-metrics {
  display: grid;
  gap: 18px;
  margin-top: 25px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  text-align: left;
}
.profile-metrics {
  grid-template-columns: 1fr;
}
.profile-metrics > div {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
}
.profile-metrics strong {
  font: 600 24px var(--heading);
  min-width: 0;
  white-space: nowrap;
}
.profile-metrics span {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.45;
  min-width: 0;
}
.profile-information h2 {
  font-size: 27px;
  margin-bottom: 8px;
}
.profile-information > .helper {
  margin-bottom: 25px;
}
.profile-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px 22px;
}
.profile-form label {
  display: grid;
  gap: 7px;
  font-size: 13px;
}
.profile-form .wide {
  grid-column: 1/-1;
}
.profile-form input,
.profile-form select,
.profile-form textarea {
  min-width: 0;
  width: 100%;
  padding: 12px 14px;
  background: #f7f4ee;
  border: 1px solid #dcd4c6;
  border-radius: 10px;
  color: var(--ink);
}
.profile-form textarea {
  resize: vertical;
}
.profile-form-footer {
  display: flex;
  gap: 20px;
  align-items: center;
  margin-top: 6px;
}
#profile-save-status {
  color: var(--teal);
  font-size: 13px;
}
.profile-zone {
  padding-top: 40px;
  margin-top: 40px !important;
  border-top: 1px solid var(--line);
}
.profile-zone .section-head {
  margin-bottom: 25px;
}
.profile-zone h2 {
  font-size: 29px;
}
.profile-zone .empty {
  text-align: left;
  font-size: 14px;
}
.profile-top h1 {
  margin-top: 0;
}
.profile-top .helper {
  margin-bottom: 0;
}
@media (max-width: 1100px) {
  .hero-layout {
    min-height: 500px;
    gap: 30px;
  }
  .hero-copy {
    padding-left: 0;
  }
  .hero-copy h1 {
    font-size: 42px;
  }
  .diary-pair {
    grid-template-columns: 1fr 1fr;
  }
  .diary-story {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .diary-story > img {
    min-height: 0;
    height: 210px;
  }
  .profile-layout {
    grid-template-columns: 255px minmax(0, 1fr);
    gap: 22px;
  }
  .panel {
    padding: 25px;
  }
}
@media (max-width: 900px) {
  .hero-copy h1 {
    font-size: 36px;
  }
  .hero-copy p {
    font-size: 15px;
  }
  .hero-copy .buttons {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }
  .collection-band {
    grid-template-columns: 1fr;
  }
  .mini-cards {
    max-width: 440px;
    margin-top: 12px;
    gap: 18px;
  }
  .mini-cards .achievement-card {
    min-height: 218px;
  }
  .profile-layout {
    grid-template-columns: 1fr;
  }
  .profile-summary {
    display: grid;
    grid-template-columns: 135px 1fr;
    text-align: left;
    column-gap: 25px;
    align-items: center;
  }
  .profile-avatar {
    grid-column: 1;
    grid-row: 1/4;
    margin: 0;
  }
  .profile-summary h2,
  .profile-summary > p,
  .profile-summary .photo-picker {
    grid-column: 2;
  }
  .profile-summary > .helper {
    grid-column: 1/-1;
  }
  .profile-metrics {
    grid-column: 1/-1;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
  }
  .profile-metrics > div {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 5px;
  }
  .profile-metrics strong {
    min-width: 0;
  }
  .photo-picker {
    width: fit-content;
  }
}
@media (max-width: 600px) {
  .brand-logo {
    width: 34px;
    height: 34px;
  }
  .brand-mark {
    width: 132px;
    height: 64px;
  }
  .hero-illustration {
    inset: 0 0 auto;
    width: 100%;
    height: 280px;
    background-image:
      linear-gradient(180deg, transparent 75%, var(--paper)),
      url("/assets/dormitory.webp");
    background-position: center;
  }
  .hero-layout {
    display: block;
    min-height: 0;
    padding: 290px 0 35px;
  }
  .hero-copy {
    padding: 0;
  }
  .hero-copy h1 {
    font-size: 34px;
    margin: 15px 0;
  }
  .hero-copy .buttons {
    flex-direction: row;
    align-items: center;
    gap: 18px;
  }
  .hero-secret {
    left: 25%;
    top: 75px;
  }
  .home-zone {
    padding: 35px 0;
  }
  .student-corner {
    height: 270px;
    background-position: center 65%;
  }
  .category-select {
    display: block;
  }
  .category-select > span {
    display: block;
    margin-bottom: 7px;
  }
  .category-select select {
    width: 100%;
  }
  .afisha-filters {
    display: flex;
    align-items: flex-end;
    gap: 15px;
  }
  .category-select {
    flex: 1;
    min-width: 0;
  }
  .category-select select {
    min-width: 0;
  }
  .result-count {
    padding-bottom: 12px;
  }
  .mini-cards {
    gap: 9px;
    padding: 5px;
    margin-top: 10px;
  }
  .mini-cards .achievement-card {
    min-height: 207px;
    padding: 13px 7px;
    grid-template-rows: 20px 75px minmax(44px, auto);
    gap: 7px;
  }
  .mini-cards .achievement-card small {
    font-size: 7px;
    letter-spacing: 0.1px;
  }
  .mini-cards .achievement-icon svg {
    width: 63px;
    height: 75px;
  }
  .mini-cards .achievement-card h3 {
    font-size: 12px;
  }
  .diary-pair {
    grid-template-columns: 1fr;
    gap: 28px;
  }
  .diary-story {
    gap: 18px;
  }
  .diary-story > img {
    height: 200px;
  }
  .idea-highlight {
    padding: 25px;
  }
  .idea-highlight h3 {
    font-size: 26px;
  }
  .panel {
    padding: 23px;
  }
  .profile-summary {
    grid-template-columns: 90px 1fr;
    gap: 5px 18px;
  }
  .profile-avatar {
    width: 85px;
    height: 85px;
  }
  .profile-summary h2 {
    font-size: 21px;
  }
  .profile-summary > p:not(.helper) {
    margin-bottom: 5px;
  }
  .profile-summary > .helper {
    margin-top: 15px;
  }
  .photo-picker {
    padding: 7px 12px;
    font-size: 12px;
  }
  .profile-metrics {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }
  .profile-metrics span {
    font-size: 12px;
    overflow-wrap: normal;
  }
  .profile-information h2 {
    font-size: 24px;
  }
  .profile-form {
    grid-template-columns: 1fr;
    gap: 17px;
  }
  .profile-form .wide {
    grid-column: 1;
  }
  .profile-form-footer {
    flex-direction: column;
    align-items: flex-start;
    gap: 13px;
  }
  .profile-zone {
    padding-top: 30px;
    margin-top: 30px !important;
  }
  .profile-zone .section-head {
    display: block;
  }
  .profile-zone h2 {
    font-size: 25px;
    margin-bottom: 9px;
  }
}
