/* The farm wiki, in How to play and on the website (/wiki): a search box and topic tiles, then topic pages with short
   sections, fact lists and tables made from the game rules. */
.wiki{color:#3d392b;font-family:'DM Sans',sans-serif}
.wiki .game-art{display:inline-block;flex:none;width:22px;height:22px;object-fit:contain;vertical-align:-5px}
.wiki .game-art-sprite{aspect-ratio:1;background-color:transparent;background-image:var(--art-sheet);background-size:var(--art-size) var(--art-size);background-position:var(--art-position);background-repeat:no-repeat}
.wiki a{color:#3f6b4a;font-weight:700;text-decoration:none}
.wiki a:hover{text-decoration:underline}

/* Home: search and tiles */
.wiki-search{display:flex;align-items:center;gap:10px;min-height:52px;margin:0 0 14px;padding:0 14px;border:1px solid #e3d6c1;border-radius:14px;background:#fffdf5;box-shadow:inset 0 2px 0 #f1e9dc}
.wiki-search .game-art{width:26px;height:26px}
.wiki-search input{flex:1;min-width:0;height:48px;border:0;background:none;color:#3d392b;font:500 16px 'DM Sans',sans-serif;outline:none}
.wiki-search:focus-within{border-color:#c2912d;box-shadow:0 0 0 3px #f1dfb4}
.wiki-results{margin:-4px 0 16px;padding:6px;border:1px solid #e3d6c1;border-radius:14px;background:#fffdf5}
.wiki-results ul{display:grid;gap:2px;margin:0;padding:0;list-style:none}
.wiki-results a{display:grid;grid-template-columns:30px minmax(0,1fr) auto;align-items:center;gap:10px;padding:8px 10px;border-radius:10px;color:#3d392b}
.wiki-results a:hover{background:#f7f0e3;text-decoration:none}
.wiki-results a .game-art{width:28px;height:28px}
.wiki-results a span{color:#8a7a5a;font-size:12.5px;font-weight:600}
.wiki-results p{margin:8px 10px;color:#7a705f;font-size:14px}
.wiki-tiles{display:grid;grid-template-columns:repeat(auto-fill,minmax(210px,1fr));gap:10px}
.wiki-tiles.is-small{grid-template-columns:repeat(auto-fill,minmax(180px,1fr))}
.wiki .wiki-tile{display:grid;grid-template-columns:48px minmax(0,1fr);grid-template-rows:auto auto;column-gap:12px;row-gap:2px;align-items:center;padding:12px 14px;border:1px solid #e3d6c1;border-radius:14px;background:#fffdf5;box-shadow:0 3px 0 #ece2d0;color:#3d392b;transition:transform .12s,box-shadow .12s}
.wiki .wiki-tile:hover{transform:translateY(-2px);box-shadow:0 5px 0 #ece2d0;text-decoration:none}
.wiki .wiki-tile:active{transform:translateY(1px);box-shadow:0 1px 0 #ece2d0}
.wiki-tile .game-art{grid-row:1/3;width:46px;height:46px}
.wiki-tile strong{font:700 16px/1.2 'Outfit',sans-serif}
.wiki-tile span{color:#7a705f;font-size:12.5px;font-weight:500;line-height:1.35}
.wiki-note{margin:16px 0 0;color:#8a7a5a;font-size:13px;text-align:center}

/* A topic page */
.wiki-back{margin:0 0 12px}
.wiki-head{display:flex;align-items:center;gap:14px;margin:0 0 6px}
.wiki-head .game-art{width:60px;height:60px}
.wiki-head h3{margin:0;font:700 26px/1.1 'Outfit',sans-serif;letter-spacing:-.3px}
.wiki-head p{margin:4px 0 0;color:#7a705f;font-size:14px}
.wiki-section{margin:18px 0 0;padding:16px 0 0;border-top:1px solid #efe6d8}
.wiki-section h3{display:flex;align-items:center;gap:8px;margin:0 0 8px;font:700 18px/1.2 'Outfit',sans-serif}
.wiki-section h3 .game-art{width:32px;height:32px}
.wiki-section p{margin:0 0 10px;font-size:14.5px;line-height:1.6}
.wiki-meta{color:#7a705f}
.wiki-facts{display:grid;grid-template-columns:repeat(auto-fit,minmax(240px,1fr));gap:10px;margin:0;padding:0;list-style:none}
.wiki-facts li{display:grid;grid-template-columns:40px minmax(0,1fr);gap:10px;align-items:start;padding:12px;border:1px solid #eee5d6;border-radius:12px;background:#fffdf5}
.wiki-facts li>.game-art{width:38px;height:38px}
.wiki-facts strong{display:flex;flex-wrap:wrap;align-items:center;gap:6px;font-size:14.5px}
.wiki-facts p{margin:3px 0 0;color:#5d5641;font-size:13.5px;line-height:1.5}
.wiki-list{margin:0 0 10px;padding-left:20px;font-size:14.5px;line-height:1.6}
/* How to install the app (Getting started): between two fact cards, with room around it and between the steps. */
.wiki-app-steps{display:grid;gap:10px;margin:20px 0}
.wiki-level{display:inline-block;padding:2px 8px;border-radius:999px;background:#e6efdc;color:#42632e;font-size:11.5px;font-weight:800;white-space:nowrap;vertical-align:1px}
.wiki-level.is-locked{background:#f1ebe2;color:#8a7a5a}
.wiki-loop{display:flex;align-items:center;justify-content:space-between;gap:6px;margin:0 0 10px;padding:12px;border-radius:14px;background:#f7f0e3;list-style:none}
.wiki-loop li{display:grid;justify-items:center;gap:4px;font:700 14px 'Outfit',sans-serif}
.wiki-loop .game-art{width:44px;height:44px}
.wiki-arrow{color:#b3a283;font-size:22px;font-style:normal}
.wiki-chips{display:flex;flex-wrap:wrap;gap:6px;margin:0;padding:0;list-style:none}
.wiki-chips a{display:inline-flex;align-items:center;gap:6px;padding:5px 10px;border:1px solid #e3d6c1;border-radius:999px;background:#fffdf5;color:#5b4520;font-size:13px}
.wiki-building{scroll-margin-top:12px}

/* A topic's header: its own soft colour and a big picture. */
.wiki-hero{position:relative;display:flex;align-items:center;justify-content:space-between;gap:16px;margin:0 0 12px;padding:18px 18px 18px 20px;border-radius:18px;background:linear-gradient(135deg,var(--tint),#fffaf0 120%);overflow:hidden}
.wiki-hero h3{margin:0;font:700 27px/1.1 'Outfit',sans-serif;letter-spacing:-.3px;color:#3b2c12}
.wiki-hero p{margin:6px 0 0;color:#5d5641;font-size:14.5px;line-height:1.45}
.wiki-hero .game-art{width:86px;height:86px;flex:none;filter:drop-shadow(0 6px 10px #5a432022)}

/* The jump bar: a chip per section, staying at the top while you scroll. */
.wiki-jump{position:sticky;top:var(--wiki-sticky,0px);z-index:2;display:flex;gap:6px;margin:0 -2px 4px;padding:8px 2px;overflow-x:auto;background:#fffdf5;box-shadow:0 6px 8px -8px #5a432040;scrollbar-width:none}
.wiki-jump::-webkit-scrollbar{display:none}
.wiki .wiki-jump a{display:inline-flex;align-items:center;gap:6px;flex:none;min-height:34px;padding:4px 12px;border:1px solid #e3d6c1;border-radius:999px;background:#f7f0e3;color:#5b4520;font-size:13px;font-weight:700;white-space:nowrap}
.wiki .wiki-jump a:hover{background:#f0e5d1;text-decoration:none}
.wiki-jump .game-art{width:22px;height:22px}
.wiki-section{scroll-margin-top:calc(var(--wiki-sticky,0px) + 58px)}

/* On a phone the long tables become cards. */
.wiki-cards{display:none;gap:8px;margin:6px 0 4px;padding:0;list-style:none}
.wiki-card{display:grid;grid-template-columns:44px minmax(0,1fr);gap:10px;align-items:start;padding:10px 12px;border:1px solid #eee5d6;border-radius:12px;background:#fffdf5}
.wiki-card>.game-art{width:42px;height:42px}
.wiki-card strong{margin-right:6px;font:700 15px/1.3 'Outfit',sans-serif}
.wiki-card.is-locked>.game-art,.wiki-card.is-locked strong,.wiki-card.is-locked .wiki-stats{opacity:.55}
.wiki-stats{display:flex;flex-wrap:wrap;gap:4px;margin-top:6px}
.wiki-stats span{display:inline-flex;align-items:center;gap:4px;padding:2px 8px;border-radius:999px;background:#f3ecdf;color:#5d5641;font-size:12px;font-weight:700}
.wiki-stats .game-art{width:16px;height:16px}
.wiki-card small{display:block;margin-top:6px;color:#7a705f;font-size:12.5px;line-height:1.5}
.wiki-card small .wiki-item{margin-right:6px}

/* Home: groups, quick searches and the one to read first. */
.wiki-quick{display:flex;flex-wrap:wrap;gap:6px;margin:-4px 0 16px}
.wiki-quick button{min-height:32px;padding:4px 12px;border:1px solid #e3d6c1;border-radius:999px;background:#f7f0e3;color:#5b4520;font:700 13px 'DM Sans',sans-serif;cursor:pointer}
.wiki-quick button:hover{background:#f0e5d1}
.wiki-group{margin:0 0 18px}
.wiki-group>h3{margin:0 0 8px;color:#8a7a5a;font:800 11.5px/1.2 'DM Sans',sans-serif;letter-spacing:.08em;text-transform:uppercase}
.wiki .wiki-tile.is-featured{grid-column:1/-1;grid-template-columns:64px minmax(0,1fr);border-color:#b9d3a3;background:linear-gradient(135deg,#eef6e6,#fffdf5);box-shadow:0 3px 0 #cfe2bd}
.wiki-tile.is-featured .game-art{width:60px;height:60px}
.wiki-tile.is-featured strong{font-size:18px}
.wiki-tile.is-featured strong::after{content:'Read first';margin-left:8px;padding:2px 8px;border-radius:999px;background:#3f6b4a;color:#fffef3;font:800 10.5px/1.4 'DM Sans',sans-serif;letter-spacing:.04em;text-transform:uppercase;vertical-align:3px}

/* Tables: scroll sideways on a phone instead of squeezing. */
.wiki-table-wrap{overflow-x:auto;margin:6px 0 4px;border:1px solid #eee5d6;border-radius:12px;background:#fffdf5;-webkit-overflow-scrolling:touch}
/* Text, a list or cards under a table get the same room as under a paragraph. */
.wiki-table-wrap+:is(p,.wiki-list,.wiki-facts,.wiki-cards){margin-top:14px}
.wiki-table{width:100%;border-collapse:collapse;font-size:13.5px}
.wiki-table th{padding:9px 10px;background:#f7f0e3;color:#7a6a4a;font-size:11px;font-weight:800;letter-spacing:.05em;text-align:left;text-transform:uppercase;white-space:nowrap}
.wiki-table td{padding:8px 10px;border-top:1px solid #f1e9dc;vertical-align:middle}
.wiki-table td:first-child{font-weight:700;white-space:nowrap}
.wiki-table tr.is-locked td{opacity:.55}
.wiki-table tr.is-locked td:last-child,.wiki-table tr.is-locked .wiki-level{opacity:1}
.wiki-item{display:inline-flex;align-items:center;gap:5px;margin:2px 10px 2px 0;white-space:nowrap}
.wiki-crops td{white-space:nowrap}

.wiki-related{margin:24px 0 0;padding:16px 0 0;border-top:1px solid #efe6d8}
.wiki-related h3{margin:0 0 10px;font:700 18px 'Outfit',sans-serif}
.wiki-next-list{display:grid;grid-template-columns:repeat(auto-fill,minmax(200px,1fr));gap:8px}
.wiki .wiki-next{display:flex;align-items:center;gap:10px;min-height:52px;padding:6px 12px 6px 8px;border:1px solid #e3d6c1;border-radius:12px;background:#fffdf5;color:#3d392b}
.wiki .wiki-next:hover{background:#f7f0e3;text-decoration:none}
.wiki-next .game-art{width:34px;height:34px}
.wiki-next strong{flex:1;min-width:0;font:700 15px/1.2 'Outfit',sans-serif}
.wiki-next i{color:#b3a283;font-size:20px;font-style:normal}

@media(max-width:600px){
 .wiki-dual .wiki-table-wrap{display:none}.wiki-dual .wiki-cards{display:grid}
 .wiki-hero{padding:14px 14px 14px 16px}.wiki-hero h3{font-size:23px}.wiki-hero .game-art{width:64px;height:64px}
 .wiki-tiles{grid-template-columns:1fr}
 .wiki-head .game-art{width:48px;height:48px}.wiki-head h3{font-size:23px}
 .wiki-facts{grid-template-columns:1fr}
 .wiki-loop{padding:10px 8px}.wiki-loop .game-art{width:36px;height:36px}.wiki-loop li{font-size:12.5px}
}
@media(prefers-reduced-motion:reduce){.wiki .wiki-tile{transition:none}}

/* The website pages (/wiki): the privacy page's frame, a little wider for the tables. Lists keep the wiki's own spacing
   (the privacy page indents its lists), and bold text gets the real bold font. */
@font-face{font-family:'DM Sans';font-style:normal;font-weight:700;font-display:swap;src:url('/assets/fonts/dm-sans-bold.ttf') format('truetype')}
.wiki-page .wiki-facts,.wiki-page .wiki-chips,.wiki-page .wiki-next-list,.wiki-page .wiki-cards{margin-left:0;padding-left:0}
.wiki-page .wiki-facts li,.wiki-page .wiki-chips li,.wiki-page .wiki-cards li{margin:0}
.wiki-page .wiki-jump{margin:0 -8px 8px;padding:10px 8px}
.wiki-page .wiki-group>h3{margin-top:4px}
.wiki-page .legal-card{width:min(980px,calc(100% - 32px))}
.wiki-page .wiki-crumbs{margin:0 0 14px;font-size:14px}
.wiki-page .wiki-cta{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:12px;margin:24px 0 0;padding:16px;border-radius:14px;background:#eef5e6}
.wiki-page .wiki-cta p{margin:0;font-weight:700}
.wiki-page .wiki-cta a{display:inline-flex;align-items:center;min-height:44px;padding:0 18px;border:1px solid #2d5137;border-radius:12px;background:#3f6b4a;box-shadow:0 3px 0 #25462e;color:#fffef3;text-decoration:none}

/* "Back to my farm" under the wiki gets room to breathe. */
#help-dialog .guide-done{margin-top:24px}

/* The Avatars section: each avatar's small picture beside its name. */
.wiki-avatar{display:flex;align-items:center;gap:10px}.wiki-avatar>img{flex:0 0 auto;width:34px;height:36px;object-fit:contain;border-radius:9px;background:#eee6d6}
/* What opens when (wiki-content.js quests): every level's features, buildings, crops and recipes as small chips. */
.wiki-opens{display:flex;flex-wrap:wrap;gap:6px}
.wiki-open{display:inline-flex;align-items:center;gap:6px;padding:3px 9px 3px 4px;border:1px solid #eadfcd;border-radius:999px;background:#fffaf0;font-size:13px;line-height:1.3;color:#4a4232}
.wiki-open>.game-art{width:22px;height:22px;flex:none;object-fit:contain}
.wiki-open small{font-size:10.5px;letter-spacing:.3px;color:#9a8b74;text-transform:uppercase}
.wiki-opens-table td:first-child{width:1%;white-space:nowrap;vertical-align:top}
/* The daily gift's boost in its table: the picture and a short name (×2 XP), which fits beside four other columns on a phone. */
.wiki-boost{display:inline-flex;align-items:center;gap:4px;white-space:nowrap}
@media(max-width:560px){.wiki-boost>span{display:none}}
