/* Rulezz notes : independent visual module; no changes to the game engine or scoring. */
body.rzux-shell-ready #rzgnNotes,body.rzux-shell-ready #rzgnHistory{background:linear-gradient(150deg,#103758,#0b2748)!important;color:#f4f8ff!important;border:1px solid #f27050;border-radius:14px;padding:16px;min-width:0;box-sizing:border-box;}
body.rzux-shell-ready #rzgnNotes{grid-column:1/-1;grid-row:3;margin:0!important;}
body.rzux-shell-ready[data-rzux-view="scores"] #rzgnNotes{display:none!important;}

body.rzux-shell-ready #rzgnHistory{margin-top:18px;border-color:#3e6b94;}
body.rzux-shell-ready #rzgnNotes .rzgn-head,body.rzux-shell-ready #rzgnNotes .rzgn-heading{display:flex;align-items:center;gap:10px;min-width:0;}
body.rzux-shell-ready #rzgnNotes .rzgn-head{justify-content:space-between;margin-bottom:15px;}
body.rzux-shell-ready #rzgnNotes .rzgn-icon{width:34px;height:34px;display:grid;place-items:center;background:#874c49;border-radius:10px;font-size:18px;flex:none;}
body.rzux-shell-ready #rzgnNotes :is(h2,h3),body.rzux-shell-ready #rzgnHistory h3{color:#f8fbff!important;font-weight:850;margin:0 0 5px!important;line-height:1.25!important;}
body.rzux-shell-ready #rzgnNotes h2{font-size:21px!important;}
body.rzux-shell-ready #rzgnNotes h3,body.rzux-shell-ready #rzgnHistory h3{font-size:14px!important;}
body.rzux-shell-ready #rzgnNotes .rzgn-head p,body.rzux-shell-ready #rzgnNotes .rzgn-help,body.rzux-shell-ready #rzgnHistory .rzgn-help{margin:4px 0 12px!important;color:#bad0e9!important;font-size:12px!important;line-height:1.5!important;}
body.rzux-shell-ready #rzgnNotes .rzgn-badge{font-size:10px;font-weight:700;color:#d3e3f8;border:1px solid #45688c;background:#1a4567;padding:6px 9px;border-radius:50px;}
body.rzux-shell-ready #rzgnNotes .rzgn-datetime{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;}
body.rzux-shell-ready #rzgnNotes .rzgn-label{display:grid;gap:6px;color:#e0eeff!important;font-size:12px!important;font-weight:750;min-width:0;}
body.rzux-shell-ready #rzgnNotes .rzgn-field{width:100%;min-width:0;display:block;box-sizing:border-box;background:#08213d!important;color:#f7fbff!important;border:1px solid #4c779f!important;border-radius:10px!important;padding:11px!important;font:500 14px/1.5 system-ui,sans-serif!important;color-scheme:dark;}
body.rzux-shell-ready #rzgnNotes .rzgn-field::placeholder{color:#afc4dd!important;opacity:1;}
body.rzux-shell-ready #rzgnNotes .rzgn-field:focus-visible,body.rzux-shell-ready #rzgnNotes button:focus-visible,body.rzux-shell-ready #rzgnHistory button:focus-visible{outline:3px solid #ffca74!important;outline-offset:2px;}
body.rzux-shell-ready #rzgnNotes .rzgn-now{display:inline-flex;background:none!important;border:0!important;padding:8px 0 4px;color:#ffbe78!important;font:750 12px system-ui,sans-serif!important;cursor:pointer;}
body.rzux-shell-ready #rzgnNotes .rzgn-sep{height:1px;margin:14px 0;background:#37658d;}
body.rzux-shell-ready #rzgnNotes .rzgn-textarea{min-height:106px;max-height:330px;resize:vertical;}
body.rzux-shell-ready #rzgnNotes .rzgn-foot{display:flex;justify-content:space-between;gap:8px;flex-wrap:wrap;color:#acc1db;margin:10px 0;font:400 11px system-ui,sans-serif;}
body.rzux-shell-ready #rzgnNotes .rzgn-save{width:100%;min-height:44px;background:#f46c50!important;color:#09223d!important;font:850 14px system-ui,sans-serif!important;border:0!important;border-radius:10px!important;cursor:pointer;}
body.rzux-shell-ready #rzgnNotes .rzgn-save:disabled{opacity:.65;cursor:wait;}
body.rzux-shell-ready #rzgnNotes .rzgn-create{background:transparent!important;color:#baddff!important;border:1px solid #507ca7!important;border-radius:8px;padding:8px 10px;margin-top:10px;font:750 12px system-ui,sans-serif;cursor:pointer;}
body.rzux-shell-ready #rzgnNotes .rzgn-status{font-size:12px;margin:7px 0 0;color:#b8ffe5!important;}
body.rzux-shell-ready #rzgnNotes .rzgn-status:empty{display:none;}
body.rzux-shell-ready #rzgnNotes .rzgn-status[data-status="error"]{color:#ffb0b0!important;}
body.rzux-shell-ready :is(#rzgnHistory,#rzgnCurrent) .rzgn-history-item{padding:11px 2px;border-top:1px solid #39688c;display:flex;gap:12px;justify-content:space-between;align-items:start;min-width:0;}
body.rzux-shell-ready :is(#rzgnHistory,#rzgnCurrent) .rzgn-history-copy{min-width:0;overflow-wrap:anywhere;white-space:pre-wrap;}
body.rzux-shell-ready :is(#rzgnHistory,#rzgnCurrent) .rzgn-history-copy strong{font:800 12px system-ui,sans-serif;color:#ffe0b1;}
body.rzux-shell-ready :is(#rzgnHistory,#rzgnCurrent) .rzgn-history-copy p{margin:7px 0 0!important;font:400 12px/1.5 system-ui,sans-serif!important;color:#f1f6ff!important;}
body.rzux-shell-ready :is(#rzgnHistory,#rzgnCurrent) .rzgn-history-actions{display:flex;flex-wrap:wrap;gap:6px;flex:none;}
body.rzux-shell-ready :is(#rzgnHistory,#rzgnCurrent) .rzgn-action{padding:7px 10px;border-radius:8px;border:1px solid #6087b0;background:#153e64!important;color:#f5faff!important;font:700 11px system-ui,sans-serif!important;cursor:pointer;}
body.rzux-shell-ready :is(#rzgnHistory,#rzgnCurrent) .rzgn-delete{border-color:#a95661;}
body.rzux-shell-ready :is(#rzgnHistory,#rzgnCurrent) .rzgn-empty{font:400 12px system-ui,sans-serif;color:#bbcee5!important;}
@media(max-width:900px){body.rzux-shell-ready #rzgnNotes{grid-column:1/-1!important;grid-row:5!important;}body.rzux-shell-ready :is(#rzgnHistory,#rzgnCurrent) .rzgn-history-item{flex-wrap:wrap;}body.rzux-shell-ready :is(#rzgnHistory,#rzgnCurrent) .rzgn-history-actions{width:100%;}}
@media(max-width:360px){body.rzux-shell-ready #rzgnNotes .rzgn-datetime{grid-template-columns:1fr;}}

/* Notes belong to Scores → History, never to global ranking. */
body.rzux-shell-ready:has([data-rzux-score-view="rank"].is-active) #rzgnHistory{display:none!important;}

/* V5.10.241: mobile card width is determined by the container, never by the
   intrinsic width of Safari native date/time controls. */
body.rzux-shell-ready #rzgnNotes .rzgn-heading{flex:1 1 auto;min-width:0;}
body.rzux-shell-ready #rzgnNotes .rzgn-heading > div{min-width:0;}
body.rzux-shell-ready #rzgnNotes .rzgn-badge{
  display:inline-flex;align-items:center;justify-content:center;
  flex:0 0 auto;white-space:nowrap;overflow-wrap:normal;word-break:normal;
  min-width:max-content;line-height:1.25;box-sizing:border-box;
}
body.rzux-shell-ready #rzgnNotes .rzgn-datetime > .rzgn-label{min-width:0;max-width:100%;}
body.rzux-shell-ready #rzgnNotes :is(input[type="date"],input[type="time"]){
  display:block;width:100%!important;min-width:0!important;max-width:100%!important;
  box-sizing:border-box!important;margin:0!important;
}
@media(max-width:700px){
 body.rzux-shell-ready #rzgnNotes .rzgn-datetime{
  display:grid!important;grid-template-columns:minmax(0,1fr)!important;gap:12px!important;
  width:100%;min-width:0;
 }
 body.rzux-shell-ready #rzgnNotes .rzgn-field{font-size:16px!important;}
 body.rzux-shell-ready #rzgnNotes .rzgn-head{align-items:flex-start;}
 body.rzux-shell-ready #rzgnNotes .rzgn-badge{font-size:10px;white-space:nowrap;}
}


/* V5.10.242: harden Safari iPhone date/time fields by wrapping them in a
   clipping control shell. This prevents native intrinsic sizing from pushing
   past the orange card on small screens. */
body.rzux-shell-ready #rzgnNotes .rzgn-label-text{display:block;min-width:0;}
body.rzux-shell-ready #rzgnNotes .rzgn-control{
  display:block;width:100%;max-width:100%;min-width:0;overflow:hidden;
  box-sizing:border-box;background:#08213d!important;border:1px solid #4c779f!important;
  border-radius:10px!important;
}
body.rzux-shell-ready #rzgnNotes .rzgn-control > .rzgn-field{
  display:block;width:100%!important;max-width:100%!important;min-width:0!important;
  margin:0!important;border:0!important;border-radius:0!important;box-shadow:none!important;
  background:transparent!important;padding:11px!important;box-sizing:border-box!important;
}
body.rzux-shell-ready #rzgnNotes :is(input[type="date"],input[type="time"]){
  appearance:none;-webkit-appearance:none;
}
body.rzux-shell-ready #rzgnNotes :is(input[type="date"],input[type="time"])::-webkit-date-and-time-value{
  min-height:1.4em;
}
body.rzux-shell-ready #rzgnNotes .rzgn-note-label > .rzgn-field{border:1px solid #4c779f!important;border-radius:10px!important;}
@media(max-width:700px){
  body.rzux-shell-ready #rzgnNotes .rzgn-control > .rzgn-field{font-size:16px!important;}
}


/* ===============================================================
 * Rulezz - Notes de jeu : compacite responsive (CSS seulement)
 * Cible : zone #rzgnNotes uniquement. Aucun changement de logique.
 * Desktop >= 701px : champs adaptes + actions plus discretes.
 * Mobile <= 700px : zones tactiles / saisies iOS preservees.
 * =============================================================== */
@media (min-width: 701px) {
  body.rzux-shell-ready #rzgnNotes {
    padding: 14px 16px;
  }
  body.rzux-shell-ready #rzgnNotes .rzgn-head {
    margin-bottom: 10px;
  }
  body.rzux-shell-ready #rzgnNotes .rzgn-icon {
    width: 30px;
    height: 30px;
    border-radius: 9px;
    font-size: 16px;
  }
  body.rzux-shell-ready #rzgnNotes h2 {
    font-size: 18px !important;
  }
  body.rzux-shell-ready #rzgnNotes .rzgn-head p {
    margin: 2px 0 0 !important;
  }
  body.rzux-shell-ready #rzgnNotes .rzgn-datetime {
    grid-template-columns: minmax(0, 230px) minmax(0, 140px);
    max-width: 382px;
    gap: 12px;
  }
  body.rzux-shell-ready #rzgnNotes .rzgn-control > .rzgn-field {
    padding: 8px 10px !important;
    min-height: 39px;
  }
  body.rzux-shell-ready #rzgnNotes .rzgn-now {
    padding: 6px 0 2px;
  }
  body.rzux-shell-ready #rzgnNotes .rzgn-help {
    margin: 2px 0 8px !important;
  }
  body.rzux-shell-ready #rzgnNotes .rzgn-sep {
    margin: 9px 0;
  }
  body.rzux-shell-ready #rzgnNotes .rzgn-textarea {
    height: 84px;
    min-height: 84px;
  }
  body.rzux-shell-ready #rzgnNotes .rzgn-foot {
    margin: 6px 0;
  }
  body.rzux-shell-ready #rzgnNotes .rzgn-save {
    display: block;
    width: auto;
    min-width: 210px;
    min-height: 39px;
    padding: 8px 15px;
    margin-left: auto;
  }
  body.rzux-shell-ready #rzgnNotes .rzgn-create {
    margin-top: 6px;
    padding: 7px 11px;
  }
}
@media (max-width: 700px) {
  body.rzux-shell-ready #rzgnNotes {
    padding: 12px;
  }
  body.rzux-shell-ready #rzgnNotes .rzgn-head {
    margin-bottom: 12px;
  }
  body.rzux-shell-ready #rzgnNotes h2 {
    font-size: 19px !important;
  }
  body.rzux-shell-ready #rzgnNotes .rzgn-icon {
    width: 32px;
    height: 32px;
  }
  body.rzux-shell-ready #rzgnNotes .rzgn-sep {
    margin: 12px 0;
  }
  body.rzux-shell-ready #rzgnNotes .rzgn-textarea {
    height: 112px;
    min-height: 100px;
  }
  body.rzux-shell-ready #rzgnNotes .rzgn-save {
    width: 100%;
    min-height: 44px;
  }
  body.rzux-shell-ready #rzgnNotes .rzgn-create {
    min-height: 44px;
  }
}
@media (max-width: 360px) {
  body.rzux-shell-ready #rzgnNotes .rzgn-head,
  body.rzux-shell-ready #rzgnNotes .rzgn-heading {
    gap: 7px;
  }
  body.rzux-shell-ready #rzgnNotes h2 {
    font-size: 17px !important;
  }
  body.rzux-shell-ready #rzgnNotes .rzgn-icon {
    width: 28px;
    height: 28px;
  }
  body.rzux-shell-ready #rzgnNotes .rzgn-badge {
    padding: 5px 6px;
    font-size: 9px;
  }
}

/* The live list shares the existing archive components and the note card palette. */
body.rzux-shell-ready #rzgnCurrent{margin-top:16px;padding-top:14px;border-top:1px solid #37658d;min-width:0;}
body.rzux-shell-ready :is(#rzgnCurrent,#rzgnHistory) .rzgn-history-copy time{display:block;font:800 12px/1.5 system-ui,sans-serif;color:#ffe0b1;}
body.rzux-shell-ready :is(#rzgnCurrent,#rzgnHistory) .rzgn-game-date{display:block;margin-top:3px;font:400 11px/1.5 system-ui,sans-serif;color:#bad0e9;}
body.rzux-shell-ready #rzgnHistory .rzgn-archive-group{border:1px solid #3e6b94;border-radius:10px;padding:10px 12px;margin-top:10px;background:transparent;}
body.rzux-shell-ready #rzgnHistory .rzgn-archive-group>summary{cursor:pointer;font:750 12px/1.5 system-ui,sans-serif;color:#f4f8ff;overflow-wrap:anywhere;}
body.rzux-shell-ready #rzgnCurrent .rzgn-history-actions{align-self:flex-start;}

/* Shared notes and live summary: 60/40 on desktop, one column on touch screens. */
body.rzux-shell-ready #rzuxNotesSummary{grid-column:1/-1;grid-row:4;display:grid;grid-template-columns:minmax(0,3fr) minmax(0,2fr);align-items:start;gap:14px;min-width:0;}
body.rzux-shell-ready #rzuxNotesSummary #rzgnNotes{grid-column:1!important;grid-row:1!important;width:100%;margin:0!important;}
body.rzux-shell-ready #rzuxNotesSummary #rzuxRail{grid-column:2!important;grid-row:1!important;grid-template-columns:minmax(0,1fr)!important;width:100%;margin:0!important;}
body.rzux-shell-ready #rzuxNotesSummary #rzuxRail .rzux-stat{border-right:0;border-bottom:1px solid var(--rzdc-assistant-color-2a547e);padding:12px 16px;}
body.rzux-shell-ready #rzuxNotesSummary #rzuxRail .rzux-stat:last-child{border-bottom:0;}
body.rzux-shell-ready #rzuxGameControls{grid-column:1/-1;grid-row:3;display:flex;flex-direction:row;align-items:center;flex-wrap:wrap;gap:10px;padding:8px 0;border:0;min-width:0;}
@media(min-width:901px){body.rzux-shell-ready #rzuxGameControls .rzux-desktop-game-controls{display:flex;flex-wrap:wrap;gap:8px;}}

@media(max-width:900px){body.rzux-shell-ready #rzuxNotesSummary{grid-column:1!important;grid-row:auto!important;grid-template-columns:minmax(0,1fr);}
body.rzux-shell-ready #rzuxNotesSummary #rzgnNotes,body.rzux-shell-ready #rzuxNotesSummary #rzuxRail{grid-column:1!important;grid-row:auto!important;}
body.rzux-shell-ready #rzuxGameControls{display:none!important;}
body.rzux-shell-ready #rzuxNotesSummary #rzuxRail{grid-template-columns:repeat(2,minmax(0,1fr))!important;}}
/* Validated two-action layout; the score shortcut and overflow menu are omitted. */
@media(min-width:901px){
  body.rzux-shell-ready #rzuxGameControls:empty{display:none;}
  body.rzux-shell-ready #rzuxGameControls{padding:8px 0 4px;}
  body.rzux-shell-ready #rzuxGameControls #rzuxDesktopGameControls{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;width:100%;margin:0;}
  body.rzux-shell-ready #rzuxGameControls #rzuxDesktopGameControls button{width:100%;min-height:64px;padding:14px 20px;font-size:17px;font-weight:800;line-height:1.3;border-radius:12px;}
}