/* Public community pages share the current 葉っぱもち official-site shell.
   Keep the existing board, ranking and profile layout rules in bbs.css. */
body.happamochi-connected {
  --bbs-ink: #263238;
  --bbs-muted: #546e7a;
  --bbs-paper: #e1f5fe;
  --bbs-white: #fff;
  --bbs-line: #cce8f5;
  --bbs-green: #0288d1;
  --bbs-green-dark: #0277bd;
  --bbs-mint: #e1f5fe;
  --bbs-shadow: 0 12px 32px rgb(2 136 209 / 10%);
  --bbs-shadow-sm: 0 6px 20px rgb(2 136 209 / 8%);
  --bbs-radius-lg: 20px;
  --bbs-radius-md: 18px;
  --bbs-radius-sm: 10px;
  --bbs-font-jp: "M PLUS Rounded 1c", "Hiragino Maru Gothic ProN", "Hiragino Sans", "Yu Gothic", Meiryo, sans-serif;
  position: relative;
  min-height: 100vh;
  overflow-x: clip;
  color: var(--bbs-ink);
  background: linear-gradient(180deg, #e1f5fe, #b3e5fc 60%, #81d4fa);
  font-family: var(--bbs-font-jp);
  font-weight: 500;
  -webkit-font-smoothing: antialiased;
  overflow-wrap: anywhere;
}

body.happamochi-connected :focus-visible {
  outline: 3px solid #00649e;
  outline-offset: 4px;
}
body.happamochi-connected ::selection { color: #01446f; background: #fff; }
body.happamochi-connected [id] { scroll-margin-top: 100px; }
body.happamochi-connected .skip-link { transform: translateY(-160%); }
body.happamochi-connected .skip-link:focus { left: 16px; transform: translateY(0); }

/* Only the shared shell gets the official site's element resets. */
body.happamochi-connected :is(.site-header, .site-footer) a { text-decoration: none; }
body.happamochi-connected :is(.site-header, .site-footer) p { margin: 0; }
body.happamochi-connected :is(.site-header, .site-footer) img { display: block; max-width: 100%; }
body.happamochi-connected .site-header .site-brand { color: var(--site-ink); }
body.happamochi-connected .site-footer .site-brand { color: #fff; }

/* A single compact row keeps page destinations and the posting action nearby. */
body.happamochi-connected .hm-community-nav {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: calc(100% - 56px);
  max-width: 1174px;
  margin: 22px auto 0;
  padding-bottom: 14px;
  border-bottom: 1px solid rgb(255 255 255 / 75%);
}
body.happamochi-connected .hm-community-links {
  display: flex;
  align-items: center;
  flex: 1;
  gap: 5px;
  min-width: 0;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
body.happamochi-connected .hm-community-links::-webkit-scrollbar { display: none; }
body.happamochi-connected .hm-community-links a {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 7px 13px;
  border-radius: 999px;
  color: #456b80;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.5;
  white-space: nowrap;
  text-decoration: none;
  transition: background .18s, color .18s;
}
body.happamochi-connected .hm-community-links a:hover,
body.happamochi-connected .hm-community-links a:is(.is-current, .is-active, [aria-current="page"]) {
  color: #0277bd;
  background: #fff;
}
body.happamochi-connected .hm-community-post {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 8px 18px;
  border: 1px solid rgb(255 255 255 / 55%);
  border-radius: 999px;
  color: #fff;
  background: #0288d1;
  box-shadow: 0 4px 12px rgb(2 136 209 / 18%);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.5;
  white-space: nowrap;
  text-decoration: none;
}
body.happamochi-connected .hm-community-post:hover { background: #0277bd; }

body.happamochi-connected .bbs-main { position: relative; z-index: 1; padding-top: 30px; }
body.happamochi-connected .bbs-hero { margin-bottom: 22px; gap: 16px; }
body.happamochi-connected .bbs-hero-title { font-size: 30px; font-weight: 800; letter-spacing: .02em; }
body.happamochi-connected .bbs-hero-title i { color: #0288d1; }
body.happamochi-connected .bbs-hero-desc { max-width: 680px; line-height: 1.8; }
body.happamochi-connected .bbs-stats {
  gap: 8px 15px;
  padding: 9px 14px;
  border: 1px solid rgb(255 255 255 / 80%);
  border-radius: 999px;
  background: rgb(255 255 255 / 55%);
}
body.happamochi-connected .bbs-stats strong { color: #0277bd; }

body.happamochi-connected .bbs-official-community {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
  padding: 15px 20px;
  border: 2px solid #fff;
  border-radius: 20px;
  color: #263238;
  background: linear-gradient(120deg, #fff, #effaff);
  box-shadow: var(--bbs-shadow-sm);
  text-decoration: none;
  transition: box-shadow .2s, border-color .2s;
}
body.happamochi-connected .bbs-official-community:hover { border-color: #81d4fa; box-shadow: var(--bbs-shadow); }
body.happamochi-connected .bbs-official-community > img {
  display: block;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #fff;
  object-fit: cover;
}
body.happamochi-connected .bbs-official-community > span { min-width: 0; }
body.happamochi-connected .bbs-official-community small { display: block; color: #0277bd; font-size: 11px; font-weight: 700; line-height: 1.6; }
body.happamochi-connected .bbs-official-community strong { display: block; margin-block: 2px; font-size: 17px; font-weight: 800; line-height: 1.55; }
body.happamochi-connected .bbs-official-community span > span { display: block; color: #546e7a; font-size: 12px; line-height: 1.65; }
body.happamochi-connected .bbs-official-community > b {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  color: #0277bd;
  background: #e1f5fe;
  font-size: 20px;
}

body.happamochi-connected .bbs-search-form { border-color: #fff; border-radius: 18px; padding: 9px; margin-bottom: 22px; }
body.happamochi-connected .bbs-search-input { min-width: 0; }
body.happamochi-connected .bbs-search-button { min-height: 44px; background: #0288d1; border-radius: 12px; font-weight: 700; }
body.happamochi-connected .bbs-search-button:hover { background: #0277bd; }
body.happamochi-connected .bbs-layout > * { min-width: 0; }
body.happamochi-connected :is(.bbs-panel, .bbs-thread-card, .bbs-form-card, .bbs-detail-card, .bbs-section, .bbs-side-panel, .bbs-comment) {
  border-color: rgb(255 255 255 / 90%);
  box-shadow: var(--bbs-shadow-sm);
}
body.happamochi-connected .bbs-thread-card { border-radius: 18px; }
body.happamochi-connected .bbs-thread-card:hover { border-color: #81d4fa; box-shadow: var(--bbs-shadow); }
body.happamochi-connected .bbs-thread-card-link { grid-template-columns: minmax(0, 1fr) auto; }
body.happamochi-connected .bbs-thread-title { overflow-wrap: anywhere; }
body.happamochi-connected :is(.bbs-thread-excerpt, .bbs-guide-link, .bbs-breadcrumb, .bbs-breadcrumb a, .bbs-back-link a, .bbs-thread-card-bottom, .bbs-thread-time, .bbs-detail-author, .bbs-list li, .bbs-comment-author, .bbs-comment-body) { color: #546e7a; }
body.happamochi-connected .bbs-tab { color: #456b80; border-radius: 11px; }
body.happamochi-connected .bbs-tab:is(:hover, .is-active) { color: #0277bd; }
body.happamochi-connected .bbs-category-other { color: #456b80; background: #eaf5fc; }
body.happamochi-connected :is(.bbs-new-button, .bbs-submit-button, .bbs-join-link) { border-radius: 12px; }
body.happamochi-connected :is(.bbs-form-input, .bbs-form-textarea, .bbs-form-select) { min-width: 0; background: #f8fcff; border-radius: 10px; }
body.happamochi-connected .bbs-side-panel { top: 90px; }
body.happamochi-connected .bbs-gallery-howto { color: #456b80; background: rgb(255 255 255 / 75%); }
body.happamochi-connected .bbs-main + .footer-wave { margin-top: 0; }

@media (max-width: 740px) {
  body.happamochi-connected .hm-community-nav { width: calc(100% - 32px); gap: 8px; margin-top: 14px; padding-bottom: 10px; }
  body.happamochi-connected .hm-community-links { gap: 2px; }
  body.happamochi-connected .hm-community-links a { min-height: 44px; padding-inline: 10px; font-size: 12px; }
  body.happamochi-connected .hm-community-post { min-height: 44px; padding-inline: 13px; font-size: 12px; }
  body.happamochi-connected .bbs-main { padding-top: 23px; }
  body.happamochi-connected .bbs-hero-title { font-size: 25px; gap: 8px; }
  body.happamochi-connected .bbs-hero-desc { font-size: 13px; }
  body.happamochi-connected .bbs-stats { width: fit-content; max-width: 100%; border-radius: 12px; padding: 7px 10px; margin-top: 12px; }
  body.happamochi-connected .bbs-official-community { grid-template-columns: 42px minmax(0, 1fr) 24px; gap: 10px; padding: 13px; border-radius: 17px; }
  body.happamochi-connected .bbs-official-community > img { width: 42px; height: 42px; }
  body.happamochi-connected .bbs-official-community small { font-size: 10px; }
  body.happamochi-connected .bbs-official-community strong { font-size: 15px; }
  body.happamochi-connected .bbs-official-community span > span { font-size: 11px; }
  body.happamochi-connected .bbs-official-community > b { width: 24px; height: 24px; font-size: 17px; }
  body.happamochi-connected .bbs-search-form { grid-template-columns: minmax(0, 1fr) auto; gap: 5px; }
  body.happamochi-connected .bbs-search-input { padding-inline: 7px; font-size: 16px; }
  body.happamochi-connected .bbs-search-button { padding-inline: 17px; }
  body.happamochi-connected .bbs-layout { gap: 18px; }
  body.happamochi-connected .bbs-side { border-radius: 15px; }
  body.happamochi-connected .bbs-tab { min-height: 42px; font-size: 13px; }
  body.happamochi-connected .bbs-thread-card-link { grid-template-columns: minmax(0, 1fr); padding: 16px; }
  body.happamochi-connected .bbs-form-card { padding: 18px; }
  body.happamochi-connected :is(.bbs-form-input, .bbs-form-textarea, .bbs-form-select) { font-size: 16px; }
  body.happamochi-connected .bbs-side-panel { position: static; }
}

@media (max-width: 640px) {
  body.happamochi-connected .site-header { top: 8px; }
  body.happamochi-connected [id] { scroll-margin-top: 140px; }
}

@media (max-width: 359px) {
  body.happamochi-connected .hm-community-post { padding-inline: 10px; }
  body.happamochi-connected .bbs-hero-title { font-size: 23px; }
  body.happamochi-connected .bbs-official-community { gap: 8px; padding-inline: 10px; }
  body.happamochi-connected .bbs-official-community strong { font-size: 14px; }
  body.happamochi-connected .bbs-official-community small { font-size: 9px; }
}

@media (prefers-reduced-motion: reduce) {
  body.happamochi-connected *, body.happamochi-connected *::before, body.happamochi-connected *::after { scroll-behavior: auto !important; }
}

/* Posting stays over the current page; native dialog handles focus and Escape. */
html.bbs-compose-open { overflow: hidden; }
body.happamochi-connected .bbs-compose-dialog {
  position: fixed;
  width: min(520px, calc(100% - 24px));
  max-width: none;
  max-height: calc(100dvh - 32px);
  margin: auto;
  padding: 20px;
  overflow-y: auto;
  overscroll-behavior: contain;
  border: 2px solid #fff;
  border-radius: 22px;
  color: var(--bbs-ink);
  background: #f3fbff;
  box-shadow: 0 20px 80px rgb(2 77 115 / 25%);
}
.bbs-compose-dialog::backdrop { background: rgb(19 54 73 / 42%); }
.bbs-compose-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.bbs-compose-heading h2 { margin: 0; font-size: 22px; }
.bbs-compose-close { flex: 0 0 auto; width: 40px; height: 40px; border: 0; border-radius: 50%; color: #0277bd; background: #e1f5fe; font: 26px/1 sans-serif; cursor: pointer; }
.bbs-compose-description { margin: 4px 0 16px; color: #546e7a; font-size: 12px; }
body.happamochi-connected .bbs-compose-dialog .bbs-form-card { margin: 0; padding: 0; border: 0; background: transparent; box-shadow: none; }
.bbs-compose-dialog .bbs-form-row { margin-bottom: 13px; }
.bbs-compose-dialog .bbs-form-label { margin-bottom: 5px; font-size: 13px; }
.bbs-compose-dialog .bbs-form-textarea { min-height: 106px; resize: vertical; }
.bbs-compose-dialog .bbs-submit-button { width: 100%; min-height: 46px; }
.bbs-compose-dialog button:disabled { opacity: .65; cursor: wait; }
.bbs-compose-dialog [hidden], .bbs-post-notice[hidden] { display: none !important; }
.bbs-post-notice { margin-bottom: 20px; padding: 12px 16px; border: 1px solid #a4d9ee; border-radius: 14px; color: #075f81; background: #fff; font-size: 13px; overflow-wrap: anywhere; }
.bbs-post-notice a { font-weight: 700; }
.bbs-post-notice button { margin-left: 8px; padding: 6px 10px; border: 1px solid #a4d9ee; border-radius: 8px; color: inherit; background: #e1f5fe; font: inherit; cursor: pointer; }
@media (max-width: 640px) {
  body.happamochi-connected .bbs-compose-dialog { padding: 15px; max-height: calc(100dvh - 20px); }
  .bbs-compose-heading h2 { font-size: 20px; }
}

/* QR images and their decoded destinations stay usable from the list itself. */
body.happamochi-connected .bbs-thread-card-content { display: block; }
.bbs-thread-title > a { color: inherit; text-decoration: none; }
.bbs-thread-title > a:hover { color: #0277bd; text-decoration: underline; }
.bbs-thread-detail-link { display: inline-flex; align-items: center; gap: 7px; min-height: 40px; margin-top: 5px; color: #0277bd; font-size: 12px; font-weight: 700; text-decoration: none; }
.bbs-content-link { color: #0277bd; text-decoration: underline; text-underline-offset: 3px; overflow-wrap: anywhere; }
.bbs-detail-body, .bbs-comment-body { overflow-wrap: anywhere; }
.bbs-attachment { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin-top: 14px; }
.bbs-attachment-image-link { display: block; max-width: 100%; line-height: 0; }
.bbs-attachment-image { display: block; width: auto; max-width: min(100%, 320px); max-height: 360px; object-fit: contain; border: 1px solid #d7e9f1; border-radius: 10px; background: #fff; }
.bbs-attachment.is-compact { gap: 12px; margin-top: 11px; }
.bbs-attachment.is-compact .bbs-attachment-image { width: 104px; height: 104px; padding: 3px; }
.bbs-attachment-link-wrap { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; min-width: 0; }
.bbs-attachment-link { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; padding: 8px 14px; border: 1px solid #98d9f4; border-radius: 10px; color: #0277bd; background: #e8f7ff; font-size: 13px; font-weight: 700; text-decoration: none; }
.bbs-attachment-link.is-line { border-color: #c2ebcc; color: #166737; background: #edf9ef; }
.bbs-attachment-link:hover { filter: brightness(.97); }
.bbs-attachment-link .fa-line { font-size: 20px; }
.bbs-attachment-host { max-width: 100%; color: #647b87; font-size: 10px; overflow-wrap: anywhere; }
.bbs-optional { color: #71858f; font-size: 11px; font-weight: 400; }
.bbs-image-input { display: block; width: 100%; min-width: 0; color: #546e7a; font: inherit; font-size: 12px; }
.bbs-image-input::file-selector-button { min-height: 40px; margin-right: 9px; padding: 7px 12px; border: 1px solid #aad9ec; border-radius: 9px; color: #0277bd; background: #e7f6ff; font: inherit; cursor: pointer; }
.bbs-image-hint { margin: 6px 0 0; color: #637d8a; font-size: 11px; line-height: 1.65; }
.bbs-image-preview { display: flex; align-items: center; gap: 12px; margin-top: 9px; }
.bbs-image-preview > img { display: block; width: 90px; height: 90px; object-fit: contain; border: 1px solid #c8e2ee; border-radius: 9px; background: #fff; }
.bbs-image-remove { min-height: 40px; padding: 6px 10px; border: 1px solid #c8e2ee; border-radius: 9px; color: #456b80; background: #fff; font: inherit; font-size: 12px; cursor: pointer; }
.bbs-image-status { margin: 6px 0 0; color: #456b80; font-size: 11px; line-height: 1.6; overflow-wrap: anywhere; }
.bbs-image-status:empty { display: none; }
.bbs-image-status.is-error, .bbs-image-status[data-state="error"] { color: #b63838; }
.bbs-image-status[data-state="success"] { color: #166737; }
.bbs-image-qr-link { display: inline-block; padding-block: 7px; color: #0277bd; font-size: 12px; overflow-wrap: anywhere; }
.bbs-image-field [hidden] { display: none !important; }
@media (max-width: 359px) {
  .bbs-attachment.is-compact .bbs-attachment-image { width: 84px; height: 84px; }
  .bbs-attachment-link { padding-inline: 10px; font-size: 12px; }
}

