@import url(https://fonts.googleapis.com/css?family=Source+Sans+Pro);.clearfix:after,.clearfix:before{content:" ";display:table}.clearfix:after{clear:both}body,html{margin:0;padding:0}body{background-image:url(images/background.png);background-color:#000;background-size:cover;background-attachment:fixed;background-repeat:no-repeat;background-position:50% 100%;color:#111;font-size:14px;font-family:Source Sans Pro,Verdana}body.sidebar_open{overflow:hidden}body a:focus,body a:hover{text-decoration:none}body .btn,body a,body button{-webkit-transition:all .2s;-moz-transition:all .2s;-ms-transition:all .2s;-o-transition:all .2s;transition:all .2s}body hr{border-color:#ddd}body .btn.active,body .btn:active,body .btn:active:focus,body .btn:focus,body button.active,body button:active,body button:active:focus,body button:focus{outline:0}body label{font-weight:400}body .panel.panel-default{border-radius:0;border-color:#ccc;background-color:#f5f5f5}body .panel.panel-default .panel-heading{background-color:#ddd;border-color:#ccc;border-radius:0}@media only screen and (max-width:1530px){html body #content{padding-right:70px}html body #content #top_menu{margin-right:-70px;padding-right:70px}}header{margin:4px auto;max-width:1400px;cursor:default}header .logo{height:60px;width:auto}header .page_title{font-size:28px;font-weight:700;text-transform:uppercase;color:#f9b200;text-shadow:-1px 2px 0 rgba(90,0,0,.6);display:inline-block;margin-left:15px;position:relative;top:7px}@media only screen and (max-width:991px){header{padding-left:10px}header .logo{height:50px}header .page_title{font-size:20px}}#sidebar_backdrop{position:fixed;top:0;left:0;width:0;height:0%;z-index:9;background-color:rgba(0,0,0,0);cursor:pointer;-webkit-transition:background-color .4s;-moz-transition:background-color .4s;-ms-transition:background-color .4s;-o-transition:background-color .4s;transition:background-color .4s}#sidebar_backdrop.open{width:100%;height:100%;background-color:rgba(0,0,0,.5)}#sidebar{width:450px;height:100%;position:fixed;top:0;right:-450px;z-index:10;background-color:#f0f0f0;border-left:1px solid #aaa;box-sizing:border-box;-webkit-transition:right .2s;-moz-transition:right .2s;-ms-transition:right .2s;-o-transition:right .2s;transition:right .2s}@media only screen and (max-width:991px){#sidebar{width:0}#sidebar.open{width:90%}#sidebar.open .sb_buttons{right:100%}}#sidebar.open{right:0;box-shadow:-2px 0 4px rgba(0,0,0,.2)}#sidebar.open .sb_buttons{padding-right:0}#sidebar.open .sb_buttons li{margin-right:0;border-radius:6px 0 0 6px;position:relative;right:-7px;border-right:0;box-shadow:-2px 0 2px rgba(0,0,0,.05) inset}#sidebar.open .sb_buttons li.active{right:0;border-left-width:4px;background-color:#f0f0f0}#sidebar.open .sb_buttons li:not(.active){box-shadow:-10px 0 4px rgba(0,0,0,.15) inset}#sidebar.open .sb_content .sb_section.active{display:block}#sidebar .sb_buttons{position:absolute;right:450px;margin:0;padding:10px;margin-top:48px;list-style:none;overflow:hidden}#sidebar .sb_buttons li{background-color:#ddd;border:1px solid #aaa;box-shadow:0 2px 2px rgba(0,0,0,.55);color:#333;margin:0;padding:0;margin-top:15px;width:50px;height:50px;border-radius:6px;cursor:pointer;font-size:24px;padding:7px 13px;box-sizing:border-box;-webkit-transition:all .2s;-moz-transition:all .2s;-ms-transition:all .2s;-o-transition:all .2s;transition:all .2s}#sidebar .sb_buttons li:hover{background-color:#eee}#sidebar .sb_content{overflow-y:scroll;overflow-x:hidden;position:absolute;top:0;bottom:0;left:0;right:-17px}#sidebar .sb_content .sb_section{display:none}#sidebar .sb_content .sb_section.panel{border:0;border-radius:0;box-shadow:none;background-color:transparent}#sidebar .sb_content .sb_section.panel .panel-body{padding-right:20px}#sidebar .sb_content .sb_section.panel .panel-heading{border-color:#ccc;background-color:#ddd;padding:15px;padding-right:20px;position:relative;border-radius:0}#sidebar .sb_content .sb_section.panel .panel-heading .panel-title{font-weight:700;margin-left:48px}#sidebar .sb_content .sb_section.panel .panel-heading .back{position:absolute;top:0;left:0;width:48px;height:48px;background-color:transparent;color:#aaa;font-size:22px;padding:9px 13px;cursor:pointer;-webkit-transition:all .2s;-moz-transition:all .2s;-ms-transition:all .2s;-o-transition:all .2s;transition:all .2s}#sidebar .sb_content .sb_section.panel .panel-heading .back:hover{background-color:#ccc}#sb_cropinfo .filter label{margin-right:8px}#sb_cropinfo .filter .search{margin-top:5px}#sb_cropinfo .crops_container{position:absolute;top:180px;bottom:0;left:0;right:-17px;padding:15px;overflow-y:scroll;overflow-x:hidden;border-top:1px solid #ddd;min-height:250px}#sb_cropinfo .crops_container .crops thead th{cursor:pointer}#sb_cropinfo .crops_container .crops tbody tr{cursor:pointer}#sb_cropinfo .crops_container .crops tbody tr td{-webkit-transition:all .2s;-moz-transition:all .2s;-ms-transition:all .2s;-o-transition:all .2s;transition:all .2s}#sb_cropinfo .crops_container .crops tbody tr:hover td{background-color:#fff}#sb_cropinfo .crop_info .ci_header{margin-bottom:20px}#sb_cropinfo .crop_info .ci_header:after,#sb_cropinfo .crop_info .ci_header:before{content:" ";display:table}#sb_cropinfo .crop_info .ci_header:after{clear:both}#sb_cropinfo .crop_info .ci_header img{float:left;margin-right:15px}#sb_cropinfo .crop_info .ci_header .ci_name{font-size:18px;font-weight:700}#sb_cropinfo .crop_info .ci_header .ci_seasons{color:#777;text-transform:capitalize}#sb_cropinfo .crop_info table tr:first-child td,#sb_cropinfo .crop_info table tr:first-child th{border-top-width:2px}#sb_cropinfo .crop_info table .fa{color:#888;font-size:13px;margin-right:5px}#sb_settings .farm_professions button{margin-top:5px;margin-right:5px}#sb_settings .farm_professions .btn-success{opacity:1}#sb_settings .farm_professions .btn-default{opacity:.6}#sb_settings .farm_level{overflow:hidden}#sb_settings .farm_level label{width:100%}#sb_settings .farm_level .chance_scale{height:25px;border:1px solid #888;border-radius:0}#sb_settings .farm_level .chance_scale:after,#sb_settings .farm_level .chance_scale:before{content:" ";display:table}#sb_settings .farm_level .chance_scale:after{clear:both}#sb_settings .farm_level .chance_scale>div{height:100%;float:left;position:relative;box-sizing:border-box}#sb_settings .farm_level .chance_scale>div:not(:last-child){border-right:1px solid #aaa}#sb_settings .farm_level .chance_scale>div.regular{background-color:#bf8550}#sb_settings .farm_level .chance_scale>div.silver{background-color:silver;background:linear-gradient(135deg,#f2f6f8 0,#d8e1e7 50%,#b5c6d0 51%,#e0eff9 100%);box-shadow:0 0 1px 1px rgba(255,255,255,.45) inset}#sb_settings .farm_level .chance_scale>div.silver .name{left:-28px}#sb_settings .farm_level .chance_scale>div.gold{background-color:gold;background:linear-gradient(135deg,#e6f0a3 0,#d2e638 50%,#c3d825 51%,#dbf043 100%);box-shadow:0 0 1px 1px rgba(255,255,255,.45) inset}#sb_settings .farm_level .chance_scale>div .percent{font-size:12px;padding:2px 2px;overflow:hidden}#sb_settings .farm_level .chance_scale>div .name{position:absolute;bottom:-20px;left:0;color:#777;font-size:12px}#content{background-color:#eee;border:1px solid #aaa;padding:15px;margin-bottom:10px;max-width:1400px;width:auto;min-height:845px}#content .loading{font-size:20px;text-align:center;color:#444}#content .loading .fa{display:block;font-size:32px}.license{text-align:center;color:#fff;font-size:13px;text-shadow:0 1px 1px #000;width:100%;margin:5px 0}.license a{color:#b3d0ea}.license a:focus,.license a:hover{color:#eff5fa;text-decoration:underline}#top_menu{margin-top:-15px;margin-bottom:10px;padding-top:15px;background-color:#e3e3e3;border-bottom:1px solid #ccc;position:relative}#top_menu>div{margin-bottom:15px;padding:0 15px}#top_menu .year_navigation:after,#top_menu .year_navigation:before{content:" ";display:table}#top_menu .year_navigation:after{clear:both}#top_menu .year_navigation>div{float:left;margin-right:8px}#top_menu .year_navigation .sn_arrows .btn{padding:12px 10px}#top_menu .year_navigation .farm_picker .btn{padding:6px}#top_menu .year_navigation .year_info .yi_name{font-size:18px;font-weight:700}#top_menu .year_navigation .year_info .yi_farmtype{font-size:16px;color:#777;text-transform:capitalize}#top_menu .season_stats{position:relative;font-size:12px;background-color:#f0f0f0;border:1px solid #ccc;border-right-width:3px;border-left-width:3px}#top_menu .season_stats .table{margin-bottom:0;border-top:0}#top_menu .season_stats .table tr:first-child td,#top_menu .season_stats .table tr:first-child th{border-top:0}#top_menu .season_stats .asc_icon{margin:0 5px;color:#777}#top_menu .clear_buttons .btn-block+.btn-block{margin-top:2px}#season_picker{overflow:hidden;margin:0}#season_picker .season{height:40px;padding:2px 12px;padding-bottom:4px;background-color:#DDD1B2;border:2px solid #5E360C;border-bottom:0;opacity:.5;cursor:pointer;position:relative;bottom:-6px;-webkit-transition:all .1s;-moz-transition:all .1s;-ms-transition:all .1s;-o-transition:all .1s;transition:all .1s}#season_picker .season:hover{opacity:.65}#season_picker .season.active{opacity:1;bottom:-2px}#season_picker .season .image{position:absolute;left:0;top:0;height:16px;width:auto;margin:10px 8px;border:1px solid #777}#season_picker .season .name{font-size:18px;margin-left:28px;margin-top:2px;text-transform:capitalize}@media only screen and (max-width:767px){#season_picker .season .image{display:none}#season_picker .season .name{margin-left:0}}#season_picker .season .profit{position:absolute;top:5px;right:26px;font-size:12px;line-height:11px}#season_picker .season .profit.min{top:9px;right:12px;font-size:13px}#season_picker .season .profit .asc_icon{position:absolute;top:5px;right:-20px;font-size:14px;color:#777}@media only screen and (max-width:991px){#season_picker .season{font-size:18px}}#calendar{background-color:#FBEBC2;border:3px solid #5E360C}#calendar .day_names:after,#calendar .day_names:before{content:" ";display:table}#calendar .day_names:after{clear:both}#calendar .day_names .day_name{width:14.28571429%;float:left;box-sizing:border-box;text-align:center;font-size:22px;padding:4px}@media only screen and (max-width:767px){#calendar .day_names .day_name{display:none}}#calendar .day_container:after,#calendar .day_container:before{content:" ";display:table}#calendar .day_container:after{clear:both}#calendar .day_container .day{width:14.28571429%;height:160px;float:left;box-sizing:border-box;padding:4px;position:relative;border-right:2px solid #5E360C;border-top:2px solid #5E360C;background-color:#DDD1B2;cursor:pointer;-webkit-transition:all .2s;-moz-transition:all .2s;-ms-transition:all .2s;-o-transition:all .2s;transition:all .2s}#calendar .day_container .day:after,#calendar .day_container .day:before{content:" ";display:table}#calendar .day_container .day:after{clear:both}#calendar .day_container .day:nth-child(7n){border-right:0}#calendar .day_container .day:hover{background-color:#d2c299}@media only screen and (max-width:991px){#calendar .day_container .day{height:135px}}@media only screen and (max-width:767px){#calendar .day_container .day{width:50%;border-right:2px solid #5E360C!important;padding-top:30px}#calendar .day_container .day:nth-child(1),#calendar .day_container .day:nth-child(2){border-top:0}#calendar .day_container .day:nth-child(2n){border-right:0!important}#calendar .day_container .day .date_top{height:31px!important;padding:4px 8px;background-color:#FBEBC2;border-bottom:1px solid rgba(0,0,0,.4);position:absolute!important;top:0;left:0;width:100%;overflow:hidden}#calendar .day_container .day .date_top:after,#calendar .day_container .day .date_top:before{content:" ";display:table}#calendar .day_container .day .date_top:after{clear:both}#calendar .day_container .day .date_top .date{position:static!important;float:left}#calendar .day_container .day .date_top .event{text-align:right;top:6px!important;width:55%!important;left:auto!important;right:10px!important}}#calendar .day_container .day .date_top{height:26px;position:relative}#calendar .day_container .day .date_top .date{position:absolute;top:0;left:4px;font-size:18px}@media only screen and (max-width:991px){#calendar .day_container .day .date_top .date{left:2px;font-size:16px}}#calendar .day_container .day .date_top .event{position:absolute;top:3px;left:30px;right:0;font-size:13px;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;color:#555}#calendar .day_container .day .date_top .event img{width:16px;height:auto;image-rendering:pixelated}#calendar .day_container .day .harvesting,#calendar .day_container .day .planting{padding-bottom:11px}#calendar .day_container .day .harvesting:after,#calendar .day_container .day .harvesting:before,#calendar .day_container .day .planting:after,#calendar .day_container .day .planting:before{content:" ";display:table}#calendar .day_container .day .harvesting:after,#calendar .day_container .day .planting:after{clear:both}#calendar .day_container .day .harvesting .plan,#calendar .day_container .day .planting .plan{float:left;position:relative;margin-right:10px}#calendar .day_container .day .harvesting .plan img,#calendar .day_container .day .planting .plan img{width:24px;height:auto}#calendar .day_container .day .harvesting .plan .amount,#calendar .day_container .day .planting .plan .amount{position:absolute;bottom:-9px;right:-8px;color:#000;font-size:12px;line-height:10px}@media only screen and (max-width:991px){#calendar .day_container .day .harvesting .plan .amount,#calendar .day_container .day .planting .plan .amount{font-size:10px}}@media only screen and (max-width:991px){#calendar .day_container .day .harvesting .plan,#calendar .day_container .day .planting .plan{margin-right:4px}#calendar .day_container .day .harvesting .plan img,#calendar .day_container .day .planting .plan img{width:14px}#calendar .day_container .day .harvesting .plan .amount,#calendar .day_container .day .planting .plan .amount{bottom:-7px;right:-6px}}#calendar .day_container .day .more{font-size:13px;color:#777;margin-top:-6px}#calendar .day_container .day .profit{position:absolute;left:13px;bottom:-3px;margin:5px;font-size:12px;line-height:12px;font-weight:700}#calendar .day_container .day .profit.min{left:0;bottom:3px;font-size:13px}#calendar .day_container .day .profit .asc_icon{position:absolute;bottom:4px;left:-16px;font-size:14px;color:#777}#crop_info .crops,#crop_planner .crops,#sb_cropinfo .crops{margin-bottom:0}#crop_info .crops .crop td,#crop_planner .crops .crop td,#sb_cropinfo .crops .crop td{vertical-align:middle;position:relative}#crop_info .crops .crop img,#crop_planner .crops .crop img,#sb_cropinfo .crops .crop img{width:32px;height:auto}#crop_info .crops .crop.error td,#crop_planner .crops .crop.error td,#sb_cropinfo .crops .crop.error td{background-color:#f88}#crop_info .crops .crop .compare,#crop_planner .crops .crop .compare,#sb_cropinfo .crops .crop .compare{color:#aaa;font-size:13px;margin:0 2px}#crop_info .crops .crop .form-control,#crop_planner .crops .crop .form-control,#sb_cropinfo .crops .crop .form-control{display:inline-block;width:auto;padding:6px}#crop_info th{cursor:pointer}#crop_info .seasons{border-bottom:2px solid #ccc}#crop_info .seasons .season{padding:6px 0;cursor:pointer;text-align:center;border-radius:4px 4px 0 0;border:1px solid transparent;border-bottom:0;-webkit-transition:all .2s;-moz-transition:all .2s;-ms-transition:all .2s;-o-transition:all .2s;transition:all .2s}#crop_info .seasons .season:hover{background-color:#ddd}#crop_info .seasons .season.active{border-color:#ccc;background-color:#fff}#crop_info .crops_container .name{position:relative}#crop_info .crops_container .name .note{position:absolute;font-size:10px;color:#777;bottom:0;left:15px}#player_settings .settings{margin-bottom:20px}#player_settings .settings .btn-success{opacity:1}#player_settings .settings .btn-default{opacity:.5}#player_settings .statistics{overflow:hidden}#player_settings .statistics .chance_scale{height:25px;border:1px solid #888;border-radius:2px;margin-bottom:38px}#player_settings .statistics .chance_scale:after,#player_settings .statistics .chance_scale:before{content:" ";display:table}#player_settings .statistics .chance_scale:after{clear:both}#player_settings .statistics .chance_scale>div{height:100%;float:left;position:relative;box-sizing:border-box}#player_settings .statistics .chance_scale>div:not(:last-child){border-right:1px solid #aaa}#player_settings .statistics .chance_scale>div.regular{background-color:#bf8550}#player_settings .statistics .chance_scale>div.silver{background-color:silver;background:linear-gradient(135deg,#f2f6f8 0,#d8e1e7 50%,#b5c6d0 51%,#e0eff9 100%);box-shadow:0 0 1px 1px rgba(255,255,255,.45) inset}#player_settings .statistics .chance_scale>div.silver .name{left:-28px}#player_settings .statistics .chance_scale>div.gold{background-color:gold;background:linear-gradient(135deg,#e6f0a3 0,#d2e638 50%,#c3d825 51%,#dbf043 100%);box-shadow:0 0 1px 1px rgba(255,255,255,.45) inset}#player_settings .statistics .chance_scale>div .percent{font-size:12px;padding:2px 2px;overflow:hidden}#player_settings .statistics .chance_scale>div .name{position:absolute;bottom:-20px;left:0;color:#777;font-size:12px}.modal{padding-right:0!important}.modal .modal-dialog{width:auto;min-width:400px;max-width:1000px}.modal .modal-dialog .modal-content{background-color:#f0f0f0;border-radius:0}.modal .modal-dialog .modal-content .modal-header{background-color:#ddd}.modal .modal-dialog .modal-content .modal-header .modal-title{text-align:center;font-weight:700}.modal .modal-dialog .modal-content .modal-body label{width:100%}.modal .modal-dialog .modal-content .modal-footer{background-color:#ddd}.modal .modal-dialog .modal-content .modal-body,.modal .modal-dialog .modal-content .modal-footer,.modal .modal-dialog .modal-content .modal-header{border-color:#ccc}

/* Normalize top-left farm view button icons */
#menu img {
  width: 24px;
  height: 24px;
  object-fit: contain;
  image-rendering: pixelated;
  vertical-align: middle;
}


/* Ensure Plant / Auto-Plant buttons stay right-aligned in menu */
#menu {
  display: flex;
  align-items: center;
}

#menu .menu-left {
  flex: 1;
}

#menu .menu-right {
  margin-left: auto;
  display: flex;
  gap: 6px;
}


/* Right-justify Plant / Autoplant buttons inside the Plant Crop modal */
.plant_crop .col-md-3.col-xs-4 {
  text-align: right;
}
.plant_crop .col-md-3.col-xs-4 .btn {
  display: inline-block;
  margin-left: 6px;
}


/* Keep Plant/Autoplant aligned to the right in the Plant Crop modal */
.plant_crop .plant-actions {
  text-align: right;
}
.plant_crop .plant-actions .btn {
  display: inline-block;
  margin-left: 6px;
}


/* =====================================================
   MOBILE — single authoritative section
   Covers: header, top menu, season picker, calendar,
           modal, tables, form, suggestions strip.
   Breakpoints:
     ≤767px  = xs (phone portrait + narrow landscape)
     ≤480px  = xs-tight (most phone portraits)
   ===================================================== */

/* --- Notice banner --- */
.mobile-warning {
  display: none;
  padding: 6px 12px;
  text-align: center;
  background: rgba(255, 243, 205, 0.92);
  color: #5f4b00;
  font-size: 12px;
  border-bottom: 1px solid rgba(150, 110, 0, 0.2);
}
@media only screen and (max-width: 767px) {
  .mobile-warning { display: block; }
}

/* --- Header: tighter on mobile --- */
@media only screen and (max-width: 767px) {
  header {
    padding: 4px 10px 2px;
    margin: 0;
  }
  header .logo { height: 32px; }
  header .page_title {
    font-size: 15px;
    margin-left: 8px;
    top: 4px;
  }
}

/* --- #content: remove large min-height and excess padding on mobile --- */
@media only screen and (max-width: 767px) {
  #content {
    padding: 0 !important;
    min-height: 0 !important;
    border-left: 0;
    border-right: 0;
  }
}

/* --- Top menu: compact single-row on mobile --- */
@media only screen and (max-width: 767px) {
  #top_menu {
    margin-top: 0;
    padding-top: 8px;
  }
  #top_menu > div { margin-bottom: 8px; padding: 0 8px; }

  /* Year nav, farm picker, year info all inline */
  .year_navigation {
    display: flex !important;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
  }
  .year_navigation .sn_arrows .btn { padding: 8px 10px; }
  .year_navigation .farm_picker .btn { padding: 5px 7px; }
  .year_navigation .year_info { flex: 1; }
  .year_navigation .year_info .yi_name  { font-size: 15px; font-weight: 700; }
  .year_navigation .year_info .yi_farmtype { font-size: 12px; color: #777; }
}

/* Mobile compact stat strip (shown only on xs, defined in HTML) */
.mobile-stat-strip {
  display: none;
}
@media only screen and (max-width: 767px) {
  .mobile-stat-strip {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 4px 0 2px;
    font-size: 12px;
    color: #444;
    flex-wrap: wrap;
  }
  .mobile-stat-strip .fa {
    color: #7a5c28;
    margin-right: 3px;
  }
  .mobile-clear-btn {
    margin-left: auto;
    padding: 3px 8px;
    background: #ddd;
    border: 1px solid #bbb;
    border-radius: 3px;
    cursor: pointer;
    font-size: 11px;
    color: #555;
  }
  .mobile-clear-btn:active { background: #ccc; }
}

/* --- Season picker: compact pill tabs on mobile --- */
@media only screen and (max-width: 767px) {
  #season_picker {
    position: sticky;
    top: 0;
    z-index: 5;
    background: #e8e0c8;
    border-bottom: 2px solid #5E360C;
    margin: 0;
  }
  #season_picker .col-xs-3 { padding: 0; }
  #season_picker .season {
    height: 34px !important;
    padding: 0 4px !important;
    display: flex;
    align-items: center;
    justify-content: center;
    bottom: 0 !important;
    border-bottom: 0;
    border-top: 0;
    border-left: 1px solid #5E360C;
    border-right: 0;
  }
  #season_picker .season:first-child { border-left: 0; }
  #season_picker .season.active {
    background-color: #f5efd0;
    bottom: 0 !important;
  }
  .mobile-season-name {
    font-size: 13px !important;
    font-weight: 700;
    margin: 0 !important;
    text-transform: capitalize;
  }
  #season_picker .season .image {
    display: block !important;
    position: static !important;
    margin: 0 4px 0 0 !important;
    height: 18px !important;
    border: none !important;
  }
}

/* --- Calendar portrait: 2-column auto-height cells --- */
@media only screen and (max-width: 767px) and (orientation: portrait) {
  #calendar .day_container .day {
    height: auto !important;
    min-height: 80px;
    padding-bottom: 28px; /* room for profit */
  }
  /* Crop icons slightly larger on the 2-column grid */
  #calendar .day_container .day .planting .plan img,
  #calendar .day_container .day .harvesting .plan img {
    width: 22px !important;
  }
}

/* --- Calendar landscape: restore 7-column layout --- */
@media only screen and (max-width: 767px) and (orientation: landscape) {
  #calendar .day_names .day_name { display: block; }
  #calendar .day_names .day_name,
  #calendar .day_container .day {
    width: 14.28571429% !important;
    float: left !important;
  }
  #calendar .day_container .day {
    padding-top: 4px !important;
    height: 105px !important;
  }
}

/* --- Calendar all mobile: readable day label and profit --- */
@media only screen and (max-width: 767px) {
  #calendar .day_container .day .date_top .date {
    font-size: 12px !important;
  }
  #calendar .day_container .day .profit,
  #calendar .day_container .day .profit.min {
    font-size: 10px !important;
    bottom: 2px !important;
    left: 4px !important;
  }
  /* Quick-plant prompt: slightly smaller */
  .quick-plant-prompt {
    font-size: 9px;
    padding: 2px 3px;
  }
}

/* --- Modal: full-screen on mobile --- */
@media only screen and (max-width: 767px) {
  .modal-dialog {
    min-width: 0 !important;
    width: auto !important;
    margin: 0 !important;
  }
  .modal-content {
    border-radius: 0 !important;
    border: none !important;
    min-height: 100vh;
  }
  .modal .modal-body  { padding: 10px 8px; }
  .modal .modal-header { padding: 10px 12px; }
  .modal .modal-footer { padding: 8px 12px; }
  .modal .modal-title  { font-size: 14px; }
  .modal .close { padding: 12px; margin: -8px -8px -8px 0; }
}

/* --- Modal tables: card layout on mobile --- */
@media only screen and (max-width: 767px) {
  /* Hide the thead — labels come from data-label attributes */
  .modal .crops thead { display: none; }

  .modal .crops tbody tr {
    display: block;
    border: 1px solid #ddd;
    border-radius: 3px;
    margin-bottom: 8px;
    background: #fff;
    padding: 6px 8px;
    position: relative;
  }
  .modal .crops tbody td {
    display: inline-flex;
    align-items: center;
    border: none !important;
    padding: 2px 4px;
    font-size: 13px;
    vertical-align: middle;
  }
  /* First two tds (icon + name) go full width as the card header */
  .modal .crops tbody td:nth-child(1) {
    padding-right: 6px;
  }
  .modal .crops tbody td:nth-child(2) {
    font-weight: 600;
    font-size: 14px;
    flex: 1;
  }
  /* Action buttons (edit/delete) float right */
  .modal .crops tbody td:last-child,
  .modal .crops tbody td:nth-last-child(2) {
    float: right;
    padding: 2px 2px;
  }
  /* Hide lower-priority columns in card view */
  .mobile-hide { display: none !important; }
}

/* --- Form inputs: prevent iOS zoom, improve tap targets --- */
@media only screen and (max-width: 767px) {
  .modal .form-control {
    font-size: 16px !important; /* prevents iOS auto-zoom */
    height: 40px;
    padding: 8px 10px;
  }
  .modal .btn {
    min-height: 40px;
    padding: 8px 14px;
    font-size: 14px;
  }
  /* Plant/Autoplant buttons: full-width stacked on mobile */
  .plant-actions {
    display: flex !important;
    gap: 8px;
    margin-top: 6px;
  }
  .plant-actions .btn {
    flex: 1;
  }
  /* Crop search dropdown: taller items for touch */
  .crop-search-item {
    padding: 10px 10px !important;
    font-size: 14px !important;
  }
  .crop-search-item img {
    width: 22px !important;
    height: 22px !important;
  }
}

/* --- Suggestion chips: scroll horizontally on mobile --- */
@media only screen and (max-width: 767px) {
  .replant-chips {
    flex-wrap: nowrap !important;
    overflow-x: auto;
    padding-bottom: 4px;
    -webkit-overflow-scrolling: touch;
  }
  .replant-chip {
    flex-shrink: 0;
  }
}


/* Support footer */
.support-footer {
  margin-top: 32px;
  padding: 16px;
  border-top: 1px solid rgba(0,0,0,0.1);
  text-align: center;
  font-size: 14px;
  color: #444;
}

.support-footer .support-text {
  margin-bottom: 10px;
  line-height: 1.4;
}

@media (max-width: 768px) {
  .support-footer {
    font-size: 13px;
  }
}


/* Footer readability fix (Option A) */
.license,
.support-footer {
  background: rgba(0, 0, 0, 0.45);
  color: #f0f0f0;
  text-align: center;
  font-size: 1rem;        /* bumped from 0.85rem */
  line-height: 1.35;
  padding: 12px 14px;
}

.license a,
.support-footer a {
  color: #ffffff;
  text-decoration: underline;
}


/* --- Multi-event stacking (festivals + birthdays on same day) --- */
#calendar .day_container .day .date_top{
  position: relative !important;
  height: auto !important;
  overflow: visible !important;
}
#calendar .day_container .day .date_top .event{
  position: relative !important;
  display: block;
  margin-top: 2px;
}


/* --- FIX: stack multiple events in the date header without overlapping crops --- */
#calendar .day_container .day .date_top{
  position: relative !important;
  height: auto !important;
  overflow: visible !important;
}
#calendar .day_container .day .date_top .date{
  position: static !important;
  float: left;
}
#calendar .day_container .day .date_top .event{
  position: relative !important;
  top: auto !important;
  left: auto !important;
  right: auto !important;
  display: block;
  margin-left: 28px;
  text-align: left !important;
  width: auto !important;
}



/* Fruit trees cannot use fertilizer */
select[disabled] {
  opacity: 0.6;
  cursor: not-allowed;
}


/* ============================================================
   UX IMPROVEMENTS - appended
   ============================================================ */


/* --- #1 Searchable crop picker --- */
.crop-search-wrapper {
  position: relative;
}
.crop-search-wrapper input::placeholder {
  color: #555;
  font-style: italic;
}
.crop-search-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 1050;
  max-height: 240px;
  overflow-y: auto;
  background: #f5f5f5;
  border: 1px solid #aaa;
  border-top: none;
  box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}
.crop-search-item {
  padding: 5px 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  border-bottom: 1px solid #e5e5e5;
  transition: background-color 0.1s;
}
.crop-search-item:last-child { border-bottom: none; }
.crop-search-item img { width: 24px; height: auto; image-rendering: pixelated; flex-shrink: 0; }
.crop-search-item:hover { background-color: #e2e8f0; }
.crop-search-selected { background-color: #dde8c8 !important; font-weight: 600; }
.crop-group-label { margin-left: auto; font-size: 12px; opacity: 0.7; }
.crop-search-empty { padding: 8px 10px; color: #888; font-style: italic; font-size: 13px; }


/* --- #2 Calendar day tinting (planting / harvest / both) --- */
#calendar .day_container .day.has-planting {
  background-color: #cdd5e8;
}
#calendar .day_container .day.has-planting:hover {
  background-color: #bdc7dc;
}
#calendar .day_container .day.has-harvest {
  background-color: #c8dfc0;
}
#calendar .day_container .day.has-harvest:hover {
  background-color: #b8d0b0;
}
/* has-both: left half = harvest green, right half = planting blue */
#calendar .day_container .day.has-both {
  background: linear-gradient(to right, #c8dfc0 50%, #cdd5e8 50%);
}
#calendar .day_container .day.has-both:hover {
  background: linear-gradient(to right, #b8d0b0 50%, #bdc7dc 50%);
}


/* --- #3 Iridium quality bar segment --- */
#sb_settings .farm_level .chance_scale > div.iridium {
  background-color: #a47dc8;
  background: linear-gradient(135deg, #d4b8f0 0%, #a87cd4 50%, #9060c0 51%, #c4a0e8 100%);
  box-shadow: 0 0 1px 1px rgba(255,255,255,.35) inset;
}
#sb_settings .farm_level .chance_scale > div.iridium .name {
  left: 0;
}


/* --- #4 Sort direction indicators on Crop Info headers --- */
.sort-indicator {
  font-size: 11px;
  color: #5E360C;
  font-weight: bold;
  margin-left: 2px;
}
#sb_cropinfo .crops_container .crops thead th {
  white-space: nowrap;
  user-select: none;
}
#sb_cropinfo .crops_container .crops thead th:hover {
  background-color: #e8e8e8;
}


/* --- #5 Location badge colour coding --- */
.loc_badge {
  position: absolute;
  right: 2px;
  top: 2px;
  font-size: 10px;
  line-height: 12px;
  padding: 1px 4px;
  border-radius: 10px;
  color: #fff;
  font-weight: bold;
}
.loc-badge-farm     { background: rgba(94, 54, 12, 0.75); }   /* Stardew brown */
.loc-badge-greenhouse { background: rgba(50, 130, 60, 0.80); } /* muted green */
.loc-badge-island   { background: rgba(185, 110, 20, 0.80); } /* warm sandy orange */


/* --- #7 Profit colour tinting on calendar days --- */
#calendar .day_container .day .profit.profit-pos,
#calendar .day_container .day .profit.profit-pos > div {
  color: #2a6e1e;
  font-weight: bold;
}
#calendar .day_container .day .profit.profit-neg,
#calendar .day_container .day .profit.profit-neg > div {
  color: #8b1a1a;
}


/* --- #8 Profit tinting on season tabs --- */
#season_picker .season .profit-pos { color: #2a6e1e; font-weight: bold; }
#season_picker .season .profit-neg { color: #8b1a1a; }


/* --- #9 "More…" styled as a subtle link --- */
#calendar .day_container .day .more a {
  color: #5E360C;
  opacity: 0.75;
  font-size: 12px;
  font-style: italic;
  text-decoration: underline dotted;
  cursor: pointer;
}
#calendar .day_container .day .more a:hover {
  opacity: 1;
  text-decoration: underline;
}


/* --- #10 Legacy section in Settings --- */
.legacy-section {
  margin-top: 4px;
}
.legacy-toggle {
  cursor: pointer;
  color: #666;
  font-size: 13px;
  padding: 4px 2px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-bottom: 1px dashed #bbb;
  user-select: none;
  transition: color 0.15s;
}
.legacy-toggle:hover { color: #333; }
.legacy-toggle .fa { font-size: 12px; }


/* --- #11 Empty state styling in modal --- */
.empty-state {
  font-style: italic;
  opacity: 0.75;
  padding: 4px 0;
}


/* --- #12 FBP inline tooltip --- */
.fbp-help {
  cursor: help;
  border-bottom: 1px dotted #888;
  color: #555;
}


/* --- #6 Keyboard hints in Settings --- */
.keyboard-hints {
  background: rgba(0,0,0,0.04);
  border: 1px solid #ddd;
  border-radius: 3px;
  padding: 8px 10px;
  font-size: 12px;
  color: #555;
}
.keyboard-hints .hint-title {
  font-weight: bold;
  color: #444;
  margin-bottom: 5px;
}
.keyboard-hints .hint-row {
  margin: 3px 0;
  display: flex;
  align-items: center;
  gap: 5px;
}
.keyboard-hints kbd {
  display: inline-block;
  padding: 1px 5px;
  font-size: 11px;
  font-family: monospace;
  background: #fff;
  border: 1px solid #aaa;
  border-radius: 3px;
  box-shadow: 0 1px 1px rgba(0,0,0,0.15);
  color: #333;
}


/* --- #13 Mobile sticky season picker --- */
@media only screen and (max-width: 767px) {
  #season_picker {
    position: sticky;
    top: 0;
    z-index: 5;
    background-color: #eee;
  }
}



/* --- Quick-plant prompt on harvest-day calendar cells --- */
.quick-plant-prompt {
  position: absolute;
  bottom: 3px;
  left: 4px;
  right: 4px;
  background: rgba(60, 100, 50, 0.82);
  color: #e8f5e0;
  font-size: 10px;
  font-weight: 600;
  line-height: 1.1;
  padding: 2px 5px 3px;
  border-radius: 3px;
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: background 0.15s, color 0.15s;
  z-index: 2;
  letter-spacing: 0.01em;
}
.quick-plant-prompt:hover {
  background: rgba(40, 80, 30, 0.92);
  color: #fff;
}
.quick-plant-prompt .fa {
  font-size: 9px;
  margin-right: 2px;
  opacity: 0.85;
}

/* On small screens keep it readable */
@media only screen and (max-width: 991px) {
  .quick-plant-prompt {
    font-size: 9px;
    padding: 2px 3px;
  }
}


/* --- Fertilizer badge on calendar planting cells --- */
/* Sits bottom-left of each plan icon, opposite corner from loc_badge */
.plan .fert-badge {
  position: absolute;
  bottom: -7px;
  left: -6px;
  width: 14px;
  height: 14px;
  background: rgba(255,255,255,0.82);
  border-radius: 50%;
  border: 1px solid rgba(0,0,0,0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 3;
  box-shadow: 0 1px 2px rgba(0,0,0,0.18);
}
.plan .fert-badge img {
  width: 10px;
  height: 10px;
  image-rendering: pixelated;
  display: block;
}

@media only screen and (max-width: 991px) {
  .plan .fert-badge {
    width: 11px;
    height: 11px;
    bottom: -6px;
    left: -5px;
  }
  .plan .fert-badge img {
    width: 8px;
    height: 8px;
  }
}


/* --- Modal replanting suggestions strip --- */
.replant-suggestions {
  margin: 0 0 16px;
  padding: 10px 12px 12px;
  background: #f7f2e4;
  border: 1px solid #d4c49a;
  border-radius: 3px;
}
.replant-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #7a5c28;
  margin-bottom: 8px;
}
.replant-label .fa {
  margin-right: 4px;
}
.replant-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.replant-chip {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 6px 10px 6px 7px;
  background: #ede5cc;
  border: 1px solid #c8ab72;
  border-radius: 3px;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
  min-width: 0;
}
.replant-chip:hover {
  background: #e2d5b0;
  border-color: #a07840;
}
.replant-chip-active {
  background: #d4c48a !important;
  border-color: #7a5c28 !important;
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.12);
}
.replant-chip img {
  width: 20px;
  height: 20px;
  image-rendering: pixelated;
  flex-shrink: 0;
}
.replant-chip-name {
  font-size: 13px;
  font-weight: 600;
  color: #3a2800;
  white-space: nowrap;
}
.replant-chip-meta {
  font-size: 11px;
  color: #7a6030;
  white-space: nowrap;
  margin-left: 2px;
}
