/* Tron's Empire — game styles (extracted per Tronsoft Games Package Spec v1.4 §7) */
* { box-sizing: border-box; margin: 0; padding: 0; }
  html, body {
    min-height: 100%;
    background: #2b2519;
    color: #efe6cf;
    font-family: "Georgia", "Times New Roman", serif;
  }
  #app { max-width: 1000px; margin: 0 auto; padding: 14px 16px 40px; }
  header {
    display: flex; align-items: baseline; justify-content: space-between;
    border-bottom: 2px solid #6b5a3a; padding-bottom: 8px; margin-bottom: 12px;
  }
  header h1 { font-size: 26px; letter-spacing: 2px; color: #f0c66b; text-shadow: 1px 1px 0 #000; }
  header .credit { font-size: 12px; color: #b7a887; font-style: italic; }
  #main { display: flex; gap: 16px; align-items: flex-start; }
  #board-wrap {
    background: #060a12; border: 3px solid #5a4a2c; border-radius: 4px;
    box-shadow: 0 6px 18px rgba(0,0,0,0.5); line-height: 0; overflow: hidden;
  }
  canvas { display: block; cursor: grab; }
  canvas.grabbing { cursor: grabbing; }
  #side { width: 250px; flex: 0 0 250px; font-size: 14px; }
  .panel {
    background: #3a3220; border: 1px solid #6b5a3a; border-radius: 4px;
    padding: 12px 14px; margin-bottom: 12px;
  }
  .panel h2 {
    font-size: 13px; text-transform: uppercase; letter-spacing: 1.5px; color: #f0c66b;
    margin-bottom: 8px; border-bottom: 1px solid #6b5a3a; padding-bottom: 4px;
  }
  .stat { display: flex; justify-content: space-between; margin: 4px 0; }
  .rival { display: flex; justify-content: space-between; align-items: center; margin: 5px 0; font-size: 13px; }
  .rival .dot { display: inline-block; width: 11px; height: 11px; border-radius: 50%; margin-right: 7px; vertical-align: -1px; border: 1px solid #0006; }
  .rival.dead { opacity: .4; text-decoration: line-through; }
  #log { height: 120px; overflow-y: auto; font-size: 12.5px; line-height: 1.45; color: #d8cbab; }
  #log div { margin-bottom: 3px; }
  #log .hl { color: #f0c66b; }
  button {
    width: 100%; background: #6b5a3a; color: #f4ecd6; border: 1px solid #8a743f;
    padding: 11px; font-size: 15px; font-family: inherit; letter-spacing: 1px;
    cursor: pointer; border-radius: 4px; transition: background .15s;
  }
  button:hover { background: #86713f; }
  button.secondary { padding: 7px; font-size: 12px; margin-top: 8px; background: #4a3f28; }
  .legend { font-size: 12px; line-height: 1.7; color: #cfc19c; }
  .legend .sw { display: inline-block; width: 12px; height: 12px; border: 1px solid #00000055; vertical-align: -1px; margin-right: 6px; border-radius: 2px; }
  #hint { font-size: 12.5px; color: #b7a887; margin-top: 6px; min-height: 44px; font-style: italic; }

  #overlay { position: fixed; inset: 0; display: flex; align-items: center; justify-content: center; background: rgba(20,16,8,.88); z-index: 10; padding: 20px; }
  #overlay.hidden { display: none; }
  #overlay .card {
    background: #3a3220; border: 2px solid #f0c66b; border-radius: 6px;
    padding: 26px 30px; text-align: center; max-width: 500px; width: 100%;
  }
  #overlay h2 { color: #f0c66b; font-size: 30px; margin-bottom: 10px; letter-spacing: 2px; }
  #overlay p { color: #d8cbab; line-height: 1.5; margin-bottom: 8px; font-size: 14px; }
  .grp { margin: 16px 0 6px; text-align: left; }
  .grp > label { display: block; font-size: 12px; text-transform: uppercase; letter-spacing: 1.5px; color: #f0c66b; margin-bottom: 6px; }
  .btnrow { display: flex; gap: 8px; }
  .opt {
    flex: 1; background: #4a3f28; border: 1px solid #6b5a3a; color: #e6dcc0;
    padding: 9px 4px; font-family: inherit; font-size: 13px; cursor: pointer; border-radius: 4px;
    width: auto; letter-spacing: 0;
  }
  .opt.active { background: #f0c66b; color: #2b2519; border-color: #f0c66b; font-weight: bold; }
  .info { color: #b7a887; font-style: italic; font-size: 13px; margin: 12px 0 4px; }
  #ovBtn { margin-top: 14px; }

  /* Battle popup */
  #battleModal, #cityModal { position: fixed; inset: 0; display: flex; align-items: center; justify-content: center; background: rgba(12,9,4,.55); z-index: 12; padding: 20px; }
  #battleModal.hidden, #cityModal.hidden { display: none; }
  .bcard {
    position: relative;
    background: #241d12; border: 2px solid #8a743f; border-radius: 8px;
    padding: 20px 24px; width: 380px; max-width: 92vw; text-align: center;
    box-shadow: 0 8px 30px rgba(0,0,0,.6); cursor: pointer;
  }
  .bclose {
    position: absolute; top: 8px; right: 8px; width: 26px; height: 26px; padding: 0;
    background: #4a3f28; border: 1px solid #6b5a3a; color: #e6dcc0; border-radius: 4px;
    font-size: 18px; line-height: 22px; cursor: pointer; letter-spacing: 0;
  }
  .bclose:hover { background: #86713f; color: #fff; }
  .bttl { color: #f0c66b; letter-spacing: 2px; text-transform: uppercase; font-size: 13px; margin-bottom: 14px; }
  .brow { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
  .bside { flex: 1; }
  .bside .disc {
    width: 46px; height: 46px; margin: 0 auto 6px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center; font-size: 22px; color: #16130c;
    border: 2px solid #0006; transition: transform .2s, filter .2s;
  }
  .bside .who { font-size: 14px; font-weight: bold; }
  .bside .ut { font-size: 12px; color: #b7a887; }
  .bside.lose { opacity: .4; }
  .bside.lose .who { text-decoration: line-through; }
  .bside.win .disc { transform: scale(1.12); filter: drop-shadow(0 0 8px currentColor); }
  .bvs { font-size: 26px; color: #d8cbab; }
  .bbar { position: relative; height: 16px; margin: 14px 0 6px; background: #0d0b06; border: 1px solid #4a3f28; border-radius: 8px; overflow: hidden; }
  .bfill { position: absolute; inset: 0 auto 0 0; width: 0; transition: width .55s ease; }
  .bbar span { position: relative; font-size: 11px; line-height: 16px; color: #f4ecd6; text-shadow: 0 0 3px #000; letter-spacing: 1px; }
  .bresult { margin-top: 10px; font-size: 14px; color: #f0c66b; min-height: 20px; }
  .bskip { margin-top: 8px; font-size: 11px; color: #8a7d5c; font-style: italic; }

  /* City production panel */
  .ccard { background: #241d12; border: 2px solid #8a743f; border-radius: 8px; padding: 18px 20px; width: 340px; max-width: 92vw; }
  .ctitle { color: #f0c66b; letter-spacing: 2px; text-transform: uppercase; font-size: 13px; margin-bottom: 4px; }
  .cnow { font-size: 13px; color: #d8cbab; margin-bottom: 12px; }
  .cnow b { color: #f4ecd6; }
  .uopt {
    display: flex; align-items: center; gap: 10px; width: 100%; text-align: left;
    background: #33291a; border: 1px solid #5a4a2c; color: #e6dcc0; padding: 9px 11px;
    margin-bottom: 8px; border-radius: 5px; cursor: pointer; font-family: inherit; letter-spacing: 0;
  }
  .uopt:hover { background: #43371f; }
  .uopt.active { border-color: #f0c66b; background: #3f3316; }
  .uopt .glyph { width: 22px; height: 22px; flex: 0 0 22px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 13px; color: #16130c; }
  .uopt .uname { font-weight: bold; font-size: 14px; }
  .uopt .umeta { font-size: 11px; color: #b7a887; }
  #cClose { margin-top: 4px; }
