trix-editor {
  border: 1px solid #bbb;
  border-radius: 3px;
  margin: 0;
  padding: 0.4em 0.6em;
  min-height: 5em;
  outline: none; }

trix-toolbar * {
  box-sizing: border-box; }

trix-toolbar .trix-button-row {
  display: flex;
  flex-wrap: nowrap;
  justify-content: space-between;
  overflow-x: auto; }

trix-toolbar .trix-button-group {
  display: flex;
  margin-bottom: 10px;
  border: 1px solid #bbb;
  border-top-color: #ccc;
  border-bottom-color: #888;
  border-radius: 3px; }
  trix-toolbar .trix-button-group:not(:first-child) {
    margin-left: 1.5vw; }
    @media (max-width: 768px) {
      trix-toolbar .trix-button-group:not(:first-child) {
        margin-left: 0; } }

trix-toolbar .trix-button-group-spacer {
  flex-grow: 1; }
  @media (max-width: 768px) {
    trix-toolbar .trix-button-group-spacer {
      display: none; } }

trix-toolbar .trix-button {
  position: relative;
  float: left;
  color: rgba(0, 0, 0, 0.6);
  font-size: 0.75em;
  font-weight: 600;
  white-space: nowrap;
  padding: 0 0.5em;
  margin: 0;
  outline: none;
  border: none;
  border-bottom: 1px solid #ddd;
  border-radius: 0;
  background: transparent; }
  trix-toolbar .trix-button:not(:first-child) {
    border-left: 1px solid #ccc; }
  trix-toolbar .trix-button.trix-active {
    background: #cbeefa;
    color: black; }
  trix-toolbar .trix-button:not(:disabled) {
    cursor: pointer; }
  trix-toolbar .trix-button:disabled {
    color: rgba(0, 0, 0, 0.125); }
  @media (max-width: 768px) {
    trix-toolbar .trix-button {
      letter-spacing: -0.01em;
      padding: 0 0.3em; } }

trix-toolbar .trix-button--icon {
  font-size: inherit;
  width: 2.6em;
  height: 1.6em;
  max-width: calc(0.8em + 4vw);
  text-indent: -9999px; }
  @media (max-width: 768px) {
    trix-toolbar .trix-button--icon {
      height: 2em;
      max-width: calc(0.8em + 3.5vw); } }
  trix-toolbar .trix-button--icon::before {
    display: inline-block;
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    opacity: 0.6;
    content: "";
    background-position: center;
    background-repeat: no-repeat;
    background-size: contain; }
    @media (max-width: 768px) {
      trix-toolbar .trix-button--icon::before {
        right: 6%;
        left: 6%; } }
  trix-toolbar .trix-button--icon.trix-active::before {
    opacity: 1; }
  trix-toolbar .trix-button--icon:disabled::before {
    opacity: 0.125; }

trix-toolbar .trix-button--icon-attach::before {
  background-image: url("data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M10.5%2018V7.5c0-2.25%203-2.25%203%200V18c0%204.125-6%204.125-6%200V7.5c0-6.375%209-6.375%209%200V18%22%20stroke%3D%22%23000%22%20stroke-width%3D%222%22%20stroke-miterlimit%3D%2210%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%2F%3E%3C%2Fsvg%3E");
  top: 8%;
  bottom: 4%; }

trix-toolbar .trix-button--icon-bold::before {
  background-image: url("data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M6.522%2019.242a.5.5%200%200%201-.5-.5V5.35a.5.5%200%200%201%20.5-.5h5.783c1.347%200%202.46.345%203.24.982.783.64%201.216%201.562%201.216%202.683%200%201.13-.587%202.129-1.476%202.71a.35.35%200%200%200%20.049.613c1.259.56%202.101%201.742%202.101%203.22%200%201.282-.483%202.334-1.363%203.063-.876.726-2.132%201.12-3.66%201.12h-5.89ZM9.27%207.347v3.362h1.97c.766%200%201.347-.17%201.733-.464.38-.291.587-.716.587-1.27%200-.53-.183-.928-.513-1.198-.334-.273-.838-.43-1.505-.43H9.27Zm0%205.606v3.791h2.389c.832%200%201.448-.177%201.853-.497.399-.315.614-.786.614-1.423%200-.62-.22-1.077-.63-1.385-.418-.313-1.053-.486-1.905-.486H9.27Z%22%20fill%3D%22%23000%22%2F%3E%3C%2Fsvg%3E"); }

trix-toolbar .trix-button--icon-italic::before {
  background-image: url("data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M9%205h6.5v2h-2.23l-2.31%2010H13v2H6v-2h2.461l2.306-10H9V5Z%22%20fill%3D%22%23000%22%2F%3E%3C%2Fsvg%3E"); }

trix-toolbar .trix-button--icon-link::before {
  background-image: url("data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M18.948%205.258a4.337%204.337%200%200%200-6.108%200L11.217%206.87a.993.993%200%200%200%200%201.41c.392.39%201.027.39%201.418%200l1.623-1.613a2.323%202.323%200%200%201%203.271%200%202.29%202.29%200%200%201%200%203.251l-2.393%202.38a3.021%203.021%200%200%201-4.255%200l-.05-.049a1.007%201.007%200%200%200-1.418%200%20.993.993%200%200%200%200%201.41l.05.049a5.036%205.036%200%200%200%207.091%200l2.394-2.38a4.275%204.275%200%200%200%200-6.072Zm-13.683%2013.6a4.337%204.337%200%200%200%206.108%200l1.262-1.255a.993.993%200%200%200%200-1.41%201.007%201.007%200%200%200-1.418%200L9.954%2017.45a2.323%202.323%200%200%201-3.27%200%202.29%202.29%200%200%201%200-3.251l2.344-2.331a2.579%202.579%200%200%201%203.631%200c.392.39%201.027.39%201.419%200a.993.993%200%200%200%200-1.41%204.593%204.593%200%200%200-6.468%200l-2.345%202.33a4.275%204.275%200%200%200%200%206.072Z%22%20fill%3D%22%23000%22%2F%3E%3C%2Fsvg%3E"); }

trix-toolbar .trix-button--icon-strike::before {
  background-image: url("data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M6%2014.986c.088%202.647%202.246%204.258%205.635%204.258%203.496%200%205.713-1.728%205.713-4.463%200-.275-.02-.536-.062-.781h-3.461c.398.293.573.654.573%201.123%200%201.035-1.074%201.787-2.646%201.787-1.563%200-2.773-.762-2.91-1.924H6ZM6.432%2010h3.763c-.632-.314-.914-.715-.914-1.273%200-1.045.977-1.739%202.432-1.739%201.475%200%202.52.723%202.617%201.914h2.764c-.05-2.548-2.11-4.238-5.39-4.238-3.145%200-5.392%201.719-5.392%204.316%200%20.363.04.703.12%201.02ZM4%2011a1%201%200%201%200%200%202h15a1%201%200%201%200%200-2H4Z%22%20fill%3D%22%23000%22%2F%3E%3C%2Fsvg%3E"); }

trix-toolbar .trix-button--icon-quote::before {
  background-image: url("data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M4.581%208.471c.44-.5%201.056-.834%201.758-.995C8.074%207.17%209.201%207.822%2010%208.752c1.354%201.578%201.33%203.555.394%205.277-.941%201.731-2.788%203.163-4.988%203.56a.622.622%200%200%201-.653-.317c-.113-.205-.121-.49.16-.764.294-.286.567-.566.791-.835.222-.266.413-.54.524-.815.113-.28.156-.597.026-.908-.128-.303-.39-.524-.72-.69a3.02%203.02%200%200%201-1.674-2.7c0-.905.283-1.59.72-2.088Zm9.419%200c.44-.5%201.055-.834%201.758-.995%201.734-.306%202.862.346%203.66%201.276%201.355%201.578%201.33%203.555.395%205.277-.941%201.731-2.789%203.163-4.988%203.56a.622.622%200%200%201-.653-.317c-.113-.205-.122-.49.16-.764.294-.286.567-.566.791-.835.222-.266.412-.54.523-.815.114-.28.157-.597.026-.908-.127-.303-.39-.524-.72-.69a3.02%203.02%200%200%201-1.672-2.701c0-.905.283-1.59.72-2.088Z%22%20fill%3D%22%23000%22%2F%3E%3C%2Fsvg%3E"); }

trix-toolbar .trix-button--icon-heading-1::before {
  background-image: url("data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M21.5%207.5v-3h-12v3H14v13h3v-13h4.5ZM9%2013.5h3.5v-3h-10v3H6v7h3v-7Z%22%20fill%3D%22%23000%22%2F%3E%3C%2Fsvg%3E"); }

trix-toolbar .trix-button--icon-code::before {
  background-image: url("data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M3.293%2011.293a1%201%200%200%200%200%201.414l4%204a1%201%200%201%200%201.414-1.414L5.414%2012l3.293-3.293a1%201%200%200%200-1.414-1.414l-4%204Zm13.414%205.414%204-4a1%201%200%200%200%200-1.414l-4-4a1%201%200%201%200-1.414%201.414L18.586%2012l-3.293%203.293a1%201%200%200%200%201.414%201.414Z%22%20fill%3D%22%23000%22%2F%3E%3C%2Fsvg%3E"); }

trix-toolbar .trix-button--icon-bullet-list::before {
  background-image: url("data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M5%207.5a1.5%201.5%200%201%200%200-3%201.5%201.5%200%200%200%200%203ZM8%206a1%201%200%200%201%201-1h11a1%201%200%201%201%200%202H9a1%201%200%200%201-1-1Zm1%205a1%201%200%201%200%200%202h11a1%201%200%201%200%200-2H9Zm0%206a1%201%200%201%200%200%202h11a1%201%200%201%200%200-2H9Zm-2.5-5a1.5%201.5%200%201%201-3%200%201.5%201.5%200%200%201%203%200ZM5%2019.5a1.5%201.5%200%201%200%200-3%201.5%201.5%200%200%200%200%203Z%22%20fill%3D%22%23000%22%2F%3E%3C%2Fsvg%3E"); }

trix-toolbar .trix-button--icon-number-list::before {
  background-image: url("data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M3%204h2v4H4V5H3V4Zm5%202a1%201%200%200%201%201-1h11a1%201%200%201%201%200%202H9a1%201%200%200%201-1-1Zm1%205a1%201%200%201%200%200%202h11a1%201%200%201%200%200-2H9Zm0%206a1%201%200%201%200%200%202h11a1%201%200%201%200%200-2H9Zm-3.5-7H6v1l-1.5%202H6v1H3v-1l1.667-2H3v-1h2.5ZM3%2017v-1h3v4H3v-1h2v-.5H4v-1h1V17H3Z%22%20fill%3D%22%23000%22%2F%3E%3C%2Fsvg%3E"); }

trix-toolbar .trix-button--icon-undo::before {
  background-image: url("data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M3%2014a1%201%200%200%200%201%201h6a1%201%200%201%200%200-2H6.257c2.247-2.764%205.151-3.668%207.579-3.264%202.589.432%204.739%202.356%205.174%205.405a1%201%200%200%200%201.98-.283c-.564-3.95-3.415-6.526-6.825-7.095C11.084%207.25%207.63%208.377%205%2011.39V8a1%201%200%200%200-2%200v6Zm2-1Z%22%20fill%3D%22%23000%22%2F%3E%3C%2Fsvg%3E"); }

trix-toolbar .trix-button--icon-redo::before {
  background-image: url("data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M21%2014a1%201%200%200%201-1%201h-6a1%201%200%201%201%200-2h3.743c-2.247-2.764-5.151-3.668-7.579-3.264-2.589.432-4.739%202.356-5.174%205.405a1%201%200%200%201-1.98-.283c.564-3.95%203.415-6.526%206.826-7.095%203.08-.513%206.534.614%209.164%203.626V8a1%201%200%201%201%202%200v6Zm-2-1Z%22%20fill%3D%22%23000%22%2F%3E%3C%2Fsvg%3E"); }

trix-toolbar .trix-button--icon-decrease-nesting-level::before {
  background-image: url("data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M5%206a1%201%200%200%201%201-1h12a1%201%200%201%201%200%202H6a1%201%200%200%201-1-1Zm4%205a1%201%200%201%200%200%202h9a1%201%200%201%200%200-2H9Zm-3%206a1%201%200%201%200%200%202h12a1%201%200%201%200%200-2H6Zm-3.707-5.707a1%201%200%200%200%200%201.414l2%202a1%201%200%201%200%201.414-1.414L4.414%2012l1.293-1.293a1%201%200%200%200-1.414-1.414l-2%202Z%22%20fill%3D%22%23000%22%2F%3E%3C%2Fsvg%3E"); }

trix-toolbar .trix-button--icon-increase-nesting-level::before {
  background-image: url("data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M5%206a1%201%200%200%201%201-1h12a1%201%200%201%201%200%202H6a1%201%200%200%201-1-1Zm4%205a1%201%200%201%200%200%202h9a1%201%200%201%200%200-2H9Zm-3%206a1%201%200%201%200%200%202h12a1%201%200%201%200%200-2H6Zm-2.293-2.293%202-2a1%201%200%200%200%200-1.414l-2-2a1%201%200%201%200-1.414%201.414L3.586%2012l-1.293%201.293a1%201%200%201%200%201.414%201.414Z%22%20fill%3D%22%23000%22%2F%3E%3C%2Fsvg%3E"); }

trix-toolbar .trix-dialogs {
  position: relative; }

trix-toolbar .trix-dialog {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  font-size: 0.75em;
  padding: 15px 10px;
  background: #fff;
  box-shadow: 0 0.3em 1em #ccc;
  border-top: 2px solid #888;
  border-radius: 5px;
  z-index: 5; }

trix-toolbar .trix-input--dialog {
  font-size: inherit;
  font-weight: normal;
  padding: 0.5em 0.8em;
  margin: 0 10px 0 0;
  border-radius: 3px;
  border: 1px solid #bbb;
  background-color: #fff;
  box-shadow: none;
  outline: none;
  -webkit-appearance: none;
  -moz-appearance: none; }
  trix-toolbar .trix-input--dialog.validate:invalid {
    box-shadow: #F00 0px 0px 1.5px 1px; }

trix-toolbar .trix-button--dialog {
  font-size: inherit;
  padding: 0.5em;
  border-bottom: none; }

trix-toolbar .trix-dialog--link {
  max-width: 600px; }

trix-toolbar .trix-dialog__link-fields {
  display: flex;
  align-items: baseline; }
  trix-toolbar .trix-dialog__link-fields .trix-input {
    flex: 1; }
  trix-toolbar .trix-dialog__link-fields .trix-button-group {
    flex: 0 0 content;
    margin: 0; }

trix-editor [data-trix-mutable]:not(.attachment__caption-editor) {
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none; }

trix-editor [data-trix-mutable]::-moz-selection,
trix-editor [data-trix-cursor-target]::-moz-selection, trix-editor [data-trix-mutable] ::-moz-selection {
  background: none; }

trix-editor [data-trix-mutable]::selection,
trix-editor [data-trix-cursor-target]::selection, trix-editor [data-trix-mutable] ::selection {
  background: none; }

trix-editor .attachment__caption-editor:focus[data-trix-mutable]::-moz-selection {
  background: highlight; }

trix-editor .attachment__caption-editor:focus[data-trix-mutable]::selection {
  background: highlight; }

trix-editor [data-trix-mutable].attachment.attachment--file {
  box-shadow: 0 0 0 2px highlight;
  border-color: transparent; }

trix-editor [data-trix-mutable].attachment img {
  box-shadow: 0 0 0 2px highlight; }

trix-editor .attachment {
  position: relative; }
  trix-editor .attachment:hover {
    cursor: default; }

trix-editor .attachment--preview .attachment__caption:hover {
  cursor: text; }

trix-editor .attachment__progress {
  position: absolute;
  z-index: 1;
  height: 20px;
  top: calc(50% - 10px);
  left: 5%;
  width: 90%;
  opacity: 0.9;
  transition: opacity 200ms ease-in; }
  trix-editor .attachment__progress[value="100"] {
    opacity: 0; }

trix-editor .attachment__caption-editor {
  display: inline-block;
  width: 100%;
  margin: 0;
  padding: 0;
  font-size: inherit;
  font-family: inherit;
  line-height: inherit;
  color: inherit;
  text-align: center;
  vertical-align: top;
  border: none;
  outline: none;
  -webkit-appearance: none;
  -moz-appearance: none; }

trix-editor .attachment__toolbar {
  position: absolute;
  z-index: 1;
  top: -0.9em;
  left: 0;
  width: 100%;
  text-align: center; }

trix-editor .trix-button-group {
  display: inline-flex; }

trix-editor .trix-button {
  position: relative;
  float: left;
  color: #666;
  white-space: nowrap;
  font-size: 80%;
  padding: 0 0.8em;
  margin: 0;
  outline: none;
  border: none;
  border-radius: 0;
  background: transparent; }
  trix-editor .trix-button:not(:first-child) {
    border-left: 1px solid #ccc; }
  trix-editor .trix-button.trix-active {
    background: #cbeefa; }
  trix-editor .trix-button:not(:disabled) {
    cursor: pointer; }

trix-editor .trix-button--remove {
  text-indent: -9999px;
  display: inline-block;
  padding: 0;
  outline: none;
  width: 1.8em;
  height: 1.8em;
  line-height: 1.8em;
  border-radius: 50%;
  background-color: #fff;
  border: 2px solid highlight;
  box-shadow: 1px 1px 6px rgba(0, 0, 0, 0.25); }
  trix-editor .trix-button--remove::before {
    display: inline-block;
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    opacity: 0.7;
    content: "";
    background-image: url("data:image/svg+xml,%3Csvg%20height%3D%2224%22%20width%3D%2224%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M19%206.41%2017.59%205%2012%2010.59%206.41%205%205%206.41%2010.59%2012%205%2017.59%206.41%2019%2012%2013.41%2017.59%2019%2019%2017.59%2013.41%2012z%22%2F%3E%3Cpath%20d%3D%22M0%200h24v24H0z%22%20fill%3D%22none%22%2F%3E%3C%2Fsvg%3E");
    background-position: center;
    background-repeat: no-repeat;
    background-size: 90%; }
  trix-editor .trix-button--remove:hover {
    border-color: #333; }
    trix-editor .trix-button--remove:hover::before {
      opacity: 1; }

trix-editor .attachment__metadata-container {
  position: relative; }

trix-editor .attachment__metadata {
  position: absolute;
  left: 50%;
  top: 2em;
  transform: translate(-50%, 0);
  max-width: 90%;
  padding: 0.1em 0.6em;
  font-size: 0.8em;
  color: #fff;
  background-color: rgba(0, 0, 0, 0.7);
  border-radius: 3px; }
  trix-editor .attachment__metadata .attachment__name {
    display: inline-block;
    max-width: 100%;
    vertical-align: bottom;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap; }
  trix-editor .attachment__metadata .attachment__size {
    margin-left: 0.2em;
    white-space: nowrap; }

.trix-content {
  line-height: 1.5;
  overflow-wrap: break-word;
  word-break: break-word; }
  .trix-content * {
    box-sizing: border-box;
    margin: 0;
    padding: 0; }
  .trix-content h1 {
    font-size: 1.2em;
    line-height: 1.2; }
  .trix-content blockquote {
    border: 0 solid #ccc;
    border-left-width: 0.3em;
    margin-left: 0.3em;
    padding-left: 0.6em; }
  .trix-content [dir=rtl] blockquote,
  .trix-content blockquote[dir=rtl] {
    border-width: 0;
    border-right-width: 0.3em;
    margin-right: 0.3em;
    padding-right: 0.6em; }
  .trix-content li {
    margin-left: 1em; }
  .trix-content [dir=rtl] li {
    margin-right: 1em; }
  .trix-content pre {
    display: inline-block;
    width: 100%;
    vertical-align: top;
    font-family: monospace;
    font-size: 0.9em;
    padding: 0.5em;
    white-space: pre;
    background-color: #eee;
    overflow-x: auto; }
  .trix-content img {
    max-width: 100%;
    height: auto; }
  .trix-content .attachment {
    display: inline-block;
    position: relative;
    max-width: 100%; }
    .trix-content .attachment a {
      color: inherit;
      text-decoration: none; }
      .trix-content .attachment a:hover, .trix-content .attachment a:visited:hover {
        color: inherit; }
  .trix-content .attachment__caption {
    text-align: center; }
    .trix-content .attachment__caption .attachment__name + .attachment__size::before {
      content: ' \2022 '; }
  .trix-content .attachment--preview {
    width: 100%;
    text-align: center; }
    .trix-content .attachment--preview .attachment__caption {
      color: #666;
      font-size: 0.9em;
      line-height: 1.2; }
  .trix-content .attachment--file {
    color: #333;
    line-height: 1;
    margin: 0 2px 2px 2px;
    padding: 0.4em 1em;
    border: 1px solid #bbb;
    border-radius: 5px; }
  .trix-content .attachment-gallery {
    display: flex;
    flex-wrap: wrap;
    position: relative; }
    .trix-content .attachment-gallery .attachment {
      flex: 1 0 33%;
      padding: 0 0.5em;
      max-width: 33%; }
    .trix-content .attachment-gallery.attachment-gallery--2 .attachment, .trix-content .attachment-gallery.attachment-gallery--4 .attachment {
      flex-basis: 50%;
      max-width: 50%; }
/*
 * Provides a drop-in pointer for the default Trix stylesheet that will format the toolbar and
 * the trix-editor content (whether displayed or under editing). Feel free to incorporate this
 * inclusion directly in any other asset bundle and remove this file.
 *

*/

/*
 * We need to override trix.css’s image gallery styles to accommodate the
 * <action-text-attachment> element we wrap around attachments. Otherwise,
 * images in galleries will be squished by the max-width: 33%; rule.
*/
.trix-content .attachment-gallery > action-text-attachment,
.trix-content .attachment-gallery > .attachment {
  flex: 1 0 33%;
  padding: 0 0.5em;
  max-width: 33%;
}

.trix-content .attachment-gallery.attachment-gallery--2 > action-text-attachment,
.trix-content .attachment-gallery.attachment-gallery--2 > .attachment, .trix-content .attachment-gallery.attachment-gallery--4 > action-text-attachment,
.trix-content .attachment-gallery.attachment-gallery--4 > .attachment {
  flex-basis: 50%;
  max-width: 50%;
}

.trix-content action-text-attachment .attachment {
  padding: 0 !important;
  max-width: 100% !important;
}
/* ── Due Wines Page Styles ─────────────────────────────────────────────────────── */

.section {
  margin-bottom: 2rem;
}

.section__title {
  color: #374151;
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.wine-due-list {
  display: grid;
  gap: 1rem;
}

.wine-due-item {
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 1rem;
  transition: all 0.2s ease;
}

.wine-due-item:hover {
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.wine-due-item--urgent {
  border-left: 4px solid #dc2626;
  background: #fef2f2;
}

/* ── Wine Due Card Styles ─────────────────────────────────────────────────────── */

.wine-due-card {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.wine-due-card__main {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
}

.wine-due-card__info {
  flex: 1;
}

.wine-due-card__name {
  margin: 0 0 0.25rem 0;
  font-size: 1.1rem;
  font-weight: 600;
}

.wine-due-card__link {
  color: #111827;
  text-decoration: none;
}

.wine-due-card__link:hover {
  color: #7c3aed;
  text-decoration: underline;
}

.wine-due-card__meta {
  color: #6b7280;
  font-size: 0.9rem;
  margin: 0 0 0.5rem 0;
}

.wine-due-card__timing {
  text-align: right;
  min-width: 140px;
}

.wine-due-card__window {
  font-size: 0.9rem;
  color: #374151;
  display: block;
  margin-bottom: 0.25rem;
}

.urgency-badge {
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-size: 0.8rem;
  font-weight: 600;
}

.urgency-badge--overdue {
  background: #fef2f2;
  color: #dc2626;
}

.urgency-badge--this-year {
  background: #fef3c7;
  color: #d97706;
}

.urgency-badge--soon {
  background: #f0f9ff;
  color: #0284c7;
}

.wine-due-card__inventory {
  padding-top: 0.5rem;
  border-top: 1px solid #e5e7eb;
}

.inventory-info__bottles {
  font-weight: 600;
  color: #374151;
}

.inventory-info__details {
  margin-top: 0.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.inventory-entry {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem 0.5rem;
  background: #f9fafb;
  border-radius: 4px;
  font-size: 0.8rem;
}

.inventory-entry__quantity {
  font-weight: 600;
  color: #374151;
}

.inventory-entry__location {
  color: #6b7280;
}

/* ── Wine Style Badges (reuse from existing styles) ─────────────────────────────── */

.badge {
  display: inline-block;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: capitalize;
}

.badge--red {
  background: #fef2f2;
  color: #dc2626;
}

.badge--white {
  background: #f9fafb;
  color: #374151;
}

.badge--rosé {
  background: #fdf2f8;
  color: #ec4899;
}

.badge--sparkling {
  background: #fefce8;
  color: #ca8a04;
}

.badge--dessert {
  background: #f0f9ff;
  color: #0284c7;
}

.badge--fortified {
  background: #f5f3ff;
  color: #7c3aed;
}

/* ── Empty State Styles ─────────────────────────────────────────────────────── */

.empty-state {
  text-align: center;
  padding: 3rem 1rem;
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
}

.empty-state h3 {
  color: #374151;
  margin-bottom: 0.5rem;
}

.empty-state p {
  color: #6b7280;
  margin-bottom: 1.5rem;
}
/*
 * This is a manifest file that'll be compiled into application.css, which will include all the files
 * listed below.
 *
 * Any CSS (and SCSS, if configured) file within this directory, lib/assets/stylesheets, or any plugin's
 * vendor/assets/stylesheets directory can be referenced here using a relative path.
 *
 * You're free to add application-wide styles to this file and they'll appear at the bottom of the
 * compiled file so the styles you add here take precedence over styles defined in any other CSS
 * files in this directory. Styles in this file should be added after the last require_* statement.
 * It is generally better to create a new file per style scope.
 *


 */

/* ── Reset & base ─────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root {
    --color-bg:#faf8f5; --color-surface:#ffffff; --color-border:#e5e0d8;
    --color-text:#1a1208; --color-text-muted:#6b5d4f;
    --color-primary:#7b2d2d; --color-primary-h:#5c1e1e;
    --color-danger:#c0392b; --color-success:#27ae60;
    --radius:8px; --shadow:0 1px 3px rgba(0,0,0,.10),0 4px 12px rgba(0,0,0,.06);
    --font:system-ui,-apple-system,"Segoe UI",sans-serif;
}
body { font-family:var(--font); background:var(--color-bg); color:var(--color-text); line-height:1.55; min-height:100vh; }
a { color:var(--color-primary); text-decoration:none; }
a:hover { text-decoration:underline; }
.hidden { display:none !important; }

/* ── Buttons ─────────────────────────────────────────────────────────── */
.btn { display:inline-flex; align-items:center; gap:.4rem; padding:.55rem 1.1rem; border-radius:var(--radius); font-size:.9rem; font-weight:600; cursor:pointer; border:2px solid transparent; text-decoration:none; transition:background .15s,border-color .15s,opacity .15s; }
.btn--primary { background:var(--color-primary); color:#fff; }
.btn--primary:hover { background:var(--color-primary-h); }
.btn--ghost { background:transparent; border-color:var(--color-border); color:var(--color-text); }
.btn--ghost:hover { border-color:var(--color-primary); color:var(--color-primary); }
.btn--danger { background:var(--color-danger); color:#fff; border-color:var(--color-danger); }
.btn--danger:hover { opacity:.85; }
.btn--sm { padding:.3rem .7rem; font-size:.8rem; }
.btn--lg { padding:.75rem 1.6rem; font-size:1rem; }
.btn--active { background:var(--color-primary); color:#fff; }

/* ── Inputs ──────────────────────────────────────────────────────────── */
.input { width:100%; padding:.55rem .8rem; border:1.5px solid var(--color-border); border-radius:var(--radius); font-size:.95rem; background:var(--color-surface); transition:border-color .15s; }
.input:focus { outline:none; border-color:var(--color-primary); }
.input--search { max-width:340px; }
select.input { cursor:pointer; }
textarea.input { resize:vertical; min-height:80px; }

/* ── Navbar ──────────────────────────────────────────────────────────── */
.navbar { display:flex; align-items:center; gap:1.5rem; padding:.75rem 1.5rem; background:var(--color-surface); border-bottom:1px solid var(--color-border); position:sticky; top:0; z-index:100; flex-wrap:wrap; }
.navbar__brand { font-size:1.2rem; font-weight:700; color:var(--color-primary); text-decoration:none; flex-shrink:0; }
.navbar__menu { display:flex; align-items:center; gap:1rem; flex:1; }
.navbar__nav { display:flex; align-items:center; gap:.25rem; list-style:none; flex:1; }
.navbar__nav-link { padding:.35rem .7rem; border-radius:var(--radius); font-size:.9rem; font-weight:500; color:var(--color-text-muted); text-decoration:none; transition:background .15s,color .15s; }
.navbar__nav-link:hover { background:var(--color-bg); color:var(--color-text); text-decoration:none; }
.navbar__nav-link--active { color:var(--color-primary); font-weight:700; background:var(--color-bg); }
.navbar__actions { display:flex; align-items:center; gap:.75rem; margin-left:auto; }
.navbar__user { font-size:.85rem; color:var(--color-text-muted); }

/* Hamburger button — hidden on desktop */
.navbar__hamburger { display:none; flex-direction:column; justify-content:center; align-items:center; gap:5px; width:2.2rem; height:2.2rem; background:none; border:none; cursor:pointer; padding:.3rem; margin-left:auto; border-radius:var(--radius); }
.navbar__hamburger span { display:block; width:22px; height:2px; background:var(--color-text); border-radius:2px; transition:transform .25s,opacity .25s; }
/* Animate to ✕ when open */
.navbar--open .navbar__hamburger span:nth-child(1) { transform:translateY(7px) rotate(45deg); }
.navbar--open .navbar__hamburger span:nth-child(2) { opacity:0; }
.navbar--open .navbar__hamburger span:nth-child(3) { transform:translateY(-7px) rotate(-45deg); }

/* ── Flash ───────────────────────────────────────────────────────────── */
.flash { padding:.7rem 1.5rem; font-size:.9rem; font-weight:500; border-left:4px solid; }
.flash--notice { background:#edfaf3; border-color:var(--color-success); color:#145a32; }
.flash--alert  { background:#fdedec; border-color:var(--color-danger);  color:#78281f; }

/* ── Layout ──────────────────────────────────────────────────────────── */
.main-content { max-width:1100px; margin:0 auto; padding:2rem 1.5rem; }

/* ── Cellar grid ─────────────────────────────────────────────────────── */
.cellar-header { display:flex; align-items:baseline; gap:1rem; margin-bottom:1.5rem; }
.cellar-header h1 { font-size:1.75rem; }
.cellar-header__meta { color:var(--color-text-muted); font-size:.9rem; }
.cellar-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(220px,1fr)); gap:1.25rem; }
.wine-card { background:var(--color-surface); border:1px solid var(--color-border); border-radius:var(--radius); overflow:hidden; box-shadow:var(--shadow); display:flex; flex-direction:column; }
.wine-card__image { width:100%; aspect-ratio:3/4; object-fit:cover; background:#f0ebe4; }
.wine-card__image--placeholder { display:flex; align-items:center; justify-content:center; font-size:3rem; }
.wine-card__body { padding:.85rem 1rem; flex:1; }
.wine-card__title { font-size:.95rem; font-weight:700; margin-bottom:.25rem; }
.wine-card__meta  { font-size:.8rem; color:var(--color-text-muted); }
.wine-card__footer { display:flex; align-items:center; gap:.5rem; flex-wrap:wrap; padding:.6rem 1rem; border-top:1px solid var(--color-border); background:#faf8f5; }
.wine-card__qty   { font-weight:700; color:var(--color-primary); }
.wine-card__price { font-size:.8rem; color:var(--color-text-muted); margin-right:auto; }
.wine-card__actions { display:flex; gap:.4rem; margin-left:auto; }
.draft-banner { background:#fef9e7; border:1px solid #f9ca24; border-radius:var(--radius); padding:.7rem 1rem; font-size:.9rem; margin-bottom:1rem; }
.empty-state { text-align:center; padding:4rem 0; color:var(--color-text-muted); }
.empty-state p { margin-bottom:1rem; font-size:1.1rem; }

/* ── Add bottle ───────────────────────────────────────────────────────── */
.add-bottle { max-width:560px; margin:0 auto; }
.add-bottle h1 { margin-bottom:1.5rem; font-size:1.75rem; }
.add-method { background:var(--color-surface); border:1px solid var(--color-border); border-radius:var(--radius); padding:1.5rem; margin-bottom:.5rem; }
.add-method h2 { font-size:1.05rem; margin-bottom:.4rem; }
.add-method__hint { font-size:.85rem; color:var(--color-text-muted); margin-bottom:.9rem; }
.add-method__divider { text-align:center; color:var(--color-text-muted); font-size:.8rem; letter-spacing:.1em; text-transform:uppercase; padding:.4rem 0; }
.barcode-scanner { position:relative; width:100%; aspect-ratio:4/3; border-radius:var(--radius); overflow:hidden; background:#111; margin-bottom:.75rem; }
.barcode-scanner__video { width:100%; height:100%; object-fit:cover; }
.barcode-scanner__overlay { position:absolute; inset:0; display:flex; align-items:center; justify-content:center; }
.barcode-scanner__finder { width:65%; aspect-ratio:3/1; border:2.5px solid rgba(255,255,255,.8); border-radius:4px; box-shadow:0 0 0 9999px rgba(0,0,0,.45); background-image:url(/assets/barcode-649fa952d343c96bb54a539a2cf35223c1a434c45340b7e8238c687012596fc3.png); background-size:cover; background-position:center; background-repeat:no-repeat; opacity:.7; filter: invert(100%) }
.barcode-scanner__status { font-size:.85rem; color:var(--color-text-muted); min-height:1.3rem; margin-top:.5rem; }
.label-upload__drop { display:block; border:2px dashed var(--color-border); border-radius:var(--radius); padding:2rem 1rem; text-align:center; cursor:pointer; transition:border-color .15s; margin-bottom:.75rem; }
.label-upload__drop:hover { border-color:var(--color-primary); }
.label-upload__input { display:none; }
.label-upload__preview {     max-width: 100%; max-height: 200px; }

/* ── Review form ──────────────────────────────────────────────────────── */
.review-form { max-width:680px; margin:0 auto; }
.review-form h1 { font-size:1.6rem; margin-bottom:1rem; }
.review-form__confidence { display:flex; align-items:center; gap:1rem; margin-bottom:1.25rem; }
.review-form__label-thumb { width:80px; height:80px; object-fit:cover; border-radius:4px; border:1px solid var(--color-border); }
.review-form__processing { display:flex; align-items:center; gap:.75rem; padding:1rem; background:#eaf4fb; border-radius:var(--radius); margin-bottom:1rem; }
.review-form__fields { display:flex; flex-direction:column; gap:1.25rem; }
.review-form__actions { display:flex; gap:.75rem; padding-top:.5rem; }
.confidence-badge { display:inline-block; padding:.3rem .75rem; border-radius:999px; font-size:.8rem; font-weight:600; }
.confidence-badge--high { background:#edfaf3; color:#145a32; }
.confidence-badge--low  { background:#fef5e4; color:#7d6008; }
.fieldset { background:var(--color-surface); border:1px solid var(--color-border); border-radius:var(--radius); padding:1.25rem; }
.fieldset legend { font-weight:700; font-size:.85rem; color:var(--color-text-muted); text-transform:uppercase; letter-spacing:.06em; padding:0 .4rem; }
.field { display:flex; flex-direction:column; gap:.3rem; margin-top:.75rem; }
.field label { font-size:.85rem; font-weight:600; }
.field-row { display:flex; gap:.75rem; flex-wrap:wrap; }
.field-row .field { flex:1; min-width:140px; }

/* ── Wine list/detail ─────────────────────────────────────────────────── */
.page-header { display:flex; align-items:center; justify-content:space-between; gap:1rem; margin-bottom:1.5rem; flex-wrap:wrap; }
.page-header h1 { font-size:1.75rem; }
.search-form { display:flex; gap:.5rem; align-items:center; }
.wine-list { display:flex; flex-direction:column; gap:.75rem; }
.wine-list__item { display:flex; align-items:center; gap:1rem; background:var(--color-surface); border:1px solid var(--color-border); border-radius:var(--radius); padding:.75rem 1rem; }
.wine-list__image { width:52px; height:52px; object-fit:cover; border-radius:4px; flex-shrink:0; background:#f0ebe4; }
.wine-list__image--placeholder { display:flex; align-items:center; justify-content:center; font-size:1.5rem; }
.wine-list__body { flex:1; }
.wine-list__body h3 { font-size:.95rem; font-weight:700; }
.wine-list__meta,.wine-list__price { font-size:.8rem; color:var(--color-text-muted); }

/* wine-detail header */
.wine-detail__header { display:flex; gap:2rem; align-items:flex-start; margin-bottom:1.5rem; }
.wine-detail__image { width:160px; border-radius:var(--radius); box-shadow:var(--shadow); }
.wine-detail__meta { flex:1; display:flex; flex-direction:column; gap:.5rem; }
.wine-detail__region { color:var(--color-text-muted); font-size:.9rem; }
.wine-detail__badges { display:flex; gap:.4rem; flex-wrap:wrap; }
.badge--vintage { background:#e8eaf6; color:#283593; }
.wine-detail__grapes { font-size:.9rem; }
.wine-detail__drinking-window { font-size:.9rem; }

/* prose sections */
.wine-detail__sections { display:flex; flex-direction:column; gap:1rem; margin-bottom:1.5rem; }
.wine-detail__section { background:var(--color-surface); border:1px solid var(--color-border); border-radius:var(--radius); padding:1rem 1.25rem; }
.wine-detail__section-title { font-size:.75rem; font-weight:700; text-transform:uppercase; letter-spacing:.07em; color:var(--color-text-muted); margin-bottom:.4rem; }
.wine-detail__section p { line-height:1.7; }

/* quick-info table */
.wine-detail__info-table { width:100%; border-collapse:collapse; margin-bottom:1.5rem; font-size:.9rem; }
.wine-detail__info-table tr { border-bottom:1px solid var(--color-border); }
.wine-detail__info-table tr:last-child { border-bottom:none; }
.wine-detail__info-label { width:140px; padding:.5rem .75rem .5rem 0; font-weight:600; color:var(--color-text-muted); font-size:.8rem; text-transform:uppercase; letter-spacing:.05em; vertical-align:top; white-space:nowrap; }
.wine-detail__info-value { padding:.5rem 0; }
.wine-detail__barcode code { font-family:monospace; font-size:.95rem; }
.wine-detail__barcode-type { margin-left:.5rem; font-size:.75rem; color:var(--color-text-muted); }

.wine-detail__description { margin-bottom:1.25rem; color:var(--color-text-muted); line-height:1.7; }
.wine-detail__actions { display:flex; gap:.75rem; margin-bottom:1.5rem; flex-wrap:wrap; }
.wine-detail__snapshots summary { cursor:pointer; font-weight:600; font-size:.9rem; }

/* ── Badges ───────────────────────────────────────────────────────────── */
.badge { display:inline-block; padding:.2rem .6rem; border-radius:999px; font-size:.75rem; font-weight:600; }
.badge--red { background:#fde8e8; color:#7b1c1c; }
.badge--white { background:#fdf8e1; color:#6d5c00; }
.badge--sparkling { background:#e8f5e9; color:#1b5e20; }
.badge--dessert { background:#fff3e0; color:#e65100; }
.badge--fortified { background:#ede7f6; color:#311b92; }
.badge--pending { background:#e3f2fd; color:#0d47a1; }
.badge--processing { background:#fff9c4; color:#f57f17; }
.badge--completed { background:#e8f5e9; color:#1b5e20; }
.badge--failed { background:#fde8e8; color:#7b1c1c; }

/* ── Data table ───────────────────────────────────────────────────────── */
.data-table { width:100%; border-collapse:collapse; font-size:.9rem; margin-top:1rem; }
.data-table th { text-align:left; padding:.6rem .75rem; border-bottom:2px solid var(--color-border); font-size:.8rem; text-transform:uppercase; letter-spacing:.05em; color:var(--color-text-muted); }
.data-table td { padding:.6rem .75rem; border-bottom:1px solid var(--color-border); vertical-align:middle; }
.data-table tr:last-child td { border-bottom:none; }
.code-block { background:#1e1e1e; color:#d4d4d4; padding:1rem; border-radius:var(--radius); font-size:.8rem; overflow-x:auto; white-space:pre-wrap; word-break:break-all; }
.code-block--error { background:#2d1515; color:#f48771; }
.code-block--sm    { font-size:.73rem; max-height:8rem; overflow-y:auto; }

/* ── Back-label OCR panel (step 1 of add-bottle wizard) ── */
.back-ocr-panel {
  margin-top: .75rem;
  padding: .75rem 1rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: var(--color-surface, #fff);
}
.back-ocr-panel__spinner { display: flex; align-items: center; gap: .5rem; color: var(--color-muted, #666); font-size: .875rem; }
.back-ocr-panel__result  { }
.back-ocr-panel__label   { font-size: .8rem; font-weight: 600; margin: 0 0 .35rem; }

/* ── OCR context panel (step 3) ── */
.wizard-ocr-context { margin-bottom: 1rem; border: 1px solid var(--color-border); border-radius: var(--radius); padding: .5rem .75rem; font-size: .85rem; }
.wizard-ocr-context summary { cursor: pointer; font-weight: 600; user-select: none; }
.wizard-ocr-context__item { margin-top: .5rem; }
.wizard-ocr-context__label { font-size: .75rem; font-weight: 600; color: var(--color-muted, #666); margin: 0 0 .2rem; }

/* ── Auto-filled input (vintage detected from OCR) ── */
.input--autofilled {
  background: #fffbe6 !important;
  border-color: #e6ac00 !important;
  box-shadow: 0 0 0 3px rgba(230,172,0,.18);
  transition: background .3s, border-color .3s, box-shadow .3s;
}
/* Badge on the label that sits immediately before the autofilled input */
label:has(+ .input--autofilled)::after {
  content: " ✦ auto";
  font-size: .7rem;
  font-weight: 600;
  color: #b07d00;
  margin-left: .3rem;
}

/* ── Auto-filled input (vintage detected from OCR) ── */
.form-page__subtitle { color:var(--color-text-muted); margin-bottom:1.25rem; }
.form-page__actions { display:flex; gap:.75rem; margin-top:1.25rem; }
.label-preview { display:block; max-width:160px; max-height:220px; object-fit:contain; border-radius:var(--radius); border:1px solid var(--color-border); margin-bottom:.5rem; }
.label-preview__hint { font-size:.8rem; color:var(--color-text-muted); margin-bottom:.4rem; }
.label-remove { display:flex; align-items:center; gap:.4rem; font-size:.85rem; color:var(--color-text-muted); margin-bottom:.5rem; cursor:pointer; }
.spinner { width:20px; height:20px; border:2.5px solid var(--color-border); border-top-color:var(--color-primary); border-radius:50%; animation:spin .7s linear infinite; flex-shrink:0; }
@keyframes spin { to { transform:rotate(360deg); } }

/* ── Cellar entry edit – wine link row ────────────────────────────────── */
.edit-wine-link { display:flex; align-items:center; gap:.75rem; flex-wrap:wrap; background:var(--color-surface); border:1px solid var(--color-border); border-radius:var(--radius); padding:.75rem 1rem; margin-top:1rem; }
.edit-wine-link__label { font-size:.75rem; font-weight:700; text-transform:uppercase; letter-spacing:.06em; color:var(--color-text-muted); flex-shrink:0; }
.edit-wine-link__name  { flex:1; font-weight:600; font-size:.95rem; }
.edit-wine-link__actions { display:flex; gap:.4rem; margin-left:auto; }

/* ── Barcode search (cellar index) ────────────────────────────────────── */
.barcode-search { display:flex; align-items:center; gap:.5rem; flex-wrap:wrap; margin-bottom:1.25rem; }
.barcode-search__input { flex:1; min-width:180px; max-width:320px; }
.barcode-search__scan-btn { white-space:nowrap; }
.barcode-search__no-results { color:var(--color-text-muted); font-size:.9rem; margin-bottom:1rem; }

/* ── Scan modal ───────────────────────────────────────────────────────── */
.scan-modal { position:fixed; inset:0; z-index:400; display:flex; align-items:center; justify-content:center; }
.scan-modal.hidden { display:none !important; }
.scan-modal__backdrop { position:absolute; inset:0; background:rgba(0,0,0,.55); }
.scan-modal__panel { position:relative; background:var(--color-surface); border-radius:var(--radius); box-shadow:var(--shadow); width:min(92vw,420px); padding:1.25rem; display:flex; flex-direction:column; gap:.75rem; }
.scan-modal__header { display:flex; align-items:center; justify-content:space-between; }
.scan-modal__title { font-size:1.05rem; font-weight:700; }
.scan-modal__close { padding:.3rem .6rem; }

/* ── form-hint ──────────────────────────────────────────────────────────── */
.form-hint { display:block; margin-top:.3rem; font-size:.8rem; color:var(--color-text-muted); }

/* ── btn--icon ──────────────────────────────────────────────────────────── */
.btn--icon { padding:.4rem .65rem; font-size:1.1rem; line-height:1; border:1.5px solid var(--color-border); background:var(--color-surface); border-radius:var(--radius); cursor:pointer; transition:background .15s,border-color .15s; }
.btn--icon:hover { background:var(--color-bg); border-color:var(--color-primary); }

/* ── Grape-list widget ──────────────────────────────────────────────────── */
.grape-list { display:flex; flex-direction:column; gap:.5rem; }

/* One grape row: name | pct | % | − */
.grape-row { display:flex; align-items:center; gap:.4rem; }
.grape-row__name { flex:1 1 0; min-width:100px; }
.grape-row__pct  { width:5.5rem; flex-shrink:0; }
.grape-row__unit { font-size:.9rem; color:var(--color-text-muted); flex-shrink:0; }
.grape-row__remove { flex-shrink:0; color:var(--color-danger,#c0392b); border-color:var(--color-danger,#c0392b); }
.grape-row__remove:hover { background:var(--color-danger,#c0392b); color:#fff; }

/* "Add" row at the bottom */
.grape-add { display:flex; align-items:center; gap:.4rem; margin-top:.25rem; }
.grape-add__input { flex:1; }
.grape-add__btn { flex-shrink:0; color:var(--color-primary); border-color:var(--color-primary); }
.grape-add__btn:hover { background:var(--color-primary); color:#fff; }

@media (max-width:480px) {
  .grape-row__pct { width:4rem; }
}

/* ── Wizard ─────────────────────────────────────────────────────────────── */
.wizard { max-width:560px; margin:0 auto; }

/* Step dots header */
.wizard-header { display:flex; align-items:center; gap:1rem; margin-bottom:1.5rem; }
.wizard-dots { display:flex; align-items:center; gap:0; flex:1; justify-content:center; }
.wizard-dot { width:2rem; height:2rem; border-radius:50%; border:2px solid var(--color-border); background:var(--color-surface); color:var(--color-text-muted); font-size:.8rem; font-weight:700; display:flex; align-items:center; justify-content:center; flex-shrink:0; transition:background .2s,border-color .2s,color .2s; }
.wizard-dot--active { border-color:var(--color-primary); background:var(--color-primary); color:#fff; }
.wizard-dot--done   { border-color:var(--color-primary); background:var(--color-primary); color:#fff; opacity:.55; }
.wizard-dots__line  { flex:1; height:2px; background:var(--color-border); max-width:3rem; }

/* Panes */
.wizard-pane__title  { font-size:1.4rem; margin-bottom:.35rem; }
.wizard-pane__hint   { font-size:.9rem; color:var(--color-text-muted); margin-bottom:1rem; }
.wizard-pane__actions { display:flex; gap:.75rem; flex-wrap:wrap; margin-top:.75rem; }
.wizard-pane__skip   { margin-top:.75rem; }
.wizard-pane__capture-thumb { max-width:100%; max-height:140px; border-radius:var(--radius); border:1px solid var(--color-border); margin-top:.5rem; }

/* Match badge */
.wizard-match-badge { padding:.45rem .9rem; border-radius:var(--radius); font-size:.85rem; font-weight:600; margin-bottom:.5rem; }
.wizard-match-badge--db   { background:#edfaf3; color:#145a32; }
.wizard-match-badge--ai   { background:#fef9e7; color:#7d6008; }
.wizard-match-badge--warn { background:#fdf3e3; color:#7d4e08; }

/* Row that groups the match badge and the "clear match" button side by side */
.wizard-match-row { display:flex; align-items:center; gap:.6rem; flex-wrap:wrap; margin-bottom:.25rem; }

/* Detected barcode badge */
.wizard-barcode-display { padding:.35rem .8rem; border-radius:var(--radius); font-size:.8rem; font-family:monospace; background:#f0ebe4; color:var(--color-text-muted); border:1px solid var(--color-border); margin-bottom:1rem; }

/* Photo fallback in step 1 */
.wizard-pane__photo-fallback { margin-top:1.25rem; padding-top:1rem; border-top:1px solid var(--color-border); }
.wizard-pane__no-match { margin-top:.75rem; display:flex; flex-direction:column; gap:.5rem; }

/* Wine-found panel */
.wizard-pane__wine-found { margin-top:.75rem; display:flex; flex-direction:column; gap:.75rem; }
.wine-found-card { background:#edfaf3; border:1px solid #a9dfbf; border-radius:var(--radius); padding:.75rem 1rem; }
.wine-found-card__label { font-size:.8rem; font-weight:700; color:#145a32; margin-bottom:.35rem; }
.wine-found-card__name  { font-weight:700; font-size:.95rem; color:var(--color-text); margin-bottom:.35rem; }
.wine-found-card__rows  { display:flex; flex-wrap:wrap; gap:.2rem .75rem; }
.wine-found-card__row   { font-size:.82rem; color:var(--color-text-muted); }
.wine-found-card__row strong { color:var(--color-text); font-weight:600; }

/* ── Crop modal ──────────────────────────────────────────────────────────── */
.crop-modal { position:fixed; inset:0; z-index:600; display:flex; align-items:center; justify-content:center; background:rgba(0,0,0,.72); padding:1rem; }
.crop-modal.hidden { display:none !important; }
.crop-modal__inner { background:var(--color-surface); border-radius:var(--radius); box-shadow:var(--shadow); width:min(94vw,640px); display:flex; flex-direction:column; overflow:hidden; max-height:92vh; }
.crop-modal__header { padding:.65rem 1rem .4rem; border-bottom:1px solid var(--color-border); }
.crop-modal__title  { font-weight:700; font-size:1rem; }
.crop-modal__hint   { font-size:.78rem; color:var(--color-text-muted); margin-top:.15rem; }
.crop-modal__img-wrap { position:relative; background:#111; line-height:0; touch-action:none; user-select:none; overflow:hidden; flex:1; }
.crop-modal__img    { display:block; width:100%; max-height:calc(92vh - 130px); object-fit:contain; }
.crop-modal__selection {
  position:absolute; border:2px solid #fff; cursor:move; box-sizing:border-box; touch-action:none;
  box-shadow:0 0 0 9999px rgba(0,0,0,.45);
}
.crop-handle {
  position:absolute; width:20px; height:20px;
  background:#fff; border:2px solid rgba(0,0,0,.35); border-radius:3px; touch-action:none;
}
.crop-handle--nw { top:-10px;  left:-10px;  cursor:nw-resize; }
.crop-handle--ne { top:-10px;  right:-10px; cursor:ne-resize; }
.crop-handle--sw { bottom:-10px; left:-10px;  cursor:sw-resize; }
.crop-handle--se { bottom:-10px; right:-10px; cursor:se-resize; }
/* rule-of-thirds guides */
.crop-rule-h, .crop-rule-v { position:absolute; background:rgba(255,255,255,.25); pointer-events:none; }
.crop-rule-h { left:0; right:0; height:1px; top:33.33%; }
.crop-rule-h + .crop-rule-h { top:66.66%; }
.crop-rule-v { top:0; bottom:0; width:1px; left:33.33%; }
.crop-rule-v + .crop-rule-v { left:66.66%; }
.crop-modal__footer { padding:.65rem 1rem; border-top:1px solid var(--color-border); display:flex; gap:.75rem; justify-content:flex-end; flex-shrink:0; }

@media (max-width:480px) {
  .wizard-dots__line { max-width:1.5rem; }
}


/* ── Admin filter panel (Ransack) ─────────────────────────────────── */
.filter-panel { background:var(--color-surface); border:1px solid var(--color-border); border-radius:var(--radius); padding:1rem 1.25rem 1.25rem; margin-bottom:1.25rem; }
.filter-panel__grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(180px,1fr)); gap:.75rem 1rem; }
.filter-panel__actions { display:flex; gap:.75rem; margin-top:1rem; align-items:center; flex-wrap:wrap; }

/* ── Filter chips (filter-tags Stimulus controller) ───────────────── */
.filter-tags { display:flex; flex-wrap:wrap; gap:.4rem; margin-top:.85rem; margin-bottom:.1rem; }
.filter-chip { display:inline-flex; align-items:center; gap:.2rem; background:var(--color-primary); color:#fff; border-radius:999px; padding:.2rem .55rem .2rem .75rem; font-size:.8rem; font-weight:600; line-height:1.4; }
.filter-chip__sep { opacity:.65; margin:0 .05rem; }
.filter-chip__val { font-weight:400; }
.filter-chip__remove { display:inline-flex; align-items:center; justify-content:center; background:rgba(255,255,255,.25); border:none; color:#fff; cursor:pointer; font-size:.85rem; line-height:1; width:1.2rem; height:1.2rem; border-radius:50%; margin-left:.25rem; padding:0; transition:background .15s; }
.filter-chip__remove:hover { background:rgba(255,255,255,.45); }
/* Ransack sort links */
.data-table th a { color:var(--color-text); text-decoration:none; display:inline-flex; align-items:center; gap:.3rem; }
.data-table th a:hover { color:var(--color-primary); }
.data-table th a::after { content:"⇅"; font-size:.7rem; color:var(--color-text-muted); }
.data-table th a[data-direction="asc"]::after  { content:"↑"; color:var(--color-primary); }
.data-table th a[data-direction="desc"]::after { content:"↓"; color:var(--color-primary); }

/* ── Histogram range slider ────────────────────────────────────────── */
/* The field--wide modifier spans the full filter grid width */
.filter-panel__grid .field--wide { grid-column: 1 / -1; }

.histogram-range { display:flex; flex-direction:column; gap:.25rem; }
.histogram-range__heading { font-size:.85rem; font-weight:600; margin-bottom:.15rem; }

/* SVG chart */
.histogram-range__chart { display:block; width:100%; height:52px; border-radius:var(--radius) var(--radius) 0 0; background:var(--color-bg); }
.hr-bar { fill:var(--color-border); transition:fill .15s; }
.hr-bar--active { fill:var(--color-primary); opacity:.75; }

/* Slider track + fill */
.histogram-range__slider-wrap { position:relative; height:24px; }
.histogram-range__track { position:absolute; top:50%; left:0; right:0; height:4px; transform:translateY(-50%); background:var(--color-border); border-radius:2px; }
.histogram-range__fill  { position:absolute; top:0; height:100%; background:var(--color-primary); border-radius:2px; }

/* Two range inputs stacked — only thumbs get pointer events */
.histogram-range__thumb {
  position:absolute; top:50%; transform:translateY(-50%);
  width:100%; height:4px; margin:0; padding:0;
  appearance:none; -webkit-appearance:none;
  background:transparent; border:none; outline:none;
  pointer-events:none;
}
.histogram-range__thumb--lo { z-index:4; }
.histogram-range__thumb--hi { z-index:5; }

.histogram-range__thumb::-webkit-slider-thumb {
  -webkit-appearance:none; appearance:none;
  width:16px; height:16px; border-radius:50%;
  background:var(--color-primary); border:2px solid #fff;
  box-shadow:0 1px 4px rgba(0,0,0,.25);
  cursor:pointer; pointer-events:all;
}
.histogram-range__thumb::-moz-range-thumb {
  width:16px; height:16px; border-radius:50%;
  background:var(--color-primary); border:2px solid #fff;
  box-shadow:0 1px 4px rgba(0,0,0,.25);
  cursor:pointer; pointer-events:all;
  border:2px solid #fff;
}
.histogram-range__thumb:focus-visible::-webkit-slider-thumb { outline:2px solid var(--color-primary); outline-offset:2px; }

/* Labels row */
.histogram-range__labels { display:flex; justify-content:space-between; align-items:center; font-size:.78rem; color:var(--color-text-muted); margin-top:.15rem; }
.histogram-range__selection { font-weight:600; color:var(--color-primary); font-size:.82rem; }
.histogram-range__bound { flex-shrink:0; }

/* Number inputs row */
.histogram-range__inputs { display:flex; align-items:center; gap:.5rem; margin-top:.5rem; }
.histogram-range__input-wrap { display:flex; align-items:center; gap:.2rem; flex:1; }
.histogram-range__input-unit { font-size:.85rem; color:var(--color-text-muted); flex-shrink:0; }
.histogram-range__input { width:100%; min-width:0; padding:.3rem .5rem; font-size:.85rem; text-align:right; }
.histogram-range__inputs-sep { flex-shrink:0; color:var(--color-text-muted); font-size:.9rem; }
.price-range { font-variant-numeric:tabular-nums; white-space:nowrap; }
.price-range__sep { color:var(--color-text-muted); margin:0 .15rem; }

/* ── Multi-tag input ──────────────────────────────────────────────── */
.multitag-input {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .3rem;
  min-height: 2.35rem;
  padding: .25rem .5rem;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius);
  background: var(--color-surface);
  cursor: text;
  transition: border-color .15s;
}
.multitag-input:focus-within { border-color: var(--color-primary); }
.multitag-tags { display: contents; }
.multitag-tag {
  display: inline-flex;
  align-items: center;
  gap: .2rem;
  padding: .15rem .35rem .15rem .55rem;
  background: var(--color-primary);
  color: #fff;
  border-radius: 999px;
  font-size: .78rem;
  font-weight: 600;
  white-space: nowrap;
}
.multitag-tag__remove {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1rem;
  height: 1rem;
  padding: 0;
  border: none;
  background: rgba(255,255,255,.25);
  border-radius: 50%;
  color: #fff;
  font-size: .8rem;
  line-height: 1;
  cursor: pointer;
}
.multitag-tag__remove:hover { background: rgba(255,255,255,.45); }
.multitag-input__field {
  flex: 1;
  min-width: 80px;
  border: none;
  outline: none;
  background: transparent;
  font-size: .95rem;
  padding: .25rem .2rem;
}
/* Let the autocomplete wrap grow inside the multitag box */
.multitag-input .autocomplete-wrap { flex: 1; min-width: 80px; position: relative; }

/* ── Style pills ──────────────────────────────────────────────────── */
.style-pills {
  display: flex;
  flex-wrap: wrap;
  gap: .3rem;
  padding-top: .1rem;
}
.style-pill {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  padding: .22rem .7rem;
  border: 1.5px solid var(--color-border);
  border-radius: 999px;
  font-size: .82rem;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s, border-color .15s, color .15s;
  user-select: none;
}
.style-pill:hover { border-color: var(--color-primary); color: var(--color-primary); }
.style-pill__checkbox { display: none; }
/* CSS :has() toggles active state without JS */
.style-pill:has(.style-pill__checkbox:checked) {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: #fff;
}
.style-pill:has(.style-pill__checkbox:checked):hover {
  background: var(--color-primary-h);
}

/* ── Autocomplete dropdown ─────────────────────────────────────────── */
.autocomplete-wrap { position:relative; }
.autocomplete-list { position:absolute; top:calc(100% + 2px); left:0; right:0; z-index:200; background:var(--color-surface); border:1.5px solid var(--color-primary); border-radius:var(--radius); box-shadow:var(--shadow); max-height:220px; overflow-y:auto; list-style:none; padding:.25rem 0; margin:0; }
.autocomplete-list__item { display:flex; align-items:center; justify-content:space-between; gap:.5rem; padding:.4rem .8rem; cursor:pointer; font-size:.9rem; }
.autocomplete-list__item:hover,
.autocomplete-list__item--active { background:var(--color-bg); color:var(--color-primary); }
.autocomplete-list__item-label { flex:1; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.autocomplete-list__item-count { flex-shrink:0; font-size:.72rem; font-weight:700; color:var(--color-text-muted); background:var(--color-bg); border:1px solid var(--color-border); border-radius:999px; padding:.05rem .45rem; line-height:1.6; }
.autocomplete-list__item:hover .autocomplete-list__item-count,
.autocomplete-list__item--active .autocomplete-list__item-count { border-color:var(--color-primary); color:var(--color-primary); }

/* ── Taste-profile rating sliders ───────────────────────────────────────── */
.taste-slider { display:flex; flex-direction:column; gap:.2rem; margin-bottom:.9rem; }
.taste-slider__header { display:flex; justify-content:space-between; align-items:baseline; }
.taste-slider__label  { font-size:.85rem; font-weight:600; }
.taste-slider__value  {
  font-size:.9rem; font-weight:700; color:var(--color-primary);
  min-width:1.6rem; text-align:right;
}
.taste-slider input[type="range"] {
  -webkit-appearance:none; appearance:none;
  width:100%; height:6px; border-radius:3px; cursor:pointer; margin:.35rem 0;
  background:linear-gradient(
    to right,
    var(--color-primary) var(--fill-pct, 50%),
    var(--color-border)  var(--fill-pct, 50%)
  );
}
.taste-slider input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance:none; appearance:none;
  width:18px; height:18px; border-radius:50%;
  background:var(--color-primary); border:2px solid #fff;
  box-shadow:0 1px 3px rgba(0,0,0,.25); cursor:pointer; margin-top:0;
}
.taste-slider input[type="range"]::-moz-range-thumb {
  width:18px; height:18px; border-radius:50%;
  background:var(--color-primary); border:2px solid #fff;
  box-shadow:0 1px 3px rgba(0,0,0,.25); cursor:pointer;
}
.taste-slider input[type="range"]:focus-visible { outline:none; }
.taste-slider input[type="range"]:focus-visible::-webkit-slider-thumb { outline:2px solid var(--color-primary); outline-offset:2px; }
.taste-slider__endpoints { display:flex; justify-content:space-between; font-size:.72rem; color:var(--color-text-muted); }
.taste-slider--unset .taste-slider__value { color:var(--color-text-muted); font-weight:400; }
.taste-slider__unset-row { display:flex; align-items:center; gap:.6rem; padding:.35rem 0; }
.taste-slider__not-set-label { margin-top:0 !important; }
.taste-slider__activate { }
.taste-slider__reset {
  display:inline-block; margin-top:.3rem;
  font-size:.72rem; color:var(--color-text-muted);
  background:none; border:none; cursor:pointer; padding:0;
  text-decoration:underline; text-underline-offset:2px;
}
.taste-slider__reset:hover { color:var(--color-danger, #c0392b); }

@media (max-width:768px) {
  .main-content { padding:1.25rem 1rem; }
  .wine-detail__header,.field-row,.review-form__actions { flex-direction:column; }

  /* Keep navbar as a row so brand + hamburger sit side-by-side */
  .navbar { padding:.6rem 1rem; gap:0; flex-direction:row; flex-wrap:wrap; align-items:center; }

  /* Show hamburger, push it to the far right */
  .navbar__hamburger { display:flex; margin-left:auto; }

  /* Menu: hidden by default; when open it spans full width on a new row */
  .navbar__menu {
    display:none;
    flex-direction:column;
    align-items:stretch;
    gap:0;
    flex:0 0 100%;
    border-top:1px solid var(--color-border);
    padding-top:.6rem;
    margin-top:.4rem;
  }
  .navbar--open .navbar__menu { display:flex; }

  .navbar__nav { flex-direction:column; align-items:stretch; gap:.1rem; }
  .navbar__nav-link { display:block; padding:.6rem .75rem; font-size:1rem; }

  .navbar__actions {
    flex-direction:column;
    align-items:stretch;
    gap:.5rem;
    margin-left:0;
    padding-top:.6rem;
    border-top:1px solid var(--color-border);
    margin-top:.4rem;
  }
  .navbar__actions .btn { width:100%; justify-content:center; }
  .navbar__actions form { width:100%; }
  .navbar__actions form .btn { width:100%; justify-content:center; }
  .navbar__user { font-size:.85rem; padding:.2rem .75rem; }
  .locale-switcher { margin-left:0; }
}

/* ── Cellar filter tabs ───────────────────────────────────────────────── */
.cellar-filter-tabs { display:flex; gap:.4rem; margin-bottom:1rem; }

/* ── Finished wine card ──────────────────────────────────────────────── */
.wine-card--finished { opacity:.8; }
.wine-card--finished .wine-card__image { filter:grayscale(35%); }
.badge--finished { background:#e8e8e8; color:#555; }
.wine-card__qty--empty { color:var(--color-text-muted); }

/* ── Consumption panel (details/summary) ─────────────────────────────── */
.consumption-panel { border-top:1px solid var(--color-border); }
.consumption-panel__toggle {
  list-style:none; cursor:pointer;
  padding:.55rem 1rem; font-size:.82rem; font-weight:600;
  color:var(--color-text-muted);
  user-select:none;
  display:flex; align-items:center; gap:.35rem;
}
.consumption-panel__toggle::-webkit-details-marker { display:none; }
.consumption-panel__toggle::after { content:"▾"; margin-left:auto; font-size:.75rem; }
details[open] .consumption-panel__toggle::after { content:"▴"; }
.consumption-panel__body { padding:.75rem 1rem .85rem; display:flex; flex-direction:column; gap:.6rem; }

/* ── Log-a-drink form ────────────────────────────────────────────────── */
.consumption-form__row { display:flex; align-items:center; gap:.4rem; flex-wrap:wrap; }
.consumption-form__qty  { width:4.5rem; flex-shrink:0; }
.consumption-form__date { flex-shrink:0; }
.consumption-form__notes { flex:1; min-width:100px; }
.consumption-form__error { font-size:.82rem; color:var(--color-danger); margin-top:.3rem; }

/* ── Consumption history list ────────────────────────────────────────── */
.consumption-history { list-style:none; display:flex; flex-direction:column; gap:.3rem; margin:0; padding:0; }
.consumption-history__empty { font-size:.82rem; color:var(--color-text-muted); }

.consumption-item {
  display:flex; align-items:center; gap:.5rem; flex-wrap:wrap;
  font-size:.82rem; padding:.35rem .5rem;
  border-radius:var(--radius);
  background:var(--color-bg);
}
.consumption-item--editing { background:#f8f4ef; }
.consumption-item__date  { font-weight:600; white-space:nowrap; }
.consumption-item__qty   { color:var(--color-primary); font-weight:700; }
.consumption-item__notes { color:var(--color-text-muted); flex:1; font-style:italic; }
.consumption-item__actions { display:flex; gap:.25rem; margin-left:auto; }

/* ── Consumption History Page ─────────────────────────────────────────────── */
.consumption-history { margin-top:1.5rem; }
.consumption-month { margin-bottom:2.5rem; }
.consumption-month__title {
    font-size:1.3rem;
    font-weight:600;
    color:var(--color-text);
    margin-bottom:1rem;
    padding-bottom:.5rem;
    border-bottom:1px solid var(--color-border);
}
.consumption-month__count {
    font-size:.9rem;
    font-weight:400;
    color:var(--color-text-muted);
}

.consumption-list { display:flex; flex-direction:column; gap:.75rem; }
.consumption-card {
    background:var(--color-surface);
    border:1px solid var(--color-border);
    border-radius:var(--radius);
    padding:1rem;
    box-shadow:var(--shadow);
}

.consumption-card__header {
    display:flex;
    justify-content:space-between;
    align-items:center;
    margin-bottom:.75rem;
}

.consumption-card__date {
    font-size:.9rem;
    color:var(--color-text-muted);
    font-weight:500;
}

.consumption-card__quantity {
    font-size:.9rem;
    color:var(--color-primary);
    font-weight:700;
}

.consumption-card__wine { margin-bottom:.5rem; }
.consumption-card__wine-name {
    margin-bottom:.25rem;
}
.consumption-card__wine-name strong {
    color:var(--color-text);
    font-size:1.05rem;
}

.consumption-card__wine-details {
    display:flex;
    gap:.75rem;
    flex-wrap:wrap;
    font-size:.85rem;
    color:var(--color-text-muted);
}

.consumption-card__notes {
    margin-top:.75rem;
    padding-top:.75rem;
    border-top:1px solid var(--color-border);
    font-size:.9rem;
    color:var(--color-text);
}

.wine-link { color:var(--color-primary); text-decoration:none; }
.wine-link:hover { text-decoration:underline; }

.text-link { color:var(--color-primary); text-decoration:underline; }
.page-actions { margin-top:2rem; }

/* ── AI prefill button row (step 3 of wizard) ───────────────────────────── */
.ai-prefill-row { display:flex; align-items:center; gap:.75rem; margin-bottom:.85rem; }
.ai-prefill-row__spinner { display:flex; align-items:center; gap:.4rem; font-size:.85rem; color:var(--color-text-muted); }
.ai-prefill-row__error { font-size:.85rem; color:var(--color-danger, #c0392b); }

/* ── Locale switcher ─────────────────────────────────────────────────── */
.locale-switcher {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-left: 1rem;
}
.locale-switcher__link {
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--color-text-muted);
  text-decoration: none;
  transition: background-color 0.15s, color 0.15s;
}
.locale-switcher__link:hover {
  background-color: rgba(123, 45, 45, 0.1);
  color: var(--color-primary);
  text-decoration: none;
}
.locale-switcher__link--active {
  background-color: var(--color-primary);
  color: white;
}
.locale-switcher__separator {
  color: var(--color-text-muted);
  font-size: 0.8rem;
}
