:root {
  --bg: #f5f7fa;
  --card: #ffffff;
  --muted: #4b5563;
  --accent: #0ea5a4;
  --glass: rgba(0, 0, 0, 0.03);
}

html,
body {
  height: 100%;
  margin: 0;
  padding: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI",
    Roboto, "Helvetica Neue", Arial;
  background: linear-gradient(180deg, #f9fafb 0%, #e5e7eb 100%);
  background-attachment: fixed;
  background-repeat: no-repeat;
  background-size: cover;
  color: #111827;
  min-height: 100vh;
  box-sizing: border-box;
}

*,
*::before,
*::after {
  box-sizing: inherit;
}

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

header {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

header a {
  color: black;
}
header a,
.notice a {
  text-decoration: none;
}
header a:hover {
  text-decoration: underline;
}

.logo {
  width: 64px;
  height: 64px;
  background: var(--glass);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  font-weight: 700;
  color: var(--accent);
  font-size: 20px;
}

h1 {
  margin: 0;
  font-size: 28px;
}
p.lead {
  margin: 6px 0 0;
  color: var(--muted);
}

.notice {
  background: var(--accent);
  color: white;
  padding: 12px 16px;
  border-radius: 8px;
  margin-bottom: 24px;
  font-size: 14px;
}

.notice a {
  color: white;
}

.controls {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-top: 18px;
  flex-wrap: wrap;
}

.search {
  flex: 1;
  min-width: 220px;
}
input[type="text"],
select {
  width: 100%;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid rgba(0, 0, 0, 0.1);
  background: white;
  color: inherit;
}
button {
  padding: 10px 12px;
  border-radius: 8px;
  border: 0;
  background: var(--accent);
  color: white;
  cursor: pointer;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
  margin-top: 22px;
  width: 100%;
  box-sizing: border-box;
}

.card {
  background: var(--card);
  border-radius: 12px;
  padding: 16px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  box-sizing: border-box;
  width: 100%;
}

.card h3 {
  margin: 0 0 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.meta {
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 10px;
}

.list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px;
  border-radius: 8px;
  background: #f9fafb;
  word-break: break-word;
}
.item .type {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #eef2f7;
  font-weight: 700;
  flex-shrink: 0;
}
.item a,
.footer-link {
  color: var(--accent);
  text-decoration: none;
  word-break: break-word;
}

.tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 8px;
}
.tag {
  font-size: 12px;
  padding: 6px 8px;
  border-radius: 999px;
  background: #f3f4f6;
  color: var(--muted);
}

footer {
  margin: 26px;
  color: var(--muted);
  font-size: 13px;
}

/* modal */
.modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.4);
  z-index: 40;
}
.modal.open {
  display: flex;
}
.modal .panel {
  width: 90%;
  max-width: 980px;
  background: white;
  border-radius: 10px;
  padding: 18px;
  border: 1px solid rgba(0, 0, 0, 0.1);
}
.modal iframe {
  width: 100%;
  height: 70vh;
  border-radius: 6px;
  border: 0;
  background: white;
}
.close {
  margin-left: auto;
  background: transparent;
  border: 0;
  color: var(--muted);
  cursor: pointer;
}

@media (max-width: 600px) {
  header {
    gap: 10px;
  }
  .controls {
    flex-direction: column;
  }
  .grid {
    grid-template-columns: 1fr;
    width: 100%;
  }
  .container {
    padding: 16px;
  }
}
