/* 顧問先ポータル — 一般公開サイト（srkikuchi.com）のトーンに寄せたレイアウト */
:root {
  --ink: #1e2838;
  --ink-muted: #4a5568;
  --paper: #faf8f5;
  --paper-2: #f1ede8;
  --line: #d4cfc4;
  --accent: #2c4471;
  --accent-soft: #e8f1fa;
  --accent-hover: #0f3550;
  --white: #fff;
  --danger-bg: #fdeef0;
  --danger-ink: #7a1f2a;
  --shadow: 0 12px 40px rgba(20, 32, 50, 0.08);
  --radius: 12px;
  --radius-btn: 10px;
  --font-body: "Noto Sans JP", "Hiragino Sans", "Yu Gothic UI", system-ui, sans-serif;
  --font-display: "Zen Kaku Gothic New", "Noto Sans JP", sans-serif;
  --max: 640px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  font-family: var(--font-body);
  font-size: clamp(0.9375rem, 2.8vw, 1rem);
  line-height: 1.75;
  color: var(--ink);
  background: var(--paper);
  padding-left: env(safe-area-inset-left, 0);
  padding-right: env(safe-area-inset-right, 0);
  padding-bottom: env(safe-area-inset-bottom, 0);
}

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:hover {
  color: var(--accent-hover);
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -100px;
  padding: 0.5rem 1rem;
  background: var(--ink);
  color: var(--white);
  z-index: 100;
  border-radius: 4px;
}

.skip-link:focus {
  top: 1rem;
}

.muted {
  color: var(--ink-muted);
}

.small {
  font-size: 0.875rem;
}

.is-hidden {
  display: none !important;
}

/* Header */
.portal-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(247, 245, 240, 0.94);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  padding-top: env(safe-area-inset-top, 0);
}

.portal-header__inner {
  width: min(100% - 1.5rem, calc(var(--max) + 2rem));
  margin-inline: auto;
  min-height: 3.75rem;
  display: flex;
  align-items: center;
}

.portal-brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.portal-brand__mark {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 10px;
  background: linear-gradient(145deg, var(--accent) 0%, #1a2d4d 100%);
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(44, 68, 113, 0.25);
}

.portal-brand__text {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  min-width: 0;
}

.portal-brand__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1rem, 3.5vw, 1.15rem);
  letter-spacing: 0.02em;
  line-height: 1.25;
}

.portal-brand__sub {
  font-size: 0.75rem;
  color: var(--ink-muted);
  font-weight: 500;
}

/* Main */
.portal-main {
  flex: 1;
  width: min(100% - 1.5rem, var(--max));
  margin-inline: auto;
  padding-block: 1.5rem 2rem;
}

.panel {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(1.25rem, 4vw, 1.75rem);
  box-shadow: var(--shadow);
}

.panel--center {
  text-align: center;
}

.panel__heading {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.25rem, 4vw, 1.5rem);
  margin: 0 0 0.75rem;
  color: var(--ink);
}

.panel__subheading {
  font-family: var(--font-display);
  font-size: 1.05rem;
  margin: 1.5rem 0 0.5rem;
}

.panel__lead {
  margin: 0 0 1.25rem;
  color: var(--ink-muted);
  font-size: 0.9375rem;
}

.divider {
  border: none;
  border-top: 1px solid var(--line);
  margin: 1.75rem 0;
}

/* Buttons */
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.actions--stack {
  flex-direction: column;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: inherit;
  font-weight: 600;
  font-size: 1rem;
  line-height: 1.3;
  padding: 0.85rem 1.25rem;
  border-radius: var(--radius-btn);
  border: 2px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease, transform 0.1s ease;
}

.btn:active {
  transform: scale(0.98);
}

.btn:focus-visible {
  outline: 3px solid var(--accent-soft);
  outline-offset: 2px;
}

.btn--large {
  min-height: 52px;
  width: 100%;
  font-size: 1.05rem;
  padding: 1rem 1.25rem;
}

.btn--primary {
  background: var(--accent);
  color: var(--white);
  border-color: var(--accent);
}

.btn--primary:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
}

.btn--secondary {
  background: var(--paper-2);
  color: var(--ink);
  border-color: var(--line);
}

.btn--secondary:hover {
  background: var(--line);
}

.btn--ghost {
  background: transparent;
  color: var(--accent);
  border-color: var(--accent);
  width: auto;
  min-height: 44px;
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
}

.btn--ghost:hover {
  background: var(--accent-soft);
}

/* Form */
.form-email {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 0.75rem;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  text-align: left;
}

.field__label {
  font-weight: 600;
  font-size: 0.9rem;
}

.field input {
  font: inherit;
  padding: 0.85rem 1rem;
  border-radius: var(--radius-btn);
  border: 1px solid var(--line);
  background: var(--white);
  min-height: 52px;
}

.field input:focus {
  border-color: var(--accent);
  outline: none;
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.form-message {
  margin-top: 0.75rem;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-btn);
  background: var(--accent-soft);
  color: var(--ink);
  font-size: 0.9rem;
}

.form-message.is-error {
  background: var(--danger-bg);
  color: var(--danger-ink);
}

/* Dashboard */
.dash-head {
  display: grid;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

@media (min-width: 480px) {
  .dash-head {
    grid-template-columns: 1fr auto;
    align-items: start;
  }

  .dash-head__title {
    grid-column: 1;
  }

  .dash-head__meta {
    grid-column: 1;
  }

  #btnLogoutDash {
    grid-column: 2;
    grid-row: 1 / span 2;
    align-self: start;
    justify-self: end;
  }
}

.dash-head__meta {
  margin: 0;
}

.dash-head__title {
  margin: 0;
}

.section-block {
  margin-top: 1.5rem;
}

.section-block__title {
  font-family: var(--font-display);
  font-size: 1.1rem;
  margin: 0 0 0.65rem;
  padding-bottom: 0.35rem;
  border-bottom: 2px solid var(--accent-soft);
}

.notice-box {
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-btn);
  padding: 1rem 1.1rem;
  min-height: 3rem;
}

.notice-box:empty::before,
.notice-box.is-empty::before {
  content: "現在、お知らせはありません。";
  color: var(--ink-muted);
}

.doc-list {
  list-style: none;
  margin: 0.75rem 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.doc-list a {
  display: flex;
  align-items: center;
  min-height: 56px;
  padding: 0.85rem 1.1rem;
  background: var(--accent-soft);
  border: 1px solid rgba(44, 68, 113, 0.15);
  border-radius: var(--radius-btn);
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.doc-list a:hover {
  background: #dce9f7;
  border-color: var(--accent);
  color: var(--accent-hover);
}

.doc-list a::after {
  content: "";
  margin-left: auto;
  width: 0.5rem;
  height: 0.5rem;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(-45deg);
  flex-shrink: 0;
}

/* Footer */
.portal-footer {
  margin-top: auto;
  padding: 1rem 1rem 1.5rem;
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.6);
}

.portal-footer__inner {
  width: min(100% - 1.5rem, var(--max));
  margin-inline: auto;
}

.portal-footer p {
  margin: 0;
}
