@import url('https://fonts.googleapis.com/css2?family=Shippori+Mincho:wght@500;700;800&family=Noto+Sans+JP:wght@400;500;600;700&display=swap');

:root {
  --paper: #f6f2e8;
  --paper-raised: #fffdf8;
  --ink: #262220;
  --ink-soft: #5c554e;
  --navy: #1c3a52;
  --navy-deep: #122636;
  --seal: #a83a2c;
  --seal-soft: #c65c4a;
  --gold: #a1802f;
  --line: #ddd4c0;
  --highlight: #fbe8a6;
  --highlight-strong: #f6d465;
  --radius: 3px;
  --shadow-card: 0 1px 2px rgba(38, 34, 32, 0.06), 0 6px 20px rgba(38, 34, 32, 0.08);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: 'Noto Sans JP', 'Hiragino Kaku Gothic ProN', sans-serif;
  -webkit-font-smoothing: antialiased;
}

body {
  background-image:
    linear-gradient(180deg, rgba(28,58,82,0.02), rgba(28,58,82,0) 240px),
    repeating-linear-gradient(0deg, rgba(38,34,32,0.015) 0px, rgba(38,34,32,0.015) 1px, transparent 1px, transparent 3px);
}

h1, h2, h3, .display {
  font-family: 'Shippori Mincho', serif;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--navy-deep);
  margin: 0;
}

a { color: inherit; }

button {
  font-family: inherit;
  cursor: pointer;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: var(--radius);
  border: 1px solid var(--navy);
  background: var(--navy);
  color: #fdfaf2;
  padding: 9px 18px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.03em;
  transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.12s ease;
}
.btn:hover { background: var(--navy-deep); box-shadow: 0 3px 10px rgba(18,38,54,0.25); }
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: 2px solid var(--seal); outline-offset: 2px; }

.btn.ghost {
  background: transparent;
  color: var(--navy);
  border: 1px solid var(--line);
}
.btn.ghost:hover { background: rgba(28,58,82,0.06); box-shadow: none; }

.btn.seal {
  background: var(--seal);
  border-color: var(--seal);
  color: #fff6ee;
}
.btn.seal:hover { background: #8f2f22; }

.btn.small { padding: 5px 12px; font-size: 12.5px; }
.btn.danger { color: var(--seal); border-color: var(--seal); background: transparent; }
.btn.danger:hover { background: rgba(168,58,44,0.08); }

input[type="text"], input[type="password"], textarea {
  font-family: inherit;
  font-size: 15px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper-raised);
  color: var(--ink);
  padding: 10px 12px;
  width: 100%;
}
input:focus, textarea:focus {
  outline: none;
  border-color: var(--navy);
  box-shadow: 0 0 0 3px rgba(28,58,82,0.12);
}

.top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 32px;
  border-bottom: 1px solid var(--line);
  background: var(--paper-raised);
}
.top-bar .brand {
  display: flex;
  align-items: center;
  gap: 12px;
}
.top-bar .brand .mark {
  width: 34px; height: 34px;
  border-radius: 50%;
  border: 2px solid var(--seal);
  color: var(--seal);
  display: flex; align-items: center; justify-content: center;
  font-family: 'Shippori Mincho', serif;
  font-weight: 800;
  font-size: 16px;
}
.top-bar .brand .titles h1 { font-size: 17px; }
.top-bar .brand .titles p { margin: 0; font-size: 11.5px; color: var(--ink-soft); letter-spacing: 0.05em; }

.user-chip {
  display: flex; align-items: center; gap: 10px;
  font-size: 13.5px;
  color: var(--ink-soft);
}
.user-chip .who { color: var(--ink); font-weight: 600; }

.container { max-width: 980px; margin: 0 auto; padding: 40px 24px 80px; }

/* --- hanko / seal stamp --- */
.hanko {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px; height: 30px;
  border-radius: 50%;
  border: 1.6px solid var(--seal);
  color: var(--seal);
  font-family: 'Shippori Mincho', serif;
  font-weight: 800;
  font-size: 12px;
  flex: none;
  background: rgba(168,58,44,0.04);
}

.card {
  background: var(--paper-raised);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
}

.toast {
  position: fixed;
  bottom: 24px; left: 50%;
  transform: translateX(-50%) translateY(12px);
  background: var(--navy-deep);
  color: #fdfaf2;
  padding: 12px 20px;
  border-radius: var(--radius);
  font-size: 14px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 50;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); pointer-events: auto; }
.toast.error { background: var(--seal); }

.badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 2px 8px;
  border-radius: 20px;
}
.badge.edited { background: var(--highlight); color: #6b4e00; }
.badge.new { background: var(--seal); color: #fff; }
