:root {
  --bg: #f5f6f7;
  --surface: #ffffff;
  --surface-soft: #eef1f3;
  --ink: #191d21;
  --muted: #626a73;
  --line: #d9dde1;
  --line-strong: #bdc4ca;
  --green: #17684c;
  --green-soft: #e7f2ed;
  --blue: #3159c5;
  --blue-soft: #e8edfb;
  --red: #a43b49;
  --red-soft: #f8e9ec;
  --gold: #8a5a12;
  --gold-soft: #f6eddb;
  --focus: #0b63ce;
  --radius: 8px;
  --shell: 1180px;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "Hiragino Sans", "Yu Gothic UI", Meiryo, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  background: var(--bg);
}

button,
input,
a {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  color: inherit;
}

a {
  color: inherit;
}

:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--focus) 72%, transparent);
  outline-offset: 3px;
}

.skip-link {
  position: fixed;
  z-index: 100;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  border: 0;
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip-link:focus-visible {
  top: 10px;
  left: 10px;
  width: auto;
  height: auto;
  margin: 0;
  padding: 8px 12px;
  overflow: visible;
  border-radius: 4px;
  background: var(--ink);
  clip-path: none;
  color: #fff;
}

.shell {
  width: min(var(--shell), calc(100% - 48px));
  margin-inline: auto;
}

.site-header {
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface) 94%, transparent);
}

.header-inner {
  display: flex;
  min-height: 68px;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-size: 0.93rem;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.brand b {
  color: var(--blue);
}

.brand-mark {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 7px;
  background: var(--ink);
  color: #fff;
  font-size: 0.78rem;
  letter-spacing: 0;
}

.header-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--muted);
  font-size: 0.78rem;
}

.local-badge {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  padding: 2px 9px;
  border: 1px solid #add1c1;
  border-radius: 999px;
  background: var(--green-soft);
  color: var(--green);
  font-weight: 800;
  letter-spacing: 0.05em;
}

.main-content {
  padding-block: 68px 88px;
}

.intro {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 48px;
  padding-bottom: 44px;
  border-bottom: 1px solid var(--line);
}

.eyebrow,
.section-kicker {
  margin: 0 0 7px;
  color: var(--blue);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.13em;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 18ch;
  margin-bottom: 13px;
  font-size: clamp(2rem, 4vw, 3.2rem);
  line-height: 1.14;
  letter-spacing: 0;
}

.lead {
  max-width: 58ch;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 1rem;
}

.stats {
  display: grid;
  grid-template-columns: repeat(3, auto);
  gap: 36px;
  margin: 0;
}

.stats div {
  min-width: 76px;
}

.stats dt {
  color: var(--muted);
  font-size: 0.76rem;
}

.stats dd {
  margin: 2px 0 0;
  font-size: 1.7rem;
  font-weight: 750;
  line-height: 1.2;
}

.stats .status-stat {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--green);
  font-size: 0.92rem;
  letter-spacing: 0.04em;
}

.status-stat span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #2e9b6d;
  box-shadow: 0 0 0 3px #dcefe6;
}

.library {
  padding-top: 46px;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
}

.section-heading h2 {
  margin-bottom: 0;
  font-size: 1.35rem;
  line-height: 1.3;
}

.result-count {
  margin-bottom: 1px;
  color: var(--muted);
  font-size: 0.85rem;
}

.search-row {
  margin-top: 23px;
}

.search-field {
  max-width: 640px;
}

.search-field > label {
  display: block;
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 650;
}

.search-control {
  position: relative;
  display: flex;
  min-height: 50px;
  align-items: center;
  gap: 9px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--surface);
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.search-control:focus-within {
  border-color: var(--focus);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--focus) 14%, transparent);
}

.search-icon {
  position: relative;
  width: 17px;
  height: 17px;
  margin-left: 16px;
  flex: 0 0 auto;
  border: 2px solid #717980;
  border-radius: 50%;
}

.search-icon::after {
  position: absolute;
  right: -5px;
  bottom: -3px;
  width: 7px;
  height: 2px;
  transform: rotate(45deg);
  border-radius: 2px;
  background: #717980;
  content: "";
}

.search-control input {
  width: 100%;
  min-width: 0;
  height: 48px;
  padding: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font-size: 0.95rem;
}

.search-control input::placeholder {
  color: #8a9198;
}

.search-control kbd {
  margin-right: 11px;
  padding: 2px 7px;
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-bottom-color: var(--line-strong);
  border-radius: 5px;
  background: var(--surface-soft);
  color: var(--muted);
  font-family: var(--font-sans);
  font-size: 0.72rem;
}

.clear-search {
  min-width: 56px;
  min-height: 36px;
  padding-inline: 9px;
  flex: 0 0 auto;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--blue);
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 700;
}

.clear-search:hover {
  background: var(--blue-soft);
}

.filters-wrap {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-top: 26px;
  border-bottom: 1px solid var(--line);
}

.filters {
  display: flex;
  min-width: 0;
  gap: 24px;
  overflow-x: auto;
  scrollbar-width: thin;
}

.filter-button {
  position: relative;
  min-height: 46px;
  padding: 0 2px;
  flex: 0 0 auto;
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 0.86rem;
  font-weight: 700;
}

.filter-button::after {
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  height: 2px;
  transform: scaleX(0);
  transform-origin: center;
  background: var(--blue);
  content: "";
  transition: transform 160ms ease;
}

.filter-button:hover,
.filter-button.is-active {
  color: var(--ink);
}

.filter-button.is-active::after {
  transform: scaleX(1);
}

.filter-button span {
  display: inline-grid;
  min-width: 21px;
  height: 21px;
  margin-left: 3px;
  place-items: center;
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 700;
}

.filter-button.is-active span {
  background: var(--blue-soft);
  color: var(--blue);
}

.filter-note {
  max-width: 47ch;
  margin-bottom: 13px;
  color: var(--muted);
  font-size: 0.74rem;
  text-align: right;
}

.work-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  padding-top: 28px;
}

.work-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  transition: border-color 180ms ease, transform 180ms ease, box-shadow 180ms ease;
}

.work-card:hover {
  transform: translateY(-2px);
  border-color: var(--line-strong);
  box-shadow: 0 9px 24px rgba(25, 29, 33, 0.07);
}

.card-preview {
  position: relative;
  display: grid;
  aspect-ratio: 16 / 10;
  place-items: center;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  background: #edf0f2;
}

.preview-window {
  width: 83%;
  height: 76%;
  overflow: hidden;
  border: 1px solid rgba(30, 38, 44, 0.18);
  border-radius: 6px;
  background: #fff;
  box-shadow: 0 8px 18px rgba(27, 32, 37, 0.11);
}

.preview-topbar {
  display: flex;
  height: 16%;
  align-items: center;
  gap: 4px;
  padding-inline: 7px;
  border-bottom: 1px solid #e6e9ec;
  background: #f7f8f9;
}

.preview-topbar span {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #b8bec4;
}

.preview-guide {
  background: #e9eefb;
}

.preview-guide .preview-body {
  display: grid;
  grid-template-columns: 30% 1fr;
  height: 84%;
}

.preview-guide .preview-side {
  padding: 10px 7px;
  border-right: 1px solid #e7eaed;
  background: #f6f8fb;
}

.preview-guide .preview-side i,
.preview-guide .preview-copy i {
  display: block;
  height: 5px;
  margin-bottom: 7px;
  border-radius: 2px;
  background: #c5cbd2;
}

.preview-guide .preview-side i:first-child {
  width: 66%;
  background: var(--blue);
}

.preview-guide .preview-copy {
  padding: 11px;
}

.preview-guide .preview-copy strong {
  display: block;
  width: 63%;
  height: 9px;
  margin-bottom: 13px;
  border-radius: 2px;
  background: #252b30;
}

.preview-guide .preview-copy i:nth-of-type(2) {
  width: 84%;
}

.preview-guide .preview-copy i:nth-of-type(3) {
  width: 72%;
}

.preview-switcher {
  background: #f4ebf0;
}

.preview-switcher .preview-body {
  height: 84%;
  padding: 12px;
}

.preview-switcher .preview-body > strong {
  display: block;
  width: 48%;
  height: 8px;
  margin-bottom: 10px;
  border-radius: 2px;
  background: #2b3035;
}

.account-row {
  display: grid;
  grid-template-columns: 20px 1fr auto;
  align-items: center;
  gap: 8px;
  margin-top: 7px;
  padding: 7px;
  border: 1px solid #e2e5e8;
  border-radius: 5px;
}

.account-row span:first-child {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--red-soft);
}

.account-row i {
  width: 64%;
  height: 5px;
  border-radius: 2px;
  background: #aeb5bc;
}

.account-row b {
  display: block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #35a06e;
}

.preview-poker {
  background: #e5efe9;
}

.preview-poker .preview-window {
  border-color: rgba(16, 65, 46, 0.28);
  background: #133b2d;
}

.preview-poker .preview-topbar {
  border-bottom-color: rgba(255, 255, 255, 0.08);
  background: #102f25;
}

.poker-table {
  position: relative;
  display: grid;
  height: 84%;
  place-items: center;
}

.poker-cards {
  display: flex;
  gap: 5px;
}

.poker-cards span {
  display: grid;
  width: 28px;
  height: 38px;
  place-items: center;
  border-radius: 4px;
  background: #fff;
  color: #25292d;
  font-size: 0.62rem;
  font-weight: 800;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.2);
}

.poker-cards span:nth-child(2),
.poker-cards span:nth-child(4) {
  color: #b13e4d;
}

.poker-label {
  position: absolute;
  right: 8px;
  bottom: 7px;
  padding: 2px 6px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  color: #cfe8dc;
  font-size: 0.48rem;
  letter-spacing: 0.06em;
}

.preview-number {
  position: absolute;
  bottom: 9px;
  left: 10px;
  color: rgba(25, 29, 33, 0.55);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.05em;
}

.preview-poker .preview-number {
  color: rgba(19, 59, 45, 0.64);
}

.card-content {
  padding: 19px 19px 16px;
}

.card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.category-label {
  color: var(--blue);
  font-size: 0.72rem;
  font-weight: 800;
}

.status-label {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--green);
  font-size: 0.67rem;
  font-weight: 800;
  letter-spacing: 0.06em;
}

.status-label::before {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #2e9b6d;
  content: "";
}

.card-title {
  min-height: 2.7em;
  margin-bottom: 8px;
  font-size: 1.04rem;
  line-height: 1.36;
}

.card-description {
  display: -webkit-box;
  min-height: 4.5em;
  margin-bottom: 14px;
  overflow: hidden;
  color: var(--muted);
  font-size: 0.81rem;
  line-height: 1.55;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.tags,
.dialog-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag {
  display: inline-flex;
  min-height: 24px;
  align-items: center;
  padding: 2px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fafbfb;
  color: var(--muted);
  font-size: 0.66rem;
  font-weight: 650;
}

.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid #eceef0;
}

.card-path {
  min-width: 0;
  overflow: hidden;
  color: #7a828a;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.62rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.detail-button {
  min-width: 84px;
  min-height: 38px;
  padding-inline: 13px;
  flex: 0 0 auto;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: var(--surface);
  cursor: pointer;
  font-size: 0.75rem;
  font-weight: 750;
}

.detail-button:hover {
  border-color: var(--ink);
  background: var(--surface-soft);
}

.empty-state {
  margin-top: 28px;
  padding: 56px 24px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  background: var(--surface);
  text-align: center;
}

.empty-mark {
  display: grid;
  width: 48px;
  height: 48px;
  margin: 0 auto 13px;
  place-items: center;
  border-radius: 50%;
  background: var(--surface-soft);
  color: var(--muted);
  font-weight: 800;
}

.empty-state h3 {
  margin-bottom: 6px;
  font-size: 1rem;
}

.empty-state p {
  margin-bottom: 18px;
  color: var(--muted);
  font-size: 0.82rem;
}

.site-footer {
  border-top: 1px solid var(--line);
  background: var(--surface);
}

.footer-inner {
  display: flex;
  min-height: 70px;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  color: var(--muted);
  font-size: 0.74rem;
}

.footer-inner p {
  margin-bottom: 0;
}

.work-dialog {
  width: min(650px, calc(100% - 32px));
  max-height: min(760px, calc(100dvh - 32px));
  padding: 0;
  overflow: auto;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 24px 70px rgba(18, 23, 27, 0.25);
}

.work-dialog::backdrop {
  background: rgba(15, 20, 24, 0.58);
}

.dialog-panel {
  padding: 28px;
}

.dialog-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding-bottom: 19px;
  border-bottom: 1px solid var(--line);
}

.dialog-category {
  margin-bottom: 4px;
  color: var(--blue);
  font-size: 0.72rem;
  font-weight: 800;
}

.dialog-head h2 {
  margin-bottom: 0;
  font-size: 1.35rem;
  line-height: 1.35;
}

.icon-button {
  display: grid;
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--surface);
  cursor: pointer;
  font-size: 1.45rem;
  line-height: 1;
}

.icon-button:hover {
  background: var(--surface-soft);
}

.dialog-description {
  margin-block: 22px 15px;
  color: var(--muted);
}

.dialog-details {
  display: grid;
  gap: 0;
  margin: 24px 0 0;
  border-top: 1px solid var(--line);
}

.dialog-details div {
  display: grid;
  grid-template-columns: 104px minmax(0, 1fr);
  gap: 16px;
  padding-block: 13px;
  border-bottom: 1px solid var(--line);
}

.dialog-details dt {
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 750;
}

.dialog-details dd {
  min-width: 0;
  margin: 0;
  overflow-wrap: anywhere;
  font-size: 0.77rem;
}

#dialog-path {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 24px;
}

.primary-button,
.secondary-button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  padding: 8px 16px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 750;
  text-decoration: none;
}

.primary-button {
  border: 1px solid var(--ink);
  background: var(--ink);
  color: #fff;
}

.primary-button:hover {
  background: #30363c;
}

.secondary-button {
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--ink);
}

.secondary-button:hover {
  background: var(--surface-soft);
}

.noscript {
  position: fixed;
  right: 16px;
  bottom: 16px;
  left: 16px;
  z-index: 20;
  margin: 0;
  padding: 12px;
  border: 1px solid #d7a7ae;
  border-radius: 6px;
  background: var(--red-soft);
  color: #7f2836;
  text-align: center;
}

[hidden] {
  display: none !important;
}

@media (max-width: 920px) {
  .intro {
    grid-template-columns: 1fr;
    align-items: start;
    gap: 30px;
  }

  .stats {
    justify-content: start;
  }

  .filters-wrap {
    display: block;
  }

  .filter-note {
    margin-top: 9px;
    margin-bottom: 12px;
    text-align: left;
  }

  .work-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .shell {
    width: min(100% - 32px, var(--shell));
  }

  .header-inner {
    min-height: 60px;
  }

  .updated-at {
    display: none;
  }

  .main-content {
    padding-block: 42px 64px;
  }

  .intro {
    padding-bottom: 34px;
  }

  h1 {
    font-size: 2rem;
  }

  .stats {
    width: 100%;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
  }

  .stats div {
    min-width: 0;
  }

  .stats dd {
    font-size: 1.35rem;
  }

  .stats .status-stat {
    font-size: 0.75rem;
  }

  .library {
    padding-top: 36px;
  }

  .section-heading {
    align-items: flex-end;
  }

  .search-control kbd {
    display: none;
  }

  .filters {
    gap: 20px;
  }

  .work-grid {
    grid-template-columns: 1fr;
    gap: 16px;
    padding-top: 22px;
  }

  .card-title,
  .card-description {
    min-height: 0;
  }

  .footer-inner {
    display: block;
    padding-block: 17px;
  }

  .footer-inner p + p {
    margin-top: 2px;
  }

  .dialog-panel {
    padding: 20px;
  }

  .dialog-details div {
    grid-template-columns: 1fr;
    gap: 3px;
  }

  .dialog-actions {
    display: grid;
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}

@media print {
  :root {
    --bg: #fff;
  }

  .site-header,
  .search-row,
  .filters-wrap,
  .card-footer,
  .site-footer,
  .result-count {
    display: none !important;
  }

  .shell {
    width: 100%;
  }

  .main-content {
    padding: 0;
  }

  .intro {
    padding-bottom: 20px;
  }

  .library {
    padding-top: 24px;
  }

  .work-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .work-card {
    break-inside: avoid;
    box-shadow: none !important;
  }
}
