/* mobile.css — スマホ専用（max-width: 599px） */

/* ── body / コンテナ ────────────────────────────────────── */

body {
    font-size: 14px;
    height: auto;
    margin: 0 auto;
    overflow-x: hidden;
    /* position: relative; スクロール不具合防止のためbodyからは原則外す */
    width: 100%;
    -webkit-overflow-scrolling: touch; /* iOSでのスクロールを滑らかに */
}

.container {
    box-sizing: border-box;
    margin: 0 auto;
    max-width: 100%;
}


/* ── フロントページ（スマホ） ───────────────────────────── */

body.home {
    background: #fff;
    display: block;
    margin: 0;
    padding: 0;
    width: 100%;
}

.home #main.container {
    padding: 0;
    width: 100%;
}

.home .front-content-wrapper {
    align-items: center;
    display: flex;
    flex-direction: column;
    gap: 40px;
    padding: 80px 0;
}

.home .mogami {
    display: block;
    height: auto;
    max-width: 200px;
}

.home .language-selector {
    align-items: center;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.home .language-japanese,
.home .language-english {
    display: block;
    margin: 0 !important;
    width: auto;
}

.home .separator { display: none !important; }

.home #footer.container {
    align-items: center;
    display: flex !important;
    flex-direction: column;
    gap: 15px;
    margin: 0;
    padding: 0 0 100px 0;
    position: relative !important;
    width: 100%;
}

.home .col-right  { justify-content: center !important; order: 1; padding: 0 !important; }
.home .col-center { justify-content: center !important; order: 2; padding: 0 !important; }
.home .col-left   { display: none; }

html body.home .footer-col {
    padding-left: 0;
    width: 100%;
}

.home .copyright-text {
    font-size: 12px;
    text-align: center;
}

.home .col-right a.twitter {
    color: #515151;
    font-family: 'Dosis', sans-serif;
    font-size: 14px;
    letter-spacing: 2px;
    text-decoration: underline;
}


/* ── header（スマホ） ───────────────────────────────────── */

.front-content {
    background: white;
    height: auto;
    margin: 0 auto;
    padding: 70px 50px 0 50px;
    width: auto;
}

h1.title a:hover,
a:focus { color: #515151; }

html body span.logo-text {
    font-size: 30px;
    padding-bottom: 50px;
    padding-left: 0;
}

.title2 .logo-text {
    background-size: contain;
    display: block;
    font-size: 25px;
    padding: 85px 0 50px 15px;
    margin-left: 10px;
}

.front-content-wrapper .wp-block-column { padding-bottom: 30px; }

img.mogami {
    height: auto;
    width: 125px !important;
}

img.language-japanese,
img.language-english {
    margin: 0 auto 20px auto;
    width: 110px;
}

.language div { display: none; }

p.language {
    color: #515151;
    margin-top: 2.5px;
    padding-bottom: 110px;
    text-align: center;
}

ul.language {
    color: #515151;
    margin-top: 2.5px;
    padding-bottom: 90px;
    text-align: center;
}

#header {
    box-sizing: border-box;
    height: 150px;
    margin: 0;
    position: relative;
    width: 100%;
}

.g_translation {
    background-image: linear-gradient(-90deg, rgb(238,238,238) 0%, rgb(238,238,238) 94%, rgb(221,221,221) 100%);
    font-family: 'Dosis', sans-serif;
    font-weight: 550;
    height: 50px;
    left: 0;
    letter-spacing: 2px;
    padding: 5px 0;
    position: absolute;
    text-decoration: none;
    width: 100%;
    word-spacing: 2px;
}

h5 { font-size: 15px; }

p#breadcrumbs {
    color: #ffffff;
    cursor: pointer;
    font-size: 12px;
    padding-bottom: 15px;
}

p#breadcrumbs span a {
    color: #ffffff;
    cursor: pointer;
}


/* ── navigation ─────────────────────────────────────────── */

.navigation {
    background-color: white;
    font-family: "Open Sans", Helvetica, Arial, sans-serif;
    font-size: 12px;
    margin: 0 auto;
    overflow: hidden;
    padding: 0 0 10px 0;
    width: 2.2em;
}

.prev {
    background-color: white;
    float: left;
    font-size: 14px;
    margin-right: 5px;
    text-align: left;
    text-decoration: underline;
    width: auto;
}

.next {
    background-color: white;
    float: right;
    font-size: 14px;
    margin-right: 5px;
    text-align: right;
    text-decoration: underline;
    width: auto;
}

.prev2 {
    background-color: white;
    font-size: 14px;
    margin-right: 5px;
    text-decoration: underline;
    width: auto;
}

.next2 {
    background-color: white;
    font-size: 14px;
    margin: 0 8px 0 0;
    text-decoration: underline;
    width: auto;
}

html body ul.page_navi {
    display: flex;
    justify-content: center;
    line-height: 20px;
    list-style: none;
    margin: 0 0 25px 5px;
    text-align: left;
    width: auto;
}


/* ── posts（スマホ） ────────────────────────────────────── */

.post {
    display: inline;
    margin-bottom: 30px;
}

.post-content {
    background: white;
    border-left: none;
    box-sizing: border-box;
    /* 修正：containとoverflow:hiddenを解除し、正常なスクロールを確保 */
    contain: none; 
    display: block;
    height: auto;
    margin: 0 10px !important;
    overflow: visible; 
    position: relative;
    width: auto;
}

.blocks-gallery-grid .blocks-gallery-item,
.wp-block-gallery .blocks-gallery-item { flex-grow: initial; }

.sketchfab-embed-wrapper {
    height: 300px !important;
    margin: 0 auto 30px auto !important;
}

div.p3din {
    height: 400px !important;
    margin: 0 auto 30px auto !important;
}


/* ── 画像（スマホ） ─────────────────────────────────────── */

img {
    height: auto;
    max-width: 100%;
    width: 100% !important;
}

.wp-block-image img { vertical-align: top !important; }

.thumbnail,
div.thumbnail img,
.wp-block-image.link01,
figure.thumbnail img,
figure.wp-block-image.is-resized {
    display: block;
    margin: 0 auto !important;
    max-width: 100%;
    width: 80% !important;
}

div.thumbnail img,
.link01 img { background: rgb(236, 236, 236); }

figure {
    display: block !important;
    margin: 0 auto !important;
    max-width: 100%;
}

.wp-block-image .alignleft,
.wp-block-image .alignright {
    box-shadow: inset 0 0 3px 3px #DDD !important;
    display: block !important;
    float: none !important;
}

div.wp-block-column {
    display: block !important;
    flex-basis: auto !important;
    flex-wrap: nowrap !important;
    margin: 0 auto !important;
}

.wp-block-columns {
    display: block !important;
    margin: 0 auto !important;
    width: 100% !important;
}

.entry-content img {
    cursor: pointer;
    display: block !important;
    height: auto;
    margin: 5px auto 30px auto !important;
    max-width: calc(100% - 20px) !important;
    vertical-align: top;
    width: auto !important;
}

.entry-content p:has(> img:only-child) {
    font-size: 0;
    line-height: 0;
    margin: 0;
    padding: 0;
    text-align: center;
}

.entry-content p:has(> img:only-child) img {
    font-size: initial;
    line-height: normal;
    margin: 5px auto 30px auto !important;
    max-width: calc(100% - 20px) !important;
}

.thumbnail3 {
    border-bottom: 50px;
    margin: 0 auto;
    max-width: initial !important;
}

div figure.thumbnail2 {
    box-shadow: inset 0 0 3px 3px #DDD !important;
    margin-bottom: 20px;
    max-width: 100% !important;
    width: 100% !important;
}

figure.thumbnail2 {
    height: 100% !important;
    width: 100% !important;
}

.thumbnail2 img { width: 100% !important; }

.wp-block-column .wp-block-image { margin-bottom: 0 !important; }

.wp-block-image .papercraft { margin-bottom: 1em !important; }

.wp-block-code code {
    box-sizing: border-box;
    display: block !important;
    white-space: normal !important;
    width: 100% !important;
    word-break: break-all !important;
}


/* ── howtomake（スマホ） ────────────────────────────────── */

.howtomake_box {
    align-items: center !important;
    box-sizing: border-box;
    display: flex !important;
    flex-direction: row !important;
    height: auto !important; /* 修正：固定高さを解除 */
    justify-content: space-between !important;
    margin: 10px 0 20px 0 !important;
    min-height: 100px;
    padding: 0 5px !important;
    width: 100% !important;
    overflow: visible; /* 修正：念の為ここも解除 */
}

.howtomake_box .wp-block-column {
    align-items: center !important;
    flex: 1 !important;
    justify-content: center !important;
    margin: 0 !important;
    padding-left: 5px;
}

.howtomake_box .howtomake5 {
    display: block !important;
    float: left !important;
    font-family: Arial, Helvetica, sans-serif !important;
    font-size: 16px;
    margin: 0 !important;
    padding-left: 10px !important;
    text-align: center;
    white-space: nowrap;
    width: auto !important;
}

.howtomake_box .howtomake9,
.howtomake_box .howtomake7 {
    align-items: center;
    height: auto !important;
    justify-content: center;
    margin: 0 !important;
}

.howtomake_box .howtomake9 img,
.howtomake_box .howtomake7 img {
    height: auto !important;
    max-height: 100px;
    object-fit: contain !important;
    width: 100%;
}

.howtomake_box .howtomake2.howtomake6 img {
    float: right;
    height: auto !important;
    min-width: 150px !important;
    object-fit: contain !important;
}

figure.howtomake7:has(img[src*="howtoassmble1_gluing-mark_ver1.0.5.png"]),
figure.howtomake9:has(img[src*="MagnetMarkV1.png"]),
figure.howtomake9:has(img[src*="MetalPlateMarkV1.png"]),
figure.howtomake9:has(img[src*="howtoassmble2-13_cut-out-mark.png"]) {
    float: left;
    width: 100% !important;
}

html body img[src*="howtoassmble_gluing-mark_ver1.0.3.png"],
html body img[src*="PutInV2.png"],
html body img[src*="FoldTabV2_1.png"],
html body img[src*="GlueSpotV2_1.png"],
html body img[src*="howtoassmble_valley-fold_ver1.0.3.png"],
html body img[src*="howtoassmble_mountain-fold_ver1.0.3.png"],
html body img[src*="howtoassmble_cut-line_ver1.0.3.png"] { max-width: 160px; }

h5.Request-button01 {
    display: inline-block;
    height: 30px;
    max-width: 400px;
    width: 100%;
}

figure.Request-icon01 { float: right !important; }

.howtomake_box2 {
    box-sizing: border-box;
    display: flex !important;
    height: auto !important;
    margin: 10px 0 20px 0 !important;
    padding: 10px 0 15px 2px !important;
}

.howtomake_box3 { padding: 5px 0 35px 2px !important; }


/* ── ダウンロードボタン（スマホ） ───────────────────────── */

.entry-body .dwlink_box {
    margin: 0 !important;
    position: absolute !important;
    right: 0 !important;
    top: -55px !important;
    z-index: 10;
}

.buildguide .entry-body .dwlink_box { top: 0 !important; }

.dwlink_box2 { display: flex !important; }

.wp-block-button__link {
    flex-wrap: nowrap !important;
    font-family: Arial, Helvetica, sans-serif !important;
    padding: 8px 16px;
}


/* ── 文章（スマホ） ─────────────────────────────────────── */

h3 {
    margin-block-end: 0;
    margin-block-start: 0;
}

h4 {
    color: #3D3937 !important;
    font-family: "Helvetica Neue", Arial, 游ゴシック, YuGothic,
                 "Hiragino Kaku Gothic ProN", "Hiragino Sans", Meiryo, sans-serif !important;
    font-size: 18px !important;
    font-weight: normal !important;
    margin-block-end: 0;
    margin-block-start: 0;
}

h5 {
    color: #3D3937;
    font-family: "Helvetica Neue", Arial, 游ゴシック, YuGothic,
                 "Hiragino Kaku Gothic ProN", "Hiragino Sans", Meiryo, sans-serif !important;
    font-size: 14px;
    font-weight: 600;
}

h2 { 
    font-size: 16px; 
}

h2.entry-title2 {
    font-family: "Helvetica Neue", Arial, 游ゴシック, YuGothic,
                 "Hiragino Kaku Gothic ProN", "Hiragino Sans", Meiryo, sans-serif;
    font-size: 15px;
    font-weight: 600;
}

h2.entry-title3 {
    font-family: "Helvetica Neue", Arial, 游ゴシック, YuGothic,
                 "Hiragino Kaku Gothic ProN", "Hiragino Sans", Meiryo, sans-serif;
    font-size: 16px;
    font-weight: 600 !important;
    margin-block-end: 0em;
    margin-block-start: 0em;
    padding-top: 20px !important;
}

h1.entry-title3 {
    font-family: "Helvetica Neue", Arial, 游ゴシック, YuGothic,
                 "Hiragino Kaku Gothic ProN", "Hiragino Sans", Meiryo, sans-serif;
    font-size: 18px;
    font-weight: normal;
    padding-top: 12px;
}

.entry-header .entry-title {
    font-size: 18px;
    line-height: 1.2 !important;
    margin: 10px 0 !important;
    padding-bottom: 30px;
    padding-right: 140px !important;
}

.entry-header .entry-title4 {
    font-family: "Helvetica Neue", Arial, 游ゴシック, YuGothic,
                 "Hiragino Kaku Gothic ProN", "Hiragino Sans", Meiryo, sans-serif;
    font-size: 16px;
    font-weight: 600;
    padding-top: 14px;
}

.entry-content p {
    font-size: 1.0em;
    padding-bottom: 10px;
}

.entry-content .profile {
    font-weight: normal !important;
    padding-bottom: 10px;
    padding-top: 12px;
}

.layout-static-page article {
    box-sizing: border-box;
    margin-top: -15px;
    max-width: 100% !important;
}

div.wp-block-columns article.wp-block-column {
    display: block;
    margin: 0 auto 50px auto;
    max-width: 100%;
}

.post-content .wp-block-columns {
    display: block;
    margin: 0 auto;
    max-width: 100%;
    width: 100% !important;
}

div.entry-content {
    color: #3D3937;
    font-family: "Yu Gothic";
    font-size: 1.0em;
    font-weight: 800;
    overflow-wrap: break-word;
    word-wrap: break-word;
}

div.entry-content2 {
    color: #3D3937;
    font-family: "Yu Gothic";
    font-size: 1.0em;
    font-weight: 800;
}

div.entry-content3 p {
    font-family: "Helvetica Neue", Arial, 游ゴシック, YuGothic,
                 "Hiragino Kaku Gothic ProN", "Hiragino Sans", Meiryo, sans-serif !important;
    font-size: 1.0em;
    line-height: 1.7em !important;
}

#page-buildguide div.entry-content3 p { padding-top: 45px !important; }

.column1st {
    color: #3D3937;
    font-family: "Helvetica Neue", Arial, 游ゴシック, YuGothic,
                 "Hiragino Kaku Gothic ProN", "Hiragino Sans", Meiryo, sans-serif !important;
    font-size: 14px;
    height: auto !important;
    list-style: none;
    margin: 0 auto !important;
    padding: 5px 0 0 0;
}

.column2st {
    font-family: "Yu Gothic";
    letter-spacing: 1px;
    line-height: 25px;
    margin-top: 10px;
}

h3.subtitle {
    font-size: 18px;
    font-weight: 600;
}

section .column2st {
    color: #3D3937;
    font-family: "Yu Gothic";
    font-size: 13px !important;
    font-weight: 800 !important;
    letter-spacing: normal;
    line-height: 25px;
    list-style: none;
    margin-top: 10px;
    padding-left: 0;
}

.column2st .entry-content { padding-bottom: 10px; }

.entry-header ul {
    color: #3D3937;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 12px !important;
    font-weight: 600;
    letter-spacing: 1px;
    line-height: 25px;
    list-style: none;
    margin-bottom: 30px;
    margin-top: 10px;
    padding-left: 0;
}

ul.column2st li { font-weight: normal; }

p {
    color: #3D3937;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 14px;
    line-height: 1.4;
    margin: 0;
    margin-block-end: 0;
    margin-block-start: 0;
    padding-bottom: 14px;
    width: auto;
    word-break: break-word;
}

.p2 {
    margin: 0 auto !important;
    width: 75% !important;
}

p.profile {
    display: block;
    font-size: 14px;
    line-height: 1.6;
    margin: 0 auto !important;
}

p.profile2 {
    display: block;
    font-size: 14px;
    line-height: 20px;
    margin: 0 auto !important;
}

.profile {
    font-family: Arial, Helvetica, sans-serif;
    font-size: 13px;
}

p.title01 { bottom: 30px; font-size: 14px; position: relative; }
p.title02 { font-size: 14px; padding-top: 5px; position: relative; }
p.title03 { bottom: 30px; font-size: 14px; position: relative; }
p.title04 { font-size: 14px; padding: 5px 0 40px 0; position: relative; }

.aligncenter .link01 {
    height: 100% !important;
    width: 100% !important;
}


/* ── コンタクトフォーム（スマホ） ──────────────────────── */

div.cf7-boxs {
    box-sizing: border-box;
    padding-left: 0;
    width: 100%;
}

.cf7 {
    font-size: 14px !important;
    margin-bottom: 5px;
}

input#form-name,
input#form-mail,
input#form-title,
input.wpcf7-text,
textarea {
    box-sizing: border-box !important;
    font-size: 16px;
    max-width: 100% !important;
    width: 100% !important;
}

label.cf7 {
    font-family: "Yu Gothic" !important;
    font-size: 100%;
    font-weight: 600;
    margin-bottom: 7px;
    width: 100%;
}

p.cf7 { padding-bottom: 0 !important; }

textarea {
    height: 300px;
    margin-top: 6px;
}

label.cf7-2 {
    font-family: "Yu Gothic" !important;
    font-size: 14px !important;
}

p.contact01,
p.contact02,
p.contact03 {
    box-sizing: border-box;
    display: block;
    font-family: "Yu Gothic" !important;
    font-size: 14px !important;
    line-height: 20px;
    width: 100% !important;
}

p.contact01 { padding-bottom: 0 !important; }
p.contact02 { font-weight: 600; padding-bottom: 2px !important; }
p.contact03 { padding-bottom: 14px !important; }

label.contact03 {
    box-sizing: border-box;
    margin: 6px 0 0 0;
    width: 100%;
}


/* ── サイドバー（スマホ） ───────────────────────────────── */

.menu {
    display: inline-block;
    font-size: 12px;
    list-style: none;
    overflow: hidden;
    padding: 0;
    width: auto;
}

.menu > li { width: auto; }

.menu a {
    border-bottom: 1px solid #EEE;
    color: #515151;
    display: inline-block;
    font-family: "Noto Sans JP", sans-serif;
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 2px;
    padding: 15px 0 15px 11px;
    text-align: left;
    text-decoration: none;
    width: 160px;
}


/* ── 検索（スマホ） ─────────────────────────────────────── */

.searchbox {
    border: none;
    box-shadow: none;
    display: block;
    float: none;
    font-family: Arial, Helvetica, sans-serif;
    letter-spacing: 0;
    line-height: 1.4em;
    margin: 0 auto;
    text-align: center;
    text-indent: 0;
    width: auto;
}

.searchbox #s {
    background: none;
    border: none;
    line-height: 18px;
    padding: 6px 0;
    text-indent: 0;
    width: 156px !important;
}

.searchbox #customSearchForm {
    border: #CCC solid 1px;
    border-radius: 14px;
    font-family: Arial, Helvetica, sans-serif;
    line-height: 1.4em;
    margin: 0 auto;
    text-align: center;
    text-indent: 0;
    width: 204px;
}

.page .custom-nav-inline {
    align-items: center;
    color: #3D3937;
    display: flex;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 1.1em;
    gap: 10px;
}

.page .searchbox-wrapper,
.search .searchbox-wrapper {
    align-items: center !important;
    contain: none !important; /* 修正：layoutを無効化 */
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    text-align: center;
    width: 100% !important;
}

.page .searchbox,
.search .searchbox { order: 1 !important; }

.page #pagination-top-links,
.search #pagination-top-links {
    display: flex !important;
    justify-content: center !important;
    order: 2 !important;
    padding-bottom: 10px;
    padding-left: 0 !important;
    width: 100% !important;
}

#pagination-top-links,
#pagination-bottom-links {
    justify-content: center;
    min-height: 28px;
}

html body .page_navi { justify-content: center; }