@charset "UTF-8";

/**
 * hanabi — タブレット・モバイル向け（style-pc / portal-home の後に読み込む）
 * ブレークポイント: 1024（タブレット） / 768（モバイル） / 480（小型）
 */

/* ---------- タブレット: 1024px 以下 ---------- */
@media (max-width: 1024px) {
  .l-contents {
    width: 100%;
    max-width: 1060px;
    box-sizing: border-box;
  }

  .l-header__wire {
    width: 100%;
    max-width: 1060px;
    padding-left: 12px;
    padding-right: 12px;
    box-sizing: border-box;
  }

  .l-footer__wire {
    width: 100%;
    max-width: 1060px;
    box-sizing: border-box;
  }

  .portal-shell {
    padding-left: 12px;
    padding-right: 12px;
  }

  .portal-hero__banner img {
    height: min(42vw, 380px);
  }

  .portal-region-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .jp-map {
    max-width: none;
  }

  /* 一覧: 画像+テキストの固定幅が狭画面で溢れないよう */
  .m-mainlist-item__link {
    width: auto;
    max-width: calc(100% - 226px);
    min-width: 0;
  }
}

/* ---------- タブレット縦 / 大型スマホ: 900px 以下 ---------- */
@media (max-width: 900px) {
  .portal-card {
    gap: 12px;
  }

  .portal-card__thumb {
    flex: 0 0 min(160px, 38vw);
    max-width: min(160px, 38vw);
  }

  .portal-card__thumb img,
  .portal-card__thumb--placeholder img {
    height: 100px;
  }

  .portal-section__head h2 {
    font-size: 15px;
  }
}

/* ---------- モバイル: 768px 以下 ---------- */
@media (max-width: 768px) {
  html {
    -webkit-text-size-adjust: 100%;
  }

  body {
    font-size: 15px;
    line-height: 1.5;
  }

  .l-header__wire {
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 10px;
    padding-top: 10px;
    padding-bottom: 10px;
  }

  .l-header__logo {
    width: min(112px, 28vw);
  }

  .l-header__area {
    font-size: 12px;
    line-height: 1.4;
    flex: 1 1 120px;
    min-width: 0;
  }

  .l-contents .l-main {
    float: none;
    width: 100%;
    max-width: 100%;
  }

  .l-contents {
    padding-left: max(10px, env(safe-area-inset-left, 0px));
    padding-right: max(10px, env(safe-area-inset-right, 0px));
  }

  .portal-breadcrumb {
    font-size: 11px;
    word-break: break-all;
  }

  .portal-subnav {
    font-size: 12px;
    padding-bottom: 12px;
  }

  .portal-subnav__admin {
    margin-left: 0;
    flex: 0 0 auto;
  }

  .portal-filters {
    padding: 14px 12px 16px;
    border-radius: 10px;
  }

  .portal-filters__title {
    font-size: 16px;
  }

  .portal-action-strip {
    padding: 12px 12px 14px;
  }

  .portal-action-strip__btn {
    min-width: calc(50% - 4px);
    flex: 1 1 calc(50% - 4px);
    min-height: 44px;
    padding-top: 12px;
    padding-bottom: 12px;
  }

  .portal-action-strip__btn--primary {
    flex: 1 1 100%;
    max-width: none;
  }

  .portal-search {
    flex-direction: column;
    align-items: stretch;
  }

  .portal-search input[type="text"] {
    flex: 1 1 auto;
    min-width: 0;
    width: 100%;
    min-height: 44px;
    font-size: 16px;
  }

  .portal-search button {
    width: 100%;
    min-height: 44px;
    font-size: 15px;
  }

  .portal-search-suggest {
    gap: 6px 8px;
  }

  .portal-content-note {
    font-size: 12px;
    padding: 10px 12px;
  }

  .portal-hero__banner {
    min-height: 0;
  }

  .portal-hero__banner img {
    height: min(52vw, 240px);
  }

  .portal-hero__banner-title {
    font-size: 16px;
  }

  .portal-hero__banner-meta {
    font-size: 13px;
  }

  .portal-hero__banner-cta {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding-left: 20px;
    padding-right: 20px;
  }

  .portal-page-title {
    font-size: 20px;
    margin-bottom: 14px;
  }

  .portal-region-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
  }

  .portal-region-grid a {
    padding: 10px 8px;
    font-size: 11px;
  }

  .portal-section__head {
    padding: 10px 12px;
  }

  .portal-kind-block__head {
    padding: 8px 10px;
  }

  .portal-card {
    flex-direction: column;
    padding: 12px 10px;
  }

  .portal-card__thumb {
    flex: none;
    max-width: none;
    width: 100%;
  }

  .portal-card__thumb img,
  .portal-card__thumb--placeholder img {
    height: min(42vw, 180px);
  }

  .portal-card__title {
    font-size: 15px;
  }

  /* イベント一覧: float 解除して縦積み */
  .list-wrap {
    padding-left: 10px !important;
    padding-right: 10px !important;
  }

  .m-mainlist-item {
    padding-left: 10px;
    padding-right: 10px;
    padding-bottom: 16px;
  }

  .m-mainlist-item__img {
    float: none;
    width: 100%;
    height: auto;
    max-width: 100%;
    margin: 0 0 12px;
  }

  .m-mainlist-item__img span {
    display: block !important;
    width: 100% !important;
    height: auto !important;
    min-height: 160px;
    max-height: 220px;
  }

  .m-mainlist-item__img img {
    width: 100%;
    max-width: 100%;
    height: auto;
    max-height: 220px;
    object-fit: cover;
  }

  .m-mainlist-item__link {
    float: none;
    width: 100%;
    max-width: none;
    clear: both;
  }

  /* .is-newlist の詳細度が高いため明示（460px 固定の残りを防ぐ） */
  .is-newlist .m-mainlist-item__link {
    float: none !important;
    width: 100% !important;
    max-width: none !important;
    padding-left: 0 !important;
  }

  .m-mainlist-item__ttl {
    word-break: break-word;
    line-height: 1.45;
    font-size: 15px;
  }

  .m-mainlist-item__ttl span {
    display: inline;
  }

  .m-mainlist-condition {
    margin-top: 0;
    padding: 8px 4px;
  }

  .m-mainlist-condition__name {
    float: none;
    width: 100%;
    margin-top: 8px;
  }

  .m-mainlist-condition__name:first-child {
    margin-top: 0;
  }

  .m-mainlist-condition__txt {
    float: none;
    width: 100%;
    margin-top: 4px;
    margin-bottom: 8px;
  }

  .m-pager__link {
    width: min(85px, 14vw);
    min-width: 44px;
    min-height: 44px;
    line-height: 42px;
    box-sizing: border-box;
    font-size: 14px;
  }

  .m-pager__item {
    margin: 2px;
  }

  .search {
    flex-direction: column;
    align-items: stretch;
  }

  .search input,
  .search button {
    min-height: 44px;
    font-size: 16px;
  }

  .search button {
    width: 100%;
  }

  .chips {
    gap: 6px;
  }

  .chip {
    font-size: 11px;
    padding: 8px 10px;
  }

  /* 静的ページ（会社概要など） */
  .hanabi-static {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }

  .hanabi-static .p-heading__ttl {
    font-size: 22px;
    line-height: 1.35;
  }

  .hanabi-static table {
    display: block;
    width: 100%;
  }

  .hanabi-static table tbody {
    display: block;
    width: 100%;
  }

  .hanabi-static table tr {
    display: block;
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid #eee;
  }

  .hanabi-static table th {
    display: block;
    width: 100% !important;
    padding: 8px 0 4px !important;
    border-top: none !important;
    font-size: 12px;
    color: #64748b;
  }

  .hanabi-static table td {
    display: block;
    width: 100% !important;
    padding: 0 0 4px !important;
    border-top: none !important;
    line-height: 1.65;
  }

  /* 地図: エリアボタンを2列・タップしやすい高さに */
  .jp-map__region-btn {
    flex: 1 1 calc(50% - 4px);
    min-width: calc(50% - 4px);
    min-height: 44px;
  }

  .jp-map__chip {
    min-height: 40px;
    padding-top: 10px;
    padding-bottom: 10px;
  }
}

/* ---------- 小型スマホ: 480px 以下 ---------- */
@media (max-width: 480px) {
  .portal-shell {
    padding-left: max(10px, env(safe-area-inset-left, 0px));
    padding-right: max(10px, env(safe-area-inset-right, 0px));
    padding-bottom: max(24px, env(safe-area-inset-bottom, 0px));
  }

  .portal-filters__block--map .jp-map {
    padding-left: 10px;
    padding-right: 10px;
  }

  .portal-action-strip__row {
    gap: 8px;
  }

  .portal-action-strip__btn {
    min-width: calc(50% - 4px);
    font-size: 12px;
  }

  .portal-mini-cal__grid th,
  .portal-mini-cal__grid td {
    width: 28px;
  }

  .portal-mini-cal__grid td a {
    line-height: 32px;
    min-height: 32px;
  }

  .m-pager {
    padding: 0 4px;
  }

  .m-pager__list {
    max-width: 100%;
    overflow-x: auto;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
    text-align: left;
    padding-bottom: 6px;
  }

  .m-pager__item {
    display: inline-block;
    vertical-align: middle;
  }
}

/* ---------- フッター ---------- */
@media (max-width: 768px) {
  .hanabi-footer__top {
    flex-direction: column !important;
    align-items: stretch !important;
    padding-left: 14px !important;
    padding-right: 14px !important;
  }

  .hanabi-footer__top nav[aria-label="フッターナビ"] ul {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 10px 14px !important;
  }

  .hanabi-footer__credit,
  .hanabi-footer__bottom {
    padding-left: 14px !important;
    padding-right: 14px !important;
  }
}

@media (max-width: 480px) {
  .hanabi-footer__top nav[aria-label="フッターナビ"] ul {
    grid-template-columns: 1fr !important;
  }

  .hanabi-footer__bottom {
    flex-direction: column !important;
    align-items: center !important;
    text-align: center;
    gap: 8px !important;
  }
}

/* お知らせ・ブログ */
@media (max-width: 640px) {
  .portal-news-page__head {
    margin-left: 12px;
    margin-right: 12px;
    padding: 16px 14px 18px;
  }
  .portal-news-page__list,
  .portal-news-page__stats {
    margin-left: 12px;
    margin-right: 12px;
  }
  .portal-news-article {
    margin-left: 12px;
    margin-right: 12px;
  }
  .portal-news-article--sheet {
    padding-left: 16px !important;
    padding-right: 16px !important;
  }
  .portal-news-toc__inner {
    padding: 14px 14px 16px;
  }
  .portal-news-page .portal-breadcrumb--v2 [aria-current='page'] {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    word-break: break-word;
    line-height: 1.35;
    max-width: 100%;
  }
}
