/* App-owned phone fixes for /mechanic/ (sf-mech-03 plan D4, D5; trimmed by sf-mech-05: since every page but the two
   standalone ones carries the old phone page's own markup, the rules that adapted PC markup to the phone theme went). Published as /mechanic/sp/fix.css by
   scripts/prepare.d/20-sync-sp-assets.mjs, linked after both theme stylesheets. Every rule sits in a media
   block that matches one theme's width, except shared image-link controls: the PC theme applies from 1000px,
   the phone theme below. */

/* Detail examples keep the full image visible with the enlargement control in its own row. */
.c-zoom.c-zoom--detail {
  padding: 0;
}
.c-zoom--detail > img {
  display: block;
  margin: 0 auto;
}
.c-zoom--detail > .c-zoom__btn {
  position: static;
  display: block;
  width: fit-content;
  margin: 8px 0 0 auto;
}
.c-zoom--detail:focus-visible {
  outline: 3px solid #004e9b;
  outline-offset: 4px;
}

/* The chrome parts that exist twice (chrome.tsx): .x-pc for the PC theme, .x-sp for the phone theme */
@media (max-width: 999px) {
  .x-pc {
    display: none !important;
  }
}
@media (min-width: 1000px) {
  .x-sp {
    display: none !important;
  }
}

@media (max-width: 999px) {
  /* Data tables wider than a phone (up to 10 columns of figures) scroll sideways inside themselves. Listed one
     by one, as scripts/phone.mjs found them: a blanket rule would also shrink the narrow tables that the phone
     theme stretches to 100%, and a wrapper element would break the themes' .c-hdg08+.c-table01 rules. */
  .p-articles11__table02,
  .p-articles13__table01,
  .p-articles13__table02,
  .p-dealer_income04__table01,
  .p-qualification-grade-one main .c-table01,
  .p-qualification-grade-two main .c-table01,
  .p-qualification-grade-three main .c-table01,
  #attention .table01 {
    display: block;
    overflow-x: auto;
  }
  /* The terms page (main-site mngrule.css) has no side margin of its own at phone width */
  #rulePrivacy main {
    padding: 0 15px;
  }
}

/* sf-mech-04: at every phone-theme width (they also broke at 768px) */
@media (max-width: 999px) {
  /* P1, P4: 同じ市区町村の求人. The phone theme lays the cards out for slick (3 floated per slide), which is not
     served: the section collapsed and the cards ran over what follows. One card per row, values beside labels. */
  .c-slider01 .c-slider01__inner {
    display: flow-root;
  }
  .c-slider01 .c-order_info {
    position: relative;
    width: auto;
    float: none;
    margin-bottom: 15px;
  }
  /* The phone theme clamps the location / job type to one line for the slick card (85px label column); without
     overflow hidden the extra lines of a multi-address value ran into the next row */
  .c-slider01 .c-order_detail__desc[data-type="location"],
  .c-slider01 .c-order_detail__desc[data-type="job_type"] {
    overflow: hidden;
  }
}

/* sf-mech-04: the Answers review points carried over (docs/analysis/20261029.answers-feedback-carryover.md).
   The old phone theme was drawn for a 320px-wide viewport; under width=device-width its 10–13px text stays small. */
@media (max-width: 599px) {
  /* P2: no visible text under 14px (labels, notes, dates, the chrome); job values and their PR text at 15px */
  .c-nav01__link,
  .c-nav01__link--current,
  .c-dl__notes,
  .c-btn01__small,
  .c-breadcrumb__item,
  .c-breadcrumb__item a,
  .l-footer__list__txt,
  .l-footer__logo__txt,
  .l-footer small,
  .c-update__date,
  .c-update__date time,
  .c-date01,
  .c-date01__num,
  .c-notes,
  .notes,
  .c-table02__notes,
  .c-figure01__caption,
  .c-icon_blank,
  .c-anchor,
  .c-box05__term,
  .c-sample__num,
  .c-list22__num,
  .c-balloon02,
  .c-balloon02 time,
  .p-company__listener__name01,
  .p-about_us__privacy__desc,
  .jobOverview,
  .c-order_info__id,
  /* sf-mech-05: what the phone twins show that the PC markup did not (date line, job tags, pager count, the top's
     job count, a note on qualification/) */
  .x-sp .c-update,
  .x-sp .c-update time,
  .x-sp .c-label--color03,
  .x-sp .c-pagenavi__num,
  .x-sp .c-order_num01,
  .p-qualification-index main.x-sp p.c-ta--left,
  #attention main,
  #attention main * {
    font-size: 14px !important;
  }
  .c-order_detail__desc,
  .c-order_detail__desc--line02,
  .c-order_info__comment,
  .c-list16__desc,
  .c-list12__desc {
    font-size: 15px;
  }
  /* P1, P10: articles/16's notes under the steps hung below their bar over the arrow; back in the bar */
  .p-articles .c-dl__notes,
  .p-articles16 .c-dl__notes--pos1 {
    position: static;
    display: block;
    margin-top: 4px;
    color: inherit;
    text-align: center;
  }
  /* P7: the terms page (main-site mngrule.css) headings */
  #rulePrivacy main h1 {
    font-size: 22px !important;
  }
  #rulePrivacy main h2 {
    font-size: 19px !important;
  }
}

/* 小寺さんの指摘 (Slack, 2026-10-30, plan 20261030-1523.mechanic-slack-feedback): related-article titles must not be
   squeezed by the thumbnail. The phone theme's 100px thumbnail leaves 115px of title at 320px; below 360px it is
   72px (143px of title). From 360px on the cards are the old phone ones, as on stg (185px of title at 390px). */
@media (max-width: 359px) {
  .x-sp .c-articles01__img {
    width: 72px;
    flex: 0 0 72px;
  }
}
