.sabage-hero .page-hero-inner {
  width: min(1120px, calc(100% - 32px));
}

.sabage-lead {
  max-width: 760px;
  margin: 18px 0 0;
  color: #40505f;
  font-size: 1.08rem;
}

.sabage-page {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 36px 0 72px;
}

.sabage-notice {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid #cfdde6;
  border-radius: 8px;
  background: #f7fbfd;
  padding: 14px 16px;
}

.sabage-toolbar {
  display: grid;
  gap: 14px;
  margin: 24px 0;
}

.sabage-region-nav,
.sabage-months {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.sabage-region-nav a,
.month-button,
.access-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border: 1px solid #c8d8e4;
  border-radius: 999px;
  background: white;
  padding: 7px 12px;
  color: #24465c;
  font: inherit;
  font-size: 0.88rem;
  font-weight: 800;
}

.access-link img {
  width: 20px;
  height: 20px;
  object-fit: contain;
}

.month-button {
  cursor: pointer;
}

.sabage-months span {
  align-self: center;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 800;
}

.sabage-note {
  margin: 0;
  color: #b03434;
  font-weight: 800;
}

.calendar-note {
  margin: 0;
  border-bottom: 1px solid #d7e2ea;
  background: #f7fbfd;
  padding: 10px 12px;
  color: #40505f;
  font-size: 0.9rem;
  font-weight: 700;
}

.fortune-widget {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  margin: 28px 0 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
}

.fortune-widget p {
  margin: 4px 0 0;
  color: var(--muted);
}

.fortune-controls {
  display: flex;
  gap: 8px;
}

.fortune-controls input {
  min-width: 180px;
  min-height: 40px;
  padding: 8px 10px;
}

.fortune-controls button {
  border: 1px solid var(--brand);
  border-radius: 6px;
  background: var(--brand);
  padding: 8px 14px;
  color: white;
  font-weight: 800;
  cursor: pointer;
}

.fortune-result {
  grid-column: 1 / -1;
  border-top: 1px solid #edf2f5;
  padding-top: 12px;
}

:global(.fortune-meter) {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: #e7eef3;
  margin: 8px 0;
}

:global(.fortune-meter span) {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #69b86f, #1c9ab8);
}

.sabage-comments {
  margin: 0 0 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  padding: 14px;
}

.sabage-comments-latest {
  margin: 28px 0 42px;
  background: #fbfdff;
}

.sabage-comments-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.sabage-comments-head h2,
.sabage-comments-head h3 {
  margin: 0;
  font-size: 1.05rem;
}

.sabage-comments-head span {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 800;
}

.comment-form {
  display: grid;
  grid-template-columns: minmax(120px, 220px) minmax(0, 1fr) auto;
  gap: 8px;
  align-items: end;
  margin-bottom: 8px;
}

.comment-form label {
  gap: 3px;
  color: #435464;
  font-size: 0.8rem;
}

.comment-form input,
.comment-form textarea {
  min-height: 34px;
  padding: 6px 8px;
  font-size: 0.9rem;
}

.comment-form textarea {
  min-height: 34px;
  resize: vertical;
}

.comment-form button {
  min-height: 34px;
  border: 1px solid var(--brand);
  border-radius: 6px;
  background: var(--brand);
  padding: 6px 12px;
  color: white;
  font: inherit;
  font-size: 0.86rem;
  font-weight: 800;
  cursor: pointer;
}

.comment-error {
  min-height: 1.4em;
  margin: 0 0 6px;
  color: #b03434;
  font-size: 0.84rem;
  font-weight: 800;
}

.comment-items {
  display: grid;
  max-height: 260px;
  overflow-y: auto;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.sabage-comments-latest .comment-items {
  max-height: 180px;
}

.comment-items li {
  border: 1px solid #e0e8ee;
  border-radius: 6px;
  background: #f7fbfd;
  padding: 8px 10px;
}

.comment-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 10px;
  align-items: center;
  color: var(--muted);
  font-size: 0.78rem;
}

.comment-meta strong {
  color: #2b3845;
}

.comment-meta span {
  border-radius: 999px;
  background: #e8f2f8;
  padding: 1px 7px;
  color: #24465c;
  font-weight: 800;
}

.comment-items p,
.comment-empty {
  margin: 0;
  color: #40505f;
  font-size: 0.9rem;
}

.comment-reactions {
  display: grid;
  gap: 6px;
  margin-top: 8px;
  border-top: 1px solid #e7eef3;
  padding-top: 8px;
}

.comment-reaction-row,
.comment-reaction-counts {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.comment-reaction-row {
  align-items: center;
}

.comment-reaction-status {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.comment-reaction-count,
.comment-reaction-toggle,
.comment-reaction-panel button {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 28px;
  border: 1px solid #d8e3ea;
  border-radius: 999px;
  background: white;
  padding: 2px 7px;
}

.comment-reaction-count {
  cursor: pointer;
}

.comment-reaction-toggle {
  justify-content: center;
  width: 30px;
  height: 30px;
  padding: 0;
  color: var(--brand);
  font-size: 1.1rem;
  line-height: 1;
}

.comment-reaction-count img,
.comment-reaction-toggle img,
.comment-reaction-panel img {
  width: 22px;
  height: 22px;
  object-fit: contain;
}

.comment-reaction-count b {
  color: #334656;
  font-size: 0.78rem;
}

.comment-reaction-empty {
  color: var(--muted);
  font-size: 0.78rem;
}

.comment-reaction-toggle,
.comment-reaction-panel button {
  color: #334656;
  font: inherit;
  font-size: 0.76rem;
  font-weight: 800;
  cursor: pointer;
}

.comment-reaction-count:hover,
.comment-reaction-toggle:hover,
.comment-reaction-panel button:hover {
  border-color: var(--brand);
}

.comment-reaction-panel {
  flex-basis: 100%;
  z-index: 10;
  width: 100%;
  max-height: 420px;
  overflow-y: auto;
  margin-top: 4px;
  border: 1px solid #cbd8e1;
  border-radius: 8px;
  background: white;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.6);
  padding: 10px;
}

.comment-reaction-panel[hidden] {
  display: none;
}

.comment-reaction-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.comment-reaction-panel-head strong {
  font-size: 0.86rem;
}

.comment-reaction-panel-head button {
  min-height: 26px;
  border-radius: 6px;
}

.comment-reaction-panel-grid {
  display: flex;
  flex-wrap: wrap;
  grid-template-columns: repeat(auto-fill, minmax(42px, 1fr));
  gap: 5px;
}

.comment-reaction-panel-grid button {
  justify-content: center;
  min-width: 0;
  min-height: 42px;
  border-radius: 6px;
  padding: 2px;
}

.comment-reaction-panel-grid button img {
  width: 38px;
  height: 38px;
}

.weather-widget {
  margin: 28px 0 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdff;
  padding: 14px;
}

.region-weather {
  margin: 0 0 18px;
}

.weather-widget-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.weather-widget h2,
.weather-widget h3 {
  margin: 0;
  font-size: 1.05rem;
}

.weather-widget p {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 0.84rem;
}

.weather-widget button {
  border: 1px solid #c8d8e4;
  border-radius: 6px;
  background: white;
  padding: 5px 10px;
  color: #24465c;
  font: inherit;
  font-size: 0.8rem;
  font-weight: 800;
  cursor: pointer;
}

.weather-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.region-weather .weather-grid {
  grid-template-columns: 1fr;
}

.weather-card {
  border: 1px solid #d7e2ea;
  border-radius: 8px;
  background: white;
  padding: 8px;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scrollbar-width: thin;
}

.weather-days {
  display: flex;
  min-width: max-content;
  gap: 6px;
  padding-bottom: 2px;
}

.weather-day {
  display: grid;
  flex: 0 0 104px;
  grid-template-columns: 1fr;
  gap: 2px;
  border: 1px solid #edf2f5;
  border-radius: 6px;
  background: #fbfdff;
  padding: 6px;
  color: #40505f;
  font-size: 0.78rem;
}

.weather-day:first-child {
  border: 1px solid #edf2f5;
  padding-top: 6px;
}

.weather-day--sat {
  border-color: #c7dbef;
  background: #f3f8ff;
}

.weather-day--sun,
.weather-day--holiday {
  border-color: #f0c9c9;
  background: #fff6f6;
}

.weather-day strong {
  color: #1b2b38;
}

.weather-date {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  color: var(--muted);
  font-weight: 800;
}

.weather-date small {
  overflow: hidden;
  color: #b03434;
  font-size: 0.66rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.weather-day--sat .weather-date {
  color: #2d669d;
}

.weather-day--sun .weather-date,
.weather-day--holiday .weather-date {
  color: #b03434;
}

.weather-icon {
  display: grid;
  place-items: center;
  width: 52px;
  height: 34px;
  border: 1px solid #dfe7ed;
  border-radius: 6px;
  background: #ffffff;
  line-height: 1;
}

.weather-icon img {
  display: block;
  width: 47px;
  height: 30px;
  object-fit: contain;
}

.weather-icon--sunny {
  border-color: #f2d385;
  background: #fffaf0;
}

.weather-icon--partly {
  border-color: #d8dfaa;
  background: #fbfdf2;
}

.weather-icon--cloudy {
  border-color: #d7e0e7;
  background: #f8fafb;
}

.weather-icon--rainy {
  border-color: #b9d8e8;
  background: #f3f9fc;
}

.weather-icon--snowy {
  border-color: #c4e5ec;
  background: #f5fbfd;
}

.weather-icon--stormy {
  border-color: #d6c6ea;
  background: #faf7fd;
}

.weather-temp,
.weather-rain {
  font-size: 0.74rem;
}

.weather-loading,
.weather-error {
  grid-column: 1 / -1;
  margin: 0;
}

.weather-error {
  color: #b03434;
  font-weight: 800;
}

.sabage-region {
  scroll-margin-top: 92px;
  margin-top: 42px;
}

.sabage-region-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 2px solid var(--brand);
  margin-bottom: 18px;
  padding-bottom: 10px;
}

.sabage-region-head h2 {
  margin: 0;
  font-size: 1.8rem;
}

.sabage-region-head span {
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 800;
}

.field-list {
  display: grid;
  gap: 24px;
}

.field-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  padding: 18px;
}

.field-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.field-head h3 {
  margin: 0 0 8px;
  font-size: 1.25rem;
}

.field-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.field-tags span {
  border: 1px solid #cbd8e1;
  border-radius: 5px;
  padding: 2px 8px;
  color: #40505f;
  font-size: 0.82rem;
  font-weight: 700;
}

.calendar-frame {
  overflow: hidden;
  border: 1px solid #cbd8e1;
  border-radius: 8px;
  background: #f7fbfd;
}

.calendar-frame iframe {
  display: block;
  border: 0;
}

.calendar-missing {
  border: 1px dashed #c8d8e4;
  border-radius: 8px;
  background: #f7fbfd;
  padding: 18px;
}

.calendar-missing p {
  margin: 6px 0 10px;
  color: var(--muted);
}

.groundzero-tooltip {
  position: fixed;
  z-index: 40;
  display: grid;
  gap: 4px;
  max-width: min(280px, calc(100vw - 24px));
  padding: 10px 12px;
  border: 1px solid rgba(8, 35, 53, 0.14);
  border-radius: 8px;
  background: rgba(10, 25, 38, 0.95);
  color: white;
  box-shadow: 0 12px 26px rgba(8, 35, 53, 0.24);
  font-size: 0.86rem;
  line-height: 1.45;
  pointer-events: none;
}

.groundzero-tooltip[hidden] {
  display: none;
}

.groundzero-tooltip span:first-child {
  font-weight: 800;
}

.groundzero-tooltip span:not(:first-child) {
  color: rgba(255, 255, 255, 0.78);
}

.pagetop {
  position: fixed;
  right: 24px;
  bottom: 24px;
  display: none;
  width: 46px;
  height: 46px;
  border: 2px solid #1b2b38;
  border-radius: 50%;
  background: white;
  cursor: pointer;
  z-index: 15;
}

.pagetop[data-visible] {
  display: block;
}

.pagetop::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 55%;
  width: 12px;
  height: 12px;
  border-left: 3px solid #1b2b38;
  border-top: 3px solid #1b2b38;
  transform: translate(-50%, -50%) rotate(45deg);
}

@media (max-width: 820px) {
  .fortune-widget,
  .comment-form,
  .field-head {
    grid-template-columns: 1fr;
    flex-direction: column;
  }

  .fortune-controls {
    width: 100%;
    flex-direction: column;
  }

  .weather-widget-head {
    flex-direction: column;
  }

  .calendar-frame iframe {
    height: 520px;
  }
}
