/* GENERATED from src/styles/*.css by scripts/build-source-bundles.mjs.
   Edit the source fragments instead of this compatibility bundle. */
:root {
  --page-bg: #f5f5f7;
  --secondary-bg: #fbfbfd;
  --card-bg: #ffffff;
  --primary: #ff4500;
  --primary-hover: #e63e00;
  --primary-soft: #fff1eb;
  --ink: #1d1d1f;
  --text: #3a3a3c;
  --muted: #6e6e73;
  --faint: #a1a1a6;
  --line: #e5e5ea;
  --line-light: #ececf0;
  --red: var(--primary);
  --red-dark: var(--primary-hover);
  --red-soft: var(--primary-soft);
  --yellow: #ffb800;
  --surface: #ffffff;
  --soft: var(--page-bg);
  --soft-2: var(--secondary-bg);
  --success: #34c759;
  --warning: #ff9f0a;
  --danger: #ff3b30;
  --header-height: 68px;
  --nav-height: 72px;
  --content: 1080px;
  --reading-width: 800px;
  --radius: 16px;
  --radius-small: 12px;
  --radius-large: 20px;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .04);
  --shadow-md: 0 6px 18px rgba(0, 0, 0, .07);
  --shadow-float: 0 8px 24px rgba(0, 0, 0, .08);
  --shadow-hover: 0 4px 12px rgba(0, 0, 0, .05);
  --motion: 180ms cubic-bezier(.22, 1, .36, 1);
  color-scheme: light;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  overflow-x: clip;
  scroll-behavior: smooth;
  background: var(--page-bg);
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  overflow-x: clip;
  padding-bottom: calc(var(--nav-height) + env(safe-area-inset-bottom));
  color: var(--ink);
  background: var(--page-bg);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "PingFang SC", "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.65;
  letter-spacing: -.01em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body,
button,
input,
textarea,
select {
  font: inherit;
}

button,
input,
textarea,
select {
  color: inherit;
}

button,
a,
input,
textarea,
select {
  -webkit-tap-highlight-color: transparent;
}

a {
  color: inherit;
}

button {
  border: 0;
}

img,
svg {
  display: block;
}

img {
  max-width: 100%;
  height: auto;
}

svg {
  flex: 0 0 auto;
  stroke-width: 2;
}

.ui-icon {
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
}

::selection {
  background: #ffd8c9;
}

.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.skip-link {
  position: fixed;
  z-index: 9999;
  left: 16px;
  top: -80px;
  padding: 10px 14px;
  border-radius: 10px;
  color: #fff;
  background: #222;
  text-decoration: none;
}

.skip-link:focus {
  top: 12px;
}

#app {
  min-height: calc(100vh - var(--header-height));
}

/* App chrome */

.site-header {
  position: sticky;
  z-index: 100;
  top: 0;
  height: var(--header-height);
  border-bottom: 1px solid var(--line);
  background: rgba(251, 251, 253, .88);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
}

.header-inner,
.app-header-inner {
  width: min(var(--content), calc(100% - 40px));
  height: 100%;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr;
  align-items: center;
}

.brand {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  text-decoration: none;
}

.brand-mark {
  position: relative;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 14px;
  color: var(--primary);
  background: var(--primary-soft);
}

.brand-mark::before {
  content: "";
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 9px;
  height: 15px;
  border: 5px solid var(--primary);
  border-top: 0;
  border-radius: 0 0 22px 22px;
}

.brand-mark::after {
  content: "";
  position: absolute;
  left: 18px;
  top: 8px;
  width: 7px;
  height: 12px;
  border-radius: 99px;
  background: var(--red);
  transform: rotate(10deg);
}

.brand-mark svg {
  display: none;
}

.brand-copy {
  min-width: 0;
  display: grid;
  line-height: 1.15;
}

.brand-copy strong {
  overflow: hidden;
  font-size: 18px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.brand-copy span {
  display: none;
}

.icon-button {
  min-width: 44px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  color: var(--ink);
  background: transparent;
  text-decoration: none;
  cursor: pointer;
  transition: color var(--motion), background var(--motion), transform var(--motion);
}

.icon-button:hover {
  background: var(--soft);
}

.icon-button svg {
  width: 25px;
  height: 25px;
}

.avatar,
.profile-avatar,
.profile-social-avatar {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 50%;
  color: var(--primary);
  background: var(--primary-soft);
  font-size: 11px;
  font-weight: 600;
}

.mobile-nav {
  position: fixed;
  z-index: 140;
  left: 50%;
  bottom: 0;
  width: min(680px, 100%);
  min-height: calc(var(--nav-height) + env(safe-area-inset-bottom));
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  align-items: start;
  padding: 7px 8px calc(7px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  border-radius: 0;
  background: rgba(251, 251, 253, .92);
  box-shadow: 0 -1px 0 rgba(0, 0, 0, .03);
  backdrop-filter: saturate(180%) blur(22px);
  -webkit-backdrop-filter: saturate(180%) blur(22px);
  transform: translateX(-50%);
}

.mobile-nav a,
.mobile-nav button {
  min-height: 58px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 0;
  border-radius: 12px;
  color: var(--faint);
  background: transparent;
  font-size: 11px;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
}

.mobile-nav a:hover,
.mobile-nav a.is-active,
.mobile-nav button:hover,
.mobile-nav button.is-active {
  color: var(--primary);
  background: transparent;
}

.mobile-nav svg {
  width: 24px;
  height: 24px;
  stroke-width: 2.2;
}

/* Shared page primitives */

.page,
.page-narrow {
  width: min(var(--content), calc(100% - 40px));
  margin: 0 auto;
  padding: 40px 0 64px;
}

.page-narrow {
  width: min(760px, calc(100% - 40px));
}

.section {
  margin-top: 40px;
}

.section:first-child {
  margin-top: 0;
}

.section-head,
.compact-section-head,
.simple-review-head,
.everytime-detail-section-head,
.profile-favorite-section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 18px;
}

.section-kicker {
  margin: 0 0 5px;
  color: var(--red);
  font-size: 12px;
  font-weight: 850;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.section-title,
.compact-page-head h1,
.settings-head h1,
.message-page-head h1,
.community-head h1,
.everytime-page-head h1 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(30px, 4vw, 36px);
  line-height: 1.16;
  font-weight: 700;
  letter-spacing: -.035em;
}

.section-subtitle,
.compact-page-head p,
.community-head p,
.message-page-head p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.site-footer {
  margin-top: 48px;
  padding: 24px 0 8px;
  border-top: 1px solid var(--line);
  color: #aaa;
  font-size: 11px;
  text-align: center;
}

.site-footer p {
  max-width: 720px;
  margin: 0 auto;
}

.site-footer a {
  color: #777;
}

.button {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--ink);
  background: #fff;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: color var(--motion), border-color var(--motion), background var(--motion), box-shadow var(--motion), transform var(--motion);
}

.button:hover {
  background: var(--soft-2);
  box-shadow: var(--shadow-hover);
}

.button svg {
  width: 19px;
  height: 19px;
}

.button-primary {
  border-color: var(--red);
  color: #fff;
  background: var(--red);
}

.button-primary:hover {
  border-color: var(--red-dark);
  background: var(--red-dark);
}

.button-secondary {
  background: #fff;
}

.button-small {
  min-height: 38px;
  padding: 0 14px;
  font-size: 13px;
}

.button-danger,
.is-danger {
  color: var(--danger);
}

.icon-button:focus-visible,
.button:focus-visible,
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 3px solid rgba(255, 69, 0, .2);
  outline-offset: 2px;
}

.badge,
.category-tab,
.filter-chip {
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 4px 10px;
  border: 0;
  border-radius: 999px;
  color: #777;
  background: var(--soft);
  font-size: 11px;
  font-weight: 500;
  line-height: 1.2;
}

.badge-success {
  color: #168446;
  background: #ebf9f0;
}

.badge-warning {
  color: #9a5d00;
  background: #fff5e5;
}

.badge-danger {
  color: var(--danger);
  background: #fff0ef;
}

.badge-outline {
  border: 1px solid var(--line);
  background: #fff;
}

.badge-row,
.category-tabs,
.filter-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.notice {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 13px 15px;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: #666;
  background: var(--soft-2);
  font-size: 12px;
}

.notice svg {
  width: 19px;
  height: 19px;
  margin-top: 1px;
}

.notice-info {
  color: #a52d00;
  background: var(--primary-soft);
}

.notice-warning {
  color: #805c24;
  background: #fff9ec;
}

.notice-danger,
.is-error {
  color: var(--danger);
  background: #fff4f3;
}

.empty-state {
  min-height: 220px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 9px;
  padding: 36px 24px;
  color: var(--muted);
  text-align: center;
}

.empty-state-icon {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--primary);
  background: var(--primary-soft);
}

.empty-state-icon svg {
  width: 27px;
  height: 27px;
}

.empty-state h3 {
  margin: 4px 0 0;
  color: var(--ink);
  font-size: 20px;
}

.empty-state p {
  max-width: 460px;
  margin: 0;
  font-size: 13px;
}

.form-group {
  display: grid;
  gap: 8px;
}

.form-label,
.form-group label,
.forum-composer label > span {
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
}

.form-control,
.form-select,
.form-textarea,
.toolbar-search,
.search-page-input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 14px;
  color: var(--ink);
  background: #fff;
  outline: none;
}

.form-control,
.form-select {
  min-height: 46px;
  padding: 0 14px;
}

.form-textarea {
  min-height: 160px;
  padding: 14px;
  resize: vertical;
}

.form-control:focus,
.form-select:focus,
.form-textarea:focus,
.toolbar-search:focus,
.search-page-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(255, 69, 0, .14);
  background: #fff;
}

.form-actions,
.simple-form-submit {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 18px;
}

.form-note {
  color: var(--muted);
  font-size: 11px;
}

/* Modal and toast */

.modal-backdrop {
  position: fixed;
  z-index: 500;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(0, 0, 0, .32);
  backdrop-filter: blur(4px);
}

.modal {
  width: min(620px, 100%);
  max-height: min(88vh, 860px);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .65);
  border-radius: 20px;
  background: #fff;
  box-shadow: var(--shadow-float);
}

.modal-head {
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 22px;
  border-bottom: 1px solid var(--line);
}

.modal-head h2 {
  margin: 0;
  font-size: 19px;
}

.modal-body {
  max-height: calc(min(88vh, 860px) - 64px);
  overflow: auto;
  padding: 22px;
}

.toast-root {
  position: fixed;
  z-index: 900;
  left: 50%;
  bottom: calc(var(--nav-height) + 18px + env(safe-area-inset-bottom));
  display: grid;
  gap: 8px;
  transform: translateX(-50%);
}

.toast {
  min-width: 220px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  border-radius: 999px;
  color: #fff;
  background: rgba(34, 34, 34, .94);
  font-size: 13px;
}

.toast svg {
  width: 17px;
  height: 17px;
}

.toast-error {
  background: rgba(198, 42, 36, .96);
}

/* Home */

.campus-home-page {
  width: min(940px, calc(100% - 40px));
  padding-top: 36px;
}

.everytime-home-summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, .78fr);
  gap: 38px;
  align-items: start;
}

.everytime-home-greeting {
  min-width: 0;
}

.everytime-home-greeting p {
  margin: 0 0 6px;
  color: var(--muted);
  font-size: 13px;
}

.everytime-home-greeting h1 {
  margin: 0;
  font-size: clamp(36px, 5vw, 58px);
  line-height: 1;
  font-weight: 900;
  letter-spacing: -.055em;
}

.everytime-home-greeting > span {
  display: block;
  margin-top: 10px;
  color: var(--muted);
  font-size: 14px;
}

.home-schedule-card {
  min-height: 150px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 24px;
  border: 1px solid var(--line);
  border-radius: 22px;
  color: inherit;
  background: #fff;
  text-decoration: none;
}

.home-schedule-card > div {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.home-schedule-card small {
  color: var(--muted);
  font-size: 13px;
}

.home-schedule-card strong {
  font-size: 22px;
  line-height: 1.2;
}

.home-schedule-card span,
.home-today-lesson em {
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.home-schedule-card > svg {
  width: 20px;
  height: 20px;
  color: var(--faint);
}

.home-today-lesson {
  min-width: 0;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 8px;
}

.home-panel {
  margin-top: 36px;
}

.home-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.home-panel-head h2 {
  margin: 0;
  font-size: 26px;
  line-height: 1.2;
}

.home-panel-head a {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}

.home-panel-head svg {
  width: 15px;
  height: 15px;
}

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

.campus-service-card {
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  padding: 9px 4px;
  border: 0;
  border-radius: 12px;
  color: inherit;
  background: transparent;
  text-align: center;
  text-decoration: none;
}

.campus-service-card:hover {
  background: var(--soft-2);
}

.campus-service-icon {
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  color: var(--red);
  background: #fff0ef;
}

.campus-service-card.is-bus .campus-service-icon {
  color: #2b9aaa;
  background: #e7f8fa;
}

.campus-service-card.is-food .campus-service-icon {
  color: #e59b20;
  background: #fff5df;
}

.campus-service-card.is-classroom .campus-service-icon {
  color: #6c56ad;
  background: #f1edff;
}

.campus-service-icon svg {
  width: 29px;
  height: 29px;
}

.campus-service-card > span:nth-child(2) {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.campus-service-card strong {
  font-size: 14px;
}

.campus-service-card small {
  overflow: hidden;
  color: var(--muted);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.campus-service-card > svg {
  display: none;
}

.home-promo-strip {
  position: relative;
  min-height: 180px;
  overflow: hidden;
  display: flex;
  align-items: center;
  margin-top: 30px;
  padding: 28px 34px;
  border: 0;
  border-radius: 26px;
  background: linear-gradient(120deg, #f7ddff 0%, #ffe4f1 54%, #fff0d4 100%);
}

.home-promo-copy {
  position: relative;
  z-index: 2;
  max-width: 610px;
  display: grid;
  gap: 7px;
}

.home-promo-label {
  color: var(--red);
  font-size: 12px;
  font-weight: 850;
}

.home-promo-copy strong {
  max-width: 520px;
  font-size: clamp(22px, 3vw, 30px);
  line-height: 1.25;
}

.home-promo-copy small {
  color: #7c6572;
  font-size: 12px;
}

.home-promo-copy a {
  width: max-content;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: 6px;
  color: var(--red);
  font-size: 13px;
  font-weight: 850;
  text-decoration: none;
}

.home-promo-copy a svg {
  width: 16px;
  height: 16px;
}

.home-promo-stage {
  position: absolute;
  right: 30px;
  top: 50%;
  width: 150px;
  height: 110px;
  display: grid;
  place-items: center;
  border-radius: 55% 45% 52% 48%;
  color: #fff;
  background: linear-gradient(145deg, #ffbf1d, #ff7f32);
  transform: translateY(-50%) rotate(-5deg);
}

.home-promo-stage span,
.home-promo-stage b {
  position: absolute;
  text-align: center;
}

.home-promo-stage span {
  top: 17px;
  font-size: 13px;
  font-weight: 900;
}

.home-promo-stage b {
  bottom: 17px;
  font-size: 17px;
  line-height: 1;
}

.home-community-panel {
  margin-top: 36px;
}

.home-post-list {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 20px;
}

.home-post-row {
  min-height: 66px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 12px 18px;
  border-bottom: 1px solid var(--line);
  color: inherit;
  text-decoration: none;
}

.home-post-row:last-child {
  border-bottom: 0;
}

.home-post-row span {
  min-width: 0;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 14px;
  align-items: baseline;
}

.home-post-row strong {
  font-size: 14px;
}

.home-post-row small {
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.home-post-row em {
  color: var(--faint);
  font-size: 11px;
  font-style: normal;
}

.home-empty-posts {
  padding: 26px;
  color: var(--muted);
  text-align: center;
}

/* Timetable */

.everytime-page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
}

.everytime-page-head > div:first-child {
  min-width: 0;
}

.everytime-semester,
.everytime-semester-button {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin: 0 0 2px;
  padding: 0;
  border: 0;
  color: #a8a8a8;
  background: transparent;
  font-size: 14px;
  font-weight: 550;
  cursor: pointer;
}

.everytime-semester svg,
.everytime-semester-button svg {
  width: 16px;
  height: 16px;
}

.everytime-page-head h1 {
  margin: 0;
  font-size: clamp(36px, 5vw, 48px);
  line-height: 1;
  letter-spacing: -.055em;
}

.everytime-head-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.everytime-icon-action {
  min-width: 48px;
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 0 12px;
  border: 0;
  border-radius: 50%;
  color: var(--ink);
  background: transparent;
  text-decoration: none;
  cursor: pointer;
}

.everytime-icon-action:hover {
  background: var(--soft);
}

.everytime-icon-action svg {
  width: 28px;
  height: 28px;
}

.everytime-icon-action span {
  display: none;
}

.friend-timetable-notice {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: -8px 0 16px;
  color: var(--muted);
  font-size: 12px;
}

.friend-timetable-notice svg {
  width: 17px;
  height: 17px;
}

.everytime-timetable-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
}

.everytime-timetable-scroll {
  position: relative;
  width: 100%;
  overflow: auto hidden;
  scrollbar-width: none;
}

.everytime-timetable-scroll::-webkit-scrollbar {
  display: none;
}

.everytime-week-grid {
  position: relative;
  min-width: 720px;
  display: grid;
  grid-template-columns: 52px repeat(5, minmax(108px, 1fr));
  isolation: isolate;
  background: #fff;
}

.everytime-grid-corner,
.everytime-day-label {
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.everytime-grid-corner {
  grid-column: 1;
  grid-row: 1;
}

.everytime-day-label {
  z-index: 1;
  display: grid;
  place-items: center;
  color: #777;
  background: #fff;
  font-size: 13px;
  font-weight: 500;
}

.everytime-day-label.is-today {
  color: var(--red);
  font-weight: 800;
}

.everytime-time-label {
  position: relative;
  z-index: 1;
  align-self: start;
  padding: 4px 8px 0 0;
  border-right: 1px solid var(--line);
  color: #969696;
  background: transparent;
  font-size: 11px;
  line-height: 1;
  text-align: right;
  pointer-events: none;
}

.everytime-grid-cell {
  border-right: 1px solid var(--line);
  border-bottom: 1px solid transparent;
  background: #fff;
}

.everytime-grid-cell.is-half-hour {
  border-bottom-color: #f2f2f4;
}

.everytime-grid-cell.is-hour {
  border-bottom-color: var(--line);
}

.everytime-grid-cell.is-today {
  background: #fffdfa;
}

.everytime-course-block {
  z-index: 3;
  min-width: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  padding: 6px 7px;
  border: 0;
  border-radius: 0;
  color: #fff;
  background: #ee7c71;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}

.everytime-course-block.course-tone-1 { background: #5b8fc9; }
.everytime-course-block.course-tone-2 { background: #8d7dc7; }
.everytime-course-block.course-tone-3 { background: #4f9b8f; }
.everytime-course-block.course-tone-4 { background: #c47b64; }
.everytime-course-block.course-tone-5 { background: #d29454; }
.everytime-course-block.course-tone-6 { background: #637fbe; }
.everytime-course-block.course-tone-7 { background: #9b6f9e; }
.everytime-course-block.course-tone-8 { background: #548f96; }

.everytime-course-block strong,
.everytime-course-block span,
.everytime-course-block small {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}

.everytime-course-block strong {
  display: -webkit-box;
  font-size: 11px;
  line-height: 1.15;
  font-weight: 800;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.everytime-course-block span,
.everytime-course-block small {
  font-size: 9px;
  line-height: 1.2;
  white-space: nowrap;
}

.everytime-empty-hint {
  position: absolute;
  z-index: 6;
  left: 50%;
  top: 50%;
  min-width: 180px;
  display: grid;
  place-items: center;
  gap: 4px;
  padding: 18px;
  border: 0;
  border-radius: 18px;
  color: var(--ink);
  background: rgba(255, 255, 255, .92);
  text-align: center;
  cursor: pointer;
  transform: translate(-50%, -50%);
}

.everytime-empty-hint svg {
  width: 25px;
  height: 25px;
  color: var(--red);
}

.everytime-empty-hint strong {
  font-size: 14px;
}

.everytime-empty-hint span {
  color: var(--muted);
  font-size: 10px;
}

.everytime-unplaced-courses {
  padding: 18px;
  border-top: 1px solid var(--line);
}

.everytime-unplaced-courses > strong {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 12px;
}

.everytime-unplaced-courses > div {
  display: grid;
}

.everytime-unplaced-courses button,
.everytime-unplaced-courses a {
  min-height: 58px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto 18px;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  color: inherit;
  background: #fff;
  text-align: left;
  text-decoration: none;
}

.everytime-unplaced-courses span {
  display: grid;
  color: var(--muted);
  font-size: 11px;
}

.everytime-unplaced-courses b {
  color: var(--ink);
  font-size: 12px;
}

.everytime-unplaced-courses small {
  color: var(--muted);
  font-size: 10px;
}

/* Course picker */

.course-picker-modal {
  width: min(900px, 100%);
  max-height: 94vh;
  border-radius: 22px;
}

.course-picker-modal .modal-body {
  max-height: calc(94vh - 64px);
  padding: 0 22px 24px;
}

.course-picker {
  display: grid;
}

.course-picker-preview {
  overflow: hidden;
  margin: 0 -22px 16px;
  border-bottom: 1px solid var(--line);
}

.course-picker-preview .everytime-week-grid {
  min-width: 100%;
  grid-template-columns: 34px repeat(5, minmax(58px, 1fr));
}

.course-picker-preview .everytime-time-label {
  font-size: 8px;
}

.course-picker-preview .everytime-course-block {
  padding: 3px;
}

.course-picker-preview .everytime-course-block strong {
  font-size: 8px;
}

.course-picker-preview .everytime-course-block span,
.course-picker-preview .everytime-course-block small {
  display: none;
}

.course-picker-semester {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 11px;
}

.everytime-course-search {
  min-height: 46px;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 0 14px;
  border-radius: 14px;
  background: var(--soft);
}

.everytime-course-search > svg {
  width: 20px;
  height: 20px;
  color: #aaa;
}

.everytime-course-search input {
  min-width: 0;
  width: 100%;
  height: 44px;
  padding: 0;
  border: 0;
  outline: 0;
  background: transparent;
}

.course-picker-toolbar {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.course-picker-filter-chip {
  min-width: 0;
  border-radius: 999px;
  background: var(--soft);
}

.course-picker-filter-chip .form-select {
  min-height: 36px;
  max-width: 220px;
  padding: 0 32px 0 12px;
  border: 0;
  border-radius: inherit;
  background: transparent;
  font-size: 12px;
  font-weight: 700;
}

.course-picker-result-count {
  color: var(--muted);
  font-size: 11px;
}

.course-picker-results,
.course-offering-results {
  display: grid;
}

.course-picker-row {
  position: relative;
  min-height: 116px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto 36px;
  align-items: center;
  gap: 12px;
  padding: 15px 0;
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.course-picker-row-main {
  min-width: 0;
  display: grid;
  gap: 2px;
  color: inherit;
  text-decoration: none;
}

.course-picker-row-main > strong {
  display: block;
  font-size: 16px;
  line-height: 1.3;
}

.course-picker-row-main small {
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.course-picker-instructor {
  color: var(--ink) !important;
  font-size: 12px !important;
}

.course-picker-selected {
  width: max-content;
  margin-top: 3px;
  padding: 2px 7px;
  border-radius: 99px;
  color: var(--red) !important;
  background: var(--red-soft);
}

.course-picker-rating {
  display: grid;
  justify-items: end;
  gap: 3px;
  color: var(--muted);
  font-size: 10px;
  white-space: nowrap;
}

.everytime-static-stars,
.course-picker-rating > span,
.course-rating {
  display: inline-flex;
  align-items: center;
  gap: 1px;
}

.everytime-static-stars svg,
.course-picker-rating svg,
.course-rating svg {
  width: 14px;
  height: 14px;
  color: #ddd;
  fill: currentColor;
}

.everytime-static-stars .is-active,
.everytime-static-stars i.is-active,
.course-rating .is-active {
  color: var(--yellow);
}

.course-picker-toggle {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  padding: 0;
  border-radius: 50%;
  color: #555;
  background: var(--soft);
  cursor: pointer;
}

.course-picker-toggle.is-added {
  color: #fff;
  background: var(--red);
}

.course-picker-toggle:disabled {
  color: #bbb;
  cursor: not-allowed;
}

.course-picker-toggle svg {
  width: 17px;
  height: 17px;
}

.course-offering-picker {
  display: grid;
  gap: 14px;
}

.course-offering-picker-head {
  display: grid;
  gap: 3px;
}

.course-offering-picker-head strong {
  font-size: 18px;
}

.course-offering-picker-head span,
.course-offering-note {
  color: var(--muted);
  font-size: 11px;
}

.course-offering-row {
  min-height: 76px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.course-offering-row > div {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.course-offering-row small,
.course-offering-row em {
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
}

.course-offering-row em {
  color: var(--danger);
}

/* Course bottom sheet */

.course-action-modal {
  width: min(520px, 100%);
}

.course-action-modal .modal-head {
  display: none;
}

.course-action-modal .modal-body {
  max-height: 86vh;
  padding: 28px 26px 34px;
}

.course-action-sheet {
  display: grid;
  gap: 22px;
}

.course-action-summary {
  display: grid;
  gap: 10px;
  padding: 0 0 20px;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  background: #fff !important;
}

.course-action-code {
  color: var(--muted);
  font-size: 12px;
}

.course-action-facts {
  display: grid;
  gap: 8px;
}

.course-action-facts span {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 10px;
}

.course-action-facts small {
  color: var(--muted);
}

.course-action-lessons {
  display: grid;
  gap: 5px;
}

.course-action-lessons span {
  display: grid;
  color: var(--muted);
  font-size: 11px;
}

.course-action-lessons b {
  color: var(--ink);
  font-size: 12px;
}

.course-action-rating {
  color: var(--muted);
  font-size: 11px;
}

.course-action-list {
  display: grid;
}

.course-action-list a,
.course-action-list button {
  min-height: 64px;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) 20px;
  align-items: center;
  gap: 14px;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
  color: inherit;
  background: #fff;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}

.course-action-list a > svg:first-child,
.course-action-list button > svg:first-child {
  width: 24px;
  height: 24px;
}

.course-action-list a > svg:last-child,
.course-action-list button > svg:last-child {
  width: 17px;
  height: 17px;
  color: var(--faint);
}

.course-action-list span {
  min-width: 0;
  display: grid;
}

.course-action-list strong {
  font-size: 16px;
}

.course-action-list small {
  color: var(--muted);
  font-size: 11px;
}

/* Course detail and review experience */
.course-detail-page {
  max-width: 960px;
  padding-top: 24px;
}

.everytime-detail-topbar {
  min-height: 46px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}

.everytime-detail-topbar a,
.everytime-detail-topbar button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 40px;
  padding: 0 12px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-weight: 700;
  text-decoration: none;
}

.everytime-detail-topbar button {
  background: var(--soft);
  color: var(--muted);
}

.everytime-detail-topbar button.is-added {
  color: var(--red);
}

.everytime-detail-topbar svg {
  width: 20px;
  height: 20px;
}

.everytime-detail-course {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 28px;
  align-items: end;
  padding: 10px 4px 26px;
}

.everytime-detail-course > div:first-child > span {
  display: block;
  margin-bottom: 10px;
  color: var(--red);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .03em;
}

.everytime-detail-course h1 {
  max-width: 760px;
  margin: 0;
  font-size: clamp(30px, 4.2vw, 54px);
  line-height: 1.06;
  letter-spacing: -.045em;
}

.everytime-detail-course p {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.everytime-detail-score {
  min-width: 82px;
  display: grid;
  justify-items: center;
  gap: 3px;
  color: var(--red);
}

.everytime-detail-score svg {
  width: 28px;
  height: 28px;
  fill: currentColor;
}

.everytime-detail-score strong {
  font-size: 28px;
  line-height: 1;
}

.everytime-detail-score small {
  color: var(--muted);
  white-space: nowrap;
}

.everytime-detail-content {
  padding-bottom: 28px;
}

.everytime-detail-tabs {
  position: static;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, .97);
  backdrop-filter: none;
}

.everytime-detail-tabs a {
  min-height: 66px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 4px;
  color: var(--muted);
  text-decoration: none;
  font-size: 11px;
  font-weight: 700;
}

.everytime-detail-tabs svg {
  width: 23px;
  height: 23px;
}

.everytime-detail-tabs a.is-active {
  color: var(--red);
  background: var(--red-soft);
}

.everytime-detail-panel,
.everytime-review-summary,
.everytime-write-review,
.everytime-rating-link,
.official-exam-card {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
}

.everytime-detail-panel {
  margin-bottom: 16px;
  overflow: hidden;
}

.everytime-detail-section-head {
  min-height: 62px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 0 22px;
  border-bottom: 1px solid var(--line);
}

.everytime-detail-section-head h2,
.everytime-detail-section-head strong {
  margin: 0;
  font-size: 17px;
}

.everytime-detail-section-head span,
.everytime-detail-section-head small {
  color: var(--muted);
  font-size: 12px;
}

.everytime-info-list {
  margin: 0;
  padding: 0 22px;
}

.everytime-info-list > div {
  min-height: 68px;
  display: grid;
  grid-template-columns: minmax(160px, .8fr) minmax(0, 1.3fr);
  gap: 20px;
  align-items: center;
  border-bottom: 1px solid var(--line);
}

.everytime-info-list > div:last-child {
  border-bottom: 0;
}

.everytime-info-list dt {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
}

.everytime-info-list dt svg {
  width: 19px;
  height: 19px;
  color: var(--red);
}

.everytime-info-list dd {
  margin: 0;
  text-align: right;
  font-weight: 700;
}

.everytime-info-list dd small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-weight: 500;
}

.course-essential-notes > summary,
.course-source-panel > summary {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 22px;
  cursor: pointer;
  list-style: none;
}

.course-essential-notes > summary::-webkit-details-marker,
.course-source-panel > summary::-webkit-details-marker {
  display: none;
}

.course-essential-notes > summary span,
.course-source-panel > summary span {
  display: grid;
  gap: 3px;
}

.course-essential-notes > summary small,
.course-source-panel > summary small {
  color: var(--muted);
  font-weight: 500;
}

.course-essential-notes > summary svg,
.course-source-panel > summary svg {
  width: 19px;
  height: 19px;
  color: var(--faint);
}

.course-essential-notes[open] > summary svg,
.course-source-panel[open] > summary svg {
  transform: rotate(90deg);
}

.course-source-panel > p,
.course-source-panel > ul,
.course-source-panel > dl {
  margin: 0;
  padding: 18px 22px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
}

.everytime-rating-link {
  min-height: 96px;
  display: grid;
  grid-template-columns: minmax(150px, .7fr) minmax(0, 1.3fr) 22px;
  gap: 18px;
  align-items: center;
  margin-bottom: 16px;
  padding: 16px 22px;
  color: inherit;
  text-decoration: none;
}

.everytime-rating-link > span:first-child {
  display: grid;
  gap: 2px;
}

.everytime-rating-link small,
.everytime-rating-link em {
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
}

.everytime-rating-link strong {
  color: var(--red);
  font-size: 26px;
}

.everytime-rating-link-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.everytime-rating-link-metrics b {
  padding: 7px 10px;
  border-radius: 999px;
  background: var(--soft);
  color: var(--muted);
  font-size: 11px;
}

.course-offering-panel {
  margin-top: 16px;
}

.course-offering-list {
  padding: 0 22px;
}

.course-offering-detail {
  border-bottom: 1px solid var(--line);
}

.course-offering-detail:last-child {
  border-bottom: 0;
}

.course-offering-detail > summary {
  min-height: 70px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  cursor: pointer;
  list-style: none;
}

.course-offering-detail > summary::-webkit-details-marker { display: none; }
.course-offering-detail > summary span { display: grid; gap: 3px; }
.course-offering-detail > summary small,
.course-offering-detail > summary em { color: var(--muted); font-size: 11px; font-style: normal; }
.course-offering-detail-body { padding: 0 0 18px; }
.course-lesson-records { margin-top: 12px; }
.course-lesson-record { padding: 12px 0; border-top: 1px solid var(--line); }
.course-lesson-record-head { display: flex; justify-content: space-between; gap: 12px; }
.course-lesson-record-head span,
.course-lesson-record p { color: var(--muted); font-size: 12px; }

.everytime-review-summary {
  margin-bottom: 14px;
  padding: 28px 20px;
}

.everytime-review-average {
  display: flex;
  align-items: center;
  gap: 14px;
}

.everytime-review-average > strong {
  min-width: 82px;
  font-size: 44px;
  line-height: 1;
  letter-spacing: -.05em;
}

.everytime-review-average > small {
  margin-left: auto;
  color: var(--muted);
}

.everytime-static-stars,
.course-stars {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  color: #d8d8d8;
}

.everytime-static-stars svg,
.course-stars svg {
  width: 24px;
  height: 24px;
  fill: currentColor;
}

.everytime-static-stars .is-active,
.course-stars .is-active,
.course-stars svg.is-active {
  color: var(--yellow);
}

.everytime-write-review {
  width: 100%;
  min-height: 68px;
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) 20px;
  align-items: center;
  gap: 14px;
  margin-bottom: 22px;
  padding: 10px 20px;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}

.everytime-write-review > svg {
  width: 24px;
  height: 24px;
  color: var(--red);
}

.everytime-write-review > span {
  display: grid;
  gap: 3px;
}

.everytime-write-review small {
  color: var(--muted);
  font-size: 11px;
}

.everytime-list-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 50px;
  border-bottom: 1px solid var(--line);
}

.everytime-list-heading strong { font-size: 19px; }
.everytime-list-heading span { color: var(--muted); font-size: 12px; }

.course-review-list {
  background: #fff;
}

.course-review-card {
  padding: 24px 4px;
  border-bottom: 1px solid var(--line);
}

.course-review-card-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: start;
}

.course-review-primary {
  display: grid;
  gap: 5px;
}

.course-review-primary .everytime-static-stars svg,
.course-review-primary .course-stars svg {
  width: 18px;
  height: 18px;
}

.course-review-primary > span,
.course-review-author {
  color: var(--faint);
  font-size: 11px;
}

.course-review-card-copy {
  margin: 16px 0 0;
  font-size: 15px;
  line-height: 1.75;
  white-space: pre-wrap;
}

.course-review-dimensions {
  margin-top: 12px;
}

.course-review-dimensions > summary {
  color: var(--muted);
  font-size: 11px;
  cursor: pointer;
}

.course-review-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.course-review-tags span {
  padding: 6px 9px;
  border-radius: 8px;
  background: var(--soft);
  color: var(--muted);
  font-size: 10px;
}

.course-review-empty {
  min-height: 260px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 8px;
  color: var(--muted);
  text-align: center;
}

.course-review-empty strong { color: var(--ink); font-size: 20px; }

.course-review-modal .modal-head {
  display: none;
}

.course-review-modal .modal-body {
  padding: 0;
}

.course-review-form {
  min-height: min(820px, 92vh);
  padding: 0 30px 34px;
  background: #fff;
}

.course-review-composer-nav {
  min-height: 70px;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 44px;
  align-items: center;
  border-bottom: 1px solid var(--line);
}

.course-review-composer-nav strong {
  text-align: center;
  font-size: 19px;
}

.course-review-composer-nav button {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.course-review-composer-nav svg { width: 24px; height: 24px; }

.course-review-form-head {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding: 28px 0 22px;
}

.course-star-input {
  display: inline-flex;
  gap: 7px;
}

.course-star-input button {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  background: transparent;
  color: #dedede;
  cursor: pointer;
}

.course-star-input button.is-active { color: var(--yellow); }
.course-star-input svg { width: 44px; height: 44px; fill: currentColor; }
.course-star-value { color: var(--muted); font-size: 18px; }

.course-review-content textarea {
  min-height: 220px;
  resize: vertical;
  background: #fafafa;
}

.course-review-binding-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 20px 0;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}

.course-review-binding-fields label,
.course-review-exam-format {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 12px;
}

.course-review-fields {
  display: grid;
  gap: 26px;
  padding: 20px 0;
}

.course-review-choice-group,
.course-review-identity {
  margin: 0;
  padding: 0;
  border: 0;
}

.course-review-choice-group legend,
.course-review-identity legend {
  margin-bottom: 12px;
  color: var(--ink);
  font-size: 16px;
  font-weight: 800;
}

.course-review-choice-group > div {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.course-review-choice-group button {
  min-height: 42px;
  padding: 0 16px;
  border: 1px solid #d8d8d8;
  border-radius: 10px;
  background: #fff;
  color: var(--muted);
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}

.course-review-choice-group button.is-active {
  border-color: var(--red);
  background: var(--red-soft);
  color: var(--red);
  font-weight: 800;
}

.course-review-identity {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 20px 0;
  border-top: 1px solid var(--line);
}

.course-review-identity legend { width: 100%; }

.course-review-identity label {
  cursor: pointer;
}

.course-review-identity input {
  position: absolute;
  opacity: 0;
}

.course-review-identity span {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  padding: 0 14px;
  border: 1px solid #d8d8d8;
  border-radius: 10px;
  color: var(--muted);
}

.course-review-identity input:checked + span {
  border-color: var(--red);
  background: var(--red-soft);
  color: var(--red);
  font-weight: 800;
}

.course-review-actions {
  display: grid;
  gap: 12px;
  margin-top: 10px;
}

.course-review-actions > span {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.6;
}

.course-review-actions .button {
  width: 100%;
  min-height: 54px;
  border-radius: 12px;
  font-size: 17px;
}

.course-review-locked {
  min-height: 110px;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
}

.course-review-locked > div { display: grid; gap: 4px; }
.course-review-locked span { color: var(--muted); font-size: 12px; }

/* Exams and course resources */
.everytime-assessment-list { padding: 0 22px; }
.everytime-assessment-list > span { min-height: 72px; display: grid; grid-template-columns: 140px minmax(150px, .7fr) minmax(0, 1fr); gap: 16px; align-items: center; border-bottom: 1px solid var(--line); }
.everytime-assessment-list > span:last-child { border-bottom: 0; }
.everytime-assessment-list b { color: var(--red); }
.everytime-assessment-list small,
.everytime-assessment-list p { color: var(--muted); font-size: 12px; }
.everytime-exam-note { display: flex; gap: 12px; margin: 0 0 16px; padding: 15px 18px; border-radius: 12px; background: #fff6df; color: #805e23; font-size: 12px; line-height: 1.6; }
.everytime-exam-note svg { flex: 0 0 20px; width: 20px; height: 20px; }
.everytime-exam-note span { display: grid; }

.official-exam-card {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  margin-bottom: 16px;
  padding: 20px;
  background: #fff8f5;
  border-color: #ffd5c5;
}

.official-exam-icon {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: var(--primary-soft);
  color: var(--primary);
}

.official-exam-icon svg { width: 26px; height: 26px; }
.official-exam-card > div { display: grid; gap: 4px; }
.official-exam-card small,
.official-exam-card p { color: var(--muted); font-size: 11px; }
.official-exam-card strong { color: var(--primary); font-size: 22px; }
.official-exam-card p { margin: 0; }
.course-resource-disclaimer { margin: 14px 20px; padding: 10px 12px; border-radius: 9px; background: #fff8e8; color: #87672b; font-size: 11px; }
.course-student-resource-list { padding: 0 20px; }
.course-resource-row { position: relative; border-bottom: 1px solid var(--line); }
.course-resource-row > a:first-child { min-height: 74px; display: grid; grid-template-columns: 36px minmax(0, 1fr) auto 20px; gap: 12px; align-items: center; color: inherit; text-decoration: none; }
.course-resource-row > a:first-child > span:nth-child(2) { display: grid; gap: 3px; }
.course-resource-row small,
.course-resource-row em { color: var(--muted); font-size: 11px; font-style: normal; }
.course-resource-row b { padding: 4px 7px; border-radius: 6px; background: #fff5dd; color: #8d6721; font-size: 9px; }
.course-resource-author { display: inline-flex; align-items: center; gap: 6px; margin: 0 0 12px 48px; color: var(--muted); text-decoration: none; font-size: 11px; }
.course-resource-author .avatar { width: 22px; height: 22px; display: grid; place-items: center; border-radius: 50%; background: var(--red-soft); color: var(--red); font-size: 8px; }
.course-resource-submit { width: 100%; min-height: 68px; display: grid; grid-template-columns: 28px minmax(0, 1fr) 20px; align-items: center; gap: 12px; padding: 0 20px; border: 0; border-top: 1px solid var(--line); background: #fff; text-align: left; }
.course-resource-submit span { display: grid; gap: 3px; }
.course-resource-submit small { color: var(--muted); font-size: 11px; }
.course-resource-empty { min-height: 160px; display: flex; align-items: center; justify-content: center; gap: 12px; color: var(--muted); text-align: center; }

/* Community board */
.community-page,
.community-post-page {
  max-width: 980px;
}

.community-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  padding: 8px 0 24px;
  border-bottom: 1px solid var(--line);
}

.community-head h1 { margin: 0; font-size: 34px; }
.community-head p { margin: 6px 0 0; }

.community-layout {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 28px;
  margin-top: 24px;
}

.community-forum-layout {
  grid-template-columns: 220px minmax(0, 1fr);
  align-items: start;
}

.community-sidebar {
  align-self: start;
  position: sticky;
  top: 92px;
  display: grid;
  gap: 12px;
}

.community-sidebar > a,
.community-sidebar > button,
.forum-navigation a,
.forum-navigation button {
  width: 100%;
  min-height: 54px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 14px;
  border: 0;
  border-radius: 12px;
  background: #fff;
  color: var(--ink);
  text-decoration: none;
  text-align: left;
  cursor: pointer;
}

.community-sidebar .is-active,
.forum-navigation .is-active {
  background: var(--red-soft);
  color: var(--red);
  font-weight: 800;
}

.community-feed {
  min-width: 0;
  background: #fff;
}

.post-card,
.community-post-card {
  position: relative;
  padding: 22px 4px;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: #fff;
}

.post-card:last-child { border-bottom: 0; }
.post-card a { color: inherit; text-decoration: none; }
.post-card-head { display: flex; align-items: center; gap: 10px; }
.post-card-head .avatar,
.post-author-avatar { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 50%; background: var(--red-soft); color: var(--red); font-size: 10px; font-weight: 800; }
.post-card-head > div { display: grid; gap: 2px; }
.post-card-head small { color: var(--faint); font-size: 10px; }
.post-card h2,
.post-card h3 { margin: 16px 0 6px; font-size: 18px; }
.post-card p { margin: 0; color: #444; font-size: 14px; line-height: 1.65; }
.post-actions,
.post-card-actions { display: flex; align-items: center; gap: 22px; min-height: 48px; margin-top: 14px; border-top: 1px solid var(--line); color: var(--muted); }
.post-actions button,
.post-actions a,
.post-card-actions button,
.post-card-actions a { display: inline-flex; align-items: center; gap: 6px; padding: 0; border: 0; background: transparent; color: inherit; font: inherit; font-size: 11px; text-decoration: none; cursor: pointer; }
.post-actions svg,
.post-card-actions svg { width: 18px; height: 18px; }
.post-actions .is-active,
.post-card-actions .is-active { color: var(--red); }

.community-create-button { min-height: 44px; padding: 0 16px; border-radius: 11px; }
.community-feed-head { display: flex; align-items: center; justify-content: space-between; min-height: 48px; }
.community-feed-head h2 { margin: 0; font-size: 22px; }

.post-detail-card { padding: 24px 0; border-bottom: 1px solid var(--line); }
.post-detail-card h1 { margin: 24px 0 10px; font-size: 30px; }
.post-detail-card > p { font-size: 16px; line-height: 1.8; }
.post-reply-form { margin: 20px 0; padding: 16px 0; border-bottom: 1px solid var(--line); }
.post-reply-form textarea { min-height: 110px; }
.reply-list article { padding: 18px 0; border-bottom: 1px solid var(--line); }

/* Profile */
.everytime-profile-page { padding-top: 28px; }
.everytime-profile-head { display: grid; grid-template-columns: 84px minmax(0, 1fr) 44px; gap: 18px; align-items: center; padding-bottom: 22px; }
.profile-social-avatar { width: 80px; height: 80px; display: grid; place-items: center; border-radius: 50%; background: linear-gradient(145deg, #ffdfc2, #ffc067); color: #fff; font-size: 20px; font-weight: 900; }
.profile-social-copy h1 { margin: 0; font-size: 28px; }
.profile-social-copy p { margin: 5px 0 0; color: var(--muted); font-size: 12px; }
.profile-settings-button { justify-self: end; }
.everytime-profile-stats { min-height: 68px; display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.everytime-profile-stats span { display: grid; place-items: center; align-content: center; gap: 2px; color: var(--muted); font-size: 11px; }
.everytime-profile-stats b { color: var(--ink); font-size: 18px; }
.profile-connection-section { margin-top: 14px; overflow: hidden; border: 1px solid var(--line-light); border-radius: var(--radius); background: #fff; }
.profile-connection-entry { width: 100%; min-height: 82px; display: grid; grid-template-columns: 46px minmax(0, 1fr) 24px; align-items: center; gap: 14px; padding: 14px 18px; border: 0; color: var(--ink); background: transparent; text-align: left; cursor: pointer; }
.profile-connection-entry:hover { background: var(--soft); }
.profile-connection-entry-icon { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; color: var(--primary); background: var(--primary-soft); }
.profile-connection-entry-icon .ui-icon { width: 23px; height: 23px; }
.profile-connection-entry-copy { min-width: 0; display: grid; gap: 4px; }
.profile-connection-entry-copy strong { font-size: 16px; }
.profile-connection-entry-copy small { overflow: hidden; color: var(--muted); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.profile-connection-entry > .ui-icon { width: 20px; height: 20px; color: var(--faint); }
.profile-favorite-section { margin-top: 26px; }
.profile-favorite-section-head { display: flex; align-items: center; justify-content: space-between; min-height: 52px; border-bottom: 1px solid var(--line); }
.profile-favorite-section-head h2 { margin: 0; font-size: 20px; }
.profile-favorite-section-head span { color: var(--muted); font-size: 12px; }
.profile-favorite-grid { display: grid; grid-template-columns: 1fr; gap: 10px; padding-top: 14px; }
.everytime-favorite-row { min-width: 0; display: grid; grid-template-columns: 104px minmax(0, 1fr); align-items: center; gap: 14px; padding: 10px; border: 1px solid var(--line-light); border-radius: var(--radius); background: #fff; color: inherit; text-decoration: none; }
.profile-favorite-cover { position: relative; width: 104px; height: 78px; overflow: hidden; display: grid; place-items: center; align-content: center; gap: 6px; border-radius: 12px; background: var(--soft); color: var(--red); }
.profile-favorite-image { width: 100%; height: 100%; object-fit: cover; }
.profile-favorite-cover.has-image em { position: absolute; left: 7px; bottom: 7px; padding: 2px 6px; border-radius: 999px; color: #fff; background: rgba(0, 0, 0, .58); }
.profile-favorite-cover svg { width: 28px; height: 28px; }
.profile-favorite-cover em { font-size: 10px; font-style: normal; }
.profile-favorite-copy { display: grid; gap: 3px; }
.profile-favorite-copy strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.profile-favorite-copy small { color: var(--muted); font-size: 11px; }

.settings-head { display: grid; grid-template-columns: 44px 1fr 44px; align-items: center; min-height: 60px; }
.settings-head h1 { margin: 0; text-align: center; font-size: 20px; }
.settings-profile-card,
.account-status-card,
.privacy-setting-card,
.settings-section { padding: 18px 0; border-bottom: 1px solid var(--line); }
.settings-profile-card { display: grid; grid-template-columns: 54px minmax(0, 1fr) auto; gap: 14px; align-items: center; }
.settings-profile-card .profile-avatar { width: 52px; height: 52px; }
.settings-profile-card > div { display: grid; gap: 3px; }
.settings-profile-card span,
.account-status-card span { color: var(--muted); font-size: 12px; }
.account-status-card { display: flex; justify-content: space-between; gap: 16px; align-items: center; }
.account-status-card > div { display: grid; gap: 4px; }
.privacy-setting-card > div { display: flex; gap: 12px; }
.settings-section h2 { font-size: 15px; }
.settings-list button { width: 100%; min-height: 62px; display: grid; grid-template-columns: 24px minmax(0, 1fr) 18px; gap: 12px; align-items: center; padding: 0; border: 0; border-bottom: 1px solid var(--line); background: #fff; text-align: left; }
.settings-list button span { display: grid; gap: 3px; }
.settings-list small { color: var(--muted); }
.auth-panel,
.auth-form {
  display: grid;
  gap: 16px;
}

.auth-intro {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.auth-intro-icon {
  display: grid;
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
  place-items: center;
  border-radius: 16px;
  color: var(--red);
  background: rgba(255, 69, 0, .1);
}

.auth-intro-icon svg {
  width: 24px;
  height: 24px;
}

.auth-intro h3 {
  margin: 0 0 5px;
  color: var(--ink);
  font-size: 18px;
}

.auth-intro p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
}

.auth-form {
  gap: 14px;
}

.auth-help,
.auth-privacy-note {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.auth-optional {
  color: var(--muted);
  font-size: 12px;
  font-weight: 400;
}

#auth-otp {
  text-align: center;
  letter-spacing: .45em;
  font-size: 22px;
  font-variant-numeric: tabular-nums;
}

.auth-form-status {
  min-height: 20px;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.auth-form-status.is-error {
  color: #c62828;
}

.auth-submit {
  width: 100%;
  justify-content: center;
}

.auth-secondary-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px 18px;
}

.auth-secondary-actions button {
  padding: 0;
  border: 0;
  color: var(--primary);
  background: transparent;
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}

/* Responsive native app layout */
@media (max-width: 760px) {
  :root { --header-height: 64px; --nav-height: 66px; }

  body { padding-bottom: calc(var(--nav-height) + env(safe-area-inset-bottom)); }
  .app-header,
  .site-header { min-height: var(--header-height); height: var(--header-height); }
  .header-inner { width: 100%; padding: 0 18px; }
  .brand-copy { display: none; }
  .brand-mark { width: 38px; height: 38px; }
  .icon-button { width: 40px; height: 40px; padding: 0; border: 0; background: transparent; }

  .mobile-nav { height: calc(var(--nav-height) + env(safe-area-inset-bottom)); padding: 0 4px env(safe-area-inset-bottom); }
  .mobile-nav a { min-height: var(--nav-height); font-size: 10px; }

  .page,
  .page-narrow { width: auto; max-width: none; margin: 0 18px; padding: 26px 0 58px; }
  .site-footer { display: none; }
  .button { min-height: 42px; }

  .everytime-home-page { padding-top: 24px; }
  .everytime-home-summary { grid-template-columns: 1fr; gap: 18px; }
  .everytime-home-greeting { padding: 0; }
  .everytime-home-greeting p { font-size: 12px; }
  .everytime-home-greeting h1 { font-size: 29px; }
  .everytime-todo-card { min-height: 122px; padding: 22px; }
  .everytime-service-panel { margin-top: 26px; }
  .home-panel { padding: 0; border: 0; border-radius: 0; box-shadow: none; }
  .home-panel-head h2 { font-size: 20px; }
  .everytime-service-grid { grid-template-columns: repeat(4, 1fr); gap: 4px; }
  .everytime-service-item { display: grid; justify-items: center; gap: 8px; min-width: 0; padding: 8px 0; text-align: center; }
  .everytime-service-item > span:last-child { min-width: 0; }
  .everytime-service-item strong { font-size: 11px; white-space: nowrap; }
  .everytime-service-item small { display: none; }
  .campus-service-icon { width: 50px; height: 50px; border-radius: 14px; }
  .campus-service-icon svg { width: 27px; height: 27px; }
  .everytime-campus-banner { min-height: 142px; margin: 26px 0; padding: 20px; border: 0; border-radius: 16px; }
  .home-promo-copy strong { max-width: 62%; font-size: 17px; }
  .home-promo-copy small { display: none; }
  .home-promo-stage { right: 12px; width: 34%; }
  .home-promo-stage b { font-size: 10px; }
  .everytime-board-panel { margin-top: 0; }
  .home-post-list { padding: 2px 0; }
  .everytime-board-row { min-height: 52px; padding: 8px 0; }

  .everytime-course-page { margin: 0; padding: 22px 0 56px; }
  .everytime-page-head { padding: 0 18px 18px; }
  .everytime-page-head h1 { font-size: 30px; }
  .everytime-head-actions { gap: 4px; }
  .everytime-icon-action { width: 42px; height: 42px; }
  .everytime-icon-action span { display: none; }
  .everytime-timetable-card { border-width: 1px 0; border-radius: 0; }
  .everytime-timetable-scroll { overflow: hidden; }
  .everytime-day-label { height: 38px; font-size: 10px; }
  .everytime-time-label { padding-top: 3px; padding-right: 4px; font-size: 9px; }
  .everytime-course-block { padding: 4px; border-radius: 0; }
  .everytime-course-block strong { -webkit-line-clamp: 3; }
  .everytime-unplaced-courses { margin: 16px 18px 0; }

  .course-picker-modal .modal-head { min-height: 64px; padding: 0 18px; border-bottom: 1px solid var(--line); }
  .course-picker-modal .modal-body { padding: 0; }
  .course-picker-layout { display: block; }
  .course-picker-preview { padding: 10px 18px 0; }
  .course-picker-preview .everytime-timetable-card { max-height: 236px; overflow: hidden; border: 1px solid var(--line); border-radius: 14px; }
  .course-picker-controls { position: sticky; top: 0; z-index: 3; padding: 12px 18px; background: #fff; }
  .course-picker-filter-grid { display: flex; overflow-x: auto; gap: 7px; scrollbar-width: none; }
  .course-picker-filter-grid label { flex: 0 0 auto; }
  .course-picker-filter-grid select { max-width: 150px; }
  .course-picker-results { padding: 0 18px 60px; }
  .course-picker-item { grid-template-columns: minmax(0, 1fr) auto; padding: 18px 0; }
  .course-picker-item .course-picker-add { grid-row: 1 / span 2; grid-column: 2; }

  .course-action-modal .modal-card { align-self: end; width: 100%; max-width: none; margin: 0; border-radius: 22px 22px 0 0; }
  .course-action-modal .modal-head { padding: 16px 20px 8px; border: 0; }
  .course-action-modal .modal-body { padding: 0 20px calc(22px + env(safe-area-inset-bottom)); }

  .course-detail-page { margin: 0 18px; padding-top: 10px; }
  .everytime-detail-topbar { margin-bottom: 6px; }
  .everytime-detail-topbar a span { display: none; }
  .everytime-detail-topbar button { max-width: 170px; font-size: 11px; }
  .everytime-detail-course { grid-template-columns: 1fr; justify-items: center; gap: 16px; padding: 6px 0 22px; text-align: center; }
  .everytime-detail-course > div:first-child > span { font-size: 11px; }
  .everytime-detail-course h1 { font-size: 28px; line-height: 1.12; }
  .everytime-detail-course p { font-size: 11px; }
  .everytime-detail-score { grid-auto-flow: column; align-items: center; }
  .everytime-detail-score strong { font-size: 22px; }
  .everytime-detail-tabs { position: static; margin: 0 0 18px; }
  .everytime-detail-tabs a { min-height: 58px; }
  .everytime-detail-content { padding-bottom: 24px; }
  .everytime-detail-panel,
  .everytime-review-summary,
  .everytime-write-review,
  .everytime-rating-link,
  .official-exam-card { border-left: 0; border-right: 0; border-radius: 0; }
  .everytime-detail-section-head { padding: 0 2px; }
  .everytime-info-list { padding: 0; }
  .everytime-info-list > div { grid-template-columns: 120px minmax(0, 1fr); gap: 12px; }
  .everytime-info-list dt { font-size: 12px; }
  .everytime-info-list dd { font-size: 12px; }
  .everytime-rating-link { grid-template-columns: 1fr 22px; padding: 16px 2px; }
  .everytime-rating-link-metrics { display: none; }
  .course-offering-list { padding: 0; }
  .course-review-card { padding: 21px 0; }
  .course-review-author { display: none; }
  .everytime-review-summary { padding: 24px 0; }
  .everytime-review-average { justify-content: center; }
  .everytime-review-average > strong { min-width: auto; font-size: 38px; }
  .everytime-review-average > small { margin-left: 0; }
  .everytime-write-review { position: static; width: 100%; min-height: 50px; grid-template-columns: 22px minmax(0, 1fr); padding: 0 18px; border-radius: 12px; background: var(--primary); color: #fff; box-shadow: none; }
  .everytime-write-review > svg { color: #fff; }
  .everytime-write-review small { display: none; }
  .everytime-write-review strong { color: #fff; }

  .course-review-form { min-height: 100%; padding: 0 18px 32px; }
  .course-review-composer-nav { position: sticky; top: 0; z-index: 2; background: #fff; }
  .course-star-input { gap: 1px; }
  .course-star-input button { width: 42px; height: 42px; }
  .course-star-input svg { width: 38px; height: 38px; }
  .course-review-binding-fields { grid-template-columns: 1fr; }
  .course-review-content textarea { min-height: 190px; }
  .official-exam-card { grid-template-columns: 48px minmax(0, 1fr); padding: 16px 0; }
  .official-exam-card .button { grid-column: 1 / -1; width: 100%; }
  .everytime-assessment-list { padding: 0; }
  .everytime-assessment-list > span { grid-template-columns: 1fr; gap: 4px; padding: 14px 0; }

  .community-page { margin: 0 18px; }
  .community-head { align-items: center; }
  .community-head h1 { font-size: 29px; }
  .community-head p { display: none; }
  .community-layout { display: block; margin-top: 12px; }
  .community-sidebar { position: static; display: flex; gap: 8px; overflow-x: auto; margin: 0 -18px 14px; padding: 0 18px; scrollbar-width: none; }
  .community-sidebar > * { flex: 0 0 auto; width: auto; min-height: 38px; padding: 0 14px; border: 1px solid var(--line); border-radius: 999px; }
  .community-feed-head { min-height: 42px; }
  .community-feed-head h2 { font-size: 17px; }
  .post-card { padding: 20px 0; }
  .post-card h2,
  .post-card h3 { font-size: 17px; }
  .post-actions,
  .post-card-actions { justify-content: space-between; gap: 8px; }
  .post-detail-card h1 { font-size: 25px; }

  .everytime-profile-head { grid-template-columns: 72px minmax(0, 1fr) 40px; gap: 14px; }
  .profile-social-avatar { width: 70px; height: 70px; }
  .profile-social-copy h1 { font-size: 24px; }
  .classroom-page,
  .venue-page,
  .restaurant-page { margin: 0 18px; }
  .place-entry { grid-template-columns: 50px minmax(0, 1fr) auto 16px; min-height: 94px; gap: 12px; }
  .place-entry-image { width: 48px; height: 48px; border-radius: 13px; }
  .place-entry-copy h2 { font-size: 15px; }
  .library-detail-row { grid-template-columns: 110px minmax(0, 1fr); font-size: 12px; }
  .classroom-workspace { grid-template-columns: 1fr; }
  .classroom-input-panel,
  .classroom-output-panel { min-height: 320px; border-left: 0; border-right: 0; border-radius: 0; }
}

/* Final Everytime parity pass: current DOM aliases and native mobile sheets */

.forum-sidebar {
  align-self: start;
  position: sticky;
  top: 92px;
  display: grid;
  gap: 12px;
  min-width: 0;
}

.forum-sidebar nav,
.forum-sidebar section {
  display: grid;
  gap: 2px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

.forum-sidebar section > div {
  padding: 4px 12px 7px;
}

.forum-sidebar h3,
.forum-sidebar p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.forum-sidebar p {
  padding: 8px 12px;
}

.forum-sidebar a {
  min-height: 54px;
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  align-items: center;
  gap: 11px;
  padding: 7px 10px;
  border-radius: 12px;
  color: inherit;
  text-decoration: none;
}

.forum-sidebar a:hover,
.forum-sidebar a.is-active {
  color: var(--red);
  background: var(--red-soft);
}

.forum-sidebar a > span {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: var(--red);
  background: var(--red-soft);
  font-size: 11px;
  font-weight: 850;
}

.forum-sidebar a > span svg {
  width: 20px;
  height: 20px;
}

.forum-sidebar a em {
  min-width: 0;
  display: grid;
  gap: 2px;
  font-style: normal;
}

.forum-sidebar a strong,
.forum-sidebar a small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.forum-sidebar a small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 500;
}

.forum-create-button {
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--red);
  background: #fff;
  font-weight: 800;
  cursor: pointer;
}

.forum-create-button svg {
  width: 18px;
  height: 18px;
}

.community-feed-column {
  min-width: 0;
}

.forum-feed-header {
  min-height: 66px;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  border-bottom: 1px solid var(--line);
}

.forum-feed-copy h2,
.forum-feed-copy p {
  margin: 0;
}

.forum-feed-copy h2 {
  font-size: 22px;
}

.forum-feed-copy p {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
}

.forum-feed-controls,
.community-sort-tabs {
  display: flex;
  align-items: center;
  gap: 12px;
}

.community-sort-tabs a {
  min-height: 40px;
  display: grid;
  place-items: center;
  border-bottom: 2px solid transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
  text-decoration: none;
}

.community-sort-tabs a.is-active {
  border-bottom-color: var(--red);
  color: var(--red);
}

.forum-follow-button {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 0 11px;
  border-radius: 999px;
  color: #fff;
  background: var(--red);
  font-size: 11px;
  font-weight: 750;
}

.forum-follow-button svg {
  width: 14px;
  height: 14px;
}

.forum-follow-button b {
  font-size: 10px;
}

.community-post-card:last-child {
  border-bottom: 0;
}

.community-post-main {
  display: block;
  color: inherit;
  text-decoration: none;
}

.community-post-main h2 {
  margin: 16px 0 6px;
  font-size: 18px;
}

.community-post-main p {
  display: -webkit-box;
  overflow: hidden;
  margin: 0;
  color: #444;
  font-size: 14px;
  line-height: 1.65;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.post-card-head .review-author,
.public-author-link {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 9px;
  color: inherit;
  text-decoration: none;
}

.post-card-head .review-author > span:last-child,
.public-author-link > span:last-child {
  min-width: 0;
  display: grid;
  gap: 1px;
}

.post-forum-label {
  margin-left: auto;
  padding: 4px 8px;
  border-radius: 999px;
  color: var(--red);
  background: var(--red-soft);
  font-size: 10px;
  font-weight: 750;
  text-decoration: none;
}

.post-action-bar {
  min-height: 48px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  align-items: center;
  margin-top: 14px;
  border-top: 1px solid var(--line);
  color: var(--muted);
}

.post-action-bar > a,
.post-action-bar > button {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-size: 10px;
  text-decoration: none;
  cursor: pointer;
}

.post-action-bar svg {
  width: 17px;
  height: 17px;
}

.post-action-bar b {
  font-size: 10px;
  font-weight: 650;
}

.post-action-bar .is-active {
  color: var(--red);
}

.post-nested-replies {
  margin-top: 14px;
  padding-left: 16px;
  border-left: 2px solid var(--soft);
}

.post-nested-reply {
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.post-reply-actions {
  display: flex;
  gap: 14px;
  margin-top: 8px;
}

.post-reply-actions button {
  padding: 0;
  color: var(--muted);
  background: transparent;
  font-size: 11px;
}

.post-floor-number {
  flex: 0 0 auto;
  padding: 5px 8px;
  border-radius: 999px;
  color: #795e68;
  background: var(--soft);
  font-size: 10px;
  font-weight: 800;
  white-space: nowrap;
}

.post-moderation-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  margin-top: 14px;
}

.post-moderation-actions > button {
  min-height: 31px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 9px;
  border: 1px solid var(--line);
  border-radius: 9px;
  color: var(--muted);
  background: #fff;
  font-size: 10px;
}

.post-moderation-actions svg {
  width: 13px;
  height: 13px;
}

.community-report-form,
.post-nested-reply-form {
  display: grid;
  gap: 12px;
}

.community-report-form > label {
  display: grid;
  gap: 6px;
}

.community-report-form > button {
  justify-self: end;
}

.message-page-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}

.message-page-head h1 {
  margin: 0;
  font-size: 34px;
}

.message-page-head p {
  margin: 3px 0 0;
  color: var(--muted);
}

.conversation-groups {
  border: 0;
  background: transparent;
  box-shadow: none;
}

.message-login-state {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 18px;
  text-align: center;
}

.message-login-state > div:nth-child(2) {
  max-width: 340px;
}

.message-login-state h2,
.message-login-state p {
  margin: 0;
}

.message-login-state p {
  margin-top: 8px;
  color: var(--muted);
}

.message-action-sheet,
.connection-modal-list,
.connection-people {
  display: grid;
}

.message-action-sheet > button,
.connection-people > button {
  min-height: 70px;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) 18px;
  align-items: center;
  gap: 12px;
  padding: 0;
  border-bottom: 1px solid var(--line);
  background: #fff;
  text-align: left;
}

.message-action-sheet > button > svg:first-child,
.connection-people .avatar {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  padding: 9px;
  color: var(--red);
  background: var(--red-soft);
}

.message-action-sheet > button > span,
.connection-people > button {
  min-width: 0;
}

.message-action-sheet strong,
.message-action-sheet small {
  display: block;
}

.message-action-sheet small,
.connection-people small {
  color: var(--muted);
  font-size: 11px;
}

.message-identity-card {
  display: grid;
  place-items: center;
  gap: 10px;
  padding: 20px;
  border-radius: 16px;
  background: var(--soft);
  text-align: center;
}

.message-qr {
  width: 176px;
  height: 176px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 10px solid #fff;
  border-radius: 16px;
  background: #fff;
}

.message-qr svg,
.message-qr canvas,
.message-qr img {
  width: 100%;
  height: 100%;
}

.message-qr-stack,
.message-identity-copy {
  min-width: 0;
  display: grid;
  gap: 6px;
}

.message-qr-stack {
  justify-items: center;
  color: var(--muted);
  font-size: 11px;
}

.message-identity-copy small,
.message-identity-copy span {
  color: var(--muted);
  font-size: 12px;
}

.message-identity-copy strong {
  overflow: hidden;
  font-size: 18px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.message-identity-card > button {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0 14px;
  border-radius: 10px;
  color: var(--primary);
  background: var(--primary-soft);
  cursor: pointer;
}

.message-identity-card > button .ui-icon {
  width: 18px;
  height: 18px;
  flex-basis: 18px;
}

.connection-code-search {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  padding: 16px 0;
}

.group-composer,
.group-composer fieldset {
  display: grid;
  gap: 12px;
}

.group-composer fieldset {
  margin: 0;
  padding: 0;
  border: 0;
}

.group-composer fieldset label {
  min-height: 58px;
  display: grid;
  grid-template-columns: auto 38px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid var(--line);
}

.group-composer .avatar {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--red);
  background: var(--red-soft);
}

.profile-favorite-grid > .empty-state {
  grid-column: 1 / -1;
}

.everytime-semester-summary {
  min-height: 112px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr)) 44px;
  align-items: center;
  gap: 12px;
  margin-top: 20px;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
}

.everytime-semester-summary > div {
  display: grid;
  gap: 4px;
}

.everytime-semester-summary span {
  color: var(--muted);
  font-size: 11px;
}

.everytime-semester-summary strong {
  font-size: 20px;
}

.everytime-semester-summary button {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--soft);
}

.everytime-semester-summary svg {
  width: 20px;
  height: 20px;
}

@media (max-width: 760px) {
  body[data-route="courses"] .site-header,
  body[data-route="course"] .site-header,
  body[data-route="posts"] .site-header,
  body[data-route="post"] .site-header,
  body[data-route="messages"] .site-header,
  body[data-route="chat"] .site-header,
  body[data-route="group"] .site-header,
  body[data-route="profile"] .site-header,
  body[data-route="settings"] .site-header,
  body[data-route="user"] .site-header {
    display: none;
  }

  body[data-route="courses"] #app,
  body[data-route="course"] #app,
  body[data-route="posts"] #app,
  body[data-route="post"] #app,
  body[data-route="messages"] #app,
  body[data-route="chat"] #app,
  body[data-route="group"] #app,
  body[data-route="profile"] #app,
  body[data-route="settings"] #app,
  body[data-route="user"] #app {
    min-height: 100vh;
  }

  .course-picker-modal,
  .course-review-modal {
    position: fixed;
    inset: 0;
    width: 100%;
    max-width: none;
    height: 100%;
    max-height: none;
    border-radius: 0;
  }

  .course-picker-modal .modal-body,
  .course-review-modal .modal-body {
    max-height: calc(100vh - 64px);
    overflow-x: hidden;
  }

  .course-picker {
    min-width: 0;
  }

  .course-picker-preview {
    margin: 0 0 16px;
  }

  .course-action-modal {
    align-self: end;
    width: 100%;
    max-width: none;
    max-height: min(78vh, 680px);
    margin: 0;
    border-radius: 22px 22px 0 0;
  }

  .modal-backdrop:has(.course-picker-modal),
  .modal-backdrop:has(.course-review-modal),
  .modal-backdrop:has(.course-action-modal) {
    padding: 0;
  }

  .community-page {
    margin: 0;
    padding: 22px 18px 44px;
  }

  .community-layout {
    display: block;
    margin-top: 8px;
  }

  .forum-sidebar {
    position: static;
    display: flex;
    gap: 8px;
    overflow-x: auto;
    margin: 0 -18px 12px;
    padding: 0 18px 10px;
    scrollbar-width: none;
  }

  .forum-sidebar::-webkit-scrollbar {
    display: none;
  }

  .forum-sidebar nav,
  .forum-sidebar section {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0;
    border: 0;
  }

  .forum-sidebar section > div,
  .forum-sidebar section > p {
    display: none;
  }

  .forum-sidebar a {
    min-height: 40px;
    grid-template-columns: auto;
    padding: 0 14px;
    border: 1px solid var(--line);
    border-radius: 999px;
    white-space: nowrap;
  }

  .forum-sidebar a > span,
  .forum-sidebar a small {
    display: none;
  }

  .forum-sidebar a em {
    display: block;
  }

  .forum-create-button {
    flex: 0 0 auto;
    min-height: 40px;
    padding: 0 14px;
    border-radius: 999px;
  }

  .forum-feed-header {
    min-height: 52px;
    align-items: center;
  }

  .forum-feed-copy h2 {
    font-size: 18px;
  }

  .forum-feed-copy p,
  .forum-follow-button span,
  .forum-follow-button b {
    display: none;
  }

  .community-post-main h2 {
    font-size: 17px;
  }

  .post-action-bar span {
    display: none;
  }

  .messages-page,
  .everytime-profile-page {
    margin: 0;
    padding: 22px 16px 44px;
  }

  .message-page-head h1 {
    font-size: 29px;
  }

  .everytime-semester-summary {
    min-height: 96px;
    margin: 16px 18px 0;
    border-radius: 16px;
  }
}

@media (min-width: 761px) {
  .everytime-detail-tabs { border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
}

/* Campus-service detail pages
   These selectors intentionally target the current app.js markup. The former
   generic list rule treated <details> as a four-column row and collapsed every
   service page into unstyled browser content. */

.simple-breadcrumb {
  margin: 0 0 18px;
}

.simple-breadcrumb a {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 36px;
  color: var(--red);
  font-size: 13px;
  font-weight: 750;
  text-decoration: none;
}

.simple-breadcrumb svg {
  width: 18px;
  height: 18px;
}

.compact-page-head {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 20px;
  margin-bottom: 18px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}

.compact-page-head > div {
  min-width: 0;
}

.compact-page-head h1,
.compact-page-head p {
  margin: 0;
}

.compact-page-head h1 {
  font-size: clamp(30px, 4vw, 42px);
  line-height: 1.08;
  letter-spacing: -.045em;
}

.compact-page-head p {
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
}

.compact-page-icon,
.campus-info-card-icon {
  display: grid;
  place-items: center;
  color: var(--red);
  background: var(--red-soft);
}

.compact-page-icon {
  width: 54px;
  height: 54px;
  border-radius: 16px;
}

.compact-page-icon svg {
  width: 26px;
  height: 26px;
}

.compact-section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin: 0 0 10px;
}

.compact-section-head h2,
.compact-section-head p {
  margin: 0;
}

.compact-section-head h2 {
  font-size: 20px;
}

.compact-section-head > span {
  color: var(--muted);
  font-size: 12px;
}

#library-page-content,
#bus-page-content {
  display: grid;
  gap: 18px;
}

/* Library */

.library-heading-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 42px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  font-size: 12px;
  font-weight: 750;
  text-decoration: none;
}

.library-heading-link svg {
  width: 17px;
  height: 17px;
}

.library-reservation-overview {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px 18px;
  border: 1px solid #cfe7e2;
  border-radius: 16px;
  color: #25685e;
  background: #f3faf8;
}

.library-reservation-overview > span {
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 11px;
  background: #dff0ec;
}

.library-reservation-overview svg {
  width: 19px;
  height: 19px;
}

.library-reservation-overview strong,
.library-reservation-overview p {
  display: block;
  margin: 0;
}

.library-reservation-overview p {
  margin-top: 3px;
  color: #55756f;
  font-size: 12px;
}

.library-location-list,
.campus-info-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.library-location-card {
  min-width: 0;
  display: block;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
}

.library-location-card > summary {
  min-width: 0;
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) 150px 20px;
  align-items: center;
  gap: 15px;
  padding: 17px 18px;
  list-style: none;
  cursor: pointer;
}

.library-location-card > summary::-webkit-details-marker,
.bus-route-card > summary::-webkit-details-marker {
  display: none;
}

.library-location-card[open] > summary {
  background: #fffafa;
}

.campus-info-card-icon {
  width: 50px;
  height: 50px;
  border-radius: 14px;
}

.campus-info-card-icon svg {
  width: 24px;
  height: 24px;
}

.library-card-copy {
  min-width: 0;
}

.library-card-copy h2,
.library-card-copy p,
.library-card-copy small {
  margin: 0;
}

.library-card-copy h2 {
  overflow: hidden;
  font-size: 17px;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.library-card-copy p {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 3px;
  color: var(--red);
  font-size: 12px;
  font-weight: 750;
}

.library-card-copy p svg {
  width: 14px;
  height: 14px;
}

.library-card-copy small {
  display: -webkit-box;
  margin-top: 4px;
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.library-card-status {
  display: grid;
  justify-items: end;
  gap: 2px;
  text-align: right;
}

.library-card-status > span {
  color: var(--muted);
  font-size: 10px;
}

.library-card-status > strong {
  font-size: 13px;
}

.library-reservation-badge {
  margin-top: 3px;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 9px;
  font-style: normal;
  font-weight: 750;
  white-space: nowrap;
}

.library-reservation-badge.needs-booking {
  color: #895812;
  background: #fff0d5;
}

.library-reservation-badge.no-booking {
  color: #28705f;
  background: #e4f4ee;
}

.library-card-chevron {
  color: var(--faint);
  transition: transform .2s ease;
}

.library-card-chevron svg {
  width: 18px;
  height: 18px;
}

.library-location-card[open] .library-card-chevron {
  transform: rotate(90deg);
}

.library-card-details {
  padding: 0 18px 18px;
  border-top: 1px solid var(--line);
}

.library-detail-row {
  min-width: 0;
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 20px;
  align-items: start;
  padding: 17px 0;
  border-bottom: 1px solid var(--line);
}

.library-detail-row h3 {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.library-facility-tags,
.library-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.library-facility-tags span {
  padding: 5px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 10px;
}

.library-reservation-detail strong,
.library-reservation-detail p,
.library-reservation-detail small {
  display: block;
  margin: 0;
}

.library-reservation-detail strong {
  color: #28705f;
  font-size: 12px;
}

.library-reservation-detail p,
.library-reservation-detail small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
}

.library-card-actions {
  padding-top: 15px;
}

.library-action {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  font-size: 11px;
  font-weight: 750;
  text-decoration: none;
}

.library-action svg {
  width: 16px;
  height: 16px;
}

.library-action.is-primary {
  border-color: var(--red);
  color: #fff;
  background: var(--red);
}

.library-action.is-booking {
  border-color: #ebc98b;
  color: #83520b;
  background: #fff7e8;
}

/* Bus */

.bus-route-section {
  min-width: 0;
  display: grid;
  gap: 10px;
}

.bus-route-section + .bus-route-section {
  margin-top: 8px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.bus-section-note {
  margin: -2px 0 2px;
  color: var(--muted);
  font-size: 11px;
}

.bus-route-list {
  min-width: 0;
  display: grid;
  gap: 10px;
  background: transparent;
}

.bus-route-card {
  min-width: 0;
  min-height: 0;
  display: block;
  grid-template-columns: none;
  align-items: initial;
  gap: 0;
  overflow: hidden;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: #fff;
}

.bus-route-card > summary {
  min-width: 0;
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) 18px;
  align-items: center;
  gap: 13px;
  padding: 15px 17px;
  list-style: none;
  cursor: pointer;
}

.bus-route-card > summary > span:nth-child(2),
.bus-route-card > summary strong,
.bus-route-card > summary small {
  min-width: 0;
  display: block;
}

.bus-route-card > summary strong {
  overflow: hidden;
  font-size: 15px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bus-route-card > summary small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
}

.bus-route-card > summary > svg {
  width: 18px;
  height: 18px;
  color: var(--faint);
  transition: transform .2s ease;
}

.bus-route-card[open] > summary > svg {
  transform: rotate(90deg);
}

.bus-route-code {
  min-height: 42px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  color: #315b7e;
  background: #dbe8f4;
  font-size: 12px;
  font-weight: 850;
}

.route-cl-r .bus-route-code {
  color: #7a2541;
  background: #f5dce5;
}

.route-cr .bus-route-code {
  color: #285f58;
  background: #dcebe8;
}

.route-cwr .bus-route-code {
  color: #7d5123;
  background: #f7e5cf;
}

.route-public-179 .bus-route-code,
.route-public-199 .bus-route-code {
  color: #2f3f77;
  background: #e4e8f7;
}

.bus-route-content {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(250px, .85fr) minmax(0, 1.15fr);
  gap: 22px;
  padding: 18px;
  border-top: 1px solid var(--line);
  background: #fff;
}

.bus-route-content.is-public-bus {
  grid-template-columns: 1fr;
}

.bus-route-content.is-public-bus .bus-stop-list {
  grid-column: 1 / -1;
}

.bus-public-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 14px;
  border: 1px solid #d1e6e1;
  border-radius: 12px;
  color: #245f57;
  background: #f3faf8;
}

.bus-public-summary > span {
  display: flex;
  align-items: center;
  gap: 7px;
}

.bus-public-summary small,
.bus-public-summary em,
.bus-public-summary strong {
  display: block;
}

.bus-public-summary small {
  font-size: 11px;
  font-weight: 750;
}

.bus-public-summary em {
  padding: 3px 6px;
  border-radius: 999px;
  color: #4c756f;
  background: #e2f0ed;
  font-size: 9px;
  font-style: normal;
}

.bus-public-summary strong {
  font-size: 15px;
}

.bus-schedule-list {
  min-width: 0;
  display: grid;
  align-content: start;
  gap: 10px;
}

.bus-schedule-list article {
  min-width: 0;
  padding: 12px;
  border-radius: 12px;
  background: var(--soft);
}

.bus-schedule-list article > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.bus-schedule-list article > header strong,
.bus-schedule-list article > header em {
  display: block;
}

.bus-schedule-list article > header strong {
  font-size: 12px;
}

.bus-schedule-list article > header em {
  color: var(--red);
  font-size: 11px;
  font-style: normal;
  font-weight: 750;
  white-space: nowrap;
}

.bus-schedule-list article > div {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
}

.bus-schedule-list article span {
  min-width: 0;
  display: block;
  padding: 8px 9px;
  border-radius: 9px;
  background: #fff;
}

.bus-schedule-list article b,
.bus-schedule-list article small {
  display: block;
}

.bus-schedule-list article b {
  overflow: hidden;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bus-schedule-list article small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 10px;
}

.bus-stop-list {
  min-width: 0;
  counter-reset: bus-stop;
  margin: 0;
  padding: 0;
  list-style: none;
}

.bus-stop-list li {
  position: relative;
  min-width: 0;
  min-height: 43px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 10px;
  padding: 4px 0 9px 34px;
  counter-increment: bus-stop;
}

.bus-stop-list li::before {
  position: absolute;
  z-index: 1;
  left: 1px;
  top: 1px;
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border: 2px solid #fff;
  border-radius: 50%;
  color: #fff;
  background: var(--red);
  box-shadow: 0 0 0 1px #edc4c1;
  content: counter(bus-stop);
  font-size: 8px;
  font-weight: 800;
}

.bus-stop-list li:not(:last-child)::after {
  position: absolute;
  left: 13px;
  top: 25px;
  bottom: -1px;
  width: 1px;
  background: #ead9d8;
  content: "";
}

.bus-stop-list li > span,
.bus-stop-list li > span strong,
.bus-stop-list li > span em,
.bus-stop-list li > small,
.bus-stop-list li > small em {
  min-width: 0;
  display: block;
}

.bus-stop-name-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.bus-stop-list li > span strong {
  font-size: 12px;
}

.bus-stop-list li > span em {
  margin-top: 2px;
  color: var(--muted);
  font-size: 10px;
  font-style: normal;
}

.bus-stop-list li > small {
  color: var(--muted);
  font-size: 10px;
  text-align: right;
  white-space: nowrap;
}

.bus-stop-list li > small em {
  margin-top: 2px;
  font-size: 9px;
  font-style: normal;
}

.bus-campus-stop-badge {
  display: inline-flex;
  align-items: center;
  min-height: 17px;
  padding: 2px 6px;
  border-radius: 999px;
  color: #25675d;
  background: #dff1ed;
  font-size: 8px;
  font-style: normal;
  font-weight: 800;
}

.bus-stop-list li.is-campus-stop {
  margin-bottom: 2px;
  padding-top: 7px;
  padding-right: 10px;
  padding-bottom: 9px;
  border-radius: 10px;
  background: linear-gradient(90deg, #eef8f5, rgba(238, 248, 245, 0));
}

.bus-stop-list li.is-campus-stop::before {
  top: 4px;
  background: #2f7a6e;
  box-shadow: 0 0 0 1px #b9d9d3;
}

.bus-stop-list li.continues-campus::after {
  background: #87bfb6;
}

.bus-stop-list li.is-campus-stop strong {
  color: #245f57;
}

.campus-service-notice {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 13px 15px;
  border: 1px solid #efd8b7;
  border-radius: 13px;
  color: #755328;
  background: #fff9ed;
}

.campus-service-notice > svg {
  width: 18px;
  height: 18px;
  margin-top: 1px;
}

.campus-service-notice strong,
.campus-service-notice small {
  display: block;
}

.campus-service-notice strong {
  font-size: 12px;
}

.campus-service-notice small {
  margin-top: 2px;
  font-size: 10px;
}

.omnibus-card {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border: 1px solid #cfe2de;
  border-radius: 14px;
  background: #f4faf8;
}

.omnibus-card > span {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: #285f58;
  background: #dcebe8;
}

.omnibus-card > span svg {
  width: 21px;
  height: 21px;
}

.omnibus-card strong,
.omnibus-card small {
  display: block;
}

.omnibus-card strong {
  font-size: 12px;
}

.omnibus-card small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 10px;
}

.omnibus-card > div:last-child {
  display: flex;
  gap: 7px;
}

.omnibus-card a {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 0 9px;
  border: 1px solid #cfe2de;
  border-radius: 9px;
  background: #fff;
  color: #287267;
  font-size: 10px;
  font-weight: 750;
  text-decoration: none;
}

.omnibus-card a svg {
  width: 12px;
  height: 12px;
}

.campus-source-footer {
  margin-top: 2px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 10px;
}

.campus-source-footer p {
  margin: 0;
}

.campus-source-footer a {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--red);
  font-weight: 750;
  text-decoration: none;
}

.campus-source-footer svg {
  width: 12px;
  height: 12px;
}

/* Classroom explainer */

.classroom-simple-head {
  grid-template-columns: 1fr;
}

.classroom-simple-workspace {
  grid-template-columns: minmax(0, 1fr);
  margin-top: 0;
}

.classroom-start-card {
  min-height: 360px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 16px;
  padding: 36px;
  border: 1px solid var(--line);
  border-radius: 18px;
  text-align: center;
}

.classroom-start-card h2 {
  margin: 0;
  font-size: 22px;
}

.classroom-start-icon {
  width: 66px;
  height: 66px;
  display: grid;
  place-items: center;
  border-radius: 20px;
  color: #6b4ba0;
  background: #f0eafa;
}

.classroom-start-icon svg {
  width: 31px;
  height: 31px;
}

.classroom-primary-upload {
  min-width: min(360px, 100%);
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  padding: 16px 18px;
  border: 1px solid var(--red);
  border-radius: 14px;
  color: var(--red);
  background: #fff;
  text-align: left;
  cursor: pointer;
}

.classroom-primary-upload > svg {
  width: 25px;
  height: 25px;
}

.classroom-primary-upload strong,
.classroom-primary-upload small {
  display: block;
}

.classroom-primary-upload small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
}

.classroom-primary-upload input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
}

.classroom-privacy-line {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  color: var(--muted);
  font-size: 10px;
}

.classroom-privacy-line svg {
  width: 15px;
  height: 15px;
}

.classroom-output-panel {
  min-height: 480px;
  overflow: hidden;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 18px;
}

.classroom-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
}

.classroom-panel-head h2,
.classroom-panel-head span {
  display: block;
  margin: 0;
}

.classroom-panel-head h2 {
  font-size: 18px;
}

.classroom-panel-head span {
  color: var(--muted);
  font-size: 11px;
}

.classroom-output-actions {
  display: flex;
  gap: 5px;
}

.classroom-output-actions button {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: var(--soft);
}

.classroom-output-actions svg {
  width: 17px;
  height: 17px;
}

.classroom-progress {
  position: relative;
  height: 28px;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  background: var(--soft);
  text-align: center;
}

.classroom-progress i {
  position: absolute;
  inset: 0 auto 0 0;
  background: #ffe1df;
}

.classroom-progress span {
  position: relative;
  z-index: 1;
  font-size: 10px;
}

.classroom-error {
  padding: 12px 18px;
  color: var(--danger);
  background: #fff1f1;
  font-size: 11px;
}

.classroom-output-content {
  min-height: 390px;
  padding: 22px;
}

.classroom-output-empty {
  min-height: 340px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 9px;
  color: var(--muted);
  text-align: center;
}

.classroom-output-empty svg {
  width: 34px;
  height: 34px;
  color: #c79eba;
}

.classroom-output-empty strong {
  color: var(--ink);
  font-size: 17px;
}

.classroom-output-empty span {
  font-size: 11px;
}

/* Food directory and restaurant details */

.food-directory-head,
.venue-top,
.restaurant-top {
  min-width: 0;
  margin-bottom: 22px;
}

.food-directory-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  padding: 20px 22px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  box-shadow: var(--shadow-sm);
}

.food-directory-head h1,
.venue-top h1,
.restaurant-top h1 {
  margin: 0;
  font-size: clamp(30px, 4vw, 42px);
  line-height: 1.08;
}

.food-directory-head p:last-child {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.place-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 13px;
  background: transparent;
}

.place-entry {
  grid-template-columns: 68px minmax(0, 1fr) auto 20px;
  min-height: 98px;
  gap: 14px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow-sm);
}

.place-entry > svg {
  width: 20px;
  height: 20px;
  color: var(--faint);
}

.place-entry-image {
  width: 68px;
  height: 68px;
}

.place-entry-image svg {
  width: 29px;
  height: 29px;
}

.place-entry-title {
  display: flex;
  align-items: center;
  gap: 8px;
}

.place-entry-title h2 {
  min-width: 0;
  margin: 0;
  overflow: hidden;
  font-size: 16px;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.place-entry-title .badge {
  flex: 0 0 auto;
}

.place-entry-count {
  min-width: 56px;
  display: block;
  padding: 8px;
  border-radius: 12px;
  color: var(--muted);
  font-size: 11px;
  text-align: center;
  background: var(--soft);
}

.place-entry-count strong,
.place-entry-count span {
  display: block;
}

.place-entry-count strong {
  color: var(--ink);
  font-size: 17px;
}

.independent-entry {
  grid-template-columns: 68px minmax(0, 1fr) 20px;
}

.venue-top {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  padding: clamp(24px, 5vw, 42px);
  border: 1px solid #e7d9da;
  border-radius: 24px;
  background: linear-gradient(135deg, #fff, #f9edef);
}

.venue-top > div:first-child > p {
  margin: 8px 0 0;
  color: var(--muted);
}

.venue-top-info {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.venue-top-info span {
  min-width: 0;
  display: flex;
  align-items: flex-start;
  gap: 9px;
  color: var(--muted);
  font-size: 13px;
}

.venue-top-info svg {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  color: var(--red);
}

.restaurant-name-list {
  display: grid;
  border-top: 1px solid var(--line);
}

.restaurant-entry {
  min-width: 0;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto 18px;
  align-items: center;
  gap: 12px;
  min-height: 70px;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
  color: inherit;
  text-decoration: none;
}

.restaurant-entry-number {
  color: var(--red);
  font-size: 12px;
  font-weight: 800;
  text-align: center;
}

.restaurant-entry-number svg {
  width: 20px;
  height: 20px;
  margin: auto;
}

.restaurant-entry-main h2 {
  margin: 0;
  overflow: hidden;
  font-size: 14px;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.restaurant-entry-main p {
  margin: 4px 0 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.restaurant-entry-menu {
  color: var(--muted);
  font-size: 10px;
  text-align: right;
}

.restaurant-entry-menu strong,
.restaurant-entry-menu span {
  display: block;
}

.restaurant-entry > svg {
  width: 18px;
  height: 18px;
  max-width: 18px;
  overflow: hidden;
  color: var(--faint);
}

.restaurant-top-main,
.restaurant-top-heading {
  min-width: 0;
}

.restaurant-top {
  overflow: hidden;
  display: grid;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: #fff;
  box-shadow: var(--shadow-sm);
}

.restaurant-top-main {
  padding: clamp(22px, 4vw, 34px);
}

.restaurant-top-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.favorite-button {
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: #fff;
}

.favorite-button svg {
  width: 20px;
  height: 20px;
}

.restaurant-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 18px;
}

.restaurant-facts > span {
  min-width: 0;
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 2px 8px;
  padding: 12px;
  border-radius: 12px;
  background: var(--soft);
  color: var(--muted);
  font-size: 10px;
}

.restaurant-facts svg {
  grid-row: 1 / 3;
  width: 17px;
  height: 17px;
  color: var(--red);
}

.restaurant-facts strong {
  color: var(--ink);
  font-size: 11px;
}

.restaurant-top-note {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 10px;
}

.restaurant-top-note a {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--red);
  text-decoration: none;
}

.restaurant-top-note svg {
  width: 12px;
  height: 12px;
}

.menu-panel,
.simple-review-form,
.simple-review-card {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
}

.menu-full-width,
.full-menu-panel {
  width: 100%;
}

.load-more-wrap {
  padding: 18px;
  text-align: center;
}

.auth-inline-gate {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.auth-inline-gate h3,
.auth-inline-gate p {
  margin: 0;
}

.auth-inline-gate p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
}

.menu-panel-head,
.simple-review-form-head,
.simple-review-head,
.simple-form-submit {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.menu-panel-head {
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
}

.menu-panel-head h2,
.simple-review-form-head h3 {
  margin: 0;
}

.menu-panel-head p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
  text-align: right;
}

.category-tabs {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 12px 18px 0;
}

.category-tab {
  flex: 0 0 auto;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  background: var(--soft);
  font-size: 10px;
}

.menu-controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 170px;
  gap: 8px;
  padding: 12px 18px;
}

.toolbar-search {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 11px;
}

.toolbar-search svg {
  width: 17px;
  height: 17px;
}

.toolbar-search input {
  min-width: 0;
  flex: 1;
  border: 0;
  outline: 0;
}

.menu-list {
  display: grid;
}

.menu-item {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 16px;
  padding: 16px 18px;
  border-top: 1px solid var(--line);
}

.menu-item-main {
  min-width: 0;
  overflow-wrap: anywhere;
}

.simple-menu-item {
  cursor: pointer;
}

.menu-item-title,
.menu-item-description,
.menu-item-meta {
  margin: 0;
}

.menu-item-title {
  font-size: 14px;
}

.menu-item-description,
.menu-item-meta {
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
}

.menu-item-actions {
  display: grid;
  justify-items: end;
  gap: 7px;
}

.dish-rating,
.dish-review-button {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.dish-rating svg,
.dish-review-button svg {
  width: 14px;
  height: 14px;
}

.dish-review-button {
  min-height: 30px;
  padding: 0 9px;
  border-radius: 8px;
  color: var(--red);
  background: var(--red-soft);
  font-size: 9px;
}

.menu-item-price {
  text-align: right;
}

.original-price,
.current-price {
  display: block;
}

.original-price {
  color: var(--muted);
  font-size: 9px;
  text-decoration: line-through;
}

.current-price {
  font-size: 14px;
  font-weight: 800;
}

.simple-review-form {
  padding: 18px;
}

.simple-review-form-head {
  margin-bottom: 14px;
}

.simple-review-head,
.review-author,
.review-author-line {
  min-width: 0;
}

.simple-review-head,
.review-author-line {
  flex-wrap: wrap;
}

.review-author-line strong,
.review-dish-label {
  overflow-wrap: anywhere;
}

.review-target-select,
.review-dish-combobox {
  position: relative;
}

.review-dish-input-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #fff;
}

.review-dish-input-wrap svg {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  color: var(--muted);
}

.review-dish-input-wrap input {
  width: auto;
  min-height: 42px;
  min-width: 0;
  flex: 1;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  outline: 0;
}

.review-dish-input-wrap input:focus {
  border-color: transparent;
  box-shadow: none;
}

.review-dish-options {
  position: absolute;
  z-index: 10;
  top: calc(100% + 5px);
  left: 0;
  right: 0;
  max-height: 260px;
  overflow-y: auto;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #fff;
  box-shadow: var(--shadow-md);
}

.review-dish-option {
  width: 100%;
  min-height: 54px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 9px 12px;
  border: 0;
  border-bottom: 1px solid var(--line-light);
  border-radius: 0;
  color: var(--ink);
  background: #fff;
  text-align: left;
}

.review-dish-option:last-child {
  border-bottom: 0;
}

.review-dish-option:hover,
.review-dish-option.is-highlighted,
.review-dish-option.is-selected {
  background: var(--primary-soft);
}

.review-dish-option > span:first-child {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.review-dish-option strong,
.review-dish-option small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.review-dish-option small,
.review-dish-empty {
  color: var(--muted);
  font-size: 12px;
}

.review-dish-empty {
  padding: 16px 12px;
}

.review-target-status {
  margin: 7px 0 14px;
  color: var(--muted);
  font-size: 10px;
}

.star-input {
  display: flex;
  gap: 3px;
}

.star-button {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  color: #d8d8d8;
  background: transparent;
}

.star-button svg {
  width: 28px;
  height: 28px;
}

.star-button.is-active {
  color: var(--yellow);
}

.simple-review-form textarea {
  width: 100%;
  min-height: 130px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 11px;
  resize: vertical;
}

.simple-form-submit {
  margin-top: 12px;
}

.simple-form-submit > span {
  color: var(--muted);
  font-size: 10px;
}

.simple-review-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.simple-review-card {
  padding: 17px 18px;
}

.simple-review-card p {
  margin: 12px 0 0;
}

.review-author,
.review-author-line {
  display: flex;
  align-items: center;
  gap: 9px;
}

.review-rating {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--red);
  font-weight: 750;
}

.review-rating svg {
  width: 16px;
  height: 16px;
}

@media (max-width: 760px) {
  .campus-service-page,
  .classroom-page,
  .food-home-page,
  .venue-page,
  .restaurant-page {
    width: auto;
    max-width: none;
    margin: 0 18px;
  }

  .simple-breadcrumb {
    margin-bottom: 8px;
  }

  .compact-page-head {
    gap: 12px;
    padding-bottom: 16px;
  }

  .compact-page-head h1 {
    font-size: 29px;
  }

  .compact-page-head p {
    font-size: 11px;
  }

  .compact-page-icon {
    width: 46px;
    height: 46px;
    border-radius: 14px;
  }

  .library-heading-link span {
    font-size: 0;
  }

  .library-heading-link {
    width: 42px;
    min-height: 42px;
    padding: 0;
  }

  .library-location-card > summary {
    grid-template-columns: 44px minmax(0, 1fr) 18px;
    gap: 11px;
    padding: 14px;
  }

  .campus-info-card-icon {
    width: 44px;
    height: 44px;
  }

  .library-card-status {
    grid-column: 2;
    justify-items: start;
    margin-top: 5px;
    text-align: left;
  }

  .library-card-status > span {
    display: none;
  }

  .library-card-chevron {
    grid-column: 3;
    grid-row: 1 / span 2;
  }

  .library-card-details {
    padding: 0 14px 14px;
  }

  .library-detail-row {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .bus-route-card > summary {
    grid-template-columns: 44px minmax(0, 1fr) 16px;
    gap: 10px;
    padding: 13px 14px;
  }

  .bus-route-code {
    min-height: 38px;
    font-size: 10px;
  }

  .bus-route-card > summary strong {
    font-size: 13px;
  }

  .bus-route-content {
    grid-template-columns: 1fr;
    gap: 18px;
    padding: 14px;
  }

  .bus-schedule-list article > div {
    grid-template-columns: 1fr;
  }

  .bus-stop-list li {
    grid-template-columns: minmax(0, 1fr);
  }

  .bus-stop-list li > small {
    margin-top: 1px;
    text-align: left;
    white-space: normal;
  }

  .bus-stop-list li > small em {
    display: inline;
    margin-left: 5px;
  }

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

  .omnibus-card > div:last-child {
    grid-column: 1 / -1;
  }

  .classroom-start-card {
    min-height: 300px;
    padding: 26px 18px;
  }

  .classroom-primary-upload {
    min-width: 0;
    width: 100%;
  }

  .classroom-panel-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .classroom-output-content {
    padding: 18px;
  }

  .restaurant-entry {
    grid-template-columns: 28px minmax(0, 1fr) 16px;
  }

  .restaurant-entry-menu {
    display: none;
  }

  .restaurant-facts {
    grid-template-columns: 1fr;
  }

  .venue-top-info {
    grid-template-columns: 1fr;
  }

  .menu-item {
    grid-template-columns: minmax(0, 1fr);
  }

  .menu-panel-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .menu-panel-head p {
    text-align: left;
  }

  .menu-controls {
    grid-template-columns: 1fr;
  }

  .menu-item-main,
  .menu-item-actions,
  .menu-item-price {
    grid-column: 1;
  }

  .menu-item-actions {
    grid-row: 3;
    justify-items: start;
  }

  .menu-item-price {
    grid-row: 2;
    text-align: left;
  }

  .simple-review-form-head,
  .simple-form-submit {
    align-items: stretch;
    flex-direction: column;
  }

  .auth-inline-gate {
    align-items: stretch;
    flex-direction: column;
  }
}

/* Apple campus UI ---------------------------------------------------------
   Consolidated visual contract. Structural selectors above keep the existing
   application behaviour; this layer supplies the product-wide visual system. */

:where(
  .home-schedule-card,
  .home-post-list,
  .everytime-timetable-card,
  .everytime-semester-summary,
  .community-post-card,
  .post-detail-card,
  .message-login-state,
  .settings-profile-card,
  .account-status-card,
  .privacy-setting-card,
  .library-location-card,
  .bus-route-card,
  .food-directory-head,
  .place-entry,
  .venue-top,
  .restaurant-top,
  .menu-panel,
  .simple-review-form,
  .simple-review-card,
  .classroom-start-card,
  .classroom-output-panel,
  .course-review-card,
  .official-exam-card
) {
  border-color: var(--line-light);
  background: var(--card-bg);
  box-shadow: var(--shadow-sm);
}

:where(
  .home-schedule-card,
  .campus-service-card,
  .home-post-row,
  .community-post-card,
  .library-location-card,
  .bus-route-card,
  .place-entry,
  .restaurant-entry,
  .simple-review-card
) {
  transition: border-color var(--motion), background var(--motion), box-shadow var(--motion), transform var(--motion);
}

@media (hover: hover) {
  :where(
    .home-schedule-card,
    .campus-service-card,
    .home-post-row,
    .community-post-card,
    .library-location-card,
    .bus-route-card,
    .place-entry,
    .simple-review-card
  ):hover {
    border-color: #d8d8dc;
    box-shadow: var(--shadow-hover);
    transform: translateY(-1px);
  }
}

/* Home */

.campus-home-page {
  width: min(1000px, calc(100% - 40px));
}

.everytime-home-summary {
  grid-template-columns: minmax(0, 1fr) minmax(320px, .82fr);
  gap: 24px;
}

.everytime-home-greeting {
  min-height: 156px;
  display: grid;
  align-content: center;
  padding: 24px 4px;
}

.everytime-home-greeting h1 {
  font-size: clamp(36px, 5vw, 46px);
  line-height: 1.08;
  font-weight: 700;
  letter-spacing: -.045em;
}

.home-schedule-card {
  min-height: 156px;
  align-items: center;
  padding: 24px;
  border-radius: var(--radius-large);
}

.home-schedule-card strong {
  font-size: 20px;
  font-weight: 600;
}

.home-panel {
  margin-top: 32px;
}

.home-panel-head {
  margin-bottom: 14px;
}

.home-panel-head h2 {
  font-size: 24px;
  font-weight: 600;
}

.home-panel-head a {
  color: var(--primary);
  font-weight: 500;
}

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

.campus-service-card {
  min-height: 132px;
  justify-content: center;
  padding: 18px 10px;
  border: 1px solid var(--line-light);
  border-radius: var(--radius);
  background: #fff;
}

.campus-service-icon,
.campus-service-card.is-bus .campus-service-icon,
.campus-service-card.is-food .campus-service-icon,
.campus-service-card.is-classroom .campus-service-icon {
  width: 52px;
  height: 52px;
  border-radius: 15px;
  color: var(--primary);
  background: var(--primary-soft);
}

.campus-service-card strong {
  font-weight: 600;
}

.home-promo-strip {
  min-height: 204px;
  margin-top: 28px;
  padding: 32px 38px;
  border: 1px solid #ffd5c5;
  border-radius: var(--radius-large);
  background: linear-gradient(135deg, #fffaf8 0%, #fff3ee 58%, #ffebe3 100%);
  box-shadow: var(--shadow-sm);
}

.home-promo-label,
.home-promo-copy a {
  color: var(--primary);
  font-weight: 600;
}

.home-promo-copy strong {
  font-size: clamp(23px, 3vw, 30px);
  font-weight: 600;
}

.home-promo-copy small {
  color: var(--muted);
}

.home-promo-stage {
  width: 140px;
  height: 140px;
  border-radius: 34px;
  color: var(--primary);
  background: rgba(255, 255, 255, .72);
  box-shadow: inset 0 0 0 1px rgba(255, 69, 0, .1);
  transform: translateY(-50%);
}

.home-post-list {
  border-radius: var(--radius);
  background: #fff;
}

.home-post-row {
  min-height: 70px;
  padding: 14px 18px;
}

/* Timetable and course */

.course-hub-page,
.everytime-course-page,
.everytime-course-detail {
  width: min(1080px, calc(100% - 40px));
}

.everytime-page-head {
  align-items: center;
  margin-bottom: 22px;
}

.everytime-page-head h1 {
  font-size: clamp(30px, 4vw, 36px);
  line-height: 1.12;
  font-weight: 700;
  letter-spacing: -.035em;
}

.everytime-semester,
.everytime-semester-button {
  color: var(--muted);
  font-weight: 500;
}

.everytime-icon-action {
  min-width: 44px;
  min-height: 44px;
  border-radius: 12px;
  transition: background var(--motion), color var(--motion);
}

.everytime-icon-action:hover {
  color: var(--primary);
  background: var(--primary-soft);
}

.everytime-icon-action svg {
  width: 24px;
  height: 24px;
}

.everytime-timetable-card {
  border-radius: var(--radius);
}

.everytime-timetable-scroll {
  scrollbar-color: #c7c7cc transparent;
  scrollbar-width: thin;
}

.everytime-timetable-scroll::-webkit-scrollbar {
  display: block;
  height: 5px;
}

.everytime-timetable-scroll::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: #c7c7cc;
}

.everytime-week-grid {
  min-width: 760px;
}

.everytime-day-label.is-today {
  color: var(--primary);
  font-weight: 600;
}

.everytime-grid-cell.is-today {
  background: #fff8f5;
}

.everytime-course-block {
  min-width: 0;
  border-radius: 5px;
  background: #4f8fd7;
}

.everytime-course-block strong {
  font-size: 12px;
  font-weight: 600;
}

.everytime-course-block span,
.everytime-course-block small {
  font-size: 10px;
}

.everytime-empty-hint {
  border: 1px solid var(--line-light);
  border-radius: var(--radius);
  box-shadow: var(--shadow-float);
}

.everytime-semester-summary {
  border-radius: var(--radius);
}

.course-detail-page,
.everytime-course-detail {
  color: var(--ink);
}

.course-review-card,
.official-exam-card,
.course-review-empty {
  border-radius: var(--radius);
}

.course-review-choice-group button.is-active,
.course-review-identity input:checked + span {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-soft);
}

/* Community */

.community-page,
.community-post-page {
  max-width: 1040px;
}

.community-head {
  padding: 4px 0 20px;
}

.community-head h1,
.message-page-head h1 {
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -.035em;
}

.community-layout,
.community-forum-layout {
  grid-template-columns: 220px minmax(0, 760px);
  gap: 24px;
  justify-content: center;
}

.forum-sidebar {
  top: calc(var(--header-height) + 20px);
  gap: 10px;
}

.forum-sidebar nav,
.forum-sidebar section {
  overflow: hidden;
  padding: 8px;
  border: 1px solid var(--line-light);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow-sm);
}

.forum-sidebar a {
  min-height: 48px;
  border-radius: 12px;
}

.forum-sidebar a:hover,
.forum-sidebar a.is-active {
  color: var(--primary);
  background: var(--primary-soft);
}

.forum-sidebar a > span {
  color: var(--primary);
  background: var(--primary-soft);
}

.forum-create-button {
  color: var(--primary);
  font-weight: 600;
  background: #fff;
}

.community-feed-column,
.community-feed {
  min-width: 0;
  background: transparent;
}

.forum-feed-header {
  margin-bottom: 12px;
  border-bottom: 0;
}

.community-post-card,
.post-card {
  margin-bottom: 14px;
  padding: 18px 20px;
  border: 1px solid var(--line-light);
  border-radius: var(--radius);
  background: #fff;
}

.post-card:last-child,
.community-post-card:last-child {
  border-bottom: 1px solid var(--line-light);
}

.post-card-head .avatar,
.post-author-avatar {
  color: var(--primary);
  background: var(--primary-soft);
  font-weight: 600;
}

.post-forum-label,
.post-floor-number {
  color: var(--primary);
  background: var(--primary-soft);
  font-weight: 500;
}

.community-post-main h2,
.post-card h2,
.post-card h3 {
  font-size: 18px;
  font-weight: 600;
}

.community-post-main p,
.post-card p {
  color: var(--text);
  font-size: 15px;
  line-height: 1.7;
}

.post-action-bar > a,
.post-action-bar > button {
  width: 100%;
  min-height: 48px;
  border-radius: 10px;
  transition: color var(--motion), background var(--motion);
}

.post-action-bar > a:hover,
.post-action-bar > button:hover {
  color: var(--primary);
  background: var(--primary-soft);
}

/* Messages and profile */

.messages-page,
.everytime-profile-page,
.settings-page,
.chat-page {
  max-width: var(--reading-width);
}

.message-page-head {
  padding-bottom: 16px;
}

.messages-page .empty-state,
.message-login-state {
  min-height: 320px;
  margin-top: 14px;
  border: 1px solid var(--line-light);
  border-radius: var(--radius);
  background: #fff;
}

.everytime-profile-head {
  padding: 20px;
  border: 1px solid var(--line-light);
  border-radius: var(--radius-large);
  background: #fff;
  box-shadow: var(--shadow-sm);
}

.profile-social-avatar {
  color: var(--primary);
  background: var(--primary-soft);
  font-weight: 600;
}

.profile-social-copy h1 {
  font-weight: 700;
  letter-spacing: -.025em;
}

.everytime-profile-stats {
  margin-top: 14px;
  overflow: hidden;
  border: 1px solid var(--line-light);
  border-radius: var(--radius);
  background: #fff;
}

/* Campus services */

.campus-service-page,
.classroom-page,
.food-home-page,
.venue-page,
.restaurant-page {
  width: min(1000px, calc(100% - 40px));
  max-width: 1000px;
}

.compact-page-head {
  margin-bottom: 22px;
}

.compact-page-head h1,
.food-directory-head h1,
.venue-top h1,
.restaurant-top h1 {
  font-size: clamp(30px, 4vw, 36px);
  font-weight: 700;
  letter-spacing: -.035em;
}

.compact-page-icon,
.compact-page-icon.is-bus,
.campus-info-card-icon,
.library-entry-icon,
.library-icon,
.bus-route-icon,
.place-entry-image {
  color: var(--primary);
  background: var(--primary-soft);
}

.library-reservation-overview,
.bus-public-summary,
.omnibus-card {
  border-color: #ffd5c5;
  color: #a52d00;
  background: #fff8f5;
}

.library-location-card,
.bus-route-card {
  border-radius: var(--radius);
}

.library-location-card[open] > summary,
.bus-route-card[open] > summary {
  background: #fff8f5;
}

.library-card-copy p,
.library-action.is-primary,
.campus-source-footer a {
  color: var(--primary);
}

.library-action.is-primary {
  border-color: var(--primary);
  color: #fff;
  background: var(--primary);
}

.library-reservation-badge.needs-booking {
  color: #9a5d00;
  background: #fff5e5;
}

.library-reservation-badge.no-booking {
  color: #168446;
  background: #ebf9f0;
}

.bus-route-code,
.route-cl-r .bus-route-code,
.route-cr .bus-route-code,
.route-cwr .bus-route-code,
.route-public-179 .bus-route-code,
.route-public-199 .bus-route-code {
  color: var(--primary);
  background: var(--primary-soft);
}

.bus-stop-list li::before {
  background: var(--primary);
  box-shadow: 0 0 0 1px #ffc0a8;
}

.bus-stop-list li:not(:last-child)::after {
  background: #ffd8c9;
}

.bus-campus-stop-badge {
  color: #168446;
  background: #ebf9f0;
}

.bus-stop-list li.is-campus-stop {
  background: linear-gradient(90deg, #eef9f2, rgba(238, 249, 242, 0));
}

.bus-stop-list li.is-campus-stop::before {
  background: #34a853;
  box-shadow: 0 0 0 1px #b9dfc4;
}

.bus-stop-list li.is-campus-stop strong {
  color: #176b35;
}

.food-directory-head,
.venue-top,
.restaurant-top {
  border-radius: var(--radius-large);
}

.food-directory-head {
  padding: 24px;
}

.place-list {
  gap: 14px;
}

.place-entry {
  min-width: 0;
  display: grid;
  grid-template-columns: 68px minmax(0, 1fr) auto 20px;
  align-items: center;
  color: inherit;
  background: #fff;
  text-decoration: none;
  min-height: 102px;
  border-radius: var(--radius);
}

.place-entry-image {
  display: grid;
  place-items: center;
  overflow: hidden;
}

.place-entry-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.place-entry-copy {
  min-width: 0;
}

.place-entry-copy h2 {
  margin: 0;
}

.place-entry-copy p,
.place-entry-copy span {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 11px;
}

.venue-top {
  border-color: #ffd5c5;
  background: linear-gradient(135deg, #fff, #fff8f5);
}

.restaurant-facts > span,
.category-tab,
.dish-review-button {
  background: var(--secondary-bg);
}

.category-tab.is-active,
.dish-review-button:hover {
  color: var(--primary);
  background: var(--primary-soft);
}

.category-tab.is-active {
  box-shadow: inset 0 0 0 1px rgba(255, 69, 0, .18);
}

.classroom-start-icon,
.classroom-output-empty svg {
  color: var(--primary);
  background: var(--primary-soft);
}

.classroom-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
  margin-top: 22px;
}

.classroom-primary-upload {
  border-color: var(--primary);
  color: var(--primary);
}

.classroom-progress i {
  background: #ffd8c9;
}

/* Small screens */

@media (min-width: 761px) and (max-width: 900px) {
  .restaurant-facts,
  .menu-controls {
    grid-template-columns: minmax(0, 1fr);
  }

  .menu-item {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .menu-item-main {
    grid-column: 1;
  }

  .menu-item-price {
    grid-column: 2;
    grid-row: 1;
    text-align: right;
  }

  .menu-item-actions {
    grid-column: 1 / -1;
    grid-row: 2;
    justify-items: start;
  }
}

@media (max-width: 760px) {
  body {
    font-size: 15px;
  }

  .page,
  .page-narrow,
  .campus-home-page,
  .course-hub-page,
  .everytime-course-page,
  .everytime-course-detail,
  .campus-service-page,
  .classroom-page,
  .food-home-page,
  .venue-page,
  .restaurant-page {
    width: auto;
    max-width: none;
    margin-left: 16px;
    margin-right: 16px;
    padding-top: 24px;
  }

  .everytime-home-summary {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .everytime-home-greeting {
    min-height: 0;
    padding: 6px 0 12px;
  }

  .everytime-home-greeting h1 {
    font-size: 34px;
  }

  .home-schedule-card {
    min-height: 118px;
    padding: 20px;
  }

  .campus-service-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .campus-service-card {
    min-height: 118px;
  }

  .home-promo-strip {
    min-height: 210px;
    align-items: flex-start;
    padding: 24px;
  }

  .home-promo-copy {
    max-width: calc(100% - 68px);
  }

  .home-promo-stage {
    right: 18px;
    top: auto;
    bottom: 18px;
    width: 72px;
    height: 72px;
    border-radius: 22px;
    transform: none;
  }

  .home-promo-stage span,
  .home-promo-stage b {
    font-size: 10px;
  }

  .everytime-page-head h1,
  .community-head h1,
  .message-page-head h1 {
    font-size: 30px;
  }

  .everytime-course-page .everytime-page-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    padding: 0 16px 16px;
  }

  .everytime-course-page .everytime-head-actions {
    gap: 0;
  }

  .everytime-course-page .everytime-icon-action {
    width: 40px;
    min-width: 40px;
    min-height: 40px;
    padding: 0;
  }

  .everytime-course-page .everytime-semester-button {
    min-width: 0;
    max-width: 100%;
  }

  .everytime-course-page .everytime-semester-button span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .everytime-week-grid {
    width: 100%;
    min-width: 0;
    grid-template-columns: 32px repeat(5, minmax(0, 1fr));
  }

  .everytime-course-block strong {
    font-size: 9px;
  }

  .everytime-course-block span,
  .everytime-course-block small {
    font-size: 8px;
  }

  .community-page,
  .community-post-page {
    margin-left: 0;
    margin-right: 0;
    padding-left: 16px;
    padding-right: 16px;
  }

  .forum-sidebar {
    margin-left: -16px;
    margin-right: -16px;
    padding-left: 16px;
    padding-right: 16px;
  }

  .forum-sidebar nav,
  .forum-sidebar section {
    overflow: visible;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
  }

  .forum-sidebar section:not(:has(a)) {
    display: none;
  }

  .community-post-card,
  .post-card {
    padding: 17px 16px;
  }

  .post-action-bar span {
    display: inline;
  }

  .compact-page-head h1,
  .food-directory-head h1,
  .venue-top h1,
  .restaurant-top h1 {
    font-size: 30px;
  }

  .library-location-card > summary {
    grid-template-columns: 44px minmax(0, 1fr) 18px;
  }

  .place-list {
    grid-template-columns: 1fr;
  }

  .food-directory-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 14px;
  }

  .food-directory-head .button {
    width: 100%;
  }

  .place-entry {
    grid-template-columns: 48px minmax(0, 1fr) 16px;
    min-height: 82px;
    padding: 11px;
  }

  .place-entry-image {
    width: 48px;
    height: 48px;
  }

  .place-entry-count {
    display: none;
  }
}

@media (max-width: 360px) {
  .everytime-course-page .everytime-page-head {
    padding-left: 12px;
    padding-right: 12px;
  }

  .everytime-course-page .everytime-icon-action {
    width: 36px;
    min-width: 36px;
    min-height: 36px;
  }

  .everytime-course-page .everytime-semester-button {
    max-width: 96px;
    font-size: 11px;
  }
}

/* Messages: compact social inbox and chat */

.messages-page {
  width: min(760px, calc(100% - 40px));
  max-width: 760px;
  padding-top: 32px;
}

.message-page-head {
  min-height: 64px;
  align-items: center;
  padding: 0 0 14px;
}

.message-page-head h1 {
  font-size: 24px;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -.025em;
}

.message-page-head p {
  margin-top: 2px;
  font-size: 13px;
  line-height: 1.4;
}

.message-page-actions {
  display: flex;
  align-items: center;
  gap: 2px;
}

.message-head-button,
.chat-header-button {
  width: 42px;
  height: 42px;
  display: grid;
  flex: 0 0 42px;
  place-items: center;
  padding: 0;
  border-radius: 50%;
  color: var(--ink);
  background: transparent;
  cursor: pointer;
  transition: color var(--motion), background var(--motion);
}

.message-head-button:hover,
.message-head-button:focus-visible,
.chat-header-button:hover,
.chat-header-button:focus-visible {
  color: var(--primary);
  background: var(--primary-soft);
}

.message-head-button .ui-icon,
.chat-header-button .ui-icon {
  width: 23px;
  height: 23px;
  flex-basis: 23px;
}

.conversation-groups {
  margin-top: 8px;
}

.conversation-loading,
.message-search-empty,
.chat-search-hint {
  margin: 0;
  padding: 28px 0;
  color: var(--muted);
  text-align: center;
}

.message-conversation-list {
  display: grid;
  border-top: 1px solid var(--line);
}

.message-conversation-row {
  min-width: 0;
  min-height: 74px;
  display: grid;
  grid-template-columns: 50px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  padding: 10px 2px;
  border-bottom: 1px solid var(--line);
  color: inherit;
  background: transparent;
  text-decoration: none;
  transition: background var(--motion);
}

.message-conversation-row:hover,
.message-conversation-row:focus-visible {
  background: rgba(255, 255, 255, .6);
  outline: 0;
}

.message-conversation-row.is-pinned {
  background: rgba(255, 255, 255, .45);
}

.message-conversation-row.is-muted .message-conversation-preview p {
  color: var(--faint);
}

.message-conversation-row > .avatar,
.message-conversation-row > .group-avatar {
  width: 50px;
  height: 50px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 50%;
  color: var(--primary);
  background: var(--primary-soft);
  font-size: 15px;
  font-weight: 700;
}

.message-conversation-row.is-group > .avatar {
  color: #5e5ce6;
  background: #efefff;
}

.message-conversation-row > .avatar .ui-icon {
  width: 24px;
  height: 24px;
}

.message-conversation-main {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.message-conversation-heading,
.message-conversation-preview {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.message-conversation-heading strong {
  overflow: hidden;
  color: var(--ink);
  font-size: 16px;
  font-weight: 600;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.message-conversation-heading time {
  flex: 0 0 auto;
  color: var(--faint);
  font-size: 12px;
  font-weight: 400;
  white-space: nowrap;
}

.message-conversation-preview p {
  min-width: 0;
  overflow: hidden;
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.message-conversation-status {
  min-width: 18px;
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: flex-end;
  gap: 5px;
  color: var(--faint);
}

.message-conversation-status .ui-icon {
  width: 14px;
  height: 14px;
  flex-basis: 14px;
}

.message-unread-count {
  min-width: 18px;
  height: 18px;
  display: inline-grid;
  place-items: center;
  padding: 0 5px;
  border-radius: 9px;
  color: #fff;
  background: var(--danger);
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
}

.message-conversation-row.is-invited {
  grid-template-columns: 50px minmax(0, 1fr);
}

.group-invite-actions {
  grid-column: 2;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 2px;
}

.group-invite-actions button {
  min-height: 32px;
  padding: 0 12px;
  border-radius: 8px;
  color: var(--muted);
  background: var(--secondary-bg);
  cursor: pointer;
}

.group-invite-actions button:last-child {
  color: #fff;
  background: var(--primary);
}

.message-search-sheet,
.chat-search-sheet,
.conversation-report-form {
  display: grid;
  gap: 16px;
}

.message-search-field {
  min-height: 44px;
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--page-bg);
}

.message-search-field:focus-within {
  border-color: rgba(255, 69, 0, .45);
  box-shadow: 0 0 0 3px rgba(255, 69, 0, .1);
  background: #fff;
}

.message-search-field .ui-icon {
  width: 19px;
  height: 19px;
  color: var(--faint);
}

.message-search-field input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  font-size: 15px;
}

.message-search-results,
.chat-search-results {
  display: grid;
}

.chat-search-results button,
.chat-search-results article {
  min-width: 0;
  display: grid;
  gap: 3px;
  padding: 13px 2px;
  border-bottom: 1px solid var(--line);
  background: transparent;
  text-align: left;
}

.chat-search-results span {
  color: var(--faint);
  font-size: 11px;
}

.chat-search-results strong {
  overflow: hidden;
  font-size: 14px;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-route-page {
  width: min(760px, 100%);
  max-width: 760px;
  height: calc(100dvh - var(--header-height) - var(--nav-height));
  min-height: 520px;
  padding: 0;
}

#chat-root,
#group-chat-root,
.chat-page {
  width: 100%;
  height: 100%;
  min-height: 0;
}

.chat-page {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-large);
  background: #f4f4f6;
  box-shadow: var(--shadow-sm);
}

.chat-page.group-chat-page {
  grid-template-rows: auto minmax(0, 1fr) auto;
}

.chat-header {
  position: relative;
  z-index: 2;
  min-height: 64px;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) 42px;
  align-items: center;
  gap: 6px;
  padding: 7px 10px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, .94);
  backdrop-filter: saturate(180%) blur(18px);
  -webkit-backdrop-filter: saturate(180%) blur(18px);
}

.chat-header-identity {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 0;
  background: transparent;
  cursor: pointer;
}

.chat-header-identity > .avatar {
  width: 36px;
  height: 36px;
  display: grid;
  flex: 0 0 36px;
  place-items: center;
  overflow: hidden;
  border-radius: 50%;
  color: var(--primary);
  background: var(--primary-soft);
  font-size: 12px;
  font-weight: 700;
}

.chat-header-identity > .avatar .ui-icon {
  width: 19px;
  height: 19px;
}

.chat-header-identity > span:last-child {
  min-width: 0;
  display: grid;
  justify-items: start;
}

.chat-header-identity strong,
.chat-header-identity small {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-header-identity strong {
  font-size: 16px;
  font-weight: 600;
  line-height: 1.35;
}

.chat-header-identity small {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

.chat-blocked-note {
  margin: 10px 12px 0;
  padding: 10px 12px;
  font-size: 12px;
}

.chat-messages {
  min-width: 0;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 18px 14px;
  overscroll-behavior: contain;
  scrollbar-width: thin;
}

.chat-message-row {
  min-width: 0;
  display: flex;
  align-items: flex-end;
  justify-content: flex-start;
  gap: 8px;
}

.chat-message-row.is-mine {
  justify-content: flex-end;
}

.chat-message-avatar {
  width: 34px;
  height: 34px;
  display: grid;
  flex: 0 0 34px;
  place-items: center;
  overflow: hidden;
  border-radius: 50%;
  color: var(--primary);
  background: var(--primary-soft);
  font-size: 11px;
  font-weight: 700;
}

.chat-bubble {
  max-width: min(76%, 520px);
  min-width: 0;
  padding: 9px 12px;
  border-radius: 16px 16px 16px 5px;
  color: var(--ink);
  background: #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .04);
  line-height: 1.5;
}

.chat-message-row.is-mine .chat-bubble {
  border-radius: 16px 16px 5px 16px;
  color: #fff;
  background: var(--primary);
}

.chat-bubble p {
  overflow-wrap: anywhere;
  margin: 0;
  font-size: 15px;
  white-space: pre-wrap;
}

.chat-message-meta {
  display: block;
  margin-bottom: 3px;
  color: var(--faint);
  font-size: 10px;
  line-height: 1.35;
}

.chat-message-row.is-mine .chat-message-meta {
  color: rgba(255, 255, 255, .76);
}

.chat-empty-state {
  min-height: 100%;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 4px;
  color: var(--muted);
  text-align: center;
}

.chat-empty-state strong {
  color: var(--ink);
  font-size: 17px;
  font-weight: 600;
}

.chat-empty-state span {
  font-size: 13px;
}

.chat-composer {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 44px;
  align-items: end;
  gap: 8px;
  padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, .96);
  backdrop-filter: saturate(180%) blur(18px);
  -webkit-backdrop-filter: saturate(180%) blur(18px);
}

.chat-composer textarea {
  width: 100%;
  min-height: 44px;
  max-height: 112px;
  padding: 10px 13px;
  resize: none;
  border: 1px solid var(--line);
  border-radius: 14px;
  outline: 0;
  background: var(--page-bg);
  font-size: 15px;
  line-height: 1.45;
}

.chat-composer textarea:focus {
  border-color: rgba(255, 69, 0, .45);
  background: #fff;
}

.chat-composer > button {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  padding: 0;
  border-radius: 50%;
  color: #fff;
  background: var(--primary);
  cursor: pointer;
}

.chat-composer > button:disabled {
  opacity: .45;
  cursor: wait;
}

.chat-composer > button .ui-icon {
  width: 20px;
  height: 20px;
}

.timetable-share-card {
  width: min(78%, 360px);
  color: var(--ink) !important;
  background: #fff !important;
}

.timetable-share-card-body {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
}

.timetable-share-card-icon {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  color: var(--primary);
  background: var(--primary-soft);
}

.timetable-share-card-icon .ui-icon {
  width: 20px;
  height: 20px;
}

.timetable-share-card-body > div {
  min-width: 0;
  display: grid;
}

.timetable-share-card-body small {
  color: var(--muted);
  font-size: 11px;
}

.timetable-share-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 10px;
}

.expired-chat {
  height: 100%;
  display: grid;
  place-items: center;
}

.chat-info-modal .modal-body,
.group-info-modal .modal-body {
  background: var(--page-bg);
}

.chat-info-sheet,
.group-info-sheet {
  display: grid;
  gap: 12px;
}

.chat-info-profile,
.chat-info-section,
.group-member-grid {
  overflow: hidden;
  border: 1px solid var(--line-light);
  border-radius: 15px;
  background: #fff;
}

.chat-info-profile {
  min-height: 78px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
}

.chat-info-profile > .avatar {
  width: 50px;
  height: 50px;
  display: grid;
  flex: 0 0 50px;
  place-items: center;
  border-radius: 50%;
  color: var(--primary);
  background: var(--primary-soft);
  font-size: 14px;
  font-weight: 700;
}

.chat-info-profile > .avatar .ui-icon {
  width: 24px;
  height: 24px;
}

.chat-info-profile > div {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.chat-info-profile strong {
  overflow: hidden;
  font-size: 17px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-info-profile small {
  color: var(--muted);
  font-size: 12px;
}

.chat-info-toggle,
.chat-info-action {
  width: 100%;
  min-height: 54px;
  display: grid;
  align-items: center;
  padding: 0 14px;
  border-bottom: 1px solid var(--line);
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.chat-info-toggle:last-child,
.chat-info-action:last-child {
  border-bottom: 0;
}

.chat-info-toggle {
  grid-template-columns: minmax(0, 1fr) 46px;
}

.chat-info-toggle > span {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 11px;
}

.chat-info-toggle .ui-icon,
.chat-info-action-icon .ui-icon {
  width: 20px;
  height: 20px;
  flex-basis: 20px;
  color: var(--muted);
}

.chat-info-toggle strong,
.chat-info-action strong {
  font-size: 15px;
  font-weight: 500;
}

.chat-info-toggle > i {
  position: relative;
  width: 44px;
  height: 26px;
  justify-self: end;
  border-radius: 13px;
  background: #c7c7cc;
  transition: background var(--motion);
}

.chat-info-toggle > i::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .2);
  transition: transform var(--motion);
}

.chat-info-toggle[data-enabled="true"] > i {
  background: var(--primary);
}

.chat-info-toggle[data-enabled="true"] > i::after {
  transform: translateX(18px);
}

.chat-info-action {
  grid-template-columns: 24px minmax(0, 1fr) 18px;
  gap: 10px;
}

.chat-info-action > span:nth-child(2) {
  min-width: 0;
  display: grid;
}

.chat-info-action small {
  color: var(--muted);
  font-size: 11px;
}

.chat-info-action > .ui-icon:last-child {
  width: 17px;
  height: 17px;
  color: var(--faint);
}

.chat-info-action.is-danger,
.chat-info-action.is-danger .ui-icon {
  color: var(--danger);
}

.group-member-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px 6px;
  padding: 14px 10px;
}

.group-member-grid button {
  min-width: 0;
  display: grid;
  justify-items: center;
  gap: 5px;
  padding: 0;
  background: transparent;
  cursor: pointer;
}

.group-member-grid .avatar {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--primary);
  background: var(--primary-soft);
  font-size: 11px;
  font-weight: 700;
}

.group-member-grid small {
  width: 100%;
  overflow: hidden;
  color: var(--muted);
  font-size: 10px;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-collection-empty {
  min-height: 260px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 7px;
  color: var(--muted);
  text-align: center;
}

.chat-collection-empty > .ui-icon {
  width: 34px;
  height: 34px;
  color: var(--primary);
}

.chat-collection-empty strong {
  color: var(--ink);
  font-size: 17px;
  font-weight: 600;
}

.chat-collection-empty span {
  max-width: 320px;
  font-size: 12px;
}

.chat-share-history {
  display: grid;
}

.chat-share-history article {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.chat-share-history article > span {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  color: var(--primary);
  background: var(--primary-soft);
}

.chat-share-history article > div {
  min-width: 0;
  display: grid;
}

.chat-share-history small {
  color: var(--muted);
  font-size: 11px;
}

.conversation-report-form > p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.conversation-report-form > label {
  display: grid;
  gap: 6px;
}

.message-action-sheet > button:hover,
.connection-people > button:hover,
.chat-info-action:hover,
.chat-info-toggle:hover {
  background: var(--secondary-bg);
}

.everytime-messages-page .ui-icon,
.chat-page .ui-icon,
.chat-info-modal .ui-icon,
.message-search-modal .ui-icon,
.chat-search-modal .ui-icon,
.chat-collection-modal .ui-icon,
.conversation-report-modal .ui-icon {
  max-width: 28px;
  max-height: 28px;
}

.message-qr > svg,
.message-qr > canvas,
.message-qr > img {
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
}

@media (max-width: 760px) {
  body[data-route="chat"],
  body[data-route="group"] {
    height: 100dvh;
    overflow: hidden;
    padding-bottom: 0;
  }

  body[data-route="chat"] #mobile-nav,
  body[data-route="group"] #mobile-nav,
  body[data-route="chat"] .site-footer,
  body[data-route="group"] .site-footer {
    display: none;
  }

  body[data-route="chat"] #app,
  body[data-route="group"] #app {
    height: 100dvh;
    min-height: 0;
  }

  .messages-page {
    width: auto;
    max-width: none;
    margin: 0 16px;
    padding: 22px 0 calc(var(--nav-height) + 20px);
  }

  .message-page-head {
    min-height: 60px;
    padding-bottom: 12px;
  }

  .message-page-head h1 {
    font-size: 23px;
  }

  .message-head-button {
    width: 40px;
    height: 40px;
    flex-basis: 40px;
  }

  .message-conversation-row {
    min-height: 72px;
    grid-template-columns: 48px minmax(0, 1fr);
    gap: 11px;
    padding: 9px 0;
  }

  .message-conversation-row > .avatar,
  .message-conversation-row > .group-avatar {
    width: 48px;
    height: 48px;
  }

  .message-conversation-heading strong {
    font-size: 16px;
  }

  .message-conversation-preview p {
    font-size: 13px;
  }

  .chat-route-page {
    width: 100%;
    max-width: none;
    height: 100dvh;
    min-height: 0;
    margin: 0;
    padding: 0;
  }

  .chat-page {
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .chat-header {
    min-height: calc(58px + env(safe-area-inset-top));
    padding: calc(7px + env(safe-area-inset-top)) 8px 7px;
  }

  .chat-header-identity strong {
    font-size: 15px;
  }

  .chat-messages {
    padding: 14px 12px;
  }

  .chat-bubble {
    max-width: 80%;
  }

  .modal-backdrop:has(.chat-info-modal),
  .modal-backdrop:has(.chat-search-modal),
  .modal-backdrop:has(.chat-collection-modal),
  .modal-backdrop:has(.message-search-modal) {
    padding: 0;
  }

  .chat-info-modal,
  .chat-search-modal,
  .chat-collection-modal,
  .message-search-modal {
    width: 100%;
    height: 100dvh;
    max-width: none;
    max-height: none;
    border: 0;
    border-radius: 0;
  }

  .chat-info-modal .modal-head,
  .chat-search-modal .modal-head,
  .chat-collection-modal .modal-head,
  .message-search-modal .modal-head {
    min-height: calc(58px + env(safe-area-inset-top));
    padding: env(safe-area-inset-top) 16px 0;
  }

  .chat-info-modal .modal-head h2,
  .chat-search-modal .modal-head h2,
  .chat-collection-modal .modal-head h2,
  .message-search-modal .modal-head h2 {
    font-size: 17px;
  }

  .chat-info-modal .modal-body,
  .chat-search-modal .modal-body,
  .chat-collection-modal .modal-body,
  .message-search-modal .modal-body {
    max-height: calc(100dvh - 58px - env(safe-area-inset-top));
    padding: 14px 16px calc(24px + env(safe-area-inset-bottom));
  }

  .group-member-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .message-action-sheet > button,
  .connection-people > button {
    min-height: 64px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}
