/* Readable comparison and item information for the current browser world. */
html.tx-open-world #craft-overlay .ink-panel {
    color:#e4ebe5;background:#102630;border:1px solid #b49c64;border-radius:6px;
}
html.tx-open-world #craft-overlay .ink-panel-title {color:#f4e9d0;}
html.tx-open-world #craft-body {color:#e4ebe5;font:400 16px/1.75 "Microsoft YaHei",sans-serif;}
html.tx-open-world #craft-body .craft-micro {color:#d3ddd4;}
html.tx-open-world #craft-body .tx-craft-receipt {
    color:#edcf8e;border-top:1px solid #b49c6466;margin-top:16px;padding-top:12px;
}
html.tx-open-world .tx-card-foot .tx-production-cost {color:#edcf8e;white-space:normal;}
@media (min-width:961px) {
    html.tx-open-world:not(.tx-mobile) #hud-top .favor-mini {
        position:absolute;inset:auto 7rem .35rem auto;max-width:29rem;
        margin:0;flex-wrap:nowrap;align-items:center;gap:.45rem;
        font-size:max(.78rem,11px);line-height:1.3;white-space:nowrap;
        pointer-events:auto;z-index:1;
    }
    html.tx-open-world:not(.tx-mobile) #hud-top .favor-mini .fv {
        color:#e4d6be;background:#142b30;border-color:#b49c6466;
    }
}
html.tx-open-world #character-creation .birth-panel {
    position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);
    width:min(1040px,calc(100% - 48px));height:auto;max-height:calc(100% - 70px);
    margin:0;min-height:0;padding:20px 28px;box-sizing:border-box;overflow:auto;
    display:grid;grid-template-columns:1fr 1fr 1fr;gap:12px 20px;
    background:#102630f7;border:1px solid #8d8668;border-radius:6px;
    scrollbar-color:#ab9a71 #102630;
}

/* Price and action may occupy two lines. Let compact production cards grow
   with those rows so their descriptions never spill into the price rail. */
html.tx-open-world .event-row:not(.tx-no-story) .tx-routine-cards .tx-card:has(.tx-production-cost) {
    flex:0 0 auto;height:auto!important;min-height:11.4rem!important;
    grid-template-rows:auto auto auto;
}
html.tx-open-world #character-creation .birth-panel > * {position:static;inset:auto;transform:none;}
html.tx-open-world #character-creation .birth-title {
    grid-column:1/-1;width:fit-content;height:auto;min-height:42px;padding:0 20px;
    font-size:30px;line-height:1.4;
}
html.tx-open-world #character-creation .birth-close {
    position:absolute;left:auto;top:10px;right:10px;width:44px;height:44px;z-index:2;
}
html.tx-open-world #character-creation .birth-slots {
    grid-column:1/-1;width:auto;height:auto;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px;
}
html.tx-open-world #character-creation .birth-book {
    position:relative;inset:auto!important;width:auto;height:auto;min-height:138px;
    padding:14px 14px 12px;box-sizing:border-box;background:#18343e;
    border:1px solid #7d896f;border-radius:5px;
}
html.tx-open-world #character-creation .birth-book.lv4 {border-color:#c79654;}
html.tx-open-world #character-creation .birth-book.lv5 {border-color:#d07971;}
html.tx-open-world #character-creation .birth-book .book-name {
    position:static;inset:auto;padding-right:32px;min-height:30px;
    font:600 18px/1.5 "Microsoft YaHei",sans-serif;color:#f4e9d0;
}
html.tx-open-world #character-creation .birth-description {
    margin:8px 0 0;color:#dce4df;font:400 14px/1.65 "Microsoft YaHei",sans-serif;white-space:pre-line;
}
html.tx-open-world #character-creation .book-lock {right:4px;top:4px;width:40px;height:40px;padding:9px;}
html.tx-open-world #character-creation #birth-tip {
    grid-column:1/-1;width:auto;height:auto;min-height:24px;text-align:left;opacity:1;
    color:#c8d4ca;font:400 14px/1.6 "Microsoft YaHei",sans-serif;
}
html.tx-open-world #character-creation .linggen-total {
    grid-column:1;grid-row:4;align-self:start;margin-top:22px;width:auto;height:auto;
    display:flex;align-items:center;gap:10px;background:none;font:500 17px/1.6 "Microsoft YaHei",sans-serif;
}
html.tx-open-world #character-creation .linggen-total > * {position:static;inset:auto;width:auto;height:auto;}
html.tx-open-world #character-creation .linggen-lock {width:40px;height:40px;padding:9px;}
html.tx-open-world #character-creation .radar-wrap {
    grid-column:2;grid-row:4;justify-self:center;width:210px;height:190px;margin:24px 25px 28px;
}
html.tx-open-world #character-creation .radar-stage {position:relative;inset:auto;width:100%;height:100%;}
html.tx-open-world #character-creation #linggen-radar {left:0;top:0;width:100%;height:100%;}
html.tx-open-world #character-creation .radar-node {width:38px;height:38px;}
html.tx-open-world #character-creation .radar-node.n-wood {left:calc(50% - 19px);top:-22px;}
html.tx-open-world #character-creation .radar-node.n-water {left:-20px;top:25%;}
html.tx-open-world #character-creation .radar-node.n-fire {left:auto;right:-20px;top:25%;}
html.tx-open-world #character-creation .radar-node.n-metal {left:8%;top:auto;bottom:-6px;}
html.tx-open-world #character-creation .radar-node.n-earth {left:auto;right:8%;top:auto;bottom:-6px;}
html.tx-open-world #character-creation .radar-node > b {
    left:0;top:35px;width:38px;height:22px;font-size:15px;line-height:1.4;background:none;
}
html.tx-open-world #character-creation .birth-name-col {
    grid-column:3;grid-row:4;align-self:start;margin-top:22px;width:auto;height:auto;
    display:block;
}
html.tx-open-world #character-creation .birth-name-col > * {position:static;inset:auto;}
html.tx-open-world #character-creation .birth-name-col label {justify-content:flex-start;width:auto;height:auto;font-size:17px;color:#ddd9c8;}
html.tx-open-world #character-creation #player-name {
    margin-top:8px;width:100%;max-width:220px;height:42px;box-sizing:border-box;
    border:1px solid #788573;background:#10242c;color:#f5e5be;font-size:18px;
}
html.tx-open-world #character-creation .birth-mode {grid-column:3;width:auto;height:auto;}
html.tx-open-world #character-creation .redraw-cost {
    grid-column:1;align-self:center;display:flex;align-items:center;gap:8px;width:auto;height:auto;background:none;
    font:500 16px/1.5 "Microsoft YaHei",sans-serif;
}
html.tx-open-world #character-creation .redraw-cost > * {position:static;inset:auto;width:auto;height:auto;}
html.tx-open-world #character-creation .redraw-cost img {width:26px;height:26px;}
html.tx-open-world #character-creation .birth-btn {
    position:relative!important;inset:auto!important;transform:none!important;
    width:100%;max-width:none;height:50px;font-size:24px;line-height:1.4;
}
html.tx-open-world #character-creation .birth-btn.reset {grid-column:2;}
html.tx-open-world #character-creation .birth-btn.start {grid-column:3;}
html.tx-open-world .item-tip {
    width:min(340px,calc(100vw - 16px));height:auto!important;max-height:calc(100vh - 24px);
    box-sizing:border-box;padding:14px;border:1px solid #a38d61;border-radius:5px;
    background:#10232dfc;box-shadow:0 8px 28px #0008;font:400 14px/1.6 "Microsoft YaHei",sans-serif;
}
html.tx-open-world .item-tip::before {display:none;}
html.tx-open-world .item-tip .tip-variant:not(.hidden) {position:static;display:grid;grid-template-columns:1fr auto;gap:10px;}
html.tx-open-world .item-tip .tip-variant > * {position:static;inset:auto;width:auto;height:auto;}
html.tx-open-world .item-tip .tip-desc-area,
html.tx-open-world .item-tip .tips-desc-area {grid-column:1/-1;}
html.tx-open-world .item-tip .tip-desc,
html.tx-open-world .item-tip .tips-desc {position:static;width:auto;font-size:14px;line-height:1.65;color:#e1e7df;white-space:pre-line;}
html.tx-open-world #item-tip-name,
html.tx-open-world #skill-tip-name {grid-column:1/-1;font-size:18px;line-height:1.4;color:#f6e6be;white-space:normal;}
html.tx-open-world .item-tip .tip-right {display:none;}
html.tx-open-world .item-tip .tip-type {background:none;align-self:end;}
html.tx-open-world .item-tip .tip-type span {width:auto;height:auto;font-size:13px;color:#bfcfca;}
html.tx-open-world .item-tip .tip-price {background:none;justify-self:end;}
html.tx-open-world .item-tip .tip-price-img {position:static;width:auto;height:auto;display:inline;background:none;}
html.tx-open-world .item-tip .tip-price-img > b {position:static;width:auto;height:auto;font-size:13px;line-height:1.5;color:#edcf8e;}
html.tx-open-world .item-tip .tip-price.no-sold .tip-price-img {display:none!important;}
html.tx-open-world .item-tip .tip-nosold {position:static;width:auto;height:auto;font-size:13px;}
html.tx-open-world .item-tip .tips-cost {min-width:46px;justify-self:end;padding:2px 8px;}
html.tx-open-world .item-tip .tips-cost span {position:static;width:auto;height:auto;font-size:14px;}
html.tx-open-world .item-tip .tips-icon {width:30px;height:30px;}
html.tx-open-world #modal-buttons .bag-sell-action {color:#f1bcb0;border-color:#ad7769;}
/* These controls belong to the retired custom-world timeline and NPC module. */
html.tx-open-world #settings-overlay :is(.set-tog-p,.set-npc,.set-npc-hint) {display:none!important;}
html.tx-open-world.tx-mobile #character-creation {padding:0;overflow:hidden;}
html.tx-open-world.tx-mobile #character-creation::after {display:none;}
html.tx-open-world.tx-mobile #character-creation .birth-panel {
    top:68px;left:50%;transform:translateX(-50%);max-height:calc(100% - 84px);
}
@media (max-width:700px) {
    html.tx-open-world #character-creation .birth-panel {width:calc(100% - 24px);padding:18px;gap:12px;max-height:calc(100% - 36px);grid-template-columns:1fr 1fr;}
    html.tx-open-world #character-creation .birth-slots {grid-template-columns:1fr;gap:8px;}
    html.tx-open-world #character-creation .birth-book {min-height:0;padding:12px;}
    html.tx-open-world #character-creation .radar-wrap {grid-column:1/-1;grid-row:5;}
    html.tx-open-world #character-creation .birth-name-col {grid-column:2;grid-row:4;}
    html.tx-open-world #character-creation .redraw-cost {grid-column:1/-1;}
    html.tx-open-world #character-creation .birth-btn.reset {grid-column:1;}
    html.tx-open-world #character-creation .birth-btn.start {grid-column:2;}
}

/* Keep event copy and its action rail in separate layout rows. The artwork stays
   prominent, while long authored text becomes a readable preview instead of
   running underneath the footer. */
html.tx-open-world .tx-story-cards .tx-card,
html.tx-open-world .event-row.tx-no-story .tx-routine-cards .tx-card {
    display:grid;
    grid-template-rows:12.75rem auto minmax(0,1fr) auto;
    width:21rem;height:30rem!important;min-height:30rem!important;
}
html.tx-open-world .tx-story-cards .tx-card > .art,
html.tx-open-world .event-row.tx-no-story .tx-routine-cards .tx-card > .art {
    position:relative!important;inset:auto!important;grid-row:1;grid-column:1;
    width:100%!important;height:100%!important;min-height:0;
    object-fit:cover;object-position:center 28%;
    mask-image:linear-gradient(#000 78%,transparent);transform:none!important;
}
html.tx-open-world .tx-story-cards .tx-card > .name,
html.tx-open-world .event-row.tx-no-story .tx-routine-cards .tx-card > .name {
    position:relative!important;inset:auto!important;grid-row:2;grid-column:1;
    display:-webkit-box;width:auto!important;height:auto!important;min-height:0;
    margin:.85rem 1.35rem .35rem;overflow:hidden;
    -webkit-box-orient:vertical;-webkit-line-clamp:2;
    font-size:1.6rem;line-height:1.35;
}
html.tx-open-world .tx-story-cards .tx-card > .desc,
html.tx-open-world .event-row.tx-no-story .tx-routine-cards .tx-card > .desc {
    position:relative!important;inset:auto!important;grid-row:3;grid-column:1;
    display:-webkit-box!important;width:auto!important;height:auto!important;min-height:0;
    align-self:start;max-height:5.1em;margin:0 1.35rem .35rem;padding:0;overflow:hidden;
    -webkit-box-orient:vertical;-webkit-line-clamp:3;
    font-size:1.25rem;line-height:1.7;overflow-wrap:anywhere;
}
html.tx-open-world .tx-story-cards .tx-card.tx-copy-clipped > .desc,
html.tx-open-world .event-row.tx-no-story .tx-routine-cards .tx-card.tx-copy-clipped > .desc {
    mask-image:linear-gradient(#000 72%,rgba(0,0,0,.72));
}
html.tx-open-world .tx-story-cards .tx-card > .tx-card-foot,
html.tx-open-world .event-row.tx-no-story .tx-routine-cards .tx-card > .tx-card-foot {
    position:relative!important;inset:auto!important;grid-row:4;grid-column:1;
    display:flex;align-items:center;flex-wrap:wrap;gap:.35rem .55rem;
    width:auto!important;height:auto!important;min-height:3rem;box-sizing:border-box;
    margin:0 1.35rem;padding:.65rem 0;
    background:linear-gradient(180deg,transparent,#0b1b20e8 38%);
}
html.tx-open-world .tx-story-cards .tx-card > .tx-card-foot > :first-child,
html.tx-open-world .event-row.tx-no-story .tx-routine-cards .tx-card > .tx-card-foot > :first-child {margin-right:auto;}
html.tx-open-world .tx-story-cards .tx-card > .card-need,
html.tx-open-world .event-row.tx-no-story .tx-routine-cards .tx-card > .card-need {
    top:10.35rem;right:.75rem;
}

html.tx-open-world .tx-card-copy-detail {
    position:relative;z-index:12;display:inline-flex;align-items:center;justify-content:center;
    min-width:3.5rem;min-height:2rem;padding:.2rem .55rem;box-sizing:border-box;
    border:1px solid #c5a765;border-radius:3px;background:#19343ae8;color:#ffe5ab;
    font:600 max(.9rem,12px)/1.25 "Source Han Sans SC","Microsoft YaHei",sans-serif;
    letter-spacing:.08em;cursor:pointer;pointer-events:auto;touch-action:manipulation;
}
html.tx-open-world .tx-card-copy-detail[hidden] {display:none!important;}
html.tx-open-world .tx-card-copy-detail:is(:hover,:active) {background:#29494d;color:#fff0c8;}
html.tx-open-world .tx-card-copy-detail:focus-visible {outline:2px solid #ffe0a1;outline-offset:2px;}

/* Compact annual actions use the same content-safe rows without turning their
   small horizontal cards into miniature story posters. */
html.tx-open-world .event-row:not(.tx-no-story) .tx-routine-cards .tx-card {
    display:grid;grid-template-columns:5.8rem minmax(0,1fr);
    grid-template-rows:auto minmax(0,1fr) auto;
    height:9.4rem;min-height:9.4rem;
}
html.tx-open-world .event-row:not(.tx-no-story) .tx-routine-cards .tx-card > .art {
    position:relative!important;inset:auto!important;grid-column:1;grid-row:1/-1;
    width:5.8rem!important;height:100%!important;min-height:0;
    object-fit:cover;object-position:42% 20%;transform:none!important;
    mask-image:linear-gradient(90deg,#000 45%,transparent);
}
html.tx-open-world .event-row:not(.tx-no-story) .tx-routine-cards .tx-card > .name {
    position:relative!important;inset:auto!important;grid-column:2;grid-row:1;
    display:-webkit-box;width:auto!important;height:auto!important;min-height:0;
    margin:.65rem .7rem .15rem 0;overflow:hidden;
    -webkit-box-orient:vertical;-webkit-line-clamp:1;
    font-size:1.25rem;line-height:1.35;
}
html.tx-open-world .event-row:not(.tx-no-story) .tx-routine-cards .tx-card > .desc {
    position:relative!important;inset:auto!important;grid-column:2;grid-row:2;
    display:-webkit-box!important;width:auto!important;height:auto!important;min-height:0;
    align-self:start;max-height:3.1em;margin:0 .7rem .15rem 0;overflow:hidden;
    -webkit-box-orient:vertical;-webkit-line-clamp:2;
    font-size:1.12rem;line-height:1.55;overflow-wrap:anywhere;
}
html.tx-open-world .event-row:not(.tx-no-story) .tx-routine-cards .tx-card > .tx-card-foot {
    position:relative!important;inset:auto!important;grid-column:2;grid-row:3;
    display:flex;align-items:center;flex-wrap:wrap;gap:.25rem .4rem;
    width:auto!important;height:auto!important;min-height:2.25rem;box-sizing:border-box;
    margin:0 .7rem 0 0;padding:.35rem 0;
}
html.tx-open-world .event-row:not(.tx-no-story) .tx-routine-cards .tx-card > .tx-card-foot > :first-child {margin-right:auto;}
html.tx-open-world .event-row:not(.tx-no-story) .tx-routine-cards .tx-card:not(:has(> .art)) {grid-template-columns:1fr;}
html.tx-open-world .event-row:not(.tx-no-story) .tx-routine-cards .tx-card:not(:has(> .art)) > :is(.name,.desc,.tx-card-foot) {grid-column:1;margin-left:.7rem;}

html.tx-open-world #modal-overlay.has-readable-copy .tx-event-detail-desc {
    margin:0;color:#e4ebe5;font:400 16px/1.8 "Source Han Sans SC","Microsoft YaHei",sans-serif;
    white-space:pre-line;overflow-wrap:anywhere;
}
html.tx-open-world #modal-overlay.has-readable-copy .tx-event-detail-time {
    margin:18px 0 0;padding-top:14px;border-top:1px solid #b99b5e66;
    color:#edcf8e;font:500 15px/1.65 "Source Han Sans SC","Microsoft YaHei",sans-serif;
}

html.tx-open-world.tx-mobile .tx-story-cards .tx-card,
html.tx-open-world.tx-mobile .event-row.tx-no-story .tx-routine-cards .tx-card {
    grid-template-rows:10.75rem auto minmax(0,1fr) auto;
    width:min(82vw,22rem);height:26rem!important;min-height:26rem!important;
}
html.tx-open-world.tx-mobile .tx-story-cards .tx-card > .name,
html.tx-open-world.tx-mobile .event-row.tx-no-story .tx-routine-cards .tx-card > .name {
    margin:.75rem 1rem .3rem;font-size:1.3rem;
}
html.tx-open-world.tx-mobile .tx-story-cards .tx-card > .desc,
html.tx-open-world.tx-mobile .event-row.tx-no-story .tx-routine-cards .tx-card > .desc {
    margin:0 1rem .3rem;font-size:max(.95rem,15px);line-height:1.65;-webkit-line-clamp:3;
}
html.tx-open-world.tx-mobile .tx-story-cards .tx-card > .tx-card-foot,
html.tx-open-world.tx-mobile .event-row.tx-no-story .tx-routine-cards .tx-card > .tx-card-foot {
    min-height:3.25rem;margin:0 1rem;padding:.55rem 0;font-size:max(.8rem,13px);
}
html.tx-open-world.tx-mobile .tx-story-cards .tx-card > .card-need,
html.tx-open-world.tx-mobile .event-row.tx-no-story .tx-routine-cards .tx-card > .card-need {top:8.6rem;}
html.tx-open-world.tx-mobile .event-row:not(.tx-no-story) .tx-routine-cards .tx-card {
    grid-template-rows:auto minmax(0,1fr) auto;height:10rem;min-height:10rem;width:100%;
}
html.tx-open-world.tx-mobile .event-row:not(.tx-no-story) .tx-routine-cards .tx-card > .desc {
    font-size:max(.94rem,15px);line-height:1.5;
}

/* Short mobile landscape has only about 9rem between its header and action bar.
   Use a side illustration there so the title, preview and footer remain visible
   without scaling the copy down. */
@media (max-width:960px) and (max-height:600px) {
    html.tx-open-world.tx-mobile .tx-story-cards .tx-card,
    html.tx-open-world.tx-mobile .event-row.tx-no-story .tx-routine-cards .tx-card {
        grid-template-columns:42% minmax(0,1fr);
        grid-template-rows:auto minmax(0,1fr) auto;
        width:min(55vw,29rem);height:8.45rem!important;min-height:8.45rem!important;
    }
    html.tx-open-world.tx-mobile .tx-story-cards .tx-card > .art,
    html.tx-open-world.tx-mobile .event-row.tx-no-story .tx-routine-cards .tx-card > .art {
        grid-column:1;grid-row:1/-1;width:100%!important;height:100%!important;
        object-position:center 28%;mask-image:linear-gradient(90deg,#000 72%,transparent);
    }
    html.tx-open-world.tx-mobile .tx-story-cards .tx-card > .name,
    html.tx-open-world.tx-mobile .event-row.tx-no-story .tx-routine-cards .tx-card > .name {
        grid-column:2;grid-row:1;margin:.55rem .7rem .1rem 0;
        font-size:1.15rem;line-height:1.3;-webkit-line-clamp:1;
    }
    html.tx-open-world.tx-mobile .tx-story-cards .tx-card > .desc,
    html.tx-open-world.tx-mobile .event-row.tx-no-story .tx-routine-cards .tx-card > .desc {
        grid-column:2;grid-row:2;max-height:3.1em;margin:0 .7rem .1rem 0;
        font-size:12px;line-height:1.5;-webkit-line-clamp:2;
    }
    html.tx-open-world.tx-mobile .tx-story-cards .tx-card > .tx-card-foot,
    html.tx-open-world.tx-mobile .event-row.tx-no-story .tx-routine-cards .tx-card > .tx-card-foot {
        grid-column:2;grid-row:3;min-height:2.25rem;margin:0 .7rem 0 0;
        padding:.3rem 0;font-size:12px;gap:.2rem .4rem;
    }
    html.tx-open-world.tx-mobile .tx-story-cards .tx-card > .card-need,
    html.tx-open-world.tx-mobile .event-row.tx-no-story .tx-routine-cards .tx-card > .card-need {
        top:.45rem;left:.45rem;right:auto;
    }
}
