@font-face {
  font-family: AdjustedYuGothic;
  font-weight: 400;
  src: local("Yu Gothic Medium");
}

@font-face {
  font-family: AdjustedYuGothic;
  font-weight: 700;
  src: local("Yu Gothic Bold");
}

:root {
  color: #2A2622;
  background: #F7F4F0;
  font-family: AdjustedYuGothic, "Yu Gothic", YuGothic, "Hiragino Sans", sans-serif;
  font-size: 16px;
  line-height: 1.5;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  overflow-wrap: break-word;
}

a { color: #0F3D75; }

.top {
  background: #ffffff;
  border-bottom: 1px solid #D9D2C9;
  padding: 8px 16px 0;
}

.brand {
  color: #0B2545;
  font-size: 1.2rem;
  font-weight: 700;
  line-height: 1.25;
  text-decoration: none;
}

.top nav {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}

.top nav a {
  color: #1A4480;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 8px 12px;
  text-decoration: none;
  font-weight: 700;
}

.top nav a.is-active {
  background: #EFEAE4;
  color: #2A2622;
}

main {
  padding: 16px;
  max-width: 960px;
}

h1 {
  font-size: 1.5rem;
  line-height: 1.25;
  margin: 0 0 16px;
}

h2 {
  font-size: 1.2rem;
  line-height: 1.25;
  margin: 24px 0 8px;
}

.meta { color: #6E675F; display: block; }
p.meta { display: block; margin: 0 0 16px; }

.narrow { max-width: 420px; margin: 0 auto; padding-top: 32px; }

.stack { display: flex; flex-direction: column; gap: 16px; }

label { display: flex; flex-direction: column; gap: 4px; font-weight: 700; }

input, select, button {
  font: inherit;
  min-height: 44px;
  border-radius: 6px;
}

input, select {
  background: #ffffff;
  border: 1px solid #D9D2C9;
  color: #2A2622;
  padding: 8px 12px;
}

input:focus, select:focus {
  border: 2px solid #1A4480;
  outline: none;
}

button, .button {
  background: #1A4480;
  border: 0;
  color: #ffffff;
  font-weight: 700;
  padding: 8px 16px;
  text-align: center;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
}

.button-secondary {
  background: transparent;
  border: 1px solid #1A4480;
  color: #1A4480;
}

.actions { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; }

.card {
  background: #ffffff;
  border: 1px solid #D9D2C9;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  padding: 16px;
  margin-bottom: 16px;
}

.card a { text-decoration: none; color: inherit; display: block; }
.card a strong { color: #2A2622; }

.slots { list-style: none; padding: 0; margin: 0; }
.slots li { margin: 0 0 8px; }
.slots a {
  display: flex;
  gap: 8px;
  align-items: center;
  min-height: 44px;
  background: #ffffff;
  border: 1px solid #D9D2C9;
  padding: 8px 12px;
  text-decoration: none;
  color: #2A2622;
}

.code { color: #8A5A00; font-weight: 700; }

input, select { width: 100%; }
button { width: 100%; }

.error { color: #e01e5a; font-weight: 700; }
.saved { color: #8A5A00; font-weight: 700; }
.warn {
  background: #F0C14B;
  color: #2A2622;
  padding: 8px 12px;
}

.back { margin: 0 0 8px; }

table {
  width: 100%;
  border-collapse: collapse;
  background: #ffffff;
}

th, td {
  border: 1px solid #D9D2C9;
  padding: 8px;
  text-align: left;
}

th { background: #EFEAE4; }

tr:nth-child(even) td { background: #F7F4F0; }
tr.is-saved td { background: #F0C14B; }

.desktop-only { display: none; }
.mobile-only { display: block; }

@media (min-width: 960px) {
  table.desktop-only { display: table; }
  .mobile-only { display: none !important; }
  .actions { flex-direction: row; }
  .actions .button { min-width: 160px; }
}

.search { margin-bottom: 16px; }
