/* คลังครูฮับ — the public library at /resources (docs/resources-hub.md).
   Every rule is scoped to .rh / rh-. Faces are the app's self-hosted Mitr +
   IBM Plex Sans Thai (/vendor), the same declarations as index.css. */
@font-face { font-family: 'Mitr'; font-style: normal; font-weight: 400; font-display: swap; src: url(/vendor/mitr-5.3.0/mitr-thai-400-normal.woff2) format('woff2'); unicode-range: U+02D7,U+0303,U+0331,U+0E01-0E5B,U+200C-200D,U+25CC; }
@font-face { font-family: 'Mitr'; font-style: normal; font-weight: 400; font-display: swap; src: url(/vendor/mitr-5.3.0/mitr-latin-400-normal.woff2) format('woff2'); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: 'Mitr'; font-style: normal; font-weight: 500; font-display: swap; src: url(/vendor/mitr-5.3.0/mitr-thai-500-normal.woff2) format('woff2'); unicode-range: U+02D7,U+0303,U+0331,U+0E01-0E5B,U+200C-200D,U+25CC; }
@font-face { font-family: 'Mitr'; font-style: normal; font-weight: 500; font-display: swap; src: url(/vendor/mitr-5.3.0/mitr-latin-500-normal.woff2) format('woff2'); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: 'Mitr'; font-style: normal; font-weight: 600 900; font-display: swap; src: url(/vendor/mitr-5.3.0/mitr-thai-600-normal.woff2) format('woff2'); unicode-range: U+02D7,U+0303,U+0331,U+0E01-0E5B,U+200C-200D,U+25CC; }
@font-face { font-family: 'Mitr'; font-style: normal; font-weight: 600 900; font-display: swap; src: url(/vendor/mitr-5.3.0/mitr-latin-600-normal.woff2) format('woff2'); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: 'IBM Plex Sans Thai'; font-style: normal; font-weight: 400; font-display: swap; src: url(/vendor/ibm-plex-sans-thai-5.3.0/ibm-plex-sans-thai-thai-400-normal.woff2) format('woff2'); unicode-range: U+02D7,U+0303,U+0331,U+0E01-0E5B,U+200C-200D,U+25CC; }
@font-face { font-family: 'IBM Plex Sans Thai'; font-style: normal; font-weight: 400; font-display: swap; src: url(/vendor/ibm-plex-sans-thai-5.3.0/ibm-plex-sans-thai-latin-400-normal.woff2) format('woff2'); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: 'IBM Plex Sans Thai'; font-style: normal; font-weight: 500; font-display: swap; src: url(/vendor/ibm-plex-sans-thai-5.3.0/ibm-plex-sans-thai-thai-500-normal.woff2) format('woff2'); unicode-range: U+02D7,U+0303,U+0331,U+0E01-0E5B,U+200C-200D,U+25CC; }
@font-face { font-family: 'IBM Plex Sans Thai'; font-style: normal; font-weight: 500; font-display: swap; src: url(/vendor/ibm-plex-sans-thai-5.3.0/ibm-plex-sans-thai-latin-500-normal.woff2) format('woff2'); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: 'IBM Plex Sans Thai'; font-style: normal; font-weight: 600; font-display: swap; src: url(/vendor/ibm-plex-sans-thai-5.3.0/ibm-plex-sans-thai-thai-600-normal.woff2) format('woff2'); unicode-range: U+02D7,U+0303,U+0331,U+0E01-0E5B,U+200C-200D,U+25CC; }
@font-face { font-family: 'IBM Plex Sans Thai'; font-style: normal; font-weight: 600; font-display: swap; src: url(/vendor/ibm-plex-sans-thai-5.3.0/ibm-plex-sans-thai-latin-600-normal.woff2) format('woff2'); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: 'IBM Plex Sans Thai'; font-style: normal; font-weight: 700 900; font-display: swap; src: url(/vendor/ibm-plex-sans-thai-5.3.0/ibm-plex-sans-thai-thai-700-normal.woff2) format('woff2'); unicode-range: U+02D7,U+0303,U+0331,U+0E01-0E5B,U+200C-200D,U+25CC; }
@font-face { font-family: 'IBM Plex Sans Thai'; font-style: normal; font-weight: 700 900; font-display: swap; src: url(/vendor/ibm-plex-sans-thai-5.3.0/ibm-plex-sans-thai-latin-700-normal.woff2) format('woff2'); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }

.rh {
  --navy: #163B89; --navy-hover: #0F2A66; --red: #E02121; --red-ink: #B91C1C;
  --ink: #14213D; --ink-2: #3D4760; --ink-3: #5A6478;
  --sky: #EAF0FB; --rose: #FDECEC; --page: #F5F7FB; --line: #E3E8F2; --field: #CBD5E6; --soft: #F1F4FA;
  --ok: #0F7B4F; --ok-ink: #0B5E3C; --ok-bg: #E6F4EC; --var: #FFE9A8; --var-line: #C77700;
  --warn-bg: #FEF3E2; --warn-ink: #8A4B08; --warn-line: #F3D19C;
  --head-h: 76px;
  margin: 0; min-height: 100vh; display: flex; flex-direction: column;
  background: var(--page); color: var(--ink); color-scheme: light;
  font: 400 16px/1.6 'IBM Plex Sans Thai', sans-serif;
  -webkit-text-size-adjust: 100%;
}
.rh *, .rh *::before, .rh *::after { box-sizing: border-box; }
.rh a { color: var(--navy); }
.rh button, .rh input, .rh select, .rh textarea { font: inherit; color: inherit; }
.rh :focus-visible { outline: 3px solid var(--red); outline-offset: 2px; }
.rh [hidden] { display: none !important; }
.rh h1, .rh h2 { font-family: 'Mitr', sans-serif; font-weight: 500; margin: 0; }
.rh h3 { margin: 0; }
.rh p { margin: 0; }
.rh-skip { position: absolute; left: -999px; top: 8px; z-index: 30; padding: 10px 14px; border-radius: 10px; background: #FFFFFF; }
.rh-skip:focus { left: 8px; }
.rh-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
#rhMain { flex: 1 0 auto; outline: none; }
.rh-noscript { padding: 24px; text-align: center; }

/* ---- header ------------------------------------------------------------ */
.rh-head { position: relative; z-index: 5; height: var(--head-h); display: flex; align-items: center; gap: 8px; padding: 0 48px; background: #FFFFFF; border-bottom: 1px solid var(--line); font-size: 15px; }
.rh-logo { display: flex; align-items: center; flex-shrink: 0; }
.rh-logo img { display: block; width: 168px; height: auto; }
.rh-nav { display: flex; align-items: center; gap: 6px; margin-left: 24px; }
.rh-nav a, .rh-login { min-height: 44px; display: flex; align-items: center; padding: 0 14px; border-radius: 10px; color: var(--ink); text-decoration: none; }
.rh-nav a.is-current { background: var(--sky); color: var(--navy); font-weight: 700; }
.rh-nav a:hover:not(.is-current) { background: var(--soft); }
.rh-login { color: var(--navy); font-weight: 600; padding: 0 16px; }
.rh-grow { flex-grow: 1; }
.rh-menu-btn { display: none; width: 44px; height: 44px; border-radius: 10px; border: 1px solid var(--field); background: #FFFFFF; color: var(--navy); font-size: 20px; cursor: pointer; }
.rh-menu { display: flex; flex-direction: column; padding: 8px 16px 14px; background: #FFFFFF; border-bottom: 1px solid var(--line); }
.rh-menu a { min-height: 48px; display: flex; align-items: center; color: var(--ink); text-decoration: none; }
.rh-menu a + a { border-top: 1px solid #EEF1F7; }
.rh-menu a[aria-current] { color: var(--navy); font-weight: 700; }

/* ---- buttons, chips, pills --------------------------------------------- */
.rh-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 18px; border-radius: 12px; border: 1.5px solid var(--navy); background: #FFFFFF; color: var(--navy); font-size: 16px; font-weight: 600; text-decoration: none; cursor: pointer; white-space: nowrap; transition: background .15s; }
.rh .rh-btn.is-primary { border-color: var(--navy); background: var(--navy); color: #FFFFFF; font-weight: 700; padding: 0 20px; }
.rh-head .rh-btn { min-height: 44px; font-size: 15px; }
.rh-btn:hover { background: var(--sky); }
.rh .rh-btn.is-primary:hover { background: var(--navy-hover); border-color: var(--navy-hover); }
.rh-btn.is-ok, .rh .rh-btn.is-primary.is-ok { background: var(--ok); border-color: var(--ok); color: #FFFFFF; }
.rh-btn-sm { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; padding: 0 14px; border-radius: 10px; border: 1px solid var(--field); background: #FFFFFF; color: var(--navy); font-size: 14px; font-weight: 600; text-decoration: none; cursor: pointer; white-space: nowrap; }
.rh-btn-sm:hover { background: var(--sky); }
.rh-chip { min-height: 44px; padding: 0 16px; border-radius: 99px; border: 1.5px solid var(--field); background: #FFFFFF; color: var(--ink); font-size: 15px; cursor: pointer; white-space: nowrap; flex-shrink: 0; display: inline-flex; align-items: center; gap: 6px; text-decoration: none; }
.rh-chip[aria-pressed="true"] { border-color: var(--navy); background: var(--navy); color: #FFFFFF; font-weight: 700; }
.rh-chip .n { opacity: .75; }
.rh-chip.is-link { border-style: dashed; color: var(--navy); }
.rh-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.rh-pill { display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 99px; font-size: 13px; background: var(--soft); color: var(--ink-2); }
.rh-pill.is-sys { background: var(--sky); color: var(--navy); font-weight: 700; }
.rh-pill.is-prm { background: var(--rose); color: var(--red-ink); font-weight: 700; }
.rh-pill.is-sm { padding: 3px 9px; font-size: 12px; }

/* ---- layout -------------------------------------------------------------- */
.rh-wrap { width: 100%; max-width: 1296px; margin: 0 auto; padding: 40px 48px 56px; display: flex; flex-direction: column; gap: 32px; }
.rh-body { display: flex; flex-direction: column; gap: 32px; }
.rh-loading { padding: 40px 0; text-align: center; color: var(--ink-3); }
.rh-intro { display: flex; flex-direction: column; gap: 6px; }
.rh-intro h1 { font-size: 38px; line-height: 1.3; color: var(--navy); }
.rh-intro p { font-size: 18px; color: var(--ink-2); }
.rh-sec { display: flex; flex-direction: column; gap: 12px; }
.rh-sec > h2, .rh-sec-head h2 { font-size: 24px; color: var(--ink); }
.rh-sec-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.rh-muted { font-size: 14px; color: var(--ink-3); }

/* ---- search ------------------------------------------------------------- */
.rh-search { display: flex; flex-direction: column; gap: 12px; }
.rh-search-box { position: relative; }
.rh-search-box .ic { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); font-size: 18px; color: var(--ink-3); pointer-events: none; }
.rh-search-box input { width: 100%; height: 56px; padding: 0 52px 0 46px; border-radius: 14px; border: 1.5px solid var(--field); background: #FFFFFF; font-size: 16px; color: var(--ink); -webkit-appearance: none; appearance: none; }
.rh-search-box input::-webkit-search-cancel-button { display: none; }
.rh-search-box input::placeholder { color: var(--ink-3); }
.rh-search-box .clear { position: absolute; right: 6px; top: 6px; width: 44px; height: 44px; border: 0; border-radius: 10px; background: transparent; font-size: 18px; color: var(--ink-3); cursor: pointer; }

/* ---- task grid + cards ---------------------------------------------------- */
.rh-tasks { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; }
.rh-task { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; min-height: 120px; padding: 18px; border-radius: 16px; border: 1px solid var(--line); background: #FFFFFF; text-align: left; cursor: pointer; color: var(--ink); }
.rh-task .ic { width: 38px; height: 38px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 18px; background: var(--sky); color: var(--navy); }
.rh-task:nth-child(even) .ic { background: var(--rose); color: var(--red-ink); }
.rh-task b { font-size: 15px; line-height: 1.35; }
.rh-task span:last-child { font-size: 13px; color: var(--ink-3); }
.rh-hv { transition: box-shadow .15s, transform .15s; }
.rh-hv:hover { box-shadow: 0 8px 22px rgba(22,59,137,.14); transform: translateY(-2px); }
.rh-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.rh-card { display: flex; flex-direction: column; border-radius: 18px; border: 1px solid var(--line); background: #FFFFFF; overflow: hidden; min-width: 0; }
.rh-cover { position: relative; display: block; aspect-ratio: 16 / 9; flex-shrink: 0; overflow: hidden; background: linear-gradient(135deg, var(--sky) 0%, #FFFFFF 100%); border-bottom: 1px solid var(--line); }
.rh-cover.is-prm { background: linear-gradient(135deg, var(--rose) 0%, #FFFFFF 100%); }
.rh-cover img { display: block; width: 100%; height: 100%; object-fit: cover; }
.rh-card-body { flex-grow: 1; display: flex; flex-direction: column; gap: 8px; padding: 18px; }
.rh-card-tags { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; font-size: 12px; color: var(--ink-3); }
.rh-card h3 { font-size: 18px; line-height: 1.4; color: var(--ink); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.rh-card p { font-size: 14px; line-height: 1.55; color: var(--ink-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.rh-card .cond { font-size: 13px; color: var(--ok-ink); font-weight: 600; }
.rh-card .grow { flex-grow: 1; }
.rh-card .rh-btn { width: 100%; font-size: 15px; }
.rh-feat { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.rh-list-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.rh-list-head h2 { font-size: 24px; }
.rh-sort { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--ink-2); margin-left: auto; }
.rh-sort select { min-width: 150px; height: 44px; padding: 0 10px; border-radius: 10px; border: 1px solid var(--field); background: #FFFFFF; font-size: 14px; color: var(--ink); }
.rh-more { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.rh-more .rh-btn { min-width: 280px; }
.rh-state { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 56px 24px; border-radius: 18px; background: #FFFFFF; border: 1px solid var(--line); text-align: center; }
.rh-state .ic { font-size: 40px; line-height: 1; }
.rh-state b { font-size: 20px; }
.rh-state span { color: var(--ink-2); }
.rh-skel { display: flex; flex-direction: column; gap: 10px; padding-bottom: 6px; }
.rh-sk { display: block; background: #E9EEF7; border-radius: 8px; animation: rh-sk 1.4s ease-in-out infinite; }
@keyframes rh-sk { 0%, 100% { opacity: 1; } 50% { opacity: .55; } }
.rh-links { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.rh-link-card { display: flex; align-items: center; gap: 14px; padding: 18px 20px; border-radius: 16px; background: var(--sky); color: var(--navy); text-decoration: none; }
.rh-link-card.is-red { background: var(--rose); color: var(--red-ink); }
.rh-link-card .ic { width: 48px; height: 48px; flex-shrink: 0; border-radius: 14px; background: var(--navy); color: #FFFFFF; display: flex; align-items: center; justify-content: center; font-size: 22px; }
.rh-link-card.is-red .ic { background: var(--red); }
.rh-link-card .txt { flex-grow: 1; display: flex; flex-direction: column; }
.rh-link-card b { font-size: 17px; }
.rh-link-card .txt span { font-size: 14px; color: var(--ink-2); }

/* ---- detail pages ------------------------------------------------------- */
.rh-crumb { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 14px; color: var(--ink-3); }
.rh-detail { gap: 28px; padding-top: 28px; padding-bottom: 64px; }
.rh-tags { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.rh-title { font-size: 38px; line-height: 1.3; color: var(--navy); }
.rh-lead { font-size: 18px; line-height: 1.65; color: var(--ink-2); }
.rh-meta { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; font-size: 14px; color: var(--ink-3); }
.rh-hero { display: grid; grid-template-columns: minmax(0, 1fr) 540px; gap: 36px; align-items: start; }
.rh-hero-text { display: flex; flex-direction: column; gap: 14px; }
.rh-gallery { display: flex; flex-direction: column; gap: 8px; }
.rh-shot { position: relative; aspect-ratio: 16 / 9; border-radius: 18px; overflow: hidden; border: 1px solid var(--line); background: linear-gradient(135deg, var(--sky), #FFFFFF); }
.rh-shot img { display: block; width: 100%; height: 100%; object-fit: contain; background: #FFFFFF; }
.rh-shot .n { position: absolute; right: 10px; bottom: 10px; padding: 3px 10px; border-radius: 6px; background: rgba(20,33,61,.75); color: #FFFFFF; font-size: 12px; }
.rh-thumbs { display: flex; gap: 8px; }
.rh-thumbs button { flex: 1; height: 64px; padding: 0; border-radius: 10px; border: 1px solid var(--line); background: #FFFFFF; overflow: hidden; cursor: pointer; }
.rh-thumbs button[aria-pressed="true"] { border: 2px solid var(--navy); }
.rh-thumbs img { display: block; width: 100%; height: 100%; object-fit: cover; }
.rh-acts { display: grid; grid-template-columns: 1fr 1.15fr; gap: 20px; }
.rh-act { display: flex; flex-direction: column; gap: 12px; padding: 26px; border-radius: 20px; background: #FFFFFF; border: 1.5px solid var(--field); scroll-margin-top: 70px; }
.rh-act.is-get { border: 0; background: linear-gradient(140deg, #0E2C6E, #163B89 55%, #2F5FC4); color: #FFFFFF; }
.rh-act-head { display: flex; align-items: center; gap: 10px; }
.rh-act-head .num { width: 40px; height: 40px; border-radius: 12px; background: var(--sky); color: var(--navy); display: flex; align-items: center; justify-content: center; font-family: 'Mitr', sans-serif; font-size: 20px; flex-shrink: 0; }
.rh-act.is-get .num { background: #FFFFFF; }
.rh-act h2 { font-size: 22px; }
.rh-act > p { font-size: 15px; line-height: 1.6; color: var(--ink-2); }
.rh-act.is-get > p { color: #E6ECF8; }
.rh-act .hint { font-size: 13px; color: var(--ink-3); }
.rh-act.is-get .hint { color: #C9D8F7; }
.rh-prep { display: flex; flex-direction: column; gap: 4px; font-size: 14px; }
.rh-prep ul { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 4px; }
.rh-prep li::before { content: "✓ "; }
.rh-copy-sheet { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 52px; padding: 0 22px; border-radius: 12px; background: #FFFFFF; color: var(--navy) !important; font-size: 17px; font-weight: 700; text-decoration: none; align-self: flex-start; }
.rh-copy-sheet:hover { background: var(--sky); }
.rh-act.is-get :focus-visible { outline-color: #FFFFFF; }
.rh-note { padding: 10px 12px; border-radius: 10px; background: var(--soft); color: var(--ink-2); font-size: 14px; }
.rh-info { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.rh-box { padding: 18px; border-radius: 16px; background: #FFFFFF; border: 1px solid var(--line); display: flex; flex-direction: column; gap: 8px; }
.rh-box h3 { font-size: 16px; }
.rh-box ul { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 4px; }
.rh-box li, .rh-box p { font-size: 14px; line-height: 1.55; color: var(--ink-2); }
.rh-terms { padding: 14px 18px; border-radius: 14px; background: #FFFFFF; border: 1px solid var(--line); font-size: 14px; }
.rh-guide { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 28px; align-items: start; scroll-margin-top: 70px; }
.rh-toc { position: sticky; top: 16px; padding: 18px; border-radius: 16px; background: #FFFFFF; border: 1px solid var(--line); display: flex; flex-direction: column; gap: 4px; }
.rh-toc b { font-size: 15px; }
.rh-toc a { min-height: 40px; display: flex; align-items: center; gap: 8px; color: var(--ink); text-decoration: none; font-size: 14px; }
.rh-toc a:hover { color: var(--navy); }
.rh-dot { width: 24px; height: 24px; flex-shrink: 0; border-radius: 99px; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; background: var(--sky); color: var(--navy); }
.rh-dot.is-done { background: var(--ok); color: #FFFFFF; }
.rh-guide-main { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.rh-guide-main > h2 { font-size: 26px; }
.rh-guide-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.rh-guide-head .num { width: 40px; height: 40px; border-radius: 12px; background: var(--sky); color: var(--navy); display: flex; align-items: center; justify-content: center; font-family: 'Mitr', sans-serif; font-size: 20px; }
.rh-guide-head h2 { font-size: 26px; }
.rh-progress { height: 10px; border-radius: 99px; background: var(--line); overflow: hidden; }
.rh-progress span { display: block; height: 10px; border-radius: 99px; background: var(--ok); }
.rh-step { scroll-margin-top: 70px; padding: 22px; border-radius: 18px; background: #FFFFFF; border: 1px solid var(--line); display: flex; gap: 14px; align-items: flex-start; }
.rh-step.is-done { border-color: #9BD3B5; }
.rh-step .num { width: 44px; height: 44px; flex-shrink: 0; border-radius: 99px; display: flex; align-items: center; justify-content: center; font-family: 'Mitr', sans-serif; font-size: 18px; background: var(--navy); color: #FFFFFF; }
.rh-step.is-done .num { background: var(--ok); }
.rh-step-body { flex-grow: 1; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.rh-step h3 { font-size: 18px; }
.rh-step-body > p { font-size: 15px; line-height: 1.65; color: var(--ink-2); white-space: pre-line; }
.rh-step-img { border-radius: 12px; border: 1px solid var(--line); overflow: hidden; background: #FFFFFF; }
.rh-step-img img { display: block; width: 100%; height: auto; max-height: 560px; object-fit: contain; }
.rh-check { padding: 12px 14px; border-radius: 12px; background: var(--ok-bg); color: var(--ok-ink); font-size: 14px; line-height: 1.6; }
.rh-tick { align-self: flex-start; min-height: 44px; display: inline-flex; align-items: center; gap: 10px; padding: 0 14px 0 10px; border-radius: 10px; border: 1px solid var(--field); background: #FFFFFF; font-size: 14px; color: var(--ink); cursor: pointer; }
.rh-tick .box { width: 24px; height: 24px; border-radius: 7px; display: flex; align-items: center; justify-content: center; font-weight: 700; border: 2px solid #8A93A6; }
.rh-tick[aria-checked="true"] .box { border: 0; background: var(--ok); color: #FFFFFF; }
.rh-done { padding: 16px 18px; border-radius: 14px; background: var(--ok); color: #FFFFFF; font-size: 16px; font-weight: 600; }
.rh-faq { border-radius: 16px; background: #FFFFFF; border: 1px solid var(--line); overflow: hidden; }
.rh-faq > div + div { border-top: 1px solid #EEF1F7; }
.rh-faq button { width: 100%; min-height: 56px; display: flex; align-items: center; gap: 10px; padding: 0 18px; border: 0; background: transparent; font-size: 15px; font-weight: 600; text-align: left; cursor: pointer; color: var(--ink); }
.rh-faq button span:first-child { flex-grow: 1; padding: 12px 0; }
.rh-faq p { padding: 0 18px 16px; font-size: 15px; line-height: 1.65; color: var(--ink-2); white-space: pre-line; }
.rh-help { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 16px 18px; border-radius: 16px; background: var(--sky); }
.rh-help span { flex-grow: 1; font-size: 15px; }
.rh-quick { position: sticky; top: 0; z-index: 4; display: none; gap: 6px; padding: 8px 12px; background: rgba(255,255,255,.96); border-bottom: 1px solid var(--line); }
.rh-quick a { flex: 1; min-height: 44px; display: flex; align-items: center; justify-content: center; border-radius: 10px; border: 1px solid var(--field); color: var(--navy); font-size: 13px; font-weight: 700; text-decoration: none; }
.rh-quick a.is-main { border-color: var(--navy); background: var(--navy); color: #FFFFFF; }

/* prompt page */
.rh-prompt-top { display: flex; flex-direction: column; gap: 12px; max-width: 900px; }
.rh-tools { display: flex; gap: 8px; flex-wrap: wrap; font-size: 14px; }
.rh-tools span { padding: 4px 10px; border-radius: 8px; background: #FFFFFF; border: 1px solid var(--line); }
.rh-tools span.is-tested { background: var(--ok-bg); border-color: var(--ok-bg); color: var(--ok-ink); }
.rh-pgrid { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 28px; align-items: start; }
.rh-pmain { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.rh-aside { display: flex; flex-direction: column; gap: 14px; position: sticky; top: 16px; }
.rh-pbox { border-radius: 18px; background: #FFFFFF; border: 1.5px solid var(--field); overflow: hidden; }
.rh-pbox-head { display: flex; align-items: center; gap: 10px; padding: 12px 16px; background: var(--page); border-bottom: 1px solid var(--line); }
.rh-pbox-head h2 { flex-grow: 1; font: 700 16px/1.4 'IBM Plex Sans Thai', sans-serif; }
.rh-ptext { padding: 20px; font-size: 17px; line-height: 1.85; white-space: pre-wrap; overflow-wrap: anywhere; color: var(--ink); }
.rh-ptext.is-folded { max-height: 340px; overflow: hidden; -webkit-mask-image: linear-gradient(180deg, #000 75%, transparent); mask-image: linear-gradient(180deg, #000 75%, transparent); }
.rh mark, .rh-var { background: var(--var); color: var(--ink); border-bottom: 2px solid var(--var-line); border-radius: 4px; padding: 0 3px; font-weight: 600; }
.rh-expand { width: 100%; min-height: 44px; border: 0; border-top: 1px solid var(--line); background: #FFFFFF; color: var(--navy); font-size: 14px; font-weight: 600; cursor: pointer; }
.rh-pfoot { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; padding: 14px 16px; border-top: 1px solid var(--line); }
.rh-copy-prompt { min-height: 52px; padding: 0 24px; font-size: 17px; }
.rh-ok { display: flex; gap: 10px; align-items: center; padding: 14px 16px; border-radius: 14px; background: var(--ok); color: #FFFFFF; font-size: 15px; }
.rh-fail { display: flex; flex-direction: column; gap: 10px; padding: 16px; border-radius: 14px; background: #FFFFFF; border: 2px solid var(--red); }
.rh-fail b { font-size: 16px; color: var(--red-ink); }
.rh-fail span { font-size: 14px; line-height: 1.6; }
.rh-fail textarea { width: 100%; padding: 12px; border-radius: 10px; border: 1.5px solid var(--navy); font-size: 14px; line-height: 1.6; resize: vertical; background: var(--page); }
.rh-vars { padding: 18px; border-radius: 16px; background: #FFF8E6; border: 1px solid var(--warn-line); display: flex; flex-direction: column; gap: 10px; }
.rh-vars h2 { font: 700 17px/1.4 'IBM Plex Sans Thai', sans-serif; }
.rh-vars div { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: 15px; }
.rh-vars div span { color: var(--ink-2); }
.rh-out { padding: 18px; border-radius: 16px; background: #FFFFFF; border: 1px solid var(--line); font-size: 15px; line-height: 1.7; white-space: pre-wrap; overflow-wrap: anywhere; color: var(--ink-2); }
.rh-how ol { margin: 0; padding-left: 22px; display: flex; flex-direction: column; gap: 6px; font-size: 15px; line-height: 1.55; }
.rh-copybar { position: sticky; bottom: 0; z-index: 3; display: none; padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); background: rgba(255,255,255,.97); border-top: 1px solid var(--line); }
.rh-copybar .rh-btn { width: 100%; }
.rh-vars.is-mobile { display: none; }

/* states page */
.rh-status { display: flex; justify-content: center; padding: 72px 24px; }
.rh-status-box { width: 100%; max-width: 680px; display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 48px 40px; border-radius: 24px; background: #FFFFFF; border: 1px solid var(--line); text-align: center; }
.rh-status-box .ic { width: 72px; height: 72px; border-radius: 22px; display: flex; align-items: center; justify-content: center; font-size: 32px; background: var(--sky); color: var(--navy); }
.rh-status-box h1 { font-size: 32px; line-height: 1.35; color: var(--navy); }
.rh-status-box p { font-size: 16px; line-height: 1.65; color: var(--ink-2); max-width: 520px; }
.rh-status-box .btns { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.rh-status-box small { font-size: 13px; color: var(--ink-3); }

.rh-toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 20; max-width: min(560px, calc(100vw - 32px)); padding: 14px 18px; border-radius: 14px; background: var(--ink); color: #FFFFFF; font-size: 15px; box-shadow: 0 10px 30px rgba(20,33,61,.3); }
.rh-foot { padding: 24px; border-top: 1px solid var(--line); text-align: center; font-size: 13px; color: var(--ink-3); background: var(--page); }
.rh-foot a { color: var(--ink-3); }

/* ---- tablet 768–1199 ----------------------------------------------------- */
@media (max-width: 1199px) {
  .rh-wrap { padding-left: 32px; padding-right: 32px; }
  .rh-grid, .rh-feat { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rh-tasks { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .rh-hero { grid-template-columns: minmax(0, 1fr); }
  .rh-guide { grid-template-columns: minmax(0, 1fr); }
  .rh-toc { display: none; }
  .rh-quick { display: flex; }
  .rh-pgrid { grid-template-columns: minmax(0, 1fr); }
  .rh-aside { position: static; order: -1; }
  .rh-info { grid-template-columns: minmax(0, 1fr); }
}

/* ---- phone 360–767 -------------------------------------------------------- */
@media (max-width: 767px) {
  .rh { --head-h: 60px; font-size: 15px; }
  .rh-head { padding: 0 12px; }
  .rh-logo img { width: 128px; }
  .rh-nav, .rh-login { display: none; }
  .rh-head .rh-btn { min-height: 44px; padding: 0 14px; font-size: 14px; }
  .rh-menu-btn { display: inline-flex; align-items: center; justify-content: center; }
  .rh-wrap { padding: 20px 16px 32px; gap: 22px; }
  .rh-body { gap: 22px; }
  .rh-detail { padding-top: 16px; padding-bottom: 36px; gap: 18px; }
  .rh-intro h1, .rh-title { font-size: 26px; }
  .rh-intro p { font-size: 15px; }
  .rh-lead { font-size: 16px; }
  .rh-sec > h2, .rh-sec-head h2, .rh-list-head h2 { font-size: 20px; }
  .rh-chips.is-scroll { flex-wrap: nowrap; overflow-x: auto; margin: 0 -16px; padding: 0 16px 4px; scrollbar-width: none; }
  .rh-tasks { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .rh-task { min-height: 104px; padding: 14px; }
  .rh-grid { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .rh-feat { display: flex; gap: 12px; overflow-x: auto; margin: 0 -16px; padding: 0 16px 6px; scroll-snap-type: x mandatory; scroll-padding: 0 16px; }
  .rh-feat .rh-card { width: 290px; flex-shrink: 0; scroll-snap-align: start; }
  .rh-card-body { padding: 14px; }
  .rh-card h3 { font-size: 17px; }
  .rh-sort { margin-left: 0; }
  .rh-more .rh-btn { min-width: 0; width: 100%; }
  .rh-state { padding: 36px 20px; }
  .rh-links { grid-template-columns: minmax(0, 1fr); }
  .rh-crumb .path { display: none; }
  .rh-hero { gap: 16px; }
  .rh-thumbs button { height: 44px; }
  .rh-acts { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .rh-act { padding: 18px; }
  .rh-copy-sheet { align-self: stretch; }
  .rh-step { padding: 16px; }
  .rh-ptext { padding: 16px; font-size: 16px; }
  .rh-ptext.is-folded { max-height: 300px; }
  .rh-aside { order: 0; }
  .rh-aside .rh-vars { display: none; }
  .rh-vars.is-mobile { display: flex; padding: 16px; }
  .rh-pfoot .rh-copy-prompt { display: none; }
  .rh-copybar { display: block; }
  .rh-status { padding: 32px 16px; }
  .rh-status-box { padding: 32px 20px; }
  .rh-status-box h1 { font-size: 24px; }
  .rh-toast { bottom: 84px; }
}

@media (prefers-reduced-motion: reduce) {
  .rh-hv { transition: none; }
  .rh-hv:hover { transform: none; }
  .rh-sk { animation: none; }
}
