/* 一劍飛花全站識別、側欄、目錄可讀性與月份篩選。 */
.yjh-brand-banner {
  min-height: 118px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 0 18px;
  padding: 8px 22px;
  overflow: hidden;
  background: #fffaf0;
  border: 3px solid #29263b;
  border-radius: 22px 8px 22px 8px;
  box-shadow: 7px 7px 0 #78dce1;
}
.yjh-brand-banner img {
  display: block;
  width: min(680px, 88%);
  height: 100px;
  object-fit: contain;
  object-position: center;
  mix-blend-mode: multiply;
}

.main-nav .yjh-nav-icon,
.main-nav button > span:first-child,
.main-nav a > span:first-child {
  display: grid !important;
  place-items: center !important;
  color: #29263b !important;
  background: #fff8e6 !important;
  border: 2px solid #29263b !important;
  font-size: 18px !important;
  line-height: 1 !important;
}
.main-nav .yjh-data-nav {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  color: #343246;
  text-decoration: none;
  font-size: 14px;
  font-weight: 800;
  border: 0;
  border-radius: 16px 5px 16px 5px;
}
.main-nav .yjh-data-nav:hover {
  color: #29263b;
  background: #c9f4ee;
}

.roster-catalog,
.roster-catalog input,
.roster-catalog button { color-scheme: light; }
.catalog-chips:not(.skill-catalog) > span {
  color: #29263b !important;
  background: #ffdbe6 !important;
  border: 2px solid #29263b !important;
  border-radius: 9px 4px 9px 4px !important;
  padding: 5px 8px !important;
  font-size: 13px !important;
  line-height: 1.15 !important;
  font-weight: 900 !important;
  text-shadow: none !important;
  box-shadow: 2px 2px 0 #ffd966 !important;
}
.catalog-chips:not(.skill-catalog) > span:nth-child(3n+2) { background: #fff0ad !important; }
.catalog-chips:not(.skill-catalog) > span:nth-child(3n) { background: #c9f4ee !important; }
.catalog-add input,
.catalog-add input[type="text"] {
  color: #29263b !important;
  -webkit-text-fill-color: #29263b !important;
  caret-color: #29263b !important;
  background: #fffdf8 !important;
  background-image: none !important;
  border: 2px solid #29263b !important;
  font-size: 13px !important;
  font-weight: 800 !important;
  text-shadow: none !important;
}
.catalog-add input::placeholder { color: #827789 !important; opacity: 1 !important; }
.catalog-add button {
  color: #fff !important;
  background: #f35d82 !important;
  border: 2px solid #29263b !important;
  font-size: 12px !important;
  box-shadow: 3px 3px 0 #29263b !important;
}

.yjh-month-filter {
  min-width: 170px;
  height: 42px;
  color: #29263b;
  background: #fffdf8;
  border: 2px solid #29263b;
  border-radius: 12px 4px 12px 4px;
  padding: 0 12px;
  font: 800 14px/1 "Microsoft JhengHei UI", sans-serif;
}
.yjh-attendance-month-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}
.yjh-attendance-month-wrap::before {
  content: "月份";
  color: #716c7b;
  font-size: 12px;
  font-weight: 900;
}

@media (max-width: 760px) {
  .main-nav { grid-template-columns: repeat(7, minmax(0, 1fr)) !important; }
  .yjh-brand-banner { min-height: 86px; margin-bottom: 14px; padding: 5px 10px; }
  .yjh-brand-banner img { width: 94%; height: 72px; }
  .main-nav .yjh-data-nav { flex-direction: column; justify-content: center; gap: 2px; padding: 3px; font-size: 10px; }
  .yjh-attendance-month-wrap { width: 100%; margin-left: 0; }
  .yjh-month-filter { width: 100%; }
}

/* 2026-08-25 第二輪：Logo 改到頁面標題右側，不再佔滿內容頂端。 */
.topbar > div:first-child {
  display: grid !important;
  grid-template-columns: max-content minmax(150px, 290px) !important;
  align-items: center !important;
  gap: 4px 16px !important;
}
.topbar > div:first-child > p { grid-column: 1 / -1; }
.yjh-topbar-logo {
  display: block;
  width: min(290px, 23vw);
  height: 64px;
  object-fit: contain;
  object-position: left center;
  mix-blend-mode: normal;
  filter: url(#yjh-transparent-logo);
}

/* 新增的數據／影片按鈕完全沿用原本主選單大小。 */
.main-nav .yjh-data-nav,
.main-nav .yjh-video-nav {
  width: 100% !important;
  min-height: 48px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 12px !important;
  padding: 9px 12px !important;
  color: #343246 !important;
  background: transparent !important;
  border: 0 !important;
  border-radius: 16px 5px 16px 5px !important;
  font: inherit !important;
  font-size: 14px !important;
  font-weight: 800 !important;
  text-align: left !important;
}
.main-nav .yjh-data-nav:hover,
.main-nav .yjh-video-nav:hover { color: #29263b !important; background: #c9f4ee !important; }
.main-nav .yjh-video-nav.active {
  color: #29263b !important;
  background: #ffdf61 !important;
  border: 3px solid #29263b !important;
  border-radius: 22px 7px 22px 7px !important;
  box-shadow: 6px 6px 0 #29263b !important;
}

/* 外援區改為與全站一致的亮色漫畫卡片。 */
.external-support-panel {
  color: #29263b !important;
  background: #fffef9 !important;
  border: 3px solid #29263b !important;
  box-shadow: 7px 7px 0 #78dce1 !important;
}
.external-support-panel > header { color: #29263b !important; background: #ffe27a !important; border-bottom: 3px solid #29263b !important; }
.external-support-panel > header h3,
.external-support-panel > header p,
.external-support-panel > header b { color: #29263b !important; }
.external-support-panel .external-form { background: #fff8e6 !important; border-bottom: 3px solid #29263b !important; }
.external-support-panel .external-form input,
.external-support-panel .external-form select {
  color: #29263b !important;
  -webkit-text-fill-color: #29263b !important;
  background: #fffdf8 !important;
  border: 2px solid #29263b !important;
}
.external-support-panel .external-list { background: #c9f4ee !important; }
.external-support-panel .external-list > div {
  color: #29263b !important;
  background: #fffef9 !important;
  border-bottom: 2px solid #29263b !important;
  border-left: 7px solid #f35d82 !important;
  min-height: 60px !important;
}
.external-support-panel .external-list > div > b { color: #29263b !important; font-size: 17px !important; line-height: 1.3 !important; }
.external-support-panel .external-list > div > small { color: #716c7b !important; font-size: 12px !important; }
.external-support-panel .external-list .job-badge { display: none !important; }
.external-job-icon { width: 38px !important; height: 38px !important; background: #fff8e6 !important; border: 2px solid #29263b !important; }
.external-job-icon img { width: 34px !important; height: 34px !important; object-fit: contain !important; }

/* 出席月份只加在「選擇活動日期」，日期仍在同一列。 */
.attendance-controls > div:nth-child(2) {
  grid-template-columns: 34px minmax(170px, 1fr) minmax(155px, .38fr) minmax(260px, .75fr) !important;
}
.attendance-controls > div:nth-child(2) > .yjh-month-filter,
.attendance-controls > div:nth-child(2) > .event-picker { width: 100% !important; min-width: 0 !important; }
.roster-history .yjh-attendance-month-wrap { display: none !important; }

/* 影片管理 */
.yjh-video-page[hidden] { display: none !important; }
.yjh-video-toolbar {
  display: grid;
  grid-template-columns: 165px 165px 145px minmax(210px, 1fr) 110px auto;
  gap: 10px;
  align-items: center;
  padding: 16px;
  margin-bottom: 18px;
}
.yjh-video-toolbar select,
.yjh-video-toolbar input,
.yjh-video-toolbar button {
  height: 42px;
  color: #29263b;
  background: #fffdf8;
  border: 2px solid #29263b;
  border-radius: 12px 4px 12px 4px;
  padding: 0 12px;
  font: 800 13px/1 "Microsoft JhengHei UI", sans-serif;
}
.yjh-video-toolbar button { color: #fff; background: #f35d82; box-shadow: 3px 3px 0 #29263b; }
.yjh-video-toolbar b { text-align: right; font-size: 14px; }
.yjh-video-list { display: grid; gap: 18px; }
.yjh-video-date-group { min-width: 0; }
.yjh-video-date-group > header { display: flex; align-items: center; gap: 12px; margin: 0 0 12px; padding: 10px 14px; border: 2px solid #59647c; border-radius: 14px 5px; color: #29263b; background: #c9f4ee; box-shadow: 4px 4px 0 rgba(89,100,124,.28); }
.yjh-video-date-group > header h3 { margin: 0; font-size: 19px; }
.yjh-video-date-group > header span { margin-left: auto; color: #59647c; font-size: 12px; font-weight: 900; }
.yjh-video-date-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 16px; }
.yjh-video-card {
  min-width: 0;
  color: #29263b;
  background: #fffef9;
  border: 3px solid #29263b;
  border-radius: 20px 7px 20px 7px;
  padding: 15px;
  box-shadow: 6px 6px 0 #78dce1;
}
.yjh-video-card:nth-child(3n+2) { box-shadow: 6px 6px 0 #ffd966; }
.yjh-video-card:nth-child(3n) { box-shadow: 6px 6px 0 #f58cac; }
.yjh-video-card header { display: flex; align-items: center; gap: 7px; }
.yjh-video-card header span,
.yjh-video-card header i { padding: 4px 8px; border: 2px solid #29263b; border-radius: 999px; font-size: 11px; font-style: normal; font-weight: 900; background: #8de3e7; }
.yjh-video-card header i { margin-left: auto; color: #fff; background: #f35d82; }
.yjh-video-card header i.public { color: #29263b; background: #c9f4ee; }
.yjh-video-card h3 { margin: 13px 0 7px; font-size: 18px; }
.yjh-video-card p { margin: 0 0 10px; color: #716c7b; font-size: 12px; }
.yjh-video-links { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 12px; }
.yjh-video-links a,
.yjh-discord-link { color: #29263b; background: #fff0ad; border: 2px solid #29263b; border-radius: 8px 3px 8px 3px; padding: 6px 9px; font-size: 12px; font-weight: 900; text-decoration: none; }
.yjh-discord-link { display: inline-block; background: #c9f4ee; }
.yjh-video-empty { grid-column: 1 / -1; padding: 32px; text-align: center; color: #716c7b; background: #fffef9; border: 3px dashed #29263b; border-radius: 20px 7px; }
.yjh-video-empty.error { color: #b21f46; }

/* 排表備註：時間可填，兩句提醒固定，另留自由備註。 */
.roster-note-editor > .yjh-note-storage { display: none !important; }
.yjh-note-controls { display: grid; gap: 10px; margin: 12px 0; }
.yjh-note-controls label > span,
.yjh-fixed-reminders > b { display: block; margin-bottom: 5px; color: #59647c; font-size: 11px; font-weight: 900; }
.yjh-meeting-time,
.yjh-note-proxy { width: 100%; color: #29263b !important; background: #fffdf8 !important; border: 2px solid #77829a !important; border-radius: 10px 4px !important; font: 800 13px/1.4 "Microsoft JhengHei UI", sans-serif !important; }
.yjh-meeting-time { height: 39px; padding: 0 10px; }
.yjh-note-proxy { min-height: 78px; padding: 9px 10px; resize: vertical; }
.yjh-fixed-reminders { display: grid; gap: 6px; padding: 10px; border: 2px dashed #8edfe4; border-radius: 12px 5px; background: #f4ffff; }
.yjh-fixed-reminders > b { margin: 0 0 2px; }
.yjh-fixed-reminders > span { color: #3e4354; font-size: 12px; font-weight: 800; }
.yjh-fixed-reminders > span::before { content: "✓"; margin-right: 7px; color: #f35d82; font-weight: 950; }

@media (max-width: 760px) {
  .topbar > div:first-child { grid-template-columns: max-content minmax(90px, 1fr) !important; gap: 2px 8px !important; }
  .yjh-topbar-logo { width: min(150px, 35vw); height: 48px; }
  .main-nav .yjh-data-nav,
  .main-nav .yjh-video-nav { min-height: 54px !important; flex-direction: column !important; justify-content: center !important; gap: 2px !important; padding: 3px !important; font-size: 9px !important; text-align: center !important; }
  .attendance-controls > div:nth-child(2) { grid-template-columns: 34px minmax(0, 1fr) !important; }
  .attendance-controls > div:nth-child(2) > .yjh-month-filter,
  .attendance-controls > div:nth-child(2) > .event-picker { grid-column: 1 / -1 !important; }
  .yjh-video-toolbar { grid-template-columns: 1fr; }
  .yjh-video-toolbar b { text-align: left; }
  .yjh-video-list { grid-template-columns: 1fr; }
  .yjh-video-date-grid { grid-template-columns: 1fr; }
}
