/* 星の海 — a small personal homepage, with a little of 1995. */
:root {
  color-scheme: dark;
  --sumi: #e1e8ef;
  --usuzumi: #a5b8ce;
  --ai: #9ed9f4;
  --asagi: #a0d4ce;
  --fuji: #c2b3e6;
  --shu: #efb5a3;
  --kinari: #111f36;
  --keisen: #354d68;
  --gold: #e2ce91;
  --panel: #0e1c31;
}
* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
  scroll-padding-top: 1.5rem;
  scroll-padding-block: 1rem calc(6rem + env(safe-area-inset-bottom));
  -webkit-text-size-adjust: 100%;
}
html body {
  margin: 0;
  background: #080f20 !important;
  color: var(--sumi);
  font-family:
    "Zen Kaku Gothic New", "Hiragino Kaku Gothic ProN", Meiryo, sans-serif;
  line-height: 1.9;
  letter-spacing: 0.025em;
  background-image:
    radial-gradient(circle at 20px 32px, #778ca8 0 1px, transparent 1.3px),
    radial-gradient(circle at 92px 122px, #465b76 0 1px, transparent 1.3px),
    radial-gradient(circle at 159px 60px, #acb7c6 0 0.7px, transparent 1px) !important;
  background-size:
    211px 197px,
    263px 251px,
    307px 283px !important;
  font-size: 1rem;
  padding-bottom: calc(5.5rem + env(safe-area-inset-bottom));
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1,
h2,
h3,
.mincho {
  font-family: "Shippori Mincho B1", "Hiragino Mincho ProN", serif;
  font-weight: 500;
}
a {
  color: var(--ai);
  text-underline-offset: 4px;
}
a:hover {
  color: #fff0b7;
  text-decoration: underline;
}
button,
input,
textarea {
  font: inherit;
}
button,
a,
input,
textarea,
summary {
  touch-action: manipulation;
}
button {
  cursor: pointer;
}
button:disabled {
  cursor: wait;
  opacity: 0.55;
}
a,
button {
  transition:
    color 0.15s,
    background 0.15s;
}
:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 4px;
}
p,
li,
h1,
h2,
h3,
a {
  overflow-wrap: anywhere;
}
img,
svg,
video {
  max-width: 100%;
}
[hidden] {
  display: none !important;
}
.site-shell {
  position: relative;
  width: min(1060px, 100%);
  padding: 0 max(12px, env(safe-area-inset-right)) 0
    max(12px, env(safe-area-inset-left));
  margin: 12px auto 0;
}
.site-status {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: #9caec4;
  font: 10px/1.8 monospace;
  margin-bottom: 9px;
  font-size: 0.625rem;
  letter-spacing: 0;
  line-height: 1.6;
}
.online-light {
  display: inline-block;
  width: 5px;
  height: 5px;
  background: #c1dfb8;
  margin-right: 8px;
  box-shadow: 0 0 6px #c1dfb855;
}
.masthead {
  position: relative;
  text-align: center;
  border: 1px solid #49637f;
  background: linear-gradient(180deg, #172b48bb, #101d34ee);
  overflow: hidden;
  padding: 20px 12px;
}
.masthead::before,
.masthead::after {
  content: "✧";
  position: absolute;
  color: #c0d7e6;
  top: 45px;
  font-size: 32px;
}
.masthead::before {
  left: 6%;
  font-size: 20px;
}
.masthead::after {
  top: 73px;
  right: 6%;
  font-size: 16px;
}
.masthead .eyebrow {
  font: 10px/1.7 monospace;
  color: #b9cde1;
  letter-spacing: 0.12em;
  font-size: 0.625rem;
}
.masthead h1 {
  letter-spacing: 0.28em;
  padding-left: 0.28em;
  color: #f1eddc;
  text-shadow: 0 0 24px #adc5e033;
  font-size: clamp(2rem, 9vw, 3rem);
  line-height: 1.5;
}
.masthead .tagline {
  color: #bacbdf;
  font-size: 0.8125rem;
  letter-spacing: 0.03em;
  margin-top: 8px;
}
.masthead .since {
  margin-top: 12px;
  font: 10px/1.5 monospace;
  color: #a4b7ce;
  font-size: 0.625rem;
  letter-spacing: 0.04em;
}
.masthead .since span {
  color: var(--gold);
}
.retro-nav {
  display: flex;
  align-items: stretch;
  flex-wrap: wrap;
  gap: 0;
  border: 1px solid #49637f;
  border-top: 0;
  background: #14243b;
  padding: 4px;
  justify-content: space-between;
}
.retro-nav > a {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 44px;
  font: 12px monospace;
  text-decoration: none;
  flex: 1 1 0;
  min-width: 0;
  padding: 8px 2px;
  font-size: 0.75rem;
  letter-spacing: 0.02em;
}
.retro-nav > a + a {
  position: relative;
}
.retro-nav > a + a::before {
  content: "|";
  position: absolute;
  left: 0;
  color: #526782;
}
.retro-nav > a:hover {
  background: #243b54;
  color: var(--gold);
}
.nav-tools {
  display: flex;
  align-items: center;
  width: 100%;
  justify-content: space-between;
  gap: 4px;
  border-top: 1px dotted var(--keisen);
  margin-left: 0;
  padding-top: 4px;
}
.nav-tools button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
  color: #b4c8df;
  min-width: 44px;
  min-height: 44px;
  flex: 1 1 0;
  gap: 6px;
}
.nav-tools svg {
  width: 16px;
  height: 16px;
}
.retro-mobile {
  width: 100%;
  border-top: 1px dotted var(--keisen);
  font-size: 0.9375rem;
}
.menu-row {
  display: flex;
  align-items: center;
  border-bottom: 1px dotted var(--keisen);
  min-height: 48px;
  padding: 10px 12px;
}
.welcome-strip {
  display: flex;
  align-items: center;
  background: #0c192c;
  border: 1px solid var(--keisen);
  color: #b9c9da;
  margin: 12px 0 16px;
  padding: 6px 8px;
  gap: 8px;
  font-size: 0.8125rem;
}
.welcome-strip > span {
  font: 10px monospace;
  color: var(--gold);
  white-space: nowrap;
  border-right: 1px solid var(--keisen);
  font-size: 0.6875rem;
  padding-right: 8px;
}
.marquee-viewport {
  overflow: hidden;
  flex: 1;
  min-width: 0;
}
.marquee-text {
  display: block;
  width: max-content;
  animation: welcome-scroll 28s linear infinite;
}
.welcome-strip:hover .marquee-text,
.welcome-strip:focus-within .marquee-text {
  animation-play-state: paused;
}
.ticker-toggle {
  font: 10px monospace;
  color: #b9c9da;
  border: 1px solid var(--keisen);
  padding: 1px 7px;
  min-width: 44px;
  min-height: 44px;
  font-size: 0.875rem;
  flex: 0 0 auto;
}
.ticker-paused .marquee-text {
  animation-play-state: paused;
}
@keyframes welcome-scroll {
  from {
    transform: translateX(14%);
  }
  to {
    transform: translateX(-100%);
  }
}
.retro-grid {
  grid-template-columns: 196px minmax(0, 1fr);
  gap: 22px;
  align-items: start;
  display: block;
}
.sidebar {
  gap: 16px;
  display: none;
}
.side-box {
  border: 1px solid var(--keisen);
  background: #0e1b2ef5;
}
.window-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font: 11px/1.6 monospace;
  letter-spacing: 0.08em;
  color: #b9d2ea;
  background: #20334c;
  border-bottom: 1px solid #415b76;
  padding: 7px 11px;
  font-size: 0.6875rem;
  gap: 8px;
}
.window-dots {
  font-size: 9px;
  letter-spacing: 4px;
  color: #8ca6c1;
  flex-shrink: 0;
}
.side-content {
  padding: 14px;
}
.side-menu {
  list-style: none;
  padding: 5px 12px;
  margin: 0;
}
.side-menu a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 0;
  border-bottom: 1px dotted #35485f;
  font-size: 12px;
}
.side-menu li:last-child a {
  border: 0;
}
.side-menu .symbol {
  color: #d4c48e;
  font-size: 10px;
  width: 16px;
  text-align: center;
}
.side-note {
  font-size: 11px;
  color: #a9bcd1;
  line-height: 2;
}
.side-note strong {
  font-weight: 500;
  color: #dce5ee;
}
.side-note a {
  text-decoration: underline;
}
.site-banner {
  width: 88px;
  height: 31px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: serif;
  font-size: 13px;
  letter-spacing: 2px;
  color: #e7e3c8;
  background: #17263e url("assets/starlit-sea.svg") center 48% / cover;
  border: 1px solid #85a0ba;
  box-shadow: inset 0 0 0 1px #0b172b;
}
.banner-caption {
  font: 9px/1.8 monospace;
  color: #9cafc5;
  margin-top: 8px;
}
.mini-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}
.mini-badges span {
  font: 9px/1.3 monospace;
  border: 1px solid #52708b;
  padding: 3px 5px;
  color: #c9dce6;
  background: #132a3a;
}
.side-footer {
  text-align: center;
  color: #91a7c0;
  font: 10px/1.8 monospace;
  padding: 5px;
}
.retro-content {
  min-width: 0;
}
#hero {
  border: 1px solid #486681;
  background: var(--panel);
  margin: 0 0 18px;
  color: var(--sumi);
  scroll-margin-top: 16px;
}
.home-hero {
  display: grid;
  align-items: center;
  grid-template-columns: minmax(0, 1fr);
  gap: 20px;
  padding: 22px 16px;
}
.hero-eyebrow {
  color: var(--gold);
  font: 10px/1.7 monospace;
  letter-spacing: 0.18em;
  font-size: 0.6875rem;
  margin-bottom: 12px;
}
.hero-heading h2 {
  margin-bottom: 13px;
  font-size: clamp(1.3rem, 5.6vw, 1.65rem);
  letter-spacing: 0.04em;
  line-height: 1.75;
}
.hero-description {
  color: #b3c5d9;
  font-size: 1rem;
  line-height: 1.95;
}
.hero-art {
  margin: 0;
  border: 1px solid #3e5873;
  background: #0a1428;
  padding: 5px;
  width: min(100%, 176px);
  justify-self: center;
}
.hero-art img {
  width: 100%;
  height: auto;
  aspect-ratio: 1/1;
  display: block;
  image-rendering: pixelated;
}
.hero-art figcaption {
  font: 9px/1.8 monospace;
  text-align: center;
  color: #a1b7ce;
  padding: 6px 0 1px;
  font-size: 0.625rem;
  letter-spacing: 0;
}
.hero-actions {
  flex-wrap: wrap;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
  margin-top: 20px;
}
.retro-button,
.btn-line {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  border: 1px solid #7790a8;
  box-shadow:
    inset 1px 1px #aec2d022,
    inset -1px -1px #0006;
  background: #20344a;
  color: #cee4f1;
  text-decoration: none;
  min-height: 48px;
  font-size: 0.9375rem;
  padding: 10px 14px;
}
.retro-button:hover,
.btn-line:hover {
  background: #2c455f;
  text-decoration: none;
  color: #fff0b7;
}
.retro-button.primary {
  background: #c6d7dc;
  color: #152d41;
  border-color: #e3eced;
}
.hero-from-video {
  padding: 12px 16px;
  border: 1px dotted #67839c;
  margin: 0 16px 20px;
  font-size: 0.9375rem;
}
.hero-from-video ul {
  margin-top: 8px;
}
.hero-from-video a {
  padding: 5px 0;
  display: flex;
  align-items: center;
  min-height: 44px;
}
.hero-from-video-title {
  color: var(--gold);
}
.counter-box {
  text-align: center;
  border-top: 1px dotted #48617e;
  padding: 17px 0;
  color: #b3c7dc;
  margin: 0 16px;
  font-size: 0.8125rem;
}
.counter-line {
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  justify-items: center;
  gap: 6px;
}
.counter-digits {
  display: inline-flex;
  font:
    bold 21px/1.5 "Courier New",
    monospace;
  letter-spacing: 0;
  color: #e2d8a5;
  font-size: clamp(1.125rem, 5vw, 1.5rem);
  gap: 2px;
  max-width: 100%;
  flex-wrap: wrap;
  justify-content: center;
}
.counter-digits span {
  display: block;
  background: #030b14;
  border: 1px solid #52647a;
  box-shadow: inset 0 1px 3px #000;
  padding: 0 4px;
}
.counter-note {
  margin-top: 9px;
  color: #a5b6cb;
  font-size: 0.8125rem;
  line-height: 1.8;
}
.counter-note a {
  text-decoration: underline;
}
.kiriban-hit {
  color: var(--gold);
  margin-top: 7px;
}
.star-rule {
  text-align: center;
  color: #8199b7;
  font-size: 10px;
  letter-spacing: 14px;
  margin: 17px 0 19px;
}
.news-box {
  border: 1px solid var(--keisen);
  background: var(--panel);
  margin-bottom: 18px;
}
.news-list {
  list-style: none;
  margin: 0;
  padding: 8px 16px;
}
.news-list li {
  align-items: baseline;
  border-bottom: 1px dotted #33455b;
  display: grid;
  gap: 4px;
  font-size: 0.9375rem;
  padding: 12px 0;
}
.news-list li:last-child {
  border: 0;
}
.news-list time {
  font: 10px monospace;
  white-space: nowrap;
  color: #a9bdd3;
  font-size: 0.75rem;
}
.new-badge {
  font: bold 9px/1.3 monospace;
  letter-spacing: 0;
  background: #d7ca92;
  color: #1a2538;
  padding: 2px 4px;
  margin-left: 6px;
  display: inline-block;
}
.last-update {
  font: 9px monospace;
  color: #bfd0e2;
  display: none;
}
.retro-content > section:not(#hero) {
  padding: 0 !important;
  margin: 0 0 18px;
  overflow: visible;
}
.retro-content > section > .glass-panel {
  max-width: none;
  padding: 22px 16px !important;
}
.glass-panel,
.glass {
  background: var(--panel);
  border: 1px solid var(--keisen);
  border-radius: 0 !important;
  backdrop-filter: none;
  box-shadow: none;
}
.glass-panel .glass {
  background: #132238;
}
.glass:hover {
  border-color: #718aa2;
}
.sec-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.sec-no {
  font: 10px/1.5 monospace;
  color: var(--gold);
  letter-spacing: 0.08em;
}
.sec-title {
  line-height: 1.6;
  color: #e4ebf3;
  font-size: 1.25rem;
  min-width: 0;
}
.sec-rule {
  height: 1px;
  background: var(--keisen);
  flex: 1;
  min-width: 20px;
}
.lead,
.welcome-lead {
  color: var(--usuzumi);
  font-size: 1rem;
  line-height: 1.95;
}
.lead {
  margin-bottom: 24px !important;
}
.num-mincho {
  font: 12px/1.7 monospace;
  color: var(--asagi);
}
.rule-card {
  padding: 18px 0 !important;
  border: 0 !important;
  border-top: 1px dotted var(--keisen) !important;
  background: transparent !important;
}
.rule-card h3 {
  color: #dbe8f5;
}
.profile-intro {
  display: grid;
  align-items: center;
  margin-bottom: 18px;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 12px;
}
.profile-avatar {
  display: grid;
  place-items: center;
  color: var(--gold);
  background: #172b45;
  border: 1px solid #5a718b;
  font: 30px serif;
  width: 48px;
  height: 48px;
}
.profile-intro h3 {
  color: #e4e8ef;
  font-size: 1.25rem;
}
.profile-intro p {
  color: var(--usuzumi);
  font-size: 0.875rem;
}
.profile-bio {
  white-space: pre-wrap;
  color: #bed0e1;
  font-size: 1rem;
  line-height: 2;
}
.profile-facts {
  margin-top: 18px;
  border-top: 1px dotted var(--keisen);
}
.profile-facts > div {
  display: grid;
  border-bottom: 1px dotted var(--keisen);
  grid-template-columns: minmax(0, 1fr);
  gap: 4px;
  font-size: 0.9375rem;
  padding: 12px 0;
}
.profile-facts dt {
  color: #90a8c4;
}
.profile-facts dd {
  margin: 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.profile-message {
  color: var(--gold);
  margin-top: 14px;
  font-size: 0.875rem;
}
.profile-edit {
  margin-left: auto;
  font-size: 0.875rem;
}
.profile-status {
  color: #efb5a3;
  margin-top: 12px;
  font-size: 0.875rem;
}
.visit-paths {
  display: grid;
  gap: 10px;
  margin: 18px 0;
  grid-template-columns: minmax(0, 1fr);
}
.visit-path {
  padding: 14px;
  border: 1px solid var(--keisen);
  background: #15263c;
}
.path-top {
  display: flex;
  justify-content: space-between;
  font: 9px monospace;
  color: var(--gold);
  margin-bottom: 10px;
}
.visit-path h3 {
  margin-bottom: 6px;
  font-size: 1rem;
}
.visit-path p {
  color: var(--usuzumi);
  font-size: 0.9375rem;
}
.path-destination {
  display: block;
  margin-top: 12px;
  font-size: 0.875rem;
}
.welcome-reassurance {
  display: grid;
  color: var(--usuzumi);
  font-size: 0.875rem;
}
.welcome-guide {
  margin-top: 18px;
  font-size: 0.9375rem;
}
.welcome-guide summary {
  cursor: pointer;
  padding: 10px 0;
  min-height: 44px;
}
.welcome-guide .grid {
  gap: 16px;
}
.tel-row {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 10px;
  border-top: 1px dotted var(--keisen);
  padding: 14px 0;
}
.tel-note {
  display: block;
  color: var(--usuzumi);
  font-size: 0.8125rem;
}
.links-grid {
  display: grid;
  gap: 0;
}
.link-item {
  display: grid;
  align-items: center;
  padding: 16px 0;
  border-top: 1px dotted var(--keisen);
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
}
.link-label {
  display: grid;
  place-items: center;
  width: 88px;
  height: 31px;
  border: 1px solid #89a3b6;
  background: #20364b;
  color: #d3e3e9;
  font: 10px monospace;
  letter-spacing: 1px;
}
.link-item h3 {
  font-size: 1rem;
}
.link-item p {
  color: var(--usuzumi);
  margin-top: 4px;
  font-size: 0.9375rem;
}
.banner-guide {
  margin-top: 16px;
  padding: 14px;
  border: 1px dashed var(--keisen);
  color: var(--usuzumi);
  font-size: 0.875rem;
}
.banner-guide code {
  display: block;
  margin-top: 6px;
  overflow-wrap: anywhere;
  color: #c6d9e9;
}
.site-footer {
  max-width: 1060px;
  margin: 24px auto 0;
  text-align: center;
  border-top: 1px solid var(--keisen);
  position: relative;
  color: #9ab0c8;
  padding: 24px max(16px, env(safe-area-inset-right)) 24px
    max(16px, env(safe-area-inset-left));
  font-size: 0.8125rem;
}
.footer-nav {
  flex-wrap: wrap;
  justify-content: center;
  font: 11px monospace;
  margin-bottom: 16px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px;
  font-size: 0.8125rem;
}
.site-footer p + p {
  margin-top: 10px;
}
.footer-star {
  color: var(--gold);
  letter-spacing: 12px;
  margin: 14px 0;
}
.footer-admin {
  text-decoration: underline;
  color: #a6bdd5;
  min-height: 44px;
  font-size: 0.875rem;
}
.text-slate-800,
.text-slate-700 {
  color: #dce7f2 !important;
}
.text-slate-600 {
  color: #bacbdd !important;
}
.text-slate-500,
.text-slate-400 {
  color: #a3b8cf !important;
}
.text-aurora-blue {
  color: var(--ai) !important;
}
.text-aurora-teal {
  color: var(--asagi) !important;
}
.text-red-500 {
  color: #ffb5b1 !important;
}
.border-slate-200 {
  border-color: var(--keisen) !important;
}
.text-aurora-violet {
  color: var(--fuji) !important;
}
input:not([type="checkbox"]),
textarea,
select {
  background: #0a1528 !important;
  border: 1px solid #526e88 !important;
  color: #e2ebf4 !important;
  border-radius: 0 !important;
  padding: 10px 12px;
  font-size: 1rem !important;
  min-width: 0;
  min-height: 48px;
}
input::placeholder,
textarea::placeholder {
  color: #8fa4bd !important;
}
input[type="checkbox"] {
  accent-color: #9ed9f4;
}
.glass .rounded-xl,
.glass .rounded-2xl {
  border-radius: 2px;
}
.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.breathe-circle {
  border: 1px solid #719cbb;
  background: radial-gradient(circle, #34567155, #15293f);
  animation: breathe 16s ease-in-out infinite;
}
@keyframes breathe {
  0%,
  100% {
    transform: scale(0.62);
  }
  25%,
  50% {
    transform: scale(1);
  }
  75% {
    transform: scale(0.62);
  }
}
.mood-btn {
  border-radius: 2px !important;
}
.mood-btn.selected {
  border-color: #d2c692 !important;
  background: #334657 !important;
}
.mood-btn:hover {
  background: #203953;
}
#messages-container .glass {
  background: #102238;
}
#messages-container .rounded-xl {
  border-radius: 0;
}
#bulletin .glass h3 {
  color: var(--gold) !important;
}
#sos-btn {
  background: #172b40;
  color: #efc1ac !important;
  border: 1px solid #8c807c !important;
  position: static;
  font-size: 0.9375rem;
  min-height: 44px;
  min-width: 0;
  right: auto;
  bottom: auto;
  flex: 1 1 0;
  justify-content: center;
}
.retro-dialog {
  padding: 0;
  background: #101f35;
  color: var(--sumi);
  border: 1px solid #7b98b5;
  box-shadow: 8px 8px #03091588;
  overflow: auto;
  width: min(540px, calc(100% - 24px));
  max-height: calc(
    100dvh - 24px - env(safe-area-inset-top) - env(safe-area-inset-bottom)
  );
  overscroll-behavior: contain;
  scroll-padding-block: 72px 90px;
  margin: auto auto max(12px, env(safe-area-inset-bottom));
}
.retro-dialog::backdrop {
  background: #030916c9;
}
.dialog-title {
  font: 12px monospace;
  color: #d1e3f2;
  background: #243c57;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  position: sticky;
  top: 0;
  z-index: 2;
  font-size: 0.8125rem;
  gap: 12px;
}
.dialog-title button {
  font-size: 19px;
  border: 1px solid #7a91a8;
  min-width: 44px;
  min-height: 44px;
  flex-shrink: 0;
}
.dialog-body {
  padding: 20px 16px;
}
.dialog-body > p {
  color: var(--usuzumi);
  margin-bottom: 18px;
  font-size: 0.9375rem;
}
.admin-actions {
  display: grid;
  gap: 10px;
}
.admin-actions .retro-button {
  justify-content: flex-start;
  min-height: 48px;
}
.admin-tools {
  flex-wrap: wrap;
  padding: 18px 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  font-size: 0.9375rem;
  gap: 4px;
}
.profile-form {
  display: grid;
  gap: 14px;
}
.profile-form label {
  display: grid;
  gap: 5px;
  color: #bcd0e3;
  font-size: 0.9375rem;
}
.profile-form small {
  color: var(--usuzumi);
  font-size: 0.8125rem;
}
.profile-form input,
.profile-form textarea {
  width: 100%;
  font-size: 1rem;
}
.dialog-actions {
  justify-content: flex-end;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
}
.save-notice {
  margin: 0;
  font-size: 12px;
  color: var(--gold);
}
.dialog-body .save-notice:empty {
  display: none;
}
.profile-form textarea {
  resize: vertical;
}
.modal-scroll {
  max-height: calc(
    100dvh - 24px - env(safe-area-inset-top) - env(safe-area-inset-bottom)
  );
  overscroll-behavior: contain;
}
.tate {
  writing-mode: vertical-rl;
}
html.large-text {
  font-size: 115%;
}
html.large-text body {
  font-size: 1rem;
}
html.large-text .hero-description,
html.large-text .profile-bio,
html.large-text .lead,
html.large-text .text-sm,
html.large-text .text-xs {
  font-size: 1rem !important;
}
html.reduce-motion {
  scroll-behavior: auto;
}
html.reduce-motion *,
html.reduce-motion *::before,
html.reduce-motion *::after {
  animation: none !important;
  transition: none !important;
}
.ticker-toggle[aria-pressed="true"] {
  color: var(--gold);
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
.site-status span:last-child {
  display: none;
}
.nav-tool-label {
  font-size: 0.75rem;
}
.tel-row > .mincho:first-child {
  flex-basis: 100%;
}
.footer-nav a {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
}
.admin-tools a {
  display: flex;
  align-items: center;
  min-height: 44px;
}
/* Mobile controls and readable text stay usable before any wider-screen rules. */
.quick-actions {
  position: fixed;
  inset: auto 0 0;
  z-index: 100;
  display: flex;
  gap: 10px;
  padding: 8px max(12px, env(safe-area-inset-right))
    max(8px, env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left));
  background: #0b182bf5;
  border-top: 1px solid var(--keisen);
}
.quick-actions > a {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1 1 0;
  min-height: 44px;
  font-size: 0.875rem;
  border: 1px solid var(--keisen);
}
button,
input,
textarea,
a {
  scroll-margin-block: 5rem 7rem;
}
.retro-content .text-xs {
  font-size: 0.875rem;
}
.retro-content .text-sm,
.retro-content .line-clamp-2 {
  font-size: 1rem;
}
.retro-content .rule-card p:not(.num-mincho),
.retro-content .rule-card h3 {
  font-size: 0.9375rem !important;
}
.retro-content .mb-12 {
  margin-bottom: 24px;
}
.retro-content .mb-10 {
  margin-bottom: 22px;
}
.retro-content .mb-8 {
  margin-bottom: 20px;
}
.section-toolbar {
  flex-wrap: wrap;
  align-items: center;
}
.section-toolbar .sec-head {
  flex: 1 1 100%;
}
#new-post-btn,
#upload-track-btn {
  min-height: 48px;
}
#message-form > div,
#post-form > div {
  flex-wrap: wrap;
  gap: 12px;
}
#message-form button[type="submit"],
#post-form button[type="submit"] {
  width: 100%;
}
#bulletin .glass.p-6,
#coping .glass.p-8,
.support-section > .glass-panel {
  padding: 20px 16px;
}
#messages-container button {
  min-width: 44px;
  min-height: 44px;
}
#messages-container .self-start {
  flex-direction: column;
}
.mood-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.mood-options .mood-btn {
  max-width: none;
  padding: 14px 8px;
  min-height: 72px;
}
.mood-btn span:last-child {
  font-size: 0.875rem;
  white-space: normal;
}
#coping .grid {
  grid-template-columns: minmax(0, 1fr);
}
#coping .grid > * {
  grid-column: auto;
  min-width: 0;
}
[id$="-modal"] > .relative {
  max-height: calc(
    100dvh - 24px - env(safe-area-inset-top) - env(safe-area-inset-bottom)
  );
  overflow-y: auto;
  overscroll-behavior: contain;
  margin-bottom: env(safe-area-inset-bottom);
  padding: 24px 16px;
  scroll-padding-block: 4rem;
}
[id$="-modal"] > .relative > h2 {
  padding-right: 40px;
}
[id$="-modal"] > .relative > button.absolute {
  min-width: 44px;
  min-height: 44px;
  display: grid;
  place-items: center;
  top: 8px;
  right: 8px;
}
#post-form {
  flex: 0 0 auto;
}
#post-content {
  min-height: 10rem;
}
#x-share-text {
  min-height: 8rem;
  width: 100%;
}
#post-modal > .relative,
#x-share-modal > .relative {
  display: block;
}
#post-modal > .relative > form {
  display: flex;
}
/* Diary editing (admin only). */
.post-edit-note {
  color: var(--usuzumi);
  font-size: 0.875rem;
  line-height: 1.8;
  margin: -12px 0 16px;
}
#post-saved {
  margin: -8px 0 18px;
}
#post-saved:empty {
  display: none;
}
#posts-container .post-admin-actions {
  flex-direction: column;
}
#posts-container .post-admin-actions button {
  display: grid;
  place-items: center;
  min-width: 44px;
  min-height: 44px;
}
.detail-actions {
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px dotted var(--keisen);
  display: grid;
  gap: 10px;
}
.detail-share,
.detail-admin {
  display: grid;
  gap: 6px;
}
.detail-admin[hidden] {
  display: none;
}
.detail-link-note {
  color: var(--gold);
  font-size: 0.875rem;
  overflow-wrap: anywhere;
}
.detail-link-note:empty {
  display: none;
}
/* Monthly diary archive (過去ログ). */
.diary-archive {
  display: grid;
  gap: 6px;
  margin: 0 0 18px;
  color: #bcd0e3;
  font-size: 0.9375rem;
}
.diary-archive[hidden] {
  display: none;
}
.diary-archive select {
  width: 100%;
}
.diary-archive .profile-status:empty {
  display: none;
}
.month-head {
  display: grid;
  gap: 10px;
  padding-bottom: 14px;
  color: #dbe8f5;
  font-size: 1rem;
}
/* Small tablets and wider phones get adjacent actions, without a sidebar. */
@media (min-width: 480px) {
  .site-shell {
    padding-inline: 20px;
  }
  .hero-actions,
  .dialog-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .counter-line {
    display: flex;
  }
  .profile-facts > div {
    grid-template-columns: 100px minmax(0, 1fr);
    gap: 12px;
  }
  .link-item {
    grid-template-columns: 100px minmax(0, 1fr);
    gap: 16px;
  }
  .mood-options {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .footer-nav {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
  .news-list li {
    grid-template-columns: auto minmax(0, 1fr);
    gap: 12px;
  }
}
@media (min-width: 640px) {
  .site-shell {
    margin-top: 24px;
  }
  .masthead {
    padding: 28px 16px;
  }
  .masthead::before {
    left: 14%;
    font-size: 32px;
  }
  .masthead::after {
    right: 14%;
    font-size: 20px;
  }
  .nav-tools {
    width: auto;
    border-top: 0;
    padding-top: 0;
    margin-left: 8px;
  }
  .nav-tools button {
    flex: 0 0 auto;
  }
  .nav-tool-label {
    display: none;
  }
  .retro-mobile {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
  .retro-mobile.hidden {
    display: none;
  }
  .home-hero {
    grid-template-columns: minmax(0, 1fr) 176px;
    padding: 24px;
  }
  .hero-actions {
    display: flex;
  }
  .hero-art {
    width: 100%;
  }
  .counter-box,
  .hero-from-video {
    margin-inline: 24px;
  }
  .retro-content > section > .glass-panel {
    padding: 24px !important;
  }
  .visit-paths {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .mood-options {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
  .section-toolbar .sec-head {
    flex: 1 1 auto;
  }
  .last-update {
    display: block;
  }
  .retro-dialog {
    margin: auto;
  }
  .dialog-body {
    padding: 24px;
  }
  .admin-tools {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .tel-row > .mincho:first-child {
    flex-basis: auto;
  }
  #message-form button[type="submit"],
  #post-form button[type="submit"] {
    width: auto;
    margin-left: auto;
  }
  #coping .grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  #coping .grid > :last-child {
    grid-column: 1/-1;
  }
  #messages-container .self-start,
  #posts-container .post-admin-actions {
    flex-direction: row;
  }
  .detail-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
  }
  .diary-archive {
    grid-template-columns: auto minmax(0, 18rem);
    justify-content: start;
    align-items: center;
    gap: 12px;
  }
  .diary-archive .profile-status {
    grid-column: 1 / -1;
  }
  .month-head {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
  }
  [id$="-modal"] > .relative {
    padding: 28px;
  }
}
/* The familiar sidebar appears only when there is room for a readable main column. */
@media (min-width: 1024px) {
  html body {
    padding-bottom: 0;
  }
  .site-shell {
    padding: 0;
    width: min(1060px, calc(100% - 48px));
  }
  .site-status span:last-child {
    display: inline;
  }
  .retro-grid {
    display: grid;
    grid-template-columns: 196px minmax(0, 1fr);
    gap: 22px;
  }
  .sidebar {
    display: grid;
  }
  .retro-nav {
    padding: 4px 12px;
  }
  .retro-nav > a {
    flex: 0 1 auto;
    padding-inline: 24px;
  }
  .nav-tools {
    margin-left: auto;
  }
  .nav-tool-label {
    display: inline;
  }
  .nav-tools button {
    padding-inline: 12px;
  }
  #mobile-menu-btn,
  #mobile-menu {
    display: none;
  }
  .home-hero {
    grid-template-columns: minmax(0, 1fr) 200px;
  }
  .quick-actions {
    inset: auto max(16px, env(safe-area-inset-right))
      max(16px, env(safe-area-inset-bottom)) auto;
    width: auto;
    padding: 0;
    border: 0;
    background: transparent;
  }
  .quick-actions > a,
  #sos-btn {
    flex: 0 0 auto;
    padding-inline: 16px;
    background: #172b40;
  }
  .site-footer {
    padding-bottom: 88px;
  }
}
/* Modal panels receive focus when opened (for keyboard and screen reader users); no ring on the panel itself. */
[id$="-modal"] > .relative:focus {
  outline: none;
}
