
:root {
  color-scheme: light;
  font-family: Inter, system-ui, "Hiragino Kaku Gothic ProN", "Yu Gothic", Meiryo, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  color: #192a3a;
  background: #f5f8fb;
  --muted: #536477;
  --rule: #dfe6ed;
  --selected: #e3edf7;
  --navy: #132d46;
  --accent: #cb8856;
}

* { box-sizing: border-box; }
body { margin: 0; }
[hidden] { display: none !important; }

a { color: inherit; text-decoration: none; }
button, input { color: inherit; font: inherit; }
button { cursor: pointer; }

:focus-visible {
  outline: 2px solid #245eab;
  outline-offset: 3px;
}

.svg-library { position: absolute; width: 0; height: 0; overflow: hidden; }

.icon {
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  white-space: nowrap;
  clip-path: inset(50%);
}

.page {
  width: calc(100% - 64px);
  max-width: 1344px;
  margin: 0 auto;
  padding: 14px 0 38px;
}

.page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin-bottom: 38px;
}

h1 { margin: 0; font-size: 23px; font-weight: 650; line-height: 1.25; }
.page-header h1 { color: var(--navy); }

.toolbar, .view-switch {
  display: flex;
  align-items: center;
  gap: 10px;
}

.view-switch { gap: 3px; }

.icon-button, .filters button {
  border: 0;
  background: transparent;
  border-radius: 999px;
}

.icon-button {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  padding: 0;
  color: var(--muted);
}

.icon-button:hover, .filters button:hover { background: #efefef; }
.icon-button[aria-pressed="true"], .filters button[aria-pressed="true"] {
  color: #161616;
  background: var(--selected);
}

.search {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 242px;
  min-width: 0;
  min-height: 36px;
  padding: 0 12px;
  color: var(--muted);
  border: 1px solid #d5d5d5;
  border-radius: 999px;
}

.search:focus-within { outline: 2px solid #245eab; outline-offset: 1px; }

.search input {
  width: 100%;
  min-width: 0;
  padding: 6px 0;
  background: transparent;
  color: #161616;
  border: 0;
  outline: none;
}

.search input::placeholder { color: var(--muted); opacity: 1; }

.logout {
  min-height: 36px;
  padding: 6px 13px;
  border: 1px solid #d5d5d5;
  border-radius: 999px;
  background: transparent;
  font-size: 13px;
  white-space: nowrap;
}

.logout:hover { background: #e8eff7; }

.filters {
  display: flex;
  gap: 6px;
  margin-bottom: 13px;
}

.filters button {
  min-height: 36px;
  padding: 6px 16px;
  white-space: nowrap;
  color: #404040;
}

.column-headings, .site-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(110px, 12%) minmax(160px, 22%);
  gap: 14px;
  align-items: center;
  padding-inline: 16px;
}

.column-headings {
  min-height: 42px;
  color: var(--muted);
  border-bottom: 1px solid var(--rule);
}

.site-list { list-style: none; margin: 0; padding: 0; }

.site-row {
  min-height: 88px;
  border-bottom: 1px solid var(--rule);
}

.site-row:hover { background: #eef3f8; }

.site-link {
  display: flex;
  align-items: center;
  gap: 15px;
  min-width: 0;
  padding-block: 10px;
}

.thumbnail {
  display: block;
  flex: 0 0 auto;
  width: 80px;
  height: 50px;
  object-fit: cover;
  border: 1px solid #d9dee1;
  border-radius: 7px;
  background: #ecf2f4;
}

.thumbnail-inquiries {
  display: grid;
  place-items: center;
  color: #465e70;
}

.thumbnail-inquiries .icon { width: 25px; height: 25px; }
.site-label { display: grid; gap: 2px; min-width: 0; }
.site-name { font-weight: 550; overflow-wrap: anywhere; }
.site-link time { color: var(--muted); font-size: 12px; }
.site-arrow { color: var(--muted); width: 14px; height: 14px; }
.site-link:hover .site-name { text-decoration: underline; text-underline-offset: 3px; }

.share, .analytics {
  display: inline-flex;
  align-items: center;
  justify-self: start;
  gap: 6px;
}

.share { white-space: nowrap; }
.share .icon { width: 16px; height: 16px; }
.analytics { color: var(--muted); font-size: 12px; }
.analytics:hover { color: #161616; text-decoration: underline; text-underline-offset: 3px; }
.analytics .icon { width: 13px; height: 13px; }

.directory[data-layout="grid"] .column-headings { display: none; }

.site-list[data-layout="grid"] {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr));
  gap: 16px;
}

.site-list[data-layout="grid"] .site-row {
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-content: start;
  padding: 12px;
  border: 1px solid var(--rule);
  border-radius: 12px;
  background: #fff;
}

.site-list[data-layout="grid"] .site-link {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 9px;
  padding: 0;
}

.site-list[data-layout="grid"] .thumbnail {
  grid-column: 1 / -1;
  width: 100%;
  height: auto;
  aspect-ratio: 8 / 5;
}

.site-list[data-layout="grid"] .thumbnail-inquiries .icon {
  width: 56px;
  height: 56px;
}

.empty-state { padding: 22px 16px; margin: 0; color: var(--muted); }
.page-footer { margin-top: 17px; color: var(--muted); font-size: 12px; }

@media (max-width: 690px) {
  .page { width: calc(100% - 32px); }
  .page-header { align-items: flex-start; flex-direction: column; gap: 14px; margin-bottom: 22px; }
  .toolbar { width: 100%; flex-wrap: wrap; gap: 8px; }
  .search { flex: 1 1 140px; width: auto; }

  .column-headings, .site-row { grid-template-columns: minmax(0, 1fr) 70px; gap: 8px; padding-inline: 6px; }
  .column-headings span:last-child { display: none; }
  .site-row { padding-block: 8px; }
  .site-link { gap: 9px; padding-block: 3px; }
  .thumbnail { width: 57px; height: 36px; }
  .analytics { grid-column: 1 / -1; }
  .site-list[data-layout="list"] .analytics::before { content: "訪問者数 ·"; }
  .site-list[data-layout="grid"] .analytics { grid-column: auto; }
}



.login-screen {
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(ellipse at 16% 12%, #e2edf7, transparent 56%),
    linear-gradient(145deg, #f4f7fb 30%, #faf7f3 100%);
}

.login-panel {
  width: min(100%, 420px);
  overflow: hidden;
  border: 1px solid #dce4ec;
  border-radius: 19px;
  background: #fff;
  box-shadow: 0 18px 48px rgb(21 45 68 / .10);
}

.login-header {
  padding: 23px clamp(22px, 6vw, 34px) 24px;
  border-bottom: 3px solid var(--accent);
  background: linear-gradient(120deg, var(--navy), #234662);
  color: #fff;
}

.login-brand { margin: 0 0 7px; color: #d3e2ef; font-size: 13px; font-weight: 650; }
.login-panel h1 { font-size: clamp(24px, 6vw, 29px); }
.login-content { padding: 24px clamp(22px, 6vw, 34px) 30px; }
.login-instructions { margin: 0 0 21px; color: var(--muted); }
.login-panel form { display: grid; }
.login-panel label { margin-bottom: 6px; font-weight: 600; }
.login-panel label + input + label { margin-top: 15px; }

.login-panel input, .login-panel button {
  min-height: 46px;
  min-width: 0;
  padding: 9px 12px;
  border-radius: 9px;
  font: inherit;
}

.login-panel input { width: 100%; border: 1px solid #bdcbd9; background: #fbfdff; }
.login-panel button {
  margin-top: 23px;
  border: 0;
  background: var(--navy);
  color: #fff;
  font-weight: 650;
}
.login-panel button:hover { background: #234662; }
.login-panel button:disabled { cursor: default; opacity: .6; }

.login-error {
  margin: 0 0 14px;
  padding: 8px 10px;
  border-radius: 6px;
  color: #92251a;
  background: #fff1f0;
  font-size: 13px;
}

  
.directory-toolbar { display:flex; flex-wrap:wrap; align-items:center; gap:10px; margin-bottom:20px; }
.directory-toolbar a { padding:8px 13px; border:1px solid #bdcbd9; border-radius:9px; background:#fff; }
.directory-toolbar a[aria-current="page"] { color:#fff; background:var(--navy); }
.inquiry-card { padding:22px; margin-bottom:16px; border:1px solid var(--rule); border-radius:14px; background:#fff; }
.inquiry-card h2 { margin:0 0 12px; font-size:21px; }
.inquiry-heading { display:flex; align-items:flex-start; justify-content:space-between; gap:16px; margin-bottom:12px; }
.inquiry-heading h2 { margin:0; overflow-wrap:anywhere; }
.inquiry-delete { flex:0 0 auto; margin:0; }
.delete-button { min-height:40px; padding:7px 16px; border:1px solid #bb4a45; border-radius:8px; background:#fff; color:#9f2824; font-weight:600; white-space:nowrap; }
.delete-button:hover { background:#fff0ef; border-color:#9f2824; }
.delete-confirmation { max-width:660px; margin-top:24px; }
.delete-actions { display:flex; flex-wrap:wrap; justify-content:flex-end; align-items:center; gap:12px; margin-top:24px; }
.cancel-delete { padding:8px 16px; border:1px solid #bdcbd9; border-radius:8px; background:#fff; }
.cancel-delete:hover { background:#edf3f9; }
.inquiry-card dl { margin:0; display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:14px; }
.inquiry-card dt { color:var(--muted); font-size:13px; }
.inquiry-card dd { margin:4px 0 0; overflow-wrap:anywhere; }
.inquiry-card .question { white-space:pre-wrap; }
.inquiry-card h3 { font-size:15px; margin:18px 0 6px; }
.inquiry-card .receipt { color:var(--muted); font-size:12px; margin:15px 0 0; }
.notice { border-left:3px solid var(--accent); padding:12px 16px; background:#fff; }
.toolbar form { margin:0; }
.column-headings, .site-row { grid-template-columns:minmax(0,1fr) 130px 170px; }
@media(max-width:690px) { .column-headings, .site-row { grid-template-columns:minmax(0,1fr) 100px; } .site-row .stats { grid-column:1 / -1; font-size:12px; color:var(--muted); } }
@media(max-width:690px) { .inquiry-card dl { grid-template-columns:repeat(2,minmax(0,1fr)); } }
