/* Live journal cards, grouped without replacing their state or controls. */
#dogCareTools { display: contents; }
.tool-row, .tool-ai-label, .tool-ai-status, .tool-prevention { display: none; }
.dashboard-tools { display: contents; }

@media screen and (max-width: 600px) {
  #dashboardTools .fk-card p:not(.kicker),
  #dashboardTools .compact-summary-description { font-size: 14px; line-height: 1.5; }
  #dashboardTools .fk-kitchen-card .fk-card-actions { align-items: stretch; }
  #dashboardTools .fk-kitchen-card .fk-card-actions button { font-size: 13px; line-height: 1.4; }
}

@media screen and (min-width: 1024px) {
  #dashboardTools {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: stretch;
    gap: 16px;
    margin: 20px 0;
  }
  #dashboardTools > .fk-card,
  #dashboardTools > .hunting-assistant-panel {
    grid-column: auto;
    min-width: 0;
    margin: 0;
    border-radius: 18px;
    border-color: #ccd5c5;
    box-shadow: 0 4px 14px #173e3508;
    transition: border-color .18s ease, box-shadow .18s ease;
  }
  #dashboardTools > .fk-card {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 18px;
    padding: 22px;
  }
  #dashboardTools .fk-card-brand { flex: 1; align-items: flex-start; gap: 12px; min-width: 0; }
  #dashboardTools .fk-card-brand > div { min-width: 0; }
  #dashboardTools .fk-emblem { width: 46px; height: 50px; border-radius: 14px; }
  #dashboardTools .fk-kitchen-emblem { width: 50px; }
  #dashboardTools .fk-card h3 { font-size: 21px; line-height: 1.25; margin: 5px 0 8px; }
  #dashboardTools .fk-card p:not(.kicker),
  #dashboardTools .compact-summary-description { font-size: 14px; line-height: 1.55; color: #53634f; }
  #dashboardTools .kicker { font-size: 10px; line-height: 1.5; letter-spacing: .09em; }
  #dashboardTools .fk-card-actions { display: grid; width: 100%; gap: 8px; margin-top: auto; }
  #dashboardTools .fk-kitchen-card .fk-card-actions { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #dashboardTools .fk-card-actions > button { min-width: 0; min-height: 44px; padding: 10px 8px; font-size: 13px; line-height: 1.4; text-align: center; }
  #dashboardTools .fk-card-actions svg { width: 17px; height: 17px; }
  #dashboardTools .fk-trial-ribbon,
  #dashboardTools .fk-active-strip { gap: 6px; padding-top: 12px; }
  #dashboardTools .fk-trial-ribbon { display: grid; grid-template-columns: repeat(auto-fit, minmax(125px, 1fr)); }
  #dashboardTools .fk-trial-ribbon button,
  #dashboardTools .fk-mini-status { width: 100%; min-height: 44px; }
  #dashboardTools .compact-disclosure:not([open]) { height: 100%; }
  #dashboardTools .compact-disclosure:not([open]) > .compact-summary {
    display: grid;
    grid-template-columns: 46px minmax(0, 1fr);
    grid-template-rows: 1fr auto;
    align-items: start;
    gap: 18px 12px;
    min-height: 206px;
    height: 100%;
    padding: 22px;
    border-radius: 18px;
  }
  #dashboardTools .compact-disclosure:not([open]) .compact-lefty-portrait { width: 46px; height: 60px; }
  #dashboardTools .compact-disclosure:not([open]) .compact-summary-copy { padding-right: 10px; }
  #dashboardTools .compact-disclosure:not([open]) .compact-summary-title { font-size: 21px; margin: 5px 0 8px; }
  #dashboardTools .compact-disclosure:not([open]) .compact-action { grid-column: 1 / -1; align-self: end; min-height: 44px; font-size: 13px; border-radius: 12px; }
  /* Hidden/read-only assistants leave two equal cards; an open conversation gets full width. */
  #dashboardTools:not(:has(> #huntingAssistantPanel:not([hidden]))),
  #dashboardTools:has(> #huntingAssistantPanel:not(.box-is-collapsed) > #huntingAssistantDisclosure[open]) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #dashboardTools > #huntingAssistantPanel:not(.box-is-collapsed):has(#huntingAssistantDisclosure[open]) { grid-column: 1 / -1; }
  /* Award details live in the journal; keep the desktop row compact and equal in height. */
  #dashboardTools .fk-trial-ribbon { display: none; }
  #dashboardTools > :focus-within { border-color: #66815c; box-shadow: 0 7px 20px #173e3516; }
}

@media screen and (min-width: 1024px) and (hover: hover) and (pointer: fine) {
  #dashboardTools > :hover { border-color: #66815c; box-shadow: 0 8px 22px #173e351a; }
}

@media (prefers-reduced-motion: reduce) {
  #dashboardTools > .fk-card,
  #dashboardTools > .hunting-assistant-panel { transition: none; }
}

/* Two daily-care cards above the three supporting tools. */
@media screen and (min-width: 1024px) {
 body[data-tools-layout="compact"] #dogCareTools { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:16px; align-items:stretch; margin:20px 0 0; }
 body[data-tools-layout="compact"] #dogCareTools:not(:has(#leftyNutritionCard)) { grid-template-columns:minmax(0,1fr); }
 body[data-tools-layout="compact"] #dogCareTools > #dogJournalCard,
 body[data-tools-layout="compact"] #dogCareTools > #leftyNutritionCard { display:flex; flex-direction:column; align-items:stretch; justify-content:space-between; gap:18px; min-width:0; margin:0; padding:22px; border:1px solid #ccd5c5; border-radius:18px; background:#fffef9; box-shadow:0 4px 14px #173e3508; }
 body[data-tools-layout="compact"] #dogCareTools .journal-brand,
 body[data-tools-layout="compact"] #dogCareTools .ln-card-copy { align-items:flex-start; gap:12px; }
 body[data-tools-layout="compact"] #dogCareTools h3 { font-size:21px; line-height:1.25; margin:5px 0 8px; }
 body[data-tools-layout="compact"] #dogCareTools p { font-size:14px; line-height:1.55; color:#53634f; }
 body[data-tools-layout="compact"] #dogCareTools .kicker,
 body[data-tools-layout="compact"] #dogCareTools .ln-kicker { font-size:10px; line-height:1.5; letter-spacing:.09em; }
 body[data-tools-layout="compact"] #dogCareTools .ln-mark { width:50px; height:50px; border-radius:14px; }
 body[data-tools-layout="compact"] #dogCareTools .journal-card-actions { justify-content:flex-start; gap:10px; }
 body[data-tools-layout="compact"] #dogCareTools .ln-open { align-self:flex-start; min-height:44px; }
 body[data-tools-layout="compact"] #dashboardTools { margin-top:16px; }
}
@media screen and (min-width:1024px) and (hover:hover) and (pointer:fine) {
 body[data-tools-layout="compact"] #dogCareTools > :hover { border-color:#66815c; box-shadow:0 8px 22px #173e351a; }
}

/* Restore the illustrated cards on mobile; desktop keeps its existing layout. */
@media screen and (max-width:1023px) {
 body[data-tools-layout="compact"] #dogCareTools,
 body[data-tools-layout="compact"] #dashboardTools { display:grid; grid-template-columns:minmax(0,1fr); gap:12px; margin:16px 0; }
 body[data-tools-layout="compact"] #dogCareTools > section,
 body[data-tools-layout="compact"] #dashboardTools > section,
 body[data-tools-layout="compact"] #dashboardTools > #huntingAssistantPanel { min-width:0; margin:0; border-radius:18px; }
 body[data-tools-layout="compact"] #dogCareTools > section,
 body[data-tools-layout="compact"] #dashboardTools > section { padding:18px; }
 body[data-tools-layout="compact"] .tool-row,
 body[data-tools-layout="compact"] .tool-prevention,
 body[data-tools-layout="compact"] .tool-ai-label,
 body[data-tools-layout="compact"] .tool-ai-status { display:none !important; }
 #dogCareTools .journal-brand > img,
 #dogCareTools .journal-brand > .journal-emblem { width:64px; height:64px; }
 #dogCareTools .journal-emblem svg { width:28px; height:28px; padding:3px; border:1px solid #cfdbc7; }
 #dogCareTools .journal-brand { align-items:center; gap:14px; }
 #dogCareTools .journal-card-actions { width:100%; }
 #dogCareTools .journal-open-button { flex:1; }
 #dogCareTools #leftyNutritionCard .ln-mark { width:56px; height:56px; border-radius:17px; }
 #dashboardTools .fk-emblem { width:56px; height:56px; border-radius:17px; }
 #dashboardTools .fk-kitchen-emblem { width:64px; height:64px; }
 #dashboardTools .fk-card h3 { font-size:21px; line-height:1.25; }
 #dashboardTools .fk-card-brand { align-items:center; }
 #huntingAssistantPanel .compact-summary { padding:18px; }
 #huntingAssistantPanel .compact-lefty-portrait { width:64px; height:76px; }
 #huntingAssistantPanel .compact-summary-title { display:block; font-size:21px; }
 #huntingAssistantPanel .compact-summary-description { display:block; white-space:normal; overflow-wrap:anywhere; }
}

/* Keep the existing illustrated emblems clear on desktop as well. */
@media screen and (min-width:1024px) {
 #dogCareTools .journal-emblem svg { width:28px; height:28px; padding:3px; border:1px solid #cfdbc7; }
 #dashboardTools .fk-emblem, #dashboardTools .fk-kitchen-emblem { width:56px; height:56px; }
 #dashboardTools .compact-disclosure:not([open]) .compact-lefty-portrait { width:52px; height:68px; }
}

/* Compact illustrated cards on mobile; preserve the desktop card sizes. */
@media screen and (max-width:1023px) {
 body[data-tools-layout="compact"] #dogCareTools,
 body[data-tools-layout="compact"] #dashboardTools { gap:10px; margin:12px 0; }
 body[data-tools-layout="compact"] #dogCareTools > section,
 body[data-tools-layout="compact"] #dashboardTools > section { padding:14px !important; gap:10px; }
 body[data-tools-layout="compact"] #dogCareTools .journal-brand > img,
 body[data-tools-layout="compact"] #dogCareTools .journal-brand > .journal-emblem { width:52px; height:52px; }
 body[data-tools-layout="compact"] #dogCareTools .journal-brand,
 body[data-tools-layout="compact"] #dogCareTools .ln-card-copy,
 body[data-tools-layout="compact"] #dashboardTools .fk-card-brand { gap:12px; }
 body[data-tools-layout="compact"] #dogCareTools .ln-mark,
 body[data-tools-layout="compact"] #dashboardTools .fk-emblem { width:48px; height:48px; border-radius:14px; }
 body[data-tools-layout="compact"] #dashboardTools .fk-kitchen-emblem { width:52px; height:52px; }
 body[data-tools-layout="compact"] #dashboardTools .fk-card h3 { font-size:19px; line-height:1.25; margin:3px 0 5px; }
 body[data-tools-layout="compact"] #dashboardTools .fk-card p:not(.kicker) { line-height:1.4; margin:0; }
 body[data-tools-layout="compact"] #huntingAssistantPanel > #huntingAssistantDisclosure > .compact-summary { display:grid; grid-template-columns:52px minmax(0,1fr); align-items:center; gap:8px 12px; padding:14px; min-height:0; }
 body[data-tools-layout="compact"] #huntingAssistantDisclosure .compact-lefty-portrait { width:52px; height:62px; grid-column:1; grid-row:1 / 3; }
 body[data-tools-layout="compact"] #huntingAssistantDisclosure .compact-summary-copy { grid-column:2; }
 body[data-tools-layout="compact"] #huntingAssistantDisclosure .compact-summary-title { font-size:19px; }
 body[data-tools-layout="compact"] #huntingAssistantDisclosure .compact-summary-description { font-size:13px; line-height:1.4; margin-top:4px; }
 body[data-tools-layout="compact"] #huntingAssistantDisclosure .compact-action { grid-column:2; min-height:44px; font-size:13px; padding:8px 10px; }
 body[data-tools-layout="compact"] #dogCareTools .ln-open,
 body[data-tools-layout="compact"] #dogCareTools .journal-open-button,
 body[data-tools-layout="compact"] #dashboardTools .fk-card-actions button { min-height:44px; font-size:13px; padding:9px 10px; }
}
