/* 모든 요소의 크기를 계산하는 기본 방식을 통일 */
* {
  box-sizing: border-box;
}

/* 웹페이지 전체 */
body {
  margin: 0;
  min-height: 100vh;
  background-color: #080a0f;
  color: #ffffff;
  font-family: Arial, sans-serif;
}

/* 앱 전체 영역 */
.app {
  width: 100%;
  max-width: 430px;
  min-height: 100vh;
  margin: 0 auto;
  padding: 48px 20px;
  background: linear-gradient(180deg, #141922 0%, #080a0f 45%);
}

/* 상단 제목 영역 */
.header {
  margin-bottom: 32px;
}

.label {
  margin: 0 0 10px;
  color: #bfff32;
  font-size: 14px;
  font-weight: bold;
}

.header h1 {
  margin: 0;
  font-size: 32px;
  line-height: 1.25;
}

#progressText {
  margin: 20px 0 0;
  color: #aeb7c7;
  font-size: 16px;
}

/* 운동 카드 목록 */
.workout-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* 각각의 운동 카드 */
.workout-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px;
  background-color: #171b24;
  border: 1px solid #272d39;
  border-radius: 18px;
  transition: 0.2s;
}

.workout-card span {
  color: #8d98aa;
  font-size: 13px;
}

.workout-card h2 {
  margin: 6px 0 0;
  font-size: 18px;
}

/* 각각의 완료 버튼 */
.complete-button {
  flex-shrink: 0;
  padding: 10px 15px;
  color: #ffffff;
  background-color: #292f3c;
  border: 0;
  border-radius: 12px;
  font-size: 14px;
  font-weight: bold;
  cursor: pointer;
}

/* 운동을 완료했을 때 적용할 디자인 */
.workout-card.completed {
  background-color: #1d2819;
  border-color: #bfff32;
}

.workout-card.completed h2 {
  color: #bfff32;
  text-decoration: line-through;
}

.workout-card.completed .complete-button {
  color: #111111;
  background-color: #bfff32;
}

/* 전체 초기화 버튼 */
#resetButton {
  width: 100%;
  margin-top: 28px;
  padding: 16px;
  color: #ffffff;
  background-color: transparent;
  border: 1px solid #363d4b;
  border-radius: 14px;
  font-size: 15px;
  font-weight: bold;
  cursor: pointer;
}

/* 운동 루틴 이미지 영역 */
.routine-image {
  width: 100%;
  margin: 0 0 10px;
  overflow: hidden;
  background-color: #ffffff;
  border: 2px solid #343b49;
  border-radius: 18px;
}

/* 운동 루틴 이미지 */
.routine-image img {
  display: block;
  width: 100%;
  height: auto;
}

/* 관리자 로그아웃 버튼 */
.zoom-button {
  width: 100%;
  margin: 0 0 28px;
  padding: 14px;
  color: #ffffff;
  background-color: #171b24;
  border: 1px solid #343b49;
  border-radius: 14px;
  font-size: 15px;
  font-weight: bold;
  cursor: pointer;
}

/* 마우스를 올렸을 때 버튼 색상 변경 */
.zoom-button:hover {
  color: #111111;
  background-color: #bfff32;
  border-color: #bfff32;
}



/* =================================
   헬스와 필라테스 브랜드 테마
================================= */

:root {
  --brand-navy: #17233e;
  --brand-blue: #1f5faa;
  --brand-orange: #f56a00;
  --brand-cream: #f6f3ed;
  --brand-white: #ffffff;
  --brand-gray: #6f7888;
  --brand-border: #dce2eb;
}

/* 페이지 전체 */
body {
  background-color: #eae6de;
  color: var(--brand-navy);
  font-family:
    "Pretendard",
    "Noto Sans KR",
    "Apple SD Gothic Neo",
    "Malgun Gothic",
    sans-serif;
}

/* 앱 배경 */
.app {
  background: linear-gradient(180deg,
      #fff8f1 0%,
      var(--brand-cream) 42%,
      #f3f6fa 100%);
}

/* 상단 제목 */
.label {
  color: var(--brand-orange);
}

.header h1 {
  color: var(--brand-navy);
}

#progressText {
  color: var(--brand-blue);
  font-weight: bold;
}

/* 루틴 이미지 */
.routine-image {
  border-color: #cad5e5;
  box-shadow: 0 8px 24px rgba(23, 35, 62, 0.1);
}

/* 관리자 로그아웃 버튼 브랜드 색상 */
.zoom-button {
  color: var(--brand-orange);
  background-color: var(--brand-white);
  border-color: var(--brand-orange);
}

.zoom-button:hover {
  color: var(--brand-white);
  background-color: var(--brand-orange);
  border-color: var(--brand-orange);
}

/* 운동 카드 */
.workout-card {
  background-color: var(--brand-white);
  border-color: var(--brand-border);
  box-shadow: 0 5px 16px rgba(23, 35, 62, 0.07);
}

.workout-card span {
  color: var(--brand-blue);
}

.workout-card h2 {
  color: var(--brand-navy);
}

/* 완료 버튼 */
.complete-button {
  color: var(--brand-orange);
  background-color: #fff2e8;
  border: 1px solid #ffd0ad;
}

/* 운동 완료 상태 */
.workout-card.completed {
  background-color: #eef5ff;
  border-color: var(--brand-blue);
}

.workout-card.completed h2 {
  color: var(--brand-blue);
}

.workout-card.completed .complete-button {
  color: var(--brand-white);
  background-color: var(--brand-blue);
  border-color: var(--brand-blue);
}

/* 초기화 버튼 */
#resetButton {
  color: var(--brand-navy);
  background-color: var(--brand-white);
  border-color: var(--brand-border);
}


/* 홈 화면 설치 버튼 */
.install-button {
  width: 100%;
  margin: 0 0 12px;
  padding: 16px;
  color: var(--brand-white);
  background-color: var(--brand-orange);
  border: 1px solid var(--brand-orange);
  border-radius: 14px;
  font: inherit;
  font-weight: bold;
  cursor: pointer;
  box-shadow: 0 5px 16px rgba(23, 35, 62, 0.08);
}

.install-button:hover {
  color: var(--brand-orange);
  background-color: var(--brand-white);
}

.install-button[hidden] {
  display: none;
}

/* 회원 로그인 화면 */
.login-screen {
  min-height: 100dvh;
  max-width: 430px;
  margin: 0 auto;
  padding: 32px 24px;
  display: flex;
  align-items: center;
  background-color: #fff8f0;
  box-sizing: border-box;
}

.login-box {
  width: 100%;
  padding: 32px 24px;
  background-color: var(--brand-white);
  border: 1px solid var(--brand-border);
  border-radius: 20px;
  box-shadow: 0 10px 30px rgba(23, 35, 62, 0.1);
}

.login-box h1 {
  margin: 8px 0 12px;
  color: var(--brand-navy);
  font-size: 32px;
}

.login-description {
  margin: 0 0 28px;
  color: #667085;
  line-height: 1.5;
}

.login-form {
  display: grid;
  gap: 10px;
}

.login-form label {
  margin-top: 6px;
  color: var(--brand-navy);
  font-size: 14px;
  font-weight: bold;
}

.login-form input {
  width: 100%;
  padding: 14px;
  border: 1px solid var(--brand-border);
  border-radius: 12px;
  box-sizing: border-box;
  font: inherit;
}

.login-form input:focus {
  border-color: var(--brand-orange);
  outline: 2px solid rgba(236, 106, 26, 0.15);
}

#loginButton,
#signupButton {
  margin-top: 12px;
  padding: 15px;
  color: var(--brand-white);
  background-color: var(--brand-orange);
  border: 1px solid var(--brand-orange);
  border-radius: 14px;
  font: inherit;
  font-weight: bold;
  cursor: pointer;
}

#loginButton:disabled,
#signupButton:disabled {
  opacity: 0.65;
  cursor: wait;
}

.login-message {
  min-height: 22px;
  margin: 4px 0 0;
  color: #c62828;
  font-size: 14px;
  text-align: center;
}

.app[hidden],
.login-screen[hidden] {
  display: none;
}

/* 배정 루틴 정보와 로그아웃 */
.member-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 0 0 28px;
  padding: 14px 16px;
  background-color: var(--brand-white);
  border: 1px solid var(--brand-border);
  border-radius: 14px;
}

.member-toolbar p {
  display: grid;
  gap: 4px;
  margin: 0;
}

.member-toolbar span {
  color: #667085;
  font-size: 12px;
}

.member-toolbar strong {
  color: var(--brand-navy);
  font-size: 14px;
}

#logoutButton {
  flex-shrink: 0;
  padding: 9px 12px;
  color: var(--brand-orange);
  background-color: var(--brand-white);
  border: 1px solid var(--brand-orange);
  border-radius: 10px;
  font: inherit;
  font-size: 13px;
  font-weight: bold;
  cursor: pointer;
}

[hidden] {
  display: none !important;
}

/* 관리자 루틴 설정 화면 */
.admin-screen {
  padding-bottom: 40px;
}

.admin-card {
  display: grid;
  gap: 10px;
  margin: 18px 0;
  padding: 18px;
  background-color: var(--brand-white);
  border: 1px solid var(--brand-border);
  border-radius: 14px;
}

.admin-card label {
  color: var(--brand-navy);
  font-size: 14px;
  font-weight: bold;
}

.admin-card input,
.admin-card select {
  box-sizing: border-box;
  width: 100%;
  min-height: 42px;
  padding: 10px 12px;
  font: inherit;
  border: 1px solid var(--brand-border);
  border-radius: 10px;
}

/* 관리자 루틴 이미지 목록 */
#adminRoutinePreview {
  display: grid;
  gap: 12px;
  width: 100%;
  min-width: 0;
  margin-top: 6px;
}

/* 이미지별 편집 영역 */
.admin-routine-image-item {
  display: grid;
  gap: 8px;
  min-width: 0;
  padding: 12px;
  background-color: #f8fafc;
  border: 1px solid var(--brand-border);
  border-radius: 12px;
}

.admin-routine-image-item strong {
  color: var(--brand-navy);
  font-size: 13px;
}

.admin-routine-image-item img {
  display: block;
  width: 100%;
  max-height: 220px;
  object-fit: contain;
}

/* 이미지별 캡션 입력칸 */
.admin-card .admin-routine-image-caption {
  min-height: 64px;
  padding: 9px 10px;
  font-size: 13px;
  line-height: 1.5;
}

/* 순서 변경·삭제 버튼 */
.admin-routine-image-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.admin-routine-image-actions button {
  min-width: 0;
  padding: 8px 4px;
  color: var(--brand-navy);
  background-color: #ffffff;
  border: 1px solid var(--brand-border);
  border-radius: 8px;
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}

.admin-routine-image-actions button.is-delete {
  color: #d63b2d;
  border-color: #efb5ad;
}

.admin-routine-image-actions button:disabled {
  opacity: 0.4;
  cursor: default;
}

#saveAdminRoutineButton {
  width: 100%;
  padding: 13px;
  color: var(--brand-white);
  background-color: var(--brand-orange);
  border: 0;
  border-radius: 10px;
  font: inherit;
  font-weight: bold;
  cursor: pointer;
}

#saveAdminRoutineButton:disabled {
  opacity: 0.6;
  cursor: wait;
}

.admin-message {
  margin: 0;
  color: #475467;
  font-size: 14px;
  line-height: 1.5;
}

/* 관리자 센터 소식 작성 영역 */
.admin-section-title {
  margin: 0;
  color: var(--brand-navy);
  font-size: 20px;
  line-height: 1.4;
}

.admin-section-description {
  margin: -2px 0 4px;
  color: #667085;
  font-size: 13px;
  line-height: 1.6;
}

/* 이미지 선택 안내 */
.admin-field-help {
  margin: -4px 0 2px;
  color: #667085;
  font-size: 12px;
  line-height: 1.5;
}

/* 선택한 소식 이미지 미리보기 */
.admin-community-image-preview {
  display: grid;
  grid-template-columns:
    repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.admin-community-image-preview:empty {
  display: none;
}

.admin-community-preview-item {
  position: relative;
  overflow: hidden;
  background-color: #f3f5f8;
  border: 1px solid var(--brand-border);
  border-radius: 10px;
  aspect-ratio: 1 / 1;
}

.admin-community-preview-item img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* 이미지 순서 번호 */
.admin-community-preview-number {
  position: absolute;
  top: 5px;
  left: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  color: #ffffff;
  background-color: rgba(23, 35, 62, 0.82);
  border-radius: 50%;
  font-size: 11px;
  font-weight: bold;
}

/* 선택한 소식 이미지 개별 삭제 버튼 */
.admin-community-preview-remove {
  position: absolute;
  top: 5px;
  right: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  padding: 0;
  color: #ffffff;
  background-color: rgba(164, 71, 56, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 50%;
  font: inherit;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}

.admin-community-preview-remove:active {
  background-color: #a44738;
}

/* 센터 소식 게시 버튼 */
#saveAdminCommunityButton {
  width: 100%;
  padding: 13px;
  color: var(--brand-white);
  background-color: var(--brand-orange);
  border: 0;
  border-radius: 10px;
  font: inherit;
  font-weight: bold;
  cursor: pointer;
}

#saveAdminCommunityButton:disabled {
  opacity: 0.6;
  cursor: wait;
}

/* 루틴 설명과 링크 */
.admin-card textarea {
  box-sizing: border-box;
  width: 100%;
  min-height: 170px;
  padding: 12px;
  font: inherit;
  line-height: 1.6;
  border: 1px solid var(--brand-border);
  border-radius: 10px;
  resize: vertical;
}

.routine-description {
  margin: 0 0 16px;
  padding: 16px;
  color: var(--brand-navy);
  background-color: var(--brand-white);
  border: 1px solid var(--brand-border);
  border-radius: 14px;
  line-height: 1.7;
}

.routine-description p {
  margin: 0 0 10px;
  white-space: pre-wrap;
}

.routine-description p:last-child {
  margin-bottom: 0;
}

.routine-description a {
  color: var(--brand-orange);
  font-weight: bold;
  text-decoration: underline;
  overflow-wrap: anywhere;
}

/* 루틴 신청 버튼 */
.routine-request-button {
  display: block;
  margin: 0 0 26px;
  padding: 14px 16px;
  color: var(--brand-white);
  background-color: var(--brand-orange);
  border-radius: 12px;
  font-size: 15px;
  font-weight: bold;
  text-align: center;
  text-decoration: none;
}

.routine-request-status-message {
  margin: -14px 0 26px;
  color: var(--brand-orange);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.4;
  text-align: center;
}

.routine-request-status-message[hidden] {
  display: none;
}

.routine-description {
  position: relative;
  max-height: 190px;
  overflow: hidden;
}

.routine-description:not(.is-expanded)::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 60px;
  pointer-events: none;
  background: linear-gradient(to bottom, transparent, var(--brand-white));
}

.routine-description.is-expanded {
  max-height: none;
}

.toggle-description-button {
  width: 100%;
  margin: -6px 0 16px;
  padding: 12px;
  color: var(--brand-orange);
  background-color: var(--brand-white);
  border: 1px solid var(--brand-orange);
  border-radius: 12px;
  font: inherit;
  font-weight: bold;
  cursor: pointer;
}

.signup-link-button {
  display: block;
  width: 100%;
  margin-top: 18px;
  padding: 8px;
  color: var(--brand-orange);
  background: transparent;
  border: 0;
  font: inherit;
  font-weight: bold;
  text-align: center;
  text-decoration: underline;
  cursor: pointer;
}

#signupForm .signup-link-button {
  margin-top: 4px;
}

.screen-logo {
  display: block;
  width: 80px;
  max-width: calc(100% - 32px);
  height: auto;
  margin-right: auto;
  margin-left: auto;
  object-fit: contain;
}

.screen-logo-top {
  margin-top: 4px;
  margin-bottom: 22px;
}

/* 회원 화면 상단 로고와 새로고침 버튼 */
.member-app-topbar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  margin-top: 4px;
  margin-bottom: 22px;
}

.member-app-topbar-spacer {
  grid-column: 1;
}

.member-app-topbar .screen-logo-top {
  grid-column: 2;
  margin: 0;
}

.member-refresh-button {
  grid-column: 3;
  justify-self: end;

  display: inline-flex;
  align-items: center;
  gap: 5px;

  width: auto;
  padding: 7px 10px;

  color: var(--brand-navy);
  background-color: rgba(255, 255, 255, 0.88);
  border: 1px solid var(--brand-border);
  border-radius: 999px;

  font: inherit;
  font-size: 12px;
  font-weight: bold;
  white-space: nowrap;
  cursor: pointer;
}

.member-refresh-button span:first-child {
  font-size: 17px;
  line-height: 1;
}

.member-refresh-button:active {
  color: white;
  background-color: var(--brand-navy);
}

.member-refresh-button:disabled {
  opacity: 0.6;
  cursor: wait;
}

.screen-logo-bottom {
  margin-top: 32px;
  margin-bottom: 4px;
  opacity: 0.82;
}

.password-field {
  position: relative;
}

.password-field input {
  padding-right: 52px;
}

.password-toggle {
  position: absolute;
  top: 50%;
  right: 10px;
  width: 36px;
  padding: 6px;
  color: #52657f;
  background: transparent;
  border: 0;
  transform: translateY(-50%);
  cursor: pointer;
  font-size: 20px;
  line-height: 1;
}

/* 회원 화면 하단 탭 공간 확보 */
#appScreen {
  padding-bottom: calc(110px + env(safe-area-inset-bottom));
}

/* 회원용 하단 탭 */
.member-bottom-nav {
  position: fixed;
  left: 50%;
  bottom: 0;
  z-index: 500;

  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;

  width: 100%;
  max-width: 430px;
  padding:
    8px 8px calc(8px + env(safe-area-inset-bottom));

  background-color: rgba(255, 255, 255, 0.96);
  border-top: 1px solid var(--brand-border);
  box-shadow: 0 -6px 20px rgba(23, 35, 62, 0.1);
  transform: translateX(-50%);
  backdrop-filter: blur(12px);
}

/* 하단의 각 탭 버튼 */
.member-tab-button {
  position: relative;

  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;

  min-width: 0;
  min-height: 58px;
  padding: 7px 3px;

  color: #7b8493;
  background-color: transparent;
  border: 0;
  border-radius: 12px;

  font: inherit;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;

  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

/* 탭 아이콘 */
.member-tab-button span:first-child {
  font-size: 19px;
  line-height: 1;
}

/* 선택된 탭 */
.member-tab-button.is-active {
  color: var(--brand-orange);
  background-color: #fff3e8;
}

/* 선택된 탭 상단 표시선 */
.member-tab-button.is-active::before {
  position: absolute;
  top: -8px;
  left: 50%;

  width: 38px;
  height: 3px;

  background-color: var(--brand-orange);
  border-radius: 0 0 4px 4px;
  transform: translateX(-50%);

  content: "";
}

/* 키보드로 선택했을 때 */
.member-tab-button:focus-visible {
  outline: 3px solid rgba(245, 106, 0, 0.25);
  outline-offset: -3px;
}

/* 탭 화면 숨김 처리 */
.member-tab-panel[hidden] {
  display: none !important;
}

/* 운동 기록 탭 */
#workoutLogTabPanel .header {
  margin-bottom: 24px;
}

#workoutLogTabPanel .header h2 {
  margin: 0;
  color: var(--brand-navy);
  font-size: 24px;
  line-height: 1.3;
  white-space: nowrap;
}

/* 운동 기록 캘린더 */
.workout-calendar-card {
  margin-bottom: 18px;
  padding: 18px 14px;
  background-color: var(--brand-white);
  border: 1px solid var(--brand-border);
  border-radius: 18px;
  box-shadow: 0 8px 24px rgba(23, 35, 62, 0.07);
}

/* 캘린더 월과 이동 버튼 */
.workout-calendar-header {
  display: grid;
  grid-template-columns: 42px 1fr 42px;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
}

.workout-calendar-header h2 {
  margin: 0;
  color: var(--brand-navy);
  font-size: 19px;
  text-align: center;
}

/* 이전 달·다음 달 버튼 */
.calendar-month-button {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  padding: 0;
  color: var(--brand-navy);
  background-color: #f6f8fb;
  border: 1px solid var(--brand-border);
  border-radius: 50%;
  font: inherit;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
}

.calendar-month-button:active {
  color: var(--brand-white);
  background-color: var(--brand-orange);
  border-color: var(--brand-orange);
}

/* 요일과 날짜 공통 배열 */
.workout-calendar-weekdays,
.workout-calendar-days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}

/* 요일 */
.workout-calendar-weekdays {
  margin-bottom: 7px;
}

.workout-calendar-weekdays span {
  color: #7b8493;
  font-size: 12px;
  font-weight: 700;
  text-align: center;
}

.workout-calendar-weekdays span:first-child {
  color: #d85151;
}

.workout-calendar-weekdays span:last-child {
  color: var(--brand-blue);
}

/* 날짜 버튼 */
.workout-calendar-day {
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
  aspect-ratio: 1;
  padding: 0;
  color: var(--brand-navy);
  background-color: transparent;
  border: 0;
  border-radius: 50%;
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}

/* 오늘 날짜 */
.workout-calendar-day.is-today {
  background-color: #fff3e8;
  color: var(--brand-orange);
  font-weight: 800;
}

/* 사용자가 선택한 날짜 */
.workout-calendar-day.is-selected {
  color: var(--brand-white);
  background-color: var(--brand-orange);
  font-weight: 800;
}

/* 사진 기록이 있는 날짜의 점 */
.workout-calendar-day.has-record::after {
  position: absolute;
  left: 50%;
  bottom: 3px;
  width: 5px;
  height: 5px;
  background-color: var(--brand-orange);
  border-radius: 50%;
  transform: translateX(-50%);
  content: "";
}

.workout-calendar-day.is-selected::after {
  background-color: var(--brand-white);
}

/* 달력 앞뒤의 빈칸 */
.workout-calendar-empty {
  aspect-ratio: 1;
}

/* 달력 세로 높이 줄이기 */
.workout-calendar-card {
  padding-top: 14px;
  padding-bottom: 14px;
}

.workout-calendar-header {
  grid-template-columns: 38px 1fr 38px;
  margin-bottom: 12px;
}

.calendar-month-button {
  width: 38px;
  height: 38px;
  font-size: 24px;
}

.workout-calendar-weekdays {
  margin-bottom: 4px;
}

.workout-calendar-days {
  row-gap: 0;
}

.workout-calendar-day {
  justify-self: center;
  width: 38px;
  height: 38px;
  aspect-ratio: auto;
}

.workout-calendar-empty {
  height: 38px;
  aspect-ratio: auto;
}

/* 전체 운동 기록 보기 버튼 */
.show-all-workout-records-button {
  display: block;
  width: 100%;
  min-height: 42px;
  margin: -6px 0 12px;
  padding: 9px 14px;

  color: var(--brand-navy);
  background-color: var(--brand-white);
  border: 1px solid var(--brand-border);
  border-radius: 12px;

  font: inherit;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}

.show-all-workout-records-button:active {
  color: var(--brand-white);
  background-color: var(--brand-navy);
}

/* 지금 순간 기록하기 버튼 */
.workout-camera-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-height: 56px;
  margin-bottom: 22px;
  padding: 14px 16px;
  color: var(--brand-white);
  background-color: var(--brand-orange);
  border: 1px solid var(--brand-orange);
  border-radius: 16px;
  box-shadow: 0 8px 18px rgba(245, 106, 0, 0.2);
  font: inherit;
  font-size: 16px;
  font-weight: 800;
  cursor: pointer;
}

.workout-camera-button:active {
  transform: translateY(1px);
  box-shadow: 0 4px 10px rgba(245, 106, 0, 0.16);
}

/* 운동 기록 목록 */
.workout-record-list {
  display: grid;
  gap: 16px;
}

/* 아직 기록이 없을 때 */
#emptyWorkoutRecordMessage {
  margin: 0;
  padding: 26px 18px;
  color: #737d8d;
  background-color: rgba(255, 255, 255, 0.72);
  border: 1px dashed #cbd3df;
  border-radius: 16px;
  font-size: 14px;
  line-height: 1.6;
  text-align: center;
}

/* 저장된 운동 기록 폴라로이드 */
.workout-record-card {
  width: 100%;
  padding: 14px 14px 22px;
  color: var(--brand-navy);
  background-color: #fffdf8;
  border: 1px solid #ebe5da;
  border-radius: 4px;
  box-shadow: 0 10px 24px rgba(17, 35, 66, 0.14);
}

/* 저장된 운동 기록 사진 */
.workout-record-photo {
  display: block;
  width: 100%;
  height: auto;
  margin-bottom: 14px;
  background-color: #e7e9ed;
}

/* 사진을 기다리거나 다시 불러오는 동안 메모·날짜는 그대로 표시합니다. */
.workout-record-photo-area {
  position: relative;
  margin-bottom: 14px;
}

.workout-record-photo-area.is-loading,
.workout-record-photo-area.is-error {
  min-height: 160px;
  background-color: #e7e9ed;
}

.workout-record-photo-area .workout-record-photo {
  margin-bottom: 0;
}

.workout-record-photo-area.is-loading .workout-record-photo,
.workout-record-photo-area.is-error .workout-record-photo {
  opacity: 0;
}

.workout-record-photo-status {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 10px;
  padding: 16px;
  color: #4b5563;
  font-size: 13px;
  line-height: 1.5;
  text-align: center;
}

.workout-record-photo-status p {
  margin: 0;
}

.workout-record-photo-retry {
  min-height: 44px;
  padding: 9px 14px;
  border: 1px solid #c4cbd6;
  border-radius: 10px;
  color: var(--brand-navy);
  background: #fff;
  font: inherit;
  cursor: pointer;
}

.workout-record-photo-retry:focus-visible {
  outline: 2px solid var(--brand-orange);
  outline-offset: 2px;
}

/* 저장된 운동 기록 메모 */
.workout-record-caption {
  min-height: 58px;
  margin: 0;
  padding: 8px 6px 14px;
  color: #25304a;
  border-bottom: 1px solid #e1ddd4;
  white-space: pre-wrap;
  overflow-wrap: anywhere;

  font-family:
    "Nanum Pen Script",
    "Apple SD Gothic Neo",
    "Malgun Gothic",
    cursive;
  font-size: 20px;
  line-height: 1.6;
}

/* 운동 기록 메모 수정 입력창 */
.workout-record-caption-editor {
  display: block;
  width: 100%;
  min-height: 88px;
  margin: 0;
  padding: 10px 8px;
  color: #25304a;
  background-color: #fffaf1;
  border: 1px solid #d9d1c2;
  border-radius: 8px;
  outline: none;
  resize: vertical;

  font-family:
    "Nanum Pen Script",
    "Apple SD Gothic Neo",
    "Malgun Gothic",
    cursive;
  font-size: 20px;
  line-height: 1.6;
}

/* 메모 수정 버튼 영역 */
.workout-record-edit-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 10px;
}

/* 수정 취소·저장 버튼 */
.cancel-workout-caption-button,
.save-workout-caption-button {
  padding: 8px 14px;
  border-radius: 8px;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.cancel-workout-caption-button {
  color: #596273;
  background-color: transparent;
  border: 1px solid #c9ced7;
}

.save-workout-caption-button {
  color: #ffffff;
  background-color: var(--brand-orange);
  border: 1px solid var(--brand-orange);
}

.save-workout-caption-button:disabled {
  opacity: 0.55;
  cursor: wait;
}

/* 평상시 수정·삭제 버튼 묶음 */
.workout-record-buttons {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* 운동 기록 수정 버튼 */
.edit-workout-record-button {
  flex-shrink: 0;
  padding: 7px 10px;
  color: #4f5e74;
  background-color: transparent;
  border: 1px solid #bdc6d3;
  border-radius: 8px;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.edit-workout-record-button:active {
  color: #ffffff;
  background-color: #4f5e74;
  border-color: #4f5e74;
}

/* 자바스크립트로 숨긴 수정 요소 */
.workout-record-caption[hidden],
.workout-record-caption-editor[hidden],
.workout-record-edit-actions[hidden],
.workout-record-footer[hidden] {
  display: none;
}

/* 운동 기록 날짜와 삭제 버튼 영역 */
.workout-record-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
}

/* 저장된 운동 기록 날짜 */
.workout-record-date {
  display: block;
  margin: 0;
  color: #858070;
  font-size: 13px;
  line-height: 1.5;
  text-align: left;
}

/* 운동 기록 삭제 버튼 */
.delete-workout-record-button {
  flex-shrink: 0;
  padding: 7px 10px;
  color: #a44738;
  background-color: transparent;
  border: 1px solid #d9b5ae;
  border-radius: 8px;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.delete-workout-record-button:active {
  color: #ffffff;
  background-color: #a44738;
  border-color: #a44738;
}

.delete-workout-record-button:disabled {
  opacity: 0.55;
  cursor: wait;
}

/* 센터 커뮤니티 */
#communityTabPanel .header {
  margin-bottom: 24px;
}

/* 센터 소식 목록 */
.community-post-list {
  display: grid;
  gap: 16px;
}

/* 목록 카드 사이 구분선 */
.content-list-separator {
  width: calc(100% - 24px);
  height: 1px;
  margin: 0 auto;
  background-color: rgba(23, 35, 62, 0.16);
}

/* 로딩, 빈 목록, 오류 안내 */
.community-status-message {
  margin: 0;
  padding: 30px 18px;
  color: #737d8d;
  background-color: var(--brand-white);
  border: 1px dashed #cbd3df;
  border-radius: 18px;
  font-size: 14px;
  line-height: 1.6;
  text-align: center;
}

/* 소식 한 개의 카드 */
.community-post-card {
  overflow: hidden;
  background-color: var(--brand-white);
  border: 1px solid var(--brand-border);
  border-radius: 18px;
  box-shadow: 0 8px 20px rgba(23, 35, 62, 0.06);
}

/* 좌우로 넘기는 이미지 영역 */
.community-image-carousel {
  display: flex;
  overflow-x: auto;
  background-color: #f3f5f8;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  scrollbar-width: none;
  overscroll-behavior-x: contain;
}

.community-image-carousel::-webkit-scrollbar {
  display: none;
}

/* 캐러셀 전체 영역 */
.community-carousel-area {
  background-color: var(--brand-white);
}

/* 사진이 여러 장일 때 PC 드래그 표시 */
.community-image-carousel.has-multiple-images {
  cursor: grab;
}

.community-image-carousel.is-dragging {
  cursor: grabbing;
  scroll-behavior: auto;
  scroll-snap-type: none;
  user-select: none;
}

.community-image-carousel img {
  user-select: none;
  -webkit-user-drag: none;
}

/* 캐러셀 화살표와 점 */
.community-carousel-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
  padding: 10px 14px;
  background-color: var(--brand-white);
  border-top: 1px solid #edf0f4;
  border-bottom: 1px solid #edf0f4;
}

/* 이전·다음 버튼 */
.community-carousel-button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 32px;
  padding: 0;
  color: var(--brand-navy);
  background-color: #f5f7fa;
  border: 1px solid #d8dee8;
  border-radius: 50%;
  font: inherit;
  font-size: 25px;
  line-height: 1;
  cursor: pointer;
}

.community-carousel-button:active {
  color: var(--brand-white);
  background-color: var(--brand-orange);
  border-color: var(--brand-orange);
}

.community-carousel-button:disabled {
  opacity: 0.3;
  cursor: default;
}

/* 현재 사진 위치를 보여주는 점 */
.community-carousel-dots {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 50px;
}

.community-carousel-dot {
  width: 8px;
  height: 8px;
  padding: 0;
  background-color: #c7ced9;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  transition:
    width 0.2s ease,
    background-color 0.2s ease;
}

.community-carousel-dot.is-active {
  width: 22px;
  background-color: var(--brand-orange);
}

.community-carousel-button:focus-visible,
.community-carousel-dot:focus-visible {
  outline: 3px solid rgba(245, 106, 0, 0.25);
  outline-offset: 2px;
}

/* 이미지 한 장의 영역 */
.community-image-slide {
  flex: 0 0 100%;
  aspect-ratio: 4 / 5;
  background-color: #f3f5f8;
  scroll-snap-align: start;
  scroll-snap-stop: always;
}

.community-image-slide img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* 제목과 본문 영역 */
.community-post-content {
  padding: 19px 18px 18px;
}

.community-post-title {
  margin: 0 0 12px;
  color: var(--brand-navy);
  font-size: 20px;
  line-height: 1.45;
  word-break: keep-all;
}

.community-post-body {
  margin: 0;
  color: #273349;
  font-size: 15px;
  line-height: 1.75;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.community-post-body a {
  color: var(--brand-orange);
  font-weight: bold;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* 사진 여러 장 안내 */
.community-swipe-guide {
  margin: 15px 0 0;
  color: var(--brand-orange);
  font-size: 12px;
  font-weight: bold;
}

/* 게시 날짜 */
.community-post-date {
  display: block;
  margin-top: 16px;
  padding-top: 14px;
  color: #8a93a3;
  border-top: 1px solid #e5e8ee;
  font-size: 12px;
  text-align: right;
}

/* 운동 기록 카메라 전체 화면 */
.workout-camera-modal {
  position: fixed;
  inset: 0;
  z-index: 2000;

  display: flex;
  justify-content: center;

  overflow-y: auto;
  background-color: rgba(5, 8, 14, 0.96);
}

.workout-camera-modal[hidden] {
  display: none !important;
}

/* 카메라 내부 화면 */
.workout-camera-dialog {
  width: 100%;
  max-width: 430px;
  min-height: 100dvh;
  padding:
    calc(18px + env(safe-area-inset-top)) 16px calc(20px + env(safe-area-inset-bottom));

  color: var(--brand-white);
  background-color: #0b0f17;
}

/* 카메라 상단 제목과 취소 버튼 */
.workout-camera-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 18px;
}

.workout-camera-header h2 {
  margin: 0;
  font-size: 19px;
}

.camera-text-button {
  flex-shrink: 0;
  padding: 8px 4px;
  color: #ffffff;
  background-color: transparent;
  border: 0;
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}

/* 실시간 카메라 영역 */
.workout-camera-screen {
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background-color: #000000;
  border: 1px solid #283144;
  border-radius: 22px;
}

/* 실시간 카메라 영상 */
#workoutCameraVideo {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* 전면 카메라일 때 거울처럼 표시 */
#workoutCameraVideo.is-front-facing {
  transform: scaleX(-1);
}

/* 카메라 준비 및 오류 안내 */
.workout-camera-message {
  position: absolute;
  inset: 0;

  display: flex;
  align-items: center;
  justify-content: center;

  margin: 0;
  padding: 28px;
  color: #ffffff;
  background-color: rgba(0, 0, 0, 0.55);

  font-size: 14px;
  line-height: 1.6;
  text-align: center;
}

/* 촬영 버튼 영역 */
.workout-camera-controls {
  display: grid;
  grid-template-columns: 1fr 76px 1fr;
  align-items: center;
  gap: 16px;
  margin-top: 20px;
}

/* 원형 촬영 버튼 */
.camera-shutter-button {
  display: grid;
  place-items: center;
  width: 76px;
  height: 76px;
  padding: 5px;
  background-color: transparent;
  border: 3px solid #ffffff;
  border-radius: 50%;
  cursor: pointer;
}

.camera-shutter-button span {
  display: block;
  width: 58px;
  height: 58px;
  background-color: #ffffff;
  border-radius: 50%;
}

.camera-shutter-button:active span {
  background-color: var(--brand-orange);
  transform: scale(0.9);
}

/* 전면·후면 카메라 전환 버튼 */
.camera-switch-button {
  justify-self: end;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  padding: 0;
  color: #ffffff;
  background-color: #242c3b;
  border: 1px solid #3d4658;
  border-radius: 50%;
  font-size: 21px;
  cursor: pointer;
}

/* 폴라로이드 작성 영역 */
#workoutPhotoComposer {
  padding-top: 4px;
}

/* 폴라로이드 프레임 */
.polaroid-composer {
  width: 100%;
  margin: 0 auto 20px;
  padding: 14px 14px 22px;
  color: var(--brand-navy);
  background-color: #fffdf8;
  border-radius: 3px;
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.35);
}

/* 촬영한 사진 */
#workoutPhotoPreview {
  display: block;
  width: 100%;
  aspect-ratio: 3 / 4;
  margin-bottom: 12px;
  object-fit: cover;
  background-color: #e7e9ed;
}

/* 폴라로이드 메모 */
#workoutPhotoCaption {
  display: block;
  width: 100%;
  min-height: 78px;
  padding: 8px 6px;
  color: #25304a;
  background-color: transparent;
  border: 0;
  border-bottom: 1px solid #e1ddd4;
  outline: none;
  resize: none;

  font-family:
    "Nanum Pen Script",
    "Apple SD Gothic Neo",
    "Malgun Gothic",
    cursive;
  font-size: 18px;
  line-height: 1.6;
}

/* 촬영 날짜 */
#workoutPhotoDate {
  display: block;
  margin-top: 12px;
  color: #858070;
  font-size: 13px;
  text-align: right;
}

/* 다시 찍기·저장 버튼 */
.workout-photo-actions {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 10px;
}

.retake-photo-button,
.save-workout-record-button {
  min-height: 52px;
  padding: 12px 14px;
  border-radius: 14px;
  font: inherit;
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
}

.retake-photo-button {
  color: #ffffff;
  background-color: #242c3b;
  border: 1px solid #414b5e;
}

.save-workout-record-button {
  color: #ffffff;
  background-color: var(--brand-orange);
  border: 1px solid var(--brand-orange);
}

.save-workout-record-button:disabled {
  opacity: 0.6;
  cursor: wait;
}

/* 사진 저장 안내 메시지 */
.workout-record-save-message {
  min-height: 22px;
  margin: 12px 0 0;
  color: #ffd3b3;
  font-size: 13px;
  line-height: 1.5;
  text-align: center;
}

/* 카메라가 열렸을 때 뒤 화면 스크롤 방지 */
body.camera-open {
  overflow: hidden;
}

/* 관리자 센터 소식 관리 목록 */
.admin-community-post-list {
  display: grid;
  gap: 12px;
  overflow-anchor: none;
}

#adminCommunityListMessage {
  min-height: 21px;
}

#adminCommunityListMessage:empty {
  display: block;
  visibility: hidden;
}

/* 관리할 소식 한 개 */
.admin-community-manage-card {
  display: grid;
  gap: 13px;
  padding: 14px;
  background-color: #f8f9fb;
  border: 1px solid var(--brand-border);
  border-radius: 14px;
}

/* 소식 이미지와 정보 */
.admin-community-manage-main {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  min-width: 0;
}

.admin-community-manage-thumbnail {
  flex: 0 0 72px;
  width: 72px;
  height: 72px;
  object-fit: cover;
  background-color: #edf0f4;
  border: 1px solid #dce1e9;
  border-radius: 10px;
}

.admin-community-manage-info {
  flex: 1;
  min-width: 0;
}

.admin-community-manage-title {
  margin: 0;
  color: var(--brand-navy);
  font-size: 16px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.admin-community-manage-meta {
  margin: 6px 0 0;
  color: #7a8494;
  font-size: 12px;
  line-height: 1.5;
}

/* 수정·삭제 버튼 영역 */
.admin-community-manage-actions {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 4px;
}

.admin-community-edit-button,
.admin-community-delete-button {
  width: 100%;
  padding: 5px 3px;
  background-color: var(--brand-white);
  border-radius: 6px;
  font: inherit;
  font-size: 11px;
  line-height: 1.2;
  font-weight: bold;
  cursor: pointer;
}

.admin-community-edit-button {
  color: var(--brand-navy);
  border: 1px solid var(--brand-navy);
}

.admin-community-delete-button {
  color: #a44738;
  border: 1px solid #d7a49b;
}

.admin-community-edit-button:active {
  color: var(--brand-white);
  background-color: var(--brand-navy);
}

.admin-community-delete-button:active {
  color: var(--brand-white);
  background-color: #a44738;
}

.admin-community-edit-button:disabled,
.admin-community-delete-button:disabled {
  opacity: 0.5;
  cursor: wait;
}

/* 센터 소식 수정 취소 버튼 */
.admin-community-cancel-edit-button {
  width: 100%;
  margin-top: 8px;
  padding: 11px 12px;
  color: #667085;
  background-color: var(--brand-white);
  border: 1px solid #cbd3df;
  border-radius: 9px;
  font: inherit;
  font-size: 13px;
  font-weight: bold;
  cursor: pointer;
}

.admin-community-cancel-edit-button:active {
  color: var(--brand-white);
  background-color: #667085;
}

.admin-community-cancel-edit-button:disabled {
  opacity: 0.5;
  cursor: wait;
}

/* 센터 소식 유튜브 영상 */
.admin-community-video-preview {
  margin-top: 12px;
}

.community-video-area {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border: 1px solid #dbe2ec;
  border-radius: 16px;
  background: #0b1220;
}

.community-video-area.is-shorts {
  width: min(100%, 320px);
  aspect-ratio: 9 / 16;
  margin-right: auto;
  margin-left: auto;
}

.community-video-facade {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: inherit;
  background: #0b1220;
  cursor: pointer;
}

.community-video-thumbnail {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.community-video-area.is-shorts
  .community-video-thumbnail {
  object-fit: contain;
}

.community-video-facade::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.05),
    rgba(0, 0, 0, 0.36)
  );
}

.community-video-play-button {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 1;
  display: grid;
  width: 64px;
  height: 64px;
  place-items: center;
  padding-left: 4px;
  border-radius: 50%;
  color: #ffffff;
  background: #ff6b00;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
  transform: translate(-50%, -50%);
}

.community-video-play-text {
  position: absolute;
  bottom: 18px;
  left: 50%;
  z-index: 1;
  color: #ffffff;
  font-size: 14px;
  font-weight: 700;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.7);
  transform: translateX(-50%);
}

.community-video-frame {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}

.community-video-facade:focus-visible {
  outline: 3px solid #ff6b00;
  outline-offset: -3px;
}

@media (max-width: 480px) {
  .community-video-play-button {
    width: 56px;
    height: 56px;
  }

  .community-video-play-text {
    bottom: 14px;
    font-size: 13px;
  }
}

/* 관리자 센터 소식 순서 변경 버튼 */
.admin-community-order-button {
  width: 100%;
  padding: 5px 3px;
  color: #5f6b7c;
  background-color: #f5f7fa;
  border: 1px solid #cbd3df;
  border-radius: 6px;
  font: inherit;
  font-size: 11px;
  line-height: 1.2;
  font-weight: bold;
  cursor: pointer;
}

.admin-community-order-button:active {
  color: var(--brand-white);
  background-color: var(--brand-orange);
  border-color: var(--brand-orange);
}

.admin-community-order-button:disabled {
  opacity: 0.35;
  cursor: default;
}

/* 회원 1:1 문의 영역 */
.member-inquiry-section {
  margin-bottom: 28px;
  padding: 18px;
  background-color: var(--brand-white);
  border: 1px solid var(--brand-border);
  border-radius: 18px;
  box-shadow: 0 8px 20px rgba(23, 35, 62, 0.06);
}

.member-inquiry-header h3 {
  margin: 0;
  color: var(--brand-navy);
  font-size: 19px;
  line-height: 1.4;
}

.member-inquiry-header p {
  margin: 8px 0 0;
  color: #667085;
  font-size: 13px;
  line-height: 1.6;
  word-break: keep-all;
}

.member-inquiry-availability-message,
.member-inquiry-submit-message,
.member-inquiry-list-message {
  margin: 12px 0 0;
  color: #667085;
  font-size: 13px;
  line-height: 1.6;
}

.member-inquiry-composer {
  display: grid;
  gap: 10px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid #e5e8ee;
}

.member-inquiry-composer[hidden] {
  display: none !important;
}

.member-inquiry-composer label {
  color: var(--brand-navy);
  font-size: 14px;
  font-weight: bold;
}

.member-inquiry-composer input,
.member-inquiry-composer textarea {
  width: 100%;
  padding: 12px 13px;
  color: var(--brand-navy);
  background-color: var(--brand-white);
  border: 1px solid #cbd3df;
  border-radius: 10px;
  font: inherit;
  font-size: 14px;
  line-height: 1.55;
}

.member-inquiry-composer textarea {
  resize: vertical;
}

.member-inquiry-composer input:focus,
.member-inquiry-composer textarea:focus {
  border-color: var(--brand-orange);
  outline: 3px solid rgba(255, 107, 0, 0.12);
}

#sendMemberInquiryButton {
  width: 100%;
  margin-top: 4px;
  padding: 12px 14px;
  color: var(--brand-white);
  background-color: var(--brand-orange);
  border: 1px solid var(--brand-orange);
  border-radius: 10px;
  font: inherit;
  font-size: 14px;
  font-weight: bold;
  cursor: pointer;
}

#sendMemberInquiryButton:disabled {
  opacity: 0.55;
  cursor: wait;
}

.member-inquiry-history {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid #e5e8ee;
}

.member-inquiry-history h3 {
  margin: 0;
  color: var(--brand-navy);
  font-size: 17px;
  line-height: 1.4;
}

.member-inquiry-list {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

/* 회원 문의 목록 카드 */
.member-inquiry-card {
  overflow: hidden;
  background-color: #f9fafb;
  border: 1px solid #dbe2ec;
  border-radius: 12px;
}

.member-inquiry-summary-button {
  display: flex;
  width: 100%;
  flex-direction: column;
  gap: 4px;
  padding: 10px 12px;
  color: inherit;
  background-color: transparent;
  border: 0;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.member-inquiry-summary-button:active {
  background-color: #f1f4f8;
}

.member-inquiry-summary-button::after {
  content: "문의 내용 보기";
  color: var(--brand-orange);
  font-size: 12px;
  font-weight: bold;
}

.member-inquiry-summary-button[aria-expanded="true"]::after {
  content: "문의 내용 닫기";
}

.member-inquiry-summary-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
}

.member-inquiry-card-title {
  min-width: 0;
  color: var(--brand-navy);
  font-size: 15px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.member-inquiry-status {
  flex-shrink: 0;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: bold;
}

.member-inquiry-status.is-waiting {
  color: #a44a00;
  background-color: #fff0e4;
}

.member-inquiry-status.is-answered {
  color: #19704b;
  background-color: #e7f7ef;
}

.member-inquiry-card-meta {
  color: #7a8494;
  font-size: 12px;
  line-height: 1.4;
}

/* 문의 질문·답변 기록 */
.member-inquiry-thread {
  display: grid;
  gap: 10px;
  padding: 14px;
  background-color: #f4f6f9;
  border-top: 1px solid #dbe2ec;
}

.member-inquiry-message-list {
  display: grid;
  gap: 10px;
}

.member-inquiry-thread[hidden] {
  display: none !important;
}

.member-inquiry-message {
  width: min(92%, 340px);
  padding: 12px 13px;
  border-radius: 12px;
}

.member-inquiry-message.is-member {
  margin-left: auto;
  background-color: #fff4e9;
  border: 1px solid #ffd2ad;
}

.member-inquiry-message.is-admin {
  margin-right: auto;
  background-color: #edf5ff;
  border: 1px solid #c8dcf5;
}

.member-inquiry-message-label {
  display: block;
  margin-bottom: 6px;
  color: var(--brand-navy);
  font-size: 12px;
}

.member-inquiry-message-body {
  margin: 0;
  color: #273349;
  font-size: 14px;
  line-height: 1.65;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.member-inquiry-message-date {
  display: block;
  margin-top: 8px;
  color: #7a8494;
  font-size: 11px;
  text-align: right;
}

/* 기존 문의방의 추가 질문 작성 영역 */
.member-inquiry-reply-area {
  display: grid;
  gap: 9px;
  margin-top: 4px;
  padding-top: 14px;
  border-top: 1px solid #dbe2ec;
}

.member-inquiry-reply-area label {
  color: var(--brand-navy);
  font-size: 13px;
  font-weight: bold;
}

.member-inquiry-reply-area textarea {
  width: 100%;
  padding: 11px 12px;
  color: var(--brand-navy);
  background-color: var(--brand-white);
  border: 1px solid #cbd3df;
  border-radius: 9px;
  font: inherit;
  font-size: 13px;
  line-height: 1.55;
  resize: vertical;
}

.member-inquiry-reply-area textarea:focus {
  border-color: var(--brand-orange);
  outline: 3px solid rgba(255, 107, 0, 0.12);
}

.member-inquiry-reply-area button {
  width: 100%;
  padding: 10px 12px;
  color: var(--brand-white);
  background-color: var(--brand-orange);
  border: 1px solid var(--brand-orange);
  border-radius: 9px;
  font: inherit;
  font-size: 13px;
  font-weight: bold;
  cursor: pointer;
}

.member-inquiry-reply-area button:disabled {
  opacity: 0.55;
  cursor: wait;
}

.member-inquiry-reply-message,
.member-inquiry-reply-disabled-message {
  margin: 0;
  color: #667085;
  font-size: 12px;
  line-height: 1.55;
}

.member-inquiry-reply-disabled-message {
  padding: 12px;
  background-color: #f3f5f8;
  border-radius: 9px;
  text-align: center;
}

/* 관리자 1:1 문의 설정 */
.admin-inquiry-setting {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 16px;
  padding: 14px;
  background-color: #f6f8fb;
  border: 1px solid #dbe2ec;
  border-radius: 12px;
}

.admin-inquiry-setting-text {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 5px;
}

.admin-inquiry-setting-text strong {
  color: var(--brand-navy);
  font-size: 14px;
}

.admin-inquiry-setting-text span {
  color: #667085;
  font-size: 12px;
  line-height: 1.5;
  word-break: keep-all;
}

.admin-inquiry-toggle-button {
  flex-shrink: 0;
  min-width: 86px;
  padding: 9px 12px;
  color: #667085;
  background-color: var(--brand-white);
  border: 1px solid #cbd3df;
  border-radius: 999px;
  font: inherit;
  font-size: 12px;
  font-weight: bold;
  cursor: pointer;
}

.admin-inquiry-toggle-button[aria-pressed="true"] {
  color: #ffffff;
  background-color: #16875b;
  border-color: #16875b;
}

.admin-inquiry-toggle-button[aria-pressed="false"]:not(:disabled) {
  color: #a44738;
  background-color: #fff5f3;
  border-color: #d7a49b;
}

.admin-inquiry-toggle-button:disabled {
  opacity: 0.55;
  cursor: wait;
}

/* 관리자 문의 목록 제목 */
.admin-inquiry-list-header {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid #e5e8ee;
}

.admin-inquiry-list-header h3 {
  margin: 0;
  color: var(--brand-navy);
  font-size: 17px;
  line-height: 1.4;
}

.admin-inquiry-list-header p {
  margin: 6px 0 0;
  color: #667085;
  font-size: 12px;
  line-height: 1.5;
}

.admin-inquiry-filters {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 16px 0;
}

.admin-inquiry-filter-button {
  min-height: 44px;
  padding: 9px 6px;
  border: 1px solid #d8dee9;
  border-radius: 12px;
  background-color: #ffffff;
  color: #667085;
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}

.admin-inquiry-filter-button.is-active {
  border-color: #ff6b00;
  background-color: #fff3e8;
  color: #e85f00;
}

.admin-inquiry-load-more-button {
  width: 100%;
  min-height: 48px;
  margin-top: 14px;
  border: 1px solid #ff6b00;
  border-radius: 14px;
  background-color: #ffffff;
  color: #e85f00;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.admin-inquiry-load-more-button:hover {
  background-color: #fff7f1;
}

.admin-inquiry-load-more-button:disabled {
  cursor: wait;
  opacity: 0.65;
}

.admin-inquiry-load-more-button[hidden] {
  display: none;
}

.admin-inquiry-archive-area {
  display: grid;
  gap: 8px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid #e5e7eb;
}

.admin-inquiry-archive-button {
  width: 100%;
  min-height: 44px;
  padding: 10px 14px;
  border: 1px solid #b8c0cc;
  border-radius: 12px;
  background-color: #ffffff;
  color: #344054;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.admin-inquiry-archive-button:hover {
  background-color: #f8fafc;
}

.admin-inquiry-archive-button:disabled {
  cursor: wait;
  opacity: 0.65;
}

.admin-inquiry-archive-message {
  min-height: 20px;
  margin: 0;
  color: #c2410c;
  font-size: 13px;
  line-height: 1.5;
}

.admin-inquiry-reply-area[hidden] {
  display: none;
}

.admin-inquiry-list {
  display: grid;
  gap: 12px;
  margin-top: 12px;
}

@media (max-width: 380px) {
  .admin-inquiry-setting {
    align-items: stretch;
    flex-direction: column;
  }

  .admin-inquiry-toggle-button {
    width: 100%;
  }
}

/* 관리자 회원 문의 목록 */
.admin-inquiry-card {
  overflow: hidden;
  border: 1px solid #d9e0ea;
  border-radius: 16px;
  background: #ffffff;
}

.admin-inquiry-summary-button {
  position: relative;
  display: flex;
  width: 100%;
  flex-direction: column;
  gap: 8px;
  padding: 18px 48px 18px 18px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #0c1e3a;
  text-align: left;
  cursor: pointer;
}

.admin-inquiry-summary-button::after {
  position: absolute;
  top: 50%;
  right: 18px;
  content: "▼";
  color: #67758a;
  font-size: 13px;
  transform: translateY(-50%);
}

.admin-inquiry-summary-button[aria-expanded="true"]::after {
  content: "▲";
}

.admin-inquiry-summary-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.admin-inquiry-member-name {
  font-size: 16px;
  font-weight: 800;
}

.admin-inquiry-status {
  flex-shrink: 0;
  padding: 5px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.admin-inquiry-status.is-waiting {
  background: #fff0e5;
  color: #f06400;
}

.admin-inquiry-status.is-answered {
  background: #e8f5ee;
  color: #18794e;
}

.admin-inquiry-title {
  font-size: 15px;
  font-weight: 700;
  line-height: 1.45;
}

.admin-inquiry-meta {
  color: #748094;
  font-size: 12px;
  line-height: 1.5;
}

.admin-inquiry-thread {
  padding: 18px;
  border-top: 1px solid #e1e6ee;
  background: #f7f9fc;
}

.admin-inquiry-thread[hidden] {
  display: none;
}

.admin-inquiry-reply-area {
  display: grid;
  gap: 10px;
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid #d9e0ea;
}

.admin-inquiry-reply-area label {
  color: #0c1e3a;
  font-size: 14px;
  font-weight: 800;
}

.admin-inquiry-reply-area textarea {
  width: 100%;
  min-height: 110px;
  padding: 13px;
  border: 1px solid #cfd8e6;
  border-radius: 12px;
  background: #ffffff;
  color: #0c1e3a;
  font: inherit;
  line-height: 1.6;
  resize: vertical;
}

.admin-inquiry-reply-area textarea:focus {
  border-color: #ff6b00;
  outline: 2px solid rgb(255 107 0 / 15%);
}

.admin-inquiry-reply-area button {
  width: 100%;
  min-height: 46px;
  border: 0;
  border-radius: 12px;
  background: #ff6b00;
  color: #ffffff;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.admin-inquiry-reply-area button:disabled {
  cursor: wait;
  opacity: 0.65;
}

.admin-inquiry-reply-message {
  min-height: 20px;
  margin: 0;
  color: #c74600;
  font-size: 13px;
  line-height: 1.5;
}

/* 회원 문의 내역 더 보기 */
.member-inquiry-load-more-button {
  width: 100%;
  min-height: 48px;
  margin-top: 14px;
  border: 1px solid #ff6b00;
  border-radius: 14px;
  background: #ffffff;
  color: #e85f00;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.member-inquiry-load-more-button:hover {
  background: #fff7f1;
}

.member-inquiry-load-more-button:disabled {
  cursor: wait;
  opacity: 0.65;
}

.member-inquiry-load-more-button[hidden] {
  display: none;
}

/* 회원 문의 삭제 */
.member-inquiry-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
}

.member-inquiry-summary-button {
  grid-column: 1 / -1;
  grid-row: 1;
}

.member-inquiry-thread {
  grid-column: 1 / -1;
  grid-row: 2;
}

.member-inquiry-delete-area {
  grid-column: 2;
  grid-row: 1;
  align-self: end;
  justify-self: end;
  z-index: 1;
  padding: 0 12px 8px 0;
}

.member-inquiry-delete-button {
  border: 1px solid #ef9a8c;
  background-color: #fff8f6;
  box-shadow: 0 1px 3px rgba(180, 35, 24, 0.12);
  color: #c2412d;
  font-family: inherit;
  cursor: pointer;
}

.member-inquiry-delete-button:active {
  background-color: #fde9e5;
  box-shadow: none;
  transform: translateY(1px);
}

.member-inquiry-delete-button:disabled {
  opacity: 0.55;
  cursor: wait;
}

.member-inquiry-delete-message {
  margin: 0;
  color: #b42318;
  font-size: 12px;
  line-height: 1.4;
}

.member-inquiry-delete-message:empty {
  display: none;
}

/* 관리자 문의 카드 우측 하단 보관 버튼 */
.admin-inquiry-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
}

.admin-inquiry-summary-button {
  grid-column: 1 / -1;
  grid-row: 1;
}

.admin-inquiry-thread {
  grid-column: 1 / -1;
  grid-row: 2;
}

.admin-inquiry-meta {
  display: grid;
  gap: 2px;
  min-width: 0;
  padding-right: 120px;
  box-sizing: border-box;
}

.admin-inquiry-meta-date,
.admin-inquiry-meta-contact {
  display: block;
}

.admin-inquiry-meta-contact {
  overflow-wrap: anywhere;
  word-break: break-word;
}

/* 관리자 새 루틴 신청 알림 */
.admin-routine-request-list {
  display: grid;
  gap: 10px;
}

.admin-routine-request-card {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid #dbe2ec;
  border-radius: 12px;
  background-color: #f8f9fb;
}

.admin-routine-request-content {
  min-width: 0;
}

.admin-routine-request-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}

.admin-routine-request-header strong {
  color: var(--brand-navy);
  font-size: 15px;
  overflow-wrap: anywhere;
}

.admin-routine-request-badge {
  padding: 4px 8px;
  border-radius: 999px;
  background-color: #fff0df;
  color: #b84d00;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.admin-routine-request-date,
.admin-routine-request-contact {
  margin: 6px 0 0;
  color: #667085;
  font-size: 12px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.admin-routine-request-card
.admin-routine-request-select-button {
  width: auto;
  justify-self: end;
  margin: 0;
  padding: 6px 10px;
  border: 1px solid var(--brand-orange);
  border-radius: 8px;
  background-color: #fff;
  color: var(--brand-orange);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.4;
  cursor: pointer;
}

.signup-email-help {
  margin: -4px 0 0;
  color: var(--brand-orange);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.5;
}

/* 비밀번호 보기·숨기기 아이콘 */
.password-toggle {
  font-size: 0;
}

.password-toggle::before {
  content: "";
  display: block;
  width: 22px;
  height: 22px;
  margin: 0 auto;
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2352657f' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2 12s3.5-7 10-7 10 7 10 7-3.5 7-10 7S2 12 2 12Z'/%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3C/svg%3E");
}

.password-toggle[aria-pressed="true"]::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2352657f' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2 12s3.5-7 10-7 10 7 10 7-3.5 7-10 7S2 12 2 12Z'/%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3Cpath d='m3 3 18 18'/%3E%3C/svg%3E");
}

/* 센터 커뮤니티 중분류 메뉴 */
.community-menu {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 24px;
}

.community-menu-button {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-width: 0;
  padding: 8px 10px 12px;
  border: 1px solid #e3e8ef;
  border-radius: 16px;
  background-color: #fff;
  color: #667085;
  font: inherit;
  line-height: 1.4;
  cursor: pointer;
}

.community-menu-icon {
  display: block;
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  opacity: 0.75;
}

.community-menu-label {
  font-size: 14px;
  font-weight: 700;
}

/* 선택 표시선 */
.community-menu-button::after {
  content: "";
  position: absolute;
  bottom: 7px;
  left: 50%;
  width: 28px;
  height: 3px;
  border-radius: 999px;
  background-color: transparent;
  transform: translateX(-50%);
}

/* 현재 선택한 메뉴 */
.community-menu-button.is-active {
  border-color: #ffc99d;
  background-color: #fff1e4;
  color: #b84d00;
}

.community-menu-button.is-active .community-menu-icon {
  opacity: 1;
}

.community-menu-button.is-active::after {
  background-color: var(--brand-orange);
}

.community-menu-button:focus-visible {
  outline: 2px solid var(--brand-orange);
  outline-offset: 3px;
}

/* 문의하기 서비스 중단 안내 */
.community-menu-unavailable-message {
  font-size: 11px;
  font-weight: 400;
  line-height: 1.4;
  color: #7b8492;
}

/* 비활성화된 커뮤니티 메뉴 */
.community-menu-button:disabled {
  background-color: #f1f2f4;
  border-color: #e2e5e9;
  color: #9299a3;
  cursor: not-allowed;
  box-shadow: none;
}

.community-menu-button:disabled .community-menu-icon {
  opacity: 0.35;
}

.community-menu-button:disabled::after {
  background-color: transparent;
}

/* 회원 루틴 캐러셀 */
.routine-carousel {
  width: 100%;
  min-width: 0;
  margin: 0 0 16px;
}

/* 좌우로 넘기는 이미지·캡션 영역 */
.routine-carousel-track {
  display: flex;
  align-items: flex-start;
  width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  scrollbar-width: none;
  overscroll-behavior-x: contain;
}

.routine-carousel-track::-webkit-scrollbar {
  display: none;
}

.routine-carousel-track.has-multiple-images {
  cursor: grab;
}

.routine-carousel-track.is-dragging {
  cursor: grabbing;
  scroll-behavior: auto;
  scroll-snap-type: none;
  user-select: none;
}

/* 이미지 한 장과 해당 캡션 */
.routine-carousel-slide {
  box-sizing: border-box;
  flex: 0 0 100%;
  min-width: 0;
  margin: 0;
  padding: 0;
  scroll-snap-align: start;
  scroll-snap-stop: always;
}

.routine-carousel-slide img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 5;
  object-fit: contain;
  object-position: center;
  background-color: transparent;
  border: 0;
  box-shadow: none;
  user-select: none;
  -webkit-user-drag: none;
}

/* 이미지 바로 아래의 작은 캡션 */
.routine-carousel-caption {
  margin: 10px 12px 0;
  color: #667085;
  font-size: 12px;
  font-weight: 400;
  line-height: 1.5;
  text-align: center;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

/* 이전·다음 버튼과 위치 표시 */
.routine-carousel-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 10px 0 0;
}

.routine-carousel-button {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 36px;
  height: 32px;
  margin: 0;
  padding: 0;
  color: var(--brand-navy);
  background-color: transparent;
  border: 1px solid var(--brand-border);
  border-radius: 50%;
  font: inherit;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

.routine-carousel-button:disabled {
  opacity: 0.3;
  cursor: default;
}

.routine-carousel-dots {
  display: flex;
  align-items: center;
  gap: 4px;
}

.routine-carousel-dot {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 28px;
  margin: 0;
  padding: 0;
  background-color: transparent;
  border: 0;
  cursor: pointer;
}

.routine-carousel-dot::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background-color: #c7ced9;
}

.routine-carousel-dot.is-active::before {
  width: 22px;
  background-color: var(--brand-orange);
}

.routine-carousel-button:focus-visible,
.routine-carousel-dot:focus-visible {
  outline: 2px solid var(--brand-orange);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  .routine-carousel-track {
    scroll-behavior: auto;
  }
}

/* AI 루틴 JSON 입력 영역 */
.admin-routine-json-panel {
  display: grid;
  gap: 12px;
  min-width: 0;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--brand-border);
}

.admin-routine-json-panel > h3 {
  margin: 0;
  color: var(--brand-navy);
  font-size: 18px;
}

.admin-routine-json-panel > .admin-field-help {
  margin: 0;
}

#adminRoutineJsonInput {
  font-size: 13px;
  line-height: 1.6;
}

#adminRoutineJsonInput[aria-invalid="true"] {
  border-color: #d92d20;
}

#previewAdminRoutineJsonButton {
  width: 100%;
  padding: 12px;
  color: var(--brand-orange);
  background: #fff5eb;
  border: 1px solid var(--brand-orange);
  border-radius: 10px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

#previewAdminRoutineJsonButton:disabled {
  opacity: 0.45;
  cursor: default;
}

/* 관리자 미리보기와 회원 화면에서 공통으로 사용할 운동 카드 */
.routine-components {
  min-width: 0;
  overflow-anchor: none;
}

.routine-component-day-title {
  margin: 22px 0 12px;
  color: var(--brand-navy);
  font-size: 18px;
}

.routine-component-card {
  min-width: 0;
  padding: 14px;
  background: #ffffff;
  border: 1px solid var(--brand-border);
  border-radius: 14px;
  overflow-wrap: anywhere;
}

.routine-component-info {
  min-width: 0;
}

.routine-component-title {
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.routine-component-number {
  flex-shrink: 0;
  white-space: nowrap;
  color: var(--brand-orange);
  font-size: 13px;
  font-weight: 800;
}

.routine-component-main {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
}

.routine-component-image-area {
  display: grid;
  place-items: center;
  width: 88px;
  height: 88px;
  overflow: hidden;
  background: #f8fafc;
  border-radius: 10px;
}

.routine-component-image-area img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.routine-component-image-placeholder {
  padding: 6px;
  color: #667085;
  font-size: 11px;
  text-align: center;
}

.routine-component-name {
  min-width: 0;
  margin: 0;
  color: var(--brand-orange);
  font-size: 20.8px;
  line-height: 1.4;
  word-break: keep-all;
  overflow-wrap: anywhere;
}

.routine-component-body-parts {
  margin: 3.5px 0 5px;
  color: #667085;
  font-size: 13px;
  line-height: 1.5;
}

.routine-component-dose {
  margin: 0;
  color: var(--brand-navy);
  font-size: 15px;
  font-weight: 700;
}

.routine-component-rest {
  margin: 2.8px 0 0;
  color: #667085;
  font-size: 13px;
}

.routine-component-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 14px;
}

.routine-component-actions button {
  min-width: 0;
  min-height: 33px;
  padding: 3px 4px;
  color: #111111;
  background: #ffffff;
  border: 1px solid #111111;
  border-radius: 9px;
  font: inherit;
  font-size: 13px;
  line-height: 1.4;
  word-break: keep-all;
  font-weight: 700;
  cursor: pointer;
}

.routine-component-actions button[aria-expanded="true"] {
  color: var(--brand-orange);
  background: #fff5eb;
  border-color: var(--brand-orange);
}

.routine-component-actions button:disabled {
  opacity: 0.45;
  cursor: default;
}

.routine-component-details {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--brand-border);
}

.routine-component-details h5 {
  margin: 12px 0 5px;
  color: var(--brand-navy);
  font-size: 14px;
}

.routine-component-details p,
.routine-component-checklist {
  margin: 0;
  color: #475467;
  font-size: 14px;
  line-height: 1.7;
  white-space: pre-wrap;
  word-break: keep-all;
  overflow-wrap: anywhere;
}

.routine-component-checklist {
  padding: 0;
  list-style: none;
}

.routine-component-checklist li {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.routine-component-checklist li + li {
  margin-top: 6px;
}

.routine-component-checkmark {
  flex: 0 0 auto;
  color: var(--brand-orange);
  font-weight: 700;
}

.routine-component-arrow {
  padding: 4px 0;
  color: #98a2b3;
  font-size: 13px;
  line-height: 1;
  text-align: center;
}

.routine-component-summary {
  margin-top: 22px;
  padding-top: 16px;
  border-top: 1px solid var(--brand-border);
  padding-bottom: 20px;
  border-bottom: 1px solid var(--brand-border);
  margin-bottom: 20px;
}

.routine-component-summary h4 {
  margin: 0 0 10px;
  color: var(--brand-navy);
  font-size: 16px;
}

.routine-component-summary p {
  margin: 0;
  color: #475467;
  font-size: 15px;
  line-height: 1.8;
  white-space: pre-line;
  word-break: keep-all;
  overflow-wrap: anywhere;
}

/* 운동 카드 영상 영역 */
.routine-component-media {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--brand-border);
}

.routine-component-video-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  min-height: 200px;
  overflow: hidden;
  border-radius: 10px;
  background: #000;
}

.routine-component-video-frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.routine-component-gif {
  display: block;
  width: 100%;
  max-height: 360px;
  object-fit: contain;
  border-radius: 10px;
}

.routine-component-media-message {
  margin: 8px 0;
  color: #667085;
  font-size: 12px;
  line-height: 1.6;
}

.routine-component-video-link {
  display: inline-block;
  margin-top: 10px;
  color: var(--brand-orange);
  font-size: 12px;
  text-underline-offset: 3px;
}

/* 검사한 JSON 루틴을 회원에게 적용 */
.admin-routine-json-apply-button {
  width: 100%;
  min-height: 46px;
  padding: 12px 16px;
  border: 1px solid var(--brand-orange);
  border-radius: 10px;
  background: var(--brand-orange);
  color: #fff;
  font: inherit;
  font-weight: 700;
  line-height: 1.4;
  cursor: pointer;
}

.admin-routine-json-apply-button:disabled {
  border-color: #dbe2ec;
  background: #eef1f5;
  color: #667085;
  cursor: default;
}

.admin-routine-json-apply-button:focus-visible {
  outline: 2px solid var(--brand-navy);
  outline-offset: 3px;
}

/* 관리자 루틴 미리보기의 가로폭 확장 방지 */
#adminRoutineEditor,
.admin-routine-json-panel {
  grid-template-columns: minmax(0, 1fr);
}

.admin-routine-json-panel > * {
  min-width: 0;
  max-width: 100%;
}

#adminRoutineJsonPreview {
  width: 100%;
  min-width: 0;
}

#adminRoutineJsonPreview .routine-component-video-frame {
  min-width: 0;
  max-width: 100%;
}

/* 패턴별 운동 목록 접기·펼치기 */
.routine-component-day {
  min-width: 0;
  margin-top: 12px;
  overflow-anchor: none;
}

.routine-component-day-heading {
  margin: 0;
}

/* 패턴 이름과 운동 개수를 두 줄로 구분하고, 블록 전체가 버튼임을 강조합니다. */
.routine-component-day-toggle {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-rows: auto auto;
  align-items: center;
  align-content: center;
  column-gap: 10px;
  row-gap: 3px;
  width: 100%;
  min-width: 0;
  min-height: 84px;
  margin: 0;
  padding: 12px 14px;
  border: 2px solid var(--brand-orange);
  border-left-width: 5px;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 3px 9px rgba(23, 35, 62, 0.08);
  color: var(--brand-navy);
  font: inherit;
  line-height: 1.4;
  text-align: left;
  cursor: pointer;
}

.routine-component-day-label {
  grid-column: 1;
  grid-row: 1;
  font-size: 21px;
  font-weight: 800;
  white-space: nowrap;
}

.routine-component-day-count {
  grid-column: 1;
  grid-row: 2;
  color: #606b7e;
  font-size: 14px;
  font-weight: 400;
  white-space: nowrap;
}

.routine-component-day-action {
  grid-column: 2;
  grid-row: 1 / span 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 0 10px;
  border-radius: 8px;
  background: #ffeddf;
  color: var(--brand-navy);
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
}

.routine-component-day-toggle:focus-visible {
  outline: 2px solid var(--brand-orange);
  outline-offset: 3px;
}

/* 보너스 패턴은 선택형 운동 구성으로 차분한 무채색을 사용합니다. */
.routine-component-bonus > .routine-component-day-heading > .routine-component-day-toggle {
  border-color: #d6d6d6;
  background: #f3f3f3;
  box-shadow: none;
  color: #4b4b4b;
}

.routine-component-bonus .routine-component-day-label {
  white-space: normal;
  word-break: keep-all;
}

.routine-component-bonus .routine-component-day-count,
.routine-component-bonus .routine-component-day-action {
  color: #666666;
}

.routine-component-bonus .routine-component-day-action {
  background: #fff;
}

.routine-component-bonus > .routine-component-day-heading > .routine-component-day-toggle:focus-visible {
  outline-color: #737373;
}

.routine-component-day-content {
  min-width: 0;
  padding-top: 12px;
}

.routine-component-day-content[hidden] {
  display: none !important;
}

/* 펼쳐진 패턴 아래 구분선 — 마지막 패턴은 제외 */
.routine-component-day:has(+ .routine-component-day)
  > .routine-component-day-content:not([hidden]) {
  padding-bottom: 20px;
  border-bottom: 1px solid var(--brand-border);
}

/* 펼쳐진 패턴과 다음 패턴 버튼 사이 여백 */
.routine-component-day:has(
  > .routine-component-day-content:not([hidden])
) + .routine-component-day {
  margin-top: 20px;
}

/* 관리자 루틴: 선택한 입력 방식만 표시 */
.admin-routine-format-buttons {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 8px;
  min-width: 0;
}

.admin-routine-format-button {
  box-sizing: border-box;
  min-width: 0;
  min-height: 44px;
  padding: 10px 8px;
  color: var(--brand-navy);
  background: #fff;
  border: 1px solid var(--brand-border);
  border-radius: 10px;
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.4;
  cursor: pointer;
}

.admin-routine-format-button[aria-pressed="true"] {
  color: var(--brand-orange);
  background: #fff5eb;
  border-color: var(--brand-orange);
}

.admin-routine-format-button:disabled {
  cursor: default;
}

.admin-routine-format-button:disabled[aria-pressed="false"] {
  color: #8a909b;
  background: #f5f6f8;
}

.admin-routine-format-button:focus-visible {
  outline: 2px solid var(--brand-orange);
  outline-offset: 2px;
}

.admin-routine-format-help {
  margin: 0 0 4px;
}

.admin-routine-image-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
  min-width: 0;
}

.admin-routine-image-panel > * {
  min-width: 0;
  max-width: 100%;
}

#adminRoutineEditor > .admin-routine-json-panel {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

#adminSaveMessage:empty {
  display: none;
}


/* 운동 기구 사진 확대: 기존 카드 크기는 유지합니다. */
.routine-component-image-button {
  position: relative;
  box-sizing: border-box;
  padding: 0;
  border: 0;
  font: inherit;
  color: inherit;
  cursor: zoom-in;
}

.routine-component-image-button:disabled {
  cursor: default;
}

.routine-component-image-button:focus-visible {
  outline: 2px solid var(--brand-orange);
  outline-offset: 3px;
}

.routine-component-image-zoom-mark {
  position: absolute;
  right: 3px;
  bottom: 3px;
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 6px;
  color: #fff;
  background: rgba(20, 32, 52, 0.72);
  font-size: 18px;
  line-height: 1;
  pointer-events: none;
}

.routine-equipment-image-dialog {
  box-sizing: border-box;
  width: calc(100% - 24px);
  max-width: 800px;
  max-height: calc(100vh - 32px);
  max-height: calc(100dvh - 32px);
  margin: auto;
  padding: 16px;
  overflow: auto;
  overscroll-behavior: contain;
  color: var(--brand-navy);
  background: #fff;
  border: 0;
  border-radius: 16px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.24);
}

.routine-equipment-image-dialog::backdrop {
  background: rgba(12, 20, 32, 0.75);
}

.routine-equipment-image-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.routine-equipment-image-header h2 {
  min-width: 0;
  margin: 0;
  font-size: 18px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.routine-equipment-image-close {
  flex-shrink: 0;
  min-height: 44px;
  padding: 9px 14px;
  color: var(--brand-navy);
  background: #f5f6f8;
  border: 1px solid var(--brand-border);
  border-radius: 10px;
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}

.routine-equipment-image-full {
  display: block;
  width: 100%;
  height: auto;
  max-height: 72vh;
  max-height: 72dvh;
  object-fit: contain;
}

.routine-equipment-image-status {
  margin: 36px 0;
  color: #667085;
  font-size: 14px;
  text-align: center;
}


/* 운동 구성 전용 휴식 타이머 */
#routineTabPanel {
  padding-bottom: 72px;
}

.member-rest-timer {
  position: fixed;
  z-index: 510;
  left: 50%;
  bottom: var(--rest-timer-bottom, calc(88px + env(safe-area-inset-bottom)));
  transform: translateX(-50%);
  display: grid;
  justify-items: end;
  gap: 10px;
  width: calc(100% - 32px);
  max-width: 398px;
  pointer-events: none;
}

.rest-timer-panel,
.rest-timer-toggle {
  pointer-events: auto;
}

.rest-timer-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 44px;
  max-width: 100%;
  padding: 11px 16px;
  border: 1px solid var(--brand-orange);
  border-radius: 24px;
  color: var(--brand-orange);
  background: #fff;
  box-shadow: 0 4px 14px rgba(23, 35, 62, 0.14);
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  cursor: pointer;
}

.member-rest-timer[data-phase="running"] .rest-timer-toggle,
.member-rest-timer[data-phase="finished"] .rest-timer-toggle {
  color: #fff;
  background: var(--brand-orange);
}

.rest-timer-panel {
  width: 100%;
  max-width: 320px;
  max-height: calc(100vh - 180px - env(safe-area-inset-bottom));
  max-height: calc(100dvh - 180px - env(safe-area-inset-bottom));
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 16px;
  color: var(--brand-navy);
  background: #fff;
  border: 1px solid var(--brand-border);
  border-radius: 16px;
  box-shadow: 0 8px 28px rgba(23, 35, 62, 0.18);
}

.rest-timer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}

.rest-timer-header h3 {
  margin: 0;
  font-size: 16px;
}

.rest-timer-close {
  min-height: 40px;
  padding: 6px 10px;
  color: #667085;
  background: transparent;
  border: 0;
  border-radius: 8px;
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}

.rest-timer-presets,
.rest-timer-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.rest-timer-presets button,
.rest-timer-actions button {
  min-width: 0;
  min-height: 44px;
  padding: 9px 6px;
  color: var(--brand-navy);
  background: #f5f6f8;
  border: 1px solid var(--brand-border);
  border-radius: 10px;
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}

.rest-timer-presets button[aria-pressed="true"] {
  color: var(--brand-orange);
  background: #fff5eb;
  border-color: var(--brand-orange);
}

.rest-timer-display {
  margin: 14px 0 4px;
  color: var(--brand-navy);
  font-size: 44px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
  text-align: center;
}

.rest-timer-status {
  min-height: 36px;
  margin: 0 0 12px;
  color: #667085;
  font-size: 12px;
  line-height: 1.5;
  text-align: center;
}

.rest-timer-actions {
  grid-template-columns: 2fr 1fr;
}

#restTimerStart {
  color: #fff;
  background: var(--brand-orange);
  border-color: var(--brand-orange);
}

.member-rest-timer button:focus-visible {
  outline: 2px solid var(--brand-orange);
  outline-offset: 2px;
}

/* v50: 회원 화면을 제목 · 운동 패턴 · 안내 · 신청 영역으로 구분합니다. */
#appScreen {
  padding: 0 0 calc(104px + env(safe-area-inset-bottom));
  background: #eef1f5;
}

:is(#appScreen, #adminScreen) .member-app-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: calc(64px + env(safe-area-inset-top));
  margin: 0;
  padding: calc(10px + env(safe-area-inset-top)) 18px 10px;
  background: #fff;
  border-bottom: 1px solid #e4e8ef;
}

:is(#appScreen, #adminScreen) .member-app-topbar .screen-logo-top {
  flex-shrink: 0;
  width: 132px;
  height: 40px;
  max-width: calc(100% - 108px);
  margin: 0;
  object-fit: contain;
}

.member-topbar-actions {
  display: flex;
  align-items: center;
  gap: 4px;
}

:is(#appScreen, #adminScreen) .member-refresh-button,
.member-menu-toggle {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 10px;
  color: var(--brand-navy);
  background: transparent;
  border: 0;
  border-radius: 12px;
  cursor: pointer;
}

:is(#appScreen, #adminScreen) .member-refresh-button:active,
.member-menu-toggle[aria-expanded="true"] {
  color: var(--brand-navy);
  background: #eef1f5;
}

:is(#appScreen, #adminScreen) .member-app-topbar svg,
.member-nav-icon,
.member-inline-timer svg,
.rest-timer-toggle svg {
  display: block;
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.member-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.member-menu {
  position: relative;
}

.member-menu-panel {
  position: absolute;
  z-index: 520;
  top: calc(100% + 6px);
  right: 0;
  width: 156px;
  padding: 5px;
  background: #fff;
  border: 1px solid #e4e8ef;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(23, 35, 62, 0.14);
}

#appScreen #logoutButton,
#adminScreen #adminLogoutButton {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  min-height: 44px;
  padding: 8px 12px;
  color: var(--brand-navy);
  border: 0;
  border-radius: 8px;
  text-align: left;
}

#appScreen #logoutButton:hover,
#adminScreen #adminLogoutButton:hover {
  background: #eef1f5;
}

/* 회원 계정 안내: 로그아웃 버튼 밖에 두고 두 줄 정도 간격을 확보합니다. */
#memberMenuPanel {
  width: 220px;
  max-width: calc(100vw - 40px);
}

#memberAccountEmail {
  margin: 13px 12px 10px;
  color: #4b5563;
  font-size: 11px;
  font-weight: 400;
  line-height: 1.5;
  overflow-wrap: anywhere;
  user-select: text;
  cursor: text;
}

#appScreen > .member-tab-panel:not(#routineTabPanel) {
  padding: 24px 20px 0;
}

#appScreen #routineTabPanel {
  padding-bottom: 0;
}

.member-routine-hero {
  padding: 22px 20px 18px;
}

.member-routine-hero h2 {
  margin: 0 0 8px;
  color: var(--brand-orange);
  font-size: 26px;
  font-weight: 800;
  line-height: 1.35;
  letter-spacing: -0.8px;
  word-break: keep-all;
}

.member-assigned-routine {
  margin: 0;
  color: #657087;
  font-size: 13px;
  line-height: 1.6;
  overflow-wrap: anywhere;
}

.member-assigned-routine strong {
  font-weight: 500;
}

.member-workout-surface {
  min-width: 0;
  margin: 0 14px 16px;
  padding: 12px 14px 8px;
  background: #fff;
  border-radius: 20px;
  box-shadow: 0 4px 16px rgba(23, 35, 62, 0.05);
}

.member-workout-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0 6px;
  margin: 0 2px 8px;
}

.member-workout-heading h3 {
  margin: 0;
  padding: 10px 0;
  font-size: 17px;
  font-weight: 800;
}

.member-inline-timer {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-height: 40px;
  margin-left: auto;
  padding: 6px 0 6px 6px;
  color: var(--brand-orange);
  background: transparent;
  border: 0;
  border-radius: 8px;
  font: inherit;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  cursor: pointer;
}

.member-inline-timer svg {
  width: 16px;
  height: 16px;
}

.member-inline-timer[data-phase="running"],
.member-inline-timer[data-phase="finished"],
.member-inline-timer[aria-expanded="true"] {
  color: var(--brand-orange);
}

.rest-timer-toggle svg {
  width: 18px;
  height: 18px;
}

.member-routine-placeholder {
  margin: 16px 0 24px;
  color: #657087;
  font-size: 14px;
  line-height: 1.7;
  text-align: center;
  word-break: keep-all;
}

.routine-pattern-tabs {
  display: grid;
  grid-template-columns: repeat(var(--routine-pattern-columns, 4), minmax(0, 1fr));
  gap: 4px;
  padding: 4px;
  background: #eef1f5;
  border-radius: 12px;
}

.routine-pattern-tab {
  min-width: 0;
  min-height: 42px;
  padding: 6px 2px;
  color: #657087;
  background: transparent;
  border: 0;
  border-radius: 9px;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.4;
  overflow-wrap: anywhere;
  cursor: pointer;
}

.routine-pattern-tab[aria-selected="true"] {
  color: #fff;
  background: var(--brand-navy);
  box-shadow: 0 2px 4px rgba(23, 35, 62, 0.1);
}

.routine-pattern-caption {
  margin: 16px 2px 2px;
  color: #657087;
  font-size: 12px;
  line-height: 1.5;
}

:is(#appScreen, #adminRoutineJsonPreview) .routine-component-card {
  padding: 18.2px 2px;
  border: 0;
  border-radius: 0;
}

:is(#appScreen, #adminRoutineJsonPreview) .routine-component-card + .routine-component-card {
  border-top: 1px solid #e4e8ef;
}

:is(#appScreen, #adminRoutineJsonPreview) .routine-component-main {
  grid-template-columns: 84px minmax(0, 1fr);
}

:is(#appScreen, #adminRoutineJsonPreview) .routine-component-image-area {
  width: 84px;
  height: 84px;
  border-radius: 12px;
}

:is(#appScreen, #adminRoutineJsonPreview) .routine-component-title {
  gap: 5px;
}

:is(#appScreen, #adminRoutineJsonPreview) .routine-component-number {
  font-size: 12px;
}

:is(#appScreen, #adminRoutineJsonPreview) .routine-component-name {
  color: var(--brand-navy);
  font-size: 16px;
  font-weight: 800;
  line-height: 1.4;
}

:is(#appScreen, #adminRoutineJsonPreview) .routine-component-body-parts {
  margin: 3px 0 5px;
  font-size: 12px;
}

:is(#appScreen, #adminRoutineJsonPreview) .routine-component-dose {
  font-size: 14px;
}

:is(#appScreen, #adminRoutineJsonPreview) .routine-component-rest {
  font-size: 12px;
}

:is(#appScreen, #adminRoutineJsonPreview) .routine-component-actions {
  margin-top: 10px;
}

:is(#appScreen, #adminRoutineJsonPreview) .routine-component-actions button {
  color: #526078;
  border-color: #dce2eb;
  border-radius: 8px;
  font-weight: 600;
}

:is(#appScreen, #adminRoutineJsonPreview) .routine-component-actions button[aria-expanded="true"] {
  color: var(--brand-orange);
  border-color: var(--brand-orange);
}

.member-routine-summary {
  margin: 0 14px 16px;
}

:is(#appScreen, #adminRoutineJsonPreview) .routine-component-summary {
  margin: 0;
  padding: 0 16px;
  background: #e5ebf3;
  border: 0;
  border-radius: 16px;
}

.routine-component-summary summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 56px;
  padding: 15px 0;
  color: var(--brand-navy);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.5;
  list-style: none;
  cursor: pointer;
}

.routine-component-summary summary::-webkit-details-marker {
  display: none;
}

.routine-summary-chevron {
  flex-shrink: 0;
  width: 8px;
  height: 8px;
  margin-right: 3px;
  border-right: 1.8px solid currentColor;
  border-bottom: 1.8px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
}

.routine-component-summary[open] .routine-summary-chevron {
  transform: translateY(2px) rotate(225deg);
}

:is(#appScreen, #adminRoutineJsonPreview) .routine-component-summary p {
  padding-bottom: 16px;
  font-size: 13px;
  line-height: 1.8;
}

#appScreen #routineDescription {
  margin: 0 14px 14px;
}

#appScreen #toggleRoutineDescriptionButton,
#appScreen #installButton {
  width: calc(100% - 28px);
  margin-left: 14px;
  margin-right: 14px;
}

.member-routine-request-area {
  padding: 16px 18px 20px;
  background: #fff;
}

.member-routine-request-area .routine-request-button {
  margin-bottom: 0;
}

.member-routine-request-area .routine-request-status-message {
  margin: 10px 0 0;
}

#appScreen .member-bottom-nav {
  gap: 6px;
  padding: 10px 8px calc(10px + env(safe-area-inset-bottom));
  background: #fff;
  border-color: #e4e8ef;
  box-shadow: 0 -4px 16px rgba(23, 35, 62, 0.06);
}

#appScreen .member-tab-button {
  min-height: 62px;
  gap: 5px;
  border-radius: 14px;
}

#appScreen .member-tab-button.is-active::before {
  top: -10px;
  width: 36px;
  height: 4px;
  border-radius: 4px;
}

.member-menu-toggle:focus-visible,
:is(#appScreen, #adminScreen) .member-refresh-button:focus-visible,
#appScreen #logoutButton:focus-visible,
#adminScreen #adminLogoutButton:focus-visible,
.member-inline-timer:focus-visible,
.routine-pattern-tab:focus-visible,
.routine-pattern-panel:focus-visible,
.routine-component-summary summary:focus-visible {
  outline: 2px solid var(--brand-orange);
  outline-offset: 2px;
}

@media (max-width: 360px) {
  .member-routine-hero {
    padding-right: 16px;
    padding-left: 16px;
  }

  .member-routine-hero h2 {
    font-size: 24px;
  }

  .member-workout-surface {
    margin-right: 10px;
    margin-left: 10px;
    padding-right: 10px;
    padding-left: 10px;
  }

  :is(#appScreen, #adminRoutineJsonPreview) .routine-component-main {
    grid-template-columns: 76px minmax(0, 1fr);
    gap: 9px;
  }

  :is(#appScreen, #adminRoutineJsonPreview) .routine-component-image-area {
    width: 76px;
    height: 76px;
  }
}

/* v51: 회원 화면과 같은 배경·헤더·카드 체계를 관리자 화면에 적용합니다. */
#adminScreen {
  padding: 0 0 calc(32px + env(safe-area-inset-bottom));
  background: #eef1f5;
}

.admin-app-hero {
  padding: 22px 20px 20px;
}

.admin-app-eyebrow {
  margin: 0 0 6px;
  color: #657087;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.5;
}

.admin-app-hero h1 {
  margin: 0 0 8px;
  color: var(--brand-orange);
  font-size: 26px;
  font-weight: 800;
  line-height: 1.35;
  letter-spacing: -0.8px;
  word-break: keep-all;
}

.admin-app-intro {
  margin: 0;
  color: #657087;
  font-size: 13px;
  line-height: 1.6;
  word-break: keep-all;
}

#adminScreen > .admin-card {
  grid-template-columns: minmax(0, 1fr);
  min-width: 0;
  margin: 0 14px 16px;
  padding: 18px 16px;
  background: #fff;
  border: 0;
  border-radius: 20px;
  box-shadow: 0 4px 16px rgba(23, 35, 62, 0.05);
}

#adminScreen .admin-card > * {
  min-width: 0;
}

#adminScreen .admin-section-title {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 18px;
  font-weight: 800;
  line-height: 1.5;
  word-break: keep-all;
}

#adminScreen .admin-section-title::before {
  flex-shrink: 0;
  width: 4px;
  height: 18px;
  background: var(--brand-orange);
  border-radius: 4px;
  content: "";
}

#adminScreen .admin-section-description {
  margin: 0 0 4px;
  color: #657087;
}

#adminScreen .admin-card input,
#adminScreen .admin-card select,
#adminScreen .admin-card textarea {
  max-width: 100%;
  min-width: 0;
  color: var(--brand-navy);
  background: #f8fafc;
  border-radius: 12px;
}

#adminScreen .admin-card input,
#adminScreen .admin-card select {
  min-height: 44px;
}

#adminScreen .admin-card textarea {
  resize: vertical;
}

#adminScreen .admin-message {
  overflow-wrap: anywhere;
}

#adminScreen .admin-inquiry-setting {
  background: #e5ebf3;
  border: 0;
  border-radius: 14px;
}

#adminScreen .admin-inquiry-filters,
#adminScreen .admin-routine-format-buttons {
  gap: 4px;
  padding: 4px;
  background: #eef1f5;
  border-radius: 12px;
}

#adminScreen .admin-inquiry-filter-button,
#adminScreen .admin-routine-format-button {
  min-height: 42px;
  color: #657087;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 9px;
}

#adminScreen .admin-inquiry-filter-button.is-active,
#adminScreen .admin-routine-format-button[aria-pressed="true"] {
  color: #fff;
  background: var(--brand-navy);
  border-color: var(--brand-navy);
}

#adminScreen .admin-routine-format-button:disabled[aria-pressed="false"] {
  opacity: 0.55;
}

#adminScreen .admin-routine-request-card,
#adminScreen .admin-inquiry-card {
  border-color: #e4e8ef;
  border-radius: 14px;
}

#adminScreen .admin-routine-request-select-button {
  min-height: 36px;
  padding: 8px 12px;
}

#adminRoutineJsonPreview {
  padding: 12px;
  background: #fff;
  border: 1px solid #e4e8ef;
  border-radius: 16px;
}

#adminRoutineJsonPreview .routine-component-summary {
  margin-top: 16px;
  padding-right: 12px;
  padding-left: 12px;
}

#adminScreen .admin-routine-json-panel > h3 {
  font-size: 17px;
}

#adminScreen .admin-card input:focus-visible,
#adminScreen .admin-card select:focus-visible,
#adminScreen .admin-card textarea:focus-visible,
#adminScreen .admin-inquiry-filter-button:focus-visible {
  outline: 2px solid var(--brand-orange);
  outline-offset: 2px;
}

@media (max-width: 360px) {
  .admin-app-hero {
    padding-right: 16px;
    padding-left: 16px;
  }

  #adminScreen > .admin-card {
    margin-right: 10px;
    margin-left: 10px;
    padding-right: 12px;
    padding-left: 12px;
  }

  #adminRoutineJsonPreview {
    padding-right: 8px;
    padding-left: 8px;
  }
}

.member-routine-hero .member-cardio-notice {
  margin: 0 0 8px;
  color: #657087;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.6;
  word-break: keep-all;
  overflow-wrap: anywhere;
}
/* 이메일 비밀번호 재설정 */
.auth-text-link {
  box-sizing: border-box;
  min-height: 44px;
  margin-top: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
}

.password-reset-screen {
  padding: 24px 16px;
}

.password-reset-screen .login-box {
  box-sizing: border-box;
  padding: 28px 20px;
}

.password-reset-screen h1 {
  font-size: 28px;
  line-height: 1.4;
  word-break: keep-all;
}

.password-reset-screen .login-description {
  margin-bottom: 22px;
  word-break: keep-all;
  overflow-wrap: anywhere;
}

.auth-primary-button {
  min-height: 48px;
  margin-top: 10px;
  padding: 13px 10px;
  color: var(--brand-white);
  background: var(--brand-orange);
  border: 1px solid var(--brand-orange);
  border-radius: 12px;
  font: inherit;
  font-weight: bold;
  cursor: pointer;
}

.auth-primary-button:disabled {
  opacity: 0.6;
  cursor: default;
}

.auth-primary-button:focus-visible,
.auth-text-link:focus-visible {
  outline: 2px solid var(--brand-orange);
  outline-offset: 3px;
}

.auth-status,
.auth-help,
.auth-account {
  margin: 8px 0 0;
  color: #475467;
  font-size: 14px;
  line-height: 1.65;
  word-break: keep-all;
  overflow-wrap: anywhere;
}

.auth-status:empty {
  display: none;
}

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

.auth-help {
  margin-top: 14px;
  color: #667085;
  font-size: 13px;
}

.login-form .auth-help {
  margin: 0;
}

.auth-account {
  margin: 0 0 14px;
  padding: 10px 12px;
  border-radius: 10px;
  background: #fff3e8;
  font-weight: bold;
}

.auth-success-mark {
  margin: 16px 0;
  color: var(--brand-orange);
  font-size: 40px;
  text-align: center;
}

/* v64: 1DAY PT 장바구니 및 접수 */
.one-day-pt-entry { margin: 0 0 16px; padding: 0 4px; }
.one-day-pt-cart-toggle { display: flex; align-items: center; gap: 9px; width: 100%; min-height: 48px; padding: 12px 14px; border: 1px solid #f4c9a9; border-radius: 14px; background: #fff4ea; color: #a94200; font: inherit; font-size: 14px; font-weight: 700; text-align: left; }
.one-day-pt-cart-toggle svg { width: 22px; height: 22px; flex: 0 0 22px; }
.one-day-pt-count { margin-left: auto; white-space: nowrap; font-size: 13px; }
.one-day-pt-entry > p { margin: 8px 3px 0; font-size: 12px; line-height: 1.5; color: #64748b; }
#appScreen .one-day-pt-add-button { display: block; width: 100%; min-height: 40px; margin-top: 10px; padding: 9px 8px; border: 1px solid #f1c8aa; border-radius: 10px; background: #fff8f1; color: #a94200; font: inherit; font-size: 12px; font-weight: 700; line-height: 1.5; }
#appScreen .one-day-pt-add-button.is-added { background: #f0f5f2; border-color: #c9ddd2; color: #236244; opacity: 1; }
.one-day-pt-dialog { box-sizing: border-box; width: min(480px, calc(100vw - 24px)); max-height: min(85dvh, 820px); margin: auto; padding: 22px 18px; border: 0; border-radius: 22px; color: #18243b; background: #fff; box-shadow: 0 20px 70px #0004; overflow-y: auto; overscroll-behavior: contain; font-family: inherit; }
.one-day-pt-dialog::backdrop { background: #18243b99; }
.one-day-pt-dialog-header, .one-day-pt-history-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.one-day-pt-dialog-header h2 { margin: 0; font-size: 20px; color: #c24c00; }
.one-day-pt-dialog-header button, .one-day-pt-history-heading button, .one-day-pt-remove, .one-day-pt-secondary, .one-day-pt-admin-toolbar button, .one-day-pt-status-controls button { width: auto; flex-shrink: 0; min-height: 40px; padding: 8px 12px; border: 1px solid #d9dfe7; border-radius: 10px; background: #fff; color: #334155; font: inherit; font-size: 13px; font-weight: 600; }
.one-day-pt-help, #oneDayPtEmpty, .one-day-pt-message { font-size: 13px; line-height: 1.7; overflow-wrap: anywhere; }
.one-day-pt-help { color: #526176; }
.one-day-pt-cart-list { padding: 0; margin: 18px 0; list-style: none; }
.one-day-pt-cart-item { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; padding: 10px 12px; border-radius: 12px; background: #f5f6f8; font-size: 14px; }
.one-day-pt-cart-item span { overflow-wrap: anywhere; }
#submitOneDayPt.one-day-pt-primary { width: 100%; min-height: 48px; padding: 12px; border: 0; border-radius: 12px; background: #ee6600; color: #fff; font: inherit; font-size: 14px; font-weight: 700; line-height: 1.5; }
.one-day-pt-dialog button:disabled, #adminOneDayPtManagement button:disabled { cursor: default; opacity: .5; }
.one-day-pt-history { margin-top: 24px; border-top: 1px solid #e4e8ef; padding-top: 16px; }
.one-day-pt-history-heading h3 { margin: 0; font-size: 16px; }
.one-day-pt-request-list { display: grid; gap: 12px; }
.one-day-pt-request-card { border: 1px solid #e2e7ef; border-radius: 14px; padding: 14px; background: #fff; min-width: 0; }
.one-day-pt-request-heading { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; }
.one-day-pt-request-heading time { font-size: 12px; color: #64748b; }
.one-day-pt-status { display: inline-block; padding: 4px 9px; border-radius: 7px; background: #fff0df; color: #994000; font-size: 12px; font-weight: 700; }
.one-day-pt-status[data-status="contacted"] { background: #eaf0ff; color: #28538b; }
.one-day-pt-status[data-status="completed"] { background: #e8f5ec; color: #25623c; }
.one-day-pt-status[data-status="cancelled"] { background: #eef0f3; color: #556070; }
.one-day-pt-exercises { margin: 12px 0 0; padding-left: 22px; font-size: 14px; line-height: 1.8; overflow-wrap: anywhere; }
.one-day-pt-feedback { position: fixed; z-index: 120; bottom: calc(95px + env(safe-area-inset-bottom)); left: 50%; transform: translateX(-50%); width: max-content; max-width: calc(100vw - 40px); box-sizing: border-box; margin: 0; border-radius: 12px; padding: 12px 16px; background: #18243bef; color: #fff; font-size: 13px; line-height: 1.6; pointer-events: none; box-shadow: 0 4px 16px #0002; }
.one-day-pt-member { margin-bottom: 12px; }
.one-day-pt-member strong { font-size: 15px; }
.one-day-pt-member p { margin: 5px 0 0; color: #526176; font-size: 12px; line-height: 1.6; overflow-wrap: anywhere; }
.one-day-pt-admin-toolbar, .one-day-pt-status-controls { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.one-day-pt-admin-toolbar label, .one-day-pt-status-controls label { width: 100%; margin: 0; font-size: 13px; }
.one-day-pt-admin-toolbar select, .one-day-pt-status-controls select { width: auto; min-width: 0; flex: 1; margin: 0; padding: 9px; min-height: 40px; font-size: 13px; }
.one-day-pt-status-controls { margin-top: 14px; }
#moreAdminOneDayPt { margin-top: 14px; width: 100%; }
.one-day-pt-dialog button:focus-visible, .one-day-pt-cart-toggle:focus-visible, .one-day-pt-add-button:focus-visible { outline: 3px solid #f59a57; outline-offset: 3px; }

/* v66: 기존 문진을 유지하는 운동 구성 변경 신청 */
.routine-request-dialog { box-sizing: border-box; width: min(460px, calc(100vw - 24px)); max-height: 85dvh; margin: auto; padding: 22px 18px; border: 0; border-radius: 22px; background: #fff; color: #18243b; font-family: inherit; overflow-y: auto; overscroll-behavior: contain; }
.routine-request-dialog::backdrop { background: #18243b99; }
.routine-request-dialog-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.routine-request-dialog-heading h2 { margin: 0; font-size: 20px; color: #c24c00; }
.routine-request-dialog-heading button { width: auto; min-height: 40px; padding: 8px 12px; border: 1px solid #d9dfe7; border-radius: 10px; background: #fff; color: #334155; font: inherit; font-size: 13px; flex-shrink: 0; }
#routineRequestDialogHelp, .routine-request-dialog-message { font-size: 13px; line-height: 1.7; color: #526176; overflow-wrap: anywhere; }
.routine-request-choice { box-sizing: border-box; display: block; width: 100%; margin: 12px 0 0; padding: 16px 14px; border: 1px solid #d9dfe7; border-radius: 14px; background: #f8fafc; color: #18243b; font: inherit; text-align: left; text-decoration: none; cursor: pointer; }
.routine-request-choice strong { display: block; font-size: 15px; line-height: 1.6; }
.routine-request-choice span { display: block; margin-top: 5px; font-size: 12px; line-height: 1.6; color: #526176; }
.routine-request-choice-change { background: #fff4ea; border-color: #f4c9a9; color: #a94200; }
.routine-request-choice:disabled, .routine-request-choice[aria-disabled="true"] { opacity: .55; cursor: default; }
.routine-request-choice:focus-visible { outline: 3px solid #e87724; outline-offset: 3px; }
.routine-change-admin-note { color: #64748b; font-size: 12px; }
