/* Dreamsz Mobile – eigene Gestaltung im Pergament-Stil (keine Spielgrafiken) */
:root {
  --bg: #2a2119; --frame: #e8dcb8; --frame2: #d9c79a;
  --bar1: #d9bb7c; --bar2: #b48f4f; --barline: #8a6a35;
  --paper: #f3e6c4; --paper2: #faf1dc; --row: #f6ebd0; --rowline: #e2d0a6;
  --ink: #3b2a14; --muted: #9c8a6a; --head1: #8a3510; --head2: #4e1b06;
  --btn: #6b4a26; --btn2: #4b3118; --ok: #2f6f2a; --bad: #b3261e; --warn: #a0640a;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { background: var(--frame); color: var(--ink); font: 14px/1.4 Verdana, "Segoe UI", sans-serif; }
button { font: inherit; cursor: pointer; }
input, select { font: inherit; }

/* Fensterrahmen */
.win { min-height: 100vh; display: flex; flex-direction: column; }
.win-top { background: linear-gradient(var(--bar1), var(--bar2)); border-bottom: 2px solid var(--barline); padding: 14px 20px; display: flex; align-items: center; gap: 10px; }
.win-title { font-weight: bold; font-size: 18px; color: #3b260c; flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pill { background: #1f2430; color: #fff; border: 0; border-radius: 7px; padding: 6px 12px; font-size: 12px; font-weight: bold; }
.pill:hover { background: #333a4a; }
.win-body { flex: 1; padding: 16px 20px 20px; background: linear-gradient(var(--frame), var(--frame2)); }
.tools { display: flex; gap: 6px; margin-bottom: 8px; }
.tool { background: linear-gradient(#e6cf98, #c9a663); border: 1px solid var(--barline); border-radius: 3px; padding: 2px 10px; min-width: 34px; }
.stage { background: var(--bg); border-radius: 10px; padding: 0 0 0; display: flex; justify-content: center; min-height: calc(100vh - 150px); }

/* Handy-Ansicht */
.phone { width: 100%; max-width: 470px; background: var(--paper); display: flex; flex-direction: column; height: calc(100vh - 150px); }
.ph-head { background: linear-gradient(#f0dcae, #d6b877); border-bottom: 3px double #7a4a1c; padding: 8px 10px 6px; }
.ph-title { display: flex; align-items: center; justify-content: center; position: relative; font-weight: bold; min-height: 30px; }
.ph-title .home { position: absolute; right: 0; top: 0; }
.res { display: flex; justify-content: space-around; font-weight: bold; margin-top: 4px; font-size: 13px; }
.res span.full { color: var(--bad); }
.ph-main { flex: 1; overflow-y: auto; background: linear-gradient(var(--paper), #eedcb2); }
.ph-nav { display: grid; grid-template-columns: repeat(8, 1fr); background: linear-gradient(#e0c387, #c8a35e); border-top: 3px double #7a4a1c; }
.ph-nav a { text-decoration: none; color: var(--ink); text-align: center; padding: 5px 0 4px; font-size: 10.5px; font-weight: bold; }
.ph-nav a .i { display: block; font-size: 19px; line-height: 22px; }
.ph-nav a.on { background: rgba(255, 255, 255, .35); }

.notice { margin: 8px; background: var(--paper2); border: 1px solid #c9ad74; border-radius: 4px; padding: 6px 8px; font-size: 12px; display: flex; justify-content: space-between; gap: 8px; }
.notice button { background: none; border: 0; color: var(--bad); font-weight: bold; font-size: 16px; line-height: 1; padding: 0 2px; }

.box { margin: 10px 12px; border: 1px solid #b98d4f; border-radius: 6px 6px 3px 3px; overflow: hidden; background: var(--paper2); }
.box > h3 { margin: 0; padding: 7px 10px; color: #fff; font-size: 14px; background: linear-gradient(var(--head1), var(--head2)); display: flex; justify-content: space-between; align-items: center; }
.box > .in { padding: 8px 10px; }
h2.page { margin: 12px 12px 6px; font-size: 16px; }

.list { list-style: none; margin: 0; padding: 0; }
.list li { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-bottom: 1px solid var(--rowline); background: var(--row); cursor: pointer; }
.list li:hover { background: #fbf2dc; }
.list li .ic { width: 28px; text-align: center; font-size: 20px; }
.list li .nm { font-weight: bold; flex: 1; }
.list li .lv { color: #5a4526; font-size: 13px; }
.list li.dim .nm, .list li.dim .lv, .list li.dim .ic { color: var(--muted); opacity: .75; }
.list li .tag { font-size: 11px; border-radius: 3px; padding: 1px 5px; background: #dfe9cf; color: var(--ok); }

.kv { display: grid; grid-template-columns: 26px 70px 1fr; row-gap: 4px; align-items: center; }
.kv b { font-weight: bold; }
.small { font-size: 12px; color: #6b5a3b; }
.bad { color: var(--bad); } .ok { color: var(--ok); } .warn { color: var(--warn); }
.cost { display: flex; gap: 12px; flex-wrap: wrap; font-weight: bold; }
.cost span.lack { color: var(--bad); }
.btn { background: linear-gradient(#7a5530, var(--btn2)); color: #fff; border: 1px solid #2e1d0c; border-radius: 4px; padding: 4px 10px; font-weight: bold; font-size: 13px; }
.btn.light { background: linear-gradient(#efe0bb, #d8bf88); color: var(--ink); border-color: #9a7a45; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

table.t { width: 100%; border-collapse: collapse; font-size: 13px; }
table.t td, table.t th { padding: 5px 6px; border-bottom: 1px solid var(--rowline); text-align: left; }
table.t th { font-size: 12px; color: #6b5a3b; }
table.t input { width: 64px; padding: 3px 5px; border: 1px solid #b59b6a; border-radius: 4px; background: #fffaf0; }

.units { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 8px; }
.units div { background: var(--row); padding: 5px 8px; display: flex; gap: 8px; align-items: center; }
.units div.zero { color: var(--muted); }
.units .ic { font-size: 18px; width: 24px; text-align: center; }

.game { border: 0; width: 100%; flex: 1; background: #fff; }
.village svg { display: block; width: 100%; height: auto; border-bottom: 3px double #7a4a1c; }
.timeline { list-style: none; margin: 0; padding: 0; font-size: 12.5px; }
.timeline li { display: grid; grid-template-columns: 58px 1fr auto; gap: 8px; padding: 4px 0; border-bottom: 1px dashed var(--rowline); }
.timeline li.key { font-weight: bold; }
.timeline .t { color: #6b5a3b; font-variant-numeric: tabular-nums; }

.mapgrid { display: grid; grid-template-columns: repeat(11, 1fr); gap: 1px; background: #5c6b2e; padding: 1px; margin: 8px 12px; }
.mapgrid div { aspect-ratio: 1; background: #7b8f3c; display: flex; align-items: center; justify-content: center; font-size: 13px; }
.mapgrid div.me { background: #f0e6c8; outline: 2px solid #fff; }
.mapgrid div.own { background: #e3b931; }
.mapgrid div.player { background: #8b4a1c; } .mapgrid div.barb { background: #9a9a8a; }
.mapgrid div { cursor: pointer; }
.legend { display: flex; gap: 12px; margin: 0 12px 6px; flex-wrap: wrap; }
.legend i { display: inline-block; width: 11px; height: 11px; margin-right: 4px; vertical-align: -1px; border: 1px solid #5c6b2e; }
.legend i.me { background: #f0e6c8; } .legend i.own { background: #e3b931; } .legend i.player { background: #8b4a1c; } .legend i.barb { background: #9a9a8a; }

/* Anmeldung / Accounts */
.center { max-width: 460px; margin: 30px auto; }
.form { display: grid; gap: 8px; }
.form input, .form select { padding: 7px 9px; border: 1px solid #b59b6a; border-radius: 5px; background: #fffaf0; }
.acc { display: flex; justify-content: space-between; align-items: center; }
.empty { padding: 18px 14px; color: #6b5a3b; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: #1f2430; color: #fff; padding: 9px 14px; border-radius: 8px; max-width: 90vw; font-size: 13px; z-index: 10; box-shadow: 0 4px 14px rgba(0, 0, 0, .35); }
.toast.err { background: #7d1b14; }

@media (max-width: 560px) {
  .win-top { padding: 10px; } .win-body { padding: 8px; } .pill { padding: 5px 8px; }
  .phone, .stage { height: auto; min-height: calc(100vh - 110px); }
  .ph-nav a { font-size: 9px; } .ph-nav a .i { font-size: 17px; }
}
