/* =========================
   Consolidated site.css (ab-styles merged)
   - ab-styles (dark "あるボ" theme) merged into site.css
   - original site.css components adapted to the dark theme
   ========================= */

/* ========== Theme variables (from ab-styles) ========== */
:root {
    --ab-bg: #0b0f14;
    --ab-card: #121821;
    --ab-ink: #ecf3ff;
    --ab-ink-hover: #a1a1a1;
    --ab-ink-muted: #a6b3c7;
    --ab-btn-link: #0b0f14;
    --ab-btn-link-hover: #313131;
    --ab-primary: #4da3ff;
    --ab-accent: #8ad17f;
    --ab-border: #1f2a38;
    --ab-chip: #172233;
    --ab-chip-reacted: #374253;
    --radius: 14px;
    --shadow: 0 8px 24px rgba(0,0,0,.25);
}

/* ========== Base (merged) ========== */
*{ box-sizing:border-box; }
html,body{ height:100%; }
body{
  margin:0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Hiragino Kaku Gothic ProN", "Noto Sans JP", sans-serif;
  background:linear-gradient(180deg,#0a0e13 0%, #0b1220 100%);
  color:var(--ab-ink);
  -webkit-font-smoothing:antialiased;
  text-rendering:optimizeLegibility;

  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* Links / Buttons base */
a {
    color: inherit;
    text-decoration: none;
}
    a:hover {
        color: #a1a1a1;
    }
button{ font:inherit; color:inherit; background:none; border:none; cursor:pointer; }

/* ========== Header / Layout ========== */
.ab-header, header {
  border-bottom:1px solid var(--ab-border);
  position:sticky; top:0; z-index:10;
  backdrop-filter:saturate(1.2) blur(8px);
  background:rgba(10,14,19,.7);
}
.ab-header__inner{
  max-width:1040px; margin:0 auto; padding:12px 16px;
  display:flex; align-items:center; justify-content:space-between;
  gap:12px;
}

.ab-logo-img {
    height: 45px;
    margin: 2px 5px;
}

.ab-logo,
.ab-logo:hover {
    font-weight: 800;
    letter-spacing: .02em;
    font-size: 20px;
    background: linear-gradient(90deg,var(--ab-primary),#9a7cff);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.ab-logo
.ab-nav{ display:flex; gap:8px; align-items:center; }

/* ========== Main container (adapt original site.css main) ========== */
main {
    flex: 1;
    padding-top: 18px;
    padding-left: 16px;
    padding-right: 16px;
    background: transparent; /* show dark background */
    max-width: 1040px;
    margin: 20px auto;
    border-radius: 12px;
}

/* Keep footer styling but adapt to dark theme */
.footer-nav, footer {
    background: linear-gradient(90deg, rgba(10,14,19,0.6), rgba(10,14,19,0.6));
    color: var(--ab-ink-muted);
    padding: 18px 0;
    width: 100%;
    margin-top: auto;
}

.footer-content {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    color: var(--ab-ink-muted);
}

footer .copyright {
    color: var(--ab-ink-muted);
    text-align: center;
    font-size:14px;
    flex-grow: 1;
}

footer .privacy-policy {
    position: absolute;
    font-size: 14px;
    right: 20px;
    color: var(--ab-ink-muted);
    text-decoration: none;
}

    footer .privacy-policy:hover {
        color: var(--ab-ink);
    }

/* ========== ab components (cards, buttons, form, etc) ========== */
.ab-main{ max-width:1040px; margin:0 auto; padding:20px 16px 64px; }
.ab-footer{
  border-top:1px solid var(--ab-border);
  padding:24px 16px; text-align:center; color:var(--ab-ink-muted);
}

.ab-hero {
    padding: 24px;
    border: 1px solid var(--ab-border);
    border-radius: var(--radius);
    background: radial-gradient(1200px 500px at 80% -50%, rgba(77,163,255,.15), transparent), radial-gradient(900px 400px at -10% 120%, rgba(138,209,127,.12), transparent), var(--ab-card);
    box-shadow: var(--shadow);
    font-size: 16px;
}
.ab-hero__title {
    margin: 0 0 10px;
    font-size: 24px;
    font-weight: 800;
    display: flex;
    justify-content: flex-start;
    align-items: center;
}

.ab-hero__lead {
    margin: 0;
    color: var(--ab-ink-muted);
}

.ab-section{ margin-top:24px; }
.ab-section__title, .privacy-child-caption {
    font-size: 18px;
    margin: 0 0 12px;
}

.ab-grid--cats{
  display:grid; gap:10px;
  grid-template-columns: repeat(2, minmax(0,1fr));
}
@media (min-width:720px){
  .ab-grid--cats{ grid-template-columns: repeat(4, minmax(0,1fr)); }
}
.ab-cat{
  border:1px solid var(--ab-border);
  background:linear-gradient(180deg,#111826,#0f1520);
  padding:14px; border-radius:12px; text-align:center; font-weight:600;
  transition:.15s ease transform, .15s ease background;
}
.ab-cat:hover{ transform:translateY(-2px); background:#111a28; }

.ab-toplist {
    margin: 0;
    padding-left: 20px;
    line-height: 1.45;
    color: var(--ab-ink);
    font-size: 14px;
}
.ab-toplist li{ padding-left:4px; }

.ab-notice-item {
    display: flex;
    flex-wrap: wrap;
    gap: 0 0.25rem;
    margin-left: -5px;
    position: relative;
    padding-left: 1em; /* ● のスペースを確保 */
}
    .ab-notice-item::before {
        content: "・";
        position: absolute;
        left: -5px;
    }

    .ab-notice-item .ab-notice-item-date {
        color: var(--ab-ink-muted);
    }

.ab-card .ab-notice-history {
    margin: 10px 0 0 0;
}


/* Toolbar */
.ab-toolbar{
  display:flex; flex-wrap:wrap; gap:12px; align-items:flex-end; justify-content:space-between;
  margin-bottom:12px;
}
.ab-page-title{ margin:10px 0; font-size:20px; font-weight:800; }
.ab-filters{ display:flex; gap:8px; }
.ab-select{
  display:grid; gap:6px; font-size:14px; color:var(--ab-ink-muted);
}
.ab-select select{
  background:var(--ab-card); color:var(--ab-ink);
  border:1px solid var(--ab-border); border-radius:10px; padding:10px 12px;
}

/* Cards */
.ab-list{ display:grid; gap:12px; }
.ab-card{
  border:1px solid var(--ab-border); border-radius:var(--radius);
  background:var(--ab-card);
  padding:16px; box-shadow: var(--shadow);
}
.ab-card__text{
  margin:0 0 12px; font-size:16px; line-height:1.65;
}
.ab-reactions{ display:flex; gap:8px; flex-wrap:wrap; }
.ab-chip{
  background:var(--ab-chip); border:1px solid var(--ab-border);
  border-radius:999px; padding:8px 12px; font-size:14px;
  color:var(--ab-ink);
}
    .ab-chip.ab-reacted {
        background: var(--ab-chip-reacted);
    }
    .ab-chip b {
        font-weight: 700;
        padding-left: 6px;
        color: var(--ab-ink);
    }

.ab-chip--ghost{ background:transparent; }
.ab-meta{ margin-top:10px; color:var(--ab-ink-muted); font-size:12px; }

.ab-loadmore{ margin-top:8px; }

/* Buttons */
.ab-btn{
  background:linear-gradient(180deg,var(--ab-primary), #6bb6ff);
  color:var(--ab-btn-link);
  border-radius:12px;
  padding:10px 14px;
  font-weight:800;
  border:1px solid rgba(255,255,255,.08);
  box-shadow: 0 4px 16px rgba(77,163,255,.25);
  display:inline-block; text-align:center;
}
    .ab-btn:hover {
        filter: brightness(1.05);
        color: var(--ab-btn-link-hover);
    }

.ab-btn-block {
    width: 100%;
}

.ab-btn-ghost {
    background: var(--ab-chip);
    border: 1px solid var(--ab-border);
    color: var(--ab-ink);
    box-shadow: none;
}
    .ab-btn-ghost:hover {
        color: var(--ab-ink-hover);
    }

/* External login provider buttons (one per line with logo) */
/* End of consolidated site.css */
.btn-external-login {
    -moz-user-select: none;
    -webkit-user-select: none;
    -ms-user-select: none;
    -webkit-appearance: none;
    background-color: #f2f2f2;
    background-image: none;
    border: none;
    -webkit-border-radius: 4px;
    border-radius: 4px;
    -webkit-box-sizing: border-box;
    box-sizing: border-box;
    color: #1f1f1f;
    cursor: pointer;
    font-family: 'Roboto', arial, sans-serif;
    font-size: 14px;
    height: 40px;
    letter-spacing: 0.25px;
    outline: none;
    overflow: hidden;
    padding: 0 12px;
    position: relative;
    text-align: center;
    -webkit-transition: background-color .218s, border-color .218s, box-shadow .218s;
    transition: background-color .218s, border-color .218s, box-shadow .218s;
    vertical-align: middle;
    white-space: nowrap;
    width: auto;
    max-width: 400px;
    min-width: min-content;
    margin: 10px 0;
}

    .btn-external-login .btn-external-login-icon {
        height: 20px;
        margin-right: 12px;
        min-width: 20px;
        width: 20px;
    }

    .btn-external-login .btn-external-login-content-wrapper {
        -webkit-align-items: center;
        align-items: center;
        display: flex;
        -webkit-flex-direction: row;
        flex-direction: row;
        -webkit-flex-wrap: nowrap;
        flex-wrap: nowrap;
        height: 100%;
        justify-content: space-between;
        position: relative;
        width: 100%;
    }

    .btn-external-login .btn-external-login-contents {
        -webkit-flex-grow: 1;
        flex-grow: 1;
        font-family: 'Roboto', arial, sans-serif;
        font-weight: 500;
        overflow: hidden;
        text-overflow: ellipsis;
        vertical-align: top;
    }

    .btn-external-login .btn-external-login-state {
        -webkit-transition: opacity .218s;
        transition: opacity .218s;
        bottom: 0;
        left: 0;
        opacity: 0;
        position: absolute;
        right: 0;
        top: 0;
    }

    .btn-external-login:disabled {
        cursor: default;
        background-color: #ffffff61;
    }

        .btn-external-login:disabled .btn-external-login-state {
            background-color: #1f1f1f1f;
        }

        .btn-external-login:disabled .btn-external-login-contents {
            opacity: 38%;
        }

        .btn-external-login:disabled .btn-external-login-icon {
            opacity: 38%;
        }

    .btn-external-login:not(:disabled):active .btn-external-login-state,
    .btn-external-login:not(:disabled):focus .btn-external-login-state {
        background-color: #001d35;
        opacity: 12%;
    }

    .btn-external-login:not(:disabled):hover {
        -webkit-box-shadow: 0 1px 2px 0 rgba(60, 64, 67, .30), 0 1px 3px 1px rgba(60, 64, 67, .15);
        box-shadow: 0 1px 2px 0 rgba(60, 64, 67, .30), 0 1px 3px 1px rgba(60, 64, 67, .15);
    }

        .btn-external-login:not(:disabled):hover .btn-external-login-state {
            background-color: #001d35;
            opacity: 8%;
        }

    .btn-external-login .icon {
        font-size: 18px;
    }

/* X / Twitterアイコン */
.btn-twitter {
    color: #fff;
    background-color: #1DA1F2;
}

    .btn-twitter:hover {
        color: #fff;
        background-color: #1DA1F2;
    }

.btn-facebook {
    color: #fff;
    background-color: #3b5998;
}

    .btn-facebook:hover {
        color: #fff;
        background-color: #3b5998;
    }

/* Form */
.ab-form{
  border:1px solid var(--ab-border); border-radius:var(--radius);
  background:var(--ab-card); padding:16px; box-shadow: var(--shadow);
  max-width:720px; margin:0 auto;
}
.ab-field{ display:grid; gap:8px; margin-bottom:14px; }
.ab-field__label{ color:var(--ab-ink-muted); font-size:14px; }
.ab-input {
    width: 100%;
    background: #0e1520;
    color: var(--ab-ink);
    border: 1px solid var(--ab-border);
    border-radius: 10px;
    padding: 10px 12px;
}
.ab-help{ color:var(--ab-ink-muted); font-size:12px; }
.ab-actions{ display:flex; gap:8px; justify-content:flex-end; }

/* Utilities */
.hidden{ display:none; }


/* =========================
   Adapted original site.css rules (dark theme)
   - tables, filter-form, dialogs, form-controls
   ========================= */

/* Table Styles (adapted) */
.table {
    width: 100%;
    margin-top: 20px;
    color: var(--ab-ink);
}

.table th, .table td {
    text-align: left;
    align-content: center;
    padding: 8px;
    border-bottom: 1px solid var(--ab-border);
    color: var(--ab-ink-muted);
}

.table thead th {
    background-color: rgba(20,30,40,0.6);
    color: var(--ab-ink);
}

/* responsive behavior preserved */
@media only screen and (max-width: 1200px) {
    .table {
        display: block;
        overflow-x: scroll;
        white-space: nowrap;
        width: 100%;
    }

        .table th, .table td {
            width: auto;
        }
}

/* details list adapted */
.details dt {
    flex-basis: 20%;
    padding: 10px;
    background-color: rgba(20,30,40,0.6);
    border-bottom: 1px solid var(--ab-border);
    color: var(--ab-ink);
}

.details dd {
    flex-basis: 80%;
    padding: 10px;
    margin: 0px;
    background-color: var(--ab-card);
    border-bottom: 1px solid var(--ab-border);
    color: var(--ab-ink-muted);
}

/* filter-form adapted */
.filter-form {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-bottom: 20px;
    padding: 8px 10px;
    border-radius: 8px;
    border: 1px solid var(--ab-border);
    background: rgba(10,14,19,0.4);
    overflow-x: auto;
}

.filter-form .form-group {
    display: flex;
    align-items: center;
    gap: 5px;
}

.filter-form select,
.filter-form input {
    height: auto;
    width: auto;
    min-width: 100px;
    font-size: 14px;
    padding: 6px 8px;
    border: 1px solid var(--ab-border);
    border-radius: 4px;
    background-color: var(--ab-card);
    color: var(--ab-ink);
}

/* Dialog and form-control */
#dialogOverlay {
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background-color: rgba(0,0,0,0.7);
    z-index: 999;
}

.form-dialog {
    display: none;
    width: 320px;
    padding: 18px;
    border-radius: 10px;
    background-color: var(--ab-card);
    box-shadow: 0 6px 18px rgba(0,0,0,0.5);
    position: fixed;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1000;
}

.form-dialog h2 {
    color: var(--ab-ink);
    text-align: left;
    margin-bottom: 12px;
}

.form-control {
    width: 100%;
    padding: 10px;
    margin: 10px 0;
    border: 1px solid var(--ab-border);
    border-radius: 5px;
    box-sizing: border-box;
    font-size: 12px;
    background: var(--ab-card);
    color: var(--ab-ink);
}

    .form-control:disabled {
        background: #c9cccf;
        color: #212529;
    }

input[disabled] + .form-label {
    color: #212529;
}

/* small responsive tweaks */
@media screen and (max-width: 720px) {
    .details dl {
        flex-flow: column;
    }
}

/* Pagination styles (adapted to ab-theme) */
.ab-pager {
  margin-top: 20px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.pagination {
  display: inline-flex;
  gap: 8px;
  padding: 6px;
  margin: 0;
  list-style: none;
  align-items: center;
}

.page-item {
  display: inline-block;
}

.page-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 36px;
  padding: 6px 12px;
  border-radius: 10px;
  background: var(--ab-chip);
  color: var(--ab-ink);
  border: 1px solid var(--ab-border);
  font-weight: 600;
  text-decoration: none;
  transition: transform .08s ease, filter .08s ease;
}

.page-link:hover {
  transform: translateY(-2px);
  filter: brightness(1.05);
}

.page-item.active .page-link {
  background: linear-gradient(90deg, var(--ab-primary), #6bb6ff);
  color: #0b0f14;
  box-shadow: 0 6px 18px rgba(77,163,255,0.18);
}

.page-item.disabled .page-link {
  background: var(--ab-card);
  color: var(--ab-ink-muted);
  border-color: var(--ab-border);
  opacity: 0.6;
  cursor: default;
  pointer-events: none;
}

/* Small-screen adjustments */
@media screen and (max-width: 720px) {
    .page-link {
        min-width: 36px;
        padding: 4px 8px;
        height: 32px;
    }

    .ab-pager {
        padding: 8px;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
}

/* Dropdown / btn-group (dark theme overrides for Bootstrap-like dropdown used in header) */
.btn-group {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}


/* Split toggle styling (small ghost button that sits next to primary action) */
.dropdown-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 10px;
    min-width: 40px;
    border-left: 1px solid var(--ab-border);
    background: transparent;
    color: var(--ab-ink);
    border-radius: 8px;
    box-shadow: none;
}

.dropdown-toggle:hover,
.dropdown-toggle:focus {
    background: rgba(255,255,255,0.02);
}

/* caret visibility for accessibility */
.dropdown-toggle::after {
    display: inline-block;
    margin-left: 6px;
    vertical-align: 0;
    border-top: .3em solid currentColor;
    border-right: .3em solid transparent;
    border-left: .3em solid transparent;
    content: "";
}

/* Dropdown menu container */
.dropdown-menu {
    background: var(--ab-card);
    border: 1px solid var(--ab-border);
    color: var(--ab-ink);
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.45);
    padding: 6px 0;
    min-width: 180px;
    z-index: 2000;
}

/* Align to right helper (used in header) */
.dropdown-menu.dropdown-menu-end {
    /*right: 0;*/
    left: auto;
}

/* Individual menu items */
.dropdown-item {
    display: block;
    width: 100%;
    padding: 8px 14px;
    color: var(--ab-ink);
    text-decoration: none;
    background: transparent;
    font-size: 14px;
    transition: background .08s ease, color .08s ease;
    border: none;
    text-align: left;
}

/* Hover / focus state */
.dropdown-item:hover,
.dropdown-item:focus {
    background: rgba(255,255,255,0.03);
    color: var(--ab-ink);
    text-decoration: none;
}

/* Divider */
.dropdown-divider {
    height: 1px;
    margin: 6px 0;
    overflow: hidden;
    background: var(--ab-border);
    border: none;
}

/* Button-like menu item (logout form button) should look like a link item */
.dropdown-item button {
    width: 100%;
    text-align: left;
    background: transparent;
    border: none;
    padding: 0;
    color: inherit;
    font: inherit;
    cursor: pointer;
}

/* Small-screen tweaks: ensure dropdown fits header and doesn't overflow */
@media screen and (max-width: 720px) {

    .ab-logo-img {
        height: 32px;
    }

    footer .privacy-policy {
        right: unset;
        margin-bottom: 60px;
    }

    .btn-group {
        gap: 4px;
    }

    .dropdown-menu {
        min-width: 140px;
        left: auto;
    }

    .ab-btn,
    .ab-btn-ghost {
        padding: 7px 10px;
        font-size: 0.7rem;
    }

    .ab-hero {
        font-size: 10px;
    }
    .ab-hero__title {
        font-size: 18px;
    }

    .ab-toplist {
        font-size: 12px;
    }

    .ab-section__title, .privacy-child-caption {
        font-size: 14px;
    }

    .ab-page-title {
        font-size: 16px;
    }

    .ab-meta {
        font-size: 10px;
    }

    footer .copyright {
        font-size: 10px;
    }

    .ab-input {
        font-size: 12px;
    }

    .ab-card__text {
        font-size: 12px;
    }

    .ab-chip {
        font-size: 10px;
        padding: 5px 9px;
        margin: 0 -2px;
    }
}
