:root{--bg:#fffaf5;--card:#fff;--ink:#261a13;--muted:#806f64;--line:#eadfd7;--accent:#f97316;--accent2:#fff0e5;--shadow:0 10px 30px rgba(78,46,25,.09)}*{box-sizing:border-box}html{background:var(--bg)}body{margin:0;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;background:var(--bg);color:var(--ink);padding-bottom:92px}.topbar{position:sticky;top:0;z-index:10;padding:calc(14px + env(safe-area-inset-top)) 18px 12px;display:flex;align-items:center;justify-content:space-between;background:rgba(255,250,245,.94);backdrop-filter:blur(16px);border-bottom:1px solid rgba(234,223,215,.7)}.eyebrow{font-size:10px;letter-spacing:2px;color:var(--accent);font-weight:800}.topbar h1{margin:1px 0 0;font-size:29px;line-height:1}.round{width:44px;height:44px;border:0;border-radius:50%;font-size:27px;background:var(--accent);color:#fff;box-shadow:var(--shadow)}main{max-width:900px;margin:auto;padding:14px 16px}.searchWrap{height:48px;background:#fff;border:1px solid var(--line);border-radius:16px;display:flex;align-items:center;padding:0 14px;gap:9px}.searchWrap span{font-size:25px;color:var(--muted)}.searchWrap input{border:0;outline:0;width:100%;font-size:16px;background:transparent}.chips{display:flex;gap:8px;overflow:auto;padding:13px 0 4px;scrollbar-width:none}.chip{white-space:nowrap;border:1px solid var(--line);background:#fff;border-radius:99px;padding:8px 13px;color:var(--muted);font-weight:650}.chip.active{background:var(--ink);border-color:var(--ink);color:#fff}.hero{margin:15px 0 22px;padding:22px;border-radius:24px;background:linear-gradient(135deg,#472713,#8a4317);color:#fff;display:flex;justify-content:space-between;align-items:center;box-shadow:var(--shadow)}.hero h2{font-size:25px;margin:9px 0 6px;max-width:420px}.hero p{opacity:.82;margin:0 0 16px}.hero button{border:0;border-radius:12px;padding:10px 14px;font-weight:750;background:#fff;color:#4b2a17}.heroEmoji{font-size:68px;filter:drop-shadow(0 8px 8px #0004)}.pill{display:inline-block;background:#ffffff20;border:1px solid #ffffff30;border-radius:99px;padding:6px 9px;font-size:12px}.sectionTitle{display:flex;justify-content:space-between;align-items:baseline}.sectionTitle h2{font-size:20px}.sectionTitle span{color:var(--muted);font-size:13px}.grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:13px}.card{background:var(--card);border:1px solid var(--line);border-radius:20px;overflow:hidden;box-shadow:0 4px 14px rgba(78,46,25,.05);cursor:pointer}.cardTop{height:115px;display:grid;place-items:center;font-size:55px;background:linear-gradient(145deg,#fff2e7,#f9e0cc);position:relative}.favBtn{position:absolute;right:9px;top:9px;border:0;background:#fff;width:34px;height:34px;border-radius:50%;font-size:19px}.cardBody{padding:13px}.card h3{font-size:16px;margin:0 0 7px}.meta{color:var(--muted);font-size:12px;display:flex;gap:8px;flex-wrap:wrap}.made{margin-top:9px;font-size:11px;color:#6f5d52}.bottomNav{position:fixed;z-index:20;bottom:0;left:0;right:0;height:calc(69px + env(safe-area-inset-bottom));padding-bottom:env(safe-area-inset-bottom);background:rgba(255,255,255,.96);backdrop-filter:blur(16px);border-top:1px solid var(--line);display:flex;justify-content:space-around}.bottomNav button{border:0;background:transparent;color:#8c7a6f;min-width:90px;font-size:11px;font-weight:700}.bottomNav button span{display:block;font-size:25px;line-height:30px}.bottomNav .active{color:var(--accent)}.back{border:0;background:#fff;border:1px solid var(--line);border-radius:12px;padding:9px 12px;font-weight:700}.detailHero{text-align:center;padding:18px 10px}.detailEmoji{font-size:82px}.detailHero h2{font-size:30px;margin:8px 0}.detailMeta{display:flex;justify-content:center;gap:8px;flex-wrap:wrap}.detailMeta span{background:#fff;border:1px solid var(--line);padding:7px 10px;border-radius:99px;font-size:12px}.actionRow{display:grid;grid-template-columns:1fr 1fr 1fr;gap:8px;margin:12px 0 22px}.actionRow button{padding:11px 5px;border-radius:13px;border:1px solid var(--line);background:#fff;font-weight:700}.actionRow .madeBtn{background:var(--accent);color:#fff;border-color:var(--accent)}.panel{background:#fff;border:1px solid var(--line);border-radius:20px;padding:18px;margin:12px 0}.panel h3{margin-top:0}.ingredients{list-style:none;padding:0;margin:0}.ingredients li{padding:10px 0;border-bottom:1px solid #f2e9e3}.ingredients li:last-child{border:0}.steps{padding-left:28px}.steps li{padding:0 0 17px 5px;line-height:1.5}.empty{text-align:center;padding:50px 20px;color:var(--muted)}.empty div{font-size:60px}dialog{width:min(94vw,600px);max-height:90vh;border:0;border-radius:24px;padding:0;box-shadow:0 20px 70px #0004}dialog::backdrop{background:#2b160c88;backdrop-filter:blur(3px)}form{padding:20px;overflow:auto}.dialogHead{display:flex;justify-content:space-between;align-items:center}.dialogHead h2{margin:0 0 12px}.dialogHead button{border:0;background:transparent;font-size:30px}label{display:block;font-weight:700;font-size:13px;margin:11px 0}input,select,textarea{width:100%;margin-top:6px;border:1px solid #d9ccc3;border-radius:12px;padding:11px;font:inherit;background:#fff}textarea{resize:vertical}.two{display:grid;grid-template-columns:1fr 1fr;gap:10px}.primary{width:100%;padding:14px;border:0;border-radius:14px;background:var(--accent);color:#fff;font-weight:800;font-size:16px}.danger{border-color:#ffd5cf!important;color:#b42318!important}small{font-weight:400;color:var(--muted)}@media(min-width:700px){.grid{grid-template-columns:repeat(3,1fr)}.cardTop{height:145px}}@media(max-width:390px){.heroEmoji{font-size:48px}.hero{padding:18px}.hero h2{font-size:21px}}

/* Authentication */
.loginView{
  min-height:100dvh;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:24px;
  background:
    radial-gradient(circle at top right,rgba(249,115,22,.16),transparent 38%),
    #fffaf6;
}
.loginView[hidden]{display:none}
.loginCard{
  width:min(100%,420px);
  background:#fff;
  border:1px solid #f1e6dc;
  border-radius:28px;
  padding:32px 24px;
  box-shadow:0 18px 55px rgba(72,38,15,.12);
}
.loginLogo{
  width:72px;
  height:72px;
  display:grid;
  place-items:center;
  border-radius:22px;
  background:#fff1e7;
  font-size:38px;
  margin-bottom:20px;
}
.loginCard h1{
  margin:3px 0 8px;
  font-size:34px;
}
.loginIntro{
  margin:0 0 24px;
  color:#76685d;
}
.loginCard label{
  display:block;
  margin:0 0 16px;
  font-weight:700;
}
.loginCard input{
  box-sizing:border-box;
  width:100%;
  margin-top:7px;
  padding:14px 15px;
  border:1px solid #ddcfc4;
  border-radius:14px;
  background:#fff;
  color:#241c17;
  font:inherit;
  outline:none;
}
.loginCard input:focus{
  border-color:#f97316;
  box-shadow:0 0 0 3px rgba(249,115,22,.12);
}
.loginButton{
  width:100%;
  margin-top:4px;
}
.loginError{
  margin:0 0 14px;
  padding:11px 13px;
  border-radius:12px;
  background:#fff0f0;
  color:#b42318;
  font-size:14px;
}
.topActions{
  display:flex;
  align-items:center;
  gap:8px;
}
.logoutBtn{
  border:0;
  background:#f5eee8;
  color:#6f5d50;
  border-radius:999px;
  padding:9px 12px;
  font-weight:700;
  cursor:pointer;
}

/* ============================================================
   MULTI-USER / SHARING UI
   ============================================================ */

.recipeScopeTabs {
  display: flex;
  gap: 6px;
  padding: 5px;
  margin: 0 0 14px;
  background: #f1f1ed;
  border-radius: 14px;
}

.scopeTab {
  flex: 1;
  border: 0;
  border-radius: 10px;
  padding: 10px 8px;
  background: transparent;
  font: inherit;
  font-weight: 700;
  color: #687169;
}

.scopeTab.active {
  background: #fff;
  color: #405448;
  box-shadow: 0 2px 8px rgba(0,0,0,.08);
}

.sharingField {
  border: 1px solid #deded8;
  border-radius: 14px;
  padding: 12px;
  margin: 14px 0;
}

.sharingField legend {
  padding: 0 6px;
  font-weight: 800;
}

.shareChoice {
  display: flex !important;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 4px;
  cursor: pointer;
}

.shareChoice input {
  width: auto !important;
  margin-top: 3px;
}

.shareChoice span {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.shareChoice small {
  color: #737b75;
  font-weight: 400;
}

.sharePeople {
  padding: 8px 4px 2px 30px;
}

.sharePerson {
  display: flex !important;
  align-items: center;
  gap: 9px;
  padding: 7px 0;
}

.sharePerson input {
  width: auto !important;
}

.recipeOwner {
  font-size: .82rem;
  color: #737b75;
  margin-top: 4px;
}

.shareBadge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 4px 8px;
  font-size: .75rem;
  font-weight: 700;
  background: #eef2ee;
  color: #526458;
}

.dangerButton {
  border: 1px solid #d7b6b6;
  background: #fff;
  color: #a53535;
  border-radius: 10px;
  padding: 10px 14px;
  font: inherit;
  font-weight: 700;
}

#usersDialog {
  width: min(92vw, 520px);
}

#usersList {
  display: grid;
  gap: 8px;
  margin: 12px 0 18px;
}

.userRow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 12px;
  border: 1px solid #e1e1dc;
  border-radius: 12px;
}

.userInfo {
  min-width: 0;
}

.userInfo strong,
.userInfo small {
  display: block;
}

.userInfo small {
  margin-top: 2px;
  color: #737b75;
}

.userActions {
  display: flex;
  gap: 6px;
}

#addUserForm {
  display: grid;
  gap: 12px;
}

#usersDialog hr {
  border: 0;
  border-top: 1px solid #e2e2dc;
  margin: 18px 0;
}

@media (max-width: 520px) {
  .topActions {
    gap: 6px;
  }

  .logoutBtn {
    padding-left: 9px;
    padding-right: 9px;
  }

  .userRow {
    align-items: flex-start;
    flex-direction: column;
  }
}
/* USERS-MODAL-COMPACT */
#usersDialog{width:min(94vw,500px)!important;max-height:88dvh!important;padding:0!important;overflow-y:auto!important;border-radius:22px!important}
#usersDialog .dialogHead{position:sticky;top:0;z-index:10;background:#fff;padding:14px 18px 10px!important;border-bottom:1px solid var(--line)}
#usersDialog .dialogHead h2{margin:0!important;font-size:25px!important;line-height:1.1}
#usersDialog .dialogHead button{width:40px;height:40px;padding:0;display:grid;place-items:center;font-size:30px;line-height:1}
#usersDialog #usersList{display:block!important;margin:0!important;padding:10px 14px!important}
#usersDialog .userRow{padding:10px 12px!important;margin:0!important;border-radius:12px}
#usersDialog .userInfo strong{display:block;font-size:17px;line-height:1.2}
#usersDialog .userInfo small{display:block;margin-top:2px;font-size:13px}
#usersDialog hr{margin:0!important}
#usersDialog #addUserForm{display:block!important;padding:14px 18px 18px!important;overflow:visible!important}
#usersDialog #addUserForm h3{margin:0 0 10px!important;font-size:20px!important}
#usersDialog #addUserForm label{display:block;margin:8px 0!important;font-size:13px!important}
#usersDialog #addUserForm input,#usersDialog #addUserForm select{width:100%;height:44px!important;min-height:44px!important;margin-top:4px!important;padding:8px 12px!important;border-radius:12px!important;font-size:16px!important}
#usersDialog #addUserForm button{min-height:46px!important;margin-top:10px!important;padding:10px 14px!important;border-radius:13px!important}
@media(max-width:520px){#usersDialog{width:calc(100vw - 24px)!important;max-height:86dvh!important}#usersDialog .dialogHead{padding:12px 14px 9px!important}#usersDialog #usersList{padding:8px 12px!important}#usersDialog #addUserForm{padding:12px 14px 16px!important}#usersDialog #addUserForm label{margin:7px 0!important}}

/* RECIPE PHOTOS + TAGS */
.cardTop.hasPhoto{display:block;overflow:hidden}
.cardPhoto{width:100%;height:100%;display:block;object-fit:cover}
.cardEmoji{width:100%;height:100%;display:grid;place-items:center}
.cardTags{display:flex;gap:5px;flex-wrap:wrap;margin-top:9px}
.cardTags span{font-size:10px;font-weight:700;background:var(--accent2);color:#8a4317;padding:4px 7px;border-radius:99px}

/* RECIPE PHOTO + TAG EDITOR */
.recipeMediaFields{margin:14px 0;padding:14px;border:1px solid var(--line);border-radius:16px;background:#fffaf7}
.recipePhotoPreview{height:190px;border-radius:14px;overflow:hidden;margin:10px 0;background:var(--accent2)}
.recipePhotoPreview img{width:100%;height:100%;display:block;object-fit:cover}
.recipeTagChoices{display:flex;flex-wrap:wrap;gap:7px;margin:8px 0}
.recipeTagChoice{width:auto;margin:0;border:1px solid var(--line);background:#fff;border-radius:99px;padding:7px 10px;font-weight:700;font-size:12px}
.recipeTagChoice.selected{background:var(--ink);border-color:var(--ink);color:#fff}
.tagAddRow{display:grid;grid-template-columns:1fr auto;gap:8px;align-items:end}
.tagAddRow input{margin:0}
.tagAddRow button{height:43px}

.detailPhoto{
  width:min(100%,520px);
  margin:18px auto 24px;
  border-radius:28px;
  overflow:hidden;
  box-shadow:0 10px 30px rgba(54,32,20,.12);
}
.detailPhoto img{
  display:block;
  width:100%;
  aspect-ratio:4/3;
  object-fit:cover;
}
.detailTags{
  display:flex;
  flex-wrap:wrap;
  justify-content:center;
  gap:8px;
  margin-top:14px;
}
.detailTags span{
  padding:7px 13px;
  border-radius:999px;
  background:#fff0e7;
  font-size:.88rem;
  font-weight:700;
  color:#82401d;
}
.filterBar{display:flex;align-items:center;justify-content:space-between;gap:10px;margin:10px 0 8px;}
.filterToggle,.clearFilters{border:0;border-radius:999px;padding:10px 16px;font:inherit;font-weight:700;cursor:pointer;}
.filterToggle{background:#fff0e7;color:#82401d;}
.filterToggle.active{background:#82401d;color:#fff;}
.clearFilters{background:transparent;color:#a33b28;padding-left:10px;padding-right:10px;}
.filterPanel{background:#fff;border-radius:20px;padding:16px;margin:0 0 12px;box-shadow:0 6px 20px rgba(54,32,20,.08);}
.filterPanel[hidden]{display:none;}
.filterGroup{margin-bottom:14px;}
.filterGroup label{display:block;font-size:.82rem;font-weight:800;margin:0 0 6px;color:#70402a;}
.filterGroup select{width:100%;min-height:46px;border:1px solid #ead8cc;border-radius:13px;background:#fff;padding:0 12px;font:inherit;color:inherit;}
.filterCheck{display:flex;align-items:center;gap:10px;font-weight:700;cursor:pointer;}
.filterCheck input{width:20px;height:20px;margin:0;}
@media(min-width:700px){.filterPanel{display:grid;grid-template-columns:1fr 1fr auto;align-items:end;gap:14px}.filterGroup{margin:0}.filterCheck{min-height:46px}.filterPanel[hidden]{display:none}}
.actionRow .cookBtn{grid-column:1/-1;background:var(--ink);color:#fff;border-color:var(--ink);font-size:16px;padding:14px 10px;}
.cookingMode{min-height:calc(100vh - 125px);display:flex;flex-direction:column;padding:4px 0 18px;}
.cookingTop{display:flex;align-items:center;gap:12px;margin-bottom:18px;}
.cookingTitle{font-size:15px;font-weight:800;line-height:1.2;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.cookingProgress{height:9px;background:#eadfd7;border-radius:999px;overflow:hidden;margin-bottom:12px;}
.cookingProgress span{display:block;height:100%;background:var(--accent);border-radius:999px;transition:width .25s ease;}
.cookingStepCount{text-align:center;color:var(--accent);font-size:13px;font-weight:850;text-transform:uppercase;letter-spacing:.7px;margin:8px 0 18px;}
.cookingStepText{flex:1;display:flex;align-items:center;justify-content:center;text-align:center;font-size:clamp(27px,7vw,42px);font-weight:750;line-height:1.28;padding:24px 10px 32px;min-height:260px;}
.cookingIngredientsBtn{width:100%;border:1px solid var(--line);background:#fff;border-radius:15px;padding:13px;font:inherit;font-weight:800;color:var(--ink);margin-bottom:10px;}
.cookingIngredients{background:#fff;border:1px solid var(--line);border-radius:18px;padding:16px;margin-bottom:12px;max-height:38vh;overflow:auto;}
.cookingIngredients[hidden]{display:none;}
.cookingIngredients h3{margin:0 0 8px;}
.cookingIngredients ul{list-style:none;padding:0;margin:0;}
.cookingIngredients li{padding:10px 2px;border-bottom:1px solid #f2e9e3;font-size:16px;}
.cookingIngredients li:last-child{border:0;}
.cookingNav{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-top:4px;position:sticky;bottom:8px;}
.cookingNav button{min-height:58px;border:0;border-radius:17px;font:inherit;font-size:17px;font-weight:850;background:var(--ink);color:#fff;box-shadow:0 6px 18px rgba(54,32,20,.12);}
.cookingNav button:last-child{background:var(--accent);}
.cookingNav button:disabled{opacity:.3;}
@media(min-width:700px){.cookingMode{max-width:720px;margin:auto}.cookingStepText{font-size:42px}}
.importRecipeBtn{width:100%;border:1px solid var(--line);background:#fff7f0;color:#82401d;border-radius:14px;padding:12px;font:inherit;font-weight:800;margin:2px 0 10px;}
.importRecipePanel{background:#fffaf6;border:1px solid var(--line);border-radius:16px;padding:14px;margin:0 0 16px;}
.importRecipePanel[hidden]{display:none;}
.importRecipePanel label{margin-top:0;}
.importRecipeStatus{font-size:13px;font-weight:700;margin-top:10px;color:var(--muted);}
.importRecipeStatus.error{color:#b42318;}

/* COMPACT HOME CONTROLS */
#homeView .recipeScopeTabs{margin:6px 0 9px!important;padding:4px!important;border-radius:16px!important;min-height:0!important}
#homeView .scopeTab{min-height:44px!important;padding:6px 8px!important;font-size:15px!important;border-radius:12px!important}
#homeView .searchWrap{margin:0 0 6px!important;height:46px!important;min-height:46px!important;border-radius:15px!important}
#homeView .searchWrap input{height:44px!important;min-height:44px!important;font-size:16px!important}
#homeView .filterBar{margin:4px 0 5px!important}
#homeView .filterToggle{padding:7px 12px!important;min-height:38px!important;font-size:14px!important}
#homeView .clearFilters{padding:7px 9px!important;font-size:13px!important}
#homeView .chips{margin:3px 0 9px!important;gap:6px!important}
#homeView .chip{padding:6px 12px!important;min-height:36px!important;font-size:13px!important}
#homeView .sectionTitle{margin:4px 0 8px!important}
#homeView .sectionTitle h2{margin:0!important}

/* COMPACT HOME SEARCH ROW */
#homeView .homeSearchRow{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px;align-items:center;margin:0 0 7px}
#homeView .homeSearchRow .searchWrap{margin:0!important;width:100%!important}
#homeView .compactFilterBar{margin:0!important;display:flex!important;gap:4px!important}
#homeView .compactFilterBar .filterToggle{height:46px!important;min-height:46px!important;white-space:nowrap;padding:0 13px!important}
#homeView .compactFilterBar .clearFilters{height:46px!important;min-height:46px!important;padding:0 8px!important}
#homeView .chips{margin:4px 0 10px!important}
#homeView .sectionTitle{display:none!important}

/* MY CHANGE */
.myChange{font-family:"Bradley Hand","Segoe Print","Comic Sans MS",cursive;font-size:1.08em;font-weight:600;font-style:italic;letter-spacing:.01em}
.myChangeBtn{display:block;width:auto;margin:6px 0 2px;padding:7px 12px;border-radius:10px;font-size:13px;font-weight:700}

.myChangeWrap{display:inline-flex;flex-direction:column;vertical-align:middle}.myChangeOriginal{font-family:inherit;font-size:.72em;font-weight:400;font-style:normal;opacity:.58;line-height:1.2;margin-top:1px}

/* VISUAL RECIPE TEXT EDITOR */
.recipeTextEditor{width:100%;margin-top:6px;border:1px solid #d9ccc3;border-radius:12px;padding:11px;font:inherit;font-weight:400;background:#fff;min-height:170px;outline:none;white-space:pre-wrap;overflow-wrap:anywhere}.recipeTextEditor:focus{border-color:var(--accent)}.recipeTextEditor:empty:before{content:attr(data-placeholder);white-space:pre-line;color:#888}.recipeTextEditor>div{min-height:1.5em;padding:2px 0}
