/* ------------------------------------------------------------------
   donotcopy — Kentaro Takaoka
   Work ページの書体・級数を基準に全ページを統一
------------------------------------------------------------------ */

:root {
  --ink: #000;
  --sub: #8c8c8c;
  --rule: #dcdcdc;
  --bg: #fff;
  --hover: #f5f5f5;

  --fs: 13px;
  --fs-s: 12px;
  --lh: 1.55;

  --bar-h: 38px;
  --pad: 18px;
  --gap: 24px;
}

* { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Helvetica Neue", Helvetica, Arial,
               "Hiragino Kaku Gothic ProN", "Hiragino Sans",
               "Yu Gothic", YuGothic, "Noto Sans JP", Meiryo, sans-serif;
  font-size: var(--fs);
  line-height: var(--lh);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "palt" 1;
}

a {
  color: inherit;
  text-decoration: none;
}

a:focus-visible,
button:focus-visible {
  outline: 1px solid var(--ink);
  outline-offset: 2px;
}

img { display: block; max-width: 100%; }

/* --- メニューバー ------------------------------------------------- */

.bar {
  position: sticky;
  top: 0;
  z-index: 50;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  height: var(--bar-h);
  padding: 0 var(--pad);
  background: var(--bg);
  border-bottom: 1px solid var(--ink);
}

.bar a { display: inline-block; }
.bar a:hover { opacity: .5; }

.bar .left  { justify-self: start; }
.bar .mid   { justify-self: center; }
.bar .right { justify-self: end; }

.bar .here { pointer-events: none; }

/* --- 汎用 ---------------------------------------------------------- */

main { padding: 0 var(--pad); }

.sub { color: var(--sub); }

.h { font-weight: 700; }

/* --- トップ -------------------------------------------------------- */

.top {
  min-height: calc(100svh - var(--bar-h));
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12vh var(--pad);
}

.top p {
  margin: 0;
  max-width: 34em;
  text-align: center;
  text-wrap: balance;
}

/* --- Work: フィルタ ------------------------------------------------ */

.filters {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: center;
  gap: 4px 14px;
  padding: 90px 0 26px;
}

.filters .group-label {
  color: var(--sub);
}

.f {
  appearance: none;
  border: 0;
  background: none;
  padding: 0;
  margin: 0;
  font: inherit;
  color: var(--sub);
  cursor: pointer;
  white-space: nowrap;
}

.f::before {
  content: "•";
  margin-right: .3em;
  opacity: 0;
}

.f:hover { color: var(--ink); }

.f[aria-pressed="true"] {
  color: var(--ink);
  font-weight: 700;
}

.f[aria-pressed="true"]::before { opacity: 1; }

/* 選択中のタグ */

.active-tags {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px 10px;
  padding-bottom: 22px;
  min-height: 0;
}

.active-tags:empty { display: none; }

.chip {
  appearance: none;
  border: 1px solid var(--ink);
  background: none;
  border-radius: 0;
  padding: 1px 6px;
  font: inherit;
  font-size: var(--fs-s);
  cursor: pointer;
}

.chip:hover { background: var(--ink); color: var(--bg); }

.chip .x { margin-left: .5em; }

.count {
  font-size: var(--fs-s);
  color: var(--sub);
  align-self: center;
}

/* --- Work: 一覧 ---------------------------------------------------- */

.list { border-top: 1px solid var(--rule); }

.row {
  display: grid;
  grid-template-columns:
    minmax(0, 3.1fr)   /* 作品名 + 日付 */
    minmax(0, 1.5fr)   /* 媒体名 + URL */
    minmax(0, .75fr)   /* ジャンル */
    minmax(0, .75fr)   /* 媒体 */
    minmax(0, .9fr)    /* 役割 */
    220px;             /* 画像 */
  gap: var(--gap);
  align-items: start;
  padding: 12px 0;
  border-bottom: 1px solid var(--rule);
}

.row .title { font-weight: 700; }
.row .date { font-weight: 400; color: var(--sub); }

.tags-wrap { display: contents; }
.row .title a:hover { text-decoration: underline; }

.row .outlet { word-break: break-word; }
.row .outlet .url {
  color: var(--sub);
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.row .outlet .url:hover { color: var(--ink); text-decoration: underline; }

.taglist {
  display: flex;
  flex-wrap: wrap;
  gap: 0 6px;
}

.tag {
  appearance: none;
  border: 0;
  background: none;
  padding: 0;
  font: inherit;
  color: var(--sub);
  cursor: pointer;
  text-align: left;
}

.tag:hover { color: var(--ink); }
.tag.on { color: var(--ink); font-weight: 700; }

.thumb {
  aspect-ratio: 3 / 2;
  background: #f2f2f2;
  width: 100%;
}

.thumb img { width: 100%; height: 100%; object-fit: cover; }

.empty {
  padding: 40px 0 80px;
  color: var(--sub);
}

.foot { padding: 40px 0 60px; }

/* --- Info ---------------------------------------------------------- */

.info {
  display: grid;
  grid-template-columns: 1fr 1fr 1.6fr 2fr;
  gap: 40px;
  padding: 26px 0 80px;
  align-items: start;
}

.info h2 {
  margin: 0 0 1.15em;
  font-size: var(--fs);
  font-weight: 700;
}

.info p { margin: 0 0 1.15em; }
.info p:last-child { margin-bottom: 0; }

.info .name-ja { margin-bottom: 2em; }

.icon {
  width: 78px;
  height: 78px;
  margin-bottom: 2em;
}

.links a {
  display: block;
  font-weight: 700;
}

.links a:hover { text-decoration: underline; }

.links .spaced { margin-top: 1.15em; }

.mail { font-weight: 700; }
.mail:hover { text-decoration: underline; }

/* --- モバイル ------------------------------------------------------ */

@media (max-width: 900px) {
  :root { --fs: 13px; --gap: 14px; --pad: 14px; }

  .filters { padding: 34px 0 20px; }

  .row {
    grid-template-columns: minmax(0, 1fr) 96px;
    gap: 12px;
    padding: 14px 0;
  }

  .row .title      { grid-column: 1; grid-row: 1; }
  .row .outlet     { grid-column: 1; grid-row: 2; margin-top: .5em; }
  .row .tags-wrap  { grid-column: 1; grid-row: 3; margin-top: .5em;
                     display: flex; flex-wrap: wrap; gap: 0 10px; }
  .row .thumb      { grid-column: 2; grid-row: 1 / span 3; }

  .info {
    grid-template-columns: 1fr;
    gap: 34px;
    padding: 22px 0 60px;
  }

  .top { min-height: calc(100svh - var(--bar-h) - 60px); }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}
