/* =========================================================
   SCIENCE WORLD 2.0 — styles.css
   Theme: "Sunlit Farmhouse" (Stardew-adjacent: warm, cozy, clean)
   Notes:
   - Designed to be drop-in and broadly useful across pages.
   - Includes lots of common selectors/utilities so you’re not
     constantly adding one-off CSS later.
   ========================================================= */

/* ---- Fonts (cozy + readable; headings have a handmade feel) ---- */
@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@400;600;700;800&family=Baloo+2:wght@600;700;800&family=Pixelify+Sans:wght@500;600&display=swap');

/* ---- Theme Tokens ---- */
:root{
  --bg: #f3efe3;                 /* parchment */
  --bg-top: #f6f1e3;
  --panel: #ffffff;
  --panel-soft: #fbf6ea;
  --panel-tint: #fffdf8;

  --text: #3a2b1c;               /* cocoa */
  --muted: #6a5741;
  --muted-2: #8a775f;

  --border: #bfae8d;             /* warm wood line */
  --border-soft: rgba(0,0,0,0.06);
  --line: rgba(58,43,28,0.18);

  --accent: #5f8f3a;             /* sage */
  --accent-dark: #3f6b25;        /* deep sage */
  --accent-soft: rgba(95,143,58,0.18);

  --highlight: #d07a2f;          /* pumpkin */
  --warn: #b75b2a;
  --danger: #a3342c;
  --info: #2b6f88;

  --sky: #bfe0c6;                /* mint sky */
  --sky-dark: #9fcaa8;

  --nav: #efe4cd;                /* light tan */
  --nav-hover: #e0d1b2;

  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 16px;

  /* “pixel-ish” shadow lines (subtle) */
  --shadow-line: 0 3px 0 rgba(58,43,28,0.18);
  --shadow-line-sm: 0 2px 0 rgba(58,43,28,0.16);
  --shadow-soft: 0 10px 30px rgba(58,43,28,0.10);

  --focus: rgba(95, 143, 58, 0.35);

  --maxw: 1180px;
  --gap: 12px;
  --gap-lg: 18px;

  --font: 'Nunito', system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  --font-head: 'Baloo 2', 'Nunito', sans-serif;
  --font-pixel: 'Pixelify Sans', 'Baloo 2', sans-serif;
}

/* =========================================================
   BASE / RESET
   ========================================================= */

*{ box-sizing:border-box; }

html, body{
  height:100%;
}

body{
  margin:0;
  padding:0;
  font-family: var(--font);
  color: var(--text);
  line-height: 1.45;
  background:
    radial-gradient(circle at 18% 10%, rgba(255,255,255,0.55) 0, rgba(255,255,255,0) 45%),
    linear-gradient(var(--bg-top), var(--bg));
}

img, svg, video{
  max-width:100%;
  height:auto;
  display:block;
}

a{
  color: var(--accent);
  text-decoration:none;
  font-weight:800;
}
a:hover{
  color: var(--accent-dark);
  text-decoration: underline;
}
a:visited{ color: var(--accent); }

p{ margin: 0 0 12px 0; }
small{ color: var(--muted); }

hr{
  border:0;
  height:1px;
  background: rgba(0,0,0,0.08);
  margin: 18px 0;
}

code, pre{
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
}
pre{
  background: var(--panel-soft);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 12px;
  overflow:auto;
}

/* =========================================================
   LAYOUT CONTAINERS
   ========================================================= */

.container{
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 16px;
}

main{
  padding: 20px 0;
}

.page{
  min-height: calc(100vh - 140px);
}

.row{
  display:flex;
  gap: var(--gap);
  flex-wrap: wrap;
}

.col{
  flex:1 1 0;
  min-width: 260px;
}

.stack{
  display:flex;
  flex-direction: column;
  gap: var(--gap);
}

.spacer{ height: 12px; }
.spacer-lg{ height: 22px; }

/* =========================================================
   HEADER
   ========================================================= */

header{
  background: linear-gradient(var(--sky), var(--sky-dark));
  padding: 22px 0;
  border-bottom: 4px solid rgba(58,43,28,0.25);
}

header .container{
  display:flex;
  gap: 16px;
  align-items:center;
  justify-content: space-between;
  flex-wrap: wrap;
}

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

.header-image{
  width: 96px;
  height: 96px;
  border-radius: var(--radius);
  object-fit: cover;
  box-shadow: var(--shadow-line-sm);
  border: 2px solid rgba(0,0,0,0.06);
  background: rgba(255,255,255,0.35);
}

header h1{
  margin:0;
  font-family: var(--font-head);
  font-size: 2.6rem;
  letter-spacing: 0.4px;
  color: #2f4f2f;
  text-shadow: 0 2px 0 rgba(255,255,255,0.35);
}

header .subtitle{
  margin-top: 2px;
  color: rgba(47,79,47,0.85);
  font-weight: 700;
}

.header-actions{
  display:flex;
  align-items:center;
  gap: 10px;
  flex-wrap: wrap;
}

/* =========================================================
   NAV
   ========================================================= */

nav{
  background: linear-gradient(#f3e8d4, var(--nav));
  border-bottom: 3px solid rgba(58,43,28,0.22);
}

nav .container{
  display:flex;
  align-items:center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  padding: 10px 16px;
}

nav ul{
  list-style:none;
  padding:0;
  margin:0;
  display:flex;
  gap: 6px;
  flex-wrap: wrap;
}

nav li{
  position:relative;
}

nav a{
  display:inline-flex;
  align-items:center;
  gap: 8px;
  font-family: var(--font-head);
  color: var(--text);
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  transition: background-color .18s ease, transform .18s ease, box-shadow .18s ease;
  text-decoration:none;
  font-weight: 800;
}

nav li:hover > a{
  background: var(--nav-hover);
  transform: translateY(-1px);
  box-shadow: 0 2px 0 rgba(58,43,28,0.14);
}

/* Dropdown menu */
nav li ul{
  display:none;
  position:absolute;
  top: 100%;
  left: 0;
  width: 220px;
  padding: 6px;
  margin: 6px 0 0 0;
  background: var(--nav);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-line-sm);
  border: 1px solid rgba(0,0,0,0.06);
  z-index: 9999;
}
nav li:hover ul{ display:block; }
nav li ul li{ display:block; }
nav li ul a{
  width:100%;
  justify-content:flex-start;
  padding: 10px 12px;
  border-radius: 6px;
}
nav li ul a:hover{ background: var(--nav-hover); }

/* Optional: active nav link */
nav a.active{
  background: rgba(95,143,58,0.18);
  box-shadow: inset 0 0 0 2px rgba(95,143,58,0.25);
}

/* =========================================================
   SECTIONS / CARDS
   ========================================================= */

section, .card{
  background: linear-gradient(var(--panel), var(--panel-tint));
  border-radius: var(--radius);
  box-shadow: var(--shadow-line);
  border: 1px solid var(--border-soft);
  padding: 15px;
}

.card.soft{
  background: linear-gradient(var(--panel), var(--panel-soft));
}

.card.shadow{
  box-shadow: var(--shadow-soft);
}

.card-header{
  display:flex;
  align-items:flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.card-title, section h2{
  font-family: var(--font-pixel);
  color: var(--accent-dark);
  font-size: 1.9rem;
  margin: 0 0 8px 0;
  letter-spacing: 0.2px;
}

.card-subtitle{
  color: var(--muted);
  font-weight: 700;
  margin-top: -2px;
}

.card-body{ margin-top: 10px; }
.card-footer{
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px dashed rgba(0,0,0,0.12);
}

/* =========================================================
   TYPOGRAPHY HELPERS
   ========================================================= */

h1,h2,h3,h4{
  line-height: 1.15;
}

h3{
  font-family: var(--font-head);
  margin: 10px 0 8px 0;
  color: var(--text);
}

h4{
  font-family: var(--font-head);
  margin: 10px 0 6px 0;
  color: var(--muted);
}

.lead{
  font-size: 1.05rem;
  color: var(--muted);
  font-weight: 700;
}

.yellowtext{
  color: var(--highlight);
  font-weight: 800;
}

.muted{ color: var(--muted); }
.center{ text-align:center; }
.right{ text-align:right; }

.kicker{
  display:inline-block;
  font-family: var(--font-head);
  font-weight: 800;
  color: var(--muted);
  background: rgba(239,228,205,0.75);
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid rgba(0,0,0,0.05);
}

/* =========================================================
   GRID SYSTEMS (keeps your existing ones + adds extras)
   ========================================================= */

.grid{
  display:grid;
  gap: var(--gap);
}

.grid-2{ grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3{ grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4{ grid-template-columns: repeat(4, minmax(0, 1fr)); }

.grid-container{
  display:grid;
  align-items:start;
  gap: var(--gap);
  padding: 10px;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
}

.grid-item{
  background: linear-gradient(var(--panel), var(--panel-soft));
  padding: 12px;
  border-radius: var(--radius);
  box-shadow: var(--shadow-line-sm);
  border: 1px solid var(--border-soft);
}

.grid-container-quest{
  display:grid;
  align-items:start;
  gap: var(--gap);
  padding: 10px;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
}

.grid-item-quest{
  background: linear-gradient(var(--panel), var(--panel-soft));
  padding: 12px;
  border-radius: var(--radius);
  box-shadow: var(--shadow-line-sm);
  border: 1px solid var(--border-soft);
  width: auto;
}

.grid-item-questimage{
  width: 350px;
  background: transparent;
  padding: 10px;
  border: 0;
}

/* Responsive grids */
@media (max-width: 900px){
  .grid-4{ grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-3{ grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 600px){
  .grid-4, .grid-3, .grid-2{ grid-template-columns: 1fr; }
  .grid-container, .grid-container-quest{ grid-template-columns: 1fr; }
  .grid-item-questimage{
    width: 100%;
    max-width: 350px;
    margin: 0 auto;
  }
}

/* =========================================================
   BUTTONS
   ========================================================= */

button, .btn{
  font-family: var(--font);
  font-weight: 800;
  border: none;
  border-radius: 10px;
  padding: 10px 14px;
  cursor: pointer;
  transition: transform .12s ease, filter .12s ease, box-shadow .12s ease;
  box-shadow: var(--shadow-line-sm);
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap: 8px;
  text-decoration:none;
  user-select:none;
}

.btn-primary, button.primary{
  background: linear-gradient(#74a84b, var(--accent));
  color: #fff;
}
.btn-primary:hover, button.primary:hover{ transform: translateY(-1px); filter: brightness(0.98); }
.btn-primary:active, button.primary:active{ transform: translateY(0); }

.btn-secondary, button.secondary{
  background: linear-gradient(#f3e8d4, var(--nav));
  color: var(--text);
  border: 1px solid rgba(0,0,0,0.08);
}
.btn-secondary:hover, button.secondary:hover{
  transform: translateY(-1px);
  filter: brightness(0.99);
}
.btn-secondary:active, button.secondary:active{ transform: translateY(0); }

.btn-danger, button.danger{
  background: linear-gradient(#c9554d, var(--danger));
  color:#fff;
}
.btn-danger:hover, button.danger:hover{ transform: translateY(-1px); filter: brightness(0.98); }

.btn-ghost{
  background: transparent;
  color: var(--text);
  box-shadow: none;
  border: 1px dashed rgba(0,0,0,0.18);
}
.btn-ghost:hover{ background: rgba(239,228,205,0.55); }

.btn-sm{ padding: 7px 10px; border-radius: 8px; font-weight: 800; }
.btn-lg{ padding: 12px 16px; border-radius: 12px; }

.btn:disabled, button:disabled{
  opacity: 0.55;
  cursor: not-allowed;
  transform: none !important;
  filter: none !important;
}

/* Button groups */
.btn-group{
  display:inline-flex;
  gap: 8px;
  flex-wrap: wrap;
}

/* =========================================================
   FORMS
   ========================================================= */

label{
  display:block;
  font-weight: 800;
  color: var(--muted);
  margin: 10px 0 6px 0;
}

input, select, textarea{
  width: 100%;
  font-family: var(--font);
  background: var(--panel-soft);
  color: var(--text);
  border: 1px solid rgba(0,0,0,0.12);
  border-radius: 10px;
  padding: 10px 12px;
  outline:none;
  transition: box-shadow .15s ease, border-color .15s ease, transform .10s ease;
}

textarea{ min-height: 110px; resize: vertical; }

input:focus, select:focus, textarea:focus{
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--focus);
}

input[readonly], textarea[readonly]{
  background: rgba(239,228,205,0.55);
  cursor: default;
}

/* Inline form rows */
.form-row{
  display:flex;
  gap: var(--gap);
  flex-wrap: wrap;
}
.form-row > *{ flex: 1 1 220px; }

/* Help text + errors */
.help{
  color: var(--muted-2);
  font-size: 0.95rem;
  margin-top: 6px;
}
.error{
  color: var(--danger);
  font-weight: 800;
}
.success{
  color: var(--accent-dark);
  font-weight: 800;
}

/* Checkbox / radio styling (simple, consistent) */
.field{
  display:flex;
  align-items:center;
  gap: 10px;
  margin: 8px 0;
}
.field input[type="checkbox"],
.field input[type="radio"]{
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
}

/* =========================================================
   TABLES
   ========================================================= */

table{
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: var(--panel);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-line-sm);
  border: 1px solid var(--border-soft);
}

th, td{
  padding: 10px 12px;
  border-bottom: 1px solid rgba(0,0,0,0.06);
  text-align: left;
  vertical-align: top;
}

th{
  background: var(--nav);
  font-family: var(--font-head);
  color: var(--text);
}

tr:last-child td{ border-bottom:none; }

tr:hover td{
  background: rgba(239,228,205,0.35);
}

.table-compact th, .table-compact td{ padding: 8px 10px; }

/* =========================================================
   BADGES / PILLS / TAGS
   ========================================================= */

.badge{
  display:inline-flex;
  align-items:center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-weight: 900;
  font-size: 0.92rem;
  border: 1px solid rgba(0,0,0,0.06);
  background: rgba(239,228,205,0.75);
  color: var(--text);
}

.badge.green{ background: rgba(95,143,58,0.18); color: var(--accent-dark); }
.badge.orange{ background: rgba(208,122,47,0.18); color: var(--warn); }
.badge.red{ background: rgba(163,52,44,0.16); color: var(--danger); }
.badge.blue{ background: rgba(43,111,136,0.14); color: var(--info); }

/* =========================================================
   ALERTS / CALLOUTS
   ========================================================= */

.alert{
  padding: 12px 14px;
  border-radius: var(--radius);
  border: 1px solid rgba(0,0,0,0.06);
  box-shadow: var(--shadow-line-sm);
  background: rgba(239,228,205,0.65);
  color: var(--text);
}

.alert.success{
  background: rgba(95,143,58,0.18);
  border-color: rgba(95,143,58,0.20);
  color: var(--accent-dark);
  font-weight: 800;
}

.alert.warn{
  background: rgba(208,122,47,0.16);
  border-color: rgba(208,122,47,0.22);
  color: var(--warn);
  font-weight: 800;
}

.alert.danger{
  background: rgba(163,52,44,0.14);
  border-color: rgba(163,52,44,0.22);
  color: var(--danger);
  font-weight: 800;
}

.alert.info{
  background: rgba(43,111,136,0.14);
  border-color: rgba(43,111,136,0.20);
  color: var(--info);
  font-weight: 800;
}

/* =========================================================
   IMAGES (your existing selectors + nicer defaults)
   ========================================================= */

.zoom-image{
  transition: transform .2s ease, filter .2s ease;
}
.zoom-image:hover{
  transform: scale(1.05);
  filter: saturate(1.02);
}

.roundedimg, .roundedcenterimg{
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-line-sm);
  border: 1px solid rgba(0,0,0,0.06);
  transition: transform .2s ease, filter .2s ease;
}
.roundedimg:hover, .roundedcenterimg:hover{
  transform: scale(1.03);
  filter: saturate(1.02);
}
.roundedcenterimg{
  margin-left:auto;
  margin-right:auto;
}

/* =========================================================
   LISTS
   ========================================================= */

ul.clean{
  list-style:none;
  padding:0;
  margin:0;
}

ul.bullets{
  margin: 8px 0 12px 18px;
}

li{ margin: 6px 0; }

/* =========================================================
   TABS
   ========================================================= */

.tabs{
  display:flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.tab{
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(239,228,205,0.75);
  border: 1px solid rgba(0,0,0,0.06);
  font-weight: 900;
  cursor:pointer;
  user-select:none;
}
.tab.active{
  background: rgba(95,143,58,0.18);
  color: var(--accent-dark);
  border-color: rgba(95,143,58,0.20);
}

/* =========================================================
   PROGRESS / METERS (HP/energy bars, etc.)
   ========================================================= */

.meter{
  width:100%;
  height: 14px;
  border-radius: 999px;
  background: rgba(0,0,0,0.06);
  overflow:hidden;
  border: 1px solid rgba(0,0,0,0.06);
}

.meter > .fill{
  height: 100%;
  width: 50%;
  background: linear-gradient(#74a84b, var(--accent));
  border-radius: 999px;
  transition: width .25s ease;
}

.meter.energy > .fill{
  background: linear-gradient(#f2c36a, var(--highlight));
}
.meter.health > .fill{
  background: linear-gradient(#d85d55, var(--danger));
}

/* Numbers beside meters */
.meter-row{
  display:flex;
  align-items:center;
  gap: 10px;
}
.meter-label{
  font-weight: 900;
  color: var(--muted);
  min-width: 80px;
}
.meter-value{
  font-weight: 900;
  color: var(--muted);
  min-width: 48px;
  text-align:right;
}

/* =========================================================
   MODALS (simple, usable)
   ========================================================= */

.modal-backdrop{
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.35);
  display:none;
  align-items:center;
  justify-content:center;
  padding: 16px;
  z-index: 10000;
}
.modal-backdrop.show{ display:flex; }

.modal{
  width: min(720px, 100%);
  background: linear-gradient(var(--panel), var(--panel-tint));
  border-radius: var(--radius-lg);
  border: 1px solid rgba(0,0,0,0.08);
  box-shadow: 0 18px 60px rgba(0,0,0,0.25);
  overflow:hidden;
}

.modal-header{
  padding: 14px 16px;
  background: rgba(239,228,205,0.85);
  border-bottom: 1px solid rgba(0,0,0,0.06);
  display:flex;
  align-items:center;
  justify-content: space-between;
  gap: 10px;
}

.modal-title{
  font-family: var(--font-head);
  font-size: 1.2rem;
  font-weight: 900;
  margin:0;
  color: var(--text);
}

.modal-body{ padding: 16px; }
.modal-footer{
  padding: 12px 16px;
  border-top: 1px solid rgba(0,0,0,0.06);
  display:flex;
  gap: 10px;
  justify-content: flex-end;
  flex-wrap: wrap;
}

/* =========================================================
   TOASTS (for “Saved!” / “You found 3 gold”)
   ========================================================= */

.toast-wrap{
  position: fixed;
  right: 16px;
  bottom: 16px;
  display:flex;
  flex-direction: column;
  gap: 10px;
  z-index: 10001;
}

.toast{
  min-width: 260px;
  max-width: 360px;
  background: linear-gradient(var(--panel), var(--panel-tint));
  border-radius: var(--radius);
  border: 1px solid rgba(0,0,0,0.08);
  box-shadow: 0 10px 30px rgba(0,0,0,0.18);
  padding: 10px 12px;
  display:flex;
  gap: 10px;
  align-items:flex-start;
}
.toast .dot{
  width: 10px;
  height: 10px;
  border-radius: 999px;
  margin-top: 6px;
  background: var(--accent);
}
.toast.warn .dot{ background: var(--highlight); }
.toast.danger .dot{ background: var(--danger); }
.toast.info .dot{ background: var(--info); }

.toast .title{
  font-weight: 900;
  margin:0;
}
.toast .msg{
  margin: 2px 0 0 0;
  color: var(--muted);
  font-weight: 700;
  font-size: 0.95rem;
}

/* =========================================================
   TOOLBAR / TOP STRIP (optional)
   ========================================================= */

.toolbar{
  display:flex;
  gap: 10px;
  align-items:center;
  justify-content: space-between;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.toolbar-left, .toolbar-right{
  display:flex;
  gap: 10px;
  align-items:center;
  flex-wrap: wrap;
}

/* =========================================================
   MAP / TILE HELPERS (anticipating your overworld UI)
   ========================================================= */

.map-wrap{
  display:flex;
  gap: var(--gap-lg);
  align-items:flex-start;
  flex-wrap: wrap;
}

.map-panel{
  flex: 1 1 560px;
  min-width: 320px;
}

.side-panel{
  flex: 0 0 320px;
  min-width: 280px;
}

.map-grid{
  display:grid;
  gap: 2px;
  background: rgba(58,43,28,0.18);
  padding: 6px;
  border-radius: var(--radius);
  box-shadow: var(--shadow-line-sm);
  border: 1px solid rgba(0,0,0,0.06);
  overflow:auto;
}

.tile{
  width: 40px;
  height: 40px;
  border-radius: 6px;
  background: rgba(0,0,0,0.06);
  border: 1px solid rgba(0,0,0,0.06);
  display:flex;
  align-items:center;
  justify-content:center;
  cursor:pointer;
  position:relative;
  user-select:none;
  transition: transform .08s ease, filter .08s ease, box-shadow .08s ease;
}

.tile:hover{
  transform: translateY(-1px);
  filter: brightness(1.02);
  box-shadow: 0 2px 0 rgba(58,43,28,0.12);
}

.tile.fog{
  background: #2a2a2a;
  border-color: rgba(0,0,0,0.35);
  box-shadow: inset 0 0 0 2px rgba(0,0,0,0.18);
  cursor:not-allowed;
}
.tile.fog:hover{ transform:none; box-shadow: inset 0 0 0 2px rgba(0,0,0,0.18); }

.tile .marker{
  position:absolute;
  inset: 6px;
  border-radius: 6px;
  border: 2px solid rgba(255,255,255,0.45);
  pointer-events:none;
  opacity:0;
}
.tile.current .marker{ opacity:1; }

/* =========================================================
   FOOTER
   ========================================================= */

footer{
  background: var(--nav);
  color: var(--text);
  text-align:center;
  padding: 10px 16px;
  border-top: 3px solid rgba(58,43,28,0.22);
}

/* =========================================================
   UTILITIES
   ========================================================= */

.hidden{ display:none !important; }
.inline{ display:inline !important; }
.block{ display:block !important; }

.mt0{ margin-top:0 !important; }
.mb0{ margin-bottom:0 !important; }
.mt1{ margin-top:8px !important; }
.mb1{ margin-bottom:8px !important; }
.mt2{ margin-top:14px !important; }
.mb2{ margin-bottom:14px !important; }

.p0{ padding:0 !important; }
.p1{ padding:8px !important; }
.p2{ padding:14px !important; }

.rounded{ border-radius: var(--radius) !important; }
.rounded-sm{ border-radius: var(--radius-sm) !important; }

.shadow{ box-shadow: var(--shadow-line) !important; }
.shadow-sm{ box-shadow: var(--shadow-line-sm) !important; }

.divider{
  height:1px;
  background: rgba(0,0,0,0.08);
  margin: 12px 0;
}

.clickable{ cursor:pointer; }
.no-select{ user-select:none; }

/* =========================================================
   ACCESSIBILITY
   ========================================================= */

:focus-visible{
  outline: 4px solid var(--focus);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce){
  *{
    transition: none !important;
    scroll-behavior: auto !important;
  }
}

/* =========================================================
   MOBILE TWEAKS
   ========================================================= */

@media (max-width: 600px){
  header h1{ font-size: 2.1rem; }
  .header-image{ width: 72px; height: 72px; }
  nav a{ padding: 8px 12px; }
  .map-wrap{ flex-direction: column; }
  .side-panel{ width: 100%; }
}

/* Character name styling (global, reusable) */
.sw2-character-name {
  font-size: clamp(2.4rem, 4vw, 2.8rem);
  font-weight: 900;
  letter-spacing: -0.02em;
  line-height: 2.05;
}

.sw2-character-name--small {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.015em;
}

/* ===== Coordinates overlay toggle (global) ===== */
body.coords-off .sw2-coords { display: none !important; }

.coords-toggle-btn{
  display:inline-flex;
  align-items:center;
  gap:8px;
}
