/* 文殊:共通の見た目(深緑 × 和紙 × 金箔の細線)。外部の書体は読まない(端末の書体だけ) */
:root {
  --green: #1f3a30;
  --green-soft: #2e5244;
  --green-deep: #142820;
  --gold: #b8913e;
  --gold-hair: rgba(184, 145, 62, 0.45);
  --gold-hair-soft: rgba(184, 145, 62, 0.22);
  --washi: #f6f1e3;
  --washi-deep: #ece4cf;
  --surface: #fffdf7;
  --text: #2a2721;
  --muted: #7a7363;
  --line: #e2dac4;
  --danger: #a3432f;
  --ok: #3d6b4f;
  --radius: 10px;
  --font-ui: -apple-system, "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic UI", "Yu Gothic", sans-serif;
  --font-mincho: "Hiragino Mincho ProN", "Yu Mincho", "YuMincho", serif;
  color-scheme: light;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: var(--font-ui);
  color: var(--text);
  background-color: var(--washi);
  /* 和紙のような、ごく薄いむら */
  background-image:
    radial-gradient(ellipse at 20% 10%, rgba(255, 255, 255, 0.55), transparent 55%),
    radial-gradient(ellipse at 80% 90%, rgba(214, 200, 160, 0.25), transparent 60%);
  background-attachment: fixed;
  -webkit-text-size-adjust: 100%;
  line-height: 1.6;
}
a { color: var(--green-soft); }
button, input, select, textarea { font: inherit; color: inherit; }

.brand-mark {
  font-family: var(--font-mincho);
  font-weight: 600;
  letter-spacing: 0.18em;
  color: var(--green);
  font-size: 1.25rem;
}
.brand-mark.big { font-size: 2.4rem; letter-spacing: 0.3em; }
.brand-sub { font-size: 0.72rem; color: var(--gold); letter-spacing: 0.25em; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.3em;
  min-height: 40px; padding: 0 16px;
  border: 1px solid var(--gold-hair); border-radius: 999px;
  background: var(--surface); color: var(--green);
  cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: background 0.15s, box-shadow 0.15s;
}
.btn:hover { background: #fff; box-shadow: 0 0 0 3px var(--gold-hair-soft); }
.btn.primary { background: var(--green); color: #fbf6e6; border-color: var(--green); }
.btn.primary:hover { background: var(--green-soft); }
.btn.danger { color: var(--danger); border-color: rgba(163, 67, 47, 0.4); }
.btn.small { min-height: 34px; padding: 0 12px; font-size: 0.88rem; }
.btn.wide { width: 100%; }
.btn:focus-visible, .input:focus-visible, .icon-btn:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

.icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: 50%;
  border: 1px solid transparent; background: transparent; color: var(--green);
  font-size: 1.25rem; cursor: pointer; text-decoration: none;
}
.icon-btn:hover { border-color: var(--gold-hair); background: var(--surface); }

.input {
  width: 100%; min-height: 42px; padding: 8px 12px;
  border: 1px solid var(--line); border-radius: 8px; background: #fff;
  font-size: 16px; /* iPhone で拡大されないように */
}
.input:focus { border-color: var(--gold); outline: none; box-shadow: 0 0 0 3px var(--gold-hair-soft); }
.field { display: flex; flex-direction: column; gap: 4px; margin: 0 0 12px; }
.field > span { font-size: 0.85rem; color: var(--muted); }
.hint { color: var(--muted); font-size: 0.86rem; margin: 6px 0; }
.hint.error, .msg { color: var(--danger); }

/* ---- ログイン ---- */
.login-body { min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; padding: 16px; }
.login-card {
  width: min(380px, 100%); padding: 36px 28px 28px;
  background: var(--surface); border-radius: 16px;
  border: 1px solid var(--gold-hair);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.8) inset, 0 18px 40px -24px rgba(31, 58, 48, 0.45);
  display: flex; flex-direction: column; gap: 12px;
}
.login-brand { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.login-lead { text-align: center; color: var(--muted); margin: 0 0 8px; font-size: 0.9rem; border-bottom: 1px solid var(--gold-hair-soft); padding-bottom: 14px; }
.msg { min-height: 1.4em; margin: 0; font-size: 0.9rem; text-align: center; }
