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

body {
  font-family: "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Meiryo", sans-serif;
  background: linear-gradient(135deg, #f5f7fa 0%, #e8eef5 100%);
  color: #2c3e50;
  min-height: 100vh;
  line-height: 1.6;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 48px 24px;
}

header {
  text-align: center;
  margin-bottom: 32px;
  padding-bottom: 32px;
  border-bottom: 2px solid #d4dde7;
}

h1 {
  font-size: 32px;
  color: #1a3a5c;
  margin-bottom: 8px;
  letter-spacing: 0.05em;
}

.subtitle {
  color: #6b7c93;
  font-size: 15px;
  letter-spacing: 0.1em;
}

/* --- 部署フィルター --- */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-bottom: 32px;
}

.filter-btn {
  background: #fff;
  border: 1px solid #d4dde7;
  color: #5a6b80;
  padding: 8px 18px;
  border-radius: 999px;
  font-size: 14px;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.15s;
}

.filter-btn:hover {
  border-color: #2c5f8d;
  color: #2c5f8d;
}

.filter-btn.is-active {
  background: #2c5f8d;
  border-color: #2c5f8d;
  color: #fff;
  font-weight: 600;
}

/* --- セクション見出し --- */
.section-title {
  font-size: 16px;
  color: #1a3a5c;
  margin: 32px 0 16px;
  padding-left: 12px;
  border-left: 4px solid #2c5f8d;
  font-weight: 600;
}

/* --- アプリカード --- */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
}

.card {
  background: #fff;
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 2px 8px rgba(26, 58, 92, 0.08);
  transition: transform 0.2s, box-shadow 0.2s;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  border: 1px solid #e3eaf2;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(26, 58, 92, 0.15);
  border-color: #2c5f8d;
}

.card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 12px;
  gap: 12px;
}

.card-icon {
  font-size: 32px;
  line-height: 1;
}

.card-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  justify-content: flex-end;
}

.badge {
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 999px;
  background: #eef2f7;
  color: #5a6b80;
  white-space: nowrap;
}

.badge.badge-all {
  background: #1a3a5c;
  color: #fff;
}

.badge.badge-sheet {
  background: #0f9d58;
  color: #fff;
}

.badge.badge-restricted {
  background: linear-gradient(135deg, #c9a961, #a8893d);
  color: #fff;
  font-weight: 600;
  letter-spacing: 0.05em;
}

/* --- 関係者限定カード --- */
.card.is-restricted {
  border: 2px solid #c9a961;
  background: linear-gradient(135deg, #fdfaf0 0%, #fffdf7 100%);
  box-shadow: 0 2px 10px rgba(201, 169, 97, 0.18);
}

.card.is-restricted:hover {
  border-color: #a8893d;
  box-shadow: 0 8px 24px rgba(201, 169, 97, 0.35);
}

.card.is-restricted .card-title {
  color: #6b5328;
}

.card-title {
  font-size: 18px;
  font-weight: 600;
  color: #1a3a5c;
  margin-bottom: 10px;
}

.card-desc {
  font-size: 13px;
  color: #5a6b80;
  flex-grow: 1;
  margin-bottom: 16px;
}

.card-warning {
  background: #fff8e6;
  border: 1px solid #f5d272;
  border-radius: 6px;
  padding: 10px 12px;
  margin-bottom: 12px;
  font-size: 12px;
  color: #8a6d1f;
  line-height: 1.5;
}

.card-warning::before {
  content: "⚠️ ";
  margin-right: 4px;
}

.card-link {
  font-size: 12px;
  color: #2c5f8d;
  word-break: break-all;
  padding-top: 12px;
  border-top: 1px solid #eef2f7;
}

/* --- 該当なしの表示 --- */
.empty-message {
  text-align: center;
  padding: 48px 16px;
  color: #8b9aae;
  font-size: 14px;
}

/* --- フッター --- */
footer {
  text-align: center;
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid #d4dde7;
  color: #8b9aae;
  font-size: 12px;
}

/* --- スマホ対応 --- */
@media (max-width: 600px) {
  h1 { font-size: 24px; }
  .container { padding: 32px 16px; }
  .filter-btn { padding: 6px 14px; font-size: 13px; }
}
