@media (max-width: 768px) {
  .festival-collage header .shell {
    padding: 10px 16px;
    min-height: 0;
    gap: 8px;
  }
  .festival-collage header nav {
    gap: 6px;
    flex-wrap: wrap;
  }
  .festival-collage header nav :is(a, button),
  .festival-collage .collage-controls button {
    min-height: 44px;
  }
  .festival-collage .type-main h1 {
    font-size: clamp(40px, 12vw, 66px) !important;
    margin-block: 10px !important;
  }
  .festival-collage .type-bottom {
    padding-block: 6px !important;
  }
  .festival-collage .journey-home-intro > p {
    margin-block: 0 10px;
    line-height: 1.8;
  }
  .festival-collage .collage-actions {
    gap: 8px;
    margin-top: 12px;
  }
  .festival-collage .collage-actions > a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 8px 12px;
  }
  .festival-collage .cards {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px 12px;
    align-items: start;
    padding: 4px 0 10px;
    overflow: visible;
  }
  .festival-collage .cards .member {
    width: 100%;
    min-width: 0;
    margin-top: 0;
    text-align: start;
  }
  .festival-collage .cards .member .portrait {
    height: auto !important;
    aspect-ratio: 3 / 4;
    border-start-start-radius: 48% 32%;
    border-start-end-radius: 48% 32%;
  }
  .festival-collage .cards .member strong {
    font-size: 16px !important;
    padding-top: 8px;
  }
  .festival-collage .cards .student-short {
    font-size: 14px;
    line-height: 1.65;
    overflow-wrap: anywhere;
  }
  .festival-collage .team {
    margin-block: 20px 28px;
  }
  .festival-collage .roster-title {
    flex-wrap: wrap;
    gap: 6px 14px;
    margin-bottom: 16px;
  }
  .festival-collage :is(#lineup, #prizes, #support, #two-school-memories) {
    scroll-margin-top: 9rem;
  }
  .festival-collage .chairman-more {
    min-height: 44px;
    text-align: start;
  }
  #rules-dialog .entry-top,
  #chairman-profile .chairman-dialog-top {
    position: sticky;
    top: 0;
    z-index: 2;
  }
  #chairman-profile .chairman-dialog-top {
    padding: 8px 14px;
  }
  #chairman-profile .chairman-dialog-top button {
    min-height: 44px;
    flex: none;
  }
  html[data-festival-theme] body.festival-guest-page .festival-guest-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 4px 6px;
    padding: 8px 12px 5px !important;
  }
  .festival-guest-page .festival-guest-header .festival-guest-brand {
    gap: 7px;
    min-width: 0;
    font-size: clamp(14px, 4vw, 19px);
    line-height: 1.25;
  }
  .festival-guest-page .festival-guest-brand img {
    width: 30px;
    height: 30px;
  }
  .festival-guest-page .festival-guest-tools {
    gap: 4px;
  }
  .festival-guest-page .festival-guest-tools button {
    font-size: 12px;
    padding-inline: 8px;
    min-height: 44px;
  }
  .festival-guest-page .festival-guest-header .guest-tabs {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 3px;
    overflow: visible;
    width: 100%;
  }
  html[data-festival-theme] body.festival-guest-page .festival-guest-header .guest-tab {
    width: 100%;
    min-width: 0;
    min-height: 44px;
    padding: 4px !important;
    font-size: clamp(12px, 3.4vw, 14px) !important;
    line-height: 1.3;
    white-space: normal;
  }
  html[data-festival-theme] body.festival-guest-page #wrap {
    width: calc(100% - 24px) !important;
    margin: 12px auto !important;
    padding: 0 !important;
  }
  .festival-guest-page :is(#orderFlow, #visitGate, #visitRegister, #photoServicePanel, #visitTotalPanel, #prizes) {
    scroll-margin-top: 7.5rem;
    min-width: 0;
  }
  .festival-guest-page .arrival-welcome {
    grid-template-columns: minmax(0, 1fr) clamp(76px, 24vw, 120px);
    gap: 10px;
    margin-bottom: 18px;
  }
  .festival-guest-page #visitGate .visit-choice-grid {
    grid-template-columns: minmax(0, 1fr) !important;
  }
  .festival-guest-page .arrival-welcome h1 {
    font-size: clamp(23px, 6vw, 30px);
    margin-bottom: 8px;
  }
  .festival-guest-page .arrival-photos {
    height: auto;
    min-width: 0;
  }
  .festival-guest-page .arrival-photos img {
    width: 100%;
    height: auto;
    aspect-ratio: 3 / 4;
  }
  .festival-guest-page .arrival-photos img + img {
    display: none;
  }
  .festival-guest-page .journey-before-order {
    gap: 6px;
    padding-block: 6px;
  }
  .festival-guest-page .journey-before-order > span,
  .festival-guest-page #festival-order .festival-order-header #festival-identity {
    flex: 1 0 100%;
    min-width: 0;
    overflow-wrap: anywhere;
  }
  .festival-guest-page #festival-order .festival-order-header > button {
    min-height: 44px;
  }
  .festival-guest-page #festival-order .festival-order-header {
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 6px 10px !important;
  }
  html[data-festival-theme] body.festival-guest-page #festival-order .festival-cover {
    gap: 10px !important;
    grid-template-columns: minmax(0, 1fr) clamp(106px, 30vw, 128px) !important;
    height: auto !important;
    max-height: none;
  }
  html[data-festival-theme] body.festival-guest-page #festival-order .festival-cover:has(.festival-cover-portrait[hidden]) {
    grid-template-columns: minmax(0, 1fr) !important;
  }
  html[data-festival-theme] body.festival-guest-page #festival-order .festival-cover-portrait:not([hidden]) {
    display: grid;
    height: auto !important;
    min-height: 0 !important;
    border-radius: 24px 7px 14px 7px !important;
    background: var(--fp-surface);
  }
  html[data-festival-theme] body.festival-guest-page #festival-order .festival-cover-portrait img {
    position: static;
    height: 106px !important;
    border-radius: 0;
  }
  html[data-festival-theme] body.festival-guest-page #festival-order .festival-cover-portrait strong {
    position: static;
    padding: 4px 6px !important;
    font-size: 12px !important;
    overflow-wrap: anywhere;
  }
  html[data-festival-theme] body.festival-guest-page #festival-order #festival-cover-controls:not([hidden]) {
    position: static;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    padding: 0;
    border-radius: 0 !important;
  }
  .festival-guest-page #festival-order #festival-cover-controls button {
    min-height: 36px;
    padding: 0;
  }
  .festival-guest-page :is(#visitRegister, #sharedTablePanel, #photoServicePanel) :is(input, select, textarea) {
    min-width: 0;
    max-width: 100%;
    font-size: 16px;
  }
  .festival-guest-page .photo-service-actions {
    flex-wrap: wrap;
  }
  .festival-guest-page :is(#visitTotalPanel, #visitTotalDetails) {
    overflow-wrap: anywhere;
  }
}

@media (min-width: 540px) and (max-width: 768px) {
  .festival-collage .cards {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

