.friends-view, .friend-detail-view { background: var(--ice-canvas); }
.friend-route-surface { margin: 0; min-height: 100%; }
.friends-view > .subpage-header, .friend-route-surface > .subpage-header { padding: max(20px, env(safe-area-inset-top)) 20px 16px; }
.friends-view > .subpage-header { display: grid; grid-template-columns: 44px 1fr 44px; align-items: center; padding-inline: 18px; min-height: 48px; }
.friends-view > .subpage-header::before { content: ""; width: 44px; }
.friends-view h1 { margin: 0; text-align: center; font-size: 20px; font-weight: 790; letter-spacing: -.025em; }
.friend-route-surface h1 { margin: 0; font-size: 20px; }
.friend-content { display: grid; gap: 12px; padding: 0 16px 24px; }
.friend-card { overflow-wrap: anywhere; }
.friend-row { gap: 12px; text-align: left; width: 100%; min-height: 64px; padding-block: 12px; }
.friend-card--rows { padding-block: 4px; }
.friend-menu-icon { color: var(--accent-strong); display: grid; place-items: center; flex: 0 0 32px; }
.friend-menu-icon svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.friend-row .profile-setting__copy { flex: 1; min-width: 0; }
.friend-row .profile-setting__copy strong { font-size: calc(15px * var(--ui-font-scale)); line-height: 1.35; }
.friend-row .profile-setting__copy span { font-size: calc(13px * var(--ui-font-scale)); }
.friend-row > svg { flex: 0 0 18px; width: 18px; height: 18px; fill: none; stroke: var(--muted); stroke-width: 2; }
.friend-avatar { display: grid; place-items: center; flex: 0 0 40px; height: 40px; border-radius: 50%; background: var(--surface-soft); color: var(--accent-strong); font-weight: 650; }
.friend-person { text-align: center; display: grid; justify-items: center; padding-block: 8px 20px; }
.friend-person h2 { margin: 16px 0 0; }
.friend-avatar--large { width: 64px; height: 64px; font-size: 24px; }
.friend-primary.profile-action { color: var(--on-accent); background: var(--accent-strong); }
.friend-danger.profile-action { color: var(--danger); background: var(--surface-soft); }
.friend-danger[data-friend-action=confirm-remove] { color: var(--on-accent); background: var(--danger); }
.friend-content button:disabled { opacity: .55; cursor: default; }
.friend-input-label { display: block; font-weight: 600; margin-bottom: 12px; }
.friend-input { box-sizing: border-box; width: 100%; min-height: 48px; border: 1px solid var(--border); border-radius: 12px; padding: 12px; background: var(--surface-soft); color: var(--ink); font: inherit; font-size: 16px; }
.friend-input:focus-visible { outline: 2px solid var(--accent-strong); outline-offset: 2px; }
.friend-status { min-height: 20px; margin: 0 4px; color: var(--muted); font-size: 13px; line-height: 1.5; overflow-wrap: anywhere; }
.friend-card .friend-status { margin-top: 12px; }
.friend-status:empty { display: none; }
.friend-schedule-header { display: none; }
.schedule-view--friend .friend-schedule-header { display: grid; grid-template-columns: 44px minmax(0,1fr); gap: 12px; align-items: start; margin-bottom: 18px; }
.friend-schedule-header h2 { font-size: 20px; line-height: 1.3; margin: 4px 0 6px; }
.friend-schedule-header #friend-schedule-owner { margin: 0; color: var(--muted); font-size: calc(14px * var(--ui-font-scale)); line-height: 1.4; overflow-wrap: anywhere; }
.friend-schedule-header .back-button { position: static; display: grid; margin: 0; }
.schedule-view--friend.view--active { height: var(--app-viewport-height); min-height: 0 !important; background: var(--ice-canvas); isolation: isolate; }
.schedule-view--friend .overview-scroll { background: var(--ice-canvas); padding-bottom: 0; }
.schedule-view--friend .schedule-pager { min-height: max(260px, calc(var(--app-viewport-height) - var(--overview-chrome-height))) !important; }
.app-shell.has-detail-route:not(.route-transition-root-underlay) .bottom-nav { visibility: hidden; }
.friend-content:has(> .friend-empty) { min-height: calc(var(--app-viewport-height) - 108px); align-content: center; }
.friend-empty.empty-state--schedule { min-height: 240px; padding: 24px 12px; }
.friend-loading { padding: 18px 4px; }
.friend-content:has(> .common-screen) { min-height: calc(var(--app-viewport-height) - 88px); box-sizing: border-box; padding-bottom: max(16px, env(safe-area-inset-bottom)); align-content: stretch; }
.common-screen { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.common-screen > * { flex-shrink: 0; }
.common-screen__body { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.common-empty.empty-state--schedule { flex: 1; min-height: 240px; padding: 24px 12px; text-align: center; }
.common-empty p { text-align: center; }
.common-footer { display: grid; gap: 12px; min-height: 50px; }
.common-footer .profile-action { display: flex; align-items: center; justify-content: center; margin: 0; line-height: 1.3; text-align: center; }
.common-footer .friend-status { text-align: center; }
.common-days { display: grid; gap: 12px; }
.common-heading { display: grid; gap: 8px; padding: 0 4px 4px; }
.common-heading__name { margin: 0; color: var(--ink); font-size: calc(16px * var(--ui-font-scale)); font-weight: 650; overflow-wrap: anywhere; }
.common-heading__range { margin: 0; color: var(--muted); font-size: calc(13px * var(--ui-font-scale)); line-height: 1.45; }
.common-day { min-width: 0; }
.common-day__date { margin: 12px 4px; color: var(--ink); font-size: calc(15px * var(--ui-font-scale)); font-weight: 650; }
.common-day__date::first-letter { text-transform: uppercase; }
.common-day__lessons { display: grid; gap: 12px; }
.common-day .lesson-card { width: 100%; margin: 0; }
@keyframes common-list-enter { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: no-preference) {
  html:not([data-animations="reduced"]):not([data-interface-effects-resolved="economy"]) .common-item-enter { animation: common-list-enter 160ms cubic-bezier(.2,.7,.2,1) both; }
}
.schedule-view--friend .schedule-topbar .profile-avatar,
.schedule-view--friend [data-action=open-notifications],
.schedule-view--friend [data-action=open-changes] { display: none; }
.friend-days, .friend-pagination, .friend-segments { display: flex; align-items: center; gap: 8px; }
.friend-days .profile-action, .friend-pagination .profile-action { margin: 0; flex: 1; min-width: 44px; }
.friend-days .profile-action:nth-child(2) { flex: 2; }
.friend-week.week-strip { margin-top: 0; }
.friend-week .day-button.is-selected .day-button__number { background: var(--accent-strong); color: var(--on-accent); }
.friend-week .day-button__number::after { color: var(--on-accent); }
.friend-segments { padding: 4px; background: var(--surface-soft); border-radius: 16px; margin: 16px 0; }
.friend-segments button { flex: 1; min-height: 48px; border: 0; border-radius: 12px; background: transparent; font: inherit; color: var(--text-secondary); transition: background-color .18s ease, color .18s ease; }
.friend-segments button[aria-pressed=true] { background: var(--surface); color: var(--accent-strong); }
.friend-schedule-heading h2 { margin: 0; font-size: 20px; line-height: 1.3; overflow-wrap: anywhere; }
.friend-schedule-heading p { color: var(--muted); margin: 8px 0; }
.friend-lessons { display: grid; gap: 12px; }
.friend-lesson.lesson-card { width: 100%; box-sizing: border-box; cursor: default; }
.friend-lesson h2 { overflow-wrap: anywhere; }
.friend-skeleton { display: grid; gap: 20px; min-height: 224px; align-content: start; }
.friend-skeleton i { display: block; height: 52px; border-radius: 12px; background: var(--surface-soft); }
html[data-animations=reduced] .friend-segments button { transition: none; }
@media (prefers-reduced-motion: reduce) { .friend-segments button { transition: none; } }

.friend-setting-label { margin-top: 0; font-weight: 650; color: var(--ink); }
.friend-education { max-width: 32ch; font-size: calc(14px * var(--ui-font-scale)); line-height: 1.5; color: var(--muted); }
.friend-relationship { font-size: calc(14px * var(--ui-font-scale)); color: var(--muted); }
.friends-view.is-secondary-section > .subpage-header::before { display: none; }
.is-secondary-section.view--active { height: var(--app-viewport-height); background: var(--ice-canvas); }
.modules-view.is-secondary-section .profile-avatar { display: none; }
.modules-view.is-secondary-section .overview-scroll { padding-bottom: 24px; }
[data-secondary-back][hidden] { display: none !important; }

.friend-recovery { margin-top: 20px; padding-top: 20px; border-top: 1px solid var(--border); min-width: 0; }
.friend-recovery h3 { margin: 0 0 8px; font-size: calc(16px * var(--ui-font-scale)); line-height: 1.4; color: var(--ink); }
.friend-recovery p { margin: 0; font-size: calc(14px * var(--ui-font-scale)); line-height: 1.5; color: var(--muted); overflow-wrap: anywhere; }
.friend-recovery .profile-action { display: flex; align-items: center; justify-content: center; margin: 16px 0 0; min-height: 50px; line-height: 1.3; text-align: center; }

.friend-recovery:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.friend-schedule-recovery { margin-bottom: 16px; }
.friend-schedule-recovery h2 { margin-top: 0; font-size: calc(18px * var(--ui-font-scale)); }
