:root {
    --ink: #28242b;
    --muted: #746f79;
    --line: #ece7ee;
    --paper: #fffdfd;
    --soft: #f8f2f8;
    --accent: #b98fc1;
    --accent-deep: #7e5d86;
    --radius: 22px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    color: var(--ink);
    background:
        radial-gradient(circle at 15% 0%, rgba(224, 202, 231, .45), transparent 33rem),
        linear-gradient(180deg, #fffefe 0%, var(--paper) 100%);
    font-family: "Hiragino Kaku Gothic ProN", "Yu Gothic", system-ui, sans-serif;
    line-height: 1.8;
}

a { color: inherit; }

img { max-width: 100%; display: block; }

.shell {
    width: min(1120px, calc(100% - 40px));
    margin-inline: auto;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 10;
    border-bottom: 1px solid rgba(236, 231, 238, .8);
    backdrop-filter: blur(16px);
    background: rgba(255, 253, 253, .84);
}

.header-inner {
    min-height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.brand {
    font-size: 1.15rem;
    font-weight: 800;
    letter-spacing: .08em;
    text-decoration: none;
}

.global-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
    font-size: .92rem;
}

.global-nav a {
    text-decoration: none;
    color: var(--muted);
}

.global-nav a:hover { color: var(--accent-deep); }

.hero {
    padding: 128px 0 112px;
}

.hero-inner {
    min-height: 420px;
    display: grid;
    align-content: center;
}

.hero h1 {
    margin: 0;
    font-size: clamp(3.2rem, 10vw, 7rem);
    line-height: 1;
    letter-spacing: .06em;
}

.hero-copy {
    max-width: 620px;
    margin: 28px 0 34px;
    font-size: clamp(1.05rem, 2vw, 1.35rem);
    color: var(--muted);
}

.eyebrow {
    margin: 0 0 12px;
    color: var(--accent-deep);
    font-weight: 800;
    font-size: .75rem;
    letter-spacing: .2em;
}

.button {
    display: inline-flex;
    width: fit-content;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0 22px;
    border-radius: 999px;
    background: var(--ink);
    color: #fff;
    text-decoration: none;
    font-weight: 700;
}

.button:hover { opacity: .86; }

.section { padding: 72px 0 100px; }

.section-heading h2,
.page-head h1,
.article-head h1,
.not-found h1 {
    margin: 0;
    line-height: 1.35;
}

.page-head {
    padding-top: 88px;
    padding-bottom: 18px;
}

.page-head h1,
.article-head h1 {
    font-size: clamp(2.1rem, 5vw, 4rem);
}

.work-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 26px;
}

.work-card {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(255,255,255,.76);
    box-shadow: 0 18px 44px rgba(79, 58, 83, .06);
}

.cover {
    display: block;
    aspect-ratio: 4 / 5;
    background: var(--soft);
    overflow: hidden;
}

.cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .35s ease;
}

.cover:hover img { transform: scale(1.02); }

.work-card-body { padding: 22px; }

.work-card h2,
.work-card h3 {
    margin: 6px 0 10px;
    line-height: 1.45;
}

.work-card h2 { font-size: 1.25rem; }
.work-card h3 { font-size: 1.12rem; }

.work-card h2 a,
.work-card h3 a { text-decoration: none; }

.work-card p { margin: 0; color: var(--muted); }

.work-type {
    font-size: .75rem;
    font-weight: 800;
    letter-spacing: .12em;
    color: var(--accent-deep) !important;
}

.article {
    padding-top: 96px;
    padding-bottom: 120px;
}

.article-head {
    max-width: 850px;
    margin-bottom: 50px;
}

.lead {
    margin-top: 20px;
    color: var(--muted);
    font-size: 1.2rem;
}

.work-main-image {
    width: min(760px, 100%);
    max-height: 900px;
    object-fit: cover;
    border-radius: var(--radius);
    margin-bottom: 52px;
}

.prose {
    max-width: 780px;
    font-size: 1.03rem;
}

.prose h2,
.prose h3 {
    margin-top: 2.2em;
    line-height: 1.45;
}

.prose p { margin: 1.2em 0; }

.prose img { border-radius: 16px; }

.external-link { margin-top: 48px; }

.empty { color: var(--muted); }

.not-found {
    padding-top: 140px;
    padding-bottom: 180px;
}

.site-footer {
    border-top: 1px solid var(--line);
    padding: 34px 0;
    color: var(--muted);
    font-size: .84rem;
}

@media (max-width: 820px) {
    .work-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 560px) {
    .shell { width: min(100% - 28px, 1120px); }
    .header-inner { align-items: flex-start; padding: 18px 0; }
    .global-nav { justify-content: flex-end; gap: 12px; }
    .hero { padding: 92px 0 72px; }
    .hero-inner { min-height: 320px; }
    .work-grid { grid-template-columns: 1fr; }
    .section { padding: 54px 0 74px; }
}

.profile-tabs{display:flex;gap:8px;margin-bottom:42px;padding:6px;width:fit-content;border:1px solid var(--line);border-radius:999px;background:rgba(255,255,255,.8)}
.profile-tabs a{padding:8px 18px;border-radius:999px;text-decoration:none;color:var(--muted);font-weight:700;font-size:.9rem}.profile-tabs a.active{background:var(--ink);color:#fff}
.blog-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:26px}.blog-card{overflow:hidden;border:1px solid var(--line);border-radius:var(--radius);background:rgba(255,255,255,.76)}.blog-thumb{display:grid;place-items:center;aspect-ratio:16/10;background:linear-gradient(135deg,#f5edf6,#fff);text-decoration:none;color:var(--accent-deep);font-weight:800;letter-spacing:.12em}.blog-thumb img{width:100%;height:100%;object-fit:cover}.blog-card-body{padding:22px}.blog-card time{font-size:.78rem;color:var(--muted)}.blog-card h2,.blog-card h3{margin:7px 0 10px;line-height:1.45}.blog-card h2{font-size:1.25rem}.blog-card h3{font-size:1.1rem}.blog-card h2 a,.blog-card h3 a{text-decoration:none}.blog-card p{margin:0;color:var(--muted)}.blog-main-image{width:min(900px,100%);max-height:620px;object-fit:cover;border-radius:var(--radius);margin-bottom:52px}.more-link{margin-top:28px}.prose blockquote{margin:1.8em 0;padding:1px 1.4em;border-left:4px solid var(--accent);background:var(--soft)}.prose pre{overflow:auto;padding:18px;border-radius:14px;background:#252229;color:#fff}.prose code{font-family:ui-monospace,SFMono-Regular,Consolas,monospace}.prose :not(pre)>code{padding:.15em .4em;border-radius:5px;background:var(--soft)}.prose hr{border:0;border-top:1px solid var(--line);margin:2.4em 0}
@media(max-width:820px){.blog-grid{grid-template-columns:1fr 1fr}}@media(max-width:560px){.blog-grid{grid-template-columns:1fr}.profile-tabs{margin-bottom:30px}}

/* v3 additions */
.site-search{display:flex;align-items:center;gap:6px}.site-search input{width:150px;border:1px solid var(--line);border-radius:999px;padding:8px 12px;background:#fff}.site-search button{border:0;background:transparent;color:var(--accent-deep);font-weight:700;cursor:pointer}.work-card,.blog-card,.episode-card,.search-result,.notice-row{transition:transform .22s ease,box-shadow .22s ease,border-color .22s ease}.work-card:hover,.blog-card:hover{transform:translateY(-5px);box-shadow:0 24px 54px rgba(79,58,83,.13);border-color:#ddcfdf}.card-link{display:inline-flex;margin-top:16px;font-weight:700;text-decoration:none;color:var(--accent-deep)}.summary-clamp{display:-webkit-box;-webkit-line-clamp:5;-webkit-box-orient:vertical;overflow:hidden}.summary-wrap.expanded .summary-clamp{display:block}.summary-toggle{margin-top:8px;border:0;background:transparent;padding:0;color:var(--accent-deep);font:inherit;font-weight:700;cursor:pointer}.notice-list{display:grid;border-top:1px solid var(--line)}.notice-row{width:100%;display:grid;grid-template-columns:120px 1fr;gap:18px;text-align:left;padding:17px 8px;border:0;border-bottom:1px solid var(--line);background:transparent;color:var(--ink);font:inherit;cursor:pointer}.notice-row:hover{padding-left:16px;background:rgba(185,143,193,.08)}.notice-row time{color:var(--muted);font-size:.88rem}.notice-dialog{width:min(760px,calc(100% - 28px));max-height:min(82vh,800px);padding:0;border:0;border-radius:24px;box-shadow:0 30px 100px rgba(30,20,32,.25)}.notice-dialog::backdrop{background:rgba(35,29,37,.48);backdrop-filter:blur(4px)}.dialog-scroll{max-height:82vh;overflow:auto;padding:0 34px 40px}.notice-image{width:calc(100% + 68px);max-width:none;margin:0 -34px 28px;max-height:330px;object-fit:cover}.dialog-close{position:sticky;top:14px;z-index:2;float:right;margin:14px 14px 0 0;width:42px;height:42px;border:0;border-radius:50%;background:rgba(255,255,255,.92);font-size:1.5rem;cursor:pointer}.episode-section{margin-top:72px}.episode-list{display:grid;gap:12px}.episode-card{display:grid;gap:5px;padding:20px 22px;border:1px solid var(--line);border-radius:16px;text-decoration:none;background:#fff}.episode-card:hover,.search-result:hover{transform:translateX(5px);border-color:#d7c6da;box-shadow:0 14px 30px rgba(79,58,83,.08)}.episode-card span,.search-result span{font-size:.74rem;font-weight:800;letter-spacing:.12em;color:var(--accent-deep)}.episode-card small{color:var(--muted)}.search-page-form{display:flex;gap:10px;margin-bottom:30px}.search-page-form input{flex:1;min-width:0;border:1px solid var(--line);border-radius:14px;padding:14px 16px;font:inherit}.search-results{display:grid;gap:12px}.search-result{display:block;padding:20px 22px;border:1px solid var(--line);border-radius:16px;text-decoration:none;background:#fff}.search-result strong{display:block;margin:4px 0}.search-result p{margin:0;color:var(--muted)}.profile-head{display:grid;grid-template-columns:200px 1fr;gap:38px;align-items:center;margin-bottom:44px}.profile-photo{width:200px;aspect-ratio:1/1;object-fit:cover;border-radius:50%;border:6px solid #fff;box-shadow:0 18px 44px rgba(79,58,83,.13)}
@media(max-width:900px){.header-inner{flex-wrap:wrap}.site-search{width:100%;order:3}.site-search input{flex:1}.profile-head{grid-template-columns:140px 1fr}.profile-photo{width:140px}}@media(max-width:560px){.notice-row{grid-template-columns:1fr;gap:4px}.profile-head{grid-template-columns:1fr}.profile-photo{width:130px}.search-page-form{flex-direction:column}}


/* v3.1 layout fixes */
body{min-height:100vh;display:flex;flex-direction:column;background-attachment:fixed}
main{flex:1;width:100%}
.header-inner{display:grid;grid-template-columns:minmax(150px,1fr) auto minmax(220px,1fr);align-items:center}
.global-nav{justify-content:center}
.site-search{justify-self:end}
.site-search input{width:210px;min-height:38px;border-color:#ddd4df;outline:none;transition:border-color .2s ease,box-shadow .2s ease}
.site-search input:focus{border-color:var(--accent);box-shadow:0 0 0 4px rgba(185,143,193,.14)}
.site-search button{min-height:38px;padding:0 14px;border:1px solid var(--line);border-radius:999px;background:#fff;transition:transform .2s ease,box-shadow .2s ease}
.site-search button:hover{transform:translateY(-1px);box-shadow:0 8px 20px rgba(79,58,83,.10)}
.profile-tabs-wrap{border-bottom:1px solid rgba(236,231,238,.8);background:linear-gradient(90deg,rgba(248,242,248,.9),rgba(255,255,255,.72))}
.profile-tabs{width:min(1120px,calc(100% - 40px));margin:0 auto;padding:16px 0;border:0;border-radius:0;background:transparent;gap:10px}
.profile-tabs a{padding:9px 18px;border:1px solid transparent;transition:background .2s ease,color .2s ease,transform .2s ease,border-color .2s ease}
.profile-tabs a:hover{transform:translateY(-1px);background:#fff;border-color:var(--line);color:var(--ink)}
.profile-tabs a.active{background:var(--ink);border-color:var(--ink);color:#fff;box-shadow:0 8px 22px rgba(40,36,43,.12)}
.profile-article{padding-top:72px;min-height:520px}
.profile-head{grid-template-columns:180px minmax(0,1fr);gap:48px;margin-bottom:34px;align-items:center}
.profile-head.no-photo{display:block;margin-bottom:24px}
.profile-head .article-head{margin-bottom:0}
.profile-photo{width:180px}
.profile-article .prose{margin-left:228px}
.profile-head.no-photo + .prose{margin-left:0}
.site-footer{margin-top:auto;background:rgba(255,253,253,.86)}
@media(max-width:900px){.header-inner{grid-template-columns:1fr auto;gap:14px}.global-nav{justify-content:flex-end}.site-search{grid-column:1/-1;width:100%;justify-self:stretch}.site-search input{width:auto;flex:1}.profile-article .prose{margin-left:188px}.profile-head{grid-template-columns:140px minmax(0,1fr);gap:34px}.profile-photo{width:140px}}
@media(max-width:620px){.header-inner{grid-template-columns:1fr}.global-nav{justify-content:flex-start}.site-search{grid-column:auto}.profile-tabs{width:min(100% - 28px,1120px);overflow-x:auto}.profile-article{padding-top:48px}.profile-head{grid-template-columns:1fr;gap:24px}.profile-article .prose{margin-left:0}.profile-photo{width:128px}.article-head h1{font-size:clamp(2.2rem,13vw,3.4rem)}}

.form-page{max-width:900px}.public-form{display:grid;gap:20px;margin-top:28px}.public-form label{display:grid;gap:8px;font-weight:700}.public-form input,.public-form textarea,.public-form select{width:100%;padding:13px 15px;border:1px solid var(--line);border-radius:12px;background:#fff;font:inherit}.public-form .hp{position:absolute;left:-9999px;width:1px;height:1px}.form-grid{display:grid;grid-template-columns:1fr 1fr;gap:16px}.policy-box{max-height:260px;overflow:auto;border:1px solid var(--line);border-radius:16px;padding:20px;background:#fff}.consent{display:flex!important;grid-template-columns:auto 1fr!important;align-items:flex-start}.consent input{width:auto}.form-message{padding:15px 18px;border-radius:14px;background:#f2eafa;color:#654d6c}.proposal-guide,.work-business{display:flex;align-items:center;justify-content:space-between;gap:20px;padding:22px;border:1px solid var(--line);border-radius:18px;background:#fff}.work-business,.feedback-section{max-width:780px;margin-top:60px}.work-metadata{display:flex;flex-wrap:wrap;gap:10px 28px;max-width:780px;padding:18px 0;border-top:1px solid var(--line);border-bottom:1px solid var(--line)}.work-metadata div{display:flex;gap:10px}.work-metadata dt{color:var(--muted)}.rating-field{display:flex;gap:16px;border:0;padding:0}.rating-field label{display:flex!important;align-items:center;gap:5px}.rating-field input{width:auto}.comments-list article{padding:18px 0;border-top:1px solid var(--line)}.comments-list header{display:flex;justify-content:space-between;color:var(--muted)}@media(max-width:650px){.form-grid{grid-template-columns:1fr}.proposal-guide,.work-business{align-items:flex-start;flex-direction:column}}


/* v5 form and work layout fixes */
.form-page{max-width:920px}.form-intro{max-width:780px;color:var(--muted)}
.public-form{display:grid!important;gap:20px!important;margin-top:30px}.public-form label{display:grid!important;gap:8px!important;font-weight:700}.public-form input:not([type="checkbox"]):not([type="radio"]),.public-form textarea,.public-form select{display:block;width:100%!important;min-height:48px;padding:12px 14px;border:1px solid #dcd4df;border-radius:12px;background:#fff;color:var(--ink);font:inherit;line-height:1.5}.public-form textarea{min-height:150px;resize:vertical}.public-form .hp{position:absolute!important;left:-9999px!important;width:1px!important;height:1px!important;opacity:0}.form-grid{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px}.policy-box{max-height:280px;overflow:auto;border:1px solid var(--line);border-radius:16px;padding:22px;background:#fff}.policy-box h2:first-child{margin-top:0}.consent{display:flex!important;align-items:flex-start!important;gap:10px!important}.consent input{width:18px!important;height:18px!important;margin-top:4px}.proposal-guide,.work-business{display:flex;align-items:center;justify-content:space-between;gap:24px;padding:24px;border:1px solid var(--line);border-radius:18px;background:#fff}.proposal-guide p,.work-business p{margin:6px 0 0;color:var(--muted)}
.work-business,.feedback-section{max-width:780px;margin-top:68px}.work-business h2,.feedback-section h2{margin:0}.rating-summary{display:flex;align-items:baseline;gap:8px;margin:18px 0 26px}.rating-summary strong{font-size:2.5rem}.rating-summary span,.rating-summary small{color:var(--muted)}.feedback-form{padding:24px;border:1px solid var(--line);border-radius:18px;background:#fff}.rating-field{border:0;padding:0;margin:0}.rating-field legend{margin-bottom:10px;font-weight:700}.rating-options{display:flex;gap:10px;flex-wrap:wrap}.rating-options label{display:flex!important;align-items:center!important;justify-content:center!important;width:48px;height:48px;border:1px solid var(--line);border-radius:50%;cursor:pointer}.rating-options input{width:auto!important}.comments-list{margin-top:36px}.comments-list article{padding:20px 0;border-top:1px solid var(--line)}.comments-list header{display:flex;justify-content:space-between;gap:20px;color:var(--muted)}
@media(max-width:700px){.form-grid{grid-template-columns:1fr}.proposal-guide,.work-business{align-items:flex-start;flex-direction:column}.feedback-form{padding:18px}}


/* v5.1 rating UI */
.sr-only{position:absolute!important;width:1px!important;height:1px!important;padding:0!important;margin:-1px!important;overflow:hidden!important;clip:rect(0,0,0,0)!important;white-space:nowrap!important;border:0!important}
.feedback-form{padding:30px;gap:26px!important;background:linear-gradient(180deg,rgba(255,255,255,.97),rgba(253,249,253,.94));box-shadow:0 18px 46px rgba(82,58,87,.06)}
.rating-field legend{display:flex;align-items:center;gap:9px;margin:0 0 5px;font-size:1rem;font-weight:800}.rating-field legend i{color:var(--accent-deep)}
.rating-help{margin:0 0 14px;color:var(--muted);font-size:.86rem}
.star-rating{display:flex;flex-direction:row-reverse;justify-content:flex-end;gap:8px;width:max-content}
.star-rating input{position:absolute!important;opacity:0!important;pointer-events:none!important}
.star-rating label{display:grid!important;place-items:center!important;width:54px!important;height:54px!important;border:1px solid var(--line)!important;border-radius:16px!important;background:#fff!important;color:#d9d1db!important;cursor:pointer!important;font-size:1.55rem!important;transition:transform .18s ease,border-color .18s ease,color .18s ease,background .18s ease,box-shadow .18s ease!important}
.star-rating label:hover,.star-rating label:hover~label,.star-rating input:checked~label{color:#e1ad49!important;border-color:#ead29f!important;background:#fffaf0!important;box-shadow:0 9px 22px rgba(145,103,36,.12)!important}
.star-rating label:hover{transform:translateY(-3px) scale(1.04)}
.star-rating input:focus-visible+label{outline:3px solid rgba(185,143,193,.28);outline-offset:3px}
.feedback-fields{display:grid;grid-template-columns:minmax(0,.85fr) minmax(0,1.35fr);gap:18px;align-items:start}
.feedback-fields label{gap:10px!important}.field-label{display:flex;align-items:center;gap:8px;font-weight:800}.field-label i{width:18px;color:var(--accent-deep);text-align:center}
.feedback-fields input,.feedback-fields textarea{transition:border-color .18s ease,box-shadow .18s ease,background .18s ease}.feedback-fields input:focus,.feedback-fields textarea:focus{outline:none;border-color:var(--accent)!important;box-shadow:0 0 0 4px rgba(185,143,193,.13);background:#fff}
.feedback-submit{gap:9px;min-width:210px;box-shadow:0 10px 24px rgba(40,36,43,.14);transition:transform .18s ease,box-shadow .18s ease}.feedback-submit:hover{transform:translateY(-2px);box-shadow:0 14px 30px rgba(40,36,43,.19)}
.rating-summary:before{content:"\f005";font-family:"Font Awesome 6 Free";font-weight:900;color:#e1ad49;margin-right:2px;font-size:1.15rem}
@media(max-width:700px){.feedback-form{padding:21px}.feedback-fields{grid-template-columns:1fr}.star-rating{gap:5px}.star-rating label{width:48px!important;height:48px!important;border-radius:14px!important;font-size:1.35rem!important}.feedback-submit{width:100%}}


/* v5.3 unified public typography and spacing */
:root{
    --content-wide:1120px;
    --content-reading:780px;
}
.page-head{
    padding-top:72px;
    padding-bottom:10px;
}
.page-head h1,
.article-head h1{
    font-size:clamp(2.1rem,4.3vw,3.8rem);
    line-height:1.2;
    letter-spacing:.01em;
    text-wrap:balance;
}
.article{
    padding-top:74px;
    padding-bottom:100px;
}
.article-head{
    max-width:900px;
    margin-bottom:38px;
}
.article-head .lead{
    max-width:760px;
    margin-top:18px;
    font-size:1.05rem;
    line-height:1.85;
}
.profile-article{
    padding-top:64px;
}
.profile-head .article-head h1{
    font-size:clamp(2.2rem,4.6vw,3.8rem);
}
.blog-page .page-head h1,
.profile-article .article-head h1{
    font-size:clamp(2.2rem,4.4vw,3.7rem);
}
.prose{
    max-width:var(--content-reading);
    font-size:1rem;
    line-height:1.95;
}
.prose h2{
    margin:2.4em 0 .8em;
    font-size:clamp(1.45rem,2.3vw,1.9rem);
}
.prose h3{
    margin:2em 0 .7em;
    font-size:clamp(1.2rem,1.8vw,1.5rem);
}
.work-business{
    align-items:center;
}
.work-business .button{
    flex:0 0 auto;
    max-width:250px;
    text-align:center;
    white-space:normal;
    line-height:1.45;
}
.embedded-media{
    margin:2.2em 0;
}
.embedded-media img{
    width:auto;
    max-width:100%;
    height:auto;
    border-radius:18px;
    box-shadow:0 18px 46px rgba(69,51,73,.09);
}
.embedded-media figcaption{
    margin-top:10px;
    color:var(--muted);
    font-size:.86rem;
    text-align:center;
}
.media-missing{
    display:block;
    padding:14px 16px;
    border:1px dashed #cbbdce;
    border-radius:12px;
    background:#faf6fb;
    color:#8a718f;
}
@media(max-width:700px){
    .page-head{padding-top:54px}
    .article{padding-top:54px;padding-bottom:78px}
    .article-head{margin-bottom:28px}
    .page-head h1,.article-head h1{font-size:clamp(2rem,10vw,3rem)}
    .work-business .button{max-width:none;width:100%}
}

/* v5.3.2 simple star rating */
.star-rating{
    display:flex;
    flex-direction:row-reverse;
    justify-content:flex-end;
    align-items:center;
    gap:7px;
    width:max-content;
}
.star-rating label{
    display:inline-flex!important;
    align-items:center!important;
    justify-content:center!important;
    width:auto!important;
    height:auto!important;
    padding:2px!important;
    border:0!important;
    border-radius:0!important;
    background:transparent!important;
    color:#d7d0da!important;
    box-shadow:none!important;
    font-size:2rem!important;
    line-height:1!important;
    cursor:pointer!important;
    transform:none!important;
    transition:color .14s ease!important;
}
.star-rating label:hover,
.star-rating label:hover~label,
.star-rating input:checked~label{
    color:#8f6898!important;
    border-color:transparent!important;
    background:transparent!important;
    box-shadow:none!important;
    transform:none!important;
}
.star-rating input:focus-visible+label{
    outline:2px solid rgba(143,104,152,.32);
    outline-offset:3px;
    border-radius:3px!important;
}
@media(max-width:700px){
    .star-rating{gap:5px}
    .star-rating label{
        width:auto!important;
        height:auto!important;
        border-radius:0!important;
        font-size:1.85rem!important;
    }
}

/* v5.3.5 profile/blog tab alignment */
.profile-tabs-wrap + .profile-article,
.profile-tabs-wrap + .blog-page {
    margin-top: 0;
}

.profile-tabs a {
    min-width: 104px;
    text-align: center;
}

.profile-tabs a.active {
    background: var(--ink);
    border-color: var(--ink);
    color: #fff;
    box-shadow: none;
}

.profile-tabs a:hover {
    transform: none;
}

/* v5.3.6 unified profile/blog tabs */
.profile-tabs-wrap{
    width:min(1120px,calc(100% - 40px));
    margin:46px auto 0;
    padding:0;
    border:0;
    border-bottom:1px solid var(--line);
    background:transparent;
}
.profile-tabs{
    width:auto;
    margin:0;
    padding:0 0 14px;
    display:flex;
    gap:10px;
    border:0;
    border-radius:0;
    background:transparent;
}
.profile-tabs a{
    min-width:104px;
    padding:10px 18px;
    border:1px solid transparent;
    border-radius:999px;
    background:transparent;
    color:var(--muted);
    text-align:center;
    text-decoration:none;
    font-weight:700;
    transition:background-color .16s ease,color .16s ease,border-color .16s ease;
}
.profile-tabs a:hover{
    transform:none;
    background:#fff;
    border-color:var(--line);
    color:var(--ink);
}
.profile-tabs a.active{
    background:var(--ink);
    border-color:var(--ink);
    color:#fff;
    box-shadow:none;
}
.profile-tabs-wrap + .profile-article,
.profile-tabs-wrap + .blog-page{
    margin-top:0;
}
.profile-tabs-wrap + .profile-article{
    padding-top:50px;
}
.profile-tabs-wrap + .blog-page .page-head{
    padding-top:18px;
}
@media(max-width:620px){
    .profile-tabs-wrap{
        width:min(100% - 28px,1120px);
        margin-top:28px;
        overflow-x:auto;
    }
    .profile-tabs{
        width:max-content;
        min-width:100%;
    }
}


/* v5.3.7 reliable profile/blog active state */
.profile-tabs a.active,
.profile-tabs a[aria-current="page"] {
    background: var(--ink) !important;
    border-color: var(--ink) !important;
    color: #fff !important;
}

.profile-tabs a.active:hover,
.profile-tabs a[aria-current="page"]:hover {
    background: var(--ink) !important;
    border-color: var(--ink) !important;
    color: #fff !important;
}

/* v5.3.9 collapsible summaries on works list */
.work-summary-toggle {
    margin-top: 14px;
}

.work-summary-toggle summary {
    display: block;
    list-style: none;
    cursor: pointer;
}

.work-summary-toggle summary::-webkit-details-marker {
    display: none;
}

.work-summary-text {
    display: -webkit-box;
    overflow: hidden;
    color: var(--muted);
    line-height: 1.8;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 5;
}

.work-summary-toggle[open] .work-summary-text {
    display: block;
    overflow: visible;
}

.work-summary-action {
    display: inline-flex;
    align-items: center;
    margin-top: 12px;
    color: var(--accent-deep);
    font-size: .84rem;
    font-weight: 700;
}

.work-summary-close {
    display: none;
}

.work-summary-toggle[open] .work-summary-open {
    display: none;
}

.work-summary-toggle[open] .work-summary-close {
    display: inline;
}

.work-summary-toggle summary:hover .work-summary-action,
.work-summary-toggle summary:focus-visible .work-summary-action {
    text-decoration: underline;
}

.work-summary-toggle summary:focus-visible {
    outline: 2px solid rgba(126, 93, 134, .35);
    outline-offset: 5px;
    border-radius: 6px;
}

.work-card-link {
    display: inline-flex;
    margin-top: 16px;
    color: var(--ink);
    font-size: .9rem;
    font-weight: 700;
    text-decoration: none;
}

.work-card-link:hover {
    color: var(--accent-deep);
}


/* v5.4.0 publication destination buttons */
.publication-section{
    max-width:780px;
    margin-top:64px;
}
.publication-section h2{
    margin:0 0 22px;
    font-size:clamp(1.45rem,2.2vw,1.9rem);
}
.publication-buttons{
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:14px;
}
.publication-button{
    display:grid;
    grid-template-columns:46px minmax(0,1fr) auto;
    align-items:center;
    gap:14px;
    min-height:82px;
    padding:15px 17px;
    border:1px solid var(--line);
    border-radius:16px;
    background:#fff;
    color:var(--ink);
    text-decoration:none;
    transition:border-color .16s ease,background-color .16s ease;
}
.publication-button:hover{
    border-color:#c7b8cb;
    background:#fcfafc;
}
.publication-button-mark{
    display:grid;
    place-items:center;
    width:46px;
    height:46px;
    border-radius:12px;
    font-size:.84rem;
    font-weight:900;
}
.publication-button-text{
    display:grid;
    gap:1px;
    min-width:0;
}
.publication-button-text small{
    color:var(--muted);
    font-size:.7rem;
    letter-spacing:.08em;
}
.publication-button-text strong{
    overflow-wrap:anywhere;
    font-size:.96rem;
    line-height:1.45;
}
.publication-button-arrow{
    color:#a49ba6;
    font-size:.72rem;
}
.publication-syosetu{
    border-left:4px solid #c87828;
}
.publication-syosetu .publication-button-mark{
    background:#fff0dc;
    color:#a25b13;
}
.publication-kakuyomu{
    border-left:4px solid #4c78b7;
}
.publication-kakuyomu .publication-button-mark{
    background:#e8f1ff;
    color:#315f9c;
}
.publication-alphapolis{
    border-left:4px solid #8d4e58;
}
.publication-alphapolis .publication-button-mark{
    background:#f4e9eb;
    color:#7d3f49;
}
.publication-custom{
    border-left:4px solid #93809a;
}
.publication-custom .publication-button-mark{
    background:#f0ebf2;
    color:#68586e;
}
@media(max-width:680px){
    .publication-buttons{
        grid-template-columns:1fr;
    }
}


/* v5.4.1 ruby and emphasis notation */
.prose ruby,
.article ruby,
.blog-post ruby {
    ruby-align: center;
    ruby-position: over;
}

.prose rt,
.article rt,
.blog-post rt {
    font-size: .52em;
    line-height: 1;
    letter-spacing: .02em;
}

.emphasis-dot {
    -webkit-text-emphasis: filled dot var(--ink);
    text-emphasis: filled dot var(--ink);
    -webkit-text-emphasis-position: over right;
    text-emphasis-position: over right;
}

/* v6.0 work cover, labels, warnings and linked tags */
.work-label-row{display:flex;flex-wrap:wrap;gap:9px;margin:-10px 0 24px}
.work-state-label,.work-rating-label,.work-card-state{display:inline-flex;align-items:center;min-height:30px;padding:0 11px;border-radius:999px;font-size:.76rem;font-weight:800}
.work-state-label,.work-card-state{background:#f0ebf2;color:#68586e}.work-rating-label{background:#fdecec;color:#8c3030}
.content-warning{display:flex;gap:12px;align-items:flex-start;max-width:780px;margin:0 0 24px;padding:14px 16px;border:1px solid #eadadd;border-radius:12px;background:#fff9fa;color:#75434c;font-size:.88rem}
.tag-links{display:flex;flex-wrap:wrap;gap:8px}.tag-links a{display:inline-flex;padding:5px 10px;border:1px solid var(--line);border-radius:999px;text-decoration:none;font-size:.82rem}
.work-card{position:relative}.work-card-state{position:absolute;z-index:2;top:14px;right:14px;background:rgba(40,36,43,.9);color:#fff}

/* v6.1 reader account, DM, banners */
.site-banner-strip{display:flex;justify-content:center;gap:12px;padding:10px 18px;background:#f3edf5;border-bottom:1px solid var(--line)}.site-banner-item{display:flex;justify-content:center;max-width:1100px;color:var(--ink);text-decoration:none}.site-banner-item img{display:block;max-width:100%;max-height:110px;object-fit:contain;border-radius:12px}.menu-toggle{display:none}.global-menu{display:flex;align-items:center;gap:20px}.reader-auth-page,.reader-page{padding-top:64px;padding-bottom:90px}.reader-auth-card{max-width:560px;margin:auto;padding:36px;border:1px solid var(--line);border-radius:22px;background:#fff;box-shadow:0 24px 60px rgba(49,39,52,.07)}.reader-auth-card.wide{max-width:760px}.reader-form{display:grid;gap:18px;margin-top:28px}.reader-form label{display:grid;gap:8px;font-weight:700}.reader-form input,.reader-form textarea,.reader-form select,.dm-reply-form textarea{width:100%;padding:13px 14px;border:1px solid var(--line);border-radius:11px;font:inherit}.check-line{grid-template-columns:auto 1fr!important;align-items:center}.primary-button,.quiet-button,.reader-work-actions button{display:inline-flex;align-items:center;justify-content:center;gap:8px;border:0;border-radius:12px;padding:13px 18px;background:#8d6795;color:#fff;font-weight:800;text-decoration:none;cursor:pointer}.quiet-button{background:#eee9ef;color:#403943}.reader-page-head{display:flex;justify-content:space-between;align-items:flex-start;gap:20px;margin-bottom:28px}.reader-dashboard-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:18px}.reader-menu-card,.empty-card{display:grid;gap:8px;padding:24px;border:1px solid var(--line);border-radius:18px;background:#fff;text-decoration:none;color:var(--ink)}.reader-menu-card i{font-size:1.5rem;color:#8d6795}.reader-list-section{display:grid;gap:12px;margin-top:34px}.dm-thread-list{display:grid;gap:14px}.dm-thread-card{display:grid;grid-template-columns:1fr auto;gap:8px;padding:20px;border:1px solid var(--line);border-radius:16px;background:#fff;text-decoration:none;color:var(--ink)}.dm-thread-card span{grid-column:1}.dm-thread-card time{grid-column:2;grid-row:1;color:var(--muted)}.dm-conversation{display:grid;gap:16px;margin-bottom:24px}.dm-bubble{max-width:78%;padding:16px 18px;border-radius:18px;background:#fff;border:1px solid var(--line)}.dm-bubble.from-reader{justify-self:end;background:#f0e9f3}.dm-bubble footer{display:flex;justify-content:space-between;align-items:center;gap:12px;color:var(--muted);font-size:.78rem}.like-button{border:0;background:transparent;color:#aaa;cursor:pointer}.like-button.is-liked{color:#c24d70}.dm-reply-form{display:grid;gap:12px}.blocked-notice,.reader-account-promo{display:block;padding:15px 18px;border-radius:12px;background:#f3edf5;color:#5e4964;text-decoration:none;font-weight:700}.reader-work-actions{display:flex;gap:10px;margin-bottom:18px}.reader-work-actions button{padding:9px 13px;font-size:.84rem}
@media(max-width:850px){.menu-toggle{display:inline-flex}.global-menu{display:none;position:absolute;left:16px;right:16px;top:calc(100% + 8px);z-index:50;padding:18px;border:1px solid var(--line);border-radius:16px;background:#fff;box-shadow:0 20px 50px rgba(0,0,0,.12)}.global-menu.is-open{display:grid}.global-nav{display:grid}.header-inner{position:relative}.reader-dashboard-grid{grid-template-columns:1fr}.reader-page-head{flex-direction:column}.dm-bubble{max-width:92%}}

/* v6.2 */
.home-banner-section{margin-top:28px;margin-bottom:8px}.home-banner-list{display:grid;gap:16px}.home-image-banner{display:block;overflow:hidden;border:1px solid var(--line);border-radius:18px;background:#fff;box-shadow:0 14px 38px rgba(45,36,48,.07);text-decoration:none}.home-image-banner img{display:block;width:100%;max-height:320px;object-fit:cover}.home-image-banner span{display:grid;min-height:110px;place-items:center;padding:22px;color:var(--ink);font-size:1.1rem;font-weight:800}
.reader-section-heading{display:flex;align-items:center;justify-content:space-between;gap:16px}.reader-item-list{display:grid;gap:12px}.reader-saved-item{display:flex;justify-content:space-between;gap:18px;align-items:center;padding:18px;border:1px solid var(--line);border-radius:14px;background:#fff}.reader-saved-item>div{display:grid;gap:5px}.reader-settings-form{display:grid;gap:14px;max-width:680px}.reader-danger-zone{border-color:#ead7da;background:#fffafa}

/* v6.3 reader registration wizard */
.reader-auth-card.wide{width:min(820px,100%)}.register-progress{display:grid;grid-template-columns:repeat(4,1fr);gap:8px;margin:0 0 34px;padding:0;list-style:none;color:var(--muted);font-size:.75rem;text-align:center}.register-progress li{display:grid;gap:7px}.register-progress li span{display:block;height:5px;border-radius:999px;background:var(--line)}.register-progress li.active{color:var(--accent);font-weight:800}.register-progress li.active span{background:var(--accent)}
.register-welcome{text-align:center}.register-welcome h1{font-size:clamp(2rem,6vw,3.5rem);line-height:1.25}.reader-benefits{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;margin:30px 0}.reader-benefits article{display:grid;gap:6px;padding:22px;border:1px solid var(--line);border-radius:16px;background:#fcfafc;text-align:left}.reader-benefits i{color:var(--accent);font-size:1.3rem}.reader-benefits span{color:var(--muted);font-size:.86rem}
.button-link{text-decoration:none}.user-id-input{display:grid;grid-template-columns:auto 1fr;align-items:center;border:1px solid var(--line);border-radius:12px;background:#fff}.user-id-input:focus-within{border-color:var(--accent);box-shadow:0 0 0 3px rgba(141,103,149,.12)}.user-id-input span{padding-left:14px;color:var(--muted);font-weight:800}.user-id-input input{border:0;box-shadow:none!important}
.wizard-actions{display:flex;justify-content:space-between;gap:14px;margin-top:8px}.policy-confirm-grid{display:grid;grid-template-columns:1fr 1fr;gap:14px;margin:24px 0}.policy-confirm-grid article{padding:20px;border:1px solid var(--line);border-radius:14px;background:#fbf9fc}.policy-confirm-grid h2{margin-top:0;font-size:1rem}.policy-check{padding:15px;border:1px solid var(--line);border-radius:12px;background:#fff}
.registration-summary{display:grid;gap:1px;overflow:hidden;margin:22px 0;border:1px solid var(--line);border-radius:14px;background:var(--line)}.registration-summary div{display:grid;grid-template-columns:130px 1fr;gap:16px;padding:14px 16px;background:#fff}.registration-summary span{color:var(--muted);font-size:.82rem}.register-result{text-align:center}.register-result>i{margin-bottom:18px;color:var(--accent);font-size:3.2rem}
.policy-page{max-width:900px}.policy-page-head{margin-bottom:28px}.policy-page-actions{margin-top:28px}.policy-document{padding:28px;border:1px solid var(--line);border-radius:18px;background:#fff}
@media(max-width:700px){.reader-benefits,.policy-confirm-grid{grid-template-columns:1fr}.register-progress{font-size:.66rem}.wizard-actions{display:grid;grid-template-columns:1fr 1fr}.registration-summary div{grid-template-columns:1fr;gap:4px}}


/* v6.3.2 reader registration UI */
.reader-register-wizard {
    padding-block: 42px 64px;
}

.reader-register-card {
    position: relative;
    overflow: hidden;
    padding: clamp(24px, 5vw, 48px);
    border: 1px solid rgba(141, 103, 149, .16);
    border-radius: 28px;
    background:
        radial-gradient(circle at top right, rgba(174, 140, 181, .12), transparent 34%),
        linear-gradient(180deg, #fff 0%, #fdfbfd 100%);
    box-shadow: 0 28px 80px rgba(58, 45, 63, .10);
}

.reader-register-card::before {
    content: "";
    position: absolute;
    inset: 0 auto auto 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(90deg, #8d6795, #bea6c3);
}

.register-progress {
    position: relative;
    margin-bottom: 42px;
}

.register-progress li {
    position: relative;
    z-index: 1;
}

.register-progress li span {
    height: 7px;
    transition: background-color .2s ease, transform .2s ease;
}

.register-progress li.active span {
    transform: scaleY(1.15);
}

.register-step-heading {
    margin-bottom: 26px;
}

.register-step-heading h1 {
    margin: 6px 0 10px;
    font-size: clamp(1.8rem, 4vw, 2.8rem);
}

.register-step-heading p:last-child {
    margin-bottom: 0;
    color: var(--muted);
}

.reader-form {
    gap: 22px;
}

.reader-form > label:not(.check-line) {
    display: grid;
    gap: 9px;
    font-weight: 700;
}

.reader-form input,
.reader-form select,
.reader-form textarea {
    min-height: 52px;
    border-radius: 14px;
}

.reader-form small {
    color: var(--muted);
    line-height: 1.7;
}

.reader-benefits article {
    min-height: 132px;
    transition: transform .15s ease, border-color .15s ease, box-shadow .15s ease;
}

.reader-benefits article:hover {
    transform: translateY(-2px);
    border-color: rgba(141, 103, 149, .34);
    box-shadow: 0 12px 30px rgba(58, 45, 63, .06);
}

.policy-consent-form {
    gap: 24px;
}

.policy-scroll-card {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 10px 28px rgba(45, 36, 48, .045);
}

.policy-scroll-card > header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 18px 20px;
    border-bottom: 1px solid var(--line);
    background: #faf7fb;
}

.policy-scroll-card > header > div {
    display: flex;
    align-items: center;
    gap: 12px;
}

.policy-scroll-card h2 {
    margin: 0;
    font-size: 1rem;
    line-height: 1.5;
}

.policy-scroll-card header a {
    flex: 0 0 auto;
    color: var(--accent);
    font-size: .8rem;
    font-weight: 700;
    text-decoration: none;
}

.policy-scroll-card header a:hover {
    text-decoration: underline;
}

.policy-number {
    display: grid;
    width: 34px;
    height: 34px;
    place-items: center;
    border-radius: 50%;
    background: var(--accent);
    color: #fff;
    font-size: .72rem;
    font-weight: 800;
}

.policy-scroll-body {
    height: 320px;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 22px 24px;
    background: #fff;
    scrollbar-width: thin;
    scrollbar-color: rgba(141, 103, 149, .35) transparent;
}

.policy-scroll-body::-webkit-scrollbar {
    width: 8px;
}

.policy-scroll-body::-webkit-scrollbar-track {
    background: transparent;
}

.policy-scroll-body::-webkit-scrollbar-thumb {
    border-radius: 999px;
    background: rgba(141, 103, 149, .30);
}

.policy-scroll-body::-webkit-scrollbar-thumb:hover {
    background: rgba(141, 103, 149, .48);
}

.policy-scroll-body h1 {
    display: none;
}

.policy-scroll-body h2 {
    margin-top: 1.8em;
    font-size: 1rem;
}

.policy-scroll-body h2:first-child {
    margin-top: 0;
}

.policy-scroll-body p,
.policy-scroll-body li {
    font-size: .9rem;
    line-height: 1.9;
}

.policy-scroll-body:focus {
    outline: 3px solid rgba(141, 103, 149, .14);
    outline-offset: -3px;
}

.policy-check {
    margin: 0;
    padding: 17px 20px;
    border: 0;
    border-top: 1px solid var(--line);
    border-radius: 0;
    background: #fbf9fc;
    cursor: pointer;
}

.policy-check input {
    min-height: 0;
    width: 18px;
    height: 18px;
    accent-color: var(--accent);
}

.policy-check span {
    font-weight: 700;
    line-height: 1.6;
}

.sticky-actions {
    position: sticky;
    bottom: 0;
    z-index: 3;
    margin: 8px -8px -8px;
    padding: 16px 8px 8px;
    background: linear-gradient(180deg, rgba(253,251,253,0), #fdfbfd 34%);
}

.registration-summary {
    margin-top: 0;
}

.register-result {
    padding: 28px 0 10px;
}

@media (max-width: 700px) {
    .reader-register-wizard {
        padding-block: 18px 36px;
    }

    .reader-register-card {
        padding: 24px 18px;
        border-radius: 20px;
    }

    .register-progress {
        margin-bottom: 30px;
    }

    .register-progress li {
        font-size: .62rem;
    }

    .policy-scroll-card > header {
        align-items: flex-start;
        padding: 16px;
    }

    .policy-scroll-card > header > div {
        align-items: flex-start;
    }

    .policy-scroll-card header a {
        margin-top: 6px;
    }

    .policy-scroll-body {
        height: 280px;
        padding: 18px;
    }

    .policy-check {
        align-items: flex-start;
        padding: 16px;
    }

    .wizard-actions {
        position: static;
        margin: 0;
        padding: 0;
        background: none;
    }
}

/* v6.4 real work status display */
.work-status-badge{
    display:inline-flex;
    align-items:center;
    min-height:30px;
    padding:0 12px;
    border:1px solid rgba(104,88,110,.18);
    border-radius:999px;
    background:#f0ebf2;
    color:#5f4d65;
    font-size:.76rem;
    font-weight:800;
    line-height:1;
}
.work-status-badge-card{
    position:absolute;
    z-index:3;
    top:14px;
    right:14px;
    border-color:rgba(255,255,255,.22);
    background:rgba(40,36,43,.90);
    color:#fff;
    backdrop-filter:blur(6px);
}
.work-card-genre{
    margin:-3px 0 12px;
    color:var(--muted);
    font-size:.8rem;
    font-weight:700;
}

/* v6.5 mobile overlap fix */
.reader-work-actions{display:flex;flex-wrap:wrap;gap:10px}.reader-action-button{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:42px;padding:0 14px;border:1px solid var(--line);border-radius:999px;background:#fff;color:var(--ink);text-decoration:none;font:inherit;font-size:.84rem;font-weight:700}.reader-action-button.is-active{border-color:var(--accent);background:#f4edf6;color:var(--accent)}
.chat-thread-list{display:grid;gap:10px}.chat-thread-item{display:grid;grid-template-columns:42px minmax(0,1fr) auto;gap:12px;align-items:center;padding:14px;border:1px solid var(--line);border-radius:14px;color:var(--ink);text-decoration:none}.chat-thread-content{display:grid;min-width:0}.chat-thread-content span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.chat-avatar{display:grid;width:40px;height:40px;place-items:center;border-radius:50%;background:var(--accent);color:#fff}
.chat-room{display:grid;grid-template-rows:auto minmax(0,1fr) auto;min-height:620px;overflow:hidden;border:1px solid var(--line);border-radius:20px;background:#f7f4f8}.chat-room-header{display:flex;align-items:center;gap:12px;min-width:0;padding:12px 16px;border-bottom:1px solid var(--line);background:#fff}.chat-room-header>div{display:grid;min-width:0}.chat-room-header strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.chat-room-header>[data-chat-status]{margin-left:auto;white-space:nowrap;font-size:.72rem}.chat-message-stream{min-height:0;overflow-y:auto;padding:20px}.chat-message{display:flex;margin:10px 0}.chat-message.from-reader{justify-content:flex-end}.chat-message-bubble{max-width:74%;padding:12px 14px;border:1px solid var(--line);border-radius:18px;background:#fff;overflow-wrap:anywhere}.from-reader .chat-message-bubble{background:var(--accent);color:#fff}.chat-message-bubble p{margin:0;line-height:1.75}.chat-message-bubble footer{display:flex;justify-content:flex-end;gap:8px;margin-top:7px;font-size:.65rem}.chat-like-button{border:0;background:transparent;color:inherit}.chat-composer{display:grid;grid-template-columns:minmax(0,1fr) 44px;gap:8px;padding:10px;border-top:1px solid var(--line);background:#fff}.chat-composer textarea{min-width:0;width:100%;resize:none}.chat-composer button{display:grid;width:44px;height:44px;place-items:center;border:0;border-radius:50%;background:var(--accent);color:#fff}
@media(max-width:760px){body{overflow-x:hidden}.shell{width:min(100% - 24px,1200px)}.reader-page-head{align-items:flex-start;flex-direction:column}.reader-page-head .primary-button{width:100%;justify-content:center}.reader-dashboard-grid,.work-grid{grid-template-columns:1fr!important}.reader-saved-item{align-items:flex-start;flex-direction:column}.reader-work-actions{display:grid}.reader-action-button{width:100%}.chat-room{min-height:calc(100dvh - 150px);border-radius:14px}.chat-room-header{padding:10px}.chat-room-header>[data-chat-status]{display:none}.chat-message-stream{padding:12px}.chat-message-bubble{max-width:90%;padding:10px 12px}.chat-composer{position:sticky;bottom:0}.reading-font-options{grid-template-columns:repeat(3,minmax(0,1fr))}.reading-font-options button{min-width:0}}
@media(max-width:420px){.shell{width:min(100% - 16px,1200px)}.chat-message-bubble{max-width:94%}.chat-thread-item{grid-template-columns:36px minmax(0,1fr) auto;padding:12px}.chat-avatar{width:36px;height:36px}}


/* v6.5.1 chat redesign */
.chat-layout{display:grid;grid-template-columns:320px minmax(0,1fr);gap:22px;align-items:stretch}
.chat-layout-single{grid-template-columns:320px minmax(0,1fr)}
.chat-sidebar,.chat-room-card,.chat-placeholder-panel{background:#fff;border:1px solid var(--line);border-radius:24px;box-shadow:0 18px 38px rgba(31,18,35,.06)}
.chat-sidebar{min-width:0;overflow:hidden}
.chat-sidebar-header{display:flex;align-items:center;justify-content:space-between;padding:18px 20px;border-bottom:1px solid var(--line);background:linear-gradient(180deg,#fcf9fd 0%,#fff 100%)}
.chat-sidebar-header small{display:block;margin-top:4px;color:var(--muted)}
.chat-new-link{display:grid;place-items:center;width:38px;height:38px;border-radius:12px;background:#f3edf5;color:var(--accent);text-decoration:none}
.chat-thread-list{display:grid;gap:8px;padding:12px}
.chat-thread-card{display:grid;grid-template-columns:48px minmax(0,1fr) auto;gap:12px;align-items:center;padding:14px;border:1px solid transparent;border-radius:18px;text-decoration:none;color:var(--ink);transition:.18s ease background,.18s ease border-color,.18s ease transform}
.chat-thread-card:hover{background:#faf7fb;border-color:#eadff0;transform:translateY(-1px)}
.chat-thread-card.is-active{background:#f6eef8;border-color:#d9c5e3;box-shadow:inset 0 0 0 1px rgba(141,103,149,.08)}
.chat-thread-avatar,.chat-room-avatar,.chat-message-avatar,.chat-placeholder-icon{display:grid;place-items:center;border-radius:50%;background:linear-gradient(135deg,#9d7aac 0%,#7b5d88 100%);color:#fff}
.chat-thread-avatar{width:48px;height:48px;font-size:1rem}
.chat-room-avatar{width:44px;height:44px;font-size:1rem}
.chat-message-avatar{width:34px;height:34px;font-size:.82rem;align-self:flex-end}
.chat-thread-main{display:grid;gap:4px;min-width:0}
.chat-thread-top{display:flex;align-items:center;gap:10px;min-width:0}
.chat-thread-top strong{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:.95rem}
.chat-thread-top time{color:var(--muted);font-size:.72rem;white-space:nowrap}
.chat-thread-preview{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--muted);font-size:.8rem}
.chat-thread-badge{display:grid;place-items:center;min-width:24px;height:24px;padding:0 8px;border-radius:999px;background:var(--accent);color:#fff;font-size:.72rem;font-weight:800}
.chat-placeholder-panel{display:grid;place-items:center;padding:24px}
.chat-placeholder-card{display:grid;justify-items:center;gap:12px;text-align:center;color:var(--muted)}
.chat-placeholder-icon{width:74px;height:74px;font-size:1.5rem}
.chat-room-card{display:grid;grid-template-rows:auto minmax(0,1fr) auto;min-height:720px;min-width:0;overflow:hidden;background:linear-gradient(180deg,#fff 0%,#faf7fb 100%)}
.chat-room-header{display:flex;align-items:center;gap:14px;padding:16px 18px;border-bottom:1px solid var(--line);background:#fff}
.chat-back-button{display:grid;place-items:center;width:36px;height:36px;border-radius:12px;background:#f3edf5;color:var(--accent);text-decoration:none}
.chat-room-meta{display:grid;min-width:0;gap:3px}
.chat-room-meta strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:1rem}
.chat-room-meta small{color:var(--muted)}
.chat-room-status{margin-left:auto;padding:6px 10px;border-radius:999px;background:#eef8f0;color:#257441;font-size:.75rem;font-weight:700;white-space:nowrap}
.chat-message-stream{min-height:0;overflow-y:auto;padding:22px 18px;display:grid;gap:14px;background:
linear-gradient(180deg,rgba(255,255,255,.55),rgba(247,242,249,.88)),
radial-gradient(circle at top left,rgba(196,162,212,.08),transparent 35%)}
.chat-message-row{display:flex;gap:10px;align-items:flex-end}
.chat-message-row.is-reader{justify-content:flex-end}
.chat-message-block{display:grid;gap:5px;max-width:min(74%,640px)}
.chat-message-name{padding-left:8px;color:var(--muted);font-size:.74rem;font-weight:700}
.chat-bubble{padding:12px 14px;border-radius:20px;box-shadow:0 10px 22px rgba(31,18,35,.06);overflow-wrap:anywhere}
.chat-bubble.is-author{background:#fff;border:1px solid #ece2f0;border-bottom-left-radius:8px}
.chat-bubble.is-reader{background:linear-gradient(135deg,#8d6795 0%,#755781 100%);color:#fff;border-bottom-right-radius:8px}
.chat-bubble p{margin:0;line-height:1.8}
.chat-message-foot{display:flex;align-items:center;gap:8px;font-size:.7rem;color:var(--muted)}
.chat-message-foot.is-reader{justify-content:flex-end}
.chat-message-foot.is-author{padding-left:8px}
.chat-read-state{font-weight:700;color:#78617f}
.chat-like-button{display:inline-flex;align-items:center;gap:5px;border:0;background:transparent;color:#8e7d95;cursor:pointer;padding:0}
.chat-like-button.is-liked{color:#c34c73}
.chat-empty-stream{display:grid;place-items:center;gap:10px;padding:80px 0;color:var(--muted)}
.chat-empty-stream i{font-size:1.4rem}
.chat-composer{display:grid;grid-template-columns:minmax(0,1fr) 52px;gap:10px;padding:14px 16px;border-top:1px solid var(--line);background:#fff}
.chat-composer textarea{width:100%;min-width:0;min-height:48px;max-height:160px;padding:13px 16px;border:1px solid #ddcfe4;border-radius:18px;background:#faf8fb;resize:none;font:inherit;line-height:1.6}
.chat-composer textarea:focus{outline:none;border-color:#b18dc0;box-shadow:0 0 0 4px rgba(177,141,192,.12)}
.chat-composer button{display:grid;place-items:center;width:52px;height:52px;border:0;border-radius:18px;background:linear-gradient(135deg,#8d6795 0%,#755781 100%);color:#fff;box-shadow:0 10px 20px rgba(117,87,129,.22)}
.chat-form-error{margin:0;padding:0 18px 14px;color:#b5445f;font-size:.82rem}
.chat-empty{display:grid;justify-items:center;gap:10px;padding:36px 18px;text-align:center;color:var(--muted)}
.chat-empty i{font-size:1.4rem;color:var(--accent)}

@media(max-width:900px){
  .chat-layout,.chat-layout-single{grid-template-columns:1fr;gap:16px}
  .chat-sidebar-thread{display:none}
  .chat-room-card{min-height:calc(100dvh - 180px)}
}
@media(max-width:640px){
  .chat-room-header{padding:12px 14px;gap:10px}
  .chat-room-status{display:none}
  .chat-message-stream{padding:14px 12px}
  .chat-message-block{max-width:88%}
  .chat-bubble{padding:11px 12px}
  .chat-composer{grid-template-columns:minmax(0,1fr) 46px;padding:10px 12px;position:sticky;bottom:0}
  .chat-composer button{width:46px;height:46px;border-radius:15px}
  .chat-thread-card{grid-template-columns:42px minmax(0,1fr) auto;padding:12px}
  .chat-thread-avatar{width:42px;height:42px}
}

/* v6.5.2 single author chat */
.single-chat-page{max-width:980px}
.single-chat-shell{display:grid;grid-template-rows:auto minmax(0,1fr) auto;min-height:720px;overflow:hidden;border:1px solid var(--line);border-radius:24px;background:#faf7fb;box-shadow:0 22px 58px rgba(40,24,45,.09)}
.single-chat-header{display:flex;align-items:center;gap:12px;padding:14px 18px;border-bottom:1px solid var(--line);background:#fff}
.single-chat-back{display:grid;width:38px;height:38px;place-items:center;border-radius:12px;background:#f3edf5;color:var(--accent);text-decoration:none}
.single-chat-avatar{display:grid;width:44px;height:44px;place-items:center;border-radius:50%;background:linear-gradient(135deg,#9d7aac,#755781);color:#fff}
.single-chat-header>div{display:grid;gap:2px}.single-chat-header small{color:var(--muted)}
.single-chat-status{margin-left:auto;padding:6px 10px;border-radius:999px;background:#eef8f0;color:#257441;font-size:.75rem;font-weight:700}
@media(max-width:700px){.single-chat-page{width:100%;padding:0}.single-chat-shell{min-height:calc(100dvh - 72px);border-radius:0;border-left:0;border-right:0}.single-chat-status{display:none}}


/* v6.6 landscape covers */
.work-cover-landscape,.work-detail-cover-landscape{position:relative;display:grid;place-items:center;overflow:hidden;aspect-ratio:16/9;background:#65536c;isolation:isolate}
.work-cover-landscape{border-bottom:1px solid var(--line)}
.work-cover-landscape-blur{position:absolute;inset:-28px;z-index:-2;background-image:var(--work-cover);background-position:center;background-size:cover;filter:blur(24px) saturate(.95);transform:scale(1.12)}
.work-cover-landscape::after,.work-detail-cover-landscape::after{content:"";position:absolute;inset:0;z-index:-1;background:rgba(27,23,30,.22)}
.work-cover-landscape img{width:auto;height:82%;max-width:42%;object-fit:contain;box-shadow:0 12px 28px rgba(20,14,24,.32)}
.work-detail-cover-landscape{width:min(100%,980px);margin:28px 0 34px;border-radius:20px;box-shadow:0 18px 44px rgba(52,38,58,.12)}
.work-detail-cover-landscape img{width:auto;height:84%;max-width:42%;object-fit:contain;box-shadow:0 16px 36px rgba(20,14,24,.34)}

.work-page-status-row{display:flex;flex-wrap:wrap;gap:8px;margin:24px 0 14px}
.work-reader-tools{margin-bottom:24px;clear:both}
.work-reader-tools .reader-account-promo{display:flex;align-items:center;gap:10px;width:100%;min-height:58px;padding:14px 18px;border:1px solid rgba(141,103,149,.12);border-radius:14px;background:#f3edf5;box-sizing:border-box;text-decoration:none}
.work-reader-tools .reader-account-promo span{flex:1}

.is-episode-hidden{display:none}
.episode-section.is-expanded .is-episode-hidden{display:grid}
.episode-more-button{display:flex;align-items:center;justify-content:center;gap:9px;min-height:46px;margin:18px auto 0;padding:0 20px;border:1px solid var(--line);border-radius:999px;background:#fff;color:var(--accent-deep);font:inherit;font-weight:700;cursor:pointer}
.episode-more-close{display:none}
.episode-section.is-expanded .episode-more-open{display:none}
.episode-section.is-expanded .episode-more-close{display:inline}
.episode-section.is-expanded .episode-more-button i{transform:rotate(180deg)}

:root{--site-font-sans:"Noto Sans JP","Yu Gothic","Hiragino Kaku Gothic ProN",sans-serif;--reader-font-sans:"Noto Sans JP","Yu Gothic",sans-serif;--reader-font-serif:"Noto Serif JP","Yu Mincho",serif;--reader-font-antique:"Shippori Antique B1","Noto Sans JP",sans-serif}
html,body,button,input,select,textarea{font-family:var(--site-font-sans)}
body{font-weight:400}
.reading-font-control{display:flex;align-items:center;justify-content:space-between;gap:16px;margin:30px 0 18px;padding:13px 15px;border:1px solid var(--line);border-radius:14px;background:#fbf9fc}
.reading-font-label{display:flex;align-items:center;gap:8px;color:var(--muted);font-size:.82rem;font-weight:700}
.reading-font-options{display:flex;flex-wrap:wrap;gap:7px}
.reading-font-options button{min-height:36px;padding:0 12px;border:1px solid var(--line);border-radius:999px;background:#fff;cursor:pointer}
.reading-font-options button.is-active{border-color:var(--accent);background:var(--accent);color:#fff}
.reader-font-target{font-family:var(--reader-font-sans)}
html[data-reading-font="serif"] .reader-font-target{font-family:var(--reader-font-serif)}
html[data-reading-font="antique"] .reader-font-target{font-family:var(--reader-font-antique)}

@media(max-width:700px){
.work-cover-landscape img,.work-detail-cover-landscape img{height:78%;max-width:48%}
.work-detail-cover-landscape{border-radius:14px}
.reading-font-control{align-items:stretch;flex-direction:column}
.reading-font-options{display:grid;grid-template-columns:repeat(3,minmax(0,1fr))}
.reading-font-options button{padding-inline:6px}
}


/* v6.6.5 reading text-size selector */
.reading-font-control {
    display: grid;
    gap: 12px;
}

.reading-setting-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.reading-size-options {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.reading-size-options button {
    min-width: 48px;
    min-height: 36px;
    padding: 0 12px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #fff;
    color: var(--ink);
    font: inherit;
    cursor: pointer;
}

.reading-size-options button.is-active {
    border-color: var(--accent);
    background: var(--accent);
    color: #fff;
}

html[data-reading-size="small"] .reader-font-target {
    font-size: 0.92rem;
    line-height: 1.9;
}

html[data-reading-size="medium"] .reader-font-target {
    font-size: 1rem;
    line-height: 2;
}

html[data-reading-size="large"] .reader-font-target {
    font-size: 1.14rem;
    line-height: 2.05;
}

html[data-reading-size="xlarge"] .reader-font-target {
    font-size: 1.32rem;
    line-height: 2.1;
}

@media (max-width: 700px) {
    .reading-setting-row {
        align-items: stretch;
        flex-direction: column;
        gap: 9px;
    }

    .reading-size-options {
        display: grid;
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .reading-size-options button {
        min-width: 0;
        padding-inline: 5px;
    }
}

/* v6.6.6 reader-only gate */
.reader-only-gate{display:grid;justify-items:center;gap:12px;margin:34px 0;padding:42px 28px;border:1px solid var(--line);border-radius:20px;background:linear-gradient(180deg,#fbf8fc,#f4edf6);text-align:center}
.reader-only-gate-icon{display:grid;width:58px;height:58px;place-items:center;border-radius:50%;background:var(--accent);color:#fff;font-size:1.25rem}
.reader-only-gate h2{margin:0}
.reader-only-gate p{max-width:680px;margin:0;color:var(--muted);line-height:1.85}
.reader-only-gate-actions{display:flex;flex-wrap:wrap;justify-content:center;gap:10px;margin-top:8px}
@media(max-width:600px){.reader-only-gate{padding:30px 18px}.reader-only-gate-actions{display:grid;width:100%}.reader-only-gate-actions .button{width:100%}}
