@font-face {
  font-family: '新レトロ丸ゴシック';
  src: url('../fonts/ShinRetroMaruGothic-Bold.ttf') format('truetype');
  font-weight: 700;
}
@font-face {
  font-family: 'LINE Seed JP';
  src: url('../fonts/LINESeedJP_A_OTF_Eb.otf') format('opentype');
  font-weight: 800;
}
@font-face {
  font-family: '07にくまるフォント';
  src: url('../fonts/07にくまるフォント.otf') format('opentype');
}
@font-face {
  font-family: 'ふんわりラウンド';
  src: url('../fonts/funwari-round.otf') format('opentype');
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* フォント変数 */
:root {
  --font-title:   '新レトロ丸ゴシック', 'Hiragino Maru Gothic Pro', sans-serif;
  --font-en:      'LINE Seed JP', system-ui, sans-serif;
  --font-niku:    '07にくまるフォント', 'Hiragino Maru Gothic Pro', sans-serif;
  --font-funwari: 'ふんわりラウンド', 'Hiragino Maru Gothic Pro', sans-serif;

  /* 季節カラー*/
  --color-bg:      #FFFAFF;
  --color-works:   #FFEEF4;
  --color-sidebar: #F8D8E8;
  --color-border:  #EAB5C5;
  --color-accent:  #D4879A;
  --color-btn:     #D4879A;
}

html, body {
  height: 100%;
  font-family: 'Hiragino Maru Gothic Pro', 'BIZ UDPGothic', sans-serif;
  background-color: var(--color-bg);
  background-image:
    repeating-linear-gradient(
      0deg,
      transparent 0px, transparent 40px,
      color-mix(in srgb, var(--color-border) 10%, transparent) 40px,
      color-mix(in srgb, var(--color-border) 10%, transparent) 80px
    ),
    repeating-linear-gradient(
      90deg,
      transparent 0px, transparent 40px,
      color-mix(in srgb, var(--color-border) 10%, transparent) 40px,
      color-mix(in srgb, var(--color-border) 10%, transparent) 80px
    );
  color: #4a2a3a;
}

body {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  opacity: 0;
  filter: blur(10px);
  transition: opacity 0.6s ease, filter 0.6s ease;
}
body.is-loaded {
  opacity: 1;
  filter: none;
}

/* === カスタムカーソル === */
*, *::before, *::after { cursor: none !important; }

#custom-cursor {
  position: fixed;
  top: 0;
  left: 0;
  width: 20px;
  pointer-events: none;
  z-index: 99999;
  transition: width 0.18s ease;
  will-change: left, top;
}
#custom-cursor img {
  width: 100%;
  height: auto;
  display: block;
}
#custom-cursor.is-large { width: 30px; }

/* === ヘッダー === */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
  flex-shrink: 0;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 30px;
}

.main-title {
  font-family: var(--font-funwari);
  font-size: 42px;
  color: var(--color-accent);
  letter-spacing: 0.02em;
  line-height: 1;
}

/* JP/EN */
.lang-switch {
  display: flex;
  gap: 6px;
  align-items: center;
}

.lang-btn {
  background: none;
  border: none;
  font-family: var(--font-en);
  font-size: 12px;
  color: rgba(74,42,58,0.45);
  cursor: pointer;
  letter-spacing: 0.05em;
  padding: 4px 0;
  transition: all 0.2s;
}
.lang-btn.is-active {
  background: var(--color-btn);
  color: #fff;
  border-radius: 20px;
  padding: 4px 14px;
}

/* === 季節切り替えボタン === */
.season-switch {
  display: flex;
  gap: 2px;
  align-items: center;
}
.season-btn {
  background: none;
  border: 1.5px solid transparent;
  font-size: 15px;
  padding: 3px 7px;
  border-radius: 20px;
  cursor: pointer;
  transition: border-color 0.25s, background 0.25s, opacity 0.25s;
  line-height: 1;
  opacity: 0.45;
}
.season-btn:hover { opacity: 0.8; border-color: var(--color-border); }
.season-btn.is-active {
  opacity: 1;
  border-color: var(--color-accent);
  background: var(--color-sidebar);
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 20px;
}

.header-nav a {
  font-family: var(--font-en);
  font-size: 13px;
  color: var(--color-accent);
  text-decoration: none;
  letter-spacing: 0.08em;
  transition: opacity 0.2s, color 0.6s ease;
}
.header-nav a:hover { opacity: 0.6; }

.header-icon-img {
  width: 35px;
  height: 35px;
  object-fit: contain;
  display: block;
  opacity: 0.75;
}
.header-icon-img:hover { opacity: 1; }

.header-icon-svg {
  width: 35px;
  height: 35px;
  display: block;
  opacity: 0.75;
}
.header-icon-svg:hover { opacity: 1; }

.home-link {
  display: flex;
  align-items: center;
  gap: 5px;
  padding-right: 30px;
  border-right: 1px solid var(--color-border);
  margin-right: 6px;
}
.home-link-text {
  font-family: var(--font-niku);
  font-size: 15px;
  letter-spacing: 0.08em;
  color: var(--color-accent);
  transition: color 0.6s ease;
  transform: translateY(3px);
}

/* === メインレイアウト === */
.page-wrapper {
  display: flex;
  flex: 1;
  min-height: 0;
  padding: 0 28px 28px;
  gap: 24px;
}

/* サイドバー＋ヘッダー＋コンテンツを束ねるカラム */
.main-column {
  flex: 6.5;
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

/* === サイドバー === */
.sidebar {
  width: 210px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 0;
  padding-top: 32px;
}

.sidebar-logo {
  width: 300px;
  height: auto;
  position: relative;
  z-index: 2;
  margin-bottom: -16px;
}

.sidebar-chara {
  width: 220px;
  left: 25%;
  height: auto;
  position: relative;
  z-index: 1;
  animation: floatChara 3.5s ease-in-out infinite;
}

@keyframes floatChara {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-12px); }
}

.sidebar-card {
  background: var(--color-sidebar);
  border-radius: 110px 110px 0 0;
  padding: 50px 30px 4px;
  width: 75%;
  margin-top: -80px;
  position: relative;
  z-index: 0;
  transition: background 0.6s ease;
}

.can-do-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-left: 10px;
  margin-bottom: 10px;
}

.can-do-list li {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--color-btn);
  opacity: 0.6;
}

.can-do-list li::before {
  content: '♥';
  color: var(--color-border);
  font-size: 9px;
  font-family: var(--font-niku);
  flex-shrink: 0;
}

/* 特別フォント指定 */
.can-do--niku    { font-family: var(--font-niku); }
.can-do--funwari { font-family: var(--font-funwari); }

.can-do-etc {
  text-align: right;
  font-family: var(--font-funwari);
  color: var(--color-accent);
  font-size: 13px;
  margin-bottom: 18px;
  padding-right: 10px;
  letter-spacing: 0.05em;
}

.simulator-btn {
  display: block;
  width: 100%;
  padding: 11px;
  background: var(--color-btn);
  color: #fff;
  border: none;
  border-radius: 24px;
  font-family: var(--font-title);
  font-size: 13px;
  letter-spacing: 0.05em;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  margin-bottom: 10px;
  transition: opacity 0.2s;
}
.simulator-btn:hover { opacity: 0.85; }

/* ご依頼する前のお願い */
.pre-request-link {
  display: block;
  text-align: center;
  font-size: 12px;
  font-family: var(--font-title);
  color: var(--color-accent);
  letter-spacing: 0.05em;
  background: none;
  border: 1.5px solid var(--color-border);
  border-radius: 24px;
  cursor: pointer;
  margin: 8px auto 0;
  width: fit-content;
  padding: 7px 22px;
  transition: background 0.2s, color 0.2s, border-color 0.6s ease;
  text-decoration: none;
}
.pre-request-link:hover {
  background: var(--color-border);
  color: #fff;
}

/* === BGMプレイヤー === */
.bgm-ctrl {
  display: flex;
  align-items: center;
  gap: 0;
  background: rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: 999px;
  padding: 6px;
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.06);
  overflow: hidden;
  transition: padding 0.5s cubic-bezier(0.4, 0, 0.2, 1), gap 0.5s ease;
  align-self: center;
  margin: 45px auto 0;
  width: fit-content;
}
.bgm-ctrl.is-on {
  padding: 6px 14px 6px 10px;
  gap: 10px;
}
.bgm-vol {
  width: 72px;
  max-width: 0;
  accent-color: var(--color-accent);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease, max-width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}
.bgm-ctrl.is-on .bgm-vol {
  max-width: 72px;
  opacity: 1;
  pointer-events: auto;
}
.bgm-toggle {
  width: 36px;
  height: 36px;
  border: none;
  background: rgba(255, 255, 255, 0.85);
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
  transition: transform 0.2s ease;
}
.bgm-toggle:hover { transform: scale(1.12); }
.bgm-credit {
  text-align: center;
  font-size: 9px;
  color: rgba(74,42,58,0.5);
  letter-spacing: 0.04em;
  margin-top: 6px;
  opacity: 0;
  transition: opacity 0.3s ease;
}
.bgm-ctrl.is-on + .bgm-credit { opacity: 1; }

.sidebar-copy {
  margin-top: auto;
  padding: 12px 0 8px;
  font-size: 9.5px;
  color: rgba(74,42,58,0.45);
  text-align: center;
  letter-spacing: 0.04em;
}

.sidebar    { flex: 3.5; max-width: 320px; width: auto; }
.works-main { flex: 1; min-width: 0; min-height: 0; display: flex; flex-direction: column; margin-right: -28px; margin-bottom: -28px; }

/* === Page Top === */
.page-top {
  position: fixed;
  right: 24px;
  bottom: 24px;
  width: 75px;
  text-decoration: none;
  opacity: 0;
  transform: translateY(24px);
  pointer-events: none;
  transition: opacity 0.4s ease, transform 0.4s ease;
  z-index: 200;
}
.page-top-wrap {
  display: block;
  filter: drop-shadow(0 4px 6px rgba(0,0,0,0.22));
}
.page-top-wrap img {
  display: block;
  width: 100%;
  height: auto;
  filter: url(#page-top-filter);
}
.page-top.is-visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.page-top:hover { transform: translateY(-5px); }

/* === モーダル === */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(74,42,58,0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 500;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}
.modal-overlay.is-open {
  opacity: 1;
  pointer-events: auto;
}
.modal-box {
  background: var(--color-bg);
  border-radius: 16px;
  padding: 40px 36px 36px;
  max-width: 560px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
  position: relative;
  transition: background 0.6s ease;
  box-shadow: 0 12px 48px rgba(74,42,58,0.18);
}
.modal-close {
  position: absolute;
  top: 14px;
  right: 18px;
  background: none;
  border: none;
  font-size: 22px;
  color: var(--color-accent);
  cursor: pointer;
  line-height: 1;
}
.modal-title {
  font-family: var(--font-title);
  font-size: 17px;
  color: var(--color-accent);
  margin-bottom: 20px;
  letter-spacing: 0.05em;
}
.modal-block {
  margin-bottom: 18px;
}
.modal-head {
  font-size: 12px;
  font-weight: 700;
  color: var(--color-accent);
  margin-bottom: 6px;
  letter-spacing: 0.05em;
}
.modal-text {
  font-size: 12px;
  color: var(--color-accent);
  line-height: 1.8;
}
.modal-list {
  font-size: 12px;
  color: var(--color-accent);
  line-height: 1.8;
  padding-left: 1.2em;
}
.modal-en {
  /* JP/EN切り替えで単独表示されるため区切り線なし */
}

/* === ワークモーダル === */
#work-modal {
  position: fixed;
  inset: 0;
  background: rgba(74,42,58,0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 600;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}
#work-modal.is-open { opacity: 1; pointer-events: auto; }
#work-modal.is-open .wm-box { animation: wmPop 0.55s ease-in-out both; }

@keyframes wmPop {
  from  { opacity: 0; transform: scale(0, 0); }
  20%   { opacity: 1; }
  50%   { transform: scale(1.08, 1.1); }
  75%   { transform: scale(0.96, 0.97); }
  to    { opacity: 1; transform: scale(1, 1); }
}

.wm-box {
  background: var(--color-bg);
  border-radius: 20px;
  width: min(700px, 92vw);
  max-height: 86vh;
  display: flex;
  flex-direction: column;
  position: relative;
  box-shadow: 0 16px 60px rgba(74,42,58,0.22);
  transition: background 0.6s ease;
}
.wm-header {
  padding: 28px 44px 16px 36px;
  border-bottom: 1px solid var(--color-border);
  flex-shrink: 0;
  transition: border-color 0.6s ease;
}
.wm-title {
  font-family: var(--font-title);
  font-size: 15px;
  color: var(--color-accent);
  margin-bottom: 4px;
  letter-spacing: 0.04em;
}
.wm-subtitle {
  font-family: var(--font-en);
  font-size: 10px;
  color: var(--color-accent);
  opacity: 0.7;
  letter-spacing: 0.07em;
}
.wm-close {
  position: absolute;
  top: 14px;
  right: 18px;
  background: none;
  border: none;
  font-size: 22px;
  color: var(--color-accent);
  line-height: 1;
}
.wm-body {
  padding: 24px 36px 32px;
  overflow-y: auto;
  flex: 1;
  min-height: 0;
}

/* 作品コンテンツ共通 */
.mwork--illu img { max-width: 100%; height: auto; display: block; border-radius: 8px; margin: 0 auto; }
.illu-main { margin-bottom: 16px; text-align: center; }
.illu-main img { max-height: 480px; width: auto; max-width: 100%; }
.illu-cap  { font-size: 10px; color: var(--color-accent); opacity: 0.55; margin-top: 6px; text-align: center; display: block; }
.mwork__divider { border: none; border-top: 1px solid var(--color-border); margin: 20px 0; transition: border-color 0.6s ease; }
.illu-date { font-size: 11px; color: var(--color-accent); opacity: 0.65; margin-bottom: 12px; letter-spacing: 0.04em; }
.illu-desc { font-size: 13px; color: var(--color-accent); line-height: 1.85; margin-bottom: 12px; }
.illu-note { font-size: 12px; color: var(--color-accent); opacity: 0.8; line-height: 1.85; margin-bottom: 12px; }
.illu-link { font-size: 12px; margin-top: 16px; }
.illu-link a, .illu-handle { color: var(--color-accent); text-decoration: underline; text-decoration-color: var(--color-border); }
/* 複数画像：矢印カルーセル */
.illu-variants {
  position: relative;
  overflow: hidden;
  margin-bottom: 16px;
}
.illu-carousel-track {
  display: flex;
  transition: transform 0.32s ease;
}
.illu-carousel-track figure {
  flex-shrink: 0;
  width: 100%;
  text-align: center;
}
.illu-carousel-track figure img { max-height: 420px; width: auto; max-width: 100%; border-radius: 8px; }
.illu-carousel-track figcaption { font-size: 10px; color: var(--color-accent); opacity: 0.6; margin-top: 6px; }
.illu-carousel-btn {
  position: absolute;
  top: 44%;
  transform: translateY(-50%);
  background: var(--color-sidebar);
  border: 1.5px solid var(--color-border);
  border-radius: 50%;
  width: 36px;
  height: 36px;
  font-size: 20px;
  line-height: 1;
  color: var(--color-accent);
  z-index: 2;
  transition: background 0.6s ease, border-color 0.6s ease;
}
.illu-carousel-prev { left: 4px; }
.illu-carousel-next { right: 4px; }
.illu-carousel-dots { display: flex; justify-content: center; gap: 6px; margin-top: 10px; }
.illu-carousel-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--color-border); border: none;
  transition: background 0.3s ease;
}
.illu-carousel-dot.is-active { background: var(--color-accent); }

/* === メインエリア === */
.works-main { flex: 1; min-width: 0; min-height: 0; display: flex; flex-direction: column; margin-right: -28px; margin-bottom: -28px; }

.works-scroll-area {
  flex: 1;
  overflow-y: auto;
  padding: 4px 28px 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

/* スクロールバー */
.works-scroll-area::-webkit-scrollbar { width: 5px; }
.works-scroll-area::-webkit-scrollbar-track { background: transparent; }
.works-scroll-area::-webkit-scrollbar-thumb {
  background: var(--color-border);
  border-radius: 3px;
}

/* === 受注状況バナー === */
.status-bar {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  background: rgba(255,255,255,0.7);
  backdrop-filter: blur(8px);
  border: 1.5px solid var(--color-border);
  border-radius: 24px;
  padding: 10px 18px;
  margin-bottom: 32px;
  font-size: 12px;
  color: var(--color-accent);
  transition: border-color 0.6s ease;
}
.status-bar__list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.status-bar__badge {
  font-family: var(--font-title);
  font-size: 11px;
  background: var(--color-btn);
  color: #fff;
  border-radius: 20px;
  padding: 3px 12px;
  letter-spacing: 0.05em;
  transition: background 0.6s ease;
}
.status-bar__item { display: flex; align-items: baseline; letter-spacing: 0.03em; }
.status-bar__label { display: inline-block; min-width: 4.5em; }
.status-bar__item strong { font-weight: 700; color: var(--color-accent); }
.status-bar__sep { opacity: 0.4; }

@keyframes poyopon {
  0%   { transform: scale(0.82, 0.82); }
  30%  { transform: scale(1.18, 0.88); }
  50%  { transform: scale(0.93, 1.1); }
  68%  { transform: scale(1.06, 0.96); }
  82%  { transform: scale(0.98, 1.03); }
  92%  { transform: scale(1.02, 0.99); }
  100% { transform: scale(1, 1); }
}

@property --pill-left {
  syntax: '<length>';
  inherits: false;
  initial-value: 0px;
}
@property --pill-width {
  syntax: '<length>';
  inherits: false;
  initial-value: 80px;
}

.works-tab {
  position: relative;
  display: flex;
  gap: 6px;
  justify-content: center;
  margin-bottom: 30px;
}

.tab-slider {
  position: absolute;
  top: 0;
  bottom: 0;
  left: var(--pill-left);
  width: var(--pill-width);
  border-radius: 20px;
  background: var(--color-btn);
  pointer-events: none;
  z-index: 0;
  transform-origin: center center;
}

.tab-btn {
  position: relative;
  z-index: 1;
  background: none;
  border: none;
  font-family: inherit;
  font-size: 13px;
  color: #aaa;
  letter-spacing: 0.05em;
  padding: 5px 20px;
  cursor: pointer;
  border-radius: 20px;
  transition: transform 0.08s ease, color 0.25s;
  transform-origin: center center;
}

.tab-btn:active {
  transform: scale(0.82, 0.82);
  transition: transform 0.06s ease;
}

.tab-btn.is-active {
  color: #fff;
  font-weight: 600;
}

@keyframes slime-right {
  0% {
    --pill-left: var(--from-left); --pill-width: var(--from-width);
    transform: scaleY(1);
    animation-timing-function: ease-out;
  }
  24% {
    --pill-left: var(--from-left);
    --pill-width: calc(var(--to-left) + var(--to-width) - var(--from-left));
    transform: scaleY(0.5);
    animation-timing-function: cubic-bezier(0.4, 0, 1, 1);
  }
  50% {
    --pill-left: calc(var(--to-left) - 14px); --pill-width: calc(var(--to-width) + 28px);
    transform: scaleY(1.35);
    animation-timing-function: ease-out;
  }
  68% {
    --pill-left: calc(var(--to-left) + 3px); --pill-width: calc(var(--to-width) - 6px);
    transform: scaleY(0.91);
    animation-timing-function: ease-in-out;
  }
  83% {
    --pill-left: calc(var(--to-left) - 2px); --pill-width: calc(var(--to-width) + 4px);
    transform: scaleY(1.06);
    animation-timing-function: ease-out;
  }
  100% {
    --pill-left: var(--to-left); --pill-width: var(--to-width);
    transform: scaleY(1);
  }
}

@keyframes slime-left {
  0% {
    --pill-left: var(--from-left); --pill-width: var(--from-width);
    transform: scaleY(1);
    animation-timing-function: ease-out;
  }
  24% {
    --pill-left: var(--to-left);
    --pill-width: calc(var(--from-left) + var(--from-width) - var(--to-left));
    transform: scaleY(0.5);
    animation-timing-function: cubic-bezier(0.4, 0, 1, 1);
  }
  50% {
    --pill-left: calc(var(--to-left) - 14px); --pill-width: calc(var(--to-width) + 28px);
    transform: scaleY(1.35);
    animation-timing-function: ease-out;
  }
  68% {
    --pill-left: calc(var(--to-left) + 3px); --pill-width: calc(var(--to-width) - 6px);
    transform: scaleY(0.91);
    animation-timing-function: ease-in-out;
  }
  83% {
    --pill-left: calc(var(--to-left) - 2px); --pill-width: calc(var(--to-width) + 4px);
    transform: scaleY(1.06);
    animation-timing-function: ease-out;
  }
  100% {
    --pill-left: var(--to-left); --pill-width: var(--to-width);
    transform: scaleY(1);
  }
}

.tab-slider.is-moving-right { animation: slime-right 0.62s linear forwards; }
.tab-slider.is-moving-left  { animation: slime-left  0.62s linear forwards; }

.works-sort {
  position: relative;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin: 0 -28px;
  padding: 62px 52px 12px 32px;
  /* 上44px（::beforeの高さ分）は透明、それ以降を白にする */
  background: linear-gradient(to bottom, transparent 44px, rgba(255,255,255,0.85) 44px);
}

.works-sort::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 44px;
  pointer-events: none;
  background:
    radial-gradient(circle at 50% 100%, rgba(255,255,255,0.85) 30px, transparent 30px)
      top / 60px 40px repeat-x,
    linear-gradient(to bottom, transparent 40px, rgba(255,255,255,0.85) 40px);
  filter: drop-shadow(0 -4px 6px color-mix(in srgb, var(--color-border) 45%, transparent));
}

.sort-btn {
  background: none;
  border: none;
  font-size: 12px;
  color: rgba(74,42,58,0.45);
  cursor: pointer;
  letter-spacing: 0.05em;
  padding: 4px 0;
  transition: all 0.2s;
}
.sort-btn.is-active {
  background: var(--color-btn);
  color: #fff;
  border-radius: 20px;
  padding: 4px 14px;
}

.works-grid {
  flex: 1;
  align-content: start;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 48px;
  position: relative;
  /* scroll-area の左右パディング(28px)を負マージンで相殺、page-wrapperの右・下余白は works-main の負マージンで吸収 */
  margin: 0 -28px;
  padding: 24px 32px 18px;
  background: rgba(255,255,255,0.85);
}

.work-card {
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  transition: transform 0.22s ease;
}
.work-card:hover {
  transform: scale(1.04);
}
.work-card:hover .work-thumb {
  box-shadow:
    inset 0 2px 6px rgba(255, 255, 255, 0.85),
    inset 0 -1px 4px rgba(200, 200, 210, 0.4),
    0 10px 28px rgba(0, 0, 0, 0.26),
    0 0 0 1px rgba(200, 210, 220, 0.45);
}

.work-thumb {
  position: relative;
  width: 100%;
  border-radius: 10px;
  overflow: hidden;
  border: 9px solid rgba(255, 255, 255, 0.55);
  box-shadow:
    inset 0 2px 6px rgba(255, 255, 255, 0.85),
    inset 0 -1px 4px rgba(200, 200, 210, 0.4),
    0 6px 18px rgba(0, 0, 0, 0.18),
    0 0 0 1px rgba(200, 210, 220, 0.45);
  transition: box-shadow 0.22s ease;
}

.work-thumb::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -75%;
  width: 35%;
  height: 200%;
  background: linear-gradient(
    to right,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.55) 50%,
    rgba(255, 255, 255, 0) 100%
  );
  transform: skewX(-18deg);
  pointer-events: none;
  z-index: 2;
}

.work-card:hover .work-thumb::before {
  animation: shineSlide 0.55s ease forwards;
}

@keyframes shineSlide {
  0%   { left: -75%; }
  100% { left: 120%; }
}

/* === 非公開カード === */
.work-card--locked {
  cursor: default !important;
}
.work-card--locked:hover {
  transform: none;
}
.work-card--locked:hover .work-thumb {
  box-shadow:
    inset 0 2px 6px rgba(255, 255, 255, 0.85),
    inset 0 -1px 4px rgba(200, 200, 210, 0.4),
    0 6px 18px rgba(0, 0, 0, 0.18),
    0 0 0 1px rgba(200, 210, 220, 0.45);
}
.work-card--locked:hover .work-thumb::before {
  animation: none;
}
.work-card--locked .work-thumb img {
  filter: blur(20px);
  transform: scale(1.12);
}
.work-card--locked .work-thumb::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.42);
  pointer-events: none;
  z-index: 3;
}
.locked-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 4;
}
.locked-overlay svg {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -58%);
  width: 44%;
  height: auto;
  opacity: 0.9;
  filter: drop-shadow(0 1px 3px rgba(0,0,0,0.4));
}
.locked-overlay span {
  position: absolute;
  bottom: 16%;
  left: 50%;
  transform: translateX(-50%);
  white-space: nowrap;
  color: #fff;
  font-size: 0.8rem;
  letter-spacing: 0.18em;
  text-shadow: 0 1px 4px rgba(0,0,0,0.5);
}

.work-thumb img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  display: block;
}

.work-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
  justify-content: center;
  padding: 0 6px;
  margin-top: -17px;
  position: relative;
  z-index: 2;
}


.work-tag {
  font-size: 12.5px;
  background-color: rgb(255 255 255 / 0.78);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  color: var(--color-accent);
  font-weight: 600;
  padding: 5px 16px;
  white-space: nowrap;
  display: inline-block;
  transform: rotate(-1.5deg);
  clip-path: polygon(
    0% 0%,
    5px 10%, 0% 20%, 5px 30%, 0% 40%, 5px 50%, 0% 60%, 5px 70%, 0% 80%, 5px 90%,
    0% 100%, 100% 100%,
    calc(100% - 5px) 90%, 100% 80%, calc(100% - 5px) 70%, 100% 60%,
    calc(100% - 5px) 50%, 100% 40%, calc(100% - 5px) 30%, 100% 20%,
    calc(100% - 5px) 10%, 100% 0%
  );
  filter: drop-shadow(0 1px 4px rgba(0,0,0,0.25));
}

.work-title-wrap {
  position: relative;
  margin-top: 14px;
  align-self: center;
  max-width: calc(100% - 8px);
  user-select: none;
  -webkit-user-select: none;
}

.work-title {
  font-size: 12px;
  color: color-mix(in srgb, var(--color-accent) 55%, #1a1a1a);
  line-height: 1.4;
  text-align: center;
  padding: 7px 28px;
  background: linear-gradient(160deg, #ffffff 0%, #f0ede8 50%, #fafaf8 100%);
  border-radius: 5px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.2), inset 0 1px 0 rgba(255,255,255,0.8);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  user-select: none !important;
  -webkit-user-select: none !important;
}

.work-title-wrap::before,
.work-title-wrap::after {
  content: '';
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%,
    #ffffff 0%,
    #c0c0c0 45%,
    #888888 100%
  );
  box-shadow: 0 1px 3px rgba(0,0,0,0.35);
  z-index: 1;
}
.work-title-wrap::before { left: 8px; }
.work-title-wrap::after  { right: 8px; }

.work-label {
  position: absolute;
  top: 14px;
  left: 4px;
  font-size: 13px;
  font-weight: 600;
  color: var(--color-accent);
  background-color: rgb(255 255 255 / 0.75);
  padding: 5px 16px;
  transform: rotate(-9deg);
  transform-origin: left center;
  z-index: 3;
  pointer-events: none;
  clip-path: polygon(
    0% 0%,
    5px 10%, 0% 20%, 5px 30%, 0% 40%, 5px 50%, 0% 60%, 5px 70%, 0% 80%, 5px 90%,
    0% 100%, 100% 100%,
    calc(100% - 5px) 90%, 100% 80%, calc(100% - 5px) 70%, 100% 60%,
    calc(100% - 5px) 50%, 100% 40%, calc(100% - 5px) 30%, 100% 20%,
    calc(100% - 5px) 10%, 100% 0%
  );
  filter: drop-shadow(0 1px 4px rgba(0,0,0,0.25));
}

.frame-screw {
  position: absolute;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%,
    rgba(255, 255, 255, 0.95) 0%,
    rgba(190, 190, 200, 0.85) 45%,
    rgba(140, 140, 152, 0.9) 100%
  );
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.35), inset 0 1px 1px rgba(255, 255, 255, 0.7);
  z-index: 3;
  pointer-events: none;
}
.frame-screw--tl { top: 5px; left: 5px; }
.frame-screw--tr { top: 5px; right: 5px; }
.frame-screw--bl { bottom: 5px; left: 5px; }
.frame-screw--br { bottom: 5px; right: 5px; }

/* === 料金シミュレーター常在カート === */
.sim-cart {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 300;
  padding: 10px 16px calc(12px + env(safe-area-inset-bottom, 0px));
  background: rgba(255,255,255,0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-top: 1px solid var(--color-border);
}
.sim-cart-btn {
  display: block;
  width: 100%;
  padding: 14px;
  background: var(--color-btn);
  color: #fff;
  border-radius: 24px;
  font-family: var(--font-title);
  font-size: 14px;
  letter-spacing: 0.05em;
  text-align: center;
  text-decoration: none;
  transition: opacity 0.2s;
}
.sim-cart-btn:hover { opacity: 0.85; }

/* === レスポンシブ（768px以下） === */
@media (max-width: 768px) {
  *, *::before, *::after { cursor: auto !important; }
  #custom-cursor { display: none !important; }
  html, body {
    height: auto;
    overflow-y: auto;
    overflow-x: hidden;
  }
  body {
    overflow: auto;
  }
  .page-wrapper {
    flex-direction: column;
    padding: 0 14px calc(80px + env(safe-area-inset-bottom, 0px));
    gap: 0;
    flex: none;
  }
  .sidebar { display: none; }
  .main-column {
    flex: none;
    min-height: 0;
  }
  .works-main { flex: none; margin-right: 0; margin-bottom: 0; }
  .works-scroll-area {
    overflow-y: visible;
    height: auto;
    flex: none;
    max-height: none;
    padding-bottom: 18px;
  }
  .works-sort {
    margin: 0 -42px;
    padding: 48px 46px 12px;
  }
  .works-grid {
    grid-template-columns: repeat(2, 1fr);
    flex: none;
    margin: 0 -42px;
    padding: 12px 46px 8px;
  }
  .bgm-ctrl,
  .bgm-credit { display: none !important; }
  .sim-cart { display: block; }
  .page-top {
    bottom: calc(80px + env(safe-area-inset-bottom, 0px));
  }
  .site-header {
    padding: 12px 0;
    flex-wrap: wrap;
    gap: 8px;
  }
  .header-nav {
    gap: 14px;
  }
}

@media (max-width: 480px) {
  .works-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
  .main-title { font-size: 32px; }
}

/* === ローダー=== */
#loader {
  position: fixed;
  inset: 0;
  z-index: 99999;
  transition: opacity 0.8s ease;
}
#loader.is-out { opacity: 0; pointer-events: none; }
#loader.is-gone { display: none; }

#loader-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}
