html,
      body {
        background: #191d22;
        margin: 0;
        padding: 0;
        height: 100%;
      }
      body {
        font-family: "Segoe UI", "Pretendard", Arial, sans-serif;
        display: flex;
        flex-direction: column;
        align-items: center;
        min-height: 100vh;
      }
      #container {
        background: rgba(34, 39, 46, 0.99);
        border-radius: 18px;
        box-shadow: 0 6px 32px #1118;
        width: 99vw;
        max-width: 390px;
        margin: 10px 0 20px 0;
        padding: 14px 8px 18px 8px;
        box-sizing: border-box;
        min-height: 610px;
        display: flex;
        flex-direction: column;
        gap: 8px;
      }
      h2 {
        color: #f6fa4e;
        letter-spacing: 1.5px;
        text-align: center;
        margin: 0 0 6px 0;
        font-size: 1.6em;
        font-weight: 700;
        text-shadow: 0 2px 12px #161;
      }
      #status {
        background: #22262e;
        border-radius: 12px;
        padding: 9px 10px 7px 10px;
        font-size: 1em;
        margin-bottom: 2px;
        line-height: 1.8em;
        min-height: 49px;
        color: #fff;
        box-shadow: 0 2px 6px #0106;
        display: flex;
        flex-direction: column;
        gap: 3px;
      }
      #barGroup {
        display: flex;
        gap: 10px;
        margin-bottom: 2px;
      }
      .bar {
        flex: 1;
        border-radius: 7px;
        height: 13px;
        background: #37445a;
        margin-right: 1px;
        overflow: hidden;
        position: relative;
      }
      .fill-hp {
        background: linear-gradient(90deg, #fd7f7e, #feefae);
      }
      .fill-hunger {
        background: linear-gradient(90deg, #71e397, #f5f79e);
      }
      .fill-mental {
        background: linear-gradient(90deg, #6ed9ef, #c9b0f4);
      }
      .bar > span {
        display: block;
        height: 100%;
        transition: width 0.7s cubic-bezier(0.7, 1.3, 0.4, 1);
      }
      #inventory {
        font-size: 0.98em;
        color: #ffe;
        word-break: break-all;
        margin-bottom: 2px;
      }
      #log {
        background: #2d3341;
        border-radius: 11px;
        min-height: 87px;
        max-height: 140px;
        overflow-y: auto;
        font-size: 0.97em;
        padding: 7px 7px 7px 10px;
        color: #f4fffa;
        line-height: 1.4em;
        margin-bottom: 2px;
        box-shadow: 0 1px 6px #1116;
        scroll-behavior: smooth;
      }
      .event {
        animation: eventFlash 0.5s;
      }
      @keyframes eventFlash {
        0% {
          background: #fec;
          color: #111;
        }
        100% {
          background: inherit;
          color: inherit;
        }
      }
      .zombie-anim {
        animation: zombiePop 0.6s;
      }
      @keyframes zombiePop {
        0% {
          transform: scale(0.7);
        }
        40% {
          transform: scale(1.2);
        }
        80% {
          transform: scale(1);
        }
      }
      .item-anim {
        animation: itemPop 0.4s;
      }
      @keyframes itemPop {
        0% {
          transform: scale(0.5);
        }
        60% {
          transform: scale(1.2);
        }
        100% {
          transform: scale(1);
        }
      }
      #actions {
        margin: 3px 0 0 0;
        display: flex;
        flex-direction: column;
        gap: 6px;
      }
      .actBtn,
      .locBtn {
        width: 100%;
        font-size: 1.07em;
        padding: 12px 2px;
        border-radius: 8px;
        border: none;
        margin-bottom: 2px;
        background: linear-gradient(90deg, #232d3d 70%, #2c374d 100%);
        color: #ffe;
        box-shadow: 0 2px 6px #1012;
        font-weight: 700;
        transition: background 0.18s;
        letter-spacing: 0.02em;
        cursor: pointer;
        outline: none;
      }
      .actBtn:active,
      .locBtn:active {
        background: linear-gradient(90deg, #2c374d 20%, #232d3d 100%);
      }
      .emoji {
        font-size: 1.3em;
        vertical-align: middle;
      }
      #footer {
        color: #99a;
        font-size: 0.92em;
        margin-top: 8px;
        text-align: center;
      }
      /* Modal de detalles de ítem */
      #itemDescBg {
        display: none;
        position: fixed;
        left: 0;
        top: 0;
        width: 100vw;
        height: 100vh;
        background: rgba(8, 10, 19, 0.54);
        z-index: 20;
        align-items: center;
        justify-content: center;
      }
      #itemDescModal {
        background: #23293a;
        border-radius: 14px;
        color: #fff;
        min-width: 210px;
        max-width: 90vw;
        padding: 21px 16px 18px 16px;
        box-shadow: 0 8px 48px #000c;
        font-size: 1.08em;
        z-index: 21;
        text-align: center;
        position: relative;
        animation: modalOpen 0.3s;
      }
      #itemDescModal b {
        color: #fffa88;
      }
      #itemDescModal .close {
        position: absolute;
        right: 13px;
        top: 8px;
        font-size: 1.5em;
        color: #7fd;
        background: none;
        border: none;
        cursor: pointer;
      }
      .item-info-btn {
        font-size: 0.93em;
        margin-left: 5px;
        background: none;
        border: none;
        color: #aef;
        cursor: pointer;
        vertical-align: middle;
      }
      @keyframes modalOpen {
        0% {
          transform: scale(0.85);
        }
        100% {
          transform: scale(1);
        }
      }
      @media (max-width: 400px) {
        #container {
          min-height: 480px;
        }
        #log {
          font-size: 0.93em;
          min-height: 66px;
          max-height: 98px;
        }
        #status {
          font-size: 0.93em;
        }
        .actBtn,
        .locBtn {
          font-size: 0.99em;
        }
      }