/* Rails 版 app/assets/stylesheets/*.css を移植 */

/* ===== application ===== */

html,
body {
  margin: 0;
}
* {
  box-sizing: border-box;
}
a {
  display: inline-block;
}
main {
  padding: 10px;
  box-sizing: border-box;
  min-height: calc(100svh - 150px);
  overflow: auto;
}
img {
  width: 100%;
}
.cf-turnstile {
  display: flex;
  justify-content: center;
}
.cf-turnstile > div {
  width: 300px;
  height: 65px;
}

/* ===== header ===== */

header {
  position: sticky;
  top: 0;
  left: 0;
  width: 100%;
  height: 50px;
  padding: 0 12px;
  background: rgb(255 255 255 / 80%);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0px 2px 6px 0 rgb(0 0 0 / 10%);
  z-index: 100;
  display: flex;
  justify-content: space-between;
}
header a {
  color: inherit;
  text-decoration: none;
}
header a:hover {
  text-decoration: underline;
}
.header-logo {
  height: 50px;
  display: flex;
  justify-content: center;
  align-items: center;
}
.header-logo img {
  height: 36px;
  width: auto;
}
.header-logo span {
  font-weight: 500;
  font-size: 1.2rem;
  margin-left: 0.25rem;
}
.nav-list {
  height: 50px;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* ===== footer ===== */

footer {
  height: 100px;
  padding: 12px;
  display: flex;
  justify-content: space-between;
  box-shadow: 0px -2px 6px 0 rgb(0 0 0 / 10%);
}
footer a {
  color: inherit;
  text-decoration: none;
}
footer a:hover {
  text-decoration: underline;
}
.footer-logo {
  height: 50px;
  display: flex;
  justify-content: center;
  align-items: center;
}
.footer-logo img {
  height: 36px;
  width: auto;
}
.footer-logo span {
  font-weight: 500;
  font-size: 1.2rem;
  margin-left: 0.25rem;
}
.footer-logo-container a {
  text-decoration: none;
}
.footer-list-container {
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.footer-list {
  font-size: 12px;
  line-height: 14px;
}

/* ===== flash ===== */

.flash {
  min-width: 200px;
  max-width: 94vw;
  position: fixed;
  top: 1rem;
  left: 50%;
  padding: 1rem 2.5rem 1rem 1.5rem;
  border-radius: 0.5rem;
  transform: translateX(-50%);
  background: #333;
  color: white;
  overflow: hidden;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
  transition: opacity 0.3s;
  animation: flash-hide 3s forwards;
  z-index: 1000;
}
.flash-message {
  width: 100%;
  overflow: hidden;
  white-space: normal;
  text-overflow: ellipsis;
}
.flash-button {
  border: none;
  top: 50%;
  right: 0.5rem;
  position: absolute;
  background: none;
  color: #aaa;
  font-size: 1.25rem;
  transform: translateY(-50%);
  line-height: 1;
  cursor: pointer;
}
.flash-bar {
  width: 100%;
  height: 4px;
  position: absolute;
  bottom: 0;
  left: 0;
  background: #525252;
  transform-origin: left;
  transform: scaleX(1);
  animation: flash-bar 3s linear forwards;
}
.flash.notice .flash-bar {
  background: #4ade80;
}
.flash.alert .flash-bar {
  background: #f34f4f;
}
@keyframes flash-hide {
  0% {
    opacity: 1;
  }
  90% {
    opacity: 1;
  }
  100% {
    opacity: 0;
  }
}
@keyframes flash-bar {
  from {
    transform: scaleX(1);
  }
  to {
    transform: scaleX(0);
  }
}

/* ===== custom form (ctmf) ===== */

.ctmf {
  width: 100%;
  max-width: 400px;
}
.ctmf > div,
.ctmf-div {
  margin-bottom: 1.5rem;
}
.ctmf input:disabled {
  background: #e0e0e0 !important;
}
.ctmf input[type="submit"],
.ctmf button[type="submit"],
.ctmf-button {
  width: 100%;
  max-width: 400px;
  height: 30px;
  line-height: 30px;
  padding: 0;
  font-size: 16px;
  border: none;
  border-radius: 7px;
  background: #ffffff;
  color: #000;
  font-weight: bold;
  box-shadow: 0 2px 3px 2px #0002;
  cursor: pointer;
}
.ctmf input[type="submit"]:hover,
.ctmf button[type="submit"]:hover,
.ctmf-button:hover {
  box-shadow: 0 1px 3px 2px #0001;
}
.ctmf input[type="submit"]:disabled,
.ctmf button[type="submit"]:disabled {
  background: #e0e0e0 !important;
  cursor: not-allowed;
}
.ctmf label,
.ctmf-label {
  display: block;
  padding-left: 5px;
}
.ctmf input[type="checkbox"] + label,
.ctmf-checkbox-label {
  display: inline-block;
}
.ctmf input[type="date"],
.ctmf-datefield {
  width: 100%;
  max-width: 400px;
  box-sizing: border-box;
  color: #000;
  background: #fff;
  border: none;
  padding: 7px;
  border-radius: 7px;
  box-shadow: inset 0 1px 3px 2px #0002;
}
.ctmf small,
.ctmf-small {
  display: block;
  padding-left: 7px;
}
.ctmf input[type="text"],
.ctmf input[type="email"],
.ctmf-textfield {
  width: 100%;
  max-width: 400px;
  box-sizing: border-box;
  color: #000;
  background: #fff;
  border: none;
  padding: 7px;
  border-radius: 7px;
  box-shadow: inset 0 1px 3px 2px #0002;
}
.ctmf textarea,
.ctmf-textarea {
  width: 100%;
  height: 64px;
  max-width: 400px;
  box-sizing: border-box;
  resize: vertical;
  color: #000;
  background: #fff;
  border: none;
  padding: 7px;
  border-radius: 7px;
  box-shadow: inset 0 1px 3px 2px #0002;
}
.ctmf-password-wrap {
  position: relative;
  display: flex;
  align-items: center;
  max-width: 400px;
}
.ctmf-password-wrap input[type="password"],
.ctmf-password-wrap input[type="text"] {
  flex: 1;
  padding: 7px;
  border: none;
  border-radius: 7px;
  box-shadow: inset 0 1px 3px 2px #0002;
}
.ctmf-password-wrap .ctmf-password-toggle {
  position: absolute;
  right: 0.5rem;
  top: 50%;
  transform: translateY(-50%);
  cursor: pointer;
  background: none;
  border: none;
}

/* ===== 追加分（Rails では inline style / ヘルパだったもの） ===== */

.errors {
  color: red;
}
.errors ul {
  margin: 0.25rem 0;
  padding-left: 1.2rem;
}
.attributes {
  display: grid;
  grid-template-columns: 8rem 1fr;
  gap: 0.4rem 1rem;
  max-width: 400px;
}
.attributes dt {
  color: #666;
  font-size: 0.9rem;
}
.attributes dd {
  margin: 0;
  word-break: break-all;
}
.scopes {
  margin: 0.5rem 0;
  padding-left: 1.2rem;
}
.grant-list {
  padding-left: 1.2rem;
}
.link-button {
  padding: 0;
  color: #06c;
  background: none;
  border: none;
  text-decoration: underline;
  cursor: pointer;
  font-size: inherit;
}
.danger-button {
  height: 30px;
  padding: 0 1rem;
  color: #fff;
  background: #c33;
  border: none;
  border-radius: 7px;
  cursor: pointer;
}

/* ===== 固定ページ（headless-cms の Markdown を描画したもの）===== */

.document {
  line-height: 1.8;
  overflow-wrap: anywhere;
}
.document h1 {
  margin-bottom: 1.5rem;
}
.document h2,
.document h3,
.document h4 {
  margin-top: 2rem;
  margin-bottom: 0.5rem;
  line-height: 1.4;
}
.document ul,
.document ol {
  padding-left: 1.4rem;
}
.document li {
  margin: 0.3rem 0;
}
.document blockquote {
  margin: 1rem 0;
  padding: 0.1rem 1rem;
  color: #444;
  border-left: 4px solid #ddd;
}
.document code {
  padding: 0.1rem 0.3rem;
  background: #f0f0f0;
  border-radius: 4px;
}
.document pre {
  padding: 0.8rem;
  background: #f0f0f0;
  border-radius: 7px;
  overflow-x: auto;
}
.document pre code {
  padding: 0;
  background: none;
}
.document table {
  display: block;
  width: 100%;
  overflow-x: auto;
  border-collapse: collapse;
}
.document th,
.document td {
  padding: 0.4rem 0.8rem;
  border: 1px solid #ddd;
}
.document hr {
  margin: 2rem 0;
  border: none;
  border-top: 1px solid #ddd;
}
.document img {
  width: auto;
  max-width: 100%;
}
.document-updated {
  margin-top: 2.5rem;
  color: #666;
  font-size: 0.9rem;
}

/* rows を指定したときだけ高さを任せる（既定の 64px はお問い合わせには低い）*/
.ctmf textarea[rows] {
  height: auto;
  min-height: 64px;
}
