:root { color-scheme: light; --brand-orange: #f29800; --brand-orange-hover: #e68d00; --accent-text: #a35700; --ink: #222528; --muted: #72777b; --line: #e3e5e7; --soft: #f4f5f6; --canvas: #fff; --canvas-border: #e3e5e7; }
* { box-sizing: border-box; }
html { scrollbar-gutter: stable; }
body { margin: 0; background: #fff; color: var(--ink); font: 14px/1.6 -apple-system, BlinkMacSystemFont, "Hiragino Kaku Gothic ProN", "Yu Gothic", Meiryo, sans-serif; letter-spacing: 0; }
body[data-background="black"] { --canvas: #111; --canvas-border: #111; }
button, input, select { font: inherit; letter-spacing: 0; }
button, a, select { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; color: inherit; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
svg { width: 18px; height: 18px; flex: 0 0 auto; stroke-width: 1.7; }
h1, h2, h3, p { margin: 0; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible { outline: 3px solid #27829a; outline-offset: 4px; }
[hidden] { display: none !important; }
.container { width: min(1184px, calc(100% - 64px)); margin-inline: auto; }
.skip-link { position: absolute; top: -80px; left: 20px; padding: 12px; background: #fff; z-index: 20; }
.skip-link:focus { top: 8px; }
.site-header { border-top: 5px solid var(--brand-orange); border-bottom: 1px solid var(--line); }
.header-inner { min-height: 76px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.brand { display: flex; align-items: baseline; gap: 6px; font-size: 24px; font-weight: 850; white-space: nowrap; }
.brand > span:first-child { color: var(--accent-text); }
.brand-divider { align-self: center; height: 22px; width: 1px; background: var(--line); margin: 0 12px; }
.brand small { font-size: 12px; font-weight: 600; color: var(--muted); }
.usage-link { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; min-height: 44px; }
.usage-link:hover { color: var(--accent-text); }
.usage-link svg { width: 14px; height: 14px; }
main { min-height: 70vh; }
.page-title { padding: 34px 0 26px; }
.page-title h1, .detail-title h1 { border-left: 4px solid var(--brand-orange); padding-left: 14px; }
h1 { font-size: 28px; line-height: 1.5; font-weight: 750; overflow-wrap: anywhere; }
.filter-dock { position: sticky; top: 0; z-index: 5; background: #fff; border-bottom: 1px solid var(--line); padding-top: 12px; }
.filter-top { display: flex; justify-content: space-between; align-items: center; gap: 24px; padding-bottom: 22px; }
.search-field { display: flex; align-items: center; width: min(480px, 100%); height: 46px; padding: 0 14px; gap: 10px; background: var(--soft); border: 1px solid transparent; border-radius: 5px; }
.search-field:focus-within { border-color: #8d999f; background: #fff; }
.search-field svg { color: #777e84; width: 20px; height: 20px; }
.search-field input { width: 100%; min-width: 0; border: 0; outline: none; padding: 0; background: transparent; font-size: 14px; }
.search-field input:focus-visible { outline: none; }
.search-field input::placeholder { color: #7c8185; }
.background-control { display: flex; align-items: center; gap: 10px; flex: 0 0 auto; }
.control-label { font-size: 12px; color: #62696e; white-space: nowrap; }
.swatches { display: flex; align-items: center; gap: 2px; }
.swatch-button { display: grid; place-items: center; width: 40px; height: 40px; border: 0; background: transparent; border-radius: 4px; }
.swatch { display: grid; place-items: center; width: 26px; height: 26px; border: 1px solid #c7cbd0; border-radius: 50%; background: #fff; color: #202226; }
.swatch-button[data-bg="black"] .swatch { background: #111; color: #fff; border-color: #111; }
.swatch-button[aria-pressed="true"] .swatch { outline: 2px solid var(--accent-text); outline-offset: 3px; }
.swatch svg { width: 14px; height: 14px; opacity: 0; stroke-width: 2.4; }
.swatch-button[aria-pressed="true"] svg { opacity: 1; }
.genre-tabs { display: flex; gap: 24px; overflow-x: auto; scrollbar-width: thin; }
.genre-tab { position: relative; flex: 0 0 auto; display: flex; align-items: center; gap: 7px; border: 0; background: none; padding: 0 0 15px; min-height: 43px; font-size: 13px; color: #686e73; white-space: nowrap; }
.genre-tab span { font-size: 11px; color: #969a9e; font-variant-numeric: tabular-nums; }
.genre-tab[aria-pressed="true"] { color: var(--accent-text); font-weight: 700; }
.genre-tab[aria-pressed="true"]::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: var(--brand-orange); }
.list-heading { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 26px 0 18px; }
.list-heading h2 { display: inline; font-size: 15px; font-weight: 700; }
.result-count { display: inline-block; margin-left: 12px; color: var(--muted); font-size: 12px; }
.sort-control { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; }
.sort-control label { color: var(--muted); font-size: 11px; }
.sort-control select { border: 1px solid var(--line); border-radius: 4px; background: #fff; padding: 6px 24px 6px 10px; font-size: 12px; min-height: 36px; }
.asset-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); column-gap: 20px; row-gap: 28px; }
.asset-link { display: block; min-width: 0; border-radius: 5px; }
.logo-thumbnail { display: grid; place-items: center; aspect-ratio: 4 / 3; padding: 15px; background: var(--canvas); border: 1px solid var(--canvas-border); border-radius: 5px; position: relative; overflow: hidden; transition: border-color .15s, background-color .15s; }
.logo-thumbnail img { width: 100%; height: 100%; object-fit: contain; min-width: 0; min-height: 0; }
.variant-count-badge { position: absolute; right: 9px; bottom: 9px; z-index: 1; padding: 3px 8px; border-radius: 12px; background: #252a2ce8; color: #fff; font-size: 10px; font-weight: 700; line-height: 1.5; }
.asset-link:hover .logo-thumbnail { border-color: var(--brand-orange); }
.asset-caption { display: flex; align-items: flex-start; gap: 10px; justify-content: space-between; margin-top: 11px; min-height: 44px; }
.asset-caption h3 { font-size: 13px; font-weight: 650; line-height: 1.6; overflow-wrap: anywhere; }
.asset-caption svg { width: 15px; height: 15px; color: #909599; margin-top: 3px; }
.asset-link:hover h3 { color: var(--accent-text); }
.empty-state { text-align: center; padding: 64px 16px; }
.empty-state h2 { font-size: 18px; margin-bottom: 20px; }
.button { display: inline-flex; justify-content: center; align-items: center; gap: 10px; min-height: 46px; padding: 10px 18px; border: 1px solid #cfd3d6; border-radius: 5px; background: #fff; color: var(--ink); font-size: 13px; font-weight: 650; text-align: center; }
.button:hover { border-color: #979da1; background: #f7f8f9; }
.button.primary { color: var(--ink); background: var(--brand-orange); border-color: var(--brand-orange); }
.button.primary:hover { background: var(--brand-orange-hover); border-color: var(--brand-orange-hover); }
.button.full-width { width: 100%; }
.back-row { padding-top: 25px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.back-link { display: inline-flex; align-items: center; gap: 7px; min-height: 40px; font-size: 13px; color: #61686e; }
.back-link:hover { color: var(--accent-text); }
.detail-title { padding: 14px 0 26px; }
.category-text { display: block; margin-bottom: 7px; font-size: 12px; color: var(--muted); }
.material-variant-picker { margin: -4px 0 30px; padding: 18px; border: 1px solid var(--line); border-radius: 5px; background: #fafafa; }
.variant-heading { margin-bottom: 14px; }
.material-variant-tabs { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 9px; }
.material-variant { display: flex; flex-direction: column; align-items: center; gap: 7px; min-width: 0; padding: 9px 8px 8px; border: 1px solid var(--line); border-radius: 5px; background: #fff; font-size: 12px; font-weight: 650; }
.material-variant:hover { border-color: #a7adb1; }
.material-variant[aria-pressed="true"] { border-color: var(--brand-orange); box-shadow: 0 0 0 2px #f2980029; color: var(--accent-text); }
.variant-logo { position: relative; display: block; width: 100%; aspect-ratio: 16 / 7; min-height: 0; border-radius: 3px; background: var(--canvas); overflow: hidden; }
.variant-logo img { position: absolute; inset: 3px; width: calc(100% - 6px); height: calc(100% - 6px); min-width: 0; min-height: 0; object-fit: cover; object-position: center; }
.detail-layout { display: grid; grid-template-columns: minmax(0, 1.18fr) minmax(0, 1fr); grid-template-areas: "poster logo" "poster pack"; column-gap: 48px; row-gap: 28px; align-items: start; }
.poster-section { grid-area: poster; min-width: 0; }
.logo-section { grid-area: logo; min-width: 0; }
.pack-section { grid-area: pack; min-width: 0; padding-top: 23px; border-top: 1px solid var(--line); }
.detail-layout.logo-only { grid-template-columns: minmax(0, 640px); grid-template-areas: "logo"; }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 34px; margin-bottom: 12px; }
.section-heading h2 { font-size: 15px; font-weight: 700; }
.section-heading > span { color: var(--muted); font-size: 11px; }
.section-heading select { max-width: 60%; padding: 5px 8px; background: #fff; border: 1px solid var(--line); border-radius: 3px; font-size: 12px; }
.poster-stage { display: grid; place-items: center; width: 100%; aspect-ratio: 3 / 4; max-height: 680px; border: 1px solid var(--line); border-radius: 4px; background: var(--soft); padding: 18px; position: relative; cursor: zoom-in; overflow: hidden; }
.poster-stage img { height: 100%; width: 100%; min-height: 0; object-fit: contain; }
.expand-mark { position: absolute; bottom: 10px; right: 10px; display: grid; place-items: center; width: 30px; height: 30px; border: 1px solid var(--line); border-radius: 4px; background: #fff; color: #3b4248; }
.poster-variants { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-top: 12px; }
.poster-variant { flex: 1 1 0; border: 0; border-bottom: 2px solid transparent; padding: 11px 4px; min-height: 44px; font-size: 12px; background: transparent; white-space: nowrap; }
.poster-variant[aria-pressed="true"] { border-bottom-color: var(--brand-orange); color: var(--accent-text); font-weight: 650; }
.logo-stage { display: grid; place-items: center; width: 100%; aspect-ratio: 16 / 9; background: var(--canvas); border: 1px solid var(--canvas-border); border-radius: 4px; padding: 22px; position: relative; cursor: zoom-in; overflow: hidden; }
.logo-stage img { width: 100%; height: 100%; min-height: 0; object-fit: contain; }
.logo-download { margin-top: 13px; }
.psd-download { margin-bottom: 10px; }
.preview-notice { padding: 10px 20px; background: #fff3d8; color: #663900; font-size: 13px; text-align: center; }
.preview-notice a { margin-left: 20px; text-decoration: underline; }
.pack-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.pack-heading h2 { font-size: 17px; font-weight: 700; }
.pack-heading span { color: var(--muted); font-size: 11px; }
.pack-contents { margin: 16px 0 21px; padding: 0; list-style: none; display: grid; gap: 10px; }
.pack-contents li { display: flex; gap: 10px; align-items: baseline; font-size: 13px; }
.filetype { display: inline-block; font-size: 10px; width: 34px; flex: 0 0 34px; color: #72797f; font-weight: 700; }
.pack-contents small { display: block; color: var(--muted); font-size: 11px; margin-top: 2px; }
.pack-note { font-size: 12px; color: var(--muted); margin: -6px 0 18px; }
.pack-contents li > span:last-child { min-width: 0; overflow-wrap: anywhere; }
.detail-next { margin-top: 40px; padding: 20px 0; border-top: 1px solid var(--line); }
.site-footer { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-top: 58px; padding: 22px 0 28px; border-top: 2px solid var(--brand-orange); color: #8b9195; font-size: 10px; }
.site-footer span:first-child { font-weight: 700; }
dialog { width: min(1200px, calc(100% - 40px)); max-width: none; height: min(920px, calc(100dvh - 40px)); max-height: none; padding: 0; border: 0; border-radius: 6px; background: #fff; color: var(--ink); }
dialog::backdrop { background: rgb(15 18 21 / 72%); }
.dialog-header { height: 62px; padding: 10px 16px 10px 22px; display: flex; align-items: center; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--line); }
.dialog-header h2 { font-size: 14px; font-weight: 650; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.dialog-actions { display: flex; gap: 6px; flex: 0 0 auto; }
.icon-button { display: grid; place-items: center; width: 40px; height: 40px; padding: 0; border: 1px solid var(--line); border-radius: 4px; background: #fff; }
.icon-button:hover { background: var(--soft); }
.dialog-canvas { height: calc(100% - 62px); width: 100%; padding: 20px; overflow: auto; background: var(--soft); }
.dialog-canvas.logo-canvas { background: var(--canvas); }
.dialog-canvas img { width: 100%; height: 100%; object-fit: contain; }
.dialog-canvas.is-zoomed img { width: auto; height: auto; max-width: none; margin: auto; }
body.dialog-open { overflow: hidden; }
.image-failed::after { content: "画像を読み込めませんでした"; position: absolute; inset: 0; display: grid; place-items: center; background: var(--soft); color: var(--muted); padding: 14px; font-size: 12px; }
.logo-thumbnail, .logo-stage, .poster-stage { --asset-inset: 15px; }
.logo-stage { --asset-inset: 22px; }
.poster-stage { --asset-inset: 18px; }
.logo-thumbnail img, .logo-stage img, .poster-stage img { position: absolute; inset: var(--asset-inset); width: calc(100% - var(--asset-inset) * 2); height: calc(100% - var(--asset-inset) * 2); }
@media (max-width: 1050px) {
  .asset-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .genre-tabs { gap: 20px; }
  .detail-layout { column-gap: 28px; }
}
@media (max-width: 760px) {
  .container { width: calc(100% - 40px); }
  .brand-divider, .brand small { display: none; }
  .detail-layout { grid-template-columns: minmax(0, 1fr); grid-template-areas: "logo" "poster" "pack"; gap: 30px; }
  .logo-stage { max-height: 260px; }
  .poster-stage { aspect-ratio: 3 / 4; max-height: 650px; }
  .back-row { padding-top: 14px; }
  .detail-title { padding-bottom: 22px; }
  .material-variant-picker { margin-bottom: 24px; padding: 14px; }
  .material-variant-tabs { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 8px; scroll-snap-type: x proximity; scrollbar-width: thin; }
  .material-variant { flex: 0 0 112px; scroll-snap-align: start; }
}
@media (max-width: 640px) {
  .container { width: calc(100% - 32px); }
  .header-inner { min-height: 64px; gap: 10px; }
  .brand { font-size: 22px; }
  .usage-link { font-size: 10px; gap: 5px; }
  .page-title { padding: 25px 0 13px; }
  h1 { font-size: 23px; }
  .filter-top { flex-wrap: wrap; gap: 8px; padding-bottom: 6px; }
  .search-field { width: 100%; }
  .search-field input { font-size: 16px; }
  .background-control { margin-left: auto; gap: 6px; }
  .control-label { font-size: 11px; }
  .genre-tabs { gap: 21px; }
  .genre-tab { font-size: 12px; padding-bottom: 12px; }
  .genre-tab span { font-size: 10px; }
  .list-heading { padding: 20px 0 15px; gap: 10px; }
  .list-heading h2 { font-size: 13px; }
  .result-count { margin-left: 6px; font-size: 11px; }
  .sort-control label { display: none; }
  .sort-control select { font-size: 11px; }
  .asset-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 21px 12px; }
  .logo-thumbnail { padding: 10px; aspect-ratio: 6 / 5; }
  .logo-thumbnail { --asset-inset: 10px; }
  .asset-caption { margin-top: 8px; min-height: 40px; gap: 3px; }
  .asset-caption h3 { font-size: 12px; }
  .asset-caption svg { width: 13px; height: 13px; }
  .site-footer { margin-top: 36px; }
  .poster-stage { padding: 12px; }
  .poster-stage { --asset-inset: 12px; }
  .poster-variant { font-size: 11px; }
  dialog { width: calc(100% - 16px); height: calc(100dvh - 16px); }
  .dialog-header { padding-left: 12px; }
  .dialog-header h2 { font-size: 12px; }
  .dialog-canvas { padding: 10px; }
}
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; transition: none !important; } }
