/* Shared presentation for BBS, Q&A and matching secondary pages.
   Keep the existing forms, JS selectors, permissions and routes unchanged. */
.region-subpage {
  --region-blue:#0170cc;
  --region-ink:#203447;
  --region-muted:#536577;
  --region-line:#d7e3ed;
  --region-accent:#0b69b5;
  --region-tint:#e8f4ff;
  box-sizing:border-box;
  max-width:1080px;
  margin:28px auto 52px;
  padding:0 20px;
  color:var(--region-ink);
}
.region-subpage-bbs { --region-accent:#995514; --region-tint:#fff1dc; }
.region-subpage-match { --region-accent:#17715b; --region-tint:#e3f6ef; }
.region-subpage a { color:#075eaa; }
.region-subpage .rbb-breadcrumb,.region-subpage .rqa-breadcrumb {
  margin:0 0 16px;
  color:var(--region-muted);
  font-size:13px;
  line-height:1.7;
  overflow-wrap:anywhere;
}
.region-subpage .rbb-board-head,.region-subpage .rqa-hero,.region-subpage .match-post-header {
  margin:0 0 18px;
  padding:clamp(18px,3vw,28px);
  border:1px solid var(--region-line);
  border-top:4px solid var(--region-blue);
  border-radius:14px;
  background:linear-gradient(115deg,#fff 40%,#f1f8fe);
}
.region-subpage .rbb-board-title,
.region-subpage .rqa-hero h1,
.region-subpage .match-post-header h1,
.region-subpage .rbb-thread-header h1,
.region-subpage .rqa-question h1 {
  margin:0 0 10px;
  color:var(--region-blue);
  font-size:clamp(22px,2.7vw,30px);
  line-height:1.45;
  overflow-wrap:anywhere;
}
.region-subpage .rbb-board-title [class^="icon-"],
.region-subpage .rqa-hero h1 [class^="icon-"],
.region-subpage .match-post-header h1 [class^="icon-"] {
  margin-right:9px;
  color:var(--region-accent);
  font-size:.85em;
}
.region-subpage .rbb-board-head p,
.region-subpage .rqa-hero p,
.region-subpage .match-post-header p { margin:5px 0; color:#354b5e; line-height:1.75; }
.region-subpage .rbb-kicker,.region-subpage .rqa-kicker,
.region-subpage .rbb-section-kicker,.region-subpage .rqa-section-kicker {
  color:var(--region-accent);
}
.region-subpage .rbb-layout { grid-template-columns:minmax(0,1fr) 278px; gap:18px; }
.region-subpage .rqa-layout { grid-template-columns:minmax(0,1fr) 278px!important; gap:18px; }
.region-subpage .rbb-main-column,.region-subpage .rqa-main-column,
.region-subpage .rbb-side-column,.region-subpage .rqa-side-column { min-width:0; }
.region-subpage .rbb-box,.region-subpage .rbb-post,
.region-subpage .rqa-box,.region-subpage .rqa-card,.region-subpage .match-panel {
  border:1px solid var(--region-line);
  border-radius:12px;
  background:#fff;
}
.region-subpage .rbb-box,.region-subpage .rqa-box {
  padding:clamp(16px,2.5vw,22px);
  margin-bottom:16px;
}
.region-subpage .rbb-box h2,.region-subpage .rqa-box h2,
.region-subpage .rbb-section-head h2,.region-subpage .rqa-section-head h2 {
  margin:0 0 12px;
  padding:0;
  border:0;
  color:var(--region-blue);
  font-size:19px;
  line-height:1.45;
}
.region-subpage .rbb-section-head h2,.region-subpage .rqa-section-head h2 { margin:0; }
.region-subpage .rqa-section-head {
  border-bottom:1px solid var(--region-line);
  padding-bottom:12px;
  margin-bottom:14px;
}
.region-subpage .rbb-section-head { margin-bottom:14px; }
.region-subpage .rbb-button,.region-subpage .rqa-button,
.region-subpage .rbb-board-actions a,
.region-subpage .match-filters button,
.region-subpage .rbb-box form > button[type="submit"],
.region-subpage .rqa-box form > button[type="submit"] {
  min-height:44px;
  padding:10px 16px;
  border:1px solid var(--region-blue);
  border-radius:8px;
  background:var(--region-blue);
  color:#fff!important;
  font-size:14px;
  font-weight:700;
  line-height:1.45;
  text-decoration:none;
}
.region-subpage .rbb-button-secondary,.region-subpage .rqa-button-secondary {
  border-color:#8ab4d7!important;
  background:#fff!important;
  color:#105f9f!important;
}
.region-subpage .rbb-button:hover,.region-subpage .rqa-button:hover { filter:brightness(.94); }
.region-subpage .rbb-category-list,.region-subpage .rqa-chip-list {
  display:flex;
  flex-wrap:wrap;
  gap:7px;
  margin:0;
  padding:0;
  list-style:none;
}
.region-subpage .rbb-category-list li { border:0; }
.region-subpage .rbb-category-list a,.region-subpage .rqa-chip {
  display:inline-flex;
  align-items:center;
  min-height:36px;
  padding:7px 11px;
  border:1px solid var(--region-line);
  border-radius:999px;
  background:#fff;
  color:#255b85!important;
  font-size:12px;
  font-weight:600;
  line-height:1.4;
  text-decoration:none;
}
.region-subpage .rbb-category-list a:hover,
.region-subpage .rqa-chip:hover,
.region-subpage .rbb-category-list a.is-active,
.region-subpage .rqa-chip.is-active {
  padding-left:11px;
  border-color:var(--region-blue);
  background:#e8f4ff;
  color:#075eaa!important;
}
.region-subpage .rbb-thread-list,.region-subpage .rqa-list-cards {
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(min(100%,255px),1fr));
  gap:12px;
  margin:0;
  padding:0;
  border:0;
  list-style:none;
}
.region-subpage .rbb-thread-row,.region-subpage .rqa-item,.region-subpage .match-card {
  display:flex;
  flex-direction:column;
  align-items:stretch;
  gap:10px;
  min-width:0;
  margin:0;
  padding:16px;
  border:1px solid var(--region-line);
  border-radius:12px;
  background:#fff;
}
.region-subpage .rbb-thread-row:hover,.region-subpage .rqa-item:hover,
.region-subpage .match-card:hover { border-color:#95c4e8; background:#f9fcff; }
.region-subpage .rbb-thread-title,.region-subpage .rqa-title,
.region-subpage .match-card h2 a {
  color:#075eaa;
  font-size:16px;
  font-weight:700;
  line-height:1.6;
  overflow-wrap:anywhere;
}
.region-subpage .rbb-meta,.region-subpage .rqa-meta {
  display:flex;
  flex-wrap:wrap;
  gap:5px 12px;
  margin-top:9px;
  color:var(--region-muted);
  font-size:12px;
  line-height:1.6;
}
.region-subpage .rbb-thread-count {
  align-self:flex-start;
  margin-top:auto;
  padding:4px 9px;
  border-radius:6px;
  background:var(--region-tint);
  color:var(--region-accent);
  font-size:12px;
  font-weight:700;
}
.region-subpage .rbb-state,.region-subpage .rqa-badge {
  display:inline-block;
  padding:3px 9px;
  border:0;
  border-radius:6px;
  background:var(--region-tint);
  color:var(--region-accent);
  font-size:12px;
  font-weight:700;
}
.region-subpage .rqa-question { border-top:4px solid var(--region-blue); }
.region-subpage .rqa-answer { border-left:4px solid #8ab4d7; margin:12px 0; }
.region-subpage .rqa-question h1 { margin-top:10px; }
.region-subpage .rbb-thread-header {
  margin-bottom:12px;
  padding:18px;
  border:1px solid var(--region-line);
  border-top:4px solid var(--region-blue);
  border-radius:12px;
  background:#f1f8fe;
}
.region-subpage .rbb-thread-header h1 { font-size:clamp(21px,2.4vw,27px); }
.region-subpage .rbb-post { padding:18px; margin-bottom:12px; }
.region-subpage .rbb-post-head {
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:4px 10px;
  padding-bottom:10px;
  border-bottom:1px solid var(--region-line);
  color:var(--region-muted);
}
.region-subpage .rbb-post-no { color:var(--region-accent); font-size:15px; }
.region-subpage .rbb-body,.region-subpage .rqa-body {
  color:#293c4d;
  font-size:15px;
  line-height:1.85;
  overflow-wrap:anywhere;
}
.region-subpage .rbb-reply-form { border-top:4px solid var(--region-blue); padding-top:18px; }
.region-subpage .rbb-message,.region-subpage .rqa-message { border-radius:8px; }
.region-subpage .rbb-member-note,.region-subpage .rqa-summary {
  background:#f1f8fe;
  border-color:#97c6e8;
}
.region-subpage .rbb-region-readonly,.region-subpage .rqa-region-readonly {
  min-height:44px;
  border:1px solid var(--region-line);
  border-radius:8px;
  background:#f6fbff;
  color:var(--region-ink);
}
.region-subpage input[type="text"],.region-subpage input[type="email"],
.region-subpage select,.region-subpage textarea {
  max-width:100%;
  min-height:44px;
  border:1px solid #9eb3c5;
  border-radius:8px;
  background:#fff;
  color:var(--region-ink);
  font-size:16px;
}
.region-subpage textarea { min-height:170px; line-height:1.7; }
.region-subpage .rbb-region-change,.region-subpage .rqa-region-change {
  min-height:44px;
  border-radius:8px!important;
}
.region-required,.region-optional {
  display:inline-block;
  margin-left:6px;
  padding:1px 6px;
  border-radius:4px;
  font-size:11px;
  font-weight:700;
  vertical-align:middle;
}
.region-required { background:#fff1dc; color:#8e4c06; }
.region-optional { background:#ecf2f7; color:#536577; }
.region-subpage .rbb-note,.region-subpage .rqa-note,
.region-subpage .rbb-form-help {
  color:var(--region-muted)!important;
  font-size:13px!important;
  line-height:1.75;
}
.region-subpage .match-card {
  display:grid;
  grid-template-columns:112px minmax(0,1fr);
  gap:14px;
}
.region-subpage-match .rbb-thread-list { grid-template-columns:1fr; }
.region-subpage .match-card-thumb {
  width:112px;
  height:90px;
  border-radius:8px;
  object-fit:cover;
  background:#eaf3f8;
}
.region-subpage .match-card h2 { border:0; margin:5px 0; padding:0; font-size:17px; }
.region-subpage .match-card p { margin:5px 0; font-size:12px; color:var(--region-muted); }
.region-subpage .match-filters form { align-items:center; gap:8px 15px; }
.region-subpage .match-filters label {
  display:inline-flex;
  align-items:center;
  gap:7px;
  margin:0;
  cursor:pointer;
}
.region-subpage .match-filters input { width:18px; height:18px; accent-color:var(--region-blue); }
.region-subpage .match-panel { padding:clamp(16px,2.5vw,24px); }
.region-subpage .match-panel h1 { color:var(--region-blue); font-size:clamp(22px,2.7vw,30px); }
.region-subpage .match-form-section { border-color:var(--region-line); border-radius:12px; }
.region-subpage .match-form-section-head {
  border-color:var(--region-line);
  background:#f1f8fe;
}
.region-subpage .match-form-section-head h2 { color:var(--region-blue)!important; }
.region-subpage .match-submit-section {
  border-color:#a9cde8;
  border-radius:12px;
  background:#f1f8fe;
}
.region-subpage .match-submit-button {
  background:var(--region-blue)!important;
  border-color:var(--region-blue)!important;
}
.region-subpage .match-my-list { display:grid; gap:12px; }
.region-subpage .match-my-item {
  padding:16px;
  border:1px solid var(--region-line);
  border-radius:12px;
  background:#fff;
}
.region-subpage .match-my-item h2 { border:0; padding:0; margin-bottom:8px; }
.region-subpage .match-meta-line { color:var(--region-muted); line-height:1.8; }
.region-subpage .match-complete {
  border-color:#a8d9c5;
  background:#effaf6;
}
.region-subpage :focus-visible { outline:3px solid #075eaa; outline-offset:2px; }
@media (min-width:768px) and (max-width:1330px) {
  .region-subpage { margin-right:125px; }
}
@media (max-width:950px) {
  .region-subpage .rbb-layout,
  .region-subpage .rqa-layout { grid-template-columns:minmax(0,1fr)!important; }
  .region-subpage .rbb-side-column,
  .region-subpage .rqa-side-column {
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:12px;
  }
}
@media (max-width:767px) {
  .region-subpage { margin:84px auto 32px; padding:0 12px; }
  .region-subpage .rbb-thread-list,
  .region-subpage .rqa-list-cards { grid-template-columns:minmax(0,1fr); }
}
@media (max-width:650px) {
  .region-subpage { margin-top:74px; padding:0 10px; }
  .region-subpage .rbb-box,.region-subpage .rqa-box,
  .region-subpage .rbb-post { padding:15px; }
  .region-subpage .rbb-side-column,.region-subpage .rqa-side-column { display:block; }
  .region-subpage .rbb-region-select-row,
  .region-subpage .rqa-region-select-row { grid-template-columns:minmax(0,1fr); }
  .region-subpage .rbb-board-actions,
  .region-subpage .rqa-hero-actions { display:grid; grid-template-columns:1fr; }
  .region-subpage .rbb-board-actions .rbb-button,
  .region-subpage .rqa-hero-actions .rqa-button { width:100%; }
  .region-subpage .match-card { grid-template-columns:88px minmax(0,1fr); }
  .region-subpage .match-card-thumb { width:88px; height:80px; }
  .region-subpage .match-filters form { display:grid; justify-items:stretch; }
}

/* Circulation block is shared with older green pages; override only inside this area. */
.region-subpage .aicity-ugc-circulation {
  border-color: var(--region-line) !important;
}
.region-subpage .aicity-ugc-circulation > h2 {
  color: var(--region-blue) !important;
  border: 0 !important;
  padding: 0 !important;
  margin: 0 0 10px !important;
}
