﻿
@charset "UTF-8";

:root {
    --ink: #263B66;
    --ink-mid: #3F5B96;
    --panel: #F6F8FF;
    --chip-grad1: #FFFFFF;
    --chip-grad2: #EEF2FF;
    --inner-border: #C5D2F5;
    --sel1: #A0E3FF;
    --sel2: #4CB6F3;
    --bg: #0b1220;
    --card: #101828;
    --text: #e6e9ef;
    --muted: #9aa4b2;
    --accent: #7db7ff;
    --panel-w: clamp(360px, 38vw, 640px);
}

* {
    box-sizing: border-box
}

header {
    position: sticky;
    top: 0;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: space-between;
    backdrop-filter: blur(6px);
}

body {
    margin: 10px 24px 24px 24px;
    background: #F3F6FF;
    color: #1a1f2b;
    font-family: "Yu Gothic UI","Yu Gothic","Meiryo",system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Noto Sans JP", sans-serif;
    line-height: 0;
}

h3 {
    font-size: 1em;
    color: #4e70df;
}

img {
    width: auto;
    height: 100%;
    -webkit-user-drag: none;
    -moz-user-select: none;
}

.section {
    background: #fff;
    border: 1.5px solid var(--ink);
    border-radius: 10px;
    padding: 5px 5px 5px;
    margin-bottom: 18px;
    position: relative;
    box-shadow: 0 2px 0 rgba(0,0,0,.04);
}

.section-title {
    position: absolute;
    top: -10px;
    left: 12px;
    padding: 2px 10px;
    font-weight: 700;
    font-size: 14px;
    letter-spacing: .05em;
    color: #27407a;
    background: #fff;
    border: 1.5px solid var(--ink);
    border-radius: 8px;
}

.grid {
    display: inline-grid;
    grid-template-columns: repeat(5, auto);
    justify-content: start;
    justify-items: start;
    gap: 16px 16px;
    padding-top: 8px;
    margin: 0;
}

@media (max-width: 1100px) {
    .grid {
        grid-template-columns: repeat(4, auto);
    }
}

@media (max-width: 900px) {
    .grid {
        grid-template-columns: repeat(3, auto);
    }
}

@media (max-width: 640px) {
    .grid {
        display: grid;
        grid-template-columns: repeat(2, minmax(0,1fr));
        width: 100%;
    }
}

.chip, .empty_chip {
    --radius: 10px;
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    height: 48px;
    padding: 6px 12px;
    width: auto;
    border: 2.5px solid var(--ink);
    border-radius: var(--radius);
    background: linear-gradient(180deg, var(--chip-grad1) 0%, var(--chip-grad2) 100%);
    box-shadow: 0 2px 0 rgba(0,0,0,.06), inset 0 0 0 2px var(--inner-border);
    overflow: hidden;
    user-select: none;
}

@media (max-width: 640px) {
    .chip, .empty_chip {
        width: 100%;
    }
}

.chip:after, .empty_chip::after {
    content: "";
    position: absolute;
    inset: 4px;
    border-radius: calc(var(--radius) - 4px);
    background: linear-gradient(165deg, rgba(255,255,255,0) 42%, rgba(255,255,255,.9) 42%, rgba(255,255,255,.9) 66%, rgba(255,255,255,0) 66.2%);
    pointer-events: none;
    z-index: 0;
}

.chip > * {
    position: relative;
    z-index: 1;
}

.empty_chip > * {
    position: relative;
    z-index: 1;
}

.icon {
    flex: 0 0 34px;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: #fff;
    border: 2px solid var(--ink);
    display: grid;
    place-items: center;
    box-shadow: inset 0 0 0 2px var(--inner-border);
    font-size: 18px;
    line-height: 1;
    user-select: none;
}

.label {
    font-weight: 800;
    letter-spacing: .04em;
    color: #1f3561;
    white-space: nowrap;
}

.chip.active, .empty_chip.active {
    background: linear-gradient(180deg, var(--sel1) 0%, var(--sel2) 100%);
    border-color: #2E77C7;
    box-shadow: 0 2px 0 rgba(0,0,0,.15), inset 0 0 0 1px rgba(255,255,255,.25);
}

    .chip.active:after, .empty_chip.active:after {
        background: linear-gradient(165deg, rgba(255,255,255,0) 42%, rgba(255,255,255,.18) 42%, rgba(255,255,255,.18) 66%, rgba(255,255,255,0) 66.2%);
    }

    .chip.active .label {
        color: #fff;
        text-shadow: 0 1px 2px rgba(0,0,0,.2);
    }

    .chip.active .icon {
        color: #fff;
        background: rgba(255,255,255,.15);
        box-shadow: inset 0 0 0 2px rgba(255,255,255,.35);
        border-color: #EAF6FF;
    }

    .empty_chip.active .label {
        color: #fff;
        text-shadow: 0 1px 2px rgba(0,0,0,.2);
    }

    .empty_chip.active .icon {
        color: #fff;
        background: rgba(255,255,255,.15);
        box-shadow: inset 0 0 0 2px rgba(255,255,255,.35);
        border-color: #EAF6FF;
    }

.char-card {
    --img-w: 160px;
    --label-w: 120px;
    border: 1px solid #333;
    background: #fff;
    border-radius: 4px;
    display: grid;
    grid-template-columns: var(--img-w) 1fr;
    max-width: 680px;
    margin-top: 20px;
}

.image {
    grid-row: 1 / span 2;
    border-right: 1px solid #333;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
    background: #fff;
}

    .image img {
        max-width: 100%;
        max-height: 220px;
        object-fit: contain;
        display: block;
    }

.title {
    grid-column: 2;
    padding: .6rem .8rem;
    font-weight: 700;
    border-bottom: 1px solid #333;
    background: #f0f0f0;
}

.meta {
    grid-column: 2;
    display: grid;
    grid-template-columns: var(--label-w) 1fr;
}

    .meta .label, .meta .value {
        padding: .4rem 0 .4rem .6rem;
        border-top: 1px solid #333;
    }

    .meta .label {
        border-right: 1px solid #333;
        background: #f9f9f9;
        white-space: nowrap;
    }

.role, .unique {
    grid-column: 1 / -1;
    border-top: 1px solid #333;
    padding: .6rem .8rem;
    font-weight: 700;
    display: inline-flex;
    flex-wrap: wrap;
    gap: 5px;
}

    .unique img {
        max-height: 30px;
    }

.ex-head {
    grid-column: 1 / -1;
    padding: .5rem .8rem;
    border-top: 1px solid #333;
    font-weight: 700;
}

    .ex-head span {
        color: #fff;
        padding: 3px 15px;
        border-radius: 5px;
        margin-right: 5px;
    }

        .ex-head span.hidden {
            display: none;
        }

.ex-body {
    grid-column: 1 / -1;
    padding: .5rem .8rem;
    border-top: 1px solid #333;
    white-space: pre-wrap;
}

    .ex-body.hidden {
        display: none;
    }

.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 20px;
    background: white;
    font-weight: 600;
    font-size: 14px;
    color: #fff;
    box-shadow: 2px 2px 5px rgba(0,0,0,0.5);
    font-family: monospace;
}

.avatar {
    height: 20px;
    overflow: hidden;
    display: inline-block;
}

    .avatar img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
    }

.wave {
    position: relative;
    width: 64px;
    height: 64px;
}

    .wave::before,
    .wave::after {
        content: "";
        position: absolute;
        inset: 0;
        border-radius: 50%;
        border-top: 5px solid #00eaff;
        animation: spin 1s linear infinite;
        filter: drop-shadow(0 0 6px rgba(0, 234, 255, 0.4)) drop-shadow(0 0 12px rgba(0, 234, 255, 0.25));
        border-right: 5px solid transparent;
    }

@keyframes spin {
    to {
        transform: rotate(1turn);
    }
}

@media (prefers-reduced-motion: reduce) {
    .wave::before, .wave::after {
        animation: none;
    }
}

#uiLock {
    position: fixed;
    inset: 0;
    z-index: 2147483647;
    backdrop-filter: blur(4px);
    background: color-mix(in oklab, #ffffff 55%, transparent);
    display: grid;
    place-items: center;
    cursor: wait;
}

.ui-lock-box {
    display: grid;
    place-items: center;
    gap: 14px;
    padding: 18px 20px;
    border-radius: 16px;
    background: rgba(0,0,0,.55);
    color: #fff;
    box-shadow: 0 10px 30px rgba(0,0,0,.2);
    min-width: 200px;
}

.ui-lock-label {
    font: 600 14px/1.3 system-ui,-apple-system,Segoe UI,Roboto,sans-serif;
    letter-spacing: .02em;
}

.icon-btn {
    cursor: pointer;
    border: 1px solid rgba(255,255,255,.12);
    background: rgba(255,255,255,.06);
    color: #1a1f2b;
    padding: 8px 10px;
    border-radius: 10px;
    display: inline-grid;
    place-items: center;
}

    .icon-btn:active {
        transform: translateY(1px)
    }

.info-fab {
    position: fixed;
    top: 12px;
    right: 12px;
    z-index: 1001;
}


.info-panel {
    position: fixed;
    top: 0;
    right: 0;
    height: 100%;
    width: var(--panel-w);
    background: rgba(255,255,255,0.12);
    backdrop-filter: blur(14px) saturate(160%);
    border-left: 1px solid rgba(0,0,0,.08);
    color: #1a1f2b;
    transform: translateX(100%);
    transition: transform .45s cubic-bezier(.4,0,.2,1);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    padding-top: env(safe-area-inset-top, 0);
    padding-bottom: env(safe-area-inset-bottom, 0);
}

    .info-panel.open {
        transform: translateX(0)
    }

    .info-panel.full {
        width: min(96vw, 840px);
    }

.info-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 14px 10px 16px;
    border-bottom: 1px solid rgba(0,0,0,.08);
    background: color-mix(in oklab, #ffffff 75%, transparent);
}

.info-title {
    font-weight: 700
}

.info-body {
    padding: 14px 16px;
    overflow: auto
}

    .info-body h3 {
        margin: 14px 0 8px
    }

    .info-body p {
        line-height: 1.7;
        white-space: wrap;
        font-family: monospace;
    }

    .info-body ul {
        margin: .3rem 0 .9rem .9rem;
        display: block;
        list-style: disc inside;
        margin: 0.5rem 0 1rem 1.2rem;
        padding: 0;
        font-family: monospace;
    }

        .info-body ul li ul {
            list-style: circle inside;
        }

    .info-body li {
        display: list-item;
        position: static;
        float: none;
        overflow: visible;
        margin: 0.25rem 0;
        line-height: 1.6;
    }

    .info-body p span.example {
        display: inline-block;
        white-space: wrap;
        border: 1px solid #000;
        border-radius: 5px;
        font-style: italic;
        font-size: small;
        padding: 5px 15px;
    }

.badge {
    padding: 2px 8px;
    font-size: 12px;
    border-radius: 999px;
    background: rgba(125,183,255,.18);
    color: #27407a;
    border: 1px solid rgba(125,183,255,.28)
}

.scrim {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.3);
    opacity: 0;
    pointer-events: none;
    transition: opacity .3s ease;
    z-index: 999;
}

    .scrim.show {
        pointer-events: auto;
        backdrop-filter: blur(2px)
    }

@media (max-width: 720px) {
    .info-panel {
        left: 0;
        right: 0;
        width: auto;
        height: 95%;
        transform: translateY(calc(100% + 24px));
        border-left: none;
        border-top: 1px solid rgba(0,0,0,.08);
        border-top-left-radius: 20px;
        border-top-right-radius: 20px;
        opacity: 0;
        visibility: hidden;
    }

        .info-panel.open {
            transform: translateY(0);
            opacity: 1;
            visibility: visible
        }
}

.toggle {
    position: relative;
    display: inline-block;
    width: 225px;
    height: 27px;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    user-select: none;
}

    .toggle input {
        display: none;
    }

.labels {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
}

    .labels span {
        width: 50%;
        display: flex;
        justify-content: center;
        align-items: center;
        font-weight: bold;
        white-space: nowrap;
    }

input[type=checkbox]:not(:checked) ~ .labels span[data-label="EXスキル1"] {
    color: #fff;
    background-color: #f85b8b;
}

input[type=checkbox]:not(:checked) ~ .labels span[data-label="EXスキル2"] {
    color: #fff;
    background-color: #5ba9f8;
}

input[type=checkbox]:checked ~ .labels span:first-child {
    color: #000;
    background-color: #eee;
}

input[type=checkbox]:not(:checked) ~ .labels span:last-child {
    color: #000;
    background-color: #eee;
}

input[type=checkbox]:checked ~ .labels span:last-child {
    color: #fff;
    background-color: #ed9c00;
}

@media (max-width: 600px) {
    .toggle .labels span {
        font-size: 11px;
        width: 45%;
    }

    .toggle .labels {
        width: 185px;
    }

    .toggle {
        width: 175px;
    }

    .ex-head:has(*[id]) {
        font-size: 11px;
        padding: 3px 5px;
    }

    .grid .label {
        font-size: 11px;
    }

    .grid label {
        font-size: 11px;
    }

    .title {
        font-size: small;
    }

    .meta {
        grid-template-columns: 70px 1fr;
        font-size: x-small;
    }

    #role_detail label {
        margin: 0.5rem;
    }
}

.reset-btn {
    background: #ff6b6b;
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 4px 8px;
    font-size: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: background 0.2s ease;
}

    .reset-btn:hover {
        background: #e84141;
    }

    .reset-btn i {
        font-size: 12px;
    }

span.acce {
    font-weight: 900;
    color: #d32f2f;
}

    span.acce.hidden {
        display: none;
    }

span.noacce {
    font-weight: 900;
}

    span.noacce.hidden {
        display: none;
    }

div.actions {
    margin-left: auto;
}

.richCheckBox {
}

    .richCheckBox label {
        display: inline-flex;
        align-items: center;
        cursor: pointer;
        margin: 1rem;
        user-select: none;
        font-family: monospace;
    }

        .richCheckBox label input {
            display: none;
        }

    .richCheckBox span {
        width: 20px;
        height: 20px;
        border: 2px solid #1976d2;
        border-radius: 4px;
        margin-right: 8px;
        transition: all 0.2s ease;
        position: relative;
    }

    .richCheckBox input:checked + span {
        background: #1976d2;
    }

        .richCheckBox input:checked + span::after {
            content: "";
            position: absolute;
            left: 5px;
            width: 6px;
            height: 12px;
            border: solid #fff;
            border-width: 0 2px 2px 0;
            transform: rotate(45deg);
        }

div.acceAndUnique {
    padding: 0rem 1rem;
}

@media (max-width: 600px) {
    div.acceAndUnique {
        padding: 0rem 0rem;
    }

    .reset-btn {
        font-size: xx-small;
        padding: 4px 5px;
    }

    .acceAndUnique label {
        font-size: xx-small;
    }
}

.sr-only {
    position: absolute !important;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    white-space: nowrap;
    border: 0;
}

#role_detail.hidden, #role_detail div.hidden {
    display: none !important;
}

.fold {
    padding: 0 12px;
}

.unique .fold {
    width: 100vw;
    padding: 0;
}

.fold + .fold {
    margin-top: 12px;
}

.fold-tgl {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.fold-head {
    display: flex;
    align-items: center;
    cursor: pointer;
    user-select: none;
    gap: 12px;
    padding: 14px 4px;
}

.unique .fold-head {
    padding: 0;
    gap: 6px;
}

.fold-title {
    margin: 0;
    font-size: 1rem;
    font-weight: 700;
}

.fold-sub {
    margin-left: auto;
    color: #64748b;
    font-size: .9rem;
}

.fold-icon {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    flex: none;
    border: 1px solid #e5e7eb;
    position: relative;
    background: linear-gradient(180deg, rgba(0,0,0,.02), rgba(0,0,0,.01));
}

    .fold-icon::before, .fold-icon::after {
        content: "";
        position: absolute;
        left: 50%;
        top: 50%;
        transform: translate(-50%,-50%);
        background: #111827;
        border-radius: 1px;
        transition: transform .25s ease, background .25s ease, opacity .25s ease;
    }
    /* 横線 */
    .fold-icon::before {
        width: 14px;
        height: 2px;
    }
    /* 縦線 */
    .fold-icon::after {
        width: 2px;
        height: 14px;
    }

.fold-tgl:checked ~ .fold-head .fold-icon {
    border-color: rgba(124,156,255,.45);
    background: linear-gradient(180deg, rgba(124,156,255,.18), rgba(124,156,255,.05));
}

    .fold-tgl:checked ~ .fold-head .fold-icon::after {
        transform: translate(-50%,-50%) scaleY(0);
    }

.fold-panel {
    max-height: 0;
    overflow: hidden;
    transition: max-height .32s ease, padding .32s ease;
    padding: 0 0;
}

.unique .fold-panel {
    white-space: pre-line;
    font-weight: normal;
}

.fold-tgl:checked ~ .fold-panel {
    max-height: 640px;
    padding: 0 0 12px 0;
}

@media (max-width: 600px) {
    .fold {
        padding: 0 6px;
    }

    .fold-head {
        padding: 4px 4px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .fold-panel {
        transition: none;
    }
}

.fold-head:focus-visible {
    outline: 3px solid #60a5fa;
    outline-offset: 3px;
    border-radius: 10px;
}

.ad-section {
    margin: 32px 0 24px;
    padding-top: 16px;
    border-top: 1px solid #e5e7eb;
}

.ad-label {
    margin: 0 0 8px;
    font-size: 12px;
    color: #666;
    line-height: 1.4;
}

.ad-section .adsbygoogle {
    min-height: 100px;
}