/* Messy Rooftop — storefront styles (現行STUDIOサイトの見た目に準拠) */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Noto Sans JP", sans-serif;
  color: #111;
  background: #fff;
  -webkit-text-size-adjust: 100%;
}
a { color: inherit; text-decoration: none; }
img { display: block; }

/* ---------- ヘッダー（写真に重なる透明固定） ---------- */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 14px;
  background: transparent;
}
.logo { font-size: 20px; font-weight: 700; letter-spacing: .02em; line-height: 1; }
.header-right { display: flex; align-items: center; gap: 14px; }
.cart-link { position: relative; display: inline-flex; line-height: 0; }
.cart-badge {
  position: absolute; top: -6px; right: -8px;
  min-width: 16px; height: 16px; padding: 0 4px;
  border-radius: 8px; background: #111; color: #fff;
  font-size: 10px; line-height: 16px; text-align: center;
}
.burger {
  background: none; border: 0; padding: 0; cursor: pointer;
  width: 22px; height: 20px;
  display: flex; flex-direction: column; justify-content: space-between;
}
.burger span { display: block; height: 1.5px; background: #111; width: 100%; }

/* ---------- メニュー ---------- */
.menu {
  position: fixed; inset: 0; z-index: 60;
  background: #fff; padding: 64px 24px 24px;
}
.menu ul { list-style: none; margin: 0; padding: 0; }
.menu li { margin: 0 0 18px; font-size: 15px; letter-spacing: .08em; }
.menu-close {
  position: absolute; top: 8px; right: 14px;
  background: none; border: 0; font-size: 30px; line-height: 1; cursor: pointer; color: #111;
}

/* ---------- カルーセル（固定高さ帯・原寸比・覗き見） ---------- */
.carousel { position: relative; }
.carousel-track {
  display: flex;
  height: 80vw;
  max-height: 540px;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.carousel-track::-webkit-scrollbar { display: none; }
.carousel-item { flex: 0 0 auto; height: 100%; }
.carousel-item a { display: block; height: 100%; }
.carousel-item img { height: 100%; width: auto; max-width: none; }
.carousel-empty { height: 80vw; max-height: 540px; background: #f4f4f4; }
.carousel-arrows { display: flex; justify-content: space-between; padding: 4px 10px 0; }
.car-btn { background: none; border: 0; font-size: 15px; cursor: pointer; color: #111; padding: 2px 6px; }

/* ---------- 上部余白（固定ヘッダー分。テスト版 .mr-main の値） ---------- */
main > .list-item:first-child { padding-top: 112px; }
main > .carousel:first-child { margin-top: 112px; }
@media (max-width: 640px) {
  main > .list-item:first-child { padding-top: 82px; }
  main > .carousel:first-child { margin-top: 82px; }
}

/* ---------- 商品リスト ---------- */
.list-item { margin-bottom: 72px; }
.list-meta { text-align: center; margin-top: 10px; padding: 0 12px; }
.list-name { font-size: 10px; line-height: 1.35; }
.list-status { font-size: 10px; line-height: 1.35; margin-top: 2px; }
.next-link { text-align: center; padding: 8px 0 64px; font-size: 13px; }

/* ---------- 商品ページ ---------- */
.product-head { text-align: left; margin-top: 26px; padding: 0 22px; }
.product-name { font-size: 13px; font-weight: 700; letter-spacing: .02em; line-height: 1.4; }
.product-price { font-size: 13px; line-height: 1.5; margin-top: 16px; }
.product-body {
  max-width: 640px; margin: 0 auto; padding: 30px 22px 0;
  font-size: 9px; line-height: 1.65;
}
.spec-block, .desc-block, .caution-block, .note-block { margin-bottom: 16px; }
.size-block { line-height: 1.6; margin-bottom: 16px; }

/* ---------- サイズ欄（テスト版 .mr-size-* の値そのまま） ---------- */
.mr-size-head { font-size: 9px; letter-spacing: .22em; text-transform: uppercase; margin: 40px 0 4px; font-weight: 500; }
.mr-size-table { width: 100%; border-collapse: collapse; font-size: 9px; line-height: 1.6; }
.mr-size-table th, .mr-size-table td { border-bottom: 1px solid #e6e6e6; padding: 9px 6px; text-align: left; font-weight: 400; }
.mr-size-table th { font-size: 9px; letter-spacing: .12em; text-transform: uppercase; color: #8a8a8a; }
.mr-size-table td:first-child { font-weight: 700; }
.mr-size-model { margin: 14px 0 0; font-size: 9px; line-height: 1.6; color: #444; }
.mr-size-lines { margin-top: 4px; font-size: 9px; line-height: 1.65; color: #444; }
.mr-size-lines p { margin: 0 0 14px; }
.mr-size-lines p:last-child { margin-bottom: 0; }
.buy-area { max-width: 640px; margin: 8px auto 64px; padding: 0 22px; display: flex; flex-direction: column; gap: 10px; }
.buy-btn {
  background: #ffb400; color: #fff; font-weight: 700;
  border: 0; border-radius: 999px;
  font-size: 13px; padding: 12px 20px; cursor: pointer; width: 100%;
}
.buy-btn:disabled { opacity: .7; }
.soldout-block { text-align: center; font-size: 13px; margin: 8px 0 64px; }

/* ---------- テキストページ ---------- */
.text-page {
  max-width: 640px; margin: 0 auto; padding: 84px 22px 64px;
  font-size: 9px; line-height: 1.9;
}
.page-heading { font-size: 13px; font-weight: 700; text-align: center; margin: 0 0 24px; letter-spacing: .06em; }
.text-page h1.page-heading:not(:first-child) { margin-top: 36px; }
.page-subheading { font-size: 9px; font-weight: 700; text-align: center; margin: -14px 0 24px; }
.text-page p { margin: 0 0 14px; }
.text-page p.center { text-align: center; }
.page-minihead { font-weight: 700; margin: 22px 0 8px; }
.legal-label { font-weight: 700; margin: 20px 0 4px; }
.legal-label + p { margin-bottom: 4px; }
.page-photo { margin: 24px 0; }
.page-photo img { width: 100%; height: auto; }
.not-found { padding: 120px 24px; text-align: center; font-size: 13px; }

/* ---------- カート ---------- */
.cart-page { max-width: 640px; margin: 0 auto; padding: 84px 22px 64px; }
.cart-page .page-heading { font-size: 13px; }
.cart-row {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 0; border-bottom: 1px solid #e5e5e5;
}
.cart-row-main { flex: 1; min-width: 0; }
.cart-row-name { font-size: 12px; }
.cart-row-sub { font-size: 11px; color: #555; margin-top: 2px; }
.cart-row-qty { display: flex; align-items: center; gap: 8px; font-size: 12px; }
.cart-row-qty button { width: 26px; height: 26px; border: 1px solid #ccc; background: #fff; border-radius: 50%; cursor: pointer; }
.cart-remove { background: none; border: 0; color: #888; font-size: 11px; cursor: pointer; }
.cart-actions { margin-top: 24px; }
.cart-empty { font-size: 12px; color: #555; }
.cart-note { font-size: 10px; color: #777; margin-top: 12px; }

/* ---------- 管理画面 ---------- */
body.admin { background: #fafafa; }
.admin-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 12px 16px; background: #111; color: #fff; font-size: 13px;
}
.admin-header a { color: #fff; }
.admin-header-right { display: inline-flex; align-items: center; gap: 14px; }
.admin-logout { margin: 0; }
.admin-logout button {
  background: none; border: 1px solid #888; color: #fff; font-size: 11px;
  padding: 4px 10px; border-radius: 4px; cursor: pointer;
}
.admin-release-form input[type="datetime-local"] { padding: 8px; font-size: 14px; margin-right: 8px; }
.admin-release-form button {
  font-size: 12px; padding: 7px 12px; border: 1px solid #bbb; background: #fff; border-radius: 4px; cursor: pointer; margin-right: 6px;
}
.admin-main { max-width: 860px; margin: 0 auto; padding: 16px; font-size: 13px; }
.admin-main h1 { font-size: 17px; }
.admin-main h2 { font-size: 14px; margin-top: 28px; }
.admin-list { list-style: none; padding: 0; margin: 0; }
.admin-list li { padding: 7px 0; border-bottom: 1px solid #e5e5e5; }
.admin-count { color: #888; font-size: 11px; }
.admin-login { max-width: 320px; margin: 60px auto; }
.admin-login input { width: 100%; padding: 10px; font-size: 15px; margin-bottom: 10px; }
.admin-login button { width: 100%; padding: 10px; font-size: 14px; background: #111; color: #fff; border: 0; cursor: pointer; }
.admin-error { color: #c00; }
.admin-msg { color: #067; }
.admin-note { color: #777; font-size: 11px; }
.admin-photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; }
.admin-photo { background: #fff; border: 1px solid #e0e0e0; padding: 8px; }
.admin-photo img { width: 100%; height: 130px; object-fit: contain; background: #f4f4f4; }
.admin-photo-name { font-size: 9px; color: #888; word-break: break-all; margin: 6px 0; }
.admin-photo-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.admin-photo-actions form { margin: 0; }
.admin-photo-actions button, .admin-replace {
  font-size: 11px; padding: 5px 8px; border: 1px solid #bbb; background: #fff; border-radius: 4px; cursor: pointer; display: inline-block;
}
.admin-replace input { display: none; }
