/* 자동 생성 (scripts/gen-tome-container.js) — 고치지 말고 생성기를 다시 돌릴 것 */
@media (min-width: 1100px) {
  .panel .panel-box, .panel > .grid > *, .panel > .home-grid > *, .panel > .char-page > *, .panel > .stack > * { container: pb / inline-size; }
  @container pb (max-width: 992px) {
    .grid-2, .raid-grid, .rank-grid { grid-template-columns: 1fr; }
      .span-2 { grid-column: auto; }
      .party-grid, .party-grid-8 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
      .diff-grid, .facts-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
      .img-row { grid-template-columns: 3.25rem minmax(0, 1fr); }
      .img-row .actions { grid-column: 1 / -1; }
  }
  @container pb (max-width: 608px) {
    .stage { grid-template-columns: 1fr; }
      .timer-box { justify-items: start; text-align: left; }
      .timer { font-size: 2rem; }
      .token { width: 4.5rem; height: 4.5rem; font-size: 2.375rem; }
      .token.boss { width: 5rem; height: 5rem; font-size: 2.75rem; }
      .tree, .branch, .form-grid { grid-template-columns: 1fr; }
      .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  }
  @container pb (max-width: 560px) {
    .post-row { grid-template-columns: 1rem minmax(0, 1fr); }
      .post-row .right { grid-column: 2; text-align: left; }
      .post-row .right br { display: none; }
      .reader-title { font-size: 1.25rem; }
  }
  @container pb (max-width: 560px) {
    #tab-world .stat-table, .modal .stat-table { grid-template-columns: 1fr; gap: 0.125rem; }
      #tab-world .stat-table dd, .modal .stat-table dd { margin-bottom: 0.375rem; }
  }
  @container pb (max-width: 720px) {
    .chat-layout { grid-template-columns: minmax(0, 1fr); }
      .chat-list { max-height: 14rem; }
      .signup-grid { grid-template-columns: minmax(0, 1fr); }
      .msg { max-width: 95%; }
  }
  @container pb (max-width: 560px) {
    .topbar .wallet { width: 100%; justify-content: space-between; }
      .avatar-lg { width: 4.5rem; height: 4.5rem; }
      #main-nav { flex-wrap: wrap; overflow-x: visible; }
      #main-nav .tab { padding: 0.5rem 0.625rem; }
  }
  @container pb (max-width: 900px) {
    .home-top, .home-bottom, .home-more { grid-template-columns: minmax(0, 1fr); }
  }
  @container pb (max-width: 560px) {
    .inbox { top: 0; left: 0; bottom: 0; width: 100vw; border-radius: 0; }
      .home-profile .profile-head { flex-wrap: wrap; }
  }
  @container pb (max-width: 700px) {
    .home-grid { grid-template-columns: minmax(0, 1fr); }
      .home-grid > *, .home-grid .home-world, .home-grid .home-notice { grid-column: span 1 !important; }
  }
  @container pb (max-width: 760px) {
    .char-page { grid-template-columns: minmax(0, 1fr); } .char-skill { grid-column: auto; } .eq-grid { grid-template-columns: minmax(0, 1fr); }
  }
  @container pb (max-width: 560px) {
    .mk-row { grid-template-columns: minmax(0, 1fr); } .mk-act { grid-row: auto; grid-column: auto; justify-self: end; } .mk-sell .form-grid { grid-template-columns: minmax(0, 1fr); }
  }
  @container pb (max-width: 560px) {
    #tab-market .item, .char-equip .item { grid-template-columns: minmax(0, 1fr); }
      #tab-market .item-actions, .char-equip .item-actions { justify-content: flex-start; }
  }
  @container pb (max-width: 760px) {
    .skill-slots { grid-template-columns: repeat(2, minmax(0, 1fr)); } .skill-grid { grid-template-columns: 1fr; }
  }
  @container pb (max-width: 560px) {
    .inbox.chat-dock { top: auto; left: 0; right: 0; bottom: 0; width: 100vw; border-radius: var(--r) var(--r) 0 0; max-height: 75vh; }
      .mailpop { top: 3.5rem; left: 0.5rem; right: 0.5rem; width: auto; }
  }
  @container pb (max-width: 560px) {
    .auth-card .form-grid { grid-template-columns: minmax(0, 1fr); }
      .pw-wrap + .field-err, .form-grid .field-err { grid-column: 1; }
  }
  @container pb (max-width: 560px) {
    .modal-guide #modal-buttons .btn { flex: 1 1 auto; } .modal-guide .guide-nav { width: 100%; } .modal-guide .guide-nav .btn { flex: 1; }
  }
  @container pb (max-width: 992px) {
    .bd-layout { grid-template-columns: minmax(0, 1fr); } .bd-compose { position: static; }
  }
  @container pb (max-width: 560px) {
    .bd-toolbar .actions { justify-content: flex-start; } #tab-board .bd-toolbar #bd-q { width: 100%; max-width: none; }
  }
  @container pb (max-width: 480px) {
    .bd-grid { grid-template-columns: minmax(0, 1fr); } .bd-toolbar .row-between { align-items: stretch; } .bd-toolbar .actions { width: 100%; }
  }
  @container pb (max-width: 600px) {
    .who .world-chip, .who [data-action=openProfile] { min-height: 32px; display: inline-flex; align-items: center; }
  }
  @container pb (max-width: 360px) {
    .row-between.wrap > .seg, .filter-bar label { flex-wrap: wrap; }
      .seg .seg-btn { white-space: normal; }
  }
  @container pb (max-width: 560px) {
    .only-narrow { display: block; }
  }
  @container pb (max-width: 560px) {
    .item:has(> .item-actions > :nth-child(2)) { grid-template-columns: minmax(0, 1fr); }
      .item:has(> .item-actions > :nth-child(2)) > .item-actions { justify-content: flex-start; }
      .pcard:has(> .pcard-actions > :nth-child(2)) > .pcard-actions { grid-column: 2 / -1; justify-content: flex-start; }
      /* 별자리 지도: 글자가 7px 로 작아지지 않게 지도를 넓히고 가로로 밀어서 봄 */
      .star-map-wrap { overflow-x: auto; overscroll-behavior-x: contain; }
      .star-map { min-width: 34rem; max-height: none; }
  }
}
