/* ========================================================
   Shared stylesheet for 羽田 悠輔 PORTAL policy / info pages
   Cream-and-ink documents that quietly echo the sloth room
   ======================================================== */

:root {
  --ink:        #2a1f14;
  --ink-soft:   #5a4530;
  --ink-mute:   #8a7152;
  --paper:      #fdf8ec;
  --paper-2:    #f6eed8;
  --rule:       rgba(120, 85, 50, 0.18);
  --accent:     #c97a3b;
  --accent-2:   #8fc7bf;
  --leaf:       #6b8e6f;
  --shadow:     0 2px 14px rgba(80, 50, 20, 0.06);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  font-family:
    'M PLUS Rounded 1c', -apple-system, BlinkMacSystemFont,
    'Hiragino Kaku Gothic ProN', 'Yu Gothic UI', 'Meiryo', sans-serif;
  background: var(--paper);
  background-image:
    radial-gradient(1200px 400px at 12% -10%, #fff3d0 0%, transparent 60%),
    radial-gradient(900px 360px at 95% 110%, #f3e6c4 0%, transparent 55%);
  background-attachment: fixed;
  color: var(--ink);
  line-height: 1.85;
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "palt";
}

/* ---------- Top bar ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(253, 248, 236, 0.88);
  backdrop-filter: blur(12px) saturate(1.2);
  -webkit-backdrop-filter: blur(12px) saturate(1.2);
  border-bottom: 1px solid var(--rule);
}
.topbar-inner {
  max-width: 760px;
  margin: 0 auto;
  padding: 12px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ink);
}
.brand .mark {
  width: 30px; height: 30px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 30% 30%, #fff9, transparent 55%),
    linear-gradient(135deg, var(--accent-2) 0%, #c8a175 100%);
  position: relative;
  box-shadow: inset 0 -2px 4px rgba(0,0,0,0.12);
  flex: none;
}
.brand .mark::after {
  content: '';
  position: absolute; inset: 6px;
  border-radius: 50%;
  background: #6b4a2e;
  box-shadow:
    -3px -1px 0 -1px #fff inset,
     3px -1px 0 -1px #fff inset;
}
.brand .name {
  font-family: 'Fraunces', 'Times New Roman', serif;
  font-style: italic;
  font-weight: 500;
  font-size: 17px;
  line-height: 1;
}
.brand .name small {
  display: block;
  font-family: 'M PLUS Rounded 1c', sans-serif;
  font-style: normal;
  font-size: 9px;
  font-weight: 700;
  color: var(--ink-soft);
  letter-spacing: 0.28em;
  margin-top: 3px;
}
.topbar nav {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}
.topbar nav a {
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-soft);
  text-decoration: none;
  padding: 6px 10px;
  border-radius: 999px;
  transition: background 0.2s, color 0.2s;
  white-space: nowrap;
}
.topbar nav a:hover { background: rgba(120, 85, 50, 0.08); color: var(--ink); }
.topbar nav a.current {
  background: rgba(201, 122, 59, 0.13);
  color: var(--accent);
}

/* ---------- Document container ---------- */
.doc {
  max-width: 720px;
  margin: 0 auto;
  padding: 56px 24px 96px;
}

/* ---------- Heading block ---------- */
.doc-head {
  margin-bottom: 40px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--rule);
  position: relative;
}
.doc-head .eyebrow {
  display: inline-block;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.36em;
  color: var(--accent);
  text-transform: uppercase;
  padding: 4px 12px;
  border-radius: 999px;
  background: rgba(201, 122, 59, 0.10);
  margin-bottom: 18px;
}
.doc-head h1 {
  font-family: 'Fraunces', 'Times New Roman', serif;
  font-style: italic;
  font-weight: 700;
  font-size: clamp(28px, 5vw, 38px);
  line-height: 1.25;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin-bottom: 10px;
}
.doc-head .lede {
  font-size: 14px;
  color: var(--ink-soft);
  max-width: 56ch;
  line-height: 1.7;
}
.doc-head .meta {
  margin-top: 20px;
  font-size: 11px;
  color: var(--ink-mute);
  letter-spacing: 0.04em;
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
}
.doc-head .meta span b {
  color: var(--ink-soft);
  font-weight: 700;
}

/* ---------- Body typography ---------- */
.doc h2 {
  font-family: 'Fraunces', 'Times New Roman', serif;
  font-style: italic;
  font-weight: 700;
  font-size: 22px;
  margin: 52px 0 14px;
  color: var(--ink);
  display: flex;
  align-items: baseline;
  gap: 12px;
}
.doc h2::before {
  content: '§';
  color: var(--accent);
  font-style: normal;
  font-weight: 500;
  font-size: 17px;
}
.doc h3 {
  font-size: 14px;
  font-weight: 800;
  margin: 28px 0 8px;
  letter-spacing: 0.04em;
  color: var(--ink);
}
.doc p { margin: 0 0 14px; text-wrap: pretty; }
.doc p + p { margin-top: 0; }

.doc strong { font-weight: 800; color: var(--ink); }
.doc em { font-style: italic; color: var(--ink-soft); }

.doc a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}
.doc a:hover { text-decoration-thickness: 2px; }

.doc ul, .doc ol {
  margin: 0 0 18px 0;
  padding-left: 22px;
}
.doc li { margin-bottom: 6px; }
.doc ul li::marker { color: var(--accent); }

.doc dl {
  margin: 0 0 18px;
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 8px 18px;
}
.doc dl dt {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: var(--ink-soft);
  padding-top: 3px;
}
.doc dl dd { margin: 0; }

@media (max-width: 540px) {
  .doc dl { grid-template-columns: 1fr; gap: 2px 0; }
  .doc dl dt { padding-top: 12px; font-size: 11px; }
}

/* ---------- Callout / note boxes ---------- */
.note {
  background: rgba(255, 245, 220, 0.7);
  border: 1px solid rgba(201, 122, 59, 0.22);
  border-left: 3px solid var(--accent);
  padding: 16px 18px;
  border-radius: 8px;
  margin: 18px 0 22px;
  font-size: 14px;
}
.note.warn {
  background: rgba(255, 232, 220, 0.7);
  border-color: rgba(197, 74, 42, 0.3);
  border-left-color: #c54a2a;
}
.note.warn::before {
  content: '⚠ ';
  font-weight: 700;
  color: #c54a2a;
}
.note .label {
  display: block;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.22em;
  color: var(--accent);
  margin-bottom: 6px;
}
.note.warn .label { color: #c54a2a; }

/* ---------- TOC ---------- */
.toc {
  background: rgba(246, 238, 216, 0.55);
  border: 1px solid var(--rule);
  border-radius: 12px;
  padding: 16px 20px;
  margin: 0 0 36px;
  font-size: 13px;
}
.toc .label {
  display: block;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.24em;
  color: var(--ink-soft);
  margin-bottom: 8px;
}
.toc ol {
  margin: 0;
  padding-left: 22px;
  columns: 2;
  column-gap: 20px;
}
.toc ol li { margin-bottom: 4px; break-inside: avoid; }
.toc a {
  color: var(--ink);
  text-decoration: none;
}
.toc a:hover { color: var(--accent); }
@media (max-width: 540px) {
  .toc ol { columns: 1; }
}

/* ---------- Inline contact card ---------- */
.contact-card {
  margin: 24px 0;
  padding: 20px 22px;
  background: rgba(255, 248, 232, 0.7);
  border: 1px solid var(--rule);
  border-radius: 14px;
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.contact-card .ic {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, #f5d89a, var(--accent));
  display: flex; align-items: center; justify-content: center;
  flex: none;
  font-size: 20px;
}
.contact-card .body { flex: 1; min-width: 200px; }
.contact-card .body strong {
  display: block;
  margin-bottom: 2px;
  font-size: 13px;
  letter-spacing: 0.04em;
}
.contact-card .body small {
  color: var(--ink-soft);
  font-size: 12px;
}
.contact-card a.btn {
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  font-size: 13px;
  padding: 10px 18px;
  border-radius: 999px;
  box-shadow: 0 4px 10px rgba(201, 122, 59, 0.3);
  transition: all 0.2s;
  white-space: nowrap;
}
.contact-card a.btn:hover { transform: translateY(-2px); box-shadow: 0 6px 14px rgba(201, 122, 59, 0.4); }

/* ---------- Form ---------- */
.form-grid {
  display: grid;
  gap: 14px;
  margin: 18px 0 22px;
}
.field label {
  display: block;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
  color: var(--ink-soft);
  margin-bottom: 6px;
  text-transform: uppercase;
}
.field label .req {
  color: var(--accent);
  margin-left: 3px;
}
.field input,
.field textarea,
.field select {
  width: 100%;
  font-family: inherit;
  font-size: 14px;
  padding: 11px 14px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid var(--rule);
  border-radius: 10px;
  color: var(--ink);
  outline: none;
  transition: border-color 0.2s, background 0.2s;
}
.field input:focus,
.field textarea:focus,
.field select:focus {
  border-color: var(--accent);
  background: #fff;
}
.field textarea { min-height: 140px; resize: vertical; line-height: 1.6; }
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  background: linear-gradient(135deg, var(--accent), #a86028);
  color: #fff;
  border: none;
  padding: 12px 22px;
  border-radius: 999px;
  cursor: pointer;
  box-shadow: 0 6px 16px rgba(201, 122, 59, 0.35);
  transition: transform 0.2s, box-shadow 0.2s;
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 10px 22px rgba(201, 122, 59, 0.45); }
.btn-primary:active { transform: translateY(0); }

/* ---------- Footer ---------- */
.footer {
  border-top: 1px solid var(--rule);
  margin-top: 60px;
  padding: 28px 24px 36px;
  font-size: 12px;
  color: var(--ink-mute);
  text-align: center;
}
.footer .links {
  margin-bottom: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  justify-content: center;
}
.footer a {
  color: var(--ink-soft);
  text-decoration: none;
}
.footer a:hover { color: var(--accent); }
.footer .copy {
  font-family: 'Fraunces', serif;
  font-style: italic;
  font-size: 13px;
  color: var(--ink-soft);
}

/* ---------- Subtle sloth silhouette in corner ---------- */
.corner-sloth {
  position: fixed;
  right: -20px;
  bottom: -10px;
  width: 140px;
  height: 140px;
  pointer-events: none;
  opacity: 0.06;
  z-index: 0;
  background: radial-gradient(circle at 40% 35%, var(--ink) 0%, var(--ink) 36%, transparent 38%),
              radial-gradient(circle at 55% 60%, var(--ink) 0%, var(--ink) 40%, transparent 42%);
}

/* print */
@media print {
  .topbar, .footer, .corner-sloth { display: none; }
  body { background: white; }
  .doc { padding: 0; max-width: 100%; }
  .doc a { color: inherit; text-decoration: none; }
}
