/* Prism.js - Ocean Slate Dark theme */
pre[class*="language-"],
code[class*="language-"],
pre.wp-block-code,
pre.wp-block-code code,
.entry-content pre,
.entry-content pre code {
    color: #e2e8f0;
    background: #0f172a;
    font-family: "JetBrains Mono", "Fira Code", Consolas, Menlo, monospace;
    font-size: 0.9em;
    line-height: 1.6;
    text-shadow: none;
    direction: ltr;
    text-align: left;
    white-space: pre;
    word-spacing: normal;
    word-break: normal;
    word-wrap: normal;
    tab-size: 4;
    hyphens: none;
}

pre[class*="language-"],
pre.wp-block-code,
.entry-content > pre {
    padding: 1em 1.2em;
    margin: 1.5em 0;
    overflow: auto;
    border-radius: 8px;
    border: 1px solid #1e293b;
    box-shadow: 0 2px 8px rgba(15,23,42,.15);
}

code[class*="language-"]::selection,
pre[class*="language-"]::selection,
pre.wp-block-code::selection {
    background: #2563eb;
    color: #fff;
}

/* インラインコード */
:not(pre) > code {
    background: #f1f5f9;
    color: #0f172a;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.9em;
    white-space: normal;
}

/* Syntax tokens */
.token.comment,
.token.prolog,
.token.doctype,
.token.cdata       { color: #64748b; font-style: italic; }
.token.punctuation { color: #94a3b8; }
.token.namespace   { opacity: .7; }

.token.property,
.token.tag,
.token.constant,
.token.symbol,
.token.deleted     { color: #f87171; }

.token.boolean,
.token.number      { color: #fbbf24; }

.token.selector,
.token.attr-name,
.token.string,
.token.char,
.token.builtin,
.token.inserted    { color: #86efac; }

.token.operator,
.token.entity,
.token.url,
.language-css .token.string,
.style .token.string,
.token.variable    { color: #a5b4fc; }

.token.atrule,
.token.attr-value,
.token.function,
.token.class-name  { color: #60a5fa; }

.token.keyword     { color: #c084fc; font-weight: 600; }
.token.regex,
.token.important   { color: #fb923c; }
.token.important,
.token.bold        { font-weight: bold; }
.token.italic      { font-style: italic; }
.token.entity      { cursor: help; }

/* line-numbers plugin */
pre[class*="language-"].line-numbers {
    position: relative;
    padding-left: 3.8em;
    counter-reset: linenumber;
}
pre[class*="language-"].line-numbers > code {
    position: relative;
    white-space: inherit;
}
.line-numbers .line-numbers-rows {
    position: absolute;
    pointer-events: none;
    top: 1em;
    font-size: 100%;
    left: 0;
    width: 3em;
    letter-spacing: -1px;
    border-right: 1px solid #334155;
    user-select: none;
    padding: 0 0.5em;
}
.line-numbers-rows > span {
    display: block;
    counter-increment: linenumber;
}
.line-numbers-rows > span:before {
    content: counter(linenumber);
    color: #475569;
    display: block;
    padding-right: 0.8em;
    text-align: right;
}

/* モバイル */
@media (max-width: 600px) {
    pre[class*="language-"],
    pre.wp-block-code,
    .entry-content > pre {
        font-size: 0.82em;
        padding: 0.8em;
    }
}
