* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: sans-serif;
  background: #f5f5f5;
  color: #333;
}

header {
  background: #4a90e2;
  color: #fff;
  padding: 12px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

header h1 {
  font-size: 1.1rem;
  cursor: pointer;
  white-space: nowrap;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.history-btn {
  white-space: nowrap;
}

/* ── ハンバーガーメニュー ── */
.hamburger {
  background: none;
  border: 1px solid #fff;
  color: #fff;
  width: 36px;
  height: 36px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.hamburger-menu {
  display: none;
  position: absolute;
  top: 52px;
  right: 16px;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.15);
  z-index: 100;
  min-width: 140px;
  overflow: hidden;
}

.hamburger-menu.open {
  display: block;
}

.hamburger-menu button {
  display: block;
  width: 100%;
  padding: 12px 16px;
  background: none;
  border: none;
  color: #333;
  font-size: 0.95rem;
  cursor: pointer;
  text-align: left;
}

.hamburger-menu button:hover {
  background: #f5f5f5;
}

.hamburger-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 99;
}

.hamburger-overlay.open {
  display: block;
}

.history-btn {
  background: transparent;
  border: 1px solid #fff;
  color: #fff;
  padding: 6px 14px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.95rem;
  white-space: nowrap;
}
.history-btn:hover {
  background: rgba(255,255,255,0.15);
}

main {
  max-width: 800px;
  margin: 32px auto;
  padding: 0 16px;
}

h2 {
  margin-bottom: 16px;
}

table {
  border-collapse: collapse;
  width: 100%;
  margin: 12px 0;
  font-size: 0.95rem;
}

th, td {
  border: 1px solid #ddd;
  padding: 8px 12px;
  text-align: left;
  line-height: 1.6;
}

th {
  background: #4a90e2;
  color: #fff;
  font-weight: bold;
}

tr:nth-child(even) {
  background: #f0f6ff;
}

tr:hover {
  background: #e3efff;
}

.ql-editor img,
#explanation-body img,
#question-body img {
  max-width: 100%;
  height: auto;
}