:root {
  --gap: 12px;
  --border: 2px outset brown;
  --radius: 9px;
}

body {
  background-image: url(assets/wood.jpg);
  background-size: 100%;
  margin-left: 0;
  margin-right: 0;
  line-height: 1.5;
  text-align: center;
  font-size: 18px;
  color: black;
}

p {
  text-align: center;
  font-size: 18px;
  background: white;
  color: black;
  border-radius: 9px;
}

.explanations {
  text-align: left;
}

h1 {
  text-align: center;
  font-size: 22px;
  background: white;
  color: black;
  border: 3px outset brown;
}

h2 {
  text-align: center;
  font-size: 20px;
  ackground: white;
  border: 2px solid orange;
  border-radius: 10px;
  color: black;
}

h3, h4 {
  font-size: 18px;
  font-weight: bold;
  text-align: center;
  background: white;
  border-radius: 9px;
}

.app-main {
  padding: 8px;
}

.hint { color: #333; }
.hidden { display: none; }

.menu-buttons {
  display: flex;
  gap: var(--gap);
  flex-wrap: wrap;
  margin-top: 8px;
}

button {
  padding: 8px;
  border: var(--border);
  border-radius: var(--radius);
  background: white;
  cursor: pointer;
  font-weight: bold;
}
button:focus-visible {
  outline: 3px solid orange;
  outline-offset: 2px;
}

.topbar {
  display: flex;
  gap: var(--gap);
  align-items: start;
  justify-content: space-between;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.topbar-buttons { display: flex; gap: var(--gap); }

.board {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--gap);
}

.zone {
  border: var(--border);
  border-radius: var(--radius);
  background: white;
  padding: 12px;
}

.row {
  display: flex;
  gap: var(--gap);
  flex-wrap: wrap;
  align-items: center;
}

.pile {
  min-width: 120px;
  border: 1px solid #666;
  border-radius: 10px;
  padding: 10px;
}

.pile-title { font-weight: 700; }
.pile-count { font-size: 18px; }

.table-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(92px, 1fr));
  gap: 10px;
  margin-top: 8px;
}

.cards-line {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.hand-line {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(92px, 1fr));
  gap: 10px;
  margin-top: 8px;
}

.card-btn {
  display: inline-flex;
  flex-direction: column;
  gap: 6px;
  align-items: center;
  padding: 8px;
  border: 2px solid #333;
  border-radius: 12px;
  background: #fff;
  width: 110px;
}
.hand-line .card-btn {
  width: 100px;
}
.card-btn[aria-pressed="true"] {
  background: orange;
}

.card-img {
  width: 90px;
  height: auto;
  border-radius: 10px;
  border: 1px solid #666;
}

.card-label {
  font-size: 14px;
  text-align: center;
}

.actions {
  display: flex;
  gap: var(--gap);
  margin-top: 12px;
  flex-wrap: wrap;
}

.status {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid #bbb;
  display: grid;
  gap: 6px;
}

dialog {
  border: var(--border);
  border-radius: var(--radius);
  padding: 16px;
  max-width: 520px;
}

.dialog-actions {
  display: flex;
  gap: var(--gap);
  margin-top: 12px;
  flex-wrap: wrap;
}

/* スクリーンリーダー専用 */
.sr-only {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

#clock {text-align: right; font-size: 18px; border: 4px black solid; background-color: white;}

strong {text-align: center; font-size: 18px; font-weight: bold;}
#sitemenu {text-align: center; font-size: 18px; border: 2px outset lightgreen; border-radius: 12px; background: white;}
#sitemenu[aria-expanded="true"] {border: 2px inset green; font-size: 18px;}
#indexbtn1 {font-size: 18px;}