@charset "utf-8";

/* ==========================================================================
   1. Imports & Global Reset
   ========================================================================== */
@import url('https://fonts.googleapis.com/css2?family=Courier+Prime&family=Cutive+Mono&display=swap');

body {
    margin: 2em;
    font-family: sans-serif;
    line-height: 1.6;
    color: #222;
    background-color: #f2f2f2;
    background-repeat: repeat;
}

@media (max-width: 767px) {
    body {
        margin: 1em;
        background-color: #f2f2f2;
        background-image: none;
    }
}

/* noto-sans-jp-regular - latin */
@font-face {
  font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
  font-family: 'Noto Sans JP';
  font-style: normal;
  font-weight: 400;
  src: url('../fonts/noto-sans-jp-v56-latin-regular.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}

/* passions-conflict-regular - latin */
@font-face {
  font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
  font-family: 'Passions Conflict';
  font-style: normal;
  font-weight: 400;
  src: url('../fonts/passions-conflict-v9-latin-regular.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}

/* parisienne-regular - latin */
@font-face {
  font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
  font-family: 'Parisienne';
  font-style: normal;
  font-weight: 400;
  src: url('../fonts/parisienne-v14-latin-regular.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}

@font-face {
  font-family: "Tegaki_Zatsu";
  src: url("../fonts/851tegaki_zatsu_normal_0883.woff2") format('woff2'),
       url("../fonts/851tegaki_zatsu_normal_0883.woff")  format('woff');
}

/* ==========================================================================
   2. Typography & Base Elements
   ========================================================================== */
a {
    color: #0645ad;
    text-decoration: underline;
}

h2 {
    margin-top: 2em;
    border-bottom: 1px solid #ccc;
    padding-bottom: 0.3em;
}

h3 {
    margin-top: 1.5em;
    color: #333;
}

hr {
    height: 1px;
    border: none;
    margin: 1em 0;
}

hr.thin {
    height: 1px;
    border: none;
    margin: 0.5em 0;
    background-color: #666;
}

/* Base Links & Lists */
.local {
    list-style: none;
    padding-left: 0;
}
.local ol {
    margin-top: 0.3em;
}
.local li {
    margin-top: 0.8em;
}

.local a,
.see-also a,
.references a,
.external-links a {
    text-decoration: none;
    border-bottom: 1px dotted #888;
}

.local a:hover,
.see-also a:hover,
.references a:hover,
.external-links a:hover {
    border-bottom-style: solid;
}

.references .title {
    color: #36a;
    font-style: italic;
}

/* Email Links */
.email-link {
    font-family: 'Courier Prime', 'Cutive Mono', 'Courier New', monospace;
    font-size: 1.2rem;
    color: #7366ff;
    text-decoration-color: #bbb;
}

.email-link:link,
.email-link:visited {
    color: #555;
}

.email-link:hover {
    color: #7366ff;
    text-decoration-color: #bf0069;
}

/* ==========================================================================
   3. Header, Footer & Common Layout
   ========================================================================== */
.site-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.2em 0.4em;
    margin-bottom: 0.8em;
}

.site-logo img {
    display: block;
}

.site-footer {
    color: #999;
    font-family: 'Courier Prime', 'Cutive Mono', 'Courier New', monospace;
    font-size: 1.0em;
}

.title-block {
    text-align: center;
    margin: 3em auto;
    font-family: "hiragino kaku gothic pron", meiryo, "yu gothic", arial, sans-serif;
    color: #222;
}

.title-block h1 {
    font-size: 1.8em;
    font-weight: 600;
    margin: 0.2em 0;
    letter-spacing: 0.5px;
}

.title-block .subtitle {
    font-size: 1.2em;
    font-weight: 400;
    color: #555;
    margin: 0.4em 0 1.2em;
    font-style: italic;
}

.title-block .meta {
    font-size: 0.95em;
    color: #666;
    line-height: 1.5;
    margin-top: 0;
}

.title-block .author {
    font-variant: normal;
    font-style: normal;
    letter-spacing: 0.05em;
    color: #555;
}

/* ==========================================================================
   4. Images & Visual Containers
   ========================================================================== */
img {
    border: 0;
}

.illustration,
.image {
    display: block;
    margin: 24px auto;
    border-radius: 12px;
    max-width: 100%;
    height: auto;
}

.illustration {
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
}

.image-left {
    display: block;
    margin: 24px 0;
    border-radius: 12px;
    max-width: 100%;
    height: auto;
}

.image-title {
    display: flex;
    justify-content: center;
    margin: 1.2em 0;
}

.image-row {
    display: flex;
    gap: 1px;
    flex-wrap: wrap;
    justify-content: center;
}

.round-cut {
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

/* ==========================================================================
   5. Cards, Columns, Quotes & Tooltips
   ========================================================================== */
.card {
    max-width: 1024px;
    margin: 0 auto;
    background: #fff;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 6px 20px rgba(30, 40, 60, 0.08);
}

.column {
    margin: 1.2em 0 1.5em 0;
    padding: 0.8em 1.2em;
    border: 1px solid #b0b0b0;
    border-radius: 6px;
    background-color: #fafafa;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.6) inset;
}

.column p {
    margin: 0.5em 0;
    line-height: 1.6;
}

.column p.column-header {
    font-weight: bold;
    font-size: 1.1em;
    margin-top: 0.2em;
    margin-bottom: 0.0em;
    color: #003399;
}

.quote {
    margin: 1em 0;
    padding-left: 1em;
    border-left: 3px solid #ccc;
    background-color: #fcfcfc;
}

/* Tooltip Component */
.tooltip {
    position: relative;
    cursor: help;
    border-bottom: 1px dotted #666;
}

.tooltip-text {
    position: absolute;
    visibility: hidden;
    bottom: calc(100% + 6px);
    left: 50%;
    transform: none;
    width: max-content;
    max-width: min(680px, calc(100vw - 20px));
    white-space: normal;
    background-color: #fffff8;
    color: #222222;
    border: 1px solid #ccc;
    padding: 6px 10px;
    border-radius: 4px;
    font-size: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
    z-index: 1;
    opacity: 0;
    transition: opacity 0.2s;
}

.tooltip:is(:hover, :focus-visible, :focus-within, :active) > .tooltip-text {
    visibility: visible;
    opacity: 1;
}

.tooltip-sakura .tooltip-text {
    background-color: #f6f0f3;
    color: #2a2a2a;
    border: 1px solid #d8d2f0;
}

.tooltip-skyblue .tooltip-text {
    background-color: #eef6ff;
    border: 1px solid #c9dbf2;
    color: #1f2a36;
}

.tooltip-rich {
    text-align: center;
}

.tooltip-rich img,
.tooltip-rich svg {
    display: block;
    margin: 6px auto 0;
    width: 220px;
    max-width: 100%;
    height: auto;
    border-radius: 3px;
}

/* ==========================================================================
   6. Novel & Story Elements
   ========================================================================== */
.dialogue,
.monologue {
    margin-left: 2em;
    margin-top: 1em;
    margin-bottom: 1em;
}

.dialogue .pause {
    margin-top: 1.5em;
    margin-bottom: 1.5em;
}

.novel {
    white-space: pre-line;
    line-height: 2;
}

.waka {
    white-space: pre-wrap;
    margin: 1.5em 0 1.5em 2em;
    font-family: "Yu Mincho", "Hiragino Mincho ProN", "YuMincho", serif;
    font-size: 1.05em;
    font-weight: bold;
    line-height: 1.0;
    color: #421;
}

.tegaki-zatsu {
  font-family: "Tegaki_Zatsu";
}


.royal-letter {
    font-family: "Passions Conflict", cursive;
    font-size: 2.5rem;
    font-weight: normal;
    line-height: 1;
}

.story-end {
    margin-top: 3em;
}

.fin {
    text-align: center;
    font-family: "Parisienne", cursive;
    font-size: 3rem;
    font-weight: normal;
    line-height: 1;
}

.authors-note {
    margin-top: 60px;
    padding-top: 30px;
    border-top: 1px dashed #555;
    font-size: 0.9em;
    color: #888;
    line-height: 1.8;
}

.authors-note h2 {
    font-size: 1.1em;
    color: #aaa;
    text-align: center;
    font-weight: normal;
    letter-spacing: 0.05em;
    border-bottom: none; /* 下線をリセット */
}

.authors-note ul {
    list-style: none;
}

.tags {
    margin-left: 1.5em;
    font-size: 0.9em;
    color: #999;
}

.story-divider {
    width: 50%;
    border: none;
    border-top: 1px dashed #888;
    margin-left: 1.5em;
}

/* Text Accents & Utility Colors */
.dim-gray { color: #999; }
.b-rose   { color: #e36; }
