/* Şehrin hikâyesi: hikâye sayfaları (hikaye.html: olaylar, karakterler, karakter ve olay sayfaları, yazma pencereleri)
   ve ana sayfanın "Şehrin Hikâyesi" bölümünün ortak parçaları (yüzler, "Sürüyor", görselsiz olay, son gelişmeler;
   bölümün yerleşimi styles.css'te). Ortak parçalar (düğme, form, pencere) ui.css'te.
   Hepsi durağan: görseller bir kez boyanır; hareket yalnızca ziyaretçi isteyince (kartın üstüne gelince görselin hafifçe
   büyümesi, pencere açılırken). Bulanıklık (backdrop-filter) ve süren animasyon yok. */

*,
*::before,
*::after {
    box-sizing: border-box;
}

:root {
    --display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI Variable Display", "Segoe UI", system-ui, sans-serif;
    --live: #ff7a59; /* "Sürüyor": gün batımının kızılı */
    --card: #100f18;
}

/* --- Sayfa ------------------------------------------------------------------------------------ */

:root:has(body.story) {
    background: #05040a;
    scrollbar-gutter: stable; /* pencere açılınca sayfa yana kaymasın */
}

.story {
    margin: 0;
    min-height: 100vh;
    background: radial-gradient(110% 520px at 50% -160px, rgba(85, 48, 111, 0.36), transparent 70%) no-repeat, #05040a;
    color: var(--ink);
    font-family: var(--font);
    font-size: 17px;
    line-height: 1.47;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.story a {
    color: inherit;
    text-decoration: none;
}

.story :focus-visible {
    outline: 2px solid var(--ink);
    outline-offset: 2px;
}

.story-bar {
    position: sticky;
    top: 0;
    z-index: 8;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 12px;
    height: 56px;
    padding: 0 max(20px, env(safe-area-inset-left));
    border-bottom: 1px solid var(--line-soft);
    background: rgba(8, 7, 14, 0.95);
}

.story-bar .brand {
    justify-self: start;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.3em;
}

.story-bar .brand img {
    display: block;
    width: auto;
    height: 22px;
}

.story-nav {
    display: flex;
    gap: 2px;
    padding: 2px;
    border-radius: 10px;
    background: var(--fill);
}

.story-nav a {
    padding: 6px 16px;
    border-radius: 8px;
    color: var(--ink-2);
    font-size: 14px;
    font-weight: 500;
}

.story-nav a:hover {
    color: var(--ink);
}

.story-nav a.active {
    background: rgba(255, 255, 255, 0.14);
    color: var(--ink);
}

.story-me {
    justify-self: end;
    display: flex;
    align-items: center;
    font-size: 14px;
}

.story-who {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--ink-2);
}

.story-who .avatar {
    display: block;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--fill);
    object-fit: cover;
}

.story .bar-link {
    color: var(--ink-2);
}

.story .bar-link:hover {
    color: var(--ink);
}

/* Üst çubukta "Olay Yaz": her hikâye sayfasında, oyuncuların olay yazabildiği hep görünsün (dar ekranda yalnızca simge;
   giriş yapmamış ziyaretçiye çok dar ekranda hiç, "Giriş Yap"a yer kalsın) */
.story-write {
    display: inline-flex;
    flex: none;
    align-items: center;
    gap: 6px;
    min-height: 34px;
    margin-right: 14px;
    padding: 0 15px 0 11px;
    border: 0;
    border-radius: 980px;
    background: #f5f5f7;
    color: #1d1d1f;
    font: 600 14px/1 var(--font);
    cursor: pointer;
    transition: background-color 0.2s var(--ease), box-shadow 0.3s var(--ease);
}

.story-write:hover {
    background: #fff;
    box-shadow: 0 0 0 5px rgba(255, 255, 255, 0.08);
}

.story-write .icon {
    display: grid;
}

.story-write svg {
    width: 16px;
    height: 16px;
}

@media (max-width: 680px) {
    .story-bar .brand span,
    .story-who .who-name {
        display: none;
    }

    .story-nav a {
        padding: 6px 12px;
    }
}

@media (max-width: 520px) {
    .story-write {
        justify-content: center;
        width: 34px;
        margin-right: 10px;
        padding: 0;
    }

    .story-write-label {
        display: none;
    }

    .story-nav a {
        padding: 6px 10px;
    }
}

@media (max-width: 420px) {
    .story-write.guest {
        display: none;
    }
}

.story-page {
    width: min(1180px, 100% - 32px);
    min-height: 60vh;
    margin: 0 auto;
    padding: clamp(36px, 6vw, 72px) 0 56px;
}

.story-loading {
    margin: 96px 0;
    color: var(--ink-3);
    font-size: 15px;
    text-align: center;
}

.story-foot {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px 24px;
    padding: 28px 16px max(28px, env(safe-area-inset-bottom));
    border-top: 1px solid var(--line-soft);
    font-size: 13px;
}

.story-foot a {
    color: var(--ink-3);
}

.story-foot a:hover {
    color: var(--ink-2);
}

.story-page .kicker {
    margin: 0 0 12px;
    color: var(--gold);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.page-head {
    max-width: 780px;
    margin-bottom: clamp(30px, 4.5vw, 48px);
}

.page-head h1 {
    margin: 0;
    font-family: var(--display);
    font-size: clamp(42px, 6.4vw, 72px);
    font-weight: 700;
    letter-spacing: -0.032em;
    line-height: 1.02;
}

.page-head .lead {
    margin: 16px 0 0;
    color: var(--ink-2);
    font-size: clamp(17px, 1.8vw, 21px);
    line-height: 1.45;
}

.head-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 24px;
}

/* Düğmenin başındaki simge (Olay Yaz, Düzenle, Bağlantıyı Kopyala) */
.button:not(.add-shot) > .icon {
    display: grid;
    margin: 0 8px 0 -4px;
}

.button > .icon svg {
    width: 18px;
    height: 18px;
}

.button.small {
    min-height: 36px;
    padding: 0 16px;
    font-size: 14px;
}

.button.small:not(.add-shot) > .icon {
    margin: 0 6px 0 -3px;
}

.button.small > .icon svg {
    width: 16px;
    height: 16px;
}

/* Olaylara çağrı: olayları oyuncuların yazdığı, ne tür şeylerin olay olduğu ve "Olay Yaz" (Olaylar sayfasında listenin
   başında; ana sayfada bunun yerine olayların altında tek satır, styles.css → .write-note) */
.event-invite {
    display: flex;
    align-items: center;
    gap: 16px 22px;
    margin-top: 30px;
    padding: 22px 26px;
    border-radius: 22px;
    background: radial-gradient(70% 180% at 0% 50%, rgba(236, 118, 104, 0.2), transparent 64%), #0e0d16;
    box-shadow: 0 0 0 1px var(--line-soft);
}

.page-head + .event-invite {
    margin: 0 0 clamp(36px, 5vw, 52px);
}

.event-invite-icon {
    display: grid;
    flex: none;
    place-items: center;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(255, 122, 89, 0.16);
    color: var(--live);
}

.event-invite-icon svg {
    width: 22px;
    height: 22px;
}

.event-invite-text {
    flex: 1;
    min-width: 0;
}

.event-invite-text strong {
    display: block;
    font-size: 19px;
    font-weight: 700;
    letter-spacing: -0.012em;
}

.event-invite-text p {
    max-width: 46em;
    margin: 4px 0 0;
    color: var(--ink-2);
    font-size: 15px;
    line-height: 1.5;
}

.event-invite > .button {
    flex: none;
}

@media (max-width: 640px) {
    .event-invite {
        flex-direction: column;
        align-items: flex-start;
        padding: 20px;
    }

    .event-invite-icon {
        display: none;
    }
}

.danger-text {
    color: var(--danger) !important;
}

.story-empty {
    grid-column: 1 / -1;
    padding: 52px 20px;
    border: 1px dashed var(--line);
    border-radius: 20px;
    color: var(--ink-2);
    text-align: center;
}

.story-empty p {
    margin: 0;
}

.story-empty .meta {
    margin-top: 6px;
}

.story-status {
    padding: 72px 0;
}

.story-notice {
    margin: 0 0 28px;
}

.list-tools {
    margin: 0 0 24px;
}

.story .search {
    width: min(380px, 100%);
    min-height: 44px;
    padding: 0 16px;
    border: 1px solid transparent;
    border-radius: 12px;
    background: var(--fill);
    color: var(--ink);
    font: 16px var(--font);
}

.story .search::placeholder {
    color: var(--ink-3);
}

.story .search:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.35);
}

/* --- Kartlar: olay ve karakter (ana sayfada da) --------------------------------------------------- */

.ecards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
    gap: 32px 22px;
}

.ecard {
    display: flex;
    flex-direction: column;
    min-width: 0;
    color: var(--ink);
    text-decoration: none;
}

.ecard-media {
    position: relative;
    display: block;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    border-radius: 18px;
    background: #14131c;
    box-shadow: 0 0 0 1px var(--line-soft);
}

.ecard-media img,
.pcard-media img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.7s var(--ease);
}

.ecard:hover .ecard-media img {
    transform: scale(1.03);
}

/* Görseli olmayan olay: şehrin gün batımı, ortasında silik palmiye */
.ecard-blank {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(90% 80% at 25% 115%, rgba(236, 118, 104, 0.42), transparent 62%),
        radial-gradient(80% 90% at 95% -15%, rgba(85, 48, 111, 0.7), transparent 60%),
        #120f1c;
}

.ecard-blank::after {
    content: "";
    position: absolute;
    inset: 0;
    background: url("/logo-light.svg") center / 46px auto no-repeat;
    opacity: 0.16;
}

.ecard-body {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
    padding: 14px 2px 0;
}

.ecard-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 10px;
    color: var(--ink-3);
    font-size: 13px;
}

.ecard-title {
    font-size: 20px;
    font-weight: 600;
    letter-spacing: -0.012em;
    line-height: 1.25;
    overflow-wrap: anywhere;
}

.ecard-text,
.pcard-line {
    display: -webkit-box;
    overflow: hidden;
    color: var(--ink-2);
    font-size: 15px;
    line-height: 1.5;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

/* "Sürüyor": durağan bir nokta (yanıp sönmez) */
.live {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 2px 9px 2px 8px;
    border-radius: 980px;
    background: rgba(255, 122, 89, 0.14);
    color: var(--live);
    font-size: 12px;
    font-weight: 600;
}

.live::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--live);
    box-shadow: 0 0 0 3px rgba(255, 122, 89, 0.22);
}

/* Olaydaki karakterlerin yüzleri üst üste */
.faces {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    margin-top: 4px;
    color: var(--ink-2);
    font-size: 13px;
}

.faces-stack {
    display: flex;
    flex: none;
}

.faces-stack .face {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: #2a2735;
    box-shadow: 0 0 0 2px #05040a;
    object-fit: cover;
    object-position: center 20%;
}

.faces-stack .face + .face {
    margin-left: -8px;
}

.faces-label {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Sayfası olmayan karakter: adının baş harfleri */
.initials {
    display: inline-grid;
    place-items: center;
    background: #2a2735;
    color: var(--ink-2);
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.pcards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(45%, 176px), 1fr));
    gap: 28px 18px;
}

.pcard {
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-width: 0;
    color: var(--ink);
    text-decoration: none;
}

.pcard-media {
    position: relative;
    display: block;
    aspect-ratio: 4 / 5;
    overflow: hidden;
    border-radius: 18px;
    background: #14131c;
    box-shadow: 0 0 0 1px var(--line-soft);
}

.pcard-media::after {
    content: "";
    position: absolute;
    inset: 48% 0 0;
    background: linear-gradient(transparent, rgba(5, 4, 10, 0.88));
    pointer-events: none;
}

.pcard:hover .pcard-media img {
    transform: scale(1.04);
}

.pcard-body {
    position: absolute;
    z-index: 1;
    left: 14px;
    right: 14px;
    bottom: 12px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.pcard-name {
    font-size: 17px;
    font-weight: 600;
    line-height: 1.2;
    text-shadow: 0 1px 10px rgba(0, 0, 0, 0.5);
    overflow-wrap: anywhere;
}

.pcard-job {
    overflow: hidden;
    color: var(--ink-2);
    font-size: 12.5px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pcard-line {
    padding: 0 2px;
    font-size: 14px;
    line-height: 1.45;
}

/* Hayatını kaybeden karakter: siyah beyaz, sayfası anı olarak kalır */
.pcard.is-dead .pcard-media img,
.profile.is-dead .profile-portrait img {
    filter: grayscale(1) contrast(1.05);
}

/* Son gelişmeler */
.feed {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 32px;
}

.feed-row {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
    padding: 14px 0;
    border-top: 1px solid var(--line-soft);
    color: var(--ink);
    text-decoration: none;
}

.feed-row:hover .feed-title {
    color: #fff;
    text-decoration: underline;
    text-decoration-color: var(--ink-3);
    text-underline-offset: 3px;
}

.feed-face {
    flex: none;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    object-fit: cover;
    object-position: center 20%;
}

.feed-face.initials {
    font-size: 14px;
}

.feed-main {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.feed-who {
    overflow: hidden;
    color: var(--ink-3);
    font-size: 13px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.feed-who strong {
    color: var(--ink-2);
    font-weight: 600;
}

.feed-title,
.feed-event {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.feed-title {
    font-size: 15px;
    font-weight: 500;
}

.feed-event {
    color: var(--accent);
    font-size: 13px;
}

.feed-photo {
    flex: none;
    width: 64px;
    height: 48px;
    border-radius: 10px;
    object-fit: cover;
}

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

/* --- Karakter sayfası ------------------------------------------------------------------------- */

.profile {
    display: grid;
    grid-template-columns: minmax(240px, 380px) minmax(0, 1fr);
    gap: clamp(28px, 5vw, 64px);
    align-items: end;
}

.profile-portrait {
    display: block;
    width: 100%;
    padding: 0;
    overflow: hidden;
    aspect-ratio: 4 / 5;
    border: 0;
    border-radius: 26px;
    background: #14131c;
    box-shadow: 0 0 0 1px var(--line-soft), 0 30px 80px rgba(0, 0, 0, 0.45);
    cursor: zoom-in;
}

.profile-portrait img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-info h1 {
    margin: 0;
    font-family: var(--display);
    font-size: clamp(42px, 6.4vw, 76px);
    font-weight: 700;
    letter-spacing: -0.034em;
    line-height: 1;
    overflow-wrap: anywhere;
}

.profile-job {
    margin: 12px 0 0;
    color: var(--ink-2);
    font-size: 18px;
}

.profile-tagline {
    max-width: 28em;
    margin: 24px 0 0;
    font-family: var(--display);
    font-size: clamp(19px, 2vw, 25px);
    font-weight: 500;
    letter-spacing: -0.012em;
    line-height: 1.38;
}

.profile-tagline::before {
    content: "“";
}

.profile-tagline::after {
    content: "”";
}

.profile-facts {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 24px;
    margin: 26px 0 0;
    padding: 0;
    color: var(--ink-3);
    font-size: 14px;
    list-style: none;
}

.profile-facts strong {
    color: var(--ink);
    font-weight: 600;
}

.profile-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 26px;
}

@media (max-width: 640px) {
    .profile {
        grid-template-columns: 1fr;
        align-items: start;
    }

    .profile-portrait {
        max-width: 400px;
    }
}

.chapter {
    margin-top: clamp(52px, 7.5vw, 88px);
}

.chapter > h2,
.chapter-head h2 {
    margin: 0 0 20px;
    font-size: clamp(22px, 2.4vw, 30px);
    font-weight: 700;
    letter-spacing: -0.022em;
}

.chapter-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px 16px;
    margin-bottom: 20px;
}

.chapter-head h2 {
    margin: 0;
}

/* Karakter sayfasında sahibine, yazma alanının altında: şehirde son olaylar ("Oradaydım") ya da olay yazmaya çağrı */
.join,
.join-hint {
    max-width: 780px;
    margin: 0 0 30px;
    border-radius: 18px;
    background: radial-gradient(80% 160% at 0% 0%, rgba(236, 118, 104, 0.14), transparent 62%), #0e0d16;
    box-shadow: 0 0 0 1px var(--line-soft);
}

.join {
    padding: 18px 20px 14px;
}

.join-head {
    display: flex;
    align-items: flex-start;
    gap: 14px;
}

.join-icon {
    display: grid;
    flex: none;
    place-items: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 122, 89, 0.16);
    color: var(--live);
}

.join-icon svg {
    width: 18px;
    height: 18px;
}

.join-head h3 {
    margin: 0;
    font-size: 17px;
    font-weight: 700;
}

.join-head p {
    margin: 2px 0 0;
    color: var(--ink-2);
    font-size: 14px;
    line-height: 1.45;
}

.join-list {
    margin: 14px 0 0;
    padding: 0;
    list-style: none;
}

.join-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    border-top: 1px solid var(--line-soft);
}

.join-event {
    display: flex;
    flex: 1;
    flex-direction: column;
    min-width: 0;
}

.join-event strong {
    overflow: hidden;
    font-size: 15px;
    font-weight: 600;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.join-event:hover strong {
    text-decoration: underline;
}

.join-event span {
    color: var(--ink-3);
    font-size: 13px;
}

.join-item .button {
    flex: none;
}

.join-foot {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px 16px;
    padding-top: 12px;
    border-top: 1px solid var(--line-soft);
}

.join-foot p {
    margin: 0;
    color: var(--ink-2);
    font-size: 14px;
}

.join-hint {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px 14px 18px;
}

.join-hint p {
    flex: 1;
    margin: 0;
    color: var(--ink-2);
    font-size: 14.5px;
    line-height: 1.45;
}

.join-hint .button {
    flex: none;
}

@media (max-width: 560px) {
    .join-hint {
        flex-wrap: wrap;
    }

    .join-hint p {
        flex-basis: calc(100% - 50px);
    }
}

.prose {
    max-width: 720px;
}

.prose p {
    margin: 0 0 1em;
    color: rgba(245, 245, 247, 0.88);
    font-size: 18px;
    line-height: 1.7;
    white-space: pre-line;
    overflow-wrap: anywhere;
}

.prose p:last-child {
    margin-bottom: 0;
}

.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 8px;
    max-width: 720px;
    margin-top: 16px;
}

.gallery .shot {
    display: block;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    border-radius: 12px;
    background: var(--fill);
    cursor: zoom-in;
}

.gallery .shot img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Gelişim: soldaki çizginin üstünde, en yenisi en üstte (olay sayfasında: olayın seyri, sırasıyla) */
.timeline {
    position: relative;
    max-width: 780px;
    margin: 0;
    padding: 0 0 0 30px;
    list-style: none;
}

.timeline::before {
    content: "";
    position: absolute;
    left: 6px;
    top: 10px;
    bottom: 10px;
    width: 2px;
    background: linear-gradient(var(--line), transparent);
}

.entry {
    position: relative;
    padding-bottom: 24px;
}

.entry-dot {
    position: absolute;
    left: -30px;
    top: 20px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #05040a;
    box-shadow: inset 0 0 0 2px var(--ink-3);
}

.timeline:not(.course) .entry:first-child .entry-dot {
    box-shadow: inset 0 0 0 2px var(--gold), 0 0 0 4px rgba(255, 210, 122, 0.12);
}

.entry-card {
    padding: 16px 22px 20px;
    border: 1px solid var(--line-soft);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.04);
}

.entry:target .entry-card {
    border-color: rgba(156, 193, 255, 0.55);
}

.entry.is-hidden .entry-card {
    opacity: 0.6;
}

.entry-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 12px;
    margin: 0;
    color: var(--ink-3);
    font-size: 13px;
}

.entry-meta .tag {
    margin: 0;
    vertical-align: 0;
}

.entry-who {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--ink);
    font-size: 14px;
    font-weight: 600;
}

.entry-face {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
    object-position: center 20%;
}

.entry-title {
    margin: 8px 0 0;
    font-size: 19px;
    font-weight: 600;
    letter-spacing: -0.012em;
    overflow-wrap: anywhere;
}

.entry-card .prose {
    margin-top: 8px;
}

.entry-card .prose p {
    font-size: 16px;
    line-height: 1.62;
}

.entry-event {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 14px;
    color: var(--accent);
    font-size: 14px;
}

.entry-event .icon {
    display: grid;
}

.entry-event .icon svg {
    width: 15px;
    height: 15px;
}

.entry-tools {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 18px;
    margin: 14px 0 0;
}

.entry-tools .quiet {
    color: var(--ink-3);
    font-size: 13px;
}

.entry-tools .quiet:hover {
    color: var(--ink-2);
}

.staff-tools {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 20px;
    margin-top: 48px;
    padding: 14px 18px;
    border: 1px dashed rgba(255, 210, 122, 0.35);
    border-radius: 14px;
    background: rgba(255, 210, 122, 0.05);
}

.staff-label {
    color: var(--gold);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.story-page .quiet-row {
    justify-content: flex-start;
    margin-top: 40px;
}

/* Senin karakterlerin (karakterler sayfasının başında) */
.mine {
    margin: 0 0 34px;
}

.mine h2 {
    margin: 0 0 12px;
    color: var(--ink-2);
    font-size: 15px;
    font-weight: 600;
}

.mine-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.mine-chip {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 18px 6px 6px;
    border: 1px solid var(--line-soft);
    border-radius: 980px;
    background: rgba(255, 255, 255, 0.04);
    color: var(--ink);
    font: inherit;
    text-align: left;
    cursor: pointer;
}

.mine-chip:hover {
    background: rgba(255, 255, 255, 0.08);
}

.mine-chip.add {
    border-style: dashed;
    border-color: rgba(255, 255, 255, 0.22);
    background: none;
}

.mine-face {
    flex: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    object-position: center 20%;
}

.mine-face.plus {
    display: grid;
    place-items: center;
    background: var(--fill);
    color: var(--ink-2);
}

.mine-face.plus .icon {
    display: grid;
}

.mine-face.plus svg {
    width: 16px;
    height: 16px;
}

.mine-text {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.mine-text strong {
    font-size: 14px;
    font-weight: 600;
}

.mine-text small {
    color: var(--ink-3);
    font-size: 12px;
}

/* --- Olay sayfası ----------------------------------------------------------------------------- */

.event-cover {
    display: block;
    width: 100%;
    padding: 0;
    overflow: hidden;
    aspect-ratio: 21 / 9;
    border: 0;
    border-radius: 28px;
    background: #14131c;
    box-shadow: 0 0 0 1px var(--line-soft), 0 30px 80px rgba(0, 0, 0, 0.4);
    cursor: zoom-in;
}

.event-cover img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

@media (max-width: 760px) {
    .event-cover {
        aspect-ratio: 16 / 10;
        border-radius: 20px;
    }
}

.event-head {
    max-width: 920px;
    margin-top: clamp(26px, 4vw, 44px);
}

.event:not(:has(.event-cover)) .event-head {
    margin-top: 0;
}

.event-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 14px;
    margin: 0;
    color: var(--ink-2);
    font-size: 15px;
}

.event-place {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.event-place .icon {
    display: grid;
}

.event-place svg {
    width: 16px;
    height: 16px;
}

.event-head h1 {
    margin: 12px 0 0;
    font-family: var(--display);
    font-size: clamp(36px, 5.8vw, 68px);
    font-weight: 700;
    letter-spacing: -0.032em;
    line-height: 1.03;
    text-wrap: balance;
    overflow-wrap: anywhere;
}

.cast-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.cast-item {
    position: relative;
}

.cast-chip {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 7px 18px 7px 7px;
    border: 1px solid var(--line-soft);
    border-radius: 980px;
    background: rgba(255, 255, 255, 0.05);
    color: var(--ink);
}

a.cast-chip:hover {
    background: rgba(255, 255, 255, 0.09);
}

.cast-face {
    flex: none;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    object-fit: cover;
    object-position: center 20%;
}

.cast-face.initials {
    font-size: 13px;
}

.cast-text {
    display: flex;
    flex-direction: column;
    line-height: 1.25;
}

.cast-text strong {
    font-size: 15px;
    font-weight: 600;
}

.cast-text small {
    color: var(--ink-3);
    font-size: 12px;
}

.cast-remove {
    position: absolute;
    top: -6px;
    right: -6px;
    display: grid;
    place-items: center;
    width: 22px;
    height: 22px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: #2c2a35;
    color: var(--ink-2);
    font: 400 14px/1 var(--font);
    cursor: pointer;
    opacity: 0;
}

.cast-item:hover .cast-remove,
.cast-remove:focus-visible {
    opacity: 1;
}

@media (hover: none) {
    .cast-remove {
        opacity: 1;
    }
}

/* --- Yazma: pencereler ve gelişme yazma alanı ------------------------------------------------------- */

.who-line {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 4px 12px;
    margin: 20px 0 0;
    padding: 14px 18px;
    border-radius: 14px;
    background: var(--fill);
}

.who-line strong {
    font-size: 17px;
    font-weight: 600;
}

.who-line span {
    color: var(--ink-2);
    font-size: 14px;
}

.who-line .quiet {
    margin-left: auto;
}

/* Portre: 4:5 çerçeve; görsel sürüklenerek kartta görünecek yer seçilir */
.portrait-field {
    display: grid;
    grid-template-columns: 184px minmax(0, 1fr);
    gap: 20px;
    align-items: center;
    margin-top: 14px;
    padding: 18px;
    border: 1px solid var(--line-soft);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.04);
}

.portrait-side h2 {
    margin: 0;
    font-size: 17px;
    font-weight: 600;
}

.portrait-side .frame-note {
    margin: 6px 0 0;
    line-height: 1.45;
}

.portrait-buttons {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 16px;
    margin-top: 14px;
}

.portrait-buttons .add-shot {
    margin-top: 0;
}

.frame {
    position: relative;
    display: grid;
    place-items: center;
    overflow: hidden;
    aspect-ratio: 4 / 5;
    border: 1px dashed rgba(255, 255, 255, 0.24);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.03);
    color: var(--ink-2);
    cursor: pointer;
    user-select: none;
    transition: border-color 0.15s, opacity 0.15s;
}

.frame:hover {
    border-color: rgba(255, 255, 255, 0.42);
}

.frame img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 50% 30%;
    pointer-events: none;
}

.frame img[hidden] {
    display: none;
}

.frame.has-image {
    border-style: solid;
    border-color: transparent;
}

.frame.has-image .frame-hint {
    display: none;
}

.frame.can-move {
    cursor: grab;
    touch-action: none;
}

.frame.is-dragging {
    cursor: grabbing;
}

.frame.is-loading {
    opacity: 0.5;
    pointer-events: none;
}

.frame-hint {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 0 12px;
    font-size: 12px;
    line-height: 1.35;
    text-align: center;
}

.frame-hint .icon {
    display: grid;
}

.frame-hint svg {
    width: 26px;
    height: 26px;
}

.frame-hint strong {
    color: var(--ink);
    font-size: 14px;
    font-weight: 600;
}

@media (max-width: 520px) {
    .portrait-field {
        grid-template-columns: 128px minmax(0, 1fr);
        gap: 14px;
        padding: 14px;
    }
}

.field-row {
    display: grid;
    grid-template-columns: 190px minmax(0, 1fr);
    gap: 12px;
    margin-top: 16px;
}

.field-label {
    display: block;
    margin: 0 0 6px;
    color: var(--ink-2);
    font-size: 13px;
}

.field input[type="date"] {
    color-scheme: dark;
}

.check.ongoing {
    margin: 16px 0 0;
    color: var(--ink-2);
    font-size: 15px;
}

@media (max-width: 520px) {
    .field-row {
        grid-template-columns: 1fr;
    }
}

/* Aynı olay daha önce yazılmış olabilir */
.similar {
    margin-top: 12px;
    padding: 12px 16px;
    border: 1px solid rgba(255, 210, 122, 0.26);
    border-radius: 12px;
    background: rgba(255, 210, 122, 0.07);
}

.similar[hidden] {
    display: none;
}

.similar-head {
    margin: 0 0 4px;
    color: var(--gold);
    font-size: 13px;
}

.similar-item {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 6px 0;
    color: var(--ink);
    font-size: 15px;
}

.similar-item:hover strong {
    text-decoration: underline;
}

.similar-item span {
    flex: none;
    color: var(--ink-3);
    font-size: 13px;
}

/* Olay görselleri: ilki kapak */
.tray.photos {
    margin: 14px 0 0;
}

.tray.photos .thumb {
    width: 116px;
    height: 82px;
}

.thumb.is-cover {
    box-shadow: 0 0 0 2px var(--gold);
}

.thumb-tag,
.thumb-cover {
    position: absolute;
    left: 4px;
    bottom: 4px;
    padding: 1px 8px;
    border: 0;
    border-radius: 980px;
    background: rgba(0, 0, 0, 0.72);
    font: 600 11px/1.6 var(--font);
}

.thumb-tag {
    color: var(--gold);
}

.thumb-cover {
    color: #fff;
    cursor: pointer;
    opacity: 0;
}

.thumb:hover .thumb-cover,
.thumb-cover:focus-visible {
    opacity: 1;
}

@media (hover: none) {
    .thumb-cover {
        opacity: 1;
    }
}

/* Olaydaki karakterleri seçmek: çipler, arama ve öneriler */
.cast-picker {
    margin-top: 16px;
}

.chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 10px;
}

.chips:empty,
.quick:empty {
    display: none;
}

.chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 4px 5px 4px 4px;
    border-radius: 980px;
    background: var(--fill-hover);
    font-size: 14px;
}

.chip-face {
    flex: none;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    object-fit: cover;
    object-position: center 20%;
}

.chip-x {
    display: grid;
    place-items: center;
    width: 22px;
    height: 22px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.32);
    color: var(--ink-2);
    font: 400 14px/1 var(--font);
    cursor: pointer;
}

.chip.add {
    gap: 6px;
    padding: 6px 13px 6px 10px;
    border: 1px dashed rgba(255, 255, 255, 0.24);
    background: none;
    color: var(--ink-2);
    font: 500 13px var(--font);
    cursor: pointer;
}

.chip.add:hover {
    border-color: rgba(255, 255, 255, 0.42);
    color: var(--ink);
}

.chip.add .icon {
    display: grid;
}

.chip.add svg {
    width: 14px;
    height: 14px;
}

.suggest-wrap {
    position: relative;
}

.suggest-wrap input {
    display: block;
    width: 100%;
    min-height: 46px;
    padding: 0 14px;
    border: 1px solid transparent;
    border-radius: 12px;
    background: var(--fill);
    color: var(--ink);
    font: 16px var(--font);
}

.suggest-wrap input:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.35);
    background: rgba(255, 255, 255, 0.1);
}

.suggest {
    position: absolute;
    z-index: 2;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    max-height: 288px;
    overflow-y: auto;
    padding: 6px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #1c1b25;
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.5);
}

.suggest[hidden] {
    display: none;
}

.suggest-item {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 8px;
    border: 0;
    border-radius: 10px;
    background: none;
    color: var(--ink);
    font: inherit;
    text-align: left;
    cursor: pointer;
}

.suggest-item:hover,
.suggest-item:focus-visible {
    background: var(--fill-hover);
    outline: none;
}

.suggest-text {
    display: flex;
    flex-direction: column;
    min-width: 0;
    line-height: 1.25;
}

.suggest-text strong {
    font-size: 15px;
    font-weight: 600;
}

.suggest-text small {
    color: var(--ink-3);
    font-size: 12px;
}

.suggest-empty {
    margin: 0;
    padding: 10px;
    color: var(--ink-3);
    font-size: 14px;
}

.quick {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
}

.quick-label {
    color: var(--ink-3);
    font-size: 13px;
}

/* Karakter seçimi (birden fazla karakteri olan oyuncu) */
.item-face {
    flex: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    object-position: center 20%;
}

.item-face.initials {
    font-size: 13px;
}

/* Gelişme yazma alanı: karakter sayfasında gelişimin en üstünde, olay sayfasında pencerede */
.composer-card {
    max-width: 780px;
    margin: 0 0 30px;
    padding: 16px 18px 14px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.05);
    transition: border-color 0.15s;
}

.composer-card:focus-within {
    border-color: rgba(255, 255, 255, 0.3);
}

.entry .composer-card,
.sheet .composer-card {
    margin: 0;
}

.sheet .composer-card {
    margin-top: 20px;
}

.composer-title,
.composer-body {
    display: block;
    width: 100%;
    padding: 0;
    border: 0;
    background: none;
    color: var(--ink);
}

.composer-title {
    padding-bottom: 8px;
    font: 600 18px var(--font);
}

.composer-body {
    min-height: 84px;
    overflow: hidden;
    font: 16px/1.6 var(--font);
    resize: none;
}

.composer-title:focus,
.composer-body:focus {
    outline: none;
}

.composer-title::placeholder,
.composer-body::placeholder {
    color: var(--ink-3);
}

.composer-card .tray {
    margin: 10px 0 0;
}

.composer-foot {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--line-soft);
}

.composer-foot .add-shot {
    min-height: 38px;
    margin: 0;
}

.composer-space {
    flex: 1;
}

.composer-event {
    flex: 0 1 260px;
    min-width: 0;
}

/* "Olay olarak yaz": yazmaya başlayınca, ilgili olay seçiminin yanında */
.composer-convert {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 38px;
}

.composer-convert[hidden] {
    display: none;
}

.composer-convert .icon {
    display: grid;
}

.composer-convert svg {
    width: 16px;
    height: 16px;
}

.composer-who {
    max-width: 300px;
    margin-bottom: 12px;
}

.composer-card .select select {
    min-height: 38px;
    font-size: 14px;
}

.composer-card .form-error {
    margin-top: 8px;
}
