/* Notice bar above the panel */
.demo-notice {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 0.25rem 1.5rem;
    padding: 0.4rem 1rem;
    font-size: 0.8125rem;
    color: white;
    background: rgb(17 24 39);
}

.demo-notice a {
    color: rgb(253 186 116);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.demo-notice-links {
    display: inline-flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.25rem 1rem;
}

/* On a phone the links wrap between links, not inside one */
.demo-notice-links a {
    white-space: nowrap;
}

.demo-notice a.demo-notice-buy {
    color: white;
    font-weight: 600;
}

.demo-notice-lang select {
    padding: 0.1rem 1.6rem 0.1rem 0.5rem;
    font-size: 0.8125rem;
    color: white;
    background-color: rgb(31 41 55);
    border: 1px solid rgb(75 85 99);
    border-radius: 0.375rem;
}

.demo-notice-lang .sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
}

/* Tour page */
.demo-tour-section + .demo-tour-section {
    margin-top: 0.5rem;
}

.demo-tour-heading {
    margin-bottom: 0.75rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: rgb(107 114 128);
}

.demo-tour-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(18rem, 1fr));
    gap: 1rem;
}

.demo-tour-card {
    display: flex;
    gap: 0.875rem;
    padding: 1rem 1.25rem;
    border-radius: 0.75rem;
    background: white;
    box-shadow: 0 1px 2px rgb(0 0 0 / 0.05);
    outline: 1px solid rgb(3 7 18 / 0.05);
    transition: outline-color 0.15s;
}

.demo-tour-card:hover {
    outline: 2px solid var(--primary-500);
}

.dark .demo-tour-card {
    background: rgb(255 255 255 / 0.05);
    outline-color: rgb(255 255 255 / 0.1);
}

.demo-tour-icon {
    flex: none;
    width: 1.5rem;
    height: 1.5rem;
    color: var(--primary-500);
}

.demo-tour-title {
    font-weight: 600;
}

.demo-tour-text {
    margin-top: 0.25rem;
    font-size: 0.875rem;
    color: rgb(107 114 128);
}

.demo-tour-text code,
.demo-how-text code {
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 0.75rem;
    font-variant-ligatures: none;
}

.demo-tour-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem 1rem;
    margin-top: 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
}

.demo-tour-links a {
    color: var(--primary-600);
}

.dark .demo-tour-links a {
    color: var(--primary-400);
}

.demo-tour-links a:hover {
    text-decoration: underline;
}

/* カード全体を押せるようにする：タイトルのリンクをカードいっぱいに広げ、ほかのリンク（Download）はその上に重ねる */
.demo-tour-card {
    position: relative;
    cursor: pointer;
}

.demo-tour-title::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
}

.demo-tour-links a,
.demo-how-open {
    position: relative;
    z-index: 1;
}

.demo-tour-card:focus-within {
    outline: 2px solid var(--primary-500);
}

/* 定期の取り込みのページの上の、デモの説明 */
.demo-schedules-guide {
    padding: 1rem 1.25rem;
    border-radius: 0.75rem;
    background: white;
    box-shadow: 0 1px 2px rgb(0 0 0 / 0.05);
    outline: 1px solid rgb(3 7 18 / 0.05);
    font-size: 0.875rem;
    color: rgb(75 85 99);
}

.dark .demo-schedules-guide {
    background: rgb(255 255 255 / 0.05);
    outline-color: rgb(255 255 255 / 0.1);
    color: rgb(209 213 219);
}

.demo-schedules-guide-title {
    margin-bottom: 0.25rem;
    font-size: 1rem;
    font-weight: 600;
    color: rgb(17 24 39);
}

.dark .demo-schedules-guide-title {
    color: white;
}

.demo-schedules-guide ol {
    margin-top: 0.5rem;
    padding-left: 1.25rem;
    list-style: decimal;
}

.demo-schedules-guide ol li + li {
    margin-top: 0.25rem;
}

/* 「ファイルをどこから取ってくるか・しくみ」：開くボタンと、コードの入ったモーダル */
.demo-how-open {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    margin-top: 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--primary-600);
}

.demo-how-open:hover {
    text-decoration: underline;
}

.dark .demo-how-open {
    color: var(--primary-400);
}

.demo-how-open-icon {
    width: 1rem;
    height: 1rem;
}

.demo-how {
    display: grid;
    gap: 1.5rem;
}

.demo-how-section {
    /* 長いコードの行で grid の列が広がらないように（コードは横にスクロール） */
    min-width: 0;
}

.demo-how-title {
    font-size: 0.9375rem;
    font-weight: 600;
    color: rgb(17 24 39);
}

.dark .demo-how-title {
    color: white;
}

.demo-how-text {
    margin-top: 0.25rem;
    font-size: 0.875rem;
    line-height: 1.6;
    color: rgb(75 85 99);
}

.dark .demo-how-text {
    color: rgb(209 213 219);
}

.demo-how-code {
    margin-top: 0.625rem;
    font-size: 0.8125rem;
}

/* Japanese headings wrap between phrases, not in the middle of a word (Chrome and Edge; other browsers keep the usual wrap) */
html:lang(ja) :is(h1, h2, h3) {
    word-break: auto-phrase;
}
