/* ==========================================================================
   ぬりえサイト(仮称) - 共通スタイルシート
   モックアップ(~/nurie-site/mockup/ index.html / category.html / nurie.html)
   のトークン・構造を踏襲し1ファイルに集約。
   ========================================================================== */
:root{
  --bg:#FAFAF7;
  --text:#444444;
  --header-green:#6BAF7B;
  --heading-green:#5B9E6B;
  --card-bg:#FFFAF0;
  --footer-bg:#555555;
  --pill-green:#82C395;
  --pill-blue:#7CB5EC;
  --pill-orange:#FF9E79;
  --pill-pink:#F48FB1;
  --pill-purple:#B39DDB;
  --pill-teal:#4DB6AC;
}
*{box-sizing:border-box;margin:0;padding:0;}
body{
  font-family:system-ui,-apple-system,"Hiragino Sans","Noto Sans JP",sans-serif;
  background:var(--bg);
  color:var(--text);
  line-height:1.7;
  overflow-x:hidden;
}
img{max-width:100%;display:block;}
a{color:var(--heading-green);text-decoration:underline;text-underline-offset:2px;}
a:hover{color:#3F8B54;}
h1,h2,h3{color:var(--heading-green);font-weight:700;line-height:1.4;}
.container{max-width:1080px;margin:0 auto;padding:0 16px;}
@media (min-width:1080px){.container{padding:0 24px;}}

/* header */
.site-header{position:sticky;top:0;z-index:100;background:var(--header-green);color:#fff;padding:8px 0 10px;box-shadow:0 2px 8px rgba(0,0,0,.12);}
.header-top{display:flex;justify-content:flex-start;align-items:center;}
.logo{font-weight:700;font-size:.95rem;color:#fff;white-space:nowrap;}
.logo a{color:#fff;text-decoration:none;}
.logo .tentative{font-size:.75em;font-weight:400;opacity:.85;margin-left:2px;}

.header-title{text-align:center;margin:6px auto 8px;}
.header-title-text{font-size:.78rem;font-weight:700;color:#fff;line-height:1.5;margin:0;}
.header-subtitle-en{font-size:.62rem;font-weight:400;color:rgba(255,255,255,.85);margin-top:2px;}
@media (min-width:768px){
  .site-header{padding:14px 0 16px;}
  .logo{font-size:1.1rem;}
  .header-title{margin:10px auto 12px;}
  .header-title-text{font-size:1.3rem;}
  .header-subtitle-en{font-size:.85rem;}
}
@media (min-width:1080px){
  .site-header{padding:18px 0 20px;}
  .logo{font-size:1.25rem;}
  .header-title-text{font-size:1.55rem;}
  .header-subtitle-en{font-size:.92rem;}
}

.category-pills{list-style:none;display:flex;flex-wrap:wrap;gap:5px;justify-content:center;}
.pill{display:inline-flex;align-items:center;gap:6px;padding:5px 11px;border-radius:25px;color:#fff;font-size:.68rem;font-weight:700;text-decoration:none;white-space:nowrap;}
.pill-green{background:var(--pill-green);}
.pill-blue{background:var(--pill-blue);}
.pill-orange{background:var(--pill-orange);}
.pill-pink{background:var(--pill-pink);}
.pill-purple{background:var(--pill-purple);}
.pill-teal{background:var(--pill-teal);}
.pill-icon{width:20px;height:20px;border-radius:50%;background:#fff;object-fit:cover;flex-shrink:0;}
.pill-prep{font-size:.62em;font-weight:400;opacity:.9;margin-left:1px;}
.pill.current{box-shadow:inset 0 0 0 2px rgba(255,255,255,.95),0 0 0 2px rgba(0,0,0,.16);}
@media (min-width:768px){.pill{font-size:.82rem;padding:6px 15px;}.pill-icon{width:22px;height:22px;}}

/* buttons */
.btn{display:inline-block;padding:.75em 1.6em;border-radius:25px;font-weight:700;text-decoration:none;text-align:center;font-size:.85rem;border:2px solid transparent;}
.btn-primary{background:var(--header-green);color:#fff;box-shadow:0 3px 0 color-mix(in srgb, var(--header-green) 70%, black),0 6px 14px rgba(0,0,0,.12);transition:background-color .15s ease,transform .15s ease,box-shadow .15s ease;}
.btn-primary:hover{background:color-mix(in srgb, var(--header-green) 88%, white);transform:translateY(-1px);box-shadow:0 4px 0 color-mix(in srgb, var(--header-green) 70%, black),0 8px 16px rgba(0,0,0,.14);}
.btn-primary:active{transform:translateY(2px);box-shadow:0 1px 0 color-mix(in srgb, var(--header-green) 70%, black),0 3px 8px rgba(0,0,0,.10);}
.btn-secondary{background:#fff;color:var(--header-green);border-color:var(--header-green);box-shadow:0 3px 0 var(--header-green),0 6px 14px rgba(0,0,0,.08);transition:background-color .15s ease,transform .15s ease,box-shadow .15s ease;}
.btn-secondary:hover{background:#F0FAF2;transform:translateY(-1px);box-shadow:0 4px 0 var(--header-green),0 8px 16px rgba(0,0,0,.10);}
.btn-secondary:active{transform:translateY(2px);box-shadow:0 1px 0 var(--header-green),0 3px 8px rgba(0,0,0,.08);}
@media (prefers-reduced-motion: reduce){.btn-primary,.btn-secondary{transition:none;}}
.btn-block{display:block;width:100%;}
.btn-sm{font-size:.75rem;padding:.55em 1em;}
.btn-large{font-size:.88rem;padding:.8em 1em;}
.btn-medium{font-size:.76rem;padding:.7em .9em;}
.btn-icon-inline{display:inline-flex;align-items:center;justify-content:center;gap:8px;}
.btn-icon-chip{width:22px;height:22px;border-radius:50%;background:#fff;object-fit:cover;flex-shrink:0;}

/* cards */
.card{background:var(--card-bg);border-radius:20px;border:2.8px solid transparent;box-shadow:0 4px 12px rgba(0,0,0,.08);overflow:hidden;}
.card-green{border-color:var(--pill-green);}
.card-blue{border-color:var(--pill-blue);}
.card-orange{border-color:var(--pill-orange);}
.card-pink{border-color:var(--pill-pink);}
.card-purple{border-color:var(--pill-purple);}
.card-teal{border-color:var(--pill-teal);}

/* badges */
.badge{display:inline-block;padding:3px 10px;border-radius:25px;font-size:.68rem;font-weight:700;}
.badge-easy{background:#E3F3E7;color:#3F8B54;}
.badge-normal{background:#E3EEFB;color:#3D74B5;}
.badge-detailed{background:#F3E9F9;color:#7C4FA0;}
.meta-tag{font-size:.68rem;background:#F0EFE9;color:#666;padding:4px 10px;border-radius:25px;}

/* breadcrumb */
.breadcrumb{font-size:.72rem;color:#777;margin:16px 0 12px;}
.breadcrumb a{color:var(--heading-green);}
.breadcrumb .sep{margin:0 4px;color:#aaa;}

main{display:block;}
.page-title{font-size:1.15rem;margin-bottom:10px;}
.lead-text{font-size:.85rem;color:#555;margin-bottom:20px;}

.section{margin-top:40px;}
.section-title{font-size:1.1rem;margin-bottom:4px;}
.section-sub{font-size:.8rem;color:#666;margin-bottom:16px;}

/* feature hero (TOP: 今月のおすすめ) */
.feature-hero{margin-top:24px;}
.feature-card{padding:20px;text-align:center;}
.feature-card h2{font-size:1.15rem;margin-bottom:6px;}
.feature-desc{font-size:.85rem;margin-bottom:16px;color:#555;}
.feature-thumbs{display:flex;gap:10px;justify-content:center;}
.feature-thumbs a{width:30%;max-width:120px;display:block;}
.feature-thumbs img{width:100%;border-radius:12px;border:1px solid #eee;background:#fff;object-fit:contain;aspect-ratio:336/480;}

/* thumbnail grid (新着ぬりえ / カテゴリ一覧 / 関連ぬりえ) */
.grid-new{display:grid;grid-template-columns:repeat(2,1fr);gap:14px;}
@media (min-width:768px){.grid-new{grid-template-columns:repeat(3,1fr);gap:18px;}}
.thumb-card img{width:100%;aspect-ratio:336/480;object-fit:contain;background:#fff;border-bottom:1px solid #f0ece0;}
.thumb-card-body{padding:10px 12px 14px;}
.thumb-title{font-size:.8rem;font-weight:700;color:var(--text);margin-bottom:8px;}
.thumb-meta{display:flex;justify-content:space-between;align-items:center;font-size:.66rem;color:#888;gap:6px;}
.thumb-diff{margin-bottom:10px;}

/* category grid (カテゴリから探す / 公開中のジャンルを見る) */
.grid-category{display:grid;grid-template-columns:repeat(2,1fr);gap:14px;}
@media (min-width:768px){.grid-category{grid-template-columns:repeat(4,1fr);gap:16px;}}
.category-card{text-decoration:none;color:inherit;display:block;}
.category-card-thumb{width:100%;aspect-ratio:4/3;display:flex;align-items:center;justify-content:center;overflow:hidden;background:#fff;}
.category-card-thumb img{width:100%;height:100%;object-fit:contain;}
.category-card-thumb.no-image{flex-direction:column;gap:8px;}
.category-card-thumb.tint-pink{background:color-mix(in srgb, var(--pill-pink) 30%, #fff);}
.category-card-thumb.tint-purple{background:color-mix(in srgb, var(--pill-purple) 30%, #fff);}
.category-card-thumb.tint-teal{background:color-mix(in srgb, var(--pill-teal) 30%, #fff);}
.category-card-thumb.tint-blue{background:color-mix(in srgb, var(--pill-blue) 30%, #fff);}
.category-card-thumb.tint-orange{background:color-mix(in srgb, var(--pill-orange) 30%, #fff);}
.category-card-thumb img.category-icon-chip{width:64px;height:64px;border-radius:50%;background:#fff;object-fit:cover;box-shadow:0 2px 6px rgba(0,0,0,.08);}
.prep-label{font-size:.62rem;font-weight:700;padding:2px 10px;border-radius:25px;background:rgba(255,255,255,.9);color:#666;}
.category-card-body{padding:10px 12px 14px;}
.category-card-name{display:flex;align-items:center;gap:6px;font-size:.85rem;font-weight:700;margin-bottom:4px;color:var(--text);}
.cardname-icon{width:18px;height:18px;border-radius:50%;background:#fff;object-fit:cover;flex-shrink:0;}
.category-card-desc{font-size:.68rem;color:#777;}

/* prep hero (準備中カテゴリページ) */
.prep-card{padding:56px 20px;text-align:center;}
.prep-icon-chip{width:88px;height:88px;border-radius:50%;background:#fff;object-fit:cover;box-shadow:0 2px 8px rgba(0,0,0,.1);margin:0 auto 18px;}
.prep-text{font-size:.88rem;color:#555;}

/* about / usage card */
.about-card{padding:20px;}
.about-card h2{font-size:1rem;margin-bottom:8px;}
.about-card p{font-size:.82rem;color:#555;}
#usage{scroll-margin-top:110px;}

/* nurie(1枚)ページ: プレビュー + DL */
.fv-section{margin-bottom:20px;}
.preview-wrap{text-align:center;background:var(--card-bg);border:2.8px solid var(--pill-green);border-radius:20px;padding:12px;box-shadow:0 4px 12px rgba(0,0,0,.08);}
.preview-wrap img{display:block;margin:0 auto;width:100%;max-width:640px;aspect-ratio:1.41;max-height:42vh;object-fit:contain;}

/* プレビューのホバー反転(has_sample=trueの作品のみ)。線画imgと見本imgを
   .preview-stackで重ね、hover(ホバー環境)またはタップ(タッチ環境、.flipped
   クラス)で見本を表示する。枠サイズは.preview-stackで固定するためレイアウト
   シフトは出ない。 */
.preview-wrap.has-sample{cursor:pointer;}
.preview-stack{position:relative;width:100%;max-width:640px;aspect-ratio:1.41;max-height:42vh;margin:0 auto;}
.preview-stack img{position:absolute;inset:0;width:100%;height:100%;max-width:none;max-height:none;margin:0;display:block;object-fit:contain;}
.preview-sample{opacity:0;transition:opacity .25s ease;}
@media (prefers-reduced-motion: reduce){.preview-sample{transition:none;}}
@media (hover:hover){
  .preview-wrap.has-sample:hover .preview-sample{opacity:1;}
}
@media (hover:none){
  .preview-wrap.has-sample.flipped .preview-sample{opacity:1;}
}
.preview-hint{position:absolute;right:10px;bottom:10px;z-index:2;background:rgba(255,250,240,.92);color:var(--text);font-size:.64rem;font-weight:700;padding:5px 12px;border-radius:25px;box-shadow:0 2px 6px rgba(0,0,0,.15);pointer-events:none;}
.hint-touch{display:none;}
@media (hover:none){
  .hint-hover{display:none;}
  .hint-touch{display:inline;}
}

.dl-buttons{display:flex;gap:8px;justify-content:center;margin-top:12px;flex-wrap:wrap;}
.dl-buttons a{flex:1 1 0;white-space:nowrap;}
.dl-buttons .btn-print{flex:1 1 100%;white-space:nowrap;}
button.btn{font:inherit;cursor:pointer;-webkit-appearance:none;appearance:none;}

.meta-row{display:flex;flex-wrap:wrap;gap:8px;align-items:center;margin:16px 0;}
.nurie-desc{font-size:.85rem;color:#555;margin-bottom:28px;}

/* プレビュー列+使った色列の2カラムラップ(colorsがある作品のみ出力)。
   768px以上はグリッドで横並び(58/42)、モバイルはDOM順のまま縦積み
   (使った色パネルはfv-section直後=DLボタン群のすぐ下に来る)。 */
.preview-columns .used-colors-section{margin-top:16px;}
@media (min-width:768px){
  .preview-columns{display:grid;grid-template-columns:58fr 42fr;gap:24px;align-items:start;}
  .preview-columns > div{min-width:0;}
  .preview-columns .used-colors-section{margin-top:0;}
}

/* 旧「ぬりあがりイメージ」セクション用ルール(廃止済み・現在は生成されないが
   既存の共通CSSとして保持) */
.sample-section{margin:28px 0;}
.sample-section h2{font-size:1rem;margin-bottom:10px;}

/* 印刷のコツ */
.print-tips{margin:28px 0;font-size:.85rem;color:#555;}

/* 関連ぬりえ */
.related-section{margin-top:36px;}
.related-section h2{font-size:1rem;margin-bottom:12px;}

.back-link-wrap{text-align:center;margin:32px 0;font-size:.85rem;}

/* 他ジャンルへの横リンク(カテゴリページ下部) */
.other-genres{margin-top:48px;}

/* 使った色(色鉛筆画像・1色1行) */
.used-colors-section{margin:28px 0;}
.used-colors-section h2{font-size:1rem;margin-bottom:12px;}
.color-list{display:flex;flex-direction:column;gap:12px;}
.color-row{display:flex;align-items:center;gap:12px;}
.color-pencil{width:70%;max-width:260px;height:auto;display:block;flex-shrink:0;}
.color-label{font-size:.8rem;color:var(--text);flex:1 1 auto;min-width:0;}
.color-label-main{display:block;font-weight:700;}
.color-label-sub{display:block;font-size:.72em;color:#888;margin-top:2px;}
.color-chip-note{margin-top:12px;font-size:.78rem;color:#555;}
@media (min-width:768px){.color-pencil{width:260px;}}

/* コンビニ印刷への導線リンク(DLボタン直下) */
.print-guide-link{margin-top:10px;text-align:center;font-size:.78rem;}

/* print-guide.html: コンビニで印刷する方法 */
.guide-section{margin:28px 0;}
.guide-section h2{font-size:1.05rem;margin-bottom:10px;}
.guide-card{padding:18px 20px;}
.guide-steps{margin:10px 0 0 1.2em;font-size:.85rem;color:#555;}
.guide-steps li{margin-bottom:6px;}
.faq-item{margin-bottom:16px;}
.faq-item:last-child{margin-bottom:0;}
.faq-q{font-weight:700;font-size:.88rem;color:var(--text);margin-bottom:4px;}
.faq-a{font-size:.85rem;color:#555;}

/* footer */
.site-footer{background:var(--footer-bg);color:#fff;margin-top:48px;padding:32px 0 24px;}
.footer-links{list-style:none;display:flex;flex-wrap:wrap;gap:10px 20px;justify-content:center;margin-bottom:16px;}
.footer-links a{color:#fff;font-size:.78rem;text-decoration:underline;}
.footer-usage{text-align:center;font-size:.72rem;color:rgba(255,255,255,.85);max-width:640px;margin:0 auto 16px;line-height:1.7;}
.footer-copyright{text-align:center;font-size:.68rem;color:rgba(255,255,255,.6);}

/* 印刷ボタン(線画PNGだけをA4印刷)。画面では常に非表示、@media printでのみ表示。 */
.print-image{display:none;}

@media print{
  body{background:#fff;}
  .container{max-width:none;padding:0;margin:0;}
  .site-header,
  .breadcrumb,
  .page-title,
  .fv-section,
  .preview-columns,
  .meta-row,
  .nurie-desc,
  .sample-section,
  .used-colors-section,
  .print-tips,
  .related-section,
  .back-link-wrap,
  .site-footer{display:none!important;}
  .print-image{display:block!important;width:100%;height:auto;margin:0;padding:0;}
  @page{size:A4 portrait;margin:10mm;}
}
