:root {
  --orange: #f49a00;
  --orange-deep: #df8300;
  --cream: #fff1d8;
  --cream-light: #fff8ed;
  --ink: #2c231b;
  --line: #4d3b2c;
  --panel: #ffffff;
  --blue: #597f9c;
  --blue-deep: #355f80;
  --gold: #ffd84d;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  color: var(--ink);
  background: #fffaf1;
  font-family: "Hiragino Sans", "Yu Gothic", Meiryo, sans-serif;
  letter-spacing: 0;
}

a {
  color: var(--blue);
  font-weight: 800;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 5px;
}

a:hover {
  color: var(--blue-deep);
}

button,
input {
  font: inherit;
}

.page {
  display: grid;
  width: min(1260px, calc(100% - 36px));
  height: calc(100vh - 32px);
  margin: 16px auto;
  grid-template-rows: auto 1fr auto;
  overflow: hidden;
  background:
    linear-gradient(to bottom, var(--orange) 0 190px, var(--cream) 190px);
  border: 3px solid var(--line);
  box-shadow: 0 18px 36px rgba(76, 54, 28, 0.2);
}

.site-header {
  display: grid;
  min-height: 194px;
  padding: 54px 28px 18px;
  align-items: center;
  text-align: center;
}

.header-inner {
  width: min(820px, 100%);
  margin: 0 auto;
  background: var(--panel);
  border: 3px solid var(--line);
  box-shadow: 10px 10px 0 rgba(77, 59, 44, 0.18);
}

.header-inner h1 {
  margin: 0;
  padding: 20px 34px 19px;
  font-family: "Hiragino Kaku Gothic ProN", "Yu Gothic", Meiryo, sans-serif;
  font-size: clamp(40px, 4.2vw, 58px);
  font-weight: 900;
  line-height: 1.08;
  white-space: nowrap;
}

.site-main {
  display: grid;
  grid-template-columns: 210px minmax(560px, 640px) 250px;
  gap: 34px;
  align-items: start;
  justify-content: center;
  padding: 0 46px;
}

.left-column,
.center-column,
.right-column {
  min-width: 0;
}

.center-column {
  font-family: "Hiragino Mincho ProN", "Yu Mincho", "YuMincho", serif;
}

.ad-panel {
  margin-top: 0;
}

.ad-panel a {
  position: relative;
  display: grid;
  width: 190px;
  min-height: 278px;
  margin: 0 auto 14px;
  overflow: hidden;
  color: var(--ink);
  background:
    linear-gradient(145deg, #ffffff, #fff6e7);
  border: 3px solid var(--line);
  place-items: center;
  text-decoration: none;
}

.ad-panel img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ad-placeholder {
  position: relative;
  z-index: 1;
  display: none;
  font-size: 25px;
  font-weight: 900;
}

.ad-panel.is-empty .ad-placeholder {
  display: block;
}

.counter-panel {
  width: 190px;
  margin: 32px auto 0;
  padding: 17px 12px;
  text-align: center;
  background: rgba(255, 255, 255, 0.78);
  border: 2px solid rgba(77, 59, 44, 0.62);
}

.counter-panel p {
  margin: 0;
  font-size: 14px;
  font-weight: 800;
}

.counter-panel strong {
  display: block;
  margin: 4px 0;
  color: #6f4b15;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 32px;
  line-height: 1.1;
}

.search-panel {
  display: grid;
  width: 100%;
  margin: 0 auto;
  min-height: 310px;
  padding: 34px 40px;
  align-content: center;
  background: var(--panel);
  border: 3px solid var(--line);
  box-shadow: 0 8px 0 rgba(77, 59, 44, 0.08);
}

.search-panel h2 {
  margin: 0 0 26px;
  font-size: 30px;
  font-weight: 900;
  line-height: 1.35;
  text-align: center;
  white-space: nowrap;
}

.search-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 92px;
  gap: 12px;
  align-items: center;
}

.search-form input {
  width: 100%;
  min-width: 0;
  height: 46px;
  padding: 8px 12px;
  background: #ffffff;
  border: 2px solid var(--line);
  border-radius: 0;
  outline-offset: 3px;
  font-family: "Hiragino Sans", "Yu Gothic", Meiryo, sans-serif;
}

.search-form button {
  height: 46px;
  color: var(--ink);
  font-weight: 900;
  cursor: pointer;
  background: #fff7e8;
  border: 2px solid var(--line);
  border-radius: 0;
  font-family: "Hiragino Sans", "Yu Gothic", Meiryo, sans-serif;
}

.search-form button:hover,
.search-form button:focus-visible {
  background: #ffe0a3;
}

.search-panel p {
  margin: 26px 0 0;
  font-size: 15px;
  font-weight: 400;
  line-height: 1.5;
  text-align: center;
  white-space: nowrap;
}

.talk-panel {
  margin-top: 34px;
  text-align: center;
}

.blink-guide {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  max-width: 100%;
  min-height: 38px;
  padding: 0 24px;
  color: var(--ink);
  font-size: 21px;
  font-weight: 900;
  line-height: 1.2;
  background: #fff8c8;
  border: 2px solid rgba(77, 59, 44, 0.72);
  border-radius: 999px;
  animation: blinkHalf 1s steps(1, end) infinite;
  white-space: nowrap;
}

.blink-guide span:first-child,
.blink-guide span:last-child {
  color: var(--gold);
  text-shadow:
    0 0 0 #9b7800,
    0 1px 0 #ffffff;
}

.talk-link {
  display: grid;
  width: min(500px, 92%);
  min-height: 60px;
  margin: 8px auto 0;
  color: var(--blue);
  font-size: 29px;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.9);
  border: 3px solid var(--line);
  place-items: center;
  white-space: nowrap;
}

.talk-link:hover,
.talk-link:focus-visible {
  color: var(--blue-deep);
  background: #ffffff;
}

.side-links {
  display: grid;
  gap: 15px;
  margin-top: 54px;
  padding: 18px 18px;
  background: rgba(255, 255, 255, 0.72);
  border: 2px solid rgba(77, 59, 44, 0.58);
  font-size: 17px;
  line-height: 1.42;
  white-space: nowrap;
}

.side-links a {
  display: inline-block;
  width: fit-content;
  padding: 0;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 28px 12px;
  color: rgba(44, 35, 27, 0.72);
  font-size: 12px;
  font-weight: 800;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@keyframes blinkHalf {
  0%,
  49.99% {
    opacity: 1;
  }

  50%,
  100% {
    opacity: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .blink-guide {
    animation: none;
  }
}

@media (max-width: 900px) {
  .page {
    min-height: auto;
  }

  .site-header {
    min-height: 188px;
    padding-top: 56px;
  }

  .site-main {
    grid-template-columns: 1fr;
    gap: 24px;
    padding: 8px 22px 0;
  }

  .left-column {
    display: grid;
    grid-template-columns: 150px 150px;
    justify-content: center;
    gap: 18px;
  }

  .ad-panel {
    margin-top: 0;
  }

  .ad-panel a,
  .counter-panel {
    margin-bottom: 0;
  }

  .side-links {
    width: min(420px, 100%);
    margin: 0 auto;
    font-size: 18px;
  }
}

@media (max-width: 540px) {
  .page {
    width: calc(100% - 16px);
  }

  .site-header {
    min-height: 170px;
    padding: 42px 14px 16px;
  }

  .header-inner h1 {
    padding: 18px 12px 17px;
  }

  .left-column {
    grid-template-columns: 1fr;
  }

  .search-panel {
    padding: 18px 14px 16px;
  }

  .search-form {
    grid-template-columns: 1fr;
  }

  .search-form button {
    width: 100%;
  }

  .blink-guide {
    padding: 8px 12px;
    font-size: 18px;
  }

  .talk-link {
    width: 100%;
    font-size: 24px;
  }

  .site-footer {
    flex-direction: column;
    text-align: center;
  }
}
