:root {
  color: #241d1a;
  background: #f4f0e8;
  font-family: Inter, "Segoe UI", "Noto Sans JP", system-ui, sans-serif;
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(circle at top right, rgb(177 134 56 / 14%), transparent 34rem),
    #f4f0e8;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button:focus-visible,
a:focus-visible {
  outline: 3px solid #0f63a8;
  outline-offset: 3px;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 18px clamp(16px, 4vw, 56px);
  color: #fff;
  background: #4b241d;
  box-shadow: 0 4px 18px rgb(42 22 17 / 18%);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-mark {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 2px solid #d8b86a;
  border-radius: 50%;
  color: #f6dc98;
  font-family: Georgia, serif;
  font-size: 26px;
  font-weight: 700;
}

.brand-name {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 23px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.language-picker {
  display: flex;
  gap: 8px;
}

.language-button {
  min-height: 44px;
  padding: 9px 14px;
  border: 1px solid #e7d7c8;
  border-radius: 999px;
  color: #fff;
  background: transparent;
  font-size: 15px;
  font-weight: 650;
  cursor: pointer;
}

.language-button:hover {
  background: rgb(255 255 255 / 12%);
}

.language-button[aria-pressed="true"] {
  border-color: #f4d98c;
  color: #2d1d16;
  background: #f4d98c;
}

main {
  width: min(1500px, 100%);
  margin: 0 auto;
  padding: 22px clamp(14px, 3vw, 42px) 30px;
}

.intro {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 18px;
}

.eyebrow {
  margin: 0 0 5px;
  color: #6b3b27;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  color: #2f1d18;
  font-family: Georgia, "Times New Roman", "Noto Serif JP", serif;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.12;
}

#page-description {
  max-width: 760px;
  margin: 7px 0 0;
  color: #4e4039;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.5;
}

.open-document {
  display: inline-flex;
  min-height: 46px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  padding: 11px 20px;
  border-radius: 10px;
  color: #fff;
  background: #6b321f;
  box-shadow: 0 4px 12px rgb(75 36 29 / 18%);
  font-size: 16px;
  font-weight: 700;
  text-decoration: none;
}

.open-document:hover {
  background: #542517;
}

.viewer-shell {
  overflow: hidden;
  border: 1px solid #c9beb0;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 12px 30px rgb(57 42 34 / 12%);
}

#document-viewer {
  display: block;
  width: 100%;
  height: max(560px, calc(100vh - 220px));
  border: 0;
  background: #ece8e1;
}

.viewer-fallback {
  margin: 0;
  padding: 12px 16px;
  color: #4e4039;
  background: #fffaf0;
  font-size: 15px;
  font-weight: 500;
  text-align: center;
}

.noscript-links {
  margin: 20px;
  padding: 18px;
  border: 1px solid #c9beb0;
  border-radius: 12px;
  background: #fff;
  font-size: 16px;
}

.noscript-links a {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  margin-right: 16px;
  color: #532617;
  font-weight: 700;
}

@media (max-width: 680px) {
  .site-header {
    align-items: flex-start;
    flex-direction: column;
    gap: 14px;
    padding-block: 14px;
  }

  .language-picker {
    width: 100%;
  }

  .language-button {
    flex: 1 1 0;
  }

  main {
    padding-top: 18px;
  }

  .intro {
    align-items: stretch;
    flex-direction: column;
    gap: 14px;
  }

  .open-document {
    width: 100%;
  }

  #document-viewer {
    height: 64vh;
    min-height: 430px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
  }
}
