.news-api-toolbar {
  display: flex;
  align-items: end;
  gap: 14px;
  margin: -12px 0 24px;
  padding: 18px;
  border: 1px solid rgba(15, 44, 33, 0.14);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.76);
}

.news-api-filter {
  display: grid;
  gap: 7px;
  color: var(--green-deep);
  font-size: 13px;
  font-weight: 900;
}

.news-api-filter select {
  min-width: 170px;
  min-height: 44px;
  padding: 8px 38px 8px 12px;
  border: 1px solid rgba(15, 44, 33, 0.28);
  border-radius: 4px;
  color: var(--green-deep);
  background: var(--white);
  font: inherit;
  font-size: 16px;
  line-height: 1.4;
}

.news-api-filter select:focus-visible,
.news-api-reset:focus-visible,
.news-api-more:focus-visible,
.news-api-card:focus-visible,
.news-api-modal-close:focus-visible,
.news-api-modal-link:focus-visible {
  outline: 3px solid rgba(35, 111, 146, 0.4);
  outline-offset: 3px;
}

.news-api-reset {
  min-height: 44px;
  padding: 8px 4px;
  border: 0;
  border-bottom: 2px solid var(--orange);
  color: var(--green-deep);
  background: transparent;
  font: inherit;
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
}

.news-api-status {
  margin: 0;
  padding: 26px;
  border: 1px dashed rgba(15, 44, 33, 0.28);
  border-radius: 8px;
  color: var(--green-deep);
  background: rgba(255, 255, 255, 0.7);
  font-weight: 800;
  line-height: 1.8;
  text-align: center;
}

.news-api-status[hidden] {
  display: none;
}

.news-api-status-error {
  border-color: rgba(217, 101, 34, 0.55);
  background: var(--orange-soft);
}

.news-api-status a {
  color: var(--green);
  font-weight: 900;
}

.news-api-card {
  width: 100%;
  min-width: 0;
  min-height: 410px;
  padding: 0;
  overflow: hidden;
}

.news-api-card-media {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--paper-2);
}

.news-api-card-media::after {
  position: absolute;
  inset: auto 0 0;
  height: 38%;
  content: "";
  background: linear-gradient(to top, rgba(15, 44, 33, 0.18), transparent);
  pointer-events: none;
}

.news-api-card-media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.news-api-card:hover .news-api-card-media img {
  transform: scale(1.025);
}

.news-api-card-copy {
  display: flex;
  min-height: 225px;
  padding: 22px 24px 24px;
  flex: 1;
  flex-direction: column;
  align-items: flex-start;
}

.news-api-card-copy strong {
  display: block;
  margin-top: 18px;
  color: var(--green-deep);
  font-size: clamp(20px, 2vw, 25px);
  line-height: 1.42;
  font-weight: 900;
}

.news-api-card-copy small {
  display: -webkit-box;
  margin-top: 12px;
  overflow: hidden;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.65;
  font-weight: 750;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.news-api-card-copy .news-open {
  margin-top: auto;
}

.news-api-card-placeholder {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  padding: 20px;
  color: var(--green);
  background: linear-gradient(145deg, var(--green-soft), var(--paper));
  font-size: 14px;
  font-weight: 900;
}

.news-api-actions {
  display: flex;
  justify-content: center;
  margin-top: 28px;
}

.news-api-more {
  min-width: 180px;
}

.news-api-more[hidden],
.news-api-reset[hidden] {
  display: none;
}

.news-api-modal {
  position: fixed;
  z-index: 2500;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 28px;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
}

.news-api-modal[hidden] {
  display: none;
}

.news-api-modal-backdrop {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  background: rgba(7, 26, 19, 0.82);
  cursor: pointer;
}

.news-api-modal-shell {
  position: relative;
  z-index: 1;
  width: min(960px, 100%);
  max-height: min(820px, calc(100vh - 56px));
  max-height: min(820px, calc(100dvh - 56px));
  overflow: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  border-radius: 10px;
  background: var(--white);
  box-shadow: 0 28px 70px rgba(5, 19, 14, 0.32);
}

.news-api-modal-close {
  position: sticky;
  z-index: 3;
  top: 18px;
  float: right;
  width: 46px;
  height: 46px;
  margin: 18px 18px -64px 0;
  border: 0;
  border-radius: 50%;
  color: var(--white);
  background: var(--green-deep);
  font-size: 30px;
  line-height: 1;
  cursor: pointer;
  touch-action: manipulation;
}

.news-api-modal-media {
  margin: 0;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--paper-2);
}

.news-api-modal-media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.news-api-modal-copy {
  padding: 38px 44px 44px;
}

.news-api-modal-date {
  color: var(--orange);
  font-size: 13px;
  font-weight: 900;
}

.news-api-modal-copy h2 {
  margin: 14px 0 24px;
  color: var(--green-deep);
  font-size: clamp(26px, 4vw, 42px);
  line-height: 1.3;
  font-weight: 900;
  overflow-wrap: anywhere;
}

.news-api-modal-body {
  color: var(--ink);
  font-size: 16px;
  line-height: 1.95;
}

.news-api-modal-body p {
  margin: 0 0 20px;
  letter-spacing: 0.02em;
}

.news-api-modal-body h2,
.news-api-modal-body h3,
.news-api-modal-body h4 {
  color: var(--green-deep);
  font-weight: 900;
  letter-spacing: 0.02em;
}

.news-api-modal-body h2 {
  margin: 34px 0 16px;
  padding: 0 0 12px 18px;
  border-left: 5px solid var(--orange);
  border-bottom: 1px solid rgba(15, 44, 33, 0.12);
  font-size: clamp(22px, 4vw, 30px);
  line-height: 1.45;
}

.news-api-modal-body h3 {
  margin: 30px 0 14px;
  padding: 11px 14px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(232, 238, 232, 0.92), rgba(255, 240, 230, 0.68));
  font-size: clamp(19px, 3.4vw, 25px);
  line-height: 1.5;
}

.news-api-modal-body h4 {
  margin: 24px 0 10px;
  color: var(--water);
  font-size: 18px;
  line-height: 1.5;
}

.news-api-modal-body > p:first-of-type {
  padding: 16px 18px;
  border-radius: 14px;
  background: rgba(232, 238, 232, 0.72);
  color: var(--green-deep);
  font-size: 17px;
  font-weight: 800;
  line-height: 1.9;
}

.news-api-modal-body ul,
.news-api-modal-body ol {
  margin: 14px 0 24px;
  padding: 16px 18px 16px 32px;
  border-radius: 14px;
  background: rgba(246, 247, 243, 0.92);
  color: var(--green-deep);
}

.news-api-modal-body li + li {
  margin-top: 8px;
}

.news-api-modal-body blockquote {
  margin: 22px 0;
  padding: 16px 18px;
  border-left: 5px solid var(--water);
  border-radius: 0 14px 14px 0;
  background: rgba(35, 107, 142, 0.08);
  color: var(--green-deep);
  font-weight: 800;
}

.news-api-modal-body hr {
  height: 1px;
  margin: 28px 0;
  border: 0;
  background: linear-gradient(90deg, transparent, rgba(15, 44, 33, 0.22), transparent);
}

.news-api-modal-body .news-inline-emphasis,
.news-api-modal-body strong {
  color: var(--orange);
  font-weight: 900;
  background: linear-gradient(transparent 62%, rgba(217, 101, 34, 0.2) 0);
}

.news-api-modal-body > :first-child {
  margin-top: 0;
}

.news-api-modal-body > :last-child {
  margin-bottom: 0;
}

.news-api-modal-body a {
  color: var(--green);
  font-weight: 900;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

.news-api-modal-body img {
  max-width: 100%;
  height: auto;
}

.news-api-modal-actions {
  display: flex;
  margin-top: 32px;
}

body.news-api-modal-open {
  position: fixed;
  width: 100%;
  overflow: hidden;
}

@media (max-width: 760px) {
  .news-api-toolbar {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: end;
  }

  .news-api-filter select {
    width: 100%;
    min-width: 0;
  }

  .news-api-reset {
    grid-column: 1 / -1;
    justify-self: start;
  }

  .news-api-modal {
    padding: max(14px, env(safe-area-inset-top)) max(14px, env(safe-area-inset-right)) max(14px, env(safe-area-inset-bottom)) max(14px, env(safe-area-inset-left));
  }

  .news-api-modal-shell {
    max-height: calc(100vh - 28px);
    max-height: calc(100dvh - 28px);
  }

  .news-api-modal-close {
    position: fixed;
    top: max(18px, calc(env(safe-area-inset-top) + 14px));
    right: max(20px, calc(env(safe-area-inset-right) + 14px));
    bottom: auto;
    float: none;
    width: 52px;
    height: 52px;
    margin: 0;
    box-shadow: 0 8px 24px rgba(5, 19, 14, 0.28);
  }

  .news-api-modal-copy {
    padding: 28px 22px 30px;
  }

  .news-api-modal-body {
    font-size: 16px;
    line-height: 1.92;
  }

  .news-api-modal-body h2 {
    margin-top: 30px;
    padding-left: 14px;
    font-size: 23px;
  }

  .news-api-modal-body h3 {
    margin-top: 26px;
    padding: 10px 12px;
    font-size: 20px;
  }

  .news-api-modal-body > p:first-of-type {
    padding: 14px 15px;
    font-size: 16px;
  }
}

@media (max-width: 520px) {
  .news-card-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .news-api-toolbar {
    grid-template-columns: 1fr;
  }

  .news-api-reset {
    grid-column: auto;
  }

  .news-api-card {
    min-height: 360px;
  }

  .news-api-card-copy {
    min-height: 205px;
    padding: 20px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .news-api-card,
  .news-api-card-media img {
    transition: none;
  }
}

.works-switch-section {
  background: rgba(255, 255, 255, 0.9) !important;
}

.works-switch-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 22px;
  align-items: center;
  justify-items: center;
  text-align: center;
}

.works-switch-copy {
  max-width: 760px;
  margin: 0 auto;
}

.works-switch-copy h2 {
  margin: 0;
  color: var(--green-deep);
  font-size: clamp(28px, 3.6vw, 44px);
  line-height: 1.32;
  font-weight: 900;
}

.works-switch-copy p:not(.small-label) {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.8;
  font-weight: 750;
}

.works-tabbar {
  display: inline-grid;
  grid-template-columns: repeat(2, minmax(132px, 1fr));
  gap: 8px;
  width: min(430px, 100%);
  padding: 8px;
  border: 1px solid rgba(15, 44, 33, 0.14);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 16px 34px rgba(15, 44, 33, 0.08);
}

.works-tab {
  min-height: 48px;
  padding: 10px 18px;
  border: 1px solid transparent;
  border-radius: 13px;
  color: var(--green-deep);
  background: rgba(246, 247, 243, 0.9);
  font: inherit;
  font-size: 15px;
  font-weight: 900;
  cursor: pointer;
  touch-action: manipulation;
  box-shadow: inset 0 0 0 1px rgba(15, 44, 33, 0.05);
}

.works-tab[data-works-tab="news-panel"] {
  border-color: rgba(217, 101, 34, 0.28);
  color: #b84e18;
  background: var(--orange-soft);
}

.works-tab[data-works-tab="works-panel"] {
  border-color: rgba(15, 76, 54, 0.22);
  color: var(--green);
  background: var(--green-soft);
}

.works-tab.is-active {
  color: var(--white);
  box-shadow: 0 10px 22px rgba(15, 44, 33, 0.18);
}

.works-tab[data-works-tab="news-panel"].is-active {
  background: var(--orange);
}

.works-tab[data-works-tab="works-panel"].is-active {
  background: var(--green);
}

.works-tab:focus-visible,
.news-archive-open:focus-visible,
.news-archive-close:focus-visible,
.news-archive-item:focus-visible,
.works-api-more:focus-visible,
.work-gallery-card:focus-visible {
  outline: 3px solid rgba(35, 111, 146, 0.42);
  outline-offset: 3px;
}

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

.works-panel {
  scroll-margin-top: 84px;
}

.news-preview-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.news-api-card {
  min-height: 0;
}

.news-api-card-copy {
  min-height: 210px;
}

.news-api-modal {
  z-index: 2600;
}

.news-api-modal-actions {
  flex-wrap: wrap;
  gap: 12px;
}

.news-api-modal-actions .btn {
  min-height: 48px;
}

.news-archive-modal {
  position: fixed;
  z-index: 2400;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
}

.news-archive-modal[hidden] {
  display: none;
}

.news-archive-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(7, 26, 19, 0.82);
  cursor: pointer;
}

.news-archive-shell {
  position: relative;
  z-index: 1;
  width: min(1040px, 100%);
  max-height: calc(100vh - 48px);
  max-height: calc(100dvh - 48px);
  overflow: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding: clamp(26px, 4vw, 46px);
  border-radius: 12px;
  background: var(--paper);
  box-shadow: 0 30px 78px rgba(5, 19, 14, 0.34);
}

.news-archive-close {
  position: sticky;
  z-index: 3;
  top: 0;
  float: right;
  width: 48px;
  height: 48px;
  margin: 0 0 -48px 18px;
  border: 0;
  border-radius: 50%;
  color: var(--white);
  background: var(--green-deep);
  font-size: 30px;
  line-height: 1;
  cursor: pointer;
  touch-action: manipulation;
}

.news-archive-head {
  max-width: 720px;
  margin-bottom: 22px;
}

.news-archive-head h2 {
  margin: 0;
  color: var(--green-deep);
  font-size: clamp(28px, 4vw, 46px);
  line-height: 1.28;
  font-weight: 900;
}

.news-archive-head p:not(.small-label) {
  margin: 12px 0 0;
  color: var(--muted);
  font-weight: 800;
}

.news-archive-toolbar {
  margin: 0 0 20px;
}

.news-archive-list {
  display: grid;
  gap: 10px;
}

.news-archive-item {
  width: 100%;
  display: grid;
  grid-template-columns: 108px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  min-height: 104px;
  padding: 12px;
  border: 1px solid rgba(15, 44, 33, 0.14);
  border-left: 5px solid var(--green);
  border-radius: 8px;
  color: var(--green-deep);
  background: rgba(255, 255, 255, 0.82);
  text-align: left;
  cursor: pointer;
  transition: border-color 0.18s ease, background 0.18s ease, transform 0.18s ease;
}

.news-archive-item:hover {
  transform: translateY(-1px);
  border-color: var(--orange);
  background: var(--white);
}

.news-archive-thumb {
  display: grid;
  place-items: center;
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: 6px;
  color: var(--green);
  background: var(--green-soft);
  font-size: 12px;
  font-weight: 900;
}

.news-archive-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.news-archive-copy {
  min-width: 0;
  display: grid;
  gap: 5px;
}

.news-archive-copy time {
  color: var(--orange);
  font-size: 13px;
  font-weight: 900;
}

.news-archive-copy strong {
  color: var(--green-deep);
  font-size: 18px;
  line-height: 1.45;
  font-weight: 900;
}

.news-archive-copy small {
  display: -webkit-box;
  overflow: hidden;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
  font-weight: 750;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.works-api-status {
  margin: 0 0 18px;
  padding: 18px;
  border: 1px dashed rgba(15, 44, 33, 0.28);
  border-radius: 8px;
  color: var(--green-deep);
  background: rgba(255, 255, 255, 0.76);
  font-weight: 800;
  line-height: 1.8;
  text-align: center;
}

.works-api-status[hidden] {
  display: none;
}

.works-gallery-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.works-api-actions {
  display: flex;
  justify-content: center;
  margin-top: 28px;
}

.works-api-more[hidden] {
  display: none;
}

.work-thumb-placeholder {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  color: var(--green);
  background: var(--green-soft);
  font-size: 14px;
  font-weight: 900;
}

.detail-modal {
  z-index: 2700;
}

.detail-modal-media.is-gallery {
  display: flex;
  min-height: min(560px, 60vh);
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  overscroll-behavior-inline: contain;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.detail-modal-media.is-gallery img {
  position: static;
  flex: 0 0 100%;
  width: 100%;
  height: auto;
  min-height: 100%;
  object-fit: contain;
  opacity: 1;
  scroll-snap-align: center;
  animation: none;
}

.detail-modal-media.is-gallery::-webkit-scrollbar {
  display: none;
}

@media (max-width: 980px) {
  .works-switch-inner {
    grid-template-columns: 1fr;
  }

  .works-tabbar {
    width: 100%;
  }

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

@media (max-width: 680px) {
  .works-switch-section {
    padding-top: 34px;
    padding-bottom: 34px;
  }

  .works-switch-copy h2 {
    font-size: 28px;
    text-align: center;
  }

  .works-switch-copy p:not(.small-label) {
    font-size: 15px;
  }

  .works-tabbar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    border-radius: 14px;
  }

  .works-tab {
    min-height: 48px;
    padding: 10px 8px;
    border-radius: 10px;
    font-size: 15px;
  }

  .news-preview-grid {
    grid-template-columns: 1fr;
  }

  .news-api-card-media {
    aspect-ratio: 16 / 9;
  }

  .news-api-card-copy {
    min-height: 178px;
  }

  .news-api-card-copy strong {
    font-size: 21px;
  }

  .news-api-modal-copy {
    padding-bottom: 92px;
  }

  .news-api-modal-actions {
    flex-direction: column;
  }

  .news-api-modal-actions .btn {
    width: 100%;
  }

  .news-archive-modal {
    padding: 0;
  }

  .news-archive-shell {
    width: 100%;
    height: 100vh;
    height: 100dvh;
    max-height: none;
    padding: max(22px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) max(92px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
    border-radius: 0;
  }

  .news-archive-close {
    position: fixed;
    top: max(18px, calc(env(safe-area-inset-top) + 14px));
    right: max(18px, calc(env(safe-area-inset-right) + 14px));
    bottom: auto;
    width: 52px;
    height: 52px;
    margin: 0;
    box-shadow: 0 8px 24px rgba(5, 19, 14, 0.28);
  }

  .news-archive-head h2 {
    padding-right: 58px;
    font-size: 28px;
  }

  .news-archive-toolbar {
    grid-template-columns: 1fr;
  }

  .news-archive-item {
    grid-template-columns: 78px minmax(0, 1fr);
    min-height: 94px;
    gap: 12px;
    padding: 10px;
  }

  .news-archive-copy strong {
    font-size: 16px;
  }

  .news-archive-copy small {
    display: none;
  }

  .works-gallery-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px 10px;
  }

  .work-thumb-fade {
    aspect-ratio: 1 / 0.86;
  }

  .work-gallery-copy {
    padding: 14px 12px 13px;
    min-height: 154px;
  }

  .work-gallery-copy > small {
    font-size: 11px;
  }

  .work-gallery-copy > strong {
    font-size: 15px;
    line-height: 1.48;
  }

  .work-gallery-copy > em {
    margin-top: 8px;
    font-size: 12px;
    line-height: 1.45;
  }

  .work-gallery-copy > span {
    padding-top: 12px;
    font-size: 12px;
  }

  .detail-modal-media.is-gallery {
    min-height: 300px;
  }

  .detail-modal.is-open .detail-modal-close {
    position: fixed;
    top: max(18px, calc(env(safe-area-inset-top) + 14px));
    right: max(18px, calc(env(safe-area-inset-right) + 14px));
    bottom: auto;
    width: 52px;
    height: 52px;
    border: 0;
    box-shadow: 0 8px 24px rgba(5, 19, 14, 0.28);
  }
}

@media (max-width: 380px) {
  .works-gallery-grid {
    gap: 12px 9px;
  }

  .work-gallery-copy {
    min-height: 150px;
    padding: 13px 10px 12px;
  }

  .work-gallery-copy > strong {
    font-size: 14px;
  }
}

@media (max-width: 400px) {
  .work-gallery-copy > strong {
    min-width: 0;
    word-break: normal;
    overflow-wrap: anywhere;
    text-wrap: balance;
  }
}
