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

html {
  overflow-y: scroll;
}

body {
  font-family: monospace;
  color: #222;
  background: #fff;
  line-height: 1.6;
}

.page-shell {
  display: grid;
  grid-template-columns: 144px minmax(0, 640px);
  gap: 32px;
  width: min(100%, 848px);
  margin: 0 auto;
  padding: 24px 16px;
}

.sidebar {
  position: sticky;
  top: 24px;
  align-self: start;
}

.site-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
  color: #222;
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
}

.site-brand img {
  flex-shrink: 0;
}

.menu-toggle {
  display: none;
}

.sidebar nav {
  display: grid;
  gap: 8px;
}

.sidebar nav a {
  color: #666;
  text-decoration: none;
}

.sidebar nav a:hover {
  color: #222;
  text-decoration: underline;
}

.sidebar nav a[aria-current="page"] {
  color: #222;
  text-decoration: underline;
}

.external-nav-link {
  display: flex;
  align-items: center;
  gap: 4px;
}

.external-nav-link svg {
  flex-shrink: 0;
}

.sidebar-social {
  display: grid;
  gap: 8px;
  margin-top: 8px;
  padding-top: 16px;
  border-top: 1px solid #ddd;
}

.sidebar-social a {
  display: flex;
  align-items: center;
  gap: 8px;
}

.sidebar-social img {
  flex-shrink: 0;
}

.page-content {
  min-width: 0;
}

.home-visual {
  width: 100%;
  max-width: 520px;
  margin: 0 auto;
  padding: 10px;
  border: 6px double #665247;
  background: #f5f0e6;
}

.home-visual img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid #c8bfae;
}

.home-visual figcaption {
  padding: 8px 4px 0;
  color: #665247;
  font-size: 0.75rem;
  text-align: center;
}

.page-title {
  margin-bottom: 16px;
  font-size: 1.125rem;
}

.page-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin-bottom: 16px;
}

.page-heading .page-title,
.page-heading .play-status-legend {
  margin-bottom: 0;
}

.empty-state {
  color: #777;
  font-size: 0.8125rem;
}

.account-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 4px;
  border-bottom: 1px solid #ddd;
  color: #222;
  font-size: 0.8125rem;
  text-decoration: none;
}

.account-item:hover {
  background: #f8f8f8;
}

.account-item:hover .account-url {
  text-decoration: underline;
}

.account-service {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
}

.account-service img {
  flex-shrink: 0;
}

.gallery-section + .gallery-section {
  margin-top: 28px;
}

.gallery-section h2 {
  margin-bottom: 12px;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px;
}

.gallery-grid .empty-state {
  grid-column: 1 / -1;
}

.gallery-grid figure img {
  display: block;
  width: 100%;
  height: auto;
}

.gallery-grid figcaption {
  margin-top: 4px;
  color: #666;
  font-size: 0.6875rem;
}

.post-list {
  border-top: 1px solid #ddd;
}

.post-list-item {
  padding: 14px 0;
  border: 0;
  border-bottom: 1px solid #ddd;
}

.post-list-item time,
.post-header time {
  color: #888;
  font-size: 0.6875rem;
}

.post-list-item h2 {
  margin: 2px 0 0;
  padding: 0;
  border: 0;
}

.post-list-item h2 a,
.post-body a,
.back-link {
  color: #222;
}

.post-list-item p {
  margin-top: 4px;
  color: #666;
  font-size: 0.75rem;
}

.blog-post {
  padding: 0;
  border: 0;
}

.post-header {
  margin-bottom: 24px;
  padding-bottom: 12px;
  border-bottom: 1px solid #ddd;
}

.post-header h1 {
  margin-bottom: 4px;
}

.post-body > * + * {
  margin-top: 16px;
}

.post-body h2,
.post-body h3 {
  margin-top: 28px;
}

.post-body ul,
.post-body ol {
  padding-left: 2em;
}

.post-body pre,
.post-body blockquote {
  padding: 12px;
  background: #f6f6f6;
  overflow-x: auto;
}

.post-body code {
  font-family: inherit;
}

.media-embed {
  width: 100%;
}

.media-embed-youtube {
  position: relative;
  aspect-ratio: 16 / 9;
}

.media-embed-youtube iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.media-embed-twitter .twitter-tweet {
  margin-right: auto;
  margin-left: auto;
}

.back-link {
  display: inline-block;
  margin-top: 40px;
  font-size: 0.75rem;
}

section {
  position: relative;
  margin-bottom: 12px;
  padding: 14px 14px 30px;
  border: 1px solid #ddd;
  background: #fff;
}

section:last-child {
  margin-bottom: 0;
}

.game-card {
  position: relative;
  margin: 0 0 0 8px;
  padding: 0 4px;
  border-bottom: 1px solid #ddd;
  background: #fff;
}

.game-card > summary {
  margin: 0 -4px;
  padding: 12px 4px;
  background: #f6f6f6;
}

.game-card > summary:hover {
  background: #eeeeee;
}

.game-card > summary h2 {
  display: flex;
  align-items: center;
  gap: 0;
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: 0;
  font-size: 0.8125rem;
}

.game-card .card-updated {
  top: 15px;
  right: 38px;
  bottom: auto;
}

.game-card > summary h2::after {
  content: "+";
  margin-left: auto;
  color: #777;
  font-size: 1rem;
  font-weight: 400;
  line-height: 1;
}

.game-card[open] {
  padding-bottom: 12px;
}

.game-card[open] > summary {
  margin-bottom: 12px;
  border-bottom: 1px solid #eee;
}

.game-card[open] > summary h2::after {
  content: "−";
}

details.category {
  margin-top: 0;
  padding: 0;
  border: 0;
  background: transparent;
}

details.category:first-of-type {
  margin-top: 0;
}

details.category > summary h1 {
  padding: 12px 4px;
  border-bottom: 1px solid #ddd;
  color: #555;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
}

details.category > summary:hover {
  background: #f8f8f8;
}

details.category[open] > summary h1 {
  margin-bottom: 0;
}

.chart-toggle {
  margin-top: 12px;
}

.chart-toggle summary {
  font-size: 0.8125rem;
  display: flex;
  align-items: center;
  gap: 4px;
  color: #555;
  width: 100%;
  padding: 6px 8px;
  border: 1px solid #ccc;
  cursor: pointer;
}

.chart-toggle .toggle-icon {
  margin-left: auto;
}

.chart-toggle[open] > summary .toggle-closed {
  display: none;
}

.chart-toggle[open] > summary .toggle-open {
  display: block;
}

summary {
  cursor: pointer;
  list-style: none;
  -webkit-user-select: none;
  user-select: none;
}

summary::-webkit-details-marker {
  display: none;
}

summary h1 {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
}

.toggle-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  margin-left: auto;
}

.toggle-open {
  display: none;
}

details.category[open] > summary .toggle-closed {
  display: none;
}

details.category[open] > summary .toggle-open {
  display: block;
}

h1 {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 0;
  letter-spacing: 0.05em;
}

details[open] > summary h1 {
  margin-bottom: 12px;
}

h2 {
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 10px;
  padding-bottom: 6px;
  border-bottom: 1px solid #ddd;
}

h2 small {
  margin-left: 0.5rem;
  font-size: 0.75rem;
  font-weight: 400;
  color: #555;
}

.play-status {
  display: inline-block;
  width: 0.5rem;
  height: 0.5rem;
  margin-right: 6px;
  border-radius: 50%;
  vertical-align: 0.05em;
}

.play-status-legend {
  display: flex;
  justify-content: flex-start;
  gap: 14px;
  margin-bottom: 12px;
  color: #555;
  font-size: 0.75rem;
}

.play-status-legend span {
  display: inline-flex;
  align-items: center;
}

.play-status-legend .play-status {
  margin-right: 5px;
}

.play-status-legend .play-status-legend-label {
  color: #222;
  font-weight: 600;
}

.play-status.frequent {
  background: #dcfce7;
  box-shadow: inset 0 0 0 1px #22c55e;
}

.play-status.occasional {
  background: #fef3c7;
  box-shadow: inset 0 0 0 1px #eab308;
}

.play-status.paused {
  background: #e5e7eb;
  box-shadow: inset 0 0 0 1px #9ca3af;
}

.card-updated {
  position: absolute;
  right: 14px;
  bottom: 8px;
  color: #888;
  font-size: 0.625rem;
  font-weight: 400;
}

.progress-table {
  width: 100%;
  overflow-x: auto;
}

.ff14-table {
  min-width: 440px;
}

.ff14-table th:first-child {
  width: 7rem;
}

.ff14-table td:first-child {
  text-align: left;
}

.ta-records {
  table-layout: auto;
}

.ta-records th,
.ta-records td {
  padding: 7px 4px;
  border: 0;
  border-bottom: 1px solid #e5e5e5;
}

.ta-records th {
  color: #888;
  font-size: 0.625rem;
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.ta-records th:first-child,
.ta-records td:first-child {
  text-align: left;
}

.ta-records th:last-child,
.ta-records td:last-child {
  text-align: right;
}

.ta-records td:last-child {
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.ta-records tbody tr:last-child td {
  border-bottom: 0;
}

.ta-records tbody tr:hover {
  background: #f8f8f8;
}

table {
  border-collapse: collapse;
  font-size: 0.8125rem;
  white-space: nowrap;
  width: 100%;
  table-layout: fixed;
}

th, td {
  padding: 4px 8px;
  text-align: center;
  border: 1px solid #ccc;
}

th {
  font-weight: 600;
  border-bottom: 1px solid #999;
}

td:first-child,
th:first-child {
  text-align: center;
  color: #555;
  font-size: 0.75rem;
}

.slash {
  background: linear-gradient(to top right, transparent calc(50% - 0.5px), #ccc calc(50% - 0.5px), #ccc calc(50% + 0.5px), transparent calc(50% + 0.5px));
}

.empty {
  color: #ccc;
}

.nc {
  background: #dbeafe;
}

.nb {
  background: #dcfce7;
}

.nn {
  background: #fef3c7;
}

.legend {
  display: flex;
  justify-content: flex-start;
  gap: 16px;
  font-size: 0.75rem;
  margin-top: 8px;
  color: #555;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 4px;
}

.legend-swatch {
  display: inline-block;
  width: 12px;
  height: 12px;
  border: 1px solid #ccc;
}

.achievement-history {
  margin-top: 24px;
}

.achievement-history ul {
  padding-left: 0;
  list-style: none;
}

.skill-row {
  margin-bottom: 16px;
}

.skill-label {
  font-size: 0.8125rem;
  margin-bottom: 4px;
  display: flex;
}

.skill-label .skill-name {
  width: 2.5em;
}

.skill-label .skill-value {
  font-variant-numeric: tabular-nums;
}

.progress-bar {
  width: 100%;
  height: 12px;
  background: #222;
  position: relative;
  border: 1px solid #222;
}

.progress-bar .target-line {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 1px;
  z-index: 1;
}

.progress-bar-fill {
  height: 100%;
  position: relative;
  z-index: 2;
}

.progress-bar-fill.white {
  background: #e8e8e8;
}

.progress-bar-fill.orange {
  background: #e87830;
}

.progress-bar-fill.orange-grad {
  background: linear-gradient(to top, #fff, #e87830);
}

.progress-bar-fill.yellow {
  background: #d4b800;
}

.progress-bar-fill.yellow-grad {
  background: linear-gradient(to top, #fff, #d4b800);
}

.progress-bar-fill.green {
  background: #3aad3a;
}

.progress-bar-fill.green-grad {
  background: linear-gradient(to top, #fff, #3aad3a);
}

.progress-bar-fill.blue {
  background: #3b82f6;
}

.progress-bar-fill.purple {
  background: #8b5cf6;
}

.progress-bar-fill.purple-grad {
  background: linear-gradient(to top, #fff, #8b5cf6);
}

.progress-bar-fill.red {
  background: #dc2626;
}

.progress-bar-fill.red-grad {
  background: linear-gradient(to top, #fff, #dc2626);
}

.progress-bar-fill.bronze {
  background:
    linear-gradient(-45deg,
      transparent 30%,
      rgba(255, 255, 255, 0.8) 32%,
      rgba(255, 255, 255, 0.8) 34%,
      transparent 36%,
      transparent 40%,
      rgba(255, 255, 255, 0.8) 42%,
      rgba(255, 255, 255, 0.8) 44%,
      transparent 46%
    ),
    #cd7f32;
}

.progress-bar-fill.silver {
  background:
    linear-gradient(-45deg,
      transparent 30%,
      rgba(255, 255, 255, 0.8) 32%,
      rgba(255, 255, 255, 0.8) 34%,
      transparent 36%,
      transparent 40%,
      rgba(255, 255, 255, 0.8) 42%,
      rgba(255, 255, 255, 0.8) 44%,
      transparent 46%
    ),
    #b0b0b0;
}

.progress-bar-fill.gold {
  background:
    linear-gradient(-45deg,
      transparent 30%,
      rgba(255, 255, 255, 0.8) 32%,
      rgba(255, 255, 255, 0.8) 34%,
      transparent 36%,
      transparent 40%,
      rgba(255, 255, 255, 0.8) 42%,
      rgba(255, 255, 255, 0.8) 44%,
      transparent 46%
    ),
    #daa520;
}

.progress-bar-fill.rainbow {
  background: linear-gradient(to right, #ff4444, #ff8833, #ffdd00, #44dd44, #44aaff, #aa66ff);
}

.progress-bar-fill.blue-grad {
  background: linear-gradient(to top, #fff, #3b82f6);
}

.inline-stats {
  font-size: 0.8125rem;
  color: #555;
}

@media (max-width: 480px) {
  section {
    padding: 12px 12px 28px;
  }

  .card-updated {
    right: 12px;
    bottom: 7px;
  }

  th, td {
    padding: 3px 4px;
    font-size: 0.6875rem;
  }

  .full {
    display: none;
  }
}

@media (max-width: 760px) {
  .page-shell {
    display: block;
    padding-top: 16px;
  }

  .sidebar {
    position: static;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #ddd;
  }

  .sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
  }

  .site-brand {
    margin-bottom: 0;
  }

  .menu-toggle {
    display: block;
    position: relative;
    flex: 0 0 40px;
    width: 40px;
    height: 40px;
    border: 0;
    background: transparent;
    cursor: pointer;
  }

  .menu-toggle span {
    display: block;
    position: absolute;
    left: 10px;
    width: 20px;
    height: 2px;
    background: #222;
    transition: transform 0.2s, opacity 0.2s;
  }

  .menu-toggle span:first-child {
    top: 13px;
  }

  .menu-toggle span:nth-child(2) {
    top: 19px;
  }

  .menu-toggle span:last-child {
    top: 25px;
  }

  .menu-toggle[aria-expanded="true"] span:first-child {
    transform: translateY(6px) rotate(45deg);
  }

  .menu-toggle[aria-expanded="true"] span:nth-child(2) {
    opacity: 0;
  }

  .menu-toggle[aria-expanded="true"] span:last-child {
    transform: translateY(-6px) rotate(-45deg);
  }

  .sidebar nav {
    display: none;
    padding-top: 12px;
  }

  .sidebar nav.is-open {
    display: grid;
  }
}

@media (min-width: 481px) {
  .short {
    display: none;
  }
}

.site-footer {
  margin-top: 48px;
  font-size: 0.75rem;
  color: #999;
}

.site-footer-meta,
.site-footer-legal {
  display: flex;
  flex-direction: column;
}

.site-footer-meta {
  align-items: flex-end;
  text-align: right;
}

.site-footer-legal {
  align-items: center;
  margin-top: 24px;
  text-align: center;
}

.site-footer a {
  color: inherit;
}
