/* Orza — tek dosya. Dört tema: mürekkep, safran, fiyort, masa (PC).
   Efekt ve animasyon sayfanın kendi <style> bloğunda kalır. */

/* Renkler css/themes/{tema}.css içinde. Burada yalnız düzen var. */
:root {
    --sans: "Segoe UI", Roboto, -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans", "Noto Sans CJK SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
    --serif: "Iowan Old Style", Palatino, "Palatino Linotype", "Times New Roman", serif;
    --bg: #121614;
    --bg-deep: #0c0f0d;
    --card: #1b221e;
    --card-2: #24302a;
    --line: rgba(224, 186, 146, 0.16);
    --text: #f4f0e8;
    --dim: #c9beb2;
    --faint: #9a8f84;
    --accent: #e0a36a;
    --wash: rgba(224, 163, 106, 0.13);
    --shadow: 0 18px 44px rgba(0, 0, 0, 0.32);
    --stat: rgba(0, 0, 0, 0.18);
    --grain: rgba(255, 255, 255, 0.05);
    color-scheme: dark;
}

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

html {
    margin: 0;
}

body {
    margin: 0;
    min-height: 100vh;
    min-height: 100dvh;
    color: var(--text);
    background: var(--bg-deep);
    font-family: var(--sans);
    font-size: 16px;
    line-height: 1.4;
    -webkit-font-smoothing: antialiased;
}

button,
a {
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

a:focus-visible,
button:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.app {
    position: relative;
    width: min(980px, 100%);
    margin: 0 auto;
    min-height: 100vh;
    min-height: 100dvh;
    padding: calc(12px + env(safe-area-inset-top)) 16px calc(84px + env(safe-area-inset-bottom));
    background:
        radial-gradient(420px 200px at 100% 0%, var(--wash), transparent 62%),
        var(--bg);
}

.app::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    pointer-events: none;
    opacity: 0.22;
    background-image: radial-gradient(var(--grain) 0.6px, transparent 0.6px);
    background-size: 3px 3px;
}

.top,
.shell {
    position: relative;
    z-index: 1;
}

.shell {
    display: flex;
    flex-direction: column;
}

.page-home .shell > .main {
    order: 1;
}

.page-home .shell > .rail {
    order: 2;
}

.top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 56px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    color: inherit;
    text-decoration: none;
}

.mark {
    width: 44px;
    height: 44px;
    flex: none;
    display: grid;
    place-items: center;
    color: var(--accent);
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 14px;
}

.mark svg {
    width: 28px;
    height: 28px;
}

.brand-text {
    min-width: 0;
}

.brand-text strong {
    display: block;
    font-family: var(--serif);
    font-size: 22px;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    line-height: 1;
}

.brand-text em {
    display: block;
    margin-top: 4px;
    font-style: normal;
    font-size: 12px;
    letter-spacing: 0.04em;
    color: var(--dim);
}

.iconbtn {
    width: 44px;
    height: 44px;
    flex: none;
    display: grid;
    place-items: center;
    color: var(--text);
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 14px;
    text-decoration: none;
}

.iconbtn svg {
    width: 22px;
    height: 22px;
}

.back-ico {
    display: grid;
    transform: scaleX(-1);
}

[dir="rtl"] .back-ico {
    transform: none;
}

.top-title {
    flex: 1;
    min-width: 0;
    margin: 0;
    font-family: var(--serif);
    font-size: 18px;
    font-weight: 600;
    letter-spacing: 0.02em;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ledger {
    margin-top: 10px;
    padding: 16px 14px 14px;
    border: 1px solid var(--line);
    border-inline-start: 3px solid var(--accent);
    border-radius: 22px;
    background: linear-gradient(180deg, var(--card-2), var(--card));
    box-shadow: var(--shadow);
}

.kicker {
    margin: 0;
    font-size: 11px;
    font-weight: 650;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--accent);
}

.stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    margin-top: 14px;
}

.stat {
    min-width: 0;
    padding: 12px 8px;
    border-radius: 14px;
    background: var(--stat);
}

.stat b {
    display: block;
    font-family: var(--serif);
    font-size: 22px;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.04em;
}

.stat span {
    display: block;
    margin-top: 4px;
    color: var(--dim);
    font-size: 12px;
}

.note {
    margin: 12px 0 0;
    color: var(--dim);
    font-size: 13px;
}

.section-label {
    margin: 22px 2px 10px;
    font-size: 12px;
    font-weight: 650;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--dim);
}

.menu {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.row {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 68px;
    padding: 10px 14px;
    color: inherit;
    text-decoration: none;
    border-top: 1px solid var(--line);
}

.row:first-child {
    border-top: 0;
}

.row:active,
.row.is-on {
    background: var(--wash);
}

@media (hover: hover) and (pointer: fine) {
    .iconbtn:hover,
    .theme-pick:hover,
    .lang-pick:hover {
        border-color: var(--accent);
    }

    .row:hover {
        background: var(--wash);
    }
}

.ico {
    width: 42px;
    height: 42px;
    flex: none;
    display: grid;
    place-items: center;
    color: var(--accent);
    background: var(--wash);
    border-radius: 13px;
}

.ico svg {
    width: 22px;
    height: 22px;
}

.row .txt {
    flex: 1;
    min-width: 0;
}

.row strong {
    display: block;
    font-size: 16px;
    font-weight: 650;
}

.row small {
    display: block;
    margin-top: 2px;
    color: var(--dim);
    font-size: 13px;
    line-height: 1.3;
}

.chev {
    flex: none;
    width: 18px;
    height: 18px;
    color: var(--faint);
}

[dir="rtl"] .chev {
    transform: scaleX(-1);
}

.soon {
    padding: 28px 4px 8px;
}

.soon h2 {
    margin: 8px 0 0;
    font-family: var(--serif);
    font-size: 36px;
    font-weight: 600;
    letter-spacing: 0.01em;
}

.lede {
    margin: 10px 0 0;
    max-width: 28em;
    color: var(--dim);
    font-size: 16px;
    line-height: 1.5;
}

.block + .block {
    margin-top: 8px;
}

.picks {
    display: grid;
    gap: 8px;
}

.picks form {
    margin: 0;
}

.theme-pick,
.lang-pick {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 52px;
    padding: 8px 12px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: var(--card);
    color: var(--text);
    font: inherit;
    text-align: start;
    text-decoration: none;
    width: 100%;
    cursor: pointer;
}

.theme-pick.is-on,
.lang-pick.is-on {
    border-color: var(--accent);
    background: var(--wash);
}

.langs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.lang-pick {
    width: auto;
    min-height: 44px;
    padding-inline: 14px;
    border-radius: 999px;
}

.swatch {
    width: 36px;
    height: 36px;
    flex: none;
    border-radius: 12px;
}

.swatch-ink {
    background: linear-gradient(145deg, #121614 42%, #e0a36a);
}

.swatch-saffron {
    background: linear-gradient(145deg, #1c140e 42%, #e8b04a);
}

.swatch-fjord {
    background: linear-gradient(145deg, #10161c 42%, #9fd0de);
}

.swatch-desk {
    background: linear-gradient(145deg, #efe6d4 40%, #8a4e28);
}

.swatch-racon {
    background: linear-gradient(145deg, #16244a 42%, #f3b643);
}

.idcard {
    position: relative;
    overflow: hidden;
    margin-top: 6px;
    padding: 16px;
    border-radius: 18px;
    border: 1px solid var(--line);
    background: linear-gradient(140deg, var(--card-2), var(--card));
    box-shadow: var(--shadow);
}

.idcard::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
    opacity: 0.7;
}

.id-row {
    display: flex;
    align-items: center;
    gap: 14px;
}

.avatar {
    width: 48px;
    height: 48px;
    flex: none;
    display: grid;
    place-items: center;
    overflow: hidden;
    color: var(--accent);
    border-radius: 14px;
    background: var(--card);
    border: 1px solid var(--line);
}

.avatar svg,
.avatar .glyph {
    width: 48px;
    height: 48px;
    object-fit: cover;
}

.id-info {
    min-width: 0;
    flex: 1;
}

.id-name {
    font-family: var(--serif);
    font-size: 20px;
    font-weight: 650;
    line-height: 1.1;
}

.id-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
}

.chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    border-radius: 8px;
    border: 1px solid var(--line);
    background: var(--stat);
    color: var(--dim);
    font-size: 11px;
    font-weight: 650;
    text-decoration: none;
}

.chip .glyph {
    width: 14px;
    height: 14px;
    border-radius: 4px;
}

.wealth {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    margin-top: 12px;
}

.wealth-card {
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    min-height: 52px;
    padding: 8px 8px 8px 10px;
    border: 1px solid var(--line);
    border-radius: 13px;
    background: var(--card);
    color: inherit;
    text-decoration: none;
    overflow: hidden;
}

.wealth-card::before {
    content: "";
    position: absolute;
    inset-inline-start: 0;
    top: 0;
    bottom: 0;
    width: 2.5px;
    background: var(--accent);
    opacity: 0.75;
}

.wealth-card.tone-sage::before { background: var(--dim); }
.wealth-card.tone-gold::before { background: var(--accent); }

.wealth-ico {
    width: 22px;
    height: 22px;
    flex: none;
    color: var(--accent);
}

.wealth-ico svg {
    width: 22px;
    height: 22px;
}

.wealth-tx {
    min-width: 0;
    display: flex;
    flex-direction: column;
    line-height: 1;
}

.wealth-tx b {
    font-family: var(--serif);
    font-size: 15px;
    font-weight: 650;
}

.wealth-tx small {
    margin-top: 4px;
    color: var(--dim);
    font-size: 9px;
    font-weight: 650;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.section-hdr {
    display: flex;
    align-items: center;
    margin: 20px 2px 12px;
}

.section-hdr-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 750;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.section-hdr-title svg {
    width: 16px;
    height: 16px;
    color: var(--accent);
}

.action-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}

.action-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    min-height: 92px;
    padding: 14px 4px 11px;
    border: 1px solid var(--line);
    border-radius: 13px;
    background: var(--card);
    color: inherit;
    text-decoration: none;
    text-align: center;
}

.action-box:active {
    transform: translateY(1px) scale(0.98);
}

.ab-icon {
    width: 46px;
    height: 46px;
    display: grid;
    place-items: center;
    border-radius: 13px;
    color: var(--accent);
    background: var(--wash);
    border: 1px solid var(--line);
}

.ab-icon svg {
    width: 24px;
    height: 24px;
}

.ab-label {
    font-size: 11px;
    font-weight: 650;
    line-height: 1.2;
}

@media (min-width: 560px) {
    .action-grid {
        grid-template-columns: repeat(6, minmax(0, 1fr));
    }
}

.sheet {
    margin-top: 8px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: var(--card);
}

.sheet-title {
    margin: 6px 0 0;
    font-family: var(--serif);
    font-size: 28px;
    font-weight: 650;
}

.field,
.field-label {
    display: block;
    margin-top: 14px;
    color: var(--dim);
    font-size: 12px;
    font-weight: 650;
    letter-spacing: 0.04em;
}

.field input {
    display: block;
    width: 100%;
    margin-top: 6px;
    min-height: 46px;
    padding: 0 12px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--bg);
    color: var(--text);
    font: inherit;
    font-size: 16px;
}

.country-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-top: 8px;
}

.country-pick {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 52px;
    padding: 8px 10px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--bg);
    color: var(--text);
}

.country-pick.is-on,
.country-pick:has(input:checked) {
    border-color: var(--accent);
    background: var(--wash);
}

.country-pick input {
    accent-color: var(--accent);
}

.country-pick span {
    min-width: 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
}

.country-pick strong {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.country-pick small {
    flex-basis: 100%;
    color: var(--dim);
    font-size: 11px;
}

.btn {
    display: block;
    width: 100%;
    margin-top: 16px;
    min-height: 48px;
    border: 0;
    border-radius: 14px;
    background: var(--accent);
    color: var(--bg);
    font: inherit;
    font-weight: 750;
    cursor: pointer;
}

.form-link {
    display: block;
    margin-top: 12px;
    text-align: center;
    color: var(--dim);
}

.form-err,
.form-ok {
    margin: 12px 0 0;
    padding: 10px 12px;
    border-radius: 12px;
    font-size: 14px;
}

.form-err {
    color: #8a2e22;
    background: rgba(224, 120, 100, 0.16);
}

html[data-theme="desk"] .form-err {
    color: #6d2418;
}

.form-ok {
    color: var(--text);
    background: var(--wash);
}

.chip {
    text-decoration: none;
}

@media (hover: hover) and (pointer: fine) {
    .wealth-card:hover,
    .action-box:hover,
    .country-pick:hover {
        border-color: var(--accent);
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

.menu-sec {
    margin: 18px 2px 10px;
    color: var(--dim);
    font-size: 12px;
    font-weight: 750;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.menu-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 16px 6px;
}

.menu-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    min-width: 0;
    color: inherit;
    text-align: center;
    text-decoration: none;
}

.menu-ico {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border-radius: 13px;
    overflow: hidden;
    border: 1px solid var(--line);
    background: var(--card);
}

.menu-ico img,
.menu-ico .glyph {
    width: 44px;
    height: 44px;
    object-fit: cover;
    display: block;
}

.menu-item > span:last-child {
    font-size: 10px;
    font-weight: 650;
    line-height: 1.15;
}


.stats {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-inline-start: auto;
    min-width: 0;
}

.stat {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    max-width: 92px;
    padding: 3px 6px 3px 3px;
    border-radius: 999px;
    background: var(--stat);
    border: 1px solid var(--line);
    color: inherit;
    text-decoration: none;
    font-size: 11px;
    font-weight: 750;
    font-variant-numeric: tabular-nums;
}

.stat b {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 750;
}

.stat .glyph {
    width: 16px;
    height: 16px;
    border-radius: 5px;
    object-fit: cover;
    flex: none;
}

.flag {
    width: 18px;
    height: 12px;
    object-fit: cover;
    border-radius: 2px;
    flex: none;
    vertical-align: -1px;
    box-shadow: 0 0 0 1px var(--line);
}

.xp {
    margin: 8px 0 4px;
}

.xp-top {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 4px;
    color: var(--dim);
    font-size: 11px;
    font-weight: 700;
}

.xp-track {
    height: 6px;
    border-radius: 99px;
    background: var(--stat);
    overflow: hidden;
}

.xp-fill {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: var(--accent);
}

.dock,
.pc-rail {
    background: var(--card);
    border: 1px solid var(--line);
}

.dock {
    position: fixed;
    left: 10px;
    right: 10px;
    bottom: calc(8px + env(safe-area-inset-bottom));
    z-index: 20;
    width: min(520px, calc(100% - 20px));
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    padding: 6px 4px 5px;
    border-radius: 18px;
}

.dock a,
.pc-rail a {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    min-width: 0;
    padding: 4px 2px;
    color: var(--dim);
    font-size: 10px;
    font-weight: 700;
    text-decoration: none;
}

.dock a.on,
.pc-rail a.on {
    color: var(--text);
}

.dock .glyph,
.pc-rail .glyph {
    width: 22px;
    height: 22px;
    border-radius: 7px;
    object-fit: cover;
}

.pc-rail {
    display: none;
}

.mini {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 6px;
    margin-top: 10px;
}

.mini a {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    min-width: 0;
    padding: 8px 4px;
    border-radius: 12px;
    border: 1px solid var(--line);
    background: var(--card);
    color: inherit;
    text-decoration: none;
    text-align: center;
}

.mini .glyph {
    width: 22px;
    height: 22px;
    border-radius: 6px;
    object-fit: cover;
}

.mini b {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 12px;
}

.mini small {
    color: var(--faint);
    font-size: 9px;
    font-weight: 700;
}

.rank-list {
    margin: 12px 0 0;
    padding: 0;
    list-style: none;
}

.rank-list li {
    display: grid;
    grid-template-columns: 28px minmax(0, 1fr) auto;
    gap: 8px;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid var(--line);
}

.rank-list b,
.rank-list span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rank-list em {
    font-style: normal;
    font-variant-numeric: tabular-nums;
    font-weight: 750;
}

.lvl-pop {
    position: fixed;
    inset: 0;
    z-index: 40;
    display: grid;
    place-items: center;
    background: rgba(0, 0, 0, 0.42);
    pointer-events: none;
}

.lvl-pop[hidden] {
    display: none;
}

.lvl-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    min-width: 160px;
    padding: 18px 22px;
    border-radius: 18px;
    background: var(--card);
    border: 1px solid var(--line);
    color: var(--text);
    animation: lvl-in 0.7s ease;
}

.lvl-card .glyph {
    width: 48px;
    height: 48px;
    border-radius: 14px;
}

.lvl-card strong {
    font-size: 28px;
    line-height: 1;
}

.lvl-card span {
    color: var(--dim);
    font-size: 13px;
    font-weight: 700;
}

@keyframes lvl-in {
    0% { transform: scale(0.72); opacity: 0; }
    55% { transform: scale(1.04); opacity: 1; }
    100% { transform: scale(1); opacity: 1; }
}

@media (min-width: 1080px) {
    body {
        background: var(--bg-deep);
    }

    .frame {
        display: grid;
        grid-template-columns: 232px minmax(0, 640px);
        justify-content: center;
        gap: 24px;
        width: min(960px, calc(100% - 48px));
        margin: 0 auto;
    }

    .pc-rail {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 6px;
        position: sticky;
        top: 0;
        height: 100dvh;
        padding: 28px 8px 16px;
        border: 0;
        background: transparent;
    }

    .pc-rail .brand {
        margin: 0 8px 18px;
    }

    .pc-rail a {
        flex-direction: row;
        justify-content: flex-start;
        gap: 12px;
        padding: 10px 12px;
        border-radius: 12px;
        font-size: 15px;
    }

    .pc-rail a.on {
        background: var(--wash);
    }

    .pc-rail .glyph {
        width: 26px;
        height: 26px;
        border-radius: 8px;
    }

    .dock {
        display: none;
    }

    .app > .top > .brand {
        display: none;
    }

    .app {
        width: 100%;
        min-height: 100dvh;
        padding-bottom: 28px;
        border-inline: 1px solid var(--line);
    }
}
