/* ==== ページと一緒にスクロールするヘッダー ==== */
.app-header {
  position: relative;
  z-index: 1000;
  background-color: #f8c9cf;
  border-bottom: 3px solid #f1a7b3;
  padding: 4px 24px;
  color: #222;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
.header-main-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.header-left {
  display: flex;
  align-items: center;
  gap: 8px;
}
.header-left h1,
.app-brand {
  margin: 0;
  font-size: 1.125rem;
  letter-spacing: 0.03em;
  color: inherit;
  font-weight: 700;
  line-height: normal;
  text-decoration: none;
}
.header-left .sub {
  font-size: 0.75rem;
  opacity: 0.8;
  margin-top: 2px;
}
.home-header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
  margin-left: auto;
  max-width: 100%;
}
.home-header-action {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  gap: 4px;
  min-width: 64px;
  min-height: 56px;
  padding: 6px 8px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #374151;
  font: inherit;
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1.3;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
}
.home-header-action::before {
  content: "";
  width: 26px;
  height: 26px;
  flex-shrink: 0;
  background: currentColor;
  -webkit-mask: var(--home-action-icon) center / contain no-repeat;
  mask: var(--home-action-icon) center / contain no-repeat;
}
.home-header-action--usage {
  --home-action-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 11v6'/%3E%3Ccircle cx='12' cy='7' r='1' fill='black' stroke='none'/%3E%3C/svg%3E");
}
.home-header-action--sample {
  --home-action-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 3H5v18h14V8zM14 3v5h5M8 12h8M8 16h6'/%3E%3C/svg%3E");
}
.home-header-action--tutorial {
  --home-action-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m8 8 5 13 2-6 6-2L8 8zM4 4l1 1M8 2v2M2 8h2'/%3E%3C/svg%3E");
}
.home-header-action--home {
  --home-action-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m3 10 9-7 9 7M5 9v12h14V9M9 21v-8h6v8'/%3E%3C/svg%3E");
}
.home-header-action--auth {
  --home-action-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round'%3E%3Ccircle cx='12' cy='7' r='4'/%3E%3Cpath d='M4 21v-2a8 8 0 0 1 16 0v2'/%3E%3C/svg%3E");
}
.home-header-action--settings {
  --home-action-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m9 3 .7-2h4.6l.7 2 1.7 1 2.1-.4 2.3 4-1.4 1.6v2l1.4 1.6-2.3 4-2.1-.4-1.7 1-.7 2H9.7l-.7-2-1.7-1-2.1.4-2.3-4 1.4-1.6v-2L2.9 7.6l2.3-4 2.1.4z' transform='translate(0 2)'/%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3C/svg%3E");
}
.home-header-action:hover {
  background: #ffffff66;
  color: #8a354c;
}
.home-header-action:focus-visible {
  outline: 3px solid #a75066;
  outline-offset: 2px;
}
.app-brand:focus-visible {
  outline: 3px solid #a75066;
  outline-offset: 4px;
  border-radius: 3px;
}
@media (max-width: 640px) {
  .app-header .header-main-row { flex-wrap: wrap; gap: 8px; }
}

.home-header-action--ranking {
  --home-action-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m3 6 4 4 5-6 5 6 4-4-2 12H5L3 6zM5 21h14'/%3E%3C/svg%3E");
}
.home-header-action--ranking::before { background: #a16207; }
.home-header-action--history {
  --home-action-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 10a9 9 0 1 1 2 8M3 4v6h6M12 7v5l3 2'/%3E%3C/svg%3E");
}
