/* ===========================
   レアホア SR Bot - Style Sheet (Light Refined)
   © 社労士法人レアホア
   =========================== */

:root {
  --primary: #1a3a6b;
  --primary-light: #2a537f;
  --primary-dark: #0f2347;
  --accent: #c9a84c;
  --accent-light: #e8c87a;
  --accent-glow: rgba(201, 168, 76, 0.25);
  --bg: #f4f6fb;
  --bg-sidebar: #ffffff;
  --bg-card: #ffffff;
  --bg-header: #ffffff;
  --text-primary: #1a2d4a;
  --text-secondary: #4a6080;
  --text-muted: #8fa3c0;
  --user-bubble: linear-gradient(135deg, #1e3a7a, #2a53a0);
  --bot-bubble: #ffffff;
  --border: rgba(26, 58, 107, 0.12);
  --border-accent: rgba(201, 168, 76, 0.35);
  --success: #27ae60;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow-sm: 0 2px 12px rgba(26, 58, 107, 0.08);
  --shadow: 0 8px 28px rgba(26, 58, 107, 0.12);
  --shadow-lg: 0 20px 60px rgba(26, 58, 107, 0.16);
  --transition: 0.22s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html, body {
  height: 100%;
  font-family: 'Noto Sans JP', sans-serif;
  background: var(--bg);
  color: var(--text-primary);
  overflow: hidden;
}

/* ===== MODAL ===== */
.modal-overlay {
  position: fixed; inset: 0; z-index: 1000;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #e8edf8 0%, #f4f6fb 100%);
  transition: opacity 0.4s ease;
}
.modal-overlay.hidden { opacity: 0; pointer-events: none; display: none; }

/* ===== PW ERROR / HINT ===== */
.pw-error {
  font-size: 13px;
  color: #c0392b;
  background: rgba(192, 57, 43, 0.08);
  border: 1px solid rgba(192, 57, 43, 0.25);
  border-radius: 8px;
  padding: 9px 14px;
  margin-bottom: 16px;
  font-weight: 600;
  text-align: center;
  animation: slideUp 0.3s ease;
}
.pw-error.hidden { display: none; }
.pw-hint { margin-bottom: 16px; }

.modal-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 48px 40px;
  width: 100%; max-width: 460px;
  box-shadow: var(--shadow-lg);
  animation: slideUp 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(30px) scale(0.95); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20%       { transform: translateX(-8px); }
  40%       { transform: translateX(8px); }
  60%       { transform: translateX(-5px); }
  80%       { transform: translateX(5px); }
}

.modal-logo {
  text-align: center; margin-bottom: 36px;
}
.modal-logo img.logo-img {
  height: 64px; width: auto; object-fit: contain;
  margin-bottom: 14px; display: block; margin-left: auto; margin-right: auto;
}
.modal-logo .logo-icon-fallback {
  font-size: 44px; display: block; margin-bottom: 12px;
}
.modal-logo h2 {
  font-family: 'Outfit', sans-serif;
  font-size: 22px; font-weight: 700;
  color: var(--primary);
  letter-spacing: 0.04em;
}
.modal-logo p { color: var(--text-secondary); font-size: 13px; margin-top: 6px; }

.modal-body label {
  display: block; font-size: 13px; font-weight: 600;
  color: var(--text-secondary); margin-bottom: 10px; letter-spacing: 0.03em;
}

.input-wrapper {
  display: flex; align-items: center;
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 4px 4px 4px 14px;
  transition: border-color var(--transition), box-shadow var(--transition);
  margin-bottom: 14px;
}
.input-wrapper:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(26, 58, 107, 0.1);
}
.input-wrapper input {
  flex: 1; background: none; border: none; outline: none;
  color: var(--text-primary); font-size: 14px;
  font-family: 'Outfit', monospace; padding: 10px 0;
}
.input-wrapper input::placeholder { color: var(--text-muted); }

#toggle-visibility {
  background: none; border: none; cursor: pointer;
  font-size: 16px; padding: 8px 10px; border-radius: 8px;
  transition: background var(--transition); color: var(--text-muted);
}
#toggle-visibility:hover { background: var(--bg); }

.modal-hint {
  font-size: 12px; color: var(--text-muted); line-height: 1.7; margin-bottom: 24px;
}
.modal-hint a { color: var(--primary); text-decoration: none; }
.modal-hint a:hover { text-decoration: underline; }

.btn-primary {
  width: 100%; padding: 14px;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  border: none; border-radius: var(--radius-sm); cursor: pointer;
  font-family: 'Noto Sans JP', sans-serif;
  font-size: 15px; font-weight: 700;
  color: #ffffff;
  letter-spacing: 0.05em;
  transition: all var(--transition);
  box-shadow: 0 4px 16px rgba(26, 58, 107, 0.25);
}
.btn-primary:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(26, 58, 107, 0.35);
}
.btn-primary:disabled { opacity: 0.35; cursor: not-allowed; }

/* ===== APP LAYOUT ===== */
.app {
  display: flex; height: 100vh; overflow: hidden;
}
.app.hidden { display: none; }

/* ===== SIDEBAR ===== */
.sidebar {
  width: 268px; min-width: 268px;
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border);
  display: flex; flex-direction: column;
  overflow: hidden;
  box-shadow: 2px 0 12px rgba(26,58,107,0.06);
  transition: transform var(--transition);
}

.sidebar-header {
  padding: 24px 20px 20px;
  border-bottom: 3px solid var(--accent);
  background: linear-gradient(160deg, var(--primary-dark) 0%, var(--primary) 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
}
.sidebar-logo {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  width: 100%;
}
.sidebar-logo .logo-frame {
  background: #ffffff;
  border-radius: 14px;
  padding: 8px 16px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 200px;
}
.sidebar-logo img.logo-img {
  height: 44px; width: auto; object-fit: contain;
  display: block;
}
.sidebar-logo .logo-icon-fallback {
  font-size: 36px;
}
.sidebar-logo-text {
  text-align: center;
}
.sidebar-logo-text h1 {
  font-family: 'Outfit', sans-serif;
  font-size: 12px; font-weight: 700;
  color: rgba(255,255,255,0.9);
  letter-spacing: 0.05em;
}
.sidebar-logo-text p { font-size: 10px; color: rgba(255,255,255,0.55); margin-top: 2px; }

/* ボット説明 */
.bot-description {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid rgba(255,255,255,0.15);
  width: 100%;
}
.bot-description > p {
  font-size: 11px;
  color: rgba(255,255,255,0.8);
  line-height: 1.7;
  margin-bottom: 8px;
  text-align: left;
}
.bot-description > p strong {
  color: var(--accent-light);
  font-weight: 700;
}
.bot-description ul {
  list-style: none; padding: 0; margin: 0 0 8px;
  display: flex; flex-direction: column; gap: 4px;
}
.bot-description ul li {
  font-size: 11px;
  color: rgba(255,255,255,0.75);
  padding: 3px 6px;
  background: rgba(255,255,255,0.08);
  border-radius: 6px;
  text-align: left;
}
.bot-desc-note {
  font-size: 10px;
  color: rgba(255,255,255,0.45);
  text-align: center;
  font-style: italic;
  margin-bottom: 8px;
}
.contact-link {
  display: block;
  text-align: center;
  font-size: 11px; font-weight: 700;
  color: var(--accent-light);
  text-decoration: none;
  padding: 6px 10px;
  border: 1px solid rgba(201,168,76,0.4);
  border-radius: 8px;
  background: rgba(201,168,76,0.08);
  transition: all var(--transition);
  letter-spacing: 0.03em;
}
.contact-link:hover {
  background: rgba(201,168,76,0.2);
  border-color: var(--accent-light);
  color: #ffffff;
}



.sidebar-nav {
  flex: 1; overflow-y: auto; padding: 14px 10px;
}
.sidebar-nav::-webkit-scrollbar { width: 4px; }
.sidebar-nav::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }

.nav-label {
  font-size: 10px; font-weight: 700;
  color: var(--text-muted); letter-spacing: 0.1em;
  text-transform: uppercase; padding: 8px 10px 10px;
}

.nav-item {
  display: block; width: 100%;
  background: none; border: none; cursor: pointer;
  text-align: left; padding: 9px 14px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary); font-size: 13px;
  font-family: 'Noto Sans JP', sans-serif;
  transition: all var(--transition);
  margin-bottom: 2px;
}
.nav-item:hover {
  background: rgba(26,58,107,0.07);
  color: var(--primary);
  padding-left: 18px;
}
.nav-item.active {
  background: linear-gradient(135deg, rgba(26,58,107,0.1), rgba(26,58,107,0.05));
  color: var(--primary);
  border: 1px solid rgba(26,58,107,0.15);
  font-weight: 600;
}

.sidebar-footer {
  padding: 14px 10px;
  border-top: 1px solid var(--border);
  display: flex; flex-direction: column; gap: 8px;
}

.btn-clear {
  background: rgba(220,53,69,0.06); border: 1px solid rgba(220,53,69,0.18);
  border-radius: var(--radius-sm); padding: 9px;
  color: #c0392b; font-size: 13px; cursor: pointer;
  font-family: 'Noto Sans JP', sans-serif;
  transition: all var(--transition);
}
.btn-clear:hover { background: rgba(220,53,69,0.12); }

.btn-secondary-small {
  background: var(--bg); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 9px;
  color: var(--text-secondary); font-size: 13px; cursor: pointer;
  font-family: 'Noto Sans JP', sans-serif;
  transition: all var(--transition);
}
.btn-secondary-small:hover { border-color: var(--primary); color: var(--primary); }

/* ===== CHAT AREA ===== */
.chat-area {
  flex: 1; display: flex; flex-direction: column; overflow: hidden;
  background: var(--bg);
}

.chat-header {
  padding: 14px 24px;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 14px;
  background: var(--bg-header);
  box-shadow: var(--shadow-sm);
}

.menu-toggle {
  display: none;
  background: none; border: none; cursor: pointer;
  color: var(--text-secondary); font-size: 20px; padding: 4px;
}

/* ロゴ in header */
.header-logo {
  display: flex; align-items: center; gap: 10px;
  flex: 1;
}
.header-logo img.logo-img {
  height: 30px; width: auto; object-fit: contain;
}
.header-logo .logo-icon-fallback { font-size: 22px; }
.header-info {
  display: flex; flex-direction: column;
}
.header-title { font-size: 14px; font-weight: 600; color: var(--text-primary); }
.header-sub { font-size: 11px; color: var(--text-muted); }

.header-status {
  display: flex; align-items: center; gap: 6px; margin-left: auto;
}
.status-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 6px var(--success);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; transform: scale(0.9); }
}
.status-text { font-size: 12px; color: var(--text-muted); }

.header-badge {
  background: linear-gradient(135deg, rgba(26,58,107,0.1), rgba(26,58,107,0.06));
  border: 1px solid rgba(26,58,107,0.2);
  color: var(--primary);
  font-size: 11px; font-weight: 700;
  padding: 4px 12px; border-radius: 20px;
  letter-spacing: 0.06em;
}

/* ===== MESSAGES ===== */
.chat-messages {
  flex: 1; overflow-y: auto; padding: 28px 28px 10px;
  display: flex; flex-direction: column; gap: 20px;
}
.chat-messages::-webkit-scrollbar { width: 6px; }
.chat-messages::-webkit-scrollbar-track { background: transparent; }
.chat-messages::-webkit-scrollbar-thumb { background: var(--border); border-radius: 6px; }

/* Welcome Screen */
.welcome-screen {
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; text-align: center;
  min-height: 72%;
  animation: fadeIn 0.7s ease;
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}

.welcome-logo-area {
  margin-bottom: 20px;
}
.welcome-logo-area img.logo-img {
  height: 72px; width: auto; object-fit: contain;
  filter: drop-shadow(0 4px 16px rgba(26,58,107,0.15));
  animation: float 4s ease-in-out infinite;
}
.welcome-logo-area .logo-icon-fallback {
  font-size: 64px;
  filter: drop-shadow(0 4px 16px rgba(26,58,107,0.18));
  animation: float 4s ease-in-out infinite;
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-8px); }
}

.welcome-screen h2 {
  font-size: 24px; font-weight: 700; margin-bottom: 10px;
  color: var(--primary);
}
.welcome-screen p {
  color: var(--text-secondary); font-size: 14px; line-height: 1.85;
  max-width: 500px; margin-bottom: 30px;
}

.welcome-chips {
  display: flex; flex-wrap: wrap; gap: 10px; justify-content: center;
}
.chip {
  background: #ffffff;
  border: 1.5px solid var(--border);
  border-radius: 20px; padding: 10px 18px;
  color: var(--text-secondary); font-size: 13px; cursor: pointer;
  font-family: 'Noto Sans JP', sans-serif;
  transition: all var(--transition);
  box-shadow: var(--shadow-sm);
}
.chip:hover {
  border-color: var(--primary); color: var(--primary);
  background: rgba(26,58,107,0.04);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

/* Message Bubbles */
.message {
  display: flex; align-items: flex-start; gap: 12px;
  animation: messageIn 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes messageIn {
  from { opacity: 0; transform: translateY(10px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
.message.user { flex-direction: row-reverse; }

.avatar {
  width: 38px; height: 38px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; flex-shrink: 0;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.message.bot .avatar {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  border: 1.5px solid rgba(26,58,107,0.2);
}
.message.bot .avatar img {
  width: 100%; height: 100%; object-fit: cover;
  filter: brightness(0) invert(1);
}
.message.user .avatar {
  background: linear-gradient(135deg, #2d6a4f, #1b4332);
  border: 1.5px solid rgba(46,204,113,0.2);
}

.bubble {
  max-width: 70%; border-radius: var(--radius);
  padding: 14px 18px; font-size: 14px; line-height: 1.9;
  position: relative;
}
.message.bot .bubble {
  background: var(--bot-bubble);
  border: 1px solid var(--border);
  border-top-left-radius: 4px;
  color: var(--text-primary);
  box-shadow: var(--shadow-sm);
}
.message.user .bubble {
  background: var(--user-bubble);
  border: none;
  border-top-right-radius: 4px;
  color: #ffffff;
  box-shadow: 0 4px 16px rgba(26,58,107,0.25);
}

/* Markdown formatting */
.bubble h2 {
  font-size: 14px; font-weight: 700; color: var(--primary);
  margin: 14px 0 7px; border-bottom: 2px solid var(--border-accent);
  padding-bottom: 5px; letter-spacing: 0.02em;
}
.bubble h2:first-child { margin-top: 0; }
.bubble h3 { font-size: 13px; font-weight: 700; margin: 10px 0 5px; color: var(--primary-light); }
.bubble p { margin-bottom: 8px; }
.bubble p:last-child { margin-bottom: 0; }
.bubble ul, .bubble ol { padding-left: 18px; margin-bottom: 8px; }
.bubble li { margin-bottom: 5px; }
.bubble strong { color: var(--primary); font-weight: 700; }
.message.user .bubble strong { color: var(--accent-light); }
.bubble hr { border: none; border-top: 1px solid var(--border); margin: 12px 0; }
.bubble code {
  background: rgba(26,58,107,0.07); padding: 2px 7px;
  border-radius: 4px; font-family: monospace; font-size: 12px;
  color: var(--primary);
}
.message.user .bubble code { background: rgba(255,255,255,0.15); color: #fff; }

.timestamp {
  font-size: 11px; color: var(--text-muted);
  margin-top: 5px; text-align: right;
}
.message.bot .timestamp { text-align: left; }

/* Typing indicator */
.typing-indicator {
  display: flex; align-items: center; gap: 12px;
  animation: messageIn 0.35s ease;
}
.typing-dots {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius); border-top-left-radius: 4px;
  padding: 14px 18px;
  display: flex; align-items: center; gap: 6px;
  box-shadow: var(--shadow-sm);
}
.dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--primary);
  animation: bounce 1.4s infinite;
}
.dot:nth-child(2) { animation-delay: 0.2s; }
.dot:nth-child(3) { animation-delay: 0.4s; }
@keyframes bounce {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.35; }
  30% { transform: translateY(-7px); opacity: 1; }
}

/* ===== INPUT AREA ===== */
.chat-input-area {
  padding: 14px 24px 18px;
  border-top: 1px solid var(--border);
  background: var(--bg-header);
  box-shadow: 0 -2px 12px rgba(26,58,107,0.06);
}

.input-container {
  display: flex; align-items: flex-end; gap: 10px;
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 8px 8px 8px 16px;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.input-container:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(26,58,107,0.1);
  background: #fff;
}

#user-input {
  flex: 1; background: none; border: none; outline: none;
  color: var(--text-primary); font-size: 14px; line-height: 1.7;
  font-family: 'Noto Sans JP', sans-serif;
  resize: none; max-height: 160px;
  scrollbar-width: none;
}
#user-input::-webkit-scrollbar { display: none; }
#user-input::placeholder { color: var(--text-muted); }

.send-btn {
  width: 42px; height: 42px; border-radius: 12px; flex-shrink: 0;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all var(--transition);
  box-shadow: 0 4px 12px rgba(26,58,107,0.28);
}
.send-btn:hover:not(:disabled) {
  transform: scale(1.08);
  box-shadow: 0 6px 20px rgba(26,58,107,0.4);
}
.send-btn:disabled { opacity: 0.3; cursor: not-allowed; transform: none; }
.send-btn svg { width: 17px; height: 17px; color: #ffffff; }

/* ===== マイクボタン ===== */
.mic-btn {
  width: 38px; height: 38px; border-radius: 10px; flex-shrink: 0;
  background: none; border: 1.5px solid var(--border);
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: all var(--transition); color: var(--text-muted);
}
.mic-btn svg { width: 16px; height: 16px; }
.mic-btn:hover { border-color: var(--primary); color: var(--primary); background: rgba(26,58,107,0.05); }
.mic-btn.recording {
  border-color: #e74c3c; color: #e74c3c;
  background: rgba(231, 76, 60, 0.08);
  animation: micPulse 1s infinite;
}
@keyframes micPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(231,76,60,0.4); }
  50%       { box-shadow: 0 0 0 6px rgba(231,76,60,0); }
}

/* ===== 画像プレビュー ===== */
.image-preview-area {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 12px;
  background: rgba(26,58,107,0.05);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 8px;
  animation: fadeIn 0.3s ease;
}
.image-preview-area.hidden { display: none; }
.image-preview-inner {
  position: relative; display: inline-flex; flex-shrink: 0;
}
#preview-img {
  height: 56px; width: auto; max-width: 100px;
  border-radius: 8px; object-fit: cover;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}
.remove-image-btn {
  position: absolute; top: -6px; right: -6px;
  width: 18px; height: 18px; border-radius: 50%;
  background: #e74c3c; border: none; color: white;
  font-size: 10px; cursor: pointer; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  line-height: 1;
}
.remove-image-btn:hover { background: #c0392b; }
.preview-label {
  font-size: 12px; color: var(--text-secondary);
}


.input-disclaimer {
  font-size: 11px; color: var(--text-muted);
  text-align: center; margin-top: 9px; line-height: 1.6;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .sidebar {
    position: fixed; inset: 0 auto 0 0; z-index: 500;
    transform: translateX(-100%);
  }
  .sidebar.open { transform: translateX(0); }
  .menu-toggle { display: block; }
  .bubble { max-width: 87%; }
  .chat-messages { padding: 16px; }
  .chat-input-area { padding: 12px 14px 14px; }
  .modal-card { margin: 20px; padding: 36px 24px; }
  .welcome-chips { flex-direction: column; }
  .chip { text-align: left; }
}

/* ===== ERROR TOAST ===== */
.toast {
  position: fixed; bottom: 100px; left: 50%; transform: translateX(-50%);
  background: rgba(192, 57, 43, 0.95);
  color: white; padding: 12px 24px; border-radius: 10px;
  font-size: 13px; font-weight: 500; z-index: 9999;
  animation: toastIn 0.3s ease; box-shadow: var(--shadow);
  max-width: 90vw; text-align: center;
}
@keyframes toastIn {
  from { opacity: 0; transform: translateX(-50%) translateY(16px); }
  to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* ===== 法令集 ===== */
.law-section {
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}

.law-section-toggle {
  width: 100%; display: flex; align-items: center; justify-content: space-between;
  padding: 11px 16px;
  background: none; border: none; cursor: pointer;
  font-family: 'Noto Sans JP', sans-serif;
  font-size: 12px; font-weight: 700;
  color: var(--text-secondary);
  letter-spacing: 0.06em;
  transition: all var(--transition);
}
.law-section-toggle:hover {
  background: rgba(26,58,107,0.05);
  color: var(--primary);
}
.law-toggle-icon {
  font-size: 10px;
  transition: transform var(--transition);
}
.law-section-toggle.open .law-toggle-icon {
  transform: rotate(180deg);
}

.law-list {
  display: none;
  max-height: 320px;
  overflow-y: auto;
  padding: 0 12px 12px;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}
.law-list.open { display: block; }
.law-list::-webkit-scrollbar { width: 4px; }
.law-list::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }

.law-category {
  margin-bottom: 10px;
}
.law-cat-label {
  font-size: 10px; font-weight: 700;
  color: var(--primary); letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 6px 4px 4px;
  border-bottom: 1.5px solid var(--border-accent);
  margin-bottom: 5px;
}
.law-category ul {
  list-style: none; padding: 0; margin: 0;
}
.law-category ul li {
  font-size: 11px; color: var(--text-secondary);
  padding: 3px 6px; line-height: 1.5;
  border-radius: 4px;
  transition: background var(--transition);
}
.law-category ul li:hover {
  background: rgba(26,58,107,0.05);
  color: var(--text-primary);
}
.law-note {
  font-size: 10px; color: var(--text-muted); display: block;
}
.law-updated {
  font-size: 10px; color: var(--text-muted);
  text-align: center; margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--border);
}

/* 法令・サイトリンク */
.law-category ul li a {
  color: var(--text-secondary);
  text-decoration: none;
  display: block;
  transition: color var(--transition);
}
.law-category ul li a:hover {
  color: var(--primary);
  text-decoration: underline;
}


