.azg {
    --azg-ink: #36252b;
    --azg-muted: #695159;
    --azg-line: #eedfe0;
    --azg-accent: #983750;
    --azg-gold: #875414;
    --azg-purple: #6b4294;
    max-width: 900px;
    margin: 1.6rem auto;
    overflow: hidden;
    color: var(--azg-ink);
    background: #fffdfc;
    border: 1px solid #e9d6d8;
    border-radius: 22px;
    box-shadow: 0 12px 36px #4d25320b;
    font-family: system-ui, "Noto Sans JP", "Hiragino Kaku Gothic ProN", Meiryo, sans-serif;
    font-size: 16px;
    line-height: 1.55;
    text-align: left;
    color-scheme: light;
}

.azg *, .azg *::before, .azg *::after { box-sizing: border-box; }
.azg p, .azg h2, .azg h3, .azg dd, .azg dl { margin: 0; }
.azg .azg-gold { color: var(--azg-gold); }
.azg .azg-purple { color: var(--azg-purple); }

.azg .azg-hero {
    position: relative;
    isolation: isolate;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 1rem;
    padding: clamp(1.25rem, 5vw, 2.6rem);
    overflow: hidden;
    background: radial-gradient(ellipse at 80% 15%, #fff8ec, transparent 61%), linear-gradient(115deg, #f8ddd9, #f8e7e4 62%, #f1ced6);
    border-bottom: 1px solid #ebd5d5;
}

.azg .azg-hero::after {
    position: absolute;
    z-index: -1;
    inset: 10px;
    border: 1px solid #b9718052;
    border-radius: 12px;
    content: "";
    pointer-events: none;
}

.azg .azg-kind {
    color: #733244;
    font-size: .77em;
    font-weight: 750;
    letter-spacing: .09em;
}

.azg h2.azg-title {
    padding: 0;
    border: 0;
    background: transparent;
    color: #592631;
    font: 700 clamp(1.75rem, 6vw, 3.25rem)/1.22 "Noto Serif JP", "Yu Mincho", "Hiragino Mincho ProN", serif;
    letter-spacing: .055em;
    margin: .22em 0 .26em;
}

.azg h2.azg-title::before, .azg h2.azg-title::after,
.azg h3.azg-results-title::before, .azg h3.azg-results-title::after { content: none; }
.azg .azg-featured { font-size: 1.06em; font-weight: 800; }
.azg .azg-description { margin-top: .25em; color: var(--azg-muted); font-size: .8em; }

.azg .azg-portrait-frame {
    display: grid;
    place-items: center;
    width: clamp(5rem, 22vw, 8.75rem);
    aspect-ratio: 1;
    padding: 6px;
    border: 1px solid #c88d85;
    border-radius: 50%;
    background: #fff8f0;
    box-shadow: 0 0 0 5px #fff9f289, 0 8px 22px #6f39432b;
}

.azg .azg-portrait-frame img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: 50%;
    background: #f2cfce;
}

.azg .azg-body { padding: clamp(1rem, 4vw, 2rem); }
.azg .azg-pickup-caption {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: .15rem .65rem;
    margin: 0 0 .5rem;
    color: var(--azg-muted);
    font-size: .8em;
}

.azg .azg-pickups {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    list-style: none;
    margin: 0 0 1rem;
    padding: 0;
}

.azg .azg-pickups li {
    display: flex;
    align-items: center;
    gap: .35rem;
    padding: .25rem .6rem .25rem .3rem;
    margin: 0;
    border: 1px solid #ebdeef;
    border-radius: 99px;
    background: #faf5fb;
    color: #493551;
    font-size: .8em;
    font-weight: 700;
}

.azg .azg-pickups img { display: block; width: 28px; height: 28px; border-radius: 50%; }
.azg .azg-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    border: 1px solid var(--azg-line);
    border-radius: 12px;
    overflow: hidden;
    background: #fcf7f6;
}

.azg .azg-stats > div { min-width: 0; padding: .75rem .4rem; text-align: center; }
.azg .azg-stats > div + div { border-inline-start: 1px solid var(--azg-line); }
.azg .azg-stats dt { margin: 0; color: var(--azg-muted); font-size: .76em; font-weight: 650; }
.azg .azg-stats dd { font-size: 1.45em; font-weight: 750; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.azg .azg-stats dd small { color: var(--azg-muted); font-size: .5em; }
.azg .azg-stats [data-azg-value="five"] { color: var(--azg-gold); }
.azg .azg-stats [data-azg-value="four"] { color: var(--azg-purple); }

.azg .azg-progress {
    display: flex;
    align-items: center;
    gap: .65rem;
    margin: .8rem 0 1rem;
    color: var(--azg-muted);
    font-size: .76em;
}

.azg .azg-progress progress {
    flex: 1 1 auto;
    min-width: 20px;
    width: 100%;
    height: 6px;
    appearance: none;
    accent-color: var(--azg-accent);
    border: 0;
    border-radius: 999px;
    overflow: hidden;
    background: #f2e3e5;
}

.azg .azg-progress progress::-webkit-progress-bar { background: #f2e3e5; }
.azg .azg-progress progress::-webkit-progress-value { background: var(--azg-accent); border-radius: 999px; }
.azg .azg-progress progress::-moz-progress-bar { background: var(--azg-accent); border-radius: 999px; }
.azg .azg-progress span { flex: none; }
.azg .azg-progress strong { color: var(--azg-ink); font-variant-numeric: tabular-nums; }

.azg .azg-controls { display: flex; flex-wrap: wrap; align-items: stretch; gap: .55rem; }
.azg .azg-controls button {
    appearance: none;
    min-height: 44px;
    margin: 0;
    padding: .55rem .85rem;
    font: inherit;
    font-size: .9em;
    font-weight: 750;
    cursor: pointer;
}

.azg .azg-controls button:focus-visible, .azg .azg-share :is(button, a):focus-visible, .azg .azg-rules summary:focus-visible {
    outline: 2px solid var(--azg-accent);
    outline-offset: 3px;
}

.azg .azg-controls button:disabled { opacity: .5; cursor: default; }
.azg .azg-controls .azg-button { flex: 1; min-width: 76px; border: 1px solid #cda1ac; border-radius: 9px; background: #fffaf9; color: #76273d; }
.azg .azg-controls .azg-button:hover:enabled { background: #f8e9ec; }
.azg .azg-controls .azg-primary { border-color: var(--azg-accent); background: var(--azg-accent); color: #fff; }
.azg .azg-controls .azg-primary:hover:enabled { background: #7b2940; }
.azg .azg-controls .azg-reset { border: 1px solid transparent; background: transparent; color: var(--azg-muted); border-radius: 9px; }
.azg .azg-controls .azg-reset:hover:enabled { background: #f7efef; }

.azg .azg-results { margin-top: 1.35rem; padding-top: 1rem; border-top: 1px solid var(--azg-line); }
.azg h3.azg-results-title { padding: 0; border: 0; background: transparent; color: var(--azg-ink); font-size: 1em; font-weight: 750; }
.azg .azg-status { margin: .25rem 0 0; color: var(--azg-muted); font-size: .79em; }
.azg .azg-result-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: .5rem;
    list-style: none;
    margin: .7rem 0 0;
    padding: 0;
}
.azg .azg-result-grid:empty { margin: 0; }

.azg .azg-card {
    display: grid;
    grid-template-rows: auto 1fr auto;
    gap: .25rem;
    align-items: center;
    justify-items: center;
    min-height: 110px;
    margin: 0;
    padding: .4rem .2rem;
    border: 1px solid var(--azg-line);
    border-radius: 9px;
    background: #f7f2f1;
    color: #695d61;
    text-align: center;
}
.azg .azg-card-3 { grid-template-rows: 1fr; }
.azg .azg-card-4 { background: #f8f0fb; border-color: #dfcce8; color: var(--azg-purple); }
.azg .azg-card-5 { background: #fff2d5; border-color: #e5c58c; color: var(--azg-gold); }
.azg .azg-card img { display: block; width: min(100%, 54px); height: auto; aspect-ratio: 1; object-fit: cover; border-radius: 7px; }
.azg .azg-card-rarity { font-size: .76em; font-weight: 800; }
.azg .azg-card-name { display: block; color: var(--azg-ink); font-size: .72em; font-weight: 700; overflow-wrap: anywhere; }
.azg .azg-card-winning-rate { display: block; font-size: .69em; font-weight: 750; line-height: 1.35; overflow-wrap: anywhere; }
.azg .azg-card-winning-rate > span { display: inline-block; white-space: nowrap; }

.azg .azg-history { margin-top: 1.2rem; }
.azg .azg-history[hidden] { display: none; }
.azg .azg-history table {
    width: 100%;
    margin: .5rem 0 0;
    border-collapse: collapse;
    table-layout: fixed;
    color: var(--azg-ink);
    font-size: .79em;
    font-variant-numeric: tabular-nums;
    text-align: center;
}
.azg .azg-history th, .azg .azg-history td {
    padding: .38rem .25rem;
    border: 1px solid var(--azg-line);
    overflow-wrap: anywhere;
}
.azg .azg-history th { background: #fcf1ef; }
.azg .azg-history td { background: #fffdfc; }
.azg .azg-history td:last-child { color: var(--azg-gold); font-weight: 750; }

.azg .azg-share { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .75rem; }
.azg .azg-share :is(button, a) {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: .45rem .75rem;
    border: 1px solid #cda1ac;
    border-radius: 9px;
    background: #fffaf9;
    color: #76273d;
    font: inherit;
    font-size: .82em;
    font-weight: 750;
    text-decoration: none;
    cursor: pointer;
}
.azg .azg-share button[hidden] { display: none; }
.azg .azg-share button:hover { background: #f8e9ec; }
.azg .azg-share .azg-share-x { background: #30292c; border-color: #30292c; color: #fff; }
.azg .azg-share .azg-share-x:hover { background: #51444a; }
.azg .azg-share-help, .azg .azg-share-status { margin-top: .35rem; color: var(--azg-muted); font-size: .75em; }
.azg .azg-share-help p + p { margin-top: .2rem; }
.azg .azg-share-help strong { color: var(--azg-ink); }
.azg .azg-share-status:empty { margin: 0; }

.azg .azg-note { margin: 1.05rem 0 0; color: var(--azg-muted); font-size: .75em; }
.azg .azg-rules { margin-top: .45rem; color: var(--azg-muted); font-size: .79em; }
.azg .azg-rules summary { width: fit-content; color: #78354a; cursor: pointer; font-weight: 700; }
.azg .azg-rules ul { margin: .55rem 0 0; padding-inline-start: 1.3rem; }
.azg .azg-rules li + li { margin-top: .25rem; }

@media (max-width: 480px) {
    .azg { border-radius: 16px; }
    .azg .azg-hero { padding: 1.15rem; }
    .azg .azg-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .azg .azg-stats > div:nth-child(3) { border-inline-start: 0; }
    .azg .azg-stats > div:nth-child(n+3) { border-top: 1px solid var(--azg-line); }
    .azg .azg-result-grid { gap: .3rem; }
    .azg .azg-card { min-height: 87px; }
    .azg .azg-card-name { font-size: .67em; line-height: 1.3; }
    .azg .azg-card-winning-rate { font-size: .65em; }
    .azg .azg-history table { font-size: .72em; }
}
