:root {
  --color-bg: #f7f1e8;
  --color-surface: #fffdf9;
  --color-surface-alt: #f1e9db;
  --color-text: #4e4237;
  --color-text-muted: #92846f;
  --color-primary: #bd7d67;
  --color-primary-dark: #a3654f;
  --color-secondary: #8a9678;
  --color-secondary-dark: #71805f;
  --color-border: #e6dbc8;
  --color-success-bg: #eef1e3;
  --color-success-text: #5f6f4a;
  --color-danger-bg: #f7e9e4;
  --color-danger-text: #a85847;
  --radius-lg: 14px;
  --radius-md: 10px;
  --radius-sm: 6px;
  --shadow-soft: 0 2px 10px rgba(120, 96, 68, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  font-family: "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Yu Gothic", -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--color-bg);
  color: var(--color-text);
  font-size: 16px;
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
}

h1 {
  font-size: 24px;
  font-weight: 700;
  color: var(--color-text);
  letter-spacing: 0.02em;
  margin: 0 0 4px;
}

h2 {
  font-size: 17px;
  font-weight: 700;
  color: var(--color-text);
  border-bottom: 1px solid var(--color-border);
  padding-bottom: 8px;
}

a {
  color: var(--color-primary-dark);
}

label {
  color: var(--color-text);
}

button,
input[type="submit"] {
  font-family: inherit;
  background: var(--color-primary);
  color: #fff;
  border: none;
  border-radius: var(--radius-md);
  padding: 12px 20px;
  font-size: 15px;
  cursor: pointer;
  transition: background 0.15s ease;
}

button:hover {
  background: var(--color-primary-dark);
}

button:disabled {
  background: var(--color-border);
  color: var(--color-text-muted);
  cursor: default;
}

button.secondary,
button.small,
button.ghost {
  background: var(--color-surface);
  color: var(--color-text);
  border: 1px solid var(--color-border);
}

button.secondary:hover,
button.small:hover,
button.ghost:hover {
  background: var(--color-surface-alt);
}

input[type="text"],
input[type="password"],
input[type="date"],
input[type="time"],
input[type="file"],
select,
textarea {
  font-family: inherit;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  font-size: 15px;
  background: var(--color-surface);
  color: var(--color-text);
}

input:focus,
select:focus,
textarea:focus {
  outline: 2px solid var(--color-secondary);
  outline-offset: 1px;
}

table {
  border-collapse: collapse;
}

th {
  color: var(--color-text-muted);
  font-weight: 700;
}

th,
td {
  border-bottom: 1px solid var(--color-border);
}

.ok {
  background: var(--color-success-bg);
  color: var(--color-success-text);
  border-radius: var(--radius-sm);
}

.ng {
  background: var(--color-danger-bg);
  color: var(--color-danger-text);
  border-radius: var(--radius-sm);
}

.top-link,
.back,
#logoutBtn {
  color: var(--color-text-muted) !important;
}

/* 季節の演出(桜/紫陽花/蛍/紅葉/雪) */
#seasonal-fx {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 40;
}

.fx-particle {
  position: absolute;
  top: -8%;
  animation-timing-function: linear;
  animation-iteration-count: infinite;
  will-change: transform, opacity;
}

.fx-particle:not(.fx-firefly) {
  animation-name: fx-fall;
}

.fx-firefly {
  top: auto;
  animation-name: fx-float;
  animation-timing-function: ease-in-out;
  animation-direction: alternate;
}

@keyframes fx-fall {
  0% { transform: translate(0, 0) rotate(0deg); opacity: 0; }
  8% { opacity: 0.85; }
  92% { opacity: 0.85; }
  100% { transform: translate(var(--drift, 40px), 118vh) rotate(300deg); opacity: 0; }
}

@keyframes fx-float {
  0% { transform: translate(0, 0); opacity: 0.15; }
  50% { transform: translate(var(--drift, 20px), -26px); opacity: 0.9; }
  100% { transform: translate(0, 0); opacity: 0.15; }
}

.fx-petal {
  width: 14px;
  height: 14px;
  background: radial-gradient(circle at 30% 30%, #ffe4ea, #eaa8bb);
  border-radius: 0 70% 0 70%;
}

.fx-hydrangea {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #e2e6f7, #a7b3e0);
}

.fx-firefly {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #eaf0a0;
  box-shadow: 0 0 10px 3px rgba(224, 235, 150, 0.85);
}

.fx-leaf {
  width: 13px;
  height: 13px;
  background: radial-gradient(circle at 30% 30%, #f0a860, #c26a2e);
  border-radius: 0 70% 0 70%;
}

.fx-snow {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 0 5px rgba(255, 255, 255, 0.9);
}

@media (prefers-reduced-motion: reduce) {
  #seasonal-fx {
    display: none;
  }
}
